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

electrum-cash

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrum-cash - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

65

dist/index.d.ts

@@ -121,2 +121,6 @@ /// <reference types="node" />

declare type TransportScheme = 'tcp' | 'tcp_tls' | 'ws' | 'wss';
interface ConnectionOptions {
rejectUnauthorized?: boolean;
serverName?: string;
}
//# sourceMappingURL=interfaces.d.ts.map

@@ -137,2 +141,6 @@

webSocket?: WebSocket;
timers: {
retryConnection?: NodeJS.Timer;
disconnect?: NodeJS.Timer;
};
eventForwarders: {

@@ -150,11 +158,10 @@ connect: () => boolean;

* @param {string} host Fully qualified domain name or IP address of the host
* @param {number} port The host's network port to connect to
* @param {TransportScheme} scheme The transport scheme to use
* @param {number} timeout If no connection is established after `timeout` ms,
* the connection is terminated
* @param {function} callback Callback that is called on connection
* @param {number} port Network port for the host to connect to
* @param {TransportScheme} scheme Transport scheme to use
* @param {number} timeout If no connection is established after `timeout` ms, the connection is terminated
* @param {boolean} retryOnFailure If true, retry if connection fails after timeout.
*
* @throws {Error} if an incorrect transport scheme is specified
*/
connect(host: string, port: number, scheme: TransportScheme, timeout: number, callback: () => void): void;
connect(host: string, port: number, scheme: TransportScheme, timeout: number, retryOnFailure: boolean): void;
/**

@@ -178,9 +185,19 @@ * Forcibly terminate the connection.

/**
* Force a disconnection if no connection is established after `timeout` seconds.
* Force a disconnection if no connection is established after `timeout` milliseconds.
*
* @param {string} host The host of the connection that timed out
* @param {number} port The port of the connection that timed out
* @param {string} host Host of the connection that timed out
* @param {number} port Port of the connection that timed out
* @param {number} timeout Elapsed milliseconds
*/
onTimeout(host: string, port: number, timeout: number): void;
disconnectOnTimeout(host: string, port: number, timeout: number): void;
/**
* Force a reconnect after a of `timeout` milliseconds.
*
* @param {string} host Host of the connection that timed out
* @param {number} port Port of the connection that timed out
* @param {TransportScheme} scheme Transport scheme to use
* @param {number} timeout Elapsed milliseconds
*/
retryOnTimeout(host: string, port: number, scheme: TransportScheme, timeout: number): void;
private clearAllTimers;
}

@@ -249,6 +266,8 @@ //# sourceMappingURL=electrum-socket.d.ts.map

*
* @param {boolean} retryOnFailure If true, the connection will be retried until successful.
*
* @throws {Error} if the socket connection fails.
* @returns a promise resolving to true when the connection is established
*/
connect(): Promise<boolean>;
connect(retryOnFailure?: boolean): Promise<boolean>;
/**

@@ -265,3 +284,3 @@ * Restores the network connection.

*/
disconnect(force?: boolean): boolean;
disconnect(force?: boolean): Promise<boolean>;
/**

@@ -292,3 +311,3 @@ * Sends an arbitrary message to the server.

*/
onSocketError(error: Error): void;
onSocketError(error: Error | any): void;
}

@@ -336,14 +355,17 @@ //# sourceMappingURL=electrum-connection.d.ts.map

*
* @param {boolean} retryOnFailure If true, the connection will be retried until successful.
*
* @throws {Error} if the socket connection fails.
* @returns a promise resolving to true when the connection is established.
*/
connect(): Promise<boolean>;
connect(retryOnFailure?: boolean): Promise<boolean>;
/**
* Disconnects from the remote server and removes all event listeners/subscriptions and open requests.
*
* @param {boolean} force disconnect even if the connection has not been fully established yet.
* @param {boolean} force disconnect even if the connection has not been fully established yet.
* @param {boolean} retainSubscriptions retain subscription data so they will be restored on reconnection.
*
* @returns true if successfully disconnected, or false if there was no connection.
*/
disconnect(force?: boolean): boolean;
disconnect(force?: boolean, retainSubscriptions?: boolean): Promise<boolean>;
/**

@@ -513,8 +535,11 @@ * Calls a method on the remote server with the supplied parameters.

/**
* Disconnects all servers from the cluster and removes all event listeners and
* handlers from all underlying clients and connections.
* Disconnects all servers from the cluster. Removes all event listeners and
* handlers from all underlying clients and connections. This includes all
* active subscriptions, unless retainSubscriptions is set to true.
*
* @param {boolean} retainSubscriptions retain subscription data so they will be restored on reconnection.
*
* @returns a list with the disconnection result for every client
*/
shutdown(): boolean[];
shutdown(retainSubscriptions?: boolean): Promise<boolean[]>;
}

@@ -561,2 +586,2 @@ //# sourceMappingURL=electrum-cluster.d.ts.map

export { ClientConfig, ClientState, ClusterDistribution, ClusterOrder, ClusterStatus, ClusterStrategy, ConnectionStatus, DefaultParameters, ElectrumClient, ElectrumCluster, ElectrumTransport, RejectFunction, RequestResolver, RequestResponse, ResolveFunction, SubscribeCallback, SubscriptionTracker, TransportScheme, VersionNegotiated, VersionRejected, isVersionNegotiated, isVersionRejected };
export { ClientConfig, ClientState, ClusterDistribution, ClusterOrder, ClusterStatus, ClusterStrategy, ConnectionOptions, ConnectionStatus, DefaultParameters, ElectrumClient, ElectrumCluster, ElectrumTransport, RejectFunction, RequestResolver, RequestResponse, ResolveFunction, SubscribeCallback, SubscriptionTracker, TransportScheme, VersionNegotiated, VersionRejected, isVersionNegotiated, isVersionRejected };
{
"name": "electrum-cash",
"version": "2.0.2",
"version": "2.0.3",
"description": "Electrum-cash is a lightweight JavaScript library that lets you connect with one or more Electrum servers.",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

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

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

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