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
0
Versions
1101
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.573 to 8.0.3-beta.574

27

dist/src/addressFormat.js

@@ -14,2 +14,5 @@ "use strict";

exports.addressFormats = ['default', 'cashaddr'];
function isCashaddrNetwork(network) {
return (0, networks_1.isValidNetwork)(network) && [networks_1.networks.bitcoincash, networks_1.networks.ecash].includes((0, networks_1.getMainnet)(network));
}
/**

@@ -25,3 +28,3 @@ * @param format

case 'cashaddr':
return [networks_1.networks.bitcoincash, networks_1.networks.ecash].includes((0, networks_1.getMainnet)(network));
return isCashaddrNetwork(network);
}

@@ -41,9 +44,5 @@ throw new Error(`unknown address format ${format}`);

}
switch ((0, networks_1.getMainnet)(network)) {
case networks_1.networks.bitcoincash:
case networks_1.networks.ecash:
return bitgo_1.bcashAddress.fromOutputScriptWithFormat(outputScript, format, network);
default:
return (0, address_1.fromOutputScript)(outputScript, network);
}
return isCashaddrNetwork(network)
? bitgo_1.bcashAddress.fromOutputScriptWithFormat(outputScript, format, network)
: (0, address_1.fromOutputScript)(outputScript, network);
}

@@ -61,9 +60,5 @@ exports.fromOutputScriptWithFormat = fromOutputScriptWithFormat;

}
switch ((0, networks_1.getMainnet)(network)) {
case networks_1.networks.bitcoincash:
case networks_1.networks.ecash:
return bitgo_1.bcashAddress.toOutputScriptWithFormat(address, format, network);
default:
return (0, address_1.toOutputScript)(address, network);
}
return isCashaddrNetwork(network)
? bitgo_1.bcashAddress.toOutputScriptWithFormat(address, format, network)
: (0, address_1.toOutputScript)(address, network);
}

@@ -114,2 +109,2 @@ exports.toOutputScriptWithFormat = toOutputScriptWithFormat;

exports.toCanonicalFormat = toCanonicalFormat;
//# sourceMappingURL=data:application/json;base64,eyJ2Z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gKiBAcmV0dXJuIGFkZHJlc3MgaW4gY2Fub25pY2FsIGZvcm1hdFxuICovXG5leHBvcnQgZnVuY3Rpb24gdG9DYW5vbmljYWxGb3JtYXQoYWRkcmVzczogc3RyaW5nLCBuZXR3b3JrOiBOZXR3b3JrKTogc3RyaW5nIHtcbiAgcmV0dXJuIGZyb21PdXRwdXRTY3JpcHQodG9PdXRwdXRTY3JpcHRUcnlGb3JtYXRzKGFkZHJlc3MsIG5ldHdvcmspLCBuZXR3b3JrKTtcbn1cbiJdfQ==

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

case networks_1.networks.zcash:
return ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU5;
return ZcashTransaction_1.ZcashTransaction.VERSION4_BRANCH_NU6;
default:

@@ -272,2 +272,2 @@ return 1;

exports.createTransactionBuilderFromTransaction = createTransactionBuilderFromTransaction;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYml0Z28vdHJhbnNhY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsMENBQTREO0FBRTVELHlDQUFnRDtBQUNoRCx1REFBb0Q7QUFDcEQscUVBQWtFO0FBQ2xFLDhDQUEyQztBQUMzQyw0REFBeUQ7QUFDekQsMEVBQXVFO0FBQ3ZFLGlEQUE4QztBQUM5Qyw2RUFBMEU7QUFDMUUsK0RBQTBFO0FBQzFFLHlDQUEyRjtBQUMzRix5Q0FBa0Q7QUFZbEQsU0FBZ0IsMkJBQTJCLENBQ3pDLEdBQVcsRUFDWCxPQUFnQixFQUNoQixFQUFFLE9BQU8sRUFBRSxVQUFVLEtBQTZELEVBQUUsRUFDcEYsb0JBQTBDO0lBRTFDLElBQUksVUFBVSxFQUFFO1FBQ2QsSUFBSSxvQkFBb0IsSUFBSSxVQUFVLEtBQUssb0JB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W9uPFROdW1iZXI+LFxuICAgICAgICB1bmRlZmluZWQsXG4gICAgICAgIHByZXZPdXRwdXRzIGFzIFR4T3V0cHV0PFROdW1iZXI+W11cbiAgICAgICk7XG4gICAgY2FzZSBuZXR3b3Jrcy5kYXNoOlxuICAgICAgcmV0dXJuIERhc2hUcmFuc2FjdGlvbkJ1aWxkZXIuZnJvbVRyYW5zYWN0aW9uPFROdW1iZXI+KFxuICAgICAgICB0eCBhcyBEYXNoVHJhbnNhY3Rpb248VE51bWJlcj4sXG4gICAgICAgIHVuZGVmaW5lZCxcbiAgICAgICAgcHJldk91dHB1dHMgYXMgVHhPdXRwdXQ8VE51bWJlcj5bXVxuICAgICAgKTtcbiAgICBjYXNlIG5ldHdvcmtzLnpjYXNoOlxuICAgICAgcmV0dXJuIFpjYXNoVHJhbnNhY3Rpb25CdWlsZGVyLmZyb21UcmFuc2FjdGlvbjxUTnVtYmVyPihcbiAgICAgICAgdHggYXMgWmNhc2hUcmFuc2FjdGlvbjxUTnVtYmVyPixcbiAgICAgICAgdW5kZWZpbmVkLFxuICAgICAgICBwcmV2T3V0cHV0cyBhcyBUeE91dHB1dDxUTnVtYmVyPltdXG4gICAgICApO1xuICB9XG5cbiAgdGhyb3cgbmV3IEVycm9yKGBpbnZhbGlkIG5ldHdvcmtgKTtcbn1cbiJdfQ==

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

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

@@ -44,10 +43,2 @@ const ZcashBufferutils_1 = require("./ZcashBufferutils");

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) {

@@ -62,8 +53,9 @@ case 1:

return CANOPY_BRANCH_ID;
case 4:
case 5:
case ZcashTransaction.VERSION4_BRANCH_NU5:
case ZcashTransaction.VERSION5_BRANCH_NU5:
// https://zips.z.cash/zip-0252
// NU5 is deprecated on mainnet on block 2726400
return NU5_BRANCH_ID;
case 4:
case 5:
case ZcashTransaction.VERSION4_BRANCH_NU6:

@@ -362,2 +354,2 @@ case ZcashTransaction.VERSION5_BRANCH_NU6:

ZcashTransaction.VERSION5_BRANCH_NU6 = 550;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiWmNhc2hUcmFuc2FjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9iaXRnby96Y2FzaC9aY2FzaFRyYW5zYWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlEQUFvRDtBQUNwRCxpREFBaUQ7QUFDakQsK0RBQTJFO0FBRTNFLE1BQU0sT0FBTyxHQUFHLE9BQU8sQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDO0FBQzNDLE1BQU0sU0FBUyxHQUFHLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUV2Qyw2Q0FBMEM7QUFDMUMsd0RBQW1FO0FBQ25FLHlEQUEwRztBQUMxRywrQ0FBa0Y7QUFFbEYsTUFBTSxJQUFJLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQyxrRUFBa0UsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUlwRyw4RUFBOEU7QUFDOUUsTUFBTSx3QkFBd0IsR0FBRyxVQUFVLENBQUM7QUFDNUMsOEVBQThFO0FBQzlFLE1BQU0sdUJBQXVCLEdBQUcsVUFBVSxDQUFDO0FBRTNDLDRFQUE0RTtBQUM1RSxNQUFNLG9CQUFvQixHQUFHLFVBQVUsQ0FBQztBQUN4QyxNQUFNLGdCQUFnQixHQUFHLFVB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XG4gICAgfVxuICAgIHJldHVybiBidWZmZXI7XG4gIH1cblxuICBnZXRIYXNoKGZvcldpdG5lc3M/OiBib29sZWFuKTogQnVmZmVyIHtcbiAgICBpZiAoZm9yV2l0bmVzcykge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKGBpbnZhbGlkIGFyZ3VtZW50YCk7XG4gICAgfVxuICAgIGlmICh0aGlzLnZlcnNpb24gPT09IDUpIHtcbiAgICAgIHJldHVybiBnZXRUeGlkRGlnZXN0KHRoaXMpO1xuICAgIH1cbiAgICByZXR1cm4gY3J5cHRvLmhhc2gyNTYodGhpcy50b0J1ZmZlcigpKTtcbiAgfVxuXG4gIGNsb25lPFROMiBleHRlbmRzIG51bWJlciB8IGJpZ2ludCA9IFROdW1iZXI+KGFtb3VudFR5cGU/OiAnYmlnaW50JyB8ICdudW1iZXInKTogWmNhc2hUcmFuc2FjdGlvbjxUTjI+IHtcbiAgICByZXR1cm4gbmV3IFpjYXNoVHJhbnNhY3Rpb248VE4yPih0aGlzLm5ldHdvcmssIHRoaXMsIGFtb3VudFR5cGUpO1xuICB9XG59XG4iXX0=
{
"name": "@bitgo-beta/utxo-lib",
"version": "8.0.3-beta.573",
"version": "8.0.3-beta.574",
"description": "Client-side Bitcoin JavaScript library",

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

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

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

"license": "MIT",
"gitHead": "2f8f5897ebcc0f17c2ef56fe7dedecd720fadd25"
"gitHead": "68378afe9d38cb17510ac85bf4f7e736db9c1d4a"
}

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