UNPKG

esplora-client

Version:

Tiny client library for Esplora-based Bitcoin APIs

49 lines 1.37 kB
type Hostname = string; type Hostnames = Hostname[]; type Options = { hostnames?: Hostnames; network?: string; }; /** * Creates a new Esplora API client. * * @param options Client options. * @param options.hostnames List of API hostnames. * @param options.network Network name. */ export declare const esploraClient: (options?: Options) => { bitcoin: { addresses: { getAddress: ({ address }: { address: string; }) => Promise<any>; getAddressTxs: ({ address, after_txid, }: { address: string; after_txid?: string; }) => Promise<any>; getAddressTxsUtxo: ({ address }: { address: string; }) => Promise<any>; }; blocks: { getBlocksTipHeight: () => Promise<any>; }; fees: { getFeeEstimates: () => Promise<any>; getFeesRecommended: () => Promise<any>; }; transactions: { getTx: ({ txid }: { txid: string; }) => Promise<any>; getTxHex: ({ txid }: { txid: string; }) => Promise<any>; postTx: ({ txhex }: { txhex: string; }) => Promise<any>; }; }; }; export {}; //# sourceMappingURL=index.d.ts.map