Comment on page
UTXO
pnpm
yarn
npm
pnpm add @swapkit/toolbox-utxo
yarn add @swapkit/toolbox-utxo
npm add @swapkit/toolbox-utxo
Next section is only for bare implementations. If you use swapkit-sdk or swapkit-core you are ready to use core methods right after wallet setup.
import {
BTCToolbox,
DOGEToolbox,
LTCToolbox,
BCHToolbox,
} from "@swapkit/toolbox-utxo";
// utxoApiKey = Blockchair Api Key https://blockchair.com/api
// rpcUrl = Custom rpc endpoint that can be provided to broadcast to and fetch data from blockchain
const dogeToolbox = DOGEToolbox(utxoApiKey, rpcUrl);
const bchToolbox = BCHToolbox(utxoApiKey, rpcUrl);
const btcToolbox = BTCToolbox(utxoApiKey, rpcUrl);
const ltcToolbox = LTCToolbox(utxoApiKey, rpcUrl);
Method | Description |
---|---|
broadcastTx | broadcast tx to blockchain |
buildTx | build and prepare tx to sign |
createKeysForPath | create KeyPair for signing and getting an address |
getAddressFromKeys | get address from KeyPair |
getBalance | get balance |
getFeeRates | get fee rates |
getFeesAndGasRates | get fees for tx and gas rates |
getFees | get fees |
getSuggestedFeeRate | get suggested fee rate |
transfer | base transfer method |
validateAddress | validate address |
Method | Description |
---|---|
buildBCHTx | Use this to build BCH specific TX |
stripPrefix | Strip bitcoincash & bchtest prefix |
Last modified 2mo ago