UNPKG

@xchainjs/xchain-bitcoin

Version:

Custom Bitcoin client and utilities used by XChainJS clients

38 lines (37 loc) 1.19 kB
import AppBtc from '@ledgerhq/hw-app-btc'; import { FeeRate, TxHash } from '@xchainjs/xchain-client'; import { Address } from '@xchainjs/xchain-util'; import { TxParams, UTXO, UtxoClientParams, UtxoSelectionPreferences } from '@xchainjs/xchain-utxo'; import { Client } from './client'; import { AddressFormat } from './types'; /** * Custom Ledger Bitcoin client */ declare class ClientLedger extends Client { private transport; private app; constructor(params: UtxoClientParams & { transport: any; addressFormat?: AddressFormat; }); getApp(): Promise<AppBtc>; getAddress(): string; getAddressAsync(index?: number, verify?: boolean): Promise<Address>; transfer(params: TxParams & { feeRate?: FeeRate; utxoSelectionPreferences?: UtxoSelectionPreferences; }): Promise<TxHash>; transferMax(params: { recipient: Address; memo?: string; feeRate?: FeeRate; walletIndex?: number; utxoSelectionPreferences?: UtxoSelectionPreferences; selectedUtxos?: UTXO[]; }): Promise<{ hash: TxHash; maxAmount: number; fee: number; }>; } export { ClientLedger };