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

@electrum-cash/network

Package Overview
Dependencies
Maintainers
0
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@electrum-cash/network - npm Package Compare versions

Comparing version

to
4.0.2-development.8063220996

68

dist/index.d.ts
import { EventEmitter } from "eventemitter3";
import { ElectrumSocket } from "@electrum-cash/sockets";
type RPCParameter = string | number | boolean | null;

@@ -39,4 +38,71 @@ interface RPCBase {

/**
* List of events emitted by the ElectrumSocket.
* @event
* @ignore
*/
export interface ElectrumSocketEvents {
/**
* Emitted when data has been received over the socket.
* @eventProperty
*/
'data': [string];
/**
* Emitted when a socket connects.
* @eventProperty
*/
'connected': [];
/**
* Emitted when a socket disconnects.
* @eventProperty
*/
'disconnected': [];
/**
* Emitted when the socket has failed in some way.
* @eventProperty
*/
'error': [Error];
}
/**
* Abstract socket used when communicating with Electrum servers.
*/
export interface ElectrumSocket extends EventEmitter<ElectrumSocketEvents>, ElectrumSocketEvents {
/**
* Utility function to provide a human accessible host identifier.
*/
get hostIdentifier(): string;
/**
* Fully qualified domain name or IP address of the host
*/
host: string;
/**
* Network port for the host to connect to, defaults to the standard TLS port
*/
port: number;
/**
* If false, uses an unencrypted connection instead of the default on TLS
*/
encrypted: boolean;
/**
* If no connection is established after `timeout` ms, the connection is terminated
*/
timeout: number;
/**
* Connects to an Electrum server using the socket.
*/
connect(): void;
/**
* Disconnects from the Electrum server from the socket.
*/
disconnect(): void;
/**
* Write data to the Electrum server on the socket.
*
* @param data - Data to be written to the socket
* @param callback - Callback function to be called when the write has completed
*/
write(data: Uint8Array | string, callback?: (err?: Error) => void): boolean;
}
/**
* @ignore
*/
export interface VersionRejected {

@@ -43,0 +109,0 @@ error: RPCError;

2

package.json
{
"name": "@electrum-cash/network",
"version": "4.0.1",
"version": "4.0.2-development.8063220996",
"description": "@electrum-cash/network is a lightweight JavaScript library that lets you connect with one or more Electrum servers.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet