import { INetworkInfo } from "./Network"; export declare class Insight { private baseURL; static forNetwork(network: INetworkInfo): Insight; private axios; constructor(baseURL: string); listUTXOs(address: string): Promise; getInfo(address: string): Promise; sendRawTx(rawtx: string): Promise; contractCall(address: string, encodedData: string): Promise; /** * Estimate the fee per KB of txdata, in satoshi. Returns -1 if no estimate is * available. It always return -1 for testnet. * * @param nblocks */ estimateFee(nblocks?: number): Promise; /** * Estimate the fee per byte of txdata, in satoshi. Returns -1 if no estimate is * available. It always return -1 for testnet. * * @param nblocks */ estimateFeePerByte(nblocks?: number): Promise; /** * Get single transaction's info * @param id */ getTransactionInfo(id: string): Promise; /** * Get multiple Transaction info (paginated) * @param address * @param pageNum */ getTransactions(address: string, pageNum?: number): Promise; } export declare namespace Insight { type Foo = string; interface ISendRawTxResult { txid: string; } interface IUTXO { address: string; txid: string; vout: number; /** * Public key that controls this UXTO, as hex string. */ scriptPubKey: string; amount: number; satoshis: number; isStake: boolean; height: number; confirmations: number; } interface IExecutionResult { gasUsed: number; excepted: string; newAddress: string; output: string; codeDeposit: number; gasRefunded: number; depositSize: number; gasForDeposit: number; } interface ITransactionReceipt { blockHash: string; blockNumber: number; transactionHash: string; transactionIndex: number; from: string; to: string; cumulativeGasUsed: string; gasUsed: number; contractAddress: string; excepted: string; log: any[]; } interface IContractCall { address: string; executionResult: any; } interface IGetInfo { addrStr: string; /** * balance of address in qtum */ balance: number; /** * Balance of address in satoshi */ balanceSat: number; totalReceived: number; totalReceivedSat: number; totalSet: number; totalSentSat: number; unconfirmedBalance: number; unconfirmedBalanceSat: number; unconfirmedTxApperances: number; txApperances: number; /** * List of transaction IDs */ transactions: string[]; } interface IVin { txid: string; addr: string; } interface IVout { value: string; scriptPubKey: IScriptPubKey; } interface IScriptPubKey { addresses: string[]; } interface IRawTransactionInfo { txid: string; version: number; locktime: number; receipt: ITransactionReceipt[]; vin: IVin[]; vout: IVout[]; confirmations: number; time: number; valueOut: number; valueIn: number; fees: number; blockhash: string; blockheight: number; isqrc20Transfer: boolean; } interface IRawTransactions { pagesTotal: number; txs: IRawTransactionInfo[]; } }