Skip to content

Commit

Permalink
Merge pull request #222 from tnull/2023-12-fix-example
Browse files Browse the repository at this point in the history
Update `README` example to use `Bolt11Invoice`
  • Loading branch information
tnull authored Dec 20, 2023
2 parents 2878217 + 83b5897 commit 6a8c9d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The primary abstraction of the library is the [`Node`][api_docs_node], which can

```rust
use ldk_node::{Builder, Network};
use ldk_node::lightning_invoice::Invoice;
use ldk_node::lightning_invoice::Bolt11Invoice;
use ldk_node::lightning::ln::msgs::SocketAddress;
use ldk_node::bitcoin::secp256k1::PublicKey;
use std::str::FromStr;
Expand All @@ -39,7 +39,7 @@ fn main() {
println!("EVENT: {:?}", event);
node.event_handled();

let invoice = Invoice::from_str("INVOICE_STR").unwrap();
let invoice = Bolt11Invoice::from_str("INVOICE_STR").unwrap();
node.send_payment(&invoice).unwrap();

node.stop().unwrap();
Expand Down

0 comments on commit 6a8c9d9

Please sign in to comment.