Fix txOutputs
This commit is contained in:
parent
3a54c73817
commit
5e3442b74b
2 changed files with 7 additions and 7 deletions
|
@ -32,8 +32,8 @@ export interface PsbtTxInput extends TransactionInput {
|
||||||
hash: Buffer;
|
hash: Buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsbtTxOutput extends Output {
|
export interface PsbtTxOutput extends TransactionOutput {
|
||||||
address: string;
|
address: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,7 +171,7 @@ export class Psbt {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
get txOutputs(): TransactionOutput[] {
|
get txOutputs(): PsbtTxOutput[] {
|
||||||
return this.__CACHE.__TX.outs.map(output => {
|
return this.__CACHE.__TX.outs.map(output => {
|
||||||
let address;
|
let address;
|
||||||
try {
|
try {
|
||||||
|
|
8
types/psbt.d.ts
vendored
8
types/psbt.d.ts
vendored
|
@ -1,13 +1,13 @@
|
||||||
import { Psbt as PsbtBase } from 'bip174';
|
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 { Signer, SignerAsync } from './ecpair';
|
||||||
import { Network } from './networks';
|
import { Network } from './networks';
|
||||||
import { Output, Transaction } from './transaction';
|
import { Transaction } from './transaction';
|
||||||
export interface PsbtTxInput extends TransactionInput {
|
export interface PsbtTxInput extends TransactionInput {
|
||||||
hash: Buffer;
|
hash: Buffer;
|
||||||
}
|
}
|
||||||
export interface PsbtTxOutput extends Output {
|
export interface PsbtTxOutput extends TransactionOutput {
|
||||||
address: string;
|
address: string | undefined;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Psbt class can parse and generate a PSBT binary based off of the BIP174.
|
* Psbt class can parse and generate a PSBT binary based off of the BIP174.
|
||||||
|
|
Loading…
Reference in a new issue