From 390d12703eb12fc3b58a14f62a64f8582ebbeaf2 Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Fri, 6 May 2022 09:52:20 -0700 Subject: [PATCH] Change TxBuilder and BumpFeeTxBuilder build() to finish() --- CHANGELOG.md | 1 + src/bdk.udl | 4 ++-- src/lib.rs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 713c56e..c8cb22e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update BDK to version 0.18.0 - Add BumpFeeTxBuilder to bump the fee on an unconfirmed tx created by the Wallet +- Change TxBuilder.build() to TxBuilder.finish() to align with bdk function name ## [v0.5.0] diff --git a/src/bdk.udl b/src/bdk.udl index b722f09..46a1ead 100644 --- a/src/bdk.udl +++ b/src/bdk.udl @@ -155,7 +155,7 @@ interface TxBuilder { TxBuilder enable_rbf(); TxBuilder enable_rbf_with_sequence(u32 nsequence); [Throws=BdkError] - PartiallySignedBitcoinTransaction build([ByRef] Wallet wallet); + PartiallySignedBitcoinTransaction finish([ByRef] Wallet wallet); }; interface BumpFeeTxBuilder { @@ -164,7 +164,7 @@ interface BumpFeeTxBuilder { BumpFeeTxBuilder enable_rbf(); BumpFeeTxBuilder enable_rbf_with_sequence(u32 nsequence); [Throws=BdkError] - PartiallySignedBitcoinTransaction build([ByRef] Wallet wallet); + PartiallySignedBitcoinTransaction finish([ByRef] Wallet wallet); }; dictionary ExtendedKeyInfo { diff --git a/src/lib.rs b/src/lib.rs index 22d99bd..d4f5eee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -406,7 +406,7 @@ impl TxBuilder { }) } - fn build(&self, wallet: &Wallet) -> Result, Error> { + fn finish(&self, wallet: &Wallet) -> Result, Error> { let wallet = wallet.get_wallet(); let mut tx_builder = wallet.build_tx(); for (address, amount) in &self.recipients { @@ -484,7 +484,7 @@ impl BumpFeeTxBuilder { }) } - fn build(&self, wallet: &Wallet) -> Result, Error> { + fn finish(&self, wallet: &Wallet) -> Result, Error> { let wallet = wallet.get_wallet(); let txid = Txid::from_str(self.txid.as_str())?; let mut tx_builder = wallet.build_fee_bump(txid)?;