UNPKG

@btc-vision/bitcoin-rpc

Version:

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

40 lines (39 loc) 1.06 kB
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 IRawTransaction { readonly txid: string; readonly hash: string; readonly size: number; readonly vsize: number; readonly weight: number; readonly version: number; readonly locktime: number; readonly vin: VIn[]; readonly vout: VOut[]; } export interface TransactionDetail extends IRawTransaction { in_active_chain?: boolean; hex: string; blockhash?: string; confirmations?: number; blocktime?: number; time?: number; } export type RawTransaction<V extends BitcoinVerbosity> = V extends BitcoinVerbosity.RAW ? string : TransactionDetail;