Client
Extends xchain_utxo_1.Client
Custom Bitcoin client
Parameters
params
UtxoClientParams (optional, defaultexports.defaultBTCParams
)
getAssetInfo
Returns any BTC asset info
validateAddress
Validate the given address.
Parameters
address
Address
Returns boolean true
or false
compileMemo
Compile memo.
Parameters
memo
string The memo to be compiled.
Returns Buffer The compiled memo.
getFeeFromUtxos
Get the transaction fee.
Parameters
inputs
Array<UTXO> The UTXOs.feeRate
FeeRate The fee rate.data
Buffer The compiled memo (Optional). (optional, defaultnull
)
Returns number The fee amount.
buildTx
Parameters
param0
Objectparam0.amount
param0.recipient
param0.memo
param0.feeRate
param0.sender
param0.spendPendingUTXO
(optional, defaulttrue
)
Meta
- deprecated: This is deprecated.
prepareTx
Prepare transfer.
Parameters
params
TxParams&Address&FeeRate&boolean The transfer options.params.sender
params.memo
params.amount
params.recipient
params.spendPendingUTXO
(optional, defaulttrue
)params.feeRate
Returns PreparedTx The raw unsigned transaction.