Skip to content

Add TxBuilder control coin selection methods #131

@notmandatory

Description

@notmandatory

Add methods to TxBuilder to allow users to control coin selection.

Note this issue requires Wallet.list_unspent() to be implemented first to get some OutPoints for testing.

See https://docs.rs/bdk/latest/bdk/wallet/tx_builder/struct.TxBuilder.html for docs on what the functions do.


interface TxBuilder {
  ... 
  TxBuilder add_unspendable(OutPoint unspendable);
  TxBuilder add_utxo(OutPoint outpoint);
  TxBuilder add_utxos(sequence<OutPoint>);
  TxBuilder do_not_spend_change();
  TxBuilder manually_selected_only();
  TxBuilder only_spend_change();
  TxBuilder unspendable(sequence<OutPoint>);
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions