@electrum-cash/network 4.0.0-development.6392223875 → 4.0.0-development.6401415161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
- # electrum-cash
1
+ # Introduction
2
+
3
+ @electrum-cash/network is a lightweight `JavaScript` library that lets you connect `Electrum` servers.
2
4
 
3
- Electrum-cash is a lightweight `JavaScript` library that lets you connect with one or more `Electrum` servers.
4
5
  It offers encrypted connections by default,
5
6
  performs the expected protocol version negotiation and
6
7
  automatically keeps your connection alive until your close it.
@@ -10,7 +11,7 @@ automatically keeps your connection alive until your close it.
10
11
  Install the library with NPM:
11
12
 
12
13
  ```bash
13
- # npm install electrum-cash
14
+ # npm install @electrum-cash/network
14
15
  ```
15
16
 
16
17
  ## Usage
@@ -21,7 +22,7 @@ Before you can use the library you need to include it in your project.
21
22
 
22
23
  ```js
23
24
  // Load the electrum library.
24
- const { ElectrumClient } = require('electrum-cash');
25
+ const { ElectrumClient } = require('@electrum-cash/network');
25
26
  ```
26
27
 
27
28
  ### Usage on Web
@@ -30,26 +31,25 @@ To use the library on the web, use the ESM import syntax and include the `Electr
30
31
 
31
32
  ```js
32
33
  // Load the electrum library.
33
- import { ElectrumClient, ElectrumTransport } from 'electrum-cash';
34
+ import { ElectrumClient, ElectrumTransport } from '@electrum-cash/network';
34
35
  ```
35
36
 
36
- ### Connect to servers
37
+ ### Connecting to a server
37
38
 
38
- After you have loaded the appropriate module you need to initialize the module by configuring your **application identifier** and **protocol version**.
39
+ After you have imported the library you need to initialize and connect the client by configuring your **application identifier** and **protocol version**.
39
40
 
40
- If you only want to use a single server, initialize an `ElectrumClient` and connect to the server:
41
41
  ```js
42
42
  // Initialize an electrum client.
43
- const electrum = new ElectrumClient('Electrum client example', '1.4.1', 'bch.imaginary.cash');
43
+ const electrumClient = new ElectrumClient('Electrum client example', '1.4.1', 'bch.imaginary.cash');
44
44
 
45
45
  // Wait for the client to connect
46
- await electrum.connect();
46
+ await electrumClient.connect();
47
47
  ```
48
48
 
49
49
  To connect to an electrum server from a web browser, use the `ElectrumTransport` import to use the WSS `port` and `scheme`:
50
50
 
51
51
  ```js
52
- const electrum = new ElectrumClient(
52
+ const electrumClient = new ElectrumClient(
53
53
  'Electrum client example', '1.4.1', 'bch.imaginary.cash',
54
54
  ElectrumTransport.WSS.Port, ElectrumTransport.WSS.Scheme
55
55
  );
@@ -66,7 +66,7 @@ Once your `ElectrumClient` is connected and ready, you can call methods:
66
66
  const transactionID = '4db095f34d632a4daf942142c291f1f2abb5ba2e1ccac919d85bdc2f671fb251';
67
67
 
68
68
  // Request the full transaction hex for the transaction ID.
69
- const transactionHex = await electrum.request('blockchain.transaction.get', transactionID);
69
+ const transactionHex = await electrumClient.request('blockchain.transaction.get', transactionID);
70
70
 
71
71
  // Print out the transaction hex.
72
72
  console.log(transactionHex);
@@ -101,33 +101,29 @@ const handleNotifications = function(data)
101
101
  }
102
102
 
103
103
  // Listen for notifications.
104
- electrum.on('notification', handleNotifications);
104
+ electrumClient.on('notification', handleNotifications);
105
105
 
106
106
  // Set up a subscription for new block headers.
107
- await electrum.subscribe('blockchain.headers.subscribe');
107
+ await electrumClient.subscribe('blockchain.headers.subscribe');
108
108
  ```
109
109
 
110
110
  ### Shutting down
111
111
 
112
- When you're done and don't want to be connected anymore you can disconnect the server(s).
113
-
114
- If you're using a single `ElectrumClient`, call the `disconnect()` function:
112
+ When you're done and don't want to be connected anymore you can disconnect the server:
115
113
 
116
114
  ```js
