UNPKG

send-crypto

Version:

A minimal JavaScript library / wallet for sending crypto assets

16 lines (15 loc) 905 B
import { UTXO } from "../../lib/utxo"; export declare enum BlockchainNetwork { Bitcoin = "btc", BitcoinCash = "bch", BitcoinTestnet = "btc-testnet", BitcoinCashTestnet = "bch-testnet" } export declare const broadcastTransaction: (network: BlockchainNetwork) => (txHex: string) => Promise<string>; export declare const Blockchain: { networks: typeof BlockchainNetwork; fetchUTXO: (network: BlockchainNetwork) => (txHash: string, vOut: number) => Promise<UTXO>; fetchUTXOs: (network: BlockchainNetwork) => (address: string, confirmations: number, limit?: number, offset?: number) => Promise<readonly UTXO[]>; broadcastTransaction: (network: BlockchainNetwork) => (txHex: string) => Promise<string>; fetchTXs: (network: BlockchainNetwork) => (address: string, confirmations?: number, limit?: number, offset?: number, onlyUnspent?: boolean) => Promise<readonly UTXO[]>; };