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

@samouraiwallet/electrum-client

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@samouraiwallet/electrum-client - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

5

CHANGELOG.md
# Changelog
## 1.4.0 (2023-05-24)
- Updated keepAlive to use interval instead of timeout
- Fixed setTimeout on TlsSocketWrapper
- Updated dependencies
## 1.3.0 (2022-12-08)

@@ -4,0 +9,0 @@ - Updated TLS wrapper

2

dist/index.d.ts

@@ -10,3 +10,3 @@ import { Client } from './lib/client.js';

private electrumConfig;
private timeout;
private pingInterval;
versionInfo: [string, string];

@@ -13,0 +13,0 @@ constructor(port: number, host: string, protocol: Protocol, callbacks?: Callbacks);

@@ -18,3 +18,3 @@ import { Client } from './lib/client.js';

this.electrumConfig = null;
this.timeout = null;
this.pingInterval = null;
this.versionInfo = ['', ''];

@@ -78,4 +78,4 @@ }

keepAlive() {
if (this.timeout != null) {
clearTimeout(this.timeout);
if (this.pingInterval != null) {
clearInterval(this.pingInterval);
}

@@ -86,3 +86,3 @@ let pingPeriod = 120000;

}
this.timeout = setTimeout(() => {
this.pingInterval = setInterval(() => {
if (this.timeLastCall !== 0 && Date.now() > this.timeLastCall + pingPeriod) {

@@ -97,4 +97,4 @@ this.server_ping().catch((error) => {

super.close();
if (this.timeout != null) {
clearTimeout(this.timeout);
if (this.pingInterval != null) {
clearInterval(this.pingInterval);
}

@@ -101,0 +101,0 @@ this.reconnect = this.reconnect = this.onClose = this.keepAlive = () => Promise.resolve(this);

@@ -16,6 +16,4 @@ import tls from 'node:tls';

if (this._socket)
this._socket.setTimeout(timeout);
this._socket.setTimeout(timeout, callback);
this._timeout = timeout;
if (callback)
callback();
return this;

@@ -22,0 +20,0 @@ }

{
"name": "@samouraiwallet/electrum-client",
"version": "1.3.0",
"version": "1.4.0",
"engines": {

@@ -38,12 +38,12 @@ "node": ">=14.0.0"

"devDependencies": {
"@types/node": "^16.18.6",
"@typescript-eslint/eslint-plugin": "^5.46.0",
"@typescript-eslint/parser": "^5.46.0",
"@vitest/coverage-c8": "^0.25.6",
"eslint": "^8.29.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-unicorn": "^45.0.1",
"typescript": "^4.9.4",
"vitest": "^0.25.6"
"@types/node": "^16.18.32",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"@vitest/coverage-c8": "^0.31.1",
"eslint": "^8.41.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-unicorn": "^47.0.0",
"typescript": "^5.0.4",
"vitest": "^0.31.1"
}
}
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