117
115
  // Close the connection.
118
- await electrum.disconnect();
116
+ await electrumClient.disconnect();
119
117
  ```
120
118
 
121
119
  ## Documentation
122
120
 
123
- For a complete list of methods and parameters, read the [API documentation](https://generalprotocols.gitlab.io/electrum-cash/library/).
121
+ For a complete list of methods and parameters, read the [API documentation](https://electrum-cash.gitlab.io/network/).
124
122
 
125
123
  ## Support and communication
126
124
 
127
125
  If you need help with how to use the library or just want to talk about electrum-cash, you can find us on [Telegram](https://t.me/electrumcash) and [Discord](https://discord.gg/ZjXQzew).
128
126
 
129
- You can also read our tutorials on [read.cash](https://read.cash/c/electrum-cash-f45e), or share your own.
130
-
131
127
  ## Notes
132
128
 
133
129
  The keep-alive functionality of this library only works when the protocol version is 1.2 or higher.
package/dist/index.d.ts CHANGED
@@ -110,138 +110,6 @@ export const DefaultParameters: {
110
110
  PING_INTERVAL: number;
111
111
  USE_BIG_INT: boolean;
112
112
  };
113
- /**
114
- * Wrapper around TLS/WSS sockets that gracefully separates a network stream into Electrum protocol messages.
115
- *
116
- * @ignore
117
- */
118
- declare class ElectrumConnection extends EventEmitter {
119
- application: string;
120
- version: string;
121
- host: string;
122
- port: number;
123
- scheme: TransportScheme;
124
- timeout: number;
125
- pingInterval: number;
126
- reconnectInterval: number;
127
- useBigInt: boolean;
128
- status: ConnectionStatus;
129
- lastReceivedTimestamp: number;
130
- software: string;
131
- /**
132
- * Sets up network configuration for an Electrum client connection.
133
- *
134
- * @param {string} application your application name, used to identify to the electrum host.
135
- * @param {string} version protocol version to use with the host.
136
- * @param {string} host fully qualified domain name or IP number of the host.
137
- * @param {number} port the network port of the host.
138
- * @param {TransportScheme} scheme the transport scheme to use for connection
139
- * @param {number} timeout how long network delays we will wait for before taking action, in milliseconds.
140
- * @param {number} pingInterval the time between sending pings to the electrum host, in milliseconds.
141
- * @param {number} reconnectInterval the time between reconnection attempts to the electrum host, in milliseconds.
142
- * @param {boolean} useBigInt whether to use bigint for numbers in json response.
143
- *
144
- * @throws {Error} if `version` is not a valid version string.
145
- */
146
- constructor(application: string, version: string, host: string, port?: number, scheme?: TransportScheme, timeout?: number, pingInterval?: number, reconnectInterval?: number, useBigInt?: boolean);
147
- /**
148
- * Returns a string for the host identifier for usage in debug messages.
149
- */
150
- get hostIdentifier(): string;
151
- /**
152
- * Create and configures a fresh socket and attaches all relevant listeners.
153
- */
154
- createSocket(): void;
155
- /**
156
- * Shuts down and destroys the current socket.
157
- */
158
- destroySocket(): void;
159
- /**
160
- * Assembles incoming data into statements and hands them off to the message parser.
161
- *
162
- * @param {string} data data to append to the current message buffer, as a string.
163
- *
164
- * @throws {SyntaxError} if the passed statement parts are not valid JSON.
165
- */
166
- parseMessageChunk(data: string): void;
167
- /**
168
- * Sends a keep-alive message to the host.
169
- *
170
- * @returns true if the ping message was fully flushed to the socket, false if
171
- * part of the message is queued in the user memory
172
- */
173
- ping(): boolean;
174
- /**
175
- * Initiates the network connection negotiates a protocol version. Also emits the 'connect' signal if successful.
176
- *
177
- * @throws {Error} if the socket connection fails.
178
- * @returns a promise resolving when the connection is established
179
- */
180
- connect(): Promise<void>;
181
- /**
182
- * Restores the network connection.
183
- */
184
- reconnect(): Promise<void>;
185
- /**
186
- * Removes the current reconnect timer.
187
- */
188
- clearReconnectTimer(): void;
189
- /**
190
- * Removes the current keep-alive timer.
191
- */
192
- clearKeepAliveTimer(): void;
193
- /**
194
- * Initializes the keep alive timer loop.
195
- */
196
- setupKeepAliveTimer(): void;
197
- /**
198
- * Tears down the current connection and removes all event listeners on disconnect.
199
- *
200
- * @param {boolean} force disconnect even if the connection has not been fully established yet.
201
- * @param {boolean} intentional update connection state if disconnect is intentional.
202
- *
203
- * @returns true if successfully disconnected, or false if there was no connection.
204
- */
205
- disconnect(force?: boolean, intentional?: boolean): Promise<boolean>;
206
- /**
207
- * Updates connection state based on application visibility.
208
- *
209
- * Some browsers will disconnect network connections when the browser is out of focus,
210
- * which would normally cause our reconnect-on-timeout routines to trigger, but that
211
- * results in a poor user experience since the events are not handled consistently
212
- * and sometimes it can take some time after restoring focus to the browser.
213
- *
214
- * By manually disconnecting when this happens we prevent the default reconnection routines
215
- * and make the behavior consistent across browsers.
216
- */
217
- handleVisibilityChange(): Promise<void>;
218
- /**
219
- * Sends an arbitrary message to the server.
220
- *
221
- * @param {string} message json encoded request object to send to the server, as a string.
222
- *
223
- * @returns true if the message was fully flushed to the socket, false if part of the message
224
- * is queued in the user memory
225
- */
226
- send(message: string): boolean;
227
- /**
228
- * Marks the connection as timed out and schedules reconnection if we have not
229
- * received data within the expected time frame.
230
- */
231
- verifySend(sentTimestamp: number): void;
232
- /**
233
- * Updates the connection status when a connection is confirmed.
234
- */
235
- onSocketConnect(): void;
236
- /**
237
- * Updates the connection status when a connection is ended.
238
- */
239
- onSocketDisconnect(): void;
240
- /**
241
- * Notify administrator of any unexpected errors.
242
- */
243
- onSocketError(error: any | undefined): void;
244
- }
245
113
  /**
246
114
  * Triggers when the underlying connection is established.
247
115
  *
@@ -270,7 +138,24 @@ export class ElectrumClient extends EventEmitter {
270
138
  pingInterval: number;
271
139
  reconnectInterval: number;
272
140
  useBigInt: boolean;
273
- connection: ElectrumConnection;
141
+ /**
142
+ * The name and version of the server software indexing the blockchain.
143
+ */
144
+ software: string;
145
+ /**
146
+ * The genesis hash of the blockchain indexed by the server.
147
+ * @note This is only available after a 'server.features' call.
148
+ */
149
+ genesisHash: string;
150
+ /**
151
+ * The chain height of the blockchain indexed by the server.
152
+ * @note This is only available after a 'blockchain.headers.subscribe' call.
153
+ */
154
+ chainHeight: number;
155
+ /**
156
+ * Timestamp of when we last received data from the server indexing the blockchain.
157
+ */
158
+ lastReceivedTimestamp: number;
274
159
  /**
275
160
  * Initializes an Electrum client.
276
161
  *
@@ -353,6 +238,30 @@ export class ElectrumClient extends EventEmitter {
353
238
  * @ignore
354
239
  */
355
240
  onConnectionDisconnect(): void;
241
+ /**
242
+ * Stores the server provider software version field on successful version negotiation.
243
+ */
244
+ storeSoftwareVersion(versionStatement: any): Promise<void>;
245
+ /**
246
+ * Updates the last received timestamp.
247
+ *
248
+ * @ignore
249
+ */
250
+ updateLastReceivedTimestamp(): Promise<void>;
251
+ /**
252
+ * Checks if the provided message is a response to a headers subscription,
253
+ * and if so updates the locally stored chain height value for this client.
254
+ *
255
+ * @ignore
256
+ */
257
+ updateChainHeightFromHeadersNotifications(message: any): Promise<void>;
258
+ /**
259
+ * Checks if the provided message is a response to a server.features request,
260
+ * and if so stores the genesis hash for this client locally.
261
+ *
262
+ * @ignore
263
+ */
264
+ storeGenesisHashFromFeaturesResponse(message: any): Promise<void>;
356
265
  }
357
266
 
358
267
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";ACCA,oBAA2B,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAG5D;IAEC,OAAO,EAAE,MAAM,CAAC;CAChB;AAGD,yBAAiC,SAAQ,OAAO;IAE/C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;CACxB;AAWD,sBAA8B,SAAQ,OAAO;IAE5C,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CACf;AAED;IAEC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;CACX;AAGD,0BAAkC,SAAQ,OAAO;IAEhD,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,KAAK,EAAE,QAAQ,CAAC;CAChB;AAGD,mBAA0B,gBAAgB,GAAG,YAAY,CAAC;AE3C1D;;;;;GAKG;AACH;IAEC,WAAW,IAAI;IACf,SAAS,IAAI;CACb;AAED;;;;;;;;GAQG;AACH;IAEC,YAAY,IAAI;IAChB,SAAS,IAAI;IACb,aAAa,IAAI;IACjB,UAAU,IAAI;IACd,YAAY,IAAI;CAChB;AC3BD;IAGC,KAAK,EAAE,WAAW,CAAC;IAGnB,UAAU,EAAE,cAAc,CAAC;CAC3B;AAED;;GAEG;AACH,8BAA8B,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,eAAe,EAAE,CAAC;AAI5F,8BAA8B,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAGrE,4BAA4B,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,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UAAU,EAAE,kBAAkB,CAAC;IActC;;;;;;;;;;;;;;OAcG;gBAEK,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,MAA+B,EACrC,MAAM,GAAE,eAAoD,EAC5D,OAAO,GAAE,MAAkC,EAC3C,YAAY,GAAE,MAAwC,EACtD,iBAAiB,GAAE,MAAoC,EACvD,SAAS,GAAE,OAAuC;IAU1D;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAoC9B;;;;;;;OAOG;IACG,UAAU,CAAC,KAAK,GAAE,OAAe,EAAE,mBAAmB,GAAE,OAAe,GAAG,OAAO,CAAC,OAAO,CAAC;IAqChG;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,KAAK,GAAG,eAAe,CAAC;IAgD9F;;;;;;;;;;OAUG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B7E;;;;;;;;;;OAUG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA6E/E;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,GAAG,IAAI;IAiDtD;;;;;OAKG;IACH,sBAAsB,IAAI,IAAI;CAkB9B","sources":["lib/lib/util.ts","lib/lib/rpc-interfaces.ts","lib/lib/electrum-protocol.ts","lib/lib/enums.ts","lib/lib/interfaces.ts","lib/lib/constants.ts","lib/lib/electrum-socket.ts","lib/lib/electrum-connection.ts","lib/lib/electrum-client.ts","lib/lib/index.ts","lib/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,"export { default as ElectrumClient } from './electrum-client';\n\nexport * from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,MAAoC,EACvD,SAAS,GAAE,OAAuC;IAU1D;;;;;OAKG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAwC9B;;;;;;;OAOG;IACG,UAAU,CAAC,KAAK,GAAE,OAAe,EAAE,mBAAmB,GAAE,OAAe,GAAG,OAAO,CAAC,OAAO,CAAC;IAqChG;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,KAAK,GAAG,eAAe,CAAC;IAgD9F;;;;;;;;;;OAUG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B7E;;;;;;;;;;OAUG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA6E/E;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,GAAG,IAAI;IAuDtD;;;;;OAKG;IACH,sBAAsB,IAAI,IAAI;IAmB9B;;OAEG;IACG,oBAAoB,CAAC,gBAAgB,KAAA,GAAG,OAAO,CAAC,IAAI,CAAC;IAa3D;;;;OAIG;IACG,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlD;;;;;OAKG;IACG,yCAAyC,CAAC,OAAO,KAAA,GAAG,OAAO,CAAC,IAAI,CAAC;IAUvE;;;;;OAKG;IACG,oCAAoC,CAAC,OAAO,KAAA,GAAG,OAAO,CAAC,IAAI,CAAC;CASlE","sources":["source/source/util.ts","source/source/rpc-interfaces.ts","source/source/electrum-protocol.ts","source/source/enums.ts","source/source/interfaces.ts","source/source/constants.ts","source/source/electrum-socket.ts","source/source/electrum-connection.ts","source/source/electrum-client.ts","source/source/index.ts","source/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,"export { default as ElectrumClient } from './electrum-client';\n\nexport * from './interfaces';\nexport * from './constants';\nexport * from './enums';\n"],"names":[],"version":3,"file":"index.d.ts.map"}