UNPKG

@btc-vision/bitcoin-rpc

Version:

The one and only fully typed Bitcoin RPC client for Node.js

38 lines (37 loc) 918 B
import { BitcoinVerbosity } from './BitcoinVerbosity.js'; import { VIn, VOut } from './BlockData.js'; export interface BitcoinRawTransactionParams { txId: string; blockHash?: string; verbose?: BitcoinVerbosity; } export interface ScriptSig { asm: string; hex: string; } export interface ScriptPubKey { asm?: string; hex: string; reqSigs?: number; type?: string; addresses?: string[]; address?: string; } export interface TransactionDetail { in_active_chain?: boolean; hex: string; txid: string; hash: string; size: number; vsize: number; weight: number; version: number; locktime: number; vin: VIn[]; vout: VOut[]; blockhash?: string; confirmations?: number; blocktime?: number; time?: number; } export type RawTransaction<V extends BitcoinVerbosity> = V extends BitcoinVerbosity.RAW ? string : TransactionDetail;