Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 1e503b9

Browse files
committed
Use Bolt11Invoice type in LSPS1
1 parent 7f60e7f commit 1e503b9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ categories = ["cryptography::cryptocurrencies"]
1515

1616
[features]
1717
default = ["std"]
18-
std = ["lightning/std", "bitcoin/std"]
19-
no-std = ["hashbrown", "lightning/no-std", "bitcoin/no-std", "core2/alloc"]
18+
std = ["lightning/std", "bitcoin/std", "lightning-invoice/std"]
19+
no-std = ["hashbrown", "lightning/no-std", "lightning-invoice/no-std", "bitcoin/no-std", "core2/alloc"]
2020

2121
[dependencies]
2222
lightning = { version = "0.0.121", default-features = false, features = ["max_level_trace"] }
23-
lightning-invoice = "0.29.0"
23+
lightning-invoice = { version = "0.29.0", default-features = false, features = ["serde"] }
2424
bitcoin = { version = "0.30.2", default-features = false, features = ["serde"] }
2525
hashbrown = { version = "0.8", optional = true }
2626
core2 = { version = "0.3.0", optional = true, default-features = false }

src/lsps1/msgs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use crate::prelude::{String, Vec};
55

66
use bitcoin::address::{Address, NetworkUnchecked};
77

8+
use lightning_invoice::Bolt11Invoice;
9+
810
use serde::{Deserialize, Serialize};
911

1012
use chrono::Utc;
@@ -141,7 +143,7 @@ pub struct OrderPayment {
141143
/// What the client needs to pay in total to open the requested channel.
142144
pub order_total_sat: u64,
143145
/// A BOLT11 invoice the client can pay to have to channel opened.
144-
pub bolt11_invoice: String,
146+
pub bolt11_invoice: Bolt11Invoice,
145147
/// An on-chain address the client can send [`Self::order_total_sat`] to to have the channel
146148
/// opened.
147149
pub onchain_address: Address<NetworkUnchecked>,

0 commit comments

Comments
 (0)