{"repo":"bitcoinjs/coinselect","free":true,"listed":false,"github":"https://github.com/bitcoinjs/coinselect","clone":"git clone https://github.com/bitcoinjs/coinselect.git","description":"An unspent transaction output (UTXO) selection module for bitcoin.","language":"JavaScript","stars":207,"topics":["bitcoin","utxos","change","coin","selection","unspents","wallet"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"coinselect An unspent transaction output (UTXO) selection module for bitcoin. WARNING: Value units are in satoshi s, not Bitcoin. Algorithms Module Algorithm Re-orders UTXOs? - - - require('coinselect') Blackjack, with Accumulative fallback By Descending Value require('coinselect/accumulative') Accumulative - accumulates inputs until the target value (+fees) is reached, skipping detrimental inputs - require('coinselect/blackjack') Blackjack - accumulates inputs until the target value (+fees) is matched, does not accumulate inputs that go over the target value (within a threshold) - require('coinselect/break') Break - breaks the input values into equal denominations of output (as provided) - require('coinselect/split') Split - splits the input values evenly between all outputs , any provided output with .value remains unchanged - Note: Each algorithm will add a change output if the input - output - fee value difference is over a dust threshold. This is calculated independently by utils.finalize , irrespective of the algorithm chosen, for the purposes of safety. Pro-tip: if you want to send-all inputs to an output address, coinselect/split with a partial output ( .address defined, no .value ) can be used to send-all, while leaving an appropriate amount for the fee . Example License MIT","default_branch":null,"files":null,"tree":[],"storefront":"/r/bitcoinjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bitcoinjs/coinselect/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}