New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

rn-electrum-client

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-electrum-client - npm Package Compare versions

Comparing version

to
0.0.19

@@ -113,3 +113,3 @@ const ElectrumClient = require("../lib/electrum_client");

} else {
//Attempt to connect to random peer if none specified
// Attempt to connect to random peer if none specified
connectionResponse = await connectToRandomPeer(network, peers, 'ssl', net, tls);

@@ -333,3 +333,3 @@ }

const subscribeHeader = async ({ id = "subscribeHeader", network = "", onReceive = () => null } = {}) => {
const subscribeHeader = async ({ id = "subscribeHeader", network = "", onReceive = () => {} } = {}) => {
const method = "subscribeHeader";

@@ -336,0 +336,0 @@ try {

{
"bitcoin": [
{"host": "35.187.18.233", "ssl": 8900, "tcp": 8911},
{"host": "electrum.aantonop.com", "ssl": 50002, "tcp": 50001},
{"host": "bitcoin.lu.ke", "ssl": 50002, "tcp": 50001},
{"host": "electrum.hodlister.co", "ssl": 50002, "tcp": 50001},
{"host": "electrum3.hodlister.co", "ssl": 50002, "tcp": 50001},
{"host": "ecdsa.net", "ssl": 110, "tcp": 50001},
{"host": "kirsche.emzy.de", "ssl": 50002, "tcp": 50001}
{ "host": "35.187.18.233", "ssl": 8900, "tcp": 8911 },
{ "host": "electrum.aantonop.com", "ssl": 50002, "tcp": 50001 },
{ "host": "bitcoin.lu.ke", "ssl": 50002, "tcp": 50001 },
{ "host": "electrum.hodlister.co", "ssl": 50002, "tcp": 50001 },
{ "host": "electrum3.hodlister.co", "ssl": 50002, "tcp": 50001 },
{ "host": "ecdsa.net", "ssl": 110, "tcp": 50001 },
{ "host": "kirsche.emzy.de", "ssl": 50002, "tcp": 50001 }
],
"bitcoinTestnet": [
{"host": "testnet.aranguren.org", "ssl": 51002, "tcp": 51001}
{ "host": "testnet.aranguren.org", "ssl": 51002, "tcp": 51001 }
],
"bitcoinRegtest": [
{"host": "35.233.47.252", "ssl": 18484, "tcp": 18483}
]
"bitcoinRegtest": [{ "host": "35.233.47.252", "ssl": 18484, "tcp": 18483 }]
}
'use strict'
const TlsSocketWrapper = require('./TlsSocketWrapper.js');
const TIMEOUT = 5000
const isNode = process?.release.name === 'node'

@@ -11,4 +15,12 @@ const getSocket = (self, protocol, options) => {

if (!self.tls) throw new Error('TLS package could not be loaded');
const socket = new self.net.Socket();
return new self.tls.TLSSocket(socket, { rejectUnauthorized: false });
let tlsSocket;
if (isNode) {
tlsSocket = new TlsSocketWrapper({ tls: self.tls, verbose: false });
} else {
const socket = new self.net.Socket();
tlsSocket = new self.tls.TLSSocket(socket, { rejectUnauthorized: false });
}
return tlsSocket;
}

@@ -15,0 +27,0 @@ throw new Error('unknown protocol')

{
"name": "rn-electrum-client",
"version": "0.0.18",
"version": "0.0.19",
"description": "Electrum protocol client for React Native & Node.js",
"main": "index.js",
"scripts": {
"example": "node example/index.js"
"example": "node example/index.js",
"test": "jest"
},
"dependencies": {},
"devDependencies": {},
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@jest/globals": "^29.7.0",
"babel-jest": "^29.7.0",
"jest": "^29.7.0",
"ts-jest": "^29.1.5"
},
"repository": {
"type": "git",
"url": "git://github.com/synonymdev/rn-electrum-client.git"
"url": "git://github.com/synonymdev/react-native-electrum-client.git"
},

@@ -27,5 +35,5 @@ "author": "synonymdev",

"bugs": {
"url": "https://github.com/synonymdev/rn-electrum-client/issues"
"url": "https://github.com/synonymdev/react-native-electrum-client/issues"
},
"homepage": "https://github.com/synonymdev/rn-electrum-client#readme"
"homepage": "https://github.com/synonymdev/react-native-electrum-client#readme"
}