Skip to content
SwapKit is a powerful suite of tools for building blockchain applications.

createBCHToolbox

createBCHToolbox<T>(toolboxParams): Promise<{ accumulative: (__namedParameters) => { fee: number; inputs: (UTXOType | UTXOInputWithScriptType)[]; outputs: TargetOutput[]; } | { fee: number; inputs?: undefined; outputs?: undefined; }; broadcastTx: (txHash) => Promise<string>; buildTx: (__namedParameters) => Promise<{ inputs: UTXOType[]; psbt: Psbt; utxos: object[]; }>; calculateTxSize: (__namedParameters) => number; createKeysForPath: (params) => BchECPair; createTransaction: (__namedParameters) => Promise<{ builder: TransactionBuilderType; utxos: (UTXOType | UTXOInputWithScriptType)[]; }>; estimateMaxSendableAmount: (__namedParameters) => Promise<AssetValue>; estimateTransactionFee: (params) => Promise<AssetValue>; getAddress: () => Promise<undefined | string>; getAddressFromKeys: (keys) => string; getBalance: (address, _scamFilter) => Promise<AssetValue[]>; getFeeRates: () => Promise<{ average: number; fast: number; fastest: number; }>; getInputsOutputsFee: (__namedParameters) => Promise<{ fee: number; inputs: (UTXOType | UTXOInputWithScriptType)[]; outputs: TargetOutput[]; } | { fee: number; inputs?: undefined; outputs?: undefined; }>; getPrivateKeyFromMnemonic: (params) => string; stripPrefix: (address) => string; stripToCashAddress: (address) => string; transfer: (__namedParameters) => Promise<string>; validateAddress: (address) => boolean; }>

Defined in: toolboxes/src/utxo/toolbox/bitcoinCash.ts:73

T extends BitcoinCash

UtxoToolboxParams[T] | { derivationPath?: DerivationPathArray; index?: number; phrase?: string; }

Promise<{ accumulative: (__namedParameters) => { fee: number; inputs: (UTXOType | UTXOInputWithScriptType)[]; outputs: TargetOutput[]; } | { fee: number; inputs?: undefined; outputs?: undefined; }; broadcastTx: (txHash) => Promise<string>; buildTx: (__namedParameters) => Promise<{ inputs: UTXOType[]; psbt: Psbt; utxos: object[]; }>; calculateTxSize: (__namedParameters) => number; createKeysForPath: (params) => BchECPair; createTransaction: (__namedParameters) => Promise<{ builder: TransactionBuilderType; utxos: (UTXOType | UTXOInputWithScriptType)[]; }>; estimateMaxSendableAmount: (__namedParameters) => Promise<AssetValue>; estimateTransactionFee: (params) => Promise<AssetValue>; getAddress: () => Promise<undefined | string>; getAddressFromKeys: (keys) => string; getBalance: (address, _scamFilter) => Promise<AssetValue[]>; getFeeRates: () => Promise<{ average: number; fast: number; fastest: number; }>; getInputsOutputsFee: (__namedParameters) => Promise<{ fee: number; inputs: (UTXOType | UTXOInputWithScriptType)[]; outputs: TargetOutput[]; } | { fee: number; inputs?: undefined; outputs?: undefined; }>; getPrivateKeyFromMnemonic: (params) => string; stripPrefix: (address) => string; stripToCashAddress: (address) => string; transfer: (__namedParameters) => Promise<string>; validateAddress: (address) => boolean; }>