Yuki Kishimoto on Nostr: Thanks! This would be the new snippet ```rust use nwc::prelude::*; let nwc = ...
Thanks! This would be the new snippet
```rust
use nwc::prelude::*;
let nwc = NWC::new(uri);
let params = PayInvoiceRequest::new(invoice);
let response = nwc.pay_invoice(params).await?;
```
Published at
2024-11-27 11:26:30Event JSON
{
"id": "4a0937528bc6b6c64c56b146d584fc9055d9234bb09b458192fd9971710fe432",
"pubkey": "68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272",
"created_at": 1732706790,
"kind": 1,
"tags": [
[
"e",
"400cf78dec099edd2948c161df57a82ffc0e117e7345554841661128e4b3adbb",
"",
"root"
],
[
"e",
"3b94dce78ebf28e184c09ed6d7270f18027256610ae3aea1bdf39ba47f99fac4",
"",
"reply"
],
[
"p",
"68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272"
],
[
"p",
"dbe0605a9c73172bad7523a327b236d55ea4b634e80e78a9013db791f8fd5b2c"
],
[
"p",
"15b5cf6cdf4fd1c02f28bcce0f197cafae4c8c7c66a3e2e23af9fe610875315e"
],
[
"r",
"nwc.pay"
]
],
"content": "Thanks! This would be the new snippet\n\n```rust\nuse nwc::prelude::*;\n\nlet nwc = NWC::new(uri);\n\nlet params = PayInvoiceRequest::new(invoice);\nlet response = nwc.pay_invoice(params).await?;\n```",
"sig": "fc0b9cd80f7e4394059e7746a285ac216142d00eadd81b051b7336127c1d195fb9f75c344c7990b5dd7fd4e3e0ec2653cd03339df33f9fd37d15659627993c1c"
}