Skip to content

Commit 332dfd7

Browse files
committed
update rgb-lib to 0.3.0-alpha.12
1 parent 673eaf5 commit 332dfd7

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

lightning-invoice/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ serde = { version = "1.0.118", optional = true }
2424
bitcoin = { version = "0.32.2", default-features = false, features = ["secp-recovery"] }
2525

2626
# RGB and related
27-
rgb-lib = { version = "0.3.0-alpha.11", features = [
27+
rgb-lib = { version = "0.3.0-alpha.12", features = [
2828
"electrum",
2929
"esplora",
30-
], git = "https://github.com/RGB-Tools/rgb-lib.git", rev = "952cd185" }
30+
] }
3131

3232
[dev-dependencies]
3333
serde_json = { version = "1"}

lightning/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ libm = { version = "0.2", optional = true, default-features = false }
5353

5454
# RGB and related
5555
futures = "0.3"
56-
rgb-lib = { version = "0.3.0-alpha.11", features = [
56+
rgb-lib = { version = "0.3.0-alpha.12", features = [
5757
"electrum",
5858
"esplora",
59-
], git = "https://github.com/RGB-Tools/rgb-lib.git", rev = "952cd185" }
59+
] }
6060
serde = { version = "^1.0", features = [
6161
"derive",
6262
] }

lightning/src/rgb_utils/mod.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,18 @@ async fn _get_rgb_wallet(ldk_data_dir: &Path) -> Wallet {
141141
async fn _accept_transfer(
142142
ldk_data_dir: &Path, funding_txid: String, consignment_endpoint: RgbTransport,
143143
) -> Result<(RgbTransfer, u64), RgbLibError> {
144+
let funding_vout = 1;
144145
let (data_dir, bitcoin_network, pubkey) = _get_wallet_data(ldk_data_dir);
145146
let indexer_url = _get_indexer_url(ldk_data_dir);
146147
tokio::task::spawn_blocking(move || {
147148
let mut wallet = _new_rgb_wallet(data_dir, bitcoin_network, pubkey);
148149
wallet.go_online(true, indexer_url).unwrap();
149-
wallet.accept_transfer(funding_txid.clone(), 0, consignment_endpoint, STATIC_BLINDING)
150+
wallet.accept_transfer(
151+
funding_txid.clone(),
152+
funding_vout,
153+
consignment_endpoint,
154+
STATIC_BLINDING,
155+
)
150156
})
151157
.await
152158
.unwrap()
@@ -333,7 +339,9 @@ where
333339
let txid = modified_tx.compute_txid();
334340
commitment_transaction.built = BuiltCommitmentTransaction { transaction: modified_tx, txid };
335341

336-
wallet.consume_fascia(fascia.clone(), RgbTxid::from_str(&txid.to_string()).unwrap()).unwrap();
342+
wallet
343+
.consume_fascia(fascia.clone(), RgbTxid::from_str(&txid.to_string()).unwrap(), None)
344+
.unwrap();
337345

338346
// save RGB transfer data to disk
339347
let rgb_amount = if counterparty {
@@ -391,7 +399,9 @@ pub(crate) fn color_htlc(
391399
};
392400
let txid = &modified_tx.compute_txid();
393401

394-
wallet.consume_fascia(fascia.clone(), RgbTxid::from_str(&txid.to_string()).unwrap()).unwrap();
402+
wallet
403+
.consume_fascia(fascia.clone(), RgbTxid::from_str(&txid.to_string()).unwrap(), None)
404+
.unwrap();
395405

396406
// save RGB transfer data to disk
397407
let transfer_info = TransferInfo { contract_id, rgb_amount: htlc_amount_rgb };
@@ -463,7 +473,9 @@ pub(crate) fn color_closing(
463473
let txid = &modified_tx.compute_txid();
464474
closing_transaction.built = modified_tx;
465475

466-
wallet.consume_fascia(fascia.clone(), RgbTxid::from_str(&txid.to_string()).unwrap()).unwrap();
476+
wallet
477+
.consume_fascia(fascia.clone(), RgbTxid::from_str(&txid.to_string()).unwrap(), None)
478+
.unwrap();
467479

468480
// save RGB transfer data to disk
469481
let transfer_info = TransferInfo { contract_id, rgb_amount: holder_vout_amount };

0 commit comments

Comments
 (0)