Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bitgo-beta/utxo-lib

Package Overview
Dependencies
Maintainers
2
Versions
1108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitgo-beta/utxo-lib - npm Package Compare versions

Comparing version 8.0.3-beta.572 to 8.0.3-beta.573

9

dist/src/bitgo/transaction.js

@@ -120,2 +120,7 @@ "use strict";

function getDefaultTransactionVersion(network) {
// Use NU6 version for testnet, activated on mainnet in block 2726400
// https://zips.z.cash/zip-0253
if (network === networks_1.networks.zcashTest) {
return ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU6;
}
switch ((0, networks_1.getMainnet)(network)) {

@@ -169,3 +174,5 @@ case networks_1.networks.bitcoincash:

ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU5,
ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU6,
ZcashTransaction_1.ZcashTransaction.VERSION5_BRANCH_NU5,
ZcashTransaction_1.ZcashTransaction.VERSION5_BRANCH_NU6,
].includes(version)) {

@@ -266,2 +273,2 @@ throw new Error(`invalid version`);

exports.createTransactionBuilderFromTransaction = createTransactionBuilderFromTransaction;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYml0Z28vdHJhbnNhY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsMENBQTREO0FBRTVELHlDQUFnRDtBQUNoRCx1REFBb0Q7QUFDcEQscUVBQWtFO0FBQ2xFLDhDQUEyQztBQUMzQyw0REFBeUQ7QUFDekQsMEVBQXVFO0FBQ3ZFLGlEQUE4QztBQUM5Qyw2RUFBMEU7QUFDMUUsK0RBQTBFO0FBQzFFLHlDQUEyRjtBQUMzRix5Q0FBa0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AgICAgdHggYXMgWmNhc2hUcmFuc2FjdGlvbjxUTnVtYmVyPixcbiAgICAgICAgdW5kZWZpbmVkLFxuICAgICAgICBwcmV2T3V0cHV0cyBhcyBUeE91dHB1dDxUTnVtYmVyPltdXG4gICAgICApO1xuICB9XG5cbiAgdGhyb3cgbmV3IEVycm9yKGBpbnZhbGlkIG5ldHdvcmtgKTtcbn1cbiJdfQ==

6

dist/src/bitgo/zcash/ZcashPsbt.js

@@ -72,3 +72,3 @@ "use strict";

toBuffer() {
if (this.tx.version === 5 || this.tx.version === ZcashTransaction_1.ZcashTransaction.VERSION5_BRANCH_NU5) {
if (this.tx.version === 5 || this.tx.version >= ZcashTransaction_1.ZcashTransaction.VERSION5_BRANCH_NU5) {
return super.toBuffer();

@@ -97,2 +97,3 @@ }

case ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU5:
case ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU6:
this.setVersion(4);

@@ -102,2 +103,3 @@ break;

case ZcashTransaction_1.ZcashTransaction.VERSION5_BRANCH_NU5:
case ZcashTransaction_1.ZcashTransaction.VERSION5_BRANCH_NU6:
this.setVersion(5);

@@ -141,2 +143,2 @@ break;

exports.ZcashPsbt = ZcashPsbt;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWmNhc2hQc2J0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2JpdGdvL3pjYXNoL1pjYXNoUHNidC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwwQ0FBaUQ7QUFDakQseURBSTRCO0FBQzVCLDhCQUEwRDtBQUMxRCxtQ0FBMEM7QUFDMUMsaURBQWlEO0FBRWpELDBDQUFzRztBQUN0RyxNQUFNLFNBQVMsR0FBRyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUM7QUFFdkMsTUFBTSx1QkFBdUIsR0FBRyxNQ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RXhwaXJ5SGVpZ2h0KGV4cGlyeUhlaWdodDogbnVtYmVyKTogdm9pZCB7XG4gICAgdHlwZWZvcmNlKHR5cGVzLlVJbnQzMiwgZXhwaXJ5SGVpZ2h0KTtcbiAgICB0aGlzLnNldFByb3BlcnR5Q2hlY2tTaWduYXR1cmVzKCdleHBpcnlIZWlnaHQnLCBleHBpcnlIZWlnaHQpO1xuICB9XG59XG4iXX0=

@@ -18,3 +18,5 @@ /// <reference types="node" />

static VERSION4_BRANCH_NU5: number;
static VERSION4_BRANCH_NU6: number;
static VERSION5_BRANCH_NU5: number;
static VERSION5_BRANCH_NU6: number;
overwintered: number;

@@ -21,0 +23,0 @@ versionGroupId: number;

@@ -9,2 +9,3 @@ "use strict";

const typeforce = require('typeforce');
const networks_1 = require("../../networks");
const UtxoTransaction_1 = require("../UtxoTransaction");

@@ -22,2 +23,3 @@ const ZcashBufferutils_1 = require("./ZcashBufferutils");

const NU5_BRANCH_ID = 0xc2d6d0b4;
const NU6_BRANCH_ID = 0xc8e71055;
class UnsupportedTransactionError extends Error {

@@ -33,4 +35,6 @@ constructor(message) {

case 450:
case 455:
return SAPLING_VERSION_GROUP_ID;
case 500:
case 550:
return ZIP225_VERSION_GROUP_ID;

@@ -42,2 +46,10 @@ }

function getDefaultConsensusBranchIdForVersion(network, version) {
// When createTransactionFromHex we don't use utxo-lib versions, instead we use the protocol transaction version of
// 4 or 5 use NU6_BRANCH_ID for all versions 4 and 5 in testnet. Remove this and use NU6 for all versions 4 and 5 in
// both mainnet and testnet once it goes live in mainnet on height 2726400
if (network === networks_1.networks.zcashTest) {
if (version === 4 || version === 5) {
return NU6_BRANCH_ID;
}
}
switch (version) {

@@ -58,2 +70,6 @@ case 1:

return NU5_BRANCH_ID;
case ZcashTransaction.VERSION4_BRANCH_NU6:
case ZcashTransaction.VERSION5_BRANCH_NU6:
// https://zips.z.cash/zip-0253
return NU6_BRANCH_ID;
}

@@ -345,3 +361,5 @@ throw new Error(`no value for version ${version}`);

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gcmV0dXJuIGJ1ZmZlci5zbGljZShpbml0aWFsT2Zmc2V0LCBidWZmZXJXcml0ZXIub2Zmc2V0KTtcbiAgICB9XG4gICAgcmV0dXJuIGJ1ZmZlcjtcbiAgfVxuXG4gIGdldEhhc2goZm9yV2l0bmVzcz86IGJvb2xlYW4pOiBCdWZmZXIge1xuICAgIGlmIChmb3JXaXRuZXNzKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYGludmFsaWQgYXJndW1lbnRgKTtcbiAgICB9XG4gICAgaWYgKHRoaXMudmVyc2lvbiA9PT0gNSkge1xuICAgICAgcmV0dXJuIGdldFR4aWREaWdlc3QodGhpcyk7XG4gICAgfVxuICAgIHJldHVybiBjcnlwdG8uaGFzaDI1Nih0aGlzLnRvQnVmZmVyKCkpO1xuICB9XG5cbiAgY2xvbmU8VE4yIGV4dGVuZHMgbnVtYmVyIHwgYmlnaW50ID0gVE51bWJlcj4oYW1vdW50VHlwZT86ICdiaWdpbnQnIHwgJ251bWJlcicpOiBaY2FzaFRyYW5zYWN0aW9uPFROMj4ge1xuICAgIHJldHVybiBuZXcgWmNhc2hUcmFuc2FjdGlvbjxUTjI+KHRoaXMubmV0d29yaywgdGhpcywgYW1vdW50VHlwZSk7XG4gIH1cbn1cbiJdfQ==

@@ -52,2 +52,3 @@ "use strict";

case ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU5:
case ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU6:
this.setVersion(4);

@@ -57,2 +58,3 @@ break;

case ZcashTransaction_1.ZcashTransaction.VERSION5_BRANCH_NU5:
case ZcashTransaction_1.ZcashTransaction.VERSION5_BRANCH_NU6:
this.setVersion(5);

@@ -107,2 +109,2 @@ break;

exports.ZcashTransactionBuilder = ZcashTransactionBuilder;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWmNhc2hUcmFuc2FjdGlvbkJ1aWxkZXIuanMiLCJzb3VyY2VSb290Ijo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vaWQge1xuICAgIHR5cGVmb3JjZSh0eXBlcy5VSW50MzIsIGV4cGlyeUhlaWdodCk7XG4gICAgdGhpcy5zZXRQcm9wZXJ0eUNoZWNrU2lnbmF0dXJlcygnZXhwaXJ5SGVpZ2h0JywgZXhwaXJ5SGVpZ2h0KTtcbiAgfVxuXG4gIGJ1aWxkKCk6IFpjYXNoVHJhbnNhY3Rpb248VE51bWJlcj4ge1xuICAgIHJldHVybiBzdXBlci5idWlsZCgpIGFzIFpjYXNoVHJhbnNhY3Rpb248VE51bWJlcj47XG4gIH1cblxuICBidWlsZEluY29tcGxldGUoKTogWmNhc2hUcmFuc2FjdGlvbjxUTnVtYmVyPiB7XG4gICAgcmV0dXJuIHN1cGVyLmJ1aWxkSW5jb21wbGV0ZSgpIGFzIFpjYXNoVHJhbnNhY3Rpb248VE51bWJlcj47XG4gIH1cblxuICBhZGRPdXRwdXQoc2NyaXB0UHViS2V5OiBzdHJpbmcgfCBCdWZmZXIsIHZhbHVlOiBUTnVtYmVyKTogbnVtYmVyIHtcbiAgICAvLyBBdHRlbXB0IHRvIGdldCBhIHNjcmlwdCBpZiBpdCdzIGEgYmFzZTU4IG9yIGJlY2gzMiBhZGRyZXNzIHN0cmluZ1xuICAgIGlmICh0eXBlb2Ygc2NyaXB0UHViS2V5ID09PSAnc3RyaW5nJykge1xuICAgICAgc2NyaXB0UHViS2V5ID0gdG9PdXRwdXRTY3JpcHQoc2NyaXB0UHViS2V5LCB0aGlzLm5ldHdvcmsgYXMgTmV0d29yayk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHN1cGVyLmFkZE91dHB1dChzY3JpcHRQdWJLZXksIHZhbHVlKTtcbiAgfVxufVxuIl19
{
"name": "@bitgo-beta/utxo-lib",
"version": "8.0.3-beta.572",
"version": "8.0.3-beta.573",
"description": "Client-side Bitcoin JavaScript library",

@@ -49,3 +49,3 @@ "main": "./dist/src/index.js",

"dependencies": {
"@bitgo-beta/blake2b": "3.0.4-beta.808",
"@bitgo-beta/blake2b": "3.0.4-beta.809",
"@brandonblack/musig": "^0.0.1-alpha.0",

@@ -88,3 +88,3 @@ "@noble/secp256k1": "1.6.3",

"license": "MIT",
"gitHead": "6307e75206b76c281e9f70e963c8d065c7198c27"
"gitHead": "2f8f5897ebcc0f17c2ef56fe7dedecd720fadd25"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc