Skip to content

Commit 4a08199

Browse files
committed
add batch_transfer_idx to RgbInfo + use rgb-lib master
1 parent f375949 commit 4a08199

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

lightning-invoice/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ hashbrown = { version = "0.13", default-features = false }
3535

3636
[lints]
3737
workspace = true
38+
39+
[patch.crates-io]
40+
rgb-lib = { git = "https://github.com/RGB-Tools/rgb-lib", branch = "master" }

lightning/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,6 @@ musig2 = { git = "https://github.com/arik-so/rust-musig2", rev = "6f95a05718cbb4
8585

8686
[lints]
8787
workspace = true
88+
89+
[patch.crates-io]
90+
rgb-lib = { git = "https://github.com/RGB-Tools/rgb-lib", branch = "master" }

lightning/src/rgb_utils/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use bitcoin::secp256k1::PublicKey;
1818
use bitcoin::TxOut;
1919
use rgb_lib::{
2020
bitcoin::psbt::Psbt as RgbLibPsbt,
21+
keys::WitnessVersion,
2122
wallet::{
2223
rust_only::{AssetColoringInfo, ColoringInfo},
2324
DatabaseType, SinglesigKeys, Wallet, WalletData,
@@ -63,6 +64,9 @@ pub struct RgbInfo {
6364
pub local_rgb_amount: u64,
6465
/// Channel RGB remote amount
6566
pub remote_rgb_amount: u64,
67+
/// Batch transfer index from rgb-lib (set after rgb_send_begin)
68+
#[serde(default, skip_serializing_if = "Option::is_none")]
69+
pub batch_transfer_idx: Option<i32>,
6670
}
6771

6872
/// RGB payment info
@@ -158,6 +162,7 @@ fn _new_rgb_wallet(
158162
vanilla_keychain: None,
159163
master_fingerprint,
160164
mnemonic: None,
165+
witness_version: WitnessVersion::Taproot,
161166
};
162167
Wallet::new(
163168
WalletData {
@@ -700,6 +705,7 @@ pub(crate) fn handle_funding(
700705
schema: AssetSchema::from_schema_id(consignment.schema_id()).unwrap(),
701706
local_rgb_amount: push_amount,
702707
remote_rgb_amount: channel_rgb_amount - push_amount,
708+
batch_transfer_idx: None,
703709
};
704710
let temporary_channel_id_str = temporary_channel_id.0.as_hex().to_string();
705711
write_rgb_channel_info(

0 commit comments

Comments
 (0)