Change TxBuilder and BumpFeeTxBuilder build() to finish()

This commit is contained in:
Steve Myers 2022-05-06 09:52:20 -07:00
parent 9f903932dc
commit 390d12703e
No known key found for this signature in database
GPG Key ID: 8105A46B22C2D051
3 changed files with 5 additions and 4 deletions

View File

@ -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]

View File

@ -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 {

View File

@ -406,7 +406,7 @@ impl TxBuilder {
})
}
fn build(&self, wallet: &Wallet) -> Result<Arc<PartiallySignedBitcoinTransaction>, Error> {
fn finish(&self, wallet: &Wallet) -> Result<Arc<PartiallySignedBitcoinTransaction>, 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<Arc<PartiallySignedBitcoinTransaction>, Error> {
fn finish(&self, wallet: &Wallet) -> Result<Arc<PartiallySignedBitcoinTransaction>, Error> {
let wallet = wallet.get_wallet();
let txid = Txid::from_str(self.txid.as_str())?;
let mut tx_builder = wallet.build_fee_bump(txid)?;