import { BlockBase, BlockHeaderBase, BlockTipBase } from "../base-objects/BlockBase"; import { FullBlockBase } from "../base-objects/FullBlockBase"; import { TransactionBase } from "../base-objects/TransactionBase"; import { IIGetBlockRes, IIGetTransactionRes, MccLoggingOptions, RPCInterface } from "./genericMccTypes"; export declare class UtxoMccCreate { url: string; username: string; password: string; apiTokenKey?: string; inRegTest?: boolean; loggingOptions?: MccLoggingOptions | undefined; } export interface IIUtxoVin { txid: string; vout: number; sequence?: number; } export interface IIUtxoVout { address: string; amount: number; } export interface IUtxoScriptPubKey { asm: string; hex: string; reqSigs?: number; type?: string; addresses?: string[]; address?: string; } export interface IUtxoScriptPubKeyPrevout { asm: string; hex: string; reqSigs?: number; type?: string; address: string; } export interface UtxoVout { value: number; n: number; scriptPubKey: IUtxoScriptPubKey; } export interface IUtxoScriptSig { asm: string; hex: string; } export interface IUtxoWalletRes { name: string; warning: string; } export interface getAddressByLabelResponse { address: string; purpose: string; } export interface IUtxoTransactionListRes { txid: string; vout: number; address: string; label: string; scriptPubKey: string; amount: number; confirmations: number; spendable: boolean; solvable: boolean; desc: string; safe: boolean; } /** * Block header interface */ export interface IUtxoGetBlockHeaderRes { hash: string; confirmations: number; height: number; version: number; versionHex: string; merkleroot: string; time: number; mediantime: number; nonce: number; bits: string; difficulty: number; chainwork: string; nTx: number; previousblockhash: string; nextblockhash: string; } export interface IUtxoGetBlockRes extends IUtxoGetBlockHeaderRes, IIGetBlockRes { size: number; strippedsize: number; weight: number; tx: IUtxoInBlockTransaction[]; nTx: number; } export interface IUtxoVinTransactionBasic { sequence: number; scriptSig?: IUtxoScriptSig; txinwitness?: string[]; } /** * Vin interface from transaction of type coinbase */ export interface IUtxoVinTransactionCoinbase extends IUtxoVinTransactionBasic { coinbase: string; } /** * Vin interface from transaction of type payment with prevouts */ export interface IUtxoVinTransactionPrevout extends IUtxoVinTransactionBasic { txid: string; vout: number; prevout: IPrevout; } interface IPrevout { generated?: boolean; height?: number; value: number | string; scriptPubKey: IUtxoScriptPubKeyPrevout; } export interface IUtxoVoutTransaction { value: number | string; n: number; scriptPubKey: IUtxoScriptPubKey; } export interface IUtxoInBlockTransactionGen extends IIGetTransactionRes { txid: string; hash?: string; version?: number; size?: number; vsize?: number; weight?: number; locktime?: number; vin: T[]; vout: IUtxoVoutTransaction[]; hex?: string; } export type IUtxoInBlockTransaction = IUtxoInBlockTransactionGen | IUtxoInBlockTransactionGen; export declare function isCoinbase(tx: IUtxoInBlockTransaction): tx is IUtxoInBlockTransactionGen; export declare function hasPrevouts(tx: IUtxoInBlockTransaction): tx is IUtxoInBlockTransactionGen; export interface IUtxoGetTransactionResGen extends IIGetTransactionRes { txid: string; hash: string; version: number; size: number; vsize: number; weight: number; locktime: number; vin: T[]; vout: IUtxoVoutTransaction[]; hex: string; blockhash: string; confirmations: number; time: number; mediantime: number; } export type IUtxoGetTransactionRes = IUtxoGetTransactionResGen | IUtxoGetTransactionResGen; export interface IUtxoGetAlternativeBlocksOptions { height_gte?: number; all_blocks?: boolean; } export type IUtxoGetAlternativeBlocksRes = IUtxoChainTip[]; /** * Possible values for status: * 1. "invalid" This branch contains at least one invalid block * 2. "headers-only" Not all blocks for this branch are available, but the headers are valid * 3. "valid-headers" All blocks are available for this branch, but they were never fully validated * 4. "valid-fork" This branch is not part of the active chain, but is fully validated * 5. "active" This is the tip of the active main chain, which is certainly valid */ export type IUtxoChainTipStatuses = "active" | "valid-fork" | "valid-headers" | "headers-only" | "invalid"; export interface IUtxoChainTip { height: number; hash: string; branchlen: number; status: IUtxoChainTipStatuses; all_block_hashes?: string[]; } export interface IUtxoVinVoutsMapper { index: number; vinvout: IUtxoVoutTransaction | undefined; } export interface IUtxoTransactionAdditionalData { vinouts?: (IUtxoVinVoutsMapper | undefined)[]; } interface INetworks { name: string; limited: boolean; reachable: boolean; proxy: string; proxy_randomize_credentials: boolean; } interface ILocalAddresses { address: string; port: number; score: number; } export interface IUtxoGetNetworkInfoRes { version: number; subversion: string; protocolversion: number; localservices: string; localservicesnames: string[]; localrelay: boolean; timeoffset: number; connections: number; connections_in: number; connections_out: number; networkactive: boolean; networks: INetworks[]; relayfee: number; incrementalfee: number; localaddresses: ILocalAddresses[]; warnings: string; } interface IUtxoStatisticsBip9 { period: number; threshold: number; elapsed: number; count: number; possible: boolean; } interface IUtxoBip9 { status: string; bit: number; start_time: string; timeout: string; since: number; statistics: IUtxoStatisticsBip9; } interface IUtxoSoftFork { type: string; bip9: IUtxoBip9; height: number; active: boolean; } export interface IUtxoGetBlockchainInfoRes { chain: "main" | "test" | "regtest"; blocks: number; headers: number; bestblockhash: string; difficulty: number; mediantime: number; verificationprogress: number; initialblockdownload: boolean; chainwork: string; size_on_disk: number; pruned: boolean; pruneheight: number; automatic_pruning: boolean; prune_target_size: number; softforks: IUtxoSoftFork; warnings: string; } export type IUtxoNodeStatus = IUtxoGetBlockchainInfoRes & IUtxoGetNetworkInfoRes; export interface UtxoRpcInterface, T extends TransactionBase> extends RPCInterface { getBlockHeaderBase(blockHash: string): any; } export {}; //# sourceMappingURL=utxoTypes.d.ts.map