diff --git a/lib/RawTransactions.d.ts b/lib/RawTransactions.d.ts index 8ded66c2..d5470a8d 100644 --- a/lib/RawTransactions.d.ts +++ b/lib/RawTransactions.d.ts @@ -1,7 +1,21 @@ -export declare interface RawTransactions { - //constructor(restURL:string); +export interface RawTransactions { decodeRawTransaction(hex:string):Promise; decodeScript(hex: string):Promise; - getRawTransaction(txid: string, verbose?:boolean): Promise; + getRawTransaction(txids: string[]): Promise; + getRawTransaction(txids: string[], verbose:boolean): Promise; // verbose must be set to true sendRawTransaction(hex: string, allowhighfees?:boolean): Promise; +} + +export interface VerboseRawTransaction { + hex: string; + txid: string; + size: number; + version: number; + locktime: number; + vin: [{ coinbase: string; sequence: number }] + vout: [{value: number; n: number; scriptPubKey: { asm: string; hex: string; reqSigs: number; type: string; addresses: string[] }}] + blockhash: string; + confirmations: number; + time: number; + blocktime: number; } \ No newline at end of file diff --git a/typings/RawTransactions.d.ts b/typings/RawTransactions.d.ts index 8ded66c2..d5470a8d 100644 --- a/typings/RawTransactions.d.ts +++ b/typings/RawTransactions.d.ts @@ -1,7 +1,21 @@ -export declare interface RawTransactions { - //constructor(restURL:string); +export interface RawTransactions { decodeRawTransaction(hex:string):Promise; decodeScript(hex: string):Promise; - getRawTransaction(txid: string, verbose?:boolean): Promise; + getRawTransaction(txids: string[]): Promise; + getRawTransaction(txids: string[], verbose:boolean): Promise; // verbose must be set to true sendRawTransaction(hex: string, allowhighfees?:boolean): Promise; +} + +export interface VerboseRawTransaction { + hex: string; + txid: string; + size: number; + version: number; + locktime: number; + vin: [{ coinbase: string; sequence: number }] + vout: [{value: number; n: number; scriptPubKey: { asm: string; hex: string; reqSigs: number; type: string; addresses: string[] }}] + blockhash: string; + confirmations: number; + time: number; + blocktime: number; } \ No newline at end of file