UNPKG

blockchain-api-client

Version:

Blockchain Api Client which maps Results of all supported Blockchain API's into a unified interface

25 lines (24 loc) 1.07 kB
import { Service } from '../../base/service'; import { Balance, Network, Transaction } from '../../base/types'; import { BitcoinProvider } from './bitcoin-factory'; export declare class BitcoinService implements Service { private factory; constructor(network: Network); /** * * @param address Address of the KeyPair of which we want to know the balance from * @param provider Which API should be called * @returns */ getBalance: (address: string, provider: BitcoinProvider) => Promise<Balance>; /** * * @param address Address of the KeyPair of which transactions should be fetched * @param query Query Parameters for 3rd Party API * TATUM: https://apidoc.tatum.io/tag/Bitcoin#operation/BtcGetTxByAddress * BLOCKCYPHER: https://www.blockcypher.com/dev/bitcoin/#address-full-endpoint * @param provider Which API should be called * @returns */ getTransactions: (address: string, query: URLSearchParams, provider: BitcoinProvider) => Promise<Transaction[]>; }