Skip to content

Commit

Permalink
refactor: rename pubkey to script
Browse files Browse the repository at this point in the history
Signed-off-by: theanmolsharma <anmolsharma0234@gmail.com>
  • Loading branch information
theanmolsharma committed Oct 7, 2023
1 parent f8508f9 commit 058f40b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type RecipientAddress = {
};

export type Output = {
pubkey: Buffer;
script: Buffer;
value: number;
};

Expand Down
2 changes: 1 addition & 1 deletion src/outputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const createOutputs = (
);

outputs.push({
pubkey: Buffer.from(publicKey),
script: Buffer.from(publicKey),
value: amount,
});
n++;
Expand Down
2 changes: 1 addition & 1 deletion test/outputs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Outputs', () => {
expect(
outputs
.map((output) => ({
pubkey: output.pubkey.toString('hex'),
pubkey: output.script.toString('hex'),
value: output.value,
}))
.sort((a, b) => a.pubkey.localeCompare(b.pubkey)),
Expand Down

0 comments on commit 058f40b

Please sign in to comment.