UNPKG

scrypt-ts

Version:

A toolset for building sCrypt smart contract applications on Bitcoin SV network written in typescript.

26 lines (25 loc) 1.04 kB
import { bsv } from "scryptlib"; import { Provider, TransactionResponse, TxHash, UtxoQueryOptions } from "../bsv/abstract-provider"; import { AddressOption, UTXO } from "../bsv/types"; /** * The WhatsonchainProvider is backed by [whatsonchain]{@link https://whatsonchain.com}, * which is the popular blockchain exxplorer for Bitcoin. */ export declare class WhatsonchainProvider extends Provider { private _network; private _isConnected; constructor(network: bsv.Networks.Network); get apiPrefix(): string; isConnected(): boolean; connect(): Promise<this>; updateNetwork(network: bsv.Networks.Network): void; getNetwork(): bsv.Networks.Network; sendRawTransaction(rawTxHex: string): Promise<TxHash>; listUnspent(address: AddressOption, options?: UtxoQueryOptions): Promise<UTXO[]>; getBalance(address: AddressOption): Promise<{ confirmed: number; unconfirmed: number; }>; getTransaction(txHash: string): Promise<TransactionResponse>; getFeePerKb(): Promise<number>; }