@electrum-cash/network 3.3.1-development.6372294997 → 4.0.0-development.6392223875
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 +2 -38
- package/dist/index.d.ts +10 -272
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +226 -645
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -9
- package/dist/index.cjs +0 -1643
- package/dist/index.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -19,20 +19,11 @@ Install the library with NPM:
|
|
|
19
19
|
|
|
20
20
|
Before you can use the library you need to include it in your project.
|
|
21
21
|
|
|
22
|
-
If you only want to use a **single server**, load the `ElectrumClient` module:
|
|
23
|
-
|
|
24
22
|
```js
|
|
25
23
|
// Load the electrum library.
|
|
26
24
|
const { ElectrumClient } = require('electrum-cash');
|
|
27
25
|
```
|
|
28
26
|
|
|
29
|
-
If you want to use **multiple servers**, load the `ElectrumCluster` module:
|
|
30
|
-
|
|
31
|
-
```js
|
|
32
|
-
// Load the electrum library.
|
|
33
|
-
const { ElectrumCluster } = require('electrum-cash');
|
|
34
|
-
```
|
|
35
|
-
|
|
36
27
|
### Usage on Web
|
|
37
28
|
|
|
38
29
|
To use the library on the web, use the ESM import syntax and include the `ElectrumTransport` import:
|
|
@@ -64,29 +55,9 @@ const electrum = new ElectrumClient(
|
|
|
64
55
|
);
|
|
65
56
|
```
|
|
66
57
|
|
|
67
|
-
If you want to use multiple servers, initialize an `ElectrumCluster` and add some servers:
|
|
68
|
-
|
|
69
|
-
*For more information on various cluster configurations, read the [cluster documentation](https://read.cash/@JonathanSilverblood/electrum-cash-strategic-use-of-clusters-83743111).*
|
|
70
|
-
|
|
71
|
-
```js
|
|
72
|
-
// Initialize an electrum cluster where 2 out of 3 needs to be consistent, polled randomly with fail-over (default).
|
|
73
|
-
const electrum = new ElectrumCluster('Electrum cluster example', '1.4.1', 2, 3);
|
|
74
|
-
|
|
75
|
-
// Add some servers to the cluster.
|
|
76
|
-
electrum.addServer('bch.imaginary.cash');
|
|
77
|
-
electrum.addServer('electroncash.de');
|
|
78
|
-
electrum.addServer('electroncash.dk');
|
|
79
|
-
electrum.addServer('electron.jochen-hoenicke.de', 51002);
|
|
80
|
-
electrum.addServer('electrum.imaginary.cash');
|
|
81
|
-
|
|
82
|
-
// Wait for enough connections to be available.
|
|
83
|
-
await electrum.ready();
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
|
|
87
58
|
### Request information
|
|
88
59
|
|
|
89
|
-
Once your `ElectrumClient`
|
|
60
|
+
Once your `ElectrumClient` is connected and ready, you can call methods:
|
|
90
61
|
|
|
91
62
|
*For a list of methods you can use, refer to the [Electrum Cash documentation](https://bitcoincash.network/electrum/).*
|
|
92
63
|
|
|
@@ -103,7 +74,7 @@ console.log(transactionHex);
|
|
|
103
74
|
|
|
104
75
|
### Subscribe to notifications.
|
|
105
76
|
|
|
106
|
-
Once your `ElectrumClient`
|
|
77
|
+
Once your `ElectrumClient` is connected and ready, you can set up subscriptions to get notifications on events:
|
|
107
78
|
|
|
108
79
|
*For a list of methods you can subscribe to, refer to the [Electrum Cash documentation](https://bitcoincash.network/electrum/).*
|
|
109
80
|
|
|
@@ -147,13 +118,6 @@ If you're using a single `ElectrumClient`, call the `disconnect()` function:
|
|
|
147
118
|
await electrum.disconnect();
|
|
148
119
|
```
|
|
149
120
|
|
|
150
|
-
If you're using a `ElectrumCluster` with multiple servers, call the `shutdown()` function.
|
|
151
|
-
|
|
152
|
-
```js
|
|
153
|
-
// Close all connections.
|
|
154
|
-
await electrum.shutdown();
|
|
155
|
-
```
|
|
156
|
-
|
|
157
121
|
## Documentation
|
|
158
122
|
|
|
159
123
|
For a complete list of methods and parameters, read the [API documentation](https://generalprotocols.gitlab.io/electrum-cash/library/).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import * as net from "net";
|
|
2
|
-
import { WebSocket, MessageEvent, ErrorEvent } from "@monsterbitar/isomorphic-ws";
|
|
3
1
|
import { EventEmitter } from "events";
|
|
4
|
-
import { Mutex } from "async-mutex";
|
|
5
2
|
type RPCParameter = string | number | boolean | null;
|
|
6
3
|
interface RPCBase {
|
|
7
4
|
jsonrpc: string;
|
|
@@ -24,36 +21,6 @@ interface RPCErrorResponse extends RPCBase {
|
|
|
24
21
|
error: RPCError;
|
|
25
22
|
}
|
|
26
23
|
type RPCResponse = RPCErrorResponse | RPCStatement;
|
|
27
|
-
/**
|
|
28
|
-
* Enum that denotes the ordering to use in an ElectrumCluster.
|
|
29
|
-
* @enum {number}
|
|
30
|
-
* @property {0} RANDOM Send requests to randomly selected servers in the cluster.
|
|
31
|
-
* @property {1} PRIORITY Send requests to servers in the cluster in the order they were added.
|
|
32
|
-
*/
|
|
33
|
-
export enum ClusterOrder {
|
|
34
|
-
RANDOM = 0,
|
|
35
|
-
PRIORITY = 1
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Enum that denotes the distribution setting to use in an ElectrumCluster.
|
|
39
|
-
* @enum {number}
|
|
40
|
-
* @property {0} ALL Send requests to all servers in the cluster.
|
|
41
|
-
*/
|
|
42
|
-
export enum ClusterDistribution {
|
|
43
|
-
ALL = 0
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Enum that denotes the ready status of an ElectrumCluster.
|
|
47
|
-
* @enum {number}
|
|
48
|
-
* @property {0} DISABLED The cluster is disabled and unusable.
|
|
49
|
-
* @property {1} DEGRADED The cluster is degraded but still usable.
|
|
50
|
-
* @property {2} READY The cluster is healthy and ready for use.
|
|
51
|
-
*/
|
|
52
|
-
export enum ClusterStatus {
|
|
53
|
-
DISABLED = 0,
|
|
54
|
-
DEGRADED = 1,
|
|
55
|
-
READY = 2
|
|
56
|
-
}
|
|
57
24
|
/**
|
|
58
25
|
* Enum that denotes the availability of an ElectrumClient.
|
|
59
26
|
* @enum {number}
|
|
@@ -141,81 +108,8 @@ export const DefaultParameters: {
|
|
|
141
108
|
RECONNECT: number;
|
|
142
109
|
TIMEOUT: number;
|
|
143
110
|
PING_INTERVAL: number;
|
|
144
|
-
CLUSTER_CONFIDENCE: number;
|
|
145
|
-
CLUSTER_DISTRIBUTION: ClusterDistribution;
|
|
146
|
-
CLUSTER_ORDER: ClusterOrder;
|
|
147
111
|
USE_BIG_INT: boolean;
|
|
148
112
|
};
|
|
149
|
-
/**
|
|
150
|
-
* Isomorphic Socket interface supporting TCP sockets and WebSockets (Node and browser).
|
|
151
|
-
* The interface is a subset of the TLSSocket interface with some slight modifications.
|
|
152
|
-
* It can be expanded when more socket functionality is needed in the rest of the
|
|
153
|
-
* electrum-cash code. Changes from the TLSSocket interface (besides it being a subset):
|
|
154
|
-
* - Event 'close' -> 'disconnect'
|
|
155
|
-
* - New function socket.disconnect()
|
|
156
|
-
*
|
|
157
|
-
* @ignore
|
|
158
|
-
*/
|
|
159
|
-
declare class ElectrumSocket extends EventEmitter {
|
|
160
|
-
tcpSocket?: net.Socket;
|
|
161
|
-
webSocket?: WebSocket;
|
|
162
|
-
timers: {
|
|
163
|
-
retryConnection?: number;
|
|
164
|
-
disconnect?: number;
|
|
165
|
-
};
|
|
166
|
-
onConnectHasRun: boolean;
|
|
167
|
-
eventForwarders: {
|
|
168
|
-
disconnect: () => boolean;
|
|
169
|
-
tcpData: (data: string) => boolean;
|
|
170
|
-
wsData: (event: MessageEvent) => boolean;
|
|
171
|
-
tcpError: (err: Error) => boolean;
|
|
172
|
-
wsError: (event: ErrorEvent) => boolean;
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
* Connect to host:port using the specified transport
|
|
176
|
-
*
|
|
177
|
-
* @param {string} host Fully qualified domain name or IP address of the host
|
|
178
|
-
* @param {number} port Network port for the host to connect to
|
|
179
|
-
* @param {TransportScheme} scheme Transport scheme to use
|
|
180
|
-
* @param {number} timeout If no connection is established after `timeout` ms, the connection is terminated
|
|
181
|
-
*
|
|
182
|
-
* @throws {Error} if an incorrect transport scheme is specified
|
|
183
|
-
*/
|
|
184
|
-
connect(host: string, port: number, scheme: TransportScheme, timeout: number): void;
|
|
185
|
-
/**
|
|
186
|
-
* Sets up forwarding of events related to the connection.
|
|
187
|
-
*
|
|
188
|
-
* @param {string} connectionType Name of the connection/transport type, used for logging.
|
|
189
|
-
* @param {string} host Fully qualified domain name or IP address of the host
|
|
190
|
-
* @param {number} port Network port for the host to connect to
|
|
191
|
-
*/
|
|
192
|
-
onConnect(connectionType: string, host: string, port: number): void;
|
|
193
|
-
/**
|
|
194
|
-
* Forcibly terminate the connection.
|
|
195
|
-
*
|
|
196
|
-
* @throws {Error} if no connection was found
|
|
197
|
-
*/
|
|
198
|
-
disconnect(): void;
|
|
199
|
-
/**
|
|
200
|
-
* Write data to the socket
|
|
201
|
-
*
|
|
202
|
-
* @param {Uint8Array | string} data Data to be written to the socket
|
|
203
|
-
* @param {function} callback Callback function to be called when the write has completed
|
|
204
|
-
*
|
|
205
|
-
* @throws {Error} if no connection was found
|
|
206
|
-
* @returns true if the message was fully flushed to the socket, false if part of the message
|
|
207
|
-
* is queued in the user memory
|
|
208
|
-
*/
|
|
209
|
-
write(data: Uint8Array | string, callback?: (err?: Error) => void): boolean;
|
|
210
|
-
/**
|
|
211
|
-
* Force a disconnection if no connection is established after `timeout` milliseconds.
|
|
212
|
-
*
|
|
213
|
-
* @param {string} host Host of the connection that timed out
|
|
214
|
-
* @param {number} port Port of the connection that timed out
|
|
215
|
-
* @param {number} timeout Elapsed milliseconds
|
|
216
|
-
*/
|
|
217
|
-
disconnectOnTimeout(host: string, port: number, timeout: number): void;
|
|
218
|
-
}
|
|
219
113
|
/**
|
|
220
114
|
* Wrapper around TLS/WSS sockets that gracefully separates a network stream into Electrum protocol messages.
|
|
221
115
|
*
|
|
@@ -231,16 +125,9 @@ declare class ElectrumConnection extends EventEmitter {
|
|
|
231
125
|
pingInterval: number;
|
|
232
126
|
reconnectInterval: number;
|
|
233
127
|
useBigInt: boolean;
|
|
234
|
-
|
|
128
|
+
status: ConnectionStatus;
|
|
235
129
|
lastReceivedTimestamp: number;
|
|
236
130
|
software: string;
|
|
237
|
-
timers: {
|
|
238
|
-
keepAlive?: number;
|
|
239
|
-
reconnect?: number;
|
|
240
|
-
};
|
|
241
|
-
verifications: Array<number>;
|
|
242
|
-
status: ConnectionStatus;
|
|
243
|
-
messageBuffer: string;
|
|
244
131
|
/**
|
|
245
132
|
* Sets up network configuration for an Electrum client connection.
|
|
246
133
|
*
|
|
@@ -374,13 +261,16 @@ declare class ElectrumConnection extends EventEmitter {
|
|
|
374
261
|
* High-level Electrum client that lets applications send requests and subscribe to notification events from a server.
|
|
375
262
|
*/
|
|
376
263
|
export class ElectrumClient extends EventEmitter {
|
|
264
|
+
application: string;
|
|
265
|
+
version: string;
|
|
266
|
+
host: string;
|
|
267
|
+
port: number;
|
|
268
|
+
scheme: TransportScheme;
|
|
269
|
+
timeout: number;
|
|
270
|
+
pingInterval: number;
|
|
271
|
+
reconnectInterval: number;
|
|
272
|
+
useBigInt: boolean;
|
|
377
273
|
connection: ElectrumConnection;
|
|
378
|
-
subscriptionMethods: Record<string, Set<string>>;
|
|
379
|
-
requestId: number;
|
|
380
|
-
requestResolvers: {
|
|
381
|
-
[index: number]: RequestResolver;
|
|
382
|
-
};
|
|
383
|
-
connectionLock: Mutex;
|
|
384
274
|
/**
|
|
385
275
|
* Initializes an Electrum client.
|
|
386
276
|
*
|
|
@@ -464,157 +354,5 @@ export class ElectrumClient extends EventEmitter {
|
|
|
464
354
|
*/
|
|
465
355
|
onConnectionDisconnect(): void;
|
|
466
356
|
}
|
|
467
|
-
/**
|
|
468
|
-
* Triggers when the cluster connects to enough servers to satisfy both the cluster confidence and distribution policies.
|
|
469
|
-
*
|
|
470
|
-
* @event ElectrumCluster#ready
|
|
471
|
-
* @deprecated
|
|
472
|
-
*/
|
|
473
|
-
/**
|
|
474
|
-
* Triggers when the cluster loses a connection and can no longer satisfy the cluster distribution policy.
|
|
475
|
-
*
|
|
476
|
-
* @event ElectrumCluster#degraded
|
|
477
|
-
* @deprecated
|
|
478
|
-
*/
|
|
479
|
-
/**
|
|
480
|
-
* Triggers when the cluster loses a connection and can no longer satisfy the cluster confidence policy.
|
|
481
|
-
*
|
|
482
|
-
* @event ElectrumCluster#disabled
|
|
483
|
-
* @deprecated
|
|
484
|
-
*/
|
|
485
|
-
/**
|
|
486
|
-
* Triggers when the cluster verifies the integrity of remote server sent data that is not a request responses.
|
|
487
|
-
*
|
|
488
|
-
* @event ElectrumCluster#notification
|
|
489
|
-
* @deprecated
|
|
490
|
-
*/
|
|
491
|
-
/**
|
|
492
|
-
* High-level electrum client that provides transparent load balancing, confidence checking and/or low-latency polling.
|
|
493
|
-
* @deprecated
|
|
494
|
-
*/
|
|
495
|
-
export class ElectrumCluster extends EventEmitter {
|
|
496
|
-
application: string;
|
|
497
|
-
version: string;
|
|
498
|
-
confidence: number;
|
|
499
|
-
distribution: number;
|
|
500
|
-
order: ClusterOrder;
|
|
501
|
-
timeout: number;
|
|
502
|
-
pingInterval: number;
|
|
503
|
-
reconnectInterval: number;
|
|
504
|
-
useBigInt: boolean;
|
|
505
|
-
clients: {
|
|
506
|
-
[index: string]: ClientConfig;
|
|
507
|
-
};
|
|
508
|
-
connections: number;
|
|
509
|
-
notifications: Record<string, Set<string>>;
|
|
510
|
-
status: ClusterStatus;
|
|
511
|
-
requestCounter: number;
|
|
512
|
-
requestPromises: {
|
|
513
|
-
[index: number]: Promise<Error | RequestResponse>[];
|
|
514
|
-
};
|
|
515
|
-
requestLock: Mutex;
|
|
516
|
-
responseLock: Mutex;
|
|
517
|
-
/**
|
|
518
|
-
* @param {string} application your application name, used to identify to the electrum hosts.
|
|
519
|
-
* @param {string} version protocol version to use with the hosts.
|
|
520
|
-
* @param {number} confidence wait for this number of hosts to provide identical results.
|
|
521
|
-
* @param {number} distribution request information from this number of hosts.
|
|
522
|
-
* @param {ClusterOrder} order select hosts to communicate with in this order.
|
|
523
|
-
* @param {number} timeout how long network delays we will wait for before taking action, in milliseconds.
|
|
524
|
-
* @param {number} pingInterval the time between sending pings to the electrum host, in milliseconds.
|
|
525
|
-
* @param {number} reconnectInterval the time between reconnection attempts to the electrum host, in milliseconds.
|
|
526
|
-
* @param {boolean} useBigInt whether to use bigint for numbers in json response.
|
|
527
|
-
*/
|
|
528
|
-
constructor(application: string, version: string, confidence?: number, distribution?: number, order?: ClusterOrder, timeout?: number, pingInterval?: number, reconnectInterval?: number, useBigInt?: boolean);
|
|
529
|
-
/**
|
|
530
|
-
* Adds a server to the cluster.
|
|
531
|
-
* @deprecated
|
|
532
|
-
*
|
|
533
|
-
* @param {string} host fully qualified domain name or IP number of the host.
|
|
534
|
-
* @param {number} port the TCP network port of the host.
|
|
535
|
-
* @param {TransportScheme} scheme the transport scheme to use for connection
|
|
536
|
-
* @param {boolean} autoConnect flag indicating whether the server should automatically connect (default true)
|
|
537
|
-
*
|
|
538
|
-
* @throws {Error} if the cluster's version is not a valid version string.
|
|
539
|
-
* @returns a promise that resolves when the connection has been initiated.
|
|
540
|
-
*/
|
|
541
|
-
addServer(host: string, port?: number, scheme?: TransportScheme, autoConnect?: boolean): Promise<void>;
|
|
542
|
-
/**
|
|
543
|
-
* Calls a method on the remote server with the supplied parameters.
|
|
544
|
-
* @deprecated
|
|
545
|
-
*
|
|
546
|
-
* @param {string} method name of the method to call.
|
|
547
|
-
* @param {...string} parameters one or more parameters for the method.
|
|
548
|
-
*
|
|
549
|
-
* @throws {Error} if not enough clients are connected
|
|
550
|
-
* @throws {Error} if no response is received with sufficient integrity
|
|
551
|
-
* @returns a promise that resolves with the result of the method.
|
|
552
|
-
*/
|
|
553
|
-
request(method: string, ...parameters: RPCParameter[]): Promise<Error | RequestResponse>;
|
|
554
|
-
/**
|
|
555
|
-
* Subscribes to the method at the cluster and attaches the callback function to the event feed.
|
|
556
|
-
* @deprecated
|
|
557
|
-
*
|
|
558
|
-
* @note the response for the subscription request is issued as a notification event.
|
|
559
|
-
*
|
|
560
|
-
* @param {string} method one of the subscribable methods the server supports.
|
|
561
|
-
* @param {...string} parameters one or more parameters for the method.
|
|
562
|
-
*
|
|
563
|
-
* @throws {Error} if not enough clients are connected
|
|
564
|
-
* @throws {Error} if no response is received with sufficient integrity for the initial request
|
|
565
|
-
*/
|
|
566
|
-
subscribe(method: string, ...parameters: RPCParameter[]): Promise<void>;
|
|
567
|
-
/**
|
|
568
|
-
* Unsubscribes to the method at the cluster and removes any callback functions
|
|
569
|
-
* when there are no more subscriptions for the method.
|
|
570
|
-
* @deprecated
|
|
571
|
-
*
|
|
572
|
-
* @param {string} method one of the subscribable methods the server supports.
|
|
573
|
-
* @param {...string} parameters one or more parameters for the method.
|
|
574
|
-
*
|
|
575
|
-
* @throws {Error} if, for any of the clients, no subscriptions exist for the combination of the provided `method` and `parameters.
|
|
576
|
-
*/
|
|
577
|
-
unsubscribe(method: string, ...parameters: RPCParameter[]): Promise<void>;
|
|
578
|
-
/**
|
|
579
|
-
* Define a callback function to validate server notifications and pass them to the subscribe callback.
|
|
580
|
-
* @deprecated
|
|
581
|
-
*
|
|
582
|
-
* @ignore
|
|
583
|
-
*/
|
|
584
|
-
handleSubscriptionNotifications(clientIdentity: string, data: RPCNotification): Promise<void>;
|
|
585
|
-
/**
|
|
586
|
-
* Forgets/Removes notification data for a specific notification.
|
|
587
|
-
*
|
|
588
|
-
* This is required in order to allow future identical notifications to be properly processed and emitted.
|
|
589
|
-
* @deprecated
|
|
590
|
-
*/
|
|
591
|
-
dismissSubscriptionNotification(responseDataIdentifier: any): Promise<void>;
|
|
592
|
-
/**
|
|
593
|
-
* Provides a method to check or wait for the cluster to become ready.
|
|
594
|
-
* @deprecated
|
|
595
|
-
*
|
|
596
|
-
* @returns a promise that resolves when the required servers are available.
|
|
597
|
-
*/
|
|
598
|
-
ready(): Promise<boolean>;
|
|
599
|
-
/**
|
|
600
|
-
* Connects all servers from the cluster and attaches event listeners and handlers
|
|
601
|
-
* for all underlying clients and connections.
|
|
602
|
-
* @deprecated
|
|
603
|
-
*
|
|
604
|
-
* @throws {Error} if the cluster's version is not a valid version string.
|
|
605
|
-
*/
|
|
606
|
-
startup(): Promise<void[]>;
|
|
607
|
-
/**
|
|
608
|
-
* Disconnects all servers from the cluster. Removes all event listeners and
|
|
609
|
-
* handlers from all underlying clients and connections. This includes all
|
|
610
|
-
* active subscriptions, unless retainSubscriptions is set to true.
|
|
611
|
-
* @deprecated
|
|
612
|
-
*
|
|
613
|
-
* @param {boolean} retainSubscriptions retain subscription data so they will be restored on reconnection.
|
|
614
|
-
*
|
|
615
|
-
* @returns a list with the disconnection result for every client
|
|
616
|
-
*/
|
|
617
|
-
shutdown(retainSubscriptions?: boolean): Promise<boolean[]>;
|
|
618
|
-
}
|
|
619
357
|
|
|
620
358
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
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;IAE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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 './interfaces';\nexport * from './constants';\nexport * from './enums';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|