Skip to content

Commit 3d5a5fa

Browse files
fix Key Mgmt paragraph spacing
1 parent 7fc46e4 commit 3d5a5fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/key_mgmt.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ title: Key Management
55
Relevant reference: https://docs.rs/lightning/0.0.12/lightning/chain/keysinterface/struct.KeysManager.html
66

77
LDK Private Key Information is primarily provided through the `chain::keysinterface::KeysInterface` trait. It includes a few basic methods to get public and private key information, as well as a method to get an instance of a second trait which provides per-channel information - `chain::keysinterface::ChannelKeys`. While a custom `KeysInterface` implementation allows simple flexibility to control derivation of private keys, `ChannelKeys` focuses on signing lightning transactions and is primarily useful if you want to store private key material on a separate device which enforces lightning protocol details.
8+
89
A simple implementation of `KeysInterface` is provided in the form of `chain::keysinterface::KeysManager`, see its documentation for more details on its key derivation. It uses `chain::keysinterface::InMemoryChannelKeys` for channel signing, which is likely an appropriate signer for custom `KeysInterface` implementations as well.
10+
11+
912
A `KeysManager` can be constructed simply with only a 32-byte seed and some integers which ensure uniqueness across restarts (defined as `starting_time_secs` and `starting_time_nanos`).
13+
1014
```rust
1115
let mut random_32_bytes = [0; 32];
1216
// Fill in random_32_bytes with secure random data, or, on restart, reload the seed from disk.

0 commit comments

Comments
 (0)