Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mattoshibtc committed Sep 7, 2023
1 parent 5dffc2c commit 9ff46de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/key_management.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Key Management

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).
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).

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.
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.

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`):

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

</template>
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/build_a_node_in_java.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ generation is unique across restarts.

**Dependencies:** random bytes

**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)
**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)

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

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/build_a_node_in_rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ generation is unique across restarts.

**Dependencies:** random bytes

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

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

Expand Down

0 comments on commit 9ff46de

Please sign in to comment.