@electrum-cash/network 3.2.0-r2 → 3.3.0
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 +20 -1
- package/dist/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +17 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -467,24 +467,29 @@ export class ElectrumClient extends EventEmitter {
|
|
|
467
467
|
* Triggers when the cluster connects to enough servers to satisfy both the cluster confidence and distribution policies.
|
|
468
468
|
*
|
|
469
469
|
* @event ElectrumCluster#ready
|
|
470
|
+
* @deprecated
|
|
470
471
|
*/
|
|
471
472
|
/**
|
|
472
473
|
* Triggers when the cluster loses a connection and can no longer satisfy the cluster distribution policy.
|
|
473
474
|
*
|
|
474
475
|
* @event ElectrumCluster#degraded
|
|
476
|
+
* @deprecated
|
|
475
477
|
*/
|
|
476
478
|
/**
|
|
477
479
|
* Triggers when the cluster loses a connection and can no longer satisfy the cluster confidence policy.
|
|
478
480
|
*
|
|
479
481
|
* @event ElectrumCluster#disabled
|
|
482
|
+
* @deprecated
|
|
480
483
|
*/
|
|
481
484
|
/**
|
|
482
485
|
* Triggers when the cluster verifies the integrity of remote server sent data that is not a request responses.
|
|
483
486
|
*
|
|
484
487
|
* @event ElectrumCluster#notification
|
|
488
|
+
* @deprecated
|
|
485
489
|
*/
|
|
486
490
|
/**
|
|
487
491
|
* High-level electrum client that provides transparent load balancing, confidence checking and/or low-latency polling.
|
|
492
|
+
* @deprecated
|
|
488
493
|
*/
|
|
489
494
|
export class ElectrumCluster extends EventEmitter {
|
|
490
495
|
application: string;
|
|
@@ -522,6 +527,7 @@ export class ElectrumCluster extends EventEmitter {
|
|
|
522
527
|
constructor(application: string, version: string, confidence?: number, distribution?: number, order?: ClusterOrder, timeout?: number, pingInterval?: number, reconnectInterval?: number, useBigInt?: boolean);
|
|
523
528
|
/**
|
|
524
529
|
* Adds a server to the cluster.
|
|
530
|
+
* @deprecated
|
|
525
531
|
*
|
|
526
532
|
* @param {string} host fully qualified domain name or IP number of the host.
|
|
527
533
|
* @param {number} port the TCP network port of the host.
|
|
@@ -534,6 +540,7 @@ export class ElectrumCluster extends EventEmitter {
|
|
|
534
540
|
addServer(host: string, port?: number, scheme?: TransportScheme, autoConnect?: boolean): Promise<void>;
|
|
535
541
|
/**
|
|
536
542
|
* Calls a method on the remote server with the supplied parameters.
|
|
543
|
+
* @deprecated
|
|
537
544
|
*
|
|
538
545
|
* @param {string} method name of the method to call.
|
|
539
546
|
* @param {...string} parameters one or more parameters for the method.
|
|
@@ -545,6 +552,7 @@ export class ElectrumCluster extends EventEmitter {
|
|
|
545
552
|
request(method: string, ...parameters: RPCParameter[]): Promise<Error | RequestResponse>;
|
|
546
553
|
/**
|
|
547
554
|
* Subscribes to the method at the cluster and attaches the callback function to the event feed.
|
|
555
|
+
* @deprecated
|
|
548
556
|
*
|
|
549
557
|
* @note the response for the subscription request is issued as a notification event.
|
|
550
558
|
*
|
|
@@ -558,6 +566,7 @@ export class ElectrumCluster extends EventEmitter {
|
|
|
558
566
|
/**
|
|
559
567
|
* Unsubscribes to the method at the cluster and removes any callback functions
|
|
560
568
|
* when there are no more subscriptions for the method.
|
|
569
|
+
* @deprecated
|
|
561
570
|
*
|
|
562
571
|
* @param {string} method one of the subscribable methods the server supports.
|
|
563
572
|
* @param {...string} parameters one or more parameters for the method.
|
|
@@ -567,6 +576,7 @@ export class ElectrumCluster extends EventEmitter {
|
|
|
567
576
|
unsubscribe(method: string, ...parameters: RPCParameter[]): Promise<void>;
|
|
568
577
|
/**
|
|
569
578
|
* Define a callback function to validate server notifications and pass them to the subscribe callback.
|
|
579
|
+
* @deprecated
|
|
570
580
|
*
|
|
571
581
|
* @ignore
|
|
572
582
|
*/
|
|
@@ -575,10 +585,12 @@ export class ElectrumCluster extends EventEmitter {
|
|
|
575
585
|
* Forgets/Removes notification data for a specific notification.
|
|
576
586
|
*
|
|
577
587
|
* This is required in order to allow future identical notifications to be properly processed and emitted.
|
|
588
|
+
* @deprecated
|
|
578
589
|
*/
|
|
579
590
|
dismissSubscriptionNotification(responseDataIdentifier: any): Promise<void>;
|
|
580
591
|
/**
|
|
581
592
|
* Provides a method to check or wait for the cluster to become ready.
|
|
593
|
+
* @deprecated
|
|
582
594
|
*
|
|
583
595
|
* @returns a promise that resolves when the required servers are available.
|
|
584
596
|
*/
|
|
@@ -586,6 +598,7 @@ export class ElectrumCluster extends EventEmitter {
|
|
|
586
598
|
/**
|
|
587
599
|
* Connects all servers from the cluster and attaches event listeners and handlers
|
|
588
600
|
* for all underlying clients and connections.
|
|
601
|
+
* @deprecated
|
|
589
602
|
*
|
|
590
603
|
* @throws {Error} if the cluster's version is not a valid version string.
|
|
591
604
|
*/
|
|
@@ -594,6 +607,7 @@ export class ElectrumCluster extends EventEmitter {
|
|
|
594
607
|
* Disconnects all servers from the cluster. Removes all event listeners and
|
|
595
608
|
* handlers from all underlying clients and connections. This includes all
|
|
596
609
|
* active subscriptions, unless retainSubscriptions is set to true.
|
|
610
|
+
* @deprecated
|
|
597
611
|
*
|
|
598
612
|
* @param {boolean} retainSubscriptions retain subscription data so they will be restored on reconnection.
|
|
599
613
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,EAA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B,OAAO,CAAC,IAAI,CAAC;IA8JhB;;;;;;;;;;OAUG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,KAAK,GAAG,eAAe,CAAC;IAuK9F;;;;;;;;;;;OAWG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB7E;;;;;;;;;OASG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB/E;;;;;OAKG;IACG,+BAA+B,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAiDnG;;;;;OAKG;IACG,+BAA+B,CAAC,sBAAsB,KAAA,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5E;;;;;OAKG;IACG,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IA8C/B;;;;;;OAMG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAgChC;;;;;;;;;OASG;IACG,QAAQ,CAAC,mBAAmB,GAAE,OAAe,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAwBxE","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/electrum-cluster.ts","lib/lib/index.ts","lib/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,"export { default as ElectrumClient } from './electrum-client';\nexport { default as ElectrumCluster } from './electrum-cluster';\n\nexport * from './interfaces';\nexport * from './constants';\nexport * from './enums';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|
package/dist/index.mjs
CHANGED
|
@@ -158,12 +158,12 @@ const $5abc8fb342687c03$export$f019be48b3aacb1a = {
|
|
|
158
158
|
// Transport to connect to the Electrum server
|
|
159
159
|
TRANSPORT_SCHEME: $5abc8fb342687c03$export$d048df559e6d3842.TCP_TLS.Scheme,
|
|
160
160
|
// How long to wait before attempting to reconnect, in milliseconds.
|
|
161
|
-
RECONNECT:
|
|
161
|
+
RECONNECT: 5000,
|
|
162
162
|
// How long to wait for network operations before following up, in milliseconds.
|
|
163
|
-
TIMEOUT:
|
|
163
|
+
TIMEOUT: 30000,
|
|
164
164
|
// Time between ping messages, in milliseconds. Pinging keeps the connection alive.
|
|
165
165
|
// The reason for pinging this frequently is to detect connection problems early.
|
|
166
|
-
PING_INTERVAL:
|
|
166
|
+
PING_INTERVAL: 1000,
|
|
167
167
|
// How many servers are required before we trust information provided.
|
|
168
168
|
CLUSTER_CONFIDENCE: 1,
|
|
169
169
|
// How many servers we send requests to.
|
|
@@ -1134,20 +1134,25 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1134
1134
|
* Triggers when the cluster connects to enough servers to satisfy both the cluster confidence and distribution policies.
|
|
1135
1135
|
*
|
|
1136
1136
|
* @event ElectrumCluster#ready
|
|
1137
|
+
* @deprecated
|
|
1137
1138
|
*/ /**
|
|
1138
1139
|
* Triggers when the cluster loses a connection and can no longer satisfy the cluster distribution policy.
|
|
1139
1140
|
*
|
|
1140
1141
|
* @event ElectrumCluster#degraded
|
|
1142
|
+
* @deprecated
|
|
1141
1143
|
*/ /**
|
|
1142
1144
|
* Triggers when the cluster loses a connection and can no longer satisfy the cluster confidence policy.
|
|
1143
1145
|
*
|
|
1144
1146
|
* @event ElectrumCluster#disabled
|
|
1147
|
+
* @deprecated
|
|
1145
1148
|
*/ /**
|
|
1146
1149
|
* Triggers when the cluster verifies the integrity of remote server sent data that is not a request responses.
|
|
1147
1150
|
*
|
|
1148
1151
|
* @event ElectrumCluster#notification
|
|
1152
|
+
* @deprecated
|
|
1149
1153
|
*/ /**
|
|
1150
1154
|
* High-level electrum client that provides transparent load balancing, confidence checking and/or low-latency polling.
|
|
1155
|
+
* @deprecated
|
|
1151
1156
|
*/ class $9b2ed2eb52532075$var$ElectrumCluster extends (0, $4QiMX$EventEmitter) {
|
|
1152
1157
|
/**
|
|
1153
1158
|
* @param {string} application your application name, used to identify to the electrum hosts.
|
|
@@ -1196,6 +1201,7 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1196
1201
|
}
|
|
1197
1202
|
/**
|
|
1198
1203
|
* Adds a server to the cluster.
|
|
1204
|
+
* @deprecated
|
|
1199
1205
|
*
|
|
1200
1206
|
* @param {string} host fully qualified domain name or IP number of the host.
|
|
1201
1207
|
* @param {number} port the TCP network port of the host.
|
|
@@ -1299,6 +1305,7 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1299
1305
|
}
|
|
1300
1306
|
/**
|
|
1301
1307
|
* Calls a method on the remote server with the supplied parameters.
|
|
1308
|
+
* @deprecated
|
|
1302
1309
|
*
|
|
1303
1310
|
* @param {string} method name of the method to call.
|
|
1304
1311
|
* @param {...string} parameters one or more parameters for the method.
|
|
@@ -1415,6 +1422,7 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1415
1422
|
}
|
|
1416
1423
|
/**
|
|
1417
1424
|
* Subscribes to the method at the cluster and attaches the callback function to the event feed.
|
|
1425
|
+
* @deprecated
|
|
1418
1426
|
*
|
|
1419
1427
|
* @note the response for the subscription request is issued as a notification event.
|
|
1420
1428
|
*
|
|
@@ -1441,6 +1449,7 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1441
1449
|
/**
|
|
1442
1450
|
* Unsubscribes to the method at the cluster and removes any callback functions
|
|
1443
1451
|
* when there are no more subscriptions for the method.
|
|
1452
|
+
* @deprecated
|
|
1444
1453
|
*
|
|
1445
1454
|
* @param {string} method one of the subscribable methods the server supports.
|
|
1446
1455
|
* @param {...string} parameters one or more parameters for the method.
|
|
@@ -1461,6 +1470,7 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1461
1470
|
}
|
|
1462
1471
|
/**
|
|
1463
1472
|
* Define a callback function to validate server notifications and pass them to the subscribe callback.
|
|
1473
|
+
* @deprecated
|
|
1464
1474
|
*
|
|
1465
1475
|
* @ignore
|
|
1466
1476
|
*/ async handleSubscriptionNotifications(clientIdentity, data) {
|
|
@@ -1497,11 +1507,13 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1497
1507
|
* Forgets/Removes notification data for a specific notification.
|
|
1498
1508
|
*
|
|
1499
1509
|
* This is required in order to allow future identical notifications to be properly processed and emitted.
|
|
1510
|
+
* @deprecated
|
|
1500
1511
|
*/ async dismissSubscriptionNotification(responseDataIdentifier) {
|
|
1501
1512
|
delete this.notifications[responseDataIdentifier];
|
|
1502
1513
|
}
|
|
1503
1514
|
/**
|
|
1504
1515
|
* Provides a method to check or wait for the cluster to become ready.
|
|
1516
|
+
* @deprecated
|
|
1505
1517
|
*
|
|
1506
1518
|
* @returns a promise that resolves when the required servers are available.
|
|
1507
1519
|
*/ async ready() {
|
|
@@ -1539,6 +1551,7 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1539
1551
|
/**
|
|
1540
1552
|
* Connects all servers from the cluster and attaches event listeners and handlers
|
|
1541
1553
|
* for all underlying clients and connections.
|
|
1554
|
+
* @deprecated
|
|
1542
1555
|
*
|
|
1543
1556
|
* @throws {Error} if the cluster's version is not a valid version string.
|
|
1544
1557
|
*/ async startup() {
|
|
@@ -1564,6 +1577,7 @@ $620a18299ef8d6fd$export$2e2bcd8739ae039 = $620a18299ef8d6fd$var$ElectrumClient;
|
|
|
1564
1577
|
* Disconnects all servers from the cluster. Removes all event listeners and
|
|
1565
1578
|
* handlers from all underlying clients and connections. This includes all
|
|
1566
1579
|
* active subscriptions, unless retainSubscriptions is set to true.
|
|
1580
|
+
* @deprecated
|
|
1567
1581
|
*
|
|
1568
1582
|
* @param {boolean} retainSubscriptions retain subscription data so they will be restored on reconnection.
|
|
1569
1583
|
*
|