Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitgo-utxo-lib",
"version": "1.5.0",
"version": "1.6.0",
"description": "Client-side Bitcoin JavaScript library",
"main": "./src/index.js",
"engines": {
Expand Down
3 changes: 2 additions & 1 deletion src/networks.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ module.exports = {
1: 0x00,
2: 0x00,
3: 0x5ba81b19,
4: 0x76b809bb
// 4: 0x76b809bb (old Sapling branch id)
4: 0x2bb40e60
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the old sapling branch id get commented out in favor of blossom? Why doesn't sapling stay as branch id 4 and blossom become branch id 5?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enum id (4) is actually the transaction id. This one is changed every time the transaction struct changes. Last time it happened was when Sapling was introduced. For Blossom, the struct is the same, but the branch id was updated to 0x2bb40e60 https://github.com/zcash/zips/blob/master/zip-0205.rst#specification

},
coin: coins.ZEC
},
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/transaction_builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -1590,13 +1590,13 @@
"pubKeyIndex": 0,
"keyPair": "cVmRcxsNdhiCigzrBfpv51JtExBPehtMNzUs9CBvymu1B3ch7LLa",
"value": 200000000,
"scriptSig": "OP_0 3045022100d95c63feac1c62bfc558d9ada74319b7b71380085ce23bb63419619b1de7392e0220398c8f9dbc13e73520c008fe6a9e473c8baf8849764733f4ffa61efe6f86a0bc01 OP_0 OP_0 5221021dbb31392fa4857601d5ce2225429923688fede8c2d69e547542cbd88240903a2103c8249e0c474d95e09bb04254d342ef1177f8ca92d2a57356a16df25a4635a5382102fae89068c5c63426f83f0bd5492c4fd757e1f4b575b5d6d05592e8ba519bfd6e53ae"
"scriptSig": "OP_0 3045022100bf54319205fe0e4bf96458b51bd59e20bcb391049339c1c1085d383ca6e4e38702202a98c2c79f5887e11b792415ad9747a4dadd5ac7c2b32d4c5c75377e07e3279501 OP_0 OP_0 5221021dbb31392fa4857601d5ce2225429923688fede8c2d69e547542cbd88240903a2103c8249e0c474d95e09bb04254d342ef1177f8ca92d2a57356a16df25a4635a5382102fae89068c5c63426f83f0bd5492c4fd757e1f4b575b5d6d05592e8ba519bfd6e53ae"
},
{
"pubKeyIndex": 1,
"keyPair": "cV2mApzXqoGcGzyoDy5aaiZqQtV5G1HeEuoM1cgpEoiGAeagPeV2",
"value": 200000000,
"scriptSig": "OP_0 3045022100d95c63feac1c62bfc558d9ada74319b7b71380085ce23bb63419619b1de7392e0220398c8f9dbc13e73520c008fe6a9e473c8baf8849764733f4ffa61efe6f86a0bc01 3045022100c77d6c1249a824fc661e0940006c74c2e8f531af64fe9ba06e460d0427a6f1ea0220614fa19bc026a4e0ed71d88df30ebd246cc9ef3d9de8f1bf975a2dc0e9994c4801 OP_0 5221021dbb31392fa4857601d5ce2225429923688fede8c2d69e547542cbd88240903a2103c8249e0c474d95e09bb04254d342ef1177f8ca92d2a57356a16df25a4635a5382102fae89068c5c63426f83f0bd5492c4fd757e1f4b575b5d6d05592e8ba519bfd6e53ae"
"scriptSig": "OP_0 3045022100bf54319205fe0e4bf96458b51bd59e20bcb391049339c1c1085d383ca6e4e38702202a98c2c79f5887e11b792415ad9747a4dadd5ac7c2b32d4c5c75377e07e3279501 304402204f1c773728af94371e3aa2cd5b0d66d717801b21e867fb70678a19d91079aeb502204c77183f51b370ad212471d28696054f1bf93503df16cd4fe8409e41c6f46c6801 OP_0 5221021dbb31392fa4857601d5ce2225429923688fede8c2d69e547542cbd88240903a2103c8249e0c474d95e09bb04254d342ef1177f8ca92d2a57356a16df25a4635a5382102fae89068c5c63426f83f0bd5492c4fd757e1f4b575b5d6d05592e8ba519bfd6e53ae"
}
]
}
Expand All @@ -1607,7 +1607,7 @@
"value": 199999000
}
],
"txHex": "0400008085202f8901869b6639512245299696c97bcb579016eaeed39f65fec25471eb5eed86967d1d01000000fdfe0000483045022100d95c63feac1c62bfc558d9ada74319b7b71380085ce23bb63419619b1de7392e0220398c8f9dbc13e73520c008fe6a9e473c8baf8849764733f4ffa61efe6f86a0bc01483045022100c77d6c1249a824fc661e0940006c74c2e8f531af64fe9ba06e460d0427a6f1ea0220614fa19bc026a4e0ed71d88df30ebd246cc9ef3d9de8f1bf975a2dc0e9994c48014c695221021dbb31392fa4857601d5ce2225429923688fede8c2d69e547542cbd88240903a2103c8249e0c474d95e09bb04254d342ef1177f8ca92d2a57356a16df25a4635a5382102fae89068c5c63426f83f0bd5492c4fd757e1f4b575b5d6d05592e8ba519bfd6e53aeffffffff0118beeb0b000000001976a91467d674a78a010c82c168718ba42a6bbb1e124af088ac00000000e36a04000000000000000000000000"
"txHex": "0400008085202f8901869b6639512245299696c97bcb579016eaeed39f65fec25471eb5eed86967d1d01000000fdfd0000483045022100bf54319205fe0e4bf96458b51bd59e20bcb391049339c1c1085d383ca6e4e38702202a98c2c79f5887e11b792415ad9747a4dadd5ac7c2b32d4c5c75377e07e327950147304402204f1c773728af94371e3aa2cd5b0d66d717801b21e867fb70678a19d91079aeb502204c77183f51b370ad212471d28696054f1bf93503df16cd4fe8409e41c6f46c68014c695221021dbb31392fa4857601d5ce2225429923688fede8c2d69e547542cbd88240903a2103c8249e0c474d95e09bb04254d342ef1177f8ca92d2a57356a16df25a4635a5382102fae89068c5c63426f83f0bd5492c4fd757e1f4b575b5d6d05592e8ba519bfd6e53aeffffffff0118beeb0b000000001976a91467d674a78a010c82c168718ba42a6bbb1e124af088ac00000000e36a04000000000000000000000000"
},{
"description": "Zcash P2SH 2-of-3 multisig, signed by key 3 and 1",
"network": "zcashTest",
Expand Down