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
1105
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 4.0.1-alpha.0 to 4.0.1-alpha.1

dist/src/bitgo/psbt/fromHalfSigned.d.ts

6

dist/src/addressFormat.js

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

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

@@ -42,2 +42,3 @@ throw new Error(`unknown address format ${format}`);

case networks_1.networks.bitcoincash:
case networks_1.networks.ecash:
return bitgo_1.bcashAddress.fromOutputScriptWithFormat(outputScript, format, network);

@@ -61,2 +62,3 @@ default:

case networks_1.networks.bitcoincash:
case networks_1.networks.ecash:
return bitgo_1.bcashAddress.toOutputScriptWithFormat(address, format, network);

@@ -111,2 +113,2 @@ default:

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

@@ -47,2 +47,6 @@ "use strict";

return 'bchtest';
case networks_1.networks.ecash:
return 'ecash';
case networks_1.networks.ecashTest:
return 'ecashtest';
default:

@@ -59,3 +63,3 @@ throw new Error(`unsupported prefix for ${networks_1.getNetworkName(network)}`);

function fromOutputScriptToCashAddress(outputScript, network) {
if (!networks_1.isBitcoinCash(network)) {
if (!networks_1.isBitcoinCash(network) && !networks_1.isECash(network)) {
throw new Error(`invalid network`);

@@ -81,3 +85,3 @@ }

function toOutputScriptFromCashAddress(address, network) {
if (!networks_1.isBitcoinCash(network)) {
if (!networks_1.isBitcoinCash(network) && !networks_1.isECash(network)) {
throw new Error(`invalid network`);

@@ -119,3 +123,3 @@ }

function fromOutputScriptWithFormat(outputScript, format, network) {
if (!networks_1.isBitcoinCash(network)) {
if (!networks_1.isBitcoinCash(network) && !networks_1.isECash(network)) {
throw new Error(`invalid network`);

@@ -139,3 +143,3 @@ }

function toOutputScriptWithFormat(address, format, network) {
if (!networks_1.isBitcoinCash(network)) {
if (!networks_1.isBitcoinCash(network) && !networks_1.isECash(network)) {
throw new Error(`invalid network`);

@@ -152,2 +156,2 @@ }

exports.toOutputScriptWithFormat = toOutputScriptWithFormat;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkcmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9iaXRnby9iaXRjb2luY2FzaC9hZGRyZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOzs7Ozs7Ozs7Ozs7R0FZRztBQUNILDJDQUEyQztBQUMzQywyQ0FBMkM7QUFDM0MsNkNBQWtGO0FBR2xGOzs7O0dBSUc7QUFDSCxTQUFTLHVCQUF1QixDQUFDLElBQVksRUFBRSxNQUFjO0lBRTNELE1BQU0sSUFBSSxHQUFJLFNBQVMsQ0FBQyxRQUF3QyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ3ZFLElBQUksQ0FBQyxJQUFJLEVBQUU7UUFDVCxNQUFNLElBQUksS0FBSyxDQUFDLHdCQUF3QixJQUFJLEVBQUUsQ0FBQyxDQUFDO0tBQ2pEO0lBQ0QsSUFBSTtRQUNGLE9BQU8sSUFBSSxDQUFDLEVBQUUsTUFBTSxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUM7S0FDOUI7SUFBQyxPQUFPLENBQUMsRUFBRTtRQUNWLE9BQU8sU0FBUyxDQUFDO0tBQ2xCO0FBQ0gsQ0FBQztBQUVEOzs7R0FHRztBQUNILFNBQWdCLFNBQVMsQ0FBQyxPQUFnQjtJQUN4QyxRQUFRLE9BQU8sRUFBRTtRQUNmLEtBQUssbUJBQVEsQ0FBQyxXQUFXO1lBQ3ZCLE9BQU8sY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7XG59XG4iXX0=

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

case networks_1.networks.dogecoin:
case networks_1.networks.ecash:
case networks_1.networks.litecoin:

@@ -170,2 +171,3 @@ return UtxoTransaction_1.UtxoTransaction.fromBuffer(buf, false, amountType, network);

case networks_1.networks.dogecoin:
case networks_1.networks.ecash:
case networks_1.networks.litecoin: {

@@ -196,2 +198,3 @@ txb = new UtxoTransactionBuilder_1.UtxoTransactionBuilder(network);

case networks_1.networks.dogecoin:
case networks_1.networks.ecash:
case networks_1.networks.litecoin:

@@ -207,2 +210,2 @@ return UtxoTransactionBuilder_1.UtxoTransactionBuilder.fromTransaction(tx, undefined, prevOutputs);

exports.createTransactionBuilderFromTransaction = createTransactionBuilderFromTransaction;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYml0Z28vdHJhbnNhY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsMENBQTREO0FBRTVELHlDQUFnRDtBQUNoRCx1REFBb0Q7QUFDcEQscUVBQWtFO0FBQ2xFLDhDQUEyQztBQUMzQyw0REFBeUQ7QUFDekQsMEVBQXVFO0FBQ3ZFLGlEQUE4QztBQUM5Qyw2RUFBMEU7QUFDMUUsK0RBQTBFO0FBRTFFLFNBQWdCLDJCQUEyQixDQUN6QyxHQUFXLEVBQ1gsT0FBZ0IsRUFDaEIsRUFBRSxPQUFPLEtBQTJCLEVBQUUsRUFDdEMsYUFBa0MsUUFBUTtJQUUxQyxRQUFRLHFCQUFVLENBQUMsT0FBTyxDQUFDLEVBQUU7UUFDM0IsS0FBSyxtQkFBUSxDQUFDLE9BQU8sQ0FBQztRQUN0QixLQUFLLG1CQUFRLENBQUMsV0FBVyxDQUFDO1FBQzFCLEtBQUssbUJBQVEsQ0FBQyxTQUFTLENBQUM7UUFDeE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PltdXG4gICAgICApO1xuICAgIGNhc2UgbmV0d29ya3MuemNhc2g6XG4gICAgICByZXR1cm4gWmNhc2hUcmFuc2FjdGlvbkJ1aWxkZXIuZnJvbVRyYW5zYWN0aW9uPFROdW1iZXI+KFxuICAgICAgICB0eCBhcyBaY2FzaFRyYW5zYWN0aW9uPFROdW1iZXI+LFxuICAgICAgICB1bmRlZmluZWQsXG4gICAgICAgIHByZXZPdXRwdXRzIGFzIFR4T3V0cHV0PFROdW1iZXI+W11cbiAgICAgICk7XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoYGludmFsaWQgbmV0d29ya2ApO1xufVxuIl19

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

import { UtxoTransactionBuilder } from './UtxoTransactionBuilder';
import { UtxoTransaction } from './UtxoTransaction';
/**

@@ -36,2 +37,7 @@ * Public unspent data in BitGo-specific representation.

/**
* @return Unspent from TxOutput
*/
export declare function fromOutput<TNumber extends number | bigint>(tx: UtxoTransaction<TNumber>, vout: number): Unspent<TNumber>;
export declare function fromOutputWithPrevTx<TNumber extends number | bigint>(tx: UtxoTransaction<TNumber>, vout: number): UnspentWithPrevTx<TNumber>;
/**
* @param outputId

@@ -38,0 +44,0 @@ * @return TxOutPoint

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.unspentSum = exports.addToTransactionBuilder = exports.toPrevOutput = exports.getOutputIdForInput = exports.formatOutputId = exports.parseOutputId = exports.toOutput = exports.isUnspentWithPrevTx = void 0;
exports.unspentSum = exports.addToTransactionBuilder = exports.toPrevOutput = exports.getOutputIdForInput = exports.formatOutputId = exports.parseOutputId = exports.fromOutputWithPrevTx = exports.fromOutput = exports.toOutput = exports.isUnspentWithPrevTx = void 0;
const address_1 = require("../address");

@@ -20,2 +20,24 @@ function isUnspentWithPrevTx(u) {

/**
* @return Unspent from TxOutput
*/
function fromOutput(tx, vout) {
const o = tx.outs[vout];
if (!o) {
throw new Error(`invalid vout`);
}
return {
id: formatOutputId({ txid: tx.getId(), vout }),
address: address_1.fromOutputScript(o.script, tx.network),
value: o.value,
};
}
exports.fromOutput = fromOutput;
function fromOutputWithPrevTx(tx, vout) {
return {
...fromOutput(tx, vout),
prevTx: tx.toBuffer(),
};
}
exports.fromOutputWithPrevTx = fromOutputWithPrevTx;
/**
* @param outputId

@@ -96,2 +118,2 @@ * @return TxOutPoint

exports.unspentSum = unspentSum;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVW5zcGVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9iaXRnby9VbnNwZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLHdDQUE0QztBQTJCNUMsU0FBZ0IsbUJBQW1CLENBQ2pDLENBQW1CO0lBRW5CLE9BQU8sTUFBTSxDQUFDLFFBQVEsQ0FBRSxDQUFnQyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ25FLENBQUM7QUFKRCxrREFJQztBQUVEOztHQUVHO0FBQ0gsU0FBZ0IsUUFBUSxDQUFrQyxDQUFtQixFQUFFLE9BQWdCO0lBQzdGLE9BQU87UUFDTCxNQUFNLEVBQUUsd0JBQWMsQ0FBQyxDQUFDLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQztRQUMxQyxLQUFLLEVBQUUsQ0FBQyxDQUFDLEtBQUs7S0FDZixDQUFDO0FBQ0osQ0FBQztBQUxELDRCQUtDO0FBRUQ7OztHQUdHO0FBQ0gsU0FBZ0IsYUFBYSxDQUFDLFFBQWdCO0lBQzVDLE1BQU0sS0FBSyxHQUFHLFFBQVEsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDbEMsSUFBSSxLQUFLLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtRQUN0QixNQUFNLElBQUksS0FBSyxDQUFDLDhDQUE4QyxDQUFDLENBQUM7S0FDakU7SUFDRCxNQU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leHBlY3RlZCB2YWx1ZSB0eXBlIG9mIHVuc3BlbnRzXG4gKiBAcmV0dXJuIHVuc3BlbnRTdW0gLSB0eXBlIG1hdGNoZXMgYW1vdW50VHlwZVxuICovXG5leHBvcnQgZnVuY3Rpb24gdW5zcGVudFN1bTxUTnVtYmVyIGV4dGVuZHMgbnVtYmVyIHwgYmlnaW50PihcbiAgdW5zcGVudHM6IHsgdmFsdWU6IFROdW1iZXIgfVtdLFxuICBhbW91bnRUeXBlOiAnbnVtYmVyJyB8ICdiaWdpbnQnID0gJ251bWJlcidcbik6IFROdW1iZXIge1xuICBpZiAoYW1vdW50VHlwZSA9PT0gJ2JpZ2ludCcpIHtcbiAgICByZXR1cm4gdW5zcGVudHMucmVkdWNlKChzdW0sIHUpID0+IHN1bSArICh1LnZhbHVlIGFzIGJpZ2ludCksIEJpZ0ludCgwKSkgYXMgVE51bWJlcjtcbiAgfSBlbHNlIHtcbiAgICBjb25zdCBzdW0gPSB1bnNwZW50cy5yZWR1Y2UoKHN1bSwgdSkgPT4gc3VtICsgKHUudmFsdWUgYXMgbnVtYmVyKSwgTnVtYmVyKDApKTtcbiAgICBpZiAoIU51bWJlci5pc1NhZmVJbnRlZ2VyKHN1bSkpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcigndW5zcGVudCBzdW0gaXMgbm90IGEgc2FmZSBpbnRlZ2VyIG51bWJlciwgY29uc2lkZXIgdXNpbmcgYmlnaW50Jyk7XG4gICAgfVxuICAgIHJldHVybiBzdW0gYXMgVE51bWJlcjtcbiAgfVxufVxuIl19
/// <reference types="node" />
import { Psbt as PsbtBase } from 'bip174';
import { HDSigner, Psbt, TxOutput, Network } from '..';
import { UtxoTransaction } from './UtxoTransaction';
import { HDSigner, Psbt, TxOutput } from '../';
import { Psbt as PsbtBase } from 'bip174';
import { Network } from '..';
export interface HDTaprootSigner extends HDSigner {

@@ -7,0 +6,0 @@ /**

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

case networks_1.networks.bitcoingold:
case networks_1.networks.ecash:
/*

@@ -97,2 +98,2 @@ Bitcoin Cash supports a FORKID flag. When set, we hash using hashing algorithm

UtxoTransaction.SIGHASH_BITCOINCASHBIP143 = UtxoTransaction.SIGHASH_FORKID;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXR4b1RyYW5zYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2JpdGdvL1V0eG9UcmFuc2FjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBaUM7QUFDakMsMkNBQTJDO0FBQzNDLDJDQUEyQztBQUMzQyx1Q0FBc0M7QUFFdEMsMENBQTJFO0FBRTNFLFNBQWdCLFlBQVksQ0FBQyxLQUFhO0lBQ3hDLE1BQU0sTUFBTSxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUM7SUFDNUIsT0FBTyxPQUFPLENBQUMsY0FBYyxDQUFDLE1BQU0sQ0FBQyxHQUFHLE1BQU0sQ0FBQztBQUNqRCxDQUFDO0FBSEQsb0NBR0M7QUFFRCxNQUFhLGVBQTBELFNBQVEsU0FBUyxDQUFDLFdBQW9CO0lBSzNHLFlBQ1MsT0FBZ0IsRUFDdkIsV0FBb0QsRUFDcEQsVUFBZ0M7UUFFaEMsS0FBSyxFQUFFLENBQUM7UUFKRCxZQUFPLEdBQVAsT0FBTyxDQUFTO1FBS3ZCLElBQUksV0FBVyxFQUFFO1lBQ2YsSUFBSSxDQUFDLE9BQU8sR0FBRyxXQUFXLENBQUMsT0FBTyxDQUFDO1lBQ25DLElBQUksQ0FBQyxRQUFRLEdBQUcsV0FBVyxDQUFDLFFBQVEsQ0FBQztZQUNyQyxJQUFJLENBQUMsR0FBRyxHQUFHLFdBQVcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLEVBQUU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biJdfQ==

@@ -1,2 +0,2 @@

export declare type NetworkName = 'bitcoin' | 'testnet' | 'bitcoincash' | 'bitcoincashTestnet' | 'bitcoingold' | 'bitcoingoldTestnet' | 'bitcoinsv' | 'bitcoinsvTestnet' | 'dash' | 'dashTest' | 'dogecoin' | 'dogecoinTest' | 'litecoin' | 'litecoinTest' | 'zcash' | 'zcashTest';
export declare type NetworkName = 'bitcoin' | 'testnet' | 'bitcoincash' | 'bitcoincashTestnet' | 'ecash' | 'ecashTest' | 'bitcoingold' | 'bitcoingoldTestnet' | 'bitcoinsv' | 'bitcoinsvTestnet' | 'dash' | 'dashTest' | 'dogecoin' | 'dogecoinTest' | 'litecoin' | 'litecoinTest' | 'zcash' | 'zcashTest';
export declare type Network = {

@@ -30,6 +30,6 @@ messagePrefix: string;

* @param {Network} network
* @returns {string} the name of the network. Returns undefined if network is not a value
* of `networks`
* @returns {NetworkName} the name of the network. Returns undefined if network is not a value
* of `networks`
*/
export declare function getNetworkName(network: Network): string | undefined;
export declare function getNetworkName(network: Network): NetworkName | undefined;
/**

@@ -75,2 +75,7 @@ * @param {Network} network

* @param {Network} network
* @returns {boolean} true iff network is ecash or ecashTest
*/
export declare function isECash(network: Network): boolean;
/**
* @param {Network} network
* @returns {boolean} true iff network is bitcoingold

@@ -77,0 +82,0 @@ */

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.supportsTaproot = exports.supportsSegwit = exports.isValidNetwork = exports.isZcash = exports.isLitecoin = exports.isDogecoin = exports.isDash = exports.isBitcoinSV = exports.isBitcoinGold = exports.isBitcoinCash = exports.isBitcoin = exports.getTestnet = exports.isSameCoin = exports.isTestnet = exports.isMainnet = exports.getMainnet = exports.getNetworkName = exports.getNetworkList = exports.networks = void 0;
exports.supportsTaproot = exports.supportsSegwit = exports.isValidNetwork = exports.isZcash = exports.isLitecoin = exports.isDogecoin = exports.isDash = exports.isBitcoinSV = exports.isBitcoinGold = exports.isECash = exports.isBitcoinCash = exports.isBitcoin = exports.getTestnet = exports.isSameCoin = exports.isTestnet = exports.isMainnet = exports.getMainnet = exports.getNetworkName = exports.getNetworkList = exports.networks = void 0;
/**

@@ -25,3 +25,9 @@ * @deprecated

const coins = {
/*
* The original Bitcoin Cash was renamed to bitcoin-abc, and bitcoin-cash-node forked from it.
* Later, bitcoin-abc is rebranded to ecash. Here, 'bch' corresponds to bitcoin-cash-node, and
* 'bcha' corresponds to ecash. Ref: https://github.com/bitcoin-cash-node/bitcoin-cash-node
* */
BCH: 'bch',
BCHA: 'bcha',
BSV: 'bsv',

@@ -72,4 +78,4 @@ BTC: 'btc',

},
// https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/validation.cpp
// https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/chainparams.cpp
// https://github.com/bitcoin-cash-node/bitcoin-cash-node/blob/master/src/validation.cpp
// https://github.com/bitcoin-cash-node/bitcoin-cash-node/blob/master/src/chainparams.cpp
// https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md

@@ -183,2 +189,32 @@ bitcoincash: {

},
// https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/validation.cpp
// https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/chainparams.cpp
// https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/src/util/message.cpp
ecash: {
messagePrefix: '\x16eCash Signed Message:\n',
bip32: getDefaultBip32Mainnet(),
pubKeyHash: 0x00,
scriptHash: 0x05,
wif: 0x80,
coin: coins.BCHA,
forkId: 0x00,
cashAddr: {
prefix: 'ecash',
pubKeyHash: 0x00,
scriptHash: 0x08,
},
},
ecashTest: {
messagePrefix: '\x16eCash Signed Message:\n',
bip32: getDefaultBip32Testnet(),
pubKeyHash: 0x6f,
scriptHash: 0xc4,
wif: 0xef,
coin: coins.BCHA,
cashAddr: {
prefix: 'ecashtest',
pubKeyHash: 0x00,
scriptHash: 0x08,
},
},
// https://github.com/litecoin-project/litecoin/blob/master/src/validation.cpp

@@ -232,4 +268,4 @@ // https://github.com/litecoin-project/litecoin/blob/master/src/chainparams.cpp

* @param {Network} network
* @returns {string} the name of the network. Returns undefined if network is not a value
* of `networks`
* @returns {NetworkName} the name of the network. Returns undefined if network is not a value
* of `networks`
*/

@@ -261,2 +297,5 @@ function getNetworkName(network) {

return exports.networks.dash;
case exports.networks.ecash:
case exports.networks.ecashTest:
return exports.networks.ecash;
case exports.networks.litecoin:

@@ -348,2 +387,10 @@ case exports.networks.litecoinTest:

* @param {Network} network
* @returns {boolean} true iff network is ecash or ecashTest
*/
function isECash(network) {
return getMainnet(network) === exports.networks.ecash;
}
exports.isECash = isECash;
/**
* @param {Network} network
* @returns {boolean} true iff network is bitcoingold

@@ -411,2 +458,2 @@ */

exports.supportsTaproot = supportsTaproot;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV0d29ya3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbmV0d29ya3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7Ozs7Ozs7RUFlRTs7O0FBRUY7O0dBRUc7QUFDSCxNQUFNLEtBQUssR0FBRztJQUNaLEdBQUcsRUFBRSxLQUFLO0lBQ1YsR0FBRyxFQUFFLEtBQUs7SUFDVixHQUFHLEVBQUUsS0FBSztJQUNWLEdBQUcsRUFBRSxLQUFLO0lBQ1YsR0FBRyxFQUFFLEtBQUs7SUFDVixHQUFHLEVBQUUsS0FBSztJQUNWLElBQUksRUFBRSxNQUFNO0lBQ1osSUFBSSxFQUFFLE1BQU07Q0FDSixDQUFDO0FBMENYLFNBQVMsc0JBQXNCO0lBQzdCLE9BQU87UUFDTCxnQkFBZ0I7UUFDaEIsTUFBTSxFQUFFLFVBQVU7UUFDbEIsZ0JBQWdCO1FBQ2hCLE9BQU8sRUFBRSxVQUFVO0tBQ3BCLENBQUM7QUFDSixDQUF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aW5jbHVkZXMobmV0d29yayBhcyBOZXR3b3JrKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHN1cHBvcnRzU2Vnd2l0KG5ldHdvcms6IE5ldHdvcmspOiBib29sZWFuIHtcbiAgcmV0dXJuIChbbmV0d29ya3MuYml0Y29pbiwgbmV0d29ya3MubGl0ZWNvaW4sIG5ldHdvcmtzLmJpdGNvaW5nb2xkXSBhcyBOZXR3b3JrW10pLmluY2x1ZGVzKGdldE1haW5uZXQobmV0d29yaykpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gc3VwcG9ydHNUYXByb290KG5ldHdvcms6IE5ldHdvcmspOiBib29sZWFuIHtcbiAgcmV0dXJuIGdldE1haW5uZXQobmV0d29yaykgPT09IG5ldHdvcmtzLmJpdGNvaW47XG59XG4iXX0=
{
"name": "@bitgo-beta/utxo-lib",
"version": "4.0.1-alpha.0",
"version": "4.0.1-alpha.1",
"description": "Client-side Bitcoin JavaScript library",

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

"dependencies": {
"@bitgo-beta/blake2b": "3.2.1-alpha.0",
"@bitgo-beta/blake2b": "3.2.1-alpha.1",
"@noble/secp256k1": "1.6.3",

@@ -85,3 +85,3 @@ "bip174": "npm:@bitgo/bip174@3.0.0",

"license": "MIT",
"gitHead": "a6b8d2439a0706feeea464d920e8103177883617"
"gitHead": "38de83f0769af813164e00635f5f34f66960dcb0"
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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