Skip to content

Commit

Permalink
Docs: recover provide cert at run-time
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikDeSmedt committed Oct 26, 2023
1 parent 0a8f1de commit 3cbcb6c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/src/getting-started/recover.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ In order to recover access all you need to do is recover the `seed` from the BIP
```rust
use gl_client::{Signer, TlsConfig, Scheduler, Bitcoin};

let tls = TlsConfig();
let cert = ...; // Your developer certificate (client.crt)
let key = ...; // Your developer key (client-key.pem)

let tls = TlsConfig().identity(cert, key);
let signer = Signer(seed, Network::Bitcoin, tls);
let scheduler = Scheduler::new(signer.node_id(), Network::Bitcoin).await;

Expand All @@ -24,7 +27,10 @@ In order to recover access all you need to do is recover the `seed` from the BIP
```python
from glclient import Scheduler, Signer, TlsConfig

tls = TlsConfig()
cert = ... // Your developer certificate
key = ... // Your developer key

tls = TlsConfig().identity(cert, key);
signer = Signer(seed, network="bitcoin", tls=tls)
scheduler = Scheduler(
node_id=signer.node_id(),
Expand All @@ -48,4 +54,4 @@ will provide access to the node.
so you can load it next time you want to interact with the node.

[signer]: ./index.md#signer
[scheduler]: ./index.md#scheduler
[scheduler]: ./index.md#scheduler

0 comments on commit 3cbcb6c

Please sign in to comment.