Skip to content

Commit e7345d5

Browse files
committed
{in,out}puts => tx{In,Out}puts
1 parent 6c616bf commit e7345d5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/psbt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Psbt {
109109
set locktime(locktime) {
110110
this.setLocktime(locktime);
111111
}
112-
get inputs() {
112+
get txInputs() {
113113
return this.__CACHE.__TX.ins.map(input => ({
114114
hash: bufferutils_1.cloneBuffer(input.hash),
115115
index: input.index,
@@ -118,7 +118,7 @@ class Psbt {
118118
witness: input.witness.map(buffer => bufferutils_1.cloneBuffer(buffer)),
119119
}));
120120
}
121-
get outputs() {
121+
get txOutputs() {
122122
return this.__CACHE.__TX.outs.map(output => ({
123123
script: bufferutils_1.cloneBuffer(output.script),
124124
value: output.value,

test/psbt.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,9 @@ describe(`Psbt`, () => {
523523
});
524524

525525
assert.strictEqual(psbt.inputCount, 1);
526-
assert.strictEqual(psbt.inputs[0].sequence, 0xffffffff);
526+
assert.strictEqual(psbt.txInputs[0].sequence, 0xffffffff);
527527
psbt.setInputSequence(0, 0);
528-
assert.strictEqual(psbt.inputs[0].sequence, 0);
528+
assert.strictEqual(psbt.txInputs[0].sequence, 0);
529529
});
530530

531531
it('throws if input index is too high', () => {

ts_src/psbt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class Psbt {
145145
this.setLocktime(locktime);
146146
}
147147

148-
get inputs(): Input[] {
148+
get txInputs(): Input[] {
149149
return this.__CACHE.__TX.ins.map(input => ({
150150
hash: cloneBuffer(input.hash),
151151
index: input.index,
@@ -155,7 +155,7 @@ export class Psbt {
155155
}));
156156
}
157157

158-
get outputs(): Output[] {
158+
get txOutputs(): Output[] {
159159
return this.__CACHE.__TX.outs.map(output => ({
160160
script: cloneBuffer(output.script),
161161
value: output.value,

types/psbt.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ export declare class Psbt {
4646
readonly inputCount: number;
4747
version: number;
4848
locktime: number;
49-
readonly inputs: Input[];
50-
readonly outputs: Output[];
49+
readonly txInputs: Input[];
50+
readonly txOutputs: Output[];
5151
combine(...those: Psbt[]): this;
5252
clone(): Psbt;
5353
setMaximumFeeRate(satoshiPerByte: number): void;

0 commit comments

Comments
 (0)