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

cashscript

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cashscript - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

3

dist/main/interfaces.d.ts

@@ -32,2 +32,5 @@ import { Transaction } from '@bitauth/libauth';

MAINNET: "mainnet";
TESTNET3: "testnet3";
TESTNET4: "testnet4";
CHIPNET: "chipnet";
TESTNET: "testnet";

@@ -34,0 +37,0 @@ STAGING: "staging";

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

MAINNET: literal('mainnet'),
TESTNET3: literal('testnet3'),
TESTNET4: literal('testnet4'),
CHIPNET: literal('chipnet'),
TESTNET: literal('testnet'),

@@ -27,0 +30,0 @@ STAGING: literal('staging'),

8

dist/main/network/ElectrumNetworkProvider.js

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

}
else if (network === interfaces_js_1.Network.TESTNET) {
else if (network === interfaces_js_1.Network.TESTNET || network === interfaces_js_1.Network.TESTNET3) {
// Initialise a 1-of-2 Electrum Cluster with 2 hardcoded servers

@@ -47,6 +47,10 @@ this.electrum = new electrum_cash_1.ElectrumCluster('CashScript Application', '1.4.1', 1, 2, electrum_cash_1.ClusterOrder.PRIORITY);

}
else if (network === interfaces_js_1.Network.STAGING) {
else if (network === interfaces_js_1.Network.STAGING || network === interfaces_js_1.Network.TESTNET4) {
this.electrum = new electrum_cash_1.ElectrumCluster('CashScript Application', '1.4.1', 1, 1, electrum_cash_1.ClusterOrder.PRIORITY);
this.electrum.addServer('testnet4.imaginary.cash', 50004, electrum_cash_1.ElectrumTransport.WSS.Scheme, false);
}
else if (network === interfaces_js_1.Network.CHIPNET) {
this.electrum = new electrum_cash_1.ElectrumCluster('CashScript Application', '1.4.1', 1, 1, electrum_cash_1.ClusterOrder.PRIORITY);
this.electrum.addServer('chipnet.imaginary.cash/', 50004, electrum_cash_1.ElectrumTransport.WSS.Scheme, false);
}
else {

@@ -53,0 +57,0 @@ throw new Error(`Tried to instantiate an ElectrumNetworkProvider for unsupported network ${network}`);

@@ -172,4 +172,6 @@ "use strict";

case interfaces_js_1.Network.STAGING:
return 'bchtest';
case interfaces_js_1.Network.TESTNET4:
case interfaces_js_1.Network.TESTNET:
case interfaces_js_1.Network.TESTNET3:
case interfaces_js_1.Network.CHIPNET:
return 'bchtest';

@@ -176,0 +178,0 @@ case interfaces_js_1.Network.REGTEST:

@@ -32,2 +32,5 @@ import { Transaction } from '@bitauth/libauth';

MAINNET: "mainnet";
TESTNET3: "testnet3";
TESTNET4: "testnet4";
CHIPNET: "chipnet";
TESTNET: "testnet";

@@ -34,0 +37,0 @@ STAGING: "staging";

@@ -21,2 +21,5 @@ export function isSignableUtxo(utxo) {

MAINNET: literal('mainnet'),
TESTNET3: literal('testnet3'),
TESTNET4: literal('testnet4'),
CHIPNET: literal('chipnet'),
TESTNET: literal('testnet'),

@@ -23,0 +26,0 @@ STAGING: literal('staging'),

@@ -36,3 +36,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
else if (network === Network.TESTNET) {
else if (network === Network.TESTNET || network === Network.TESTNET3) {
// Initialise a 1-of-2 Electrum Cluster with 2 hardcoded servers

@@ -45,6 +45,10 @@ this.electrum = new ElectrumCluster('CashScript Application', '1.4.1', 1, 2, ClusterOrder.PRIORITY);

}
else if (network === Network.STAGING) {
else if (network === Network.STAGING || network === Network.TESTNET4) {
this.electrum = new ElectrumCluster('CashScript Application', '1.4.1', 1, 1, ClusterOrder.PRIORITY);
this.electrum.addServer('testnet4.imaginary.cash', 50004, ElectrumTransport.WSS.Scheme, false);
}
else if (network === Network.CHIPNET) {
this.electrum = new ElectrumCluster('CashScript Application', '1.4.1', 1, 1, ClusterOrder.PRIORITY);
this.electrum.addServer('chipnet.imaginary.cash/', 50004, ElectrumTransport.WSS.Scheme, false);
}
else {

@@ -51,0 +55,0 @@ throw new Error(`Tried to instantiate an ElectrumNetworkProvider for unsupported network ${network}`);

@@ -157,4 +157,6 @@ import { cashAddressToLockingBytecode, AddressType, addressContentsToLockingBytecode, lockingBytecodeToCashAddress, binToHex, createTransactionContextCommon, bigIntToBinUint64LE, generateSigningSerializationBCH, utf8ToBin, hexToBin, flattenBinArray, } from '@bitauth/libauth';

case Network.STAGING:
return 'bchtest';
case Network.TESTNET4:
case Network.TESTNET:
case Network.TESTNET3:
case Network.CHIPNET:
return 'bchtest';

@@ -161,0 +163,0 @@ case Network.REGTEST:

{
"name": "cashscript",
"version": "0.7.2",
"version": "0.7.3",
"description": "Easily write and interact with Bitcoin Cash contracts",

@@ -45,3 +45,3 @@ "keywords": [

"@bitauth/libauth": "^1.18.1",
"@cashscript/utils": "^0.7.2",
"@cashscript/utils": "^0.7.3",
"bip68": "^1.0.4",

@@ -59,4 +59,3 @@ "bitcoin-rpc-promise-retry": "^1.3.0",

"typescript": "^4.1.5"
},
"gitHead": "0ec0bd1447e2f89e396c3b7e2c027a121e11f4e1"
}
}
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