Add address to output data
This commit is contained in:
parent
58cdb3a362
commit
6c616bff78
2 changed files with 3 additions and 1 deletions
|
@ -122,6 +122,7 @@ class Psbt {
|
|||
return this.__CACHE.__TX.outs.map(output => ({
|
||||
script: bufferutils_1.cloneBuffer(output.script),
|
||||
value: output.value,
|
||||
address: address_1.fromOutputScript(output.script, this.opts.network),
|
||||
}));
|
||||
}
|
||||
combine(...those) {
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
TransactionInput,
|
||||
} from 'bip174/src/lib/interfaces';
|
||||
import { checkForInput } from 'bip174/src/lib/utils';
|
||||
import { toOutputScript } from './address';
|
||||
import { fromOutputScript, toOutputScript } from './address';
|
||||
import { cloneBuffer, reverseBuffer } from './bufferutils';
|
||||
import { hash160 } from './crypto';
|
||||
import {
|
||||
|
@ -159,6 +159,7 @@ export class Psbt {
|
|||
return this.__CACHE.__TX.outs.map(output => ({
|
||||
script: cloneBuffer(output.script),
|
||||
value: output.value,
|
||||
address: fromOutputScript(output.script, this.opts.network),
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue