Skip to content

Commit

Permalink
feat(op-return): include OP_RETURN output in all redeem transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Zeiler committed Aug 3, 2022
1 parent 5658c55 commit 142eb5b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions lib/puzzle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ export class Puzzle {
{
satoshis: 0,
script: bsv.Script(new bsv.Address(receiveAddress)).toBuffer()
},
{
satoshis: 0,
script: bsv.Script.buildSafeDataOut(['boostpow', 'proof']).toBuffer()
}
]
}
Expand Down
11 changes: 6 additions & 5 deletions test/boost-pow-job.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,13 +518,14 @@ describe("boost #BoostPowJob createRedeemTransaction", () => {

let expected_tx = (
"010000000118a53177a5852a9a516c3595ac488febe18c349b44745e494510" +
"a288a545b54e0000000098483045022100aa9c8d5cd3b975e00305122b9ce5" +
"ce965565f4e36f6dce24870da45fb153636102201aa4ddcd5fa69b73ff498d" +
"309de137c5c0c82b32ddd3b864aabe96973e4afc414121020370f418d21765" +
"a288a545b54e0000000098483045022100d447110684b8fa1b9071be6efbda" +
"80f26107a7dacf4ad143963780dd952f730002202735d07575e917b13ae8b8" +
"a8527455f754db8cc42b74332429be1f1d35c100a44121020370f418d21765" +
"b33bc093db143aa1dd5cfefc97275652dc8396c2d567f93d6504e069a11c04" +
"81c06d5e08bf07000000000000040a00000a149fb8cb68b8850a13c7438e26" +
"e1d277b748be657affffffff014d200000000000001976a9140bed1b97a1ec" +
"681cf100ee8b11800a54b39b9fda88ac00000000")
"e1d277b748be657affffffff0248200000000000001976a9140bed1b97a1ec" +
"681cf100ee8b11800a54b39b9fda88ac000000000000000011006a08626f6f" +
"7374706f770570726f6f6600000000")

let sats_per_byte = .2

Expand Down
11 changes: 6 additions & 5 deletions test/create-redeem-tx.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ describe("boost Puzzle createRedeemTransaction", () => {

let expected_tx = (
"010000000118a53177a5852a9a516c3595ac488febe18c349b44745e494510" +
"a288a545b54e0000000098483045022100aa9c8d5cd3b975e00305122b9ce5" +
"ce965565f4e36f6dce24870da45fb153636102201aa4ddcd5fa69b73ff498d" +
"309de137c5c0c82b32ddd3b864aabe96973e4afc414121020370f418d21765" +
"a288a545b54e0000000098483045022100d447110684b8fa1b9071be6efbda" +
"80f26107a7dacf4ad143963780dd952f730002202735d07575e917b13ae8b8" +
"a8527455f754db8cc42b74332429be1f1d35c100a44121020370f418d21765" +
"b33bc093db143aa1dd5cfefc97275652dc8396c2d567f93d6504e069a11c04" +
"81c06d5e08bf07000000000000040a00000a149fb8cb68b8850a13c7438e26" +
"e1d277b748be657affffffff014d200000000000001976a9140bed1b97a1ec" +
"681cf100ee8b11800a54b39b9fda88ac00000000")
"e1d277b748be657affffffff0248200000000000001976a9140bed1b97a1ec" +
"681cf100ee8b11800a54b39b9fda88ac000000000000000011006a08626f6f" +
"7374706f770570726f6f6600000000")

let wif = "5d5c870220eeb18afe8a498324013955c316cbaaed2a824e5230362c36964c27"
let sats_per_byte = .2
Expand Down

0 comments on commit 142eb5b

Please sign in to comment.