issues
search
Bitshala-Incubator
/
rust-coinselect
A blockchain-agnostic coinselection library built in rust.
MIT License
9
stars
17
forks
source link
Example for BTC coin selection
#37
Open
jkciw
opened
3 months ago
jkciw
commented
3 months ago
The example aims to emulate a call from the coinswap (BTC) crate.
Created a function to create sample coins, which are of type Vec<ListUnspentResultEntry, UTXOSpendInfo>
Created a function to parse Vec<ListUnspentResultEntry, UTXOSpendInfo> into tuple of Vec
, CoinSelectOpt
Created a wrapper for SelectionOutput and SelectionError to implement Display trait
Called the select_coin() function to perform coin selection
The example aims to emulate a call from the coinswap (BTC) crate.