diff --git a/ts_src/psbt.ts b/ts_src/psbt.ts index d4d886f..c55e6bc 100644 --- a/ts_src/psbt.ts +++ b/ts_src/psbt.ts @@ -32,8 +32,8 @@ export interface PsbtTxInput extends TransactionInput { hash: Buffer; } -export interface PsbtTxOutput extends Output { - address: string; +export interface PsbtTxOutput extends TransactionOutput { + address: string | undefined; } /** @@ -171,7 +171,7 @@ export class Psbt { })); } - get txOutputs(): TransactionOutput[] { + get txOutputs(): PsbtTxOutput[] { return this.__CACHE.__TX.outs.map(output => { let address; try { diff --git a/types/psbt.d.ts b/types/psbt.d.ts index eb239dc..022a95d 100644 --- a/types/psbt.d.ts +++ b/types/psbt.d.ts @@ -1,13 +1,13 @@ import { Psbt as PsbtBase } from 'bip174'; -import { KeyValue, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate, TransactionInput } from 'bip174/src/lib/interfaces'; +import { KeyValue, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate, TransactionInput, TransactionOutput } from 'bip174/src/lib/interfaces'; import { Signer, SignerAsync } from './ecpair'; import { Network } from './networks'; -import { Output, Transaction } from './transaction'; +import { Transaction } from './transaction'; export interface PsbtTxInput extends TransactionInput { hash: Buffer; } -export interface PsbtTxOutput extends Output { - address: string; +export interface PsbtTxOutput extends TransactionOutput { + address: string | undefined; } /** * Psbt class can parse and generate a PSBT binary based off of the BIP174.