Skip to content

Commit 35c6773

Browse files
committed
Update KeysManager link
1 parent 6446a6b commit 35c6773

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Diff for: docs/key_management.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Key Management
22

3-
LDK provides a simple default `KeysManager` implementation that takes a 32-byte seed for use as a BIP 32 extended key and derives keys from that. Check out the [Rust docs](https://docs.rs/lightning/*/lightning/chain/keysinterface/struct.KeysManager.html).
3+
LDK provides a simple default `KeysManager` implementation that takes a 32-byte seed for use as a BIP 32 extended key and derives keys from that. Check out the [Rust docs](https://docs.rs/lightning/*/lightning/sign/struct.KeysManager.html).
44

5-
However, LDK also allows to customize the way key material and entropy are sourced through custom implementations of the `NodeSigner`, `SignerProvider`, and `EntropySource` traits located in `chain::keysinterface`. These traits include basic methods to provide public and private key material, as well as pseudorandom numbers.
5+
However, LDK also allows to customize the way key material and entropy are sourced through custom implementations of the `NodeSigner`, `SignerProvider`, and `EntropySource` traits located in `sign`. These traits include basic methods to provide public and private key material, as well as pseudorandom numbers.
66

77
A `KeysManager` can be constructed simply with only a 32-byte seed and some random integers which ensure uniqueness across restarts (defined as `starting_time_secs` and `starting_time_nanos`):
88

@@ -13,7 +13,7 @@ A `KeysManager` can be constructed simply with only a 32-byte seed and some rand
1313
// Fill in random_32_bytes with secure random data, or, on restart, reload the seed from disk.
1414
let mut random_32_bytes = [0; 32];
1515
let start_time = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap();
16-
let keys_interface_impl = lightning::chain::keysinterface::KeysManager::new(&random_32_bytes, start_time.as_secs(), start_time.subsec_nanos());
16+
let keys_interface_impl = lightning::sign::KeysManager::new(&random_32_bytes, start_time.as_secs(), start_time.subsec_nanos());
1717
```
1818

1919
</template>
@@ -181,7 +181,7 @@ An advantage to this approach is that the LDK entropy is contained within your i
181181

182182
# Spending On-Chain Funds
183183

184-
When a channel has been closed and some outputs on chain are spendable only by us, LDK provides a `util::events::Event::SpendableOutputs` event in return from `ChannelMonitor::get_and_clear_pending_events()`. It contains a list of `chain::keysinterface::SpendableOutputDescriptor` objects which describe the output and provide all necessary information to spend it.
184+
When a channel has been closed and some outputs on chain are spendable only by us, LDK provides a `util::events::Event::SpendableOutputs` event in return from `ChannelMonitor::get_and_clear_pending_events()`. It contains a list of `sign::SpendableOutputDescriptor` objects which describe the output and provide all necessary information to spend it.
185185

186186
If you're using `KeysManager` directly, a utility method is provided which can generate a signed transaction given a list of `
187187
SpendableOutputDescriptor` objects. `KeysManager::spend_spendable_outputs` can be called any time after receiving the `SpendableOutputDescriptor` objects to build a spending transaction, including delaying until sending funds to an external destination or opening a new channel. Note that if you open new channels directly with `SpendableOutputDescriptor` objects, you must ensure all closing/destination scripts provided to LDK are SegWit (either native or P2SH-wrapped).

Diff for: docs/overview/private_key_management.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ LDK provides a default implementation for key management, but you can choose to
44

55
While LDK's default implementation is currently located within the `rust-lightning` crate, it is still considered a sample module.
66

7-
[LDK's `KeysManager` docs](https://docs.rs/lightning/*/lightning/chain/keysinterface/struct.KeysManager.html).
7+
[LDK's `KeysManager` docs](https://docs.rs/lightning/*/lightning/sign/struct.KeysManager.html).

Diff for: docs/tutorials/build_a_node_in_java.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ generation is unique across restarts.
310310

311311
**Dependencies:** random bytes
312312

313-
**References:** [Rust docs](https://docs.rs/lightning/*/lightning/chain/keysinterface/struct.KeysManager.html), [Java bindings](https://github.com/lightningdevkit/ldk-garbagecollected/blob/main/src/main/java/org/ldk/structs/KeysManager.java), [Key Management guide](/key_management.md)
313+
**References:** [Rust docs](https://docs.rs/lightning/*/lightning/sign/struct.KeysManager.html), [Java bindings](https://github.com/lightningdevkit/ldk-garbagecollected/blob/main/src/main/java/org/ldk/structs/KeysManager.java), [Key Management guide](/key_management.md)
314314

315315
### 10. Read `ChannelMonitor`s from disk
316316

Diff for: docs/tutorials/build_a_node_in_rust.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ generation is unique across restarts.
264264

265265
**Dependencies:** random bytes
266266

267-
**References:** [`KeysManager` docs](https://docs.rs/lightning/*/lightning/chain/keysinterface/struct.KeysManager.html), [Key Management guide](/key_management.md)
267+
**References:** [`KeysManager` docs](https://docs.rs/lightning/*/lightning/sign/struct.KeysManager.html), [Key Management guide](/key_management.md)
268268

269269
### Step 7. Read `ChannelMonitor` state from disk
270270

0 commit comments

Comments
 (0)