Skip to content

Commit 5e3442b

Browse files
committed
Fix txOutputs
1 parent 3a54c73 commit 5e3442b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ts_src/psbt.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export interface PsbtTxInput extends TransactionInput {
3232
hash: Buffer;
3333
}
3434

35-
export interface PsbtTxOutput extends Output {
36-
address: string;
35+
export interface PsbtTxOutput extends TransactionOutput {
36+
address: string | undefined;
3737
}
3838

3939
/**
@@ -171,7 +171,7 @@ export class Psbt {
171171
}));
172172
}
173173

174-
get txOutputs(): TransactionOutput[] {
174+
get txOutputs(): PsbtTxOutput[] {
175175
return this.__CACHE.__TX.outs.map(output => {
176176
let address;
177177
try {

types/psbt.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Psbt as PsbtBase } from 'bip174';
2-
import { KeyValue, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate, TransactionInput } from 'bip174/src/lib/interfaces';
2+
import { KeyValue, PsbtGlobalUpdate, PsbtInput, PsbtInputUpdate, PsbtOutput, PsbtOutputUpdate, TransactionInput, TransactionOutput } from 'bip174/src/lib/interfaces';
33
import { Signer, SignerAsync } from './ecpair';
44
import { Network } from './networks';
5-
import { Output, Transaction } from './transaction';
5+
import { Transaction } from './transaction';
66
export interface PsbtTxInput extends TransactionInput {
77
hash: Buffer;
88
}
9-
export interface PsbtTxOutput extends Output {
10-
address: string;
9+
export interface PsbtTxOutput extends TransactionOutput {
10+
address: string | undefined;
1111
}
1212
/**
1313
* Psbt class can parse and generate a PSBT binary based off of the BIP174.

0 commit comments

Comments
 (0)