Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BtcApiClient

BTC api client that implement IsingleApiClient

Hierarchy

  • BtcApiClient

Implements

Index

Constructors

constructor

Properties

config

config: IBtcConfig

Config of btc api client

symbol

symbol: string

Methods

buildTransaction

  • buildTransaction(from: string, to: string, value: BigNumber, options: object): Promise<BtcUnsignedTx>

getBalance

  • getBalance(address: string): Promise<BigNumber>

getBlockByNumber

  • getBlockByNumber(blockNumber: string): never

getBlockNumber

  • getBlockNumber(): never

getNetwork

  • getNetwork(): string

getTransactionExplorerUrl

  • getTransactionExplorerUrl(hash: string): string

getTransactionStatus

  • getTransactionStatus(hash: string): Promise<BtcTxStatus>

getTransactionsByAddress

  • getTransactionsByAddress(address: string, page: number, size: number): Promise<Map<string, BtcTransaction>>

sameAddress

  • sameAddress(address1: string, address2: string): boolean

sendAll

  • sendAll(address: string, byte_fee: number): Promise<number>
  • try to estimate send one address all balance

    Parameters

    • address: string
    • byte_fee: number

    Returns Promise<number>

    one address all balance after minus fee

sendTransaction

updateConfiguration