@leofcoin/chain 1.5.40 → 1.5.41
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/exports/browser/chain.js +3038 -10
- package/exports/browser/{index-1d597e6b-2cb0f7af.js → index-7dedefe5-b92d7eab.js} +2 -2
- package/exports/browser/{index-526fd466.js → index-c3bd3090.js} +1 -1
- package/exports/browser/{messages-67e5efa0-a40dcae6.js → messages-7cab2a51-aba26369.js} +2 -2
- package/exports/browser/{node-browser-688295ca.js → node-browser-ccc3409e.js} +107 -83
- package/exports/browser/node-browser.js +2 -2
- package/exports/chain.js +12 -9
- package/exports/node-browser.d.ts +1 -0
- package/exports/node.d.ts +1 -0
- package/exports/node.js +1 -0
- package/exports/version-control.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-
|
|
2
|
-
import './index-
|
|
1
|
+
import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-ccc3409e.js';
|
|
2
|
+
import './index-c3bd3090.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @params {String} network
|
|
@@ -12630,4 +12630,4 @@ class RawTransactionMessage extends FormatInterface {
|
|
|
12630
12630
|
}
|
|
12631
12631
|
}
|
|
12632
12632
|
|
|
12633
|
-
export { BigNumber as B, ContractMessage as C, Logger as L, RawTransactionMessage as R, TransactionMessage as T, ValidatorMessage as V, arrayify as a, isBytes as b, BlockMessage as c, BWMessage as d, BWRequestMessage as e, hexZeroPad as h, isBigNumberish as i, toBase58 as t, version as v };
|
|
12633
|
+
export { BigNumber as B, ContractMessage as C, Logger as L, RawTransactionMessage as R, TransactionMessage as T, ValidatorMessage as V, arrayify as a, isBytes as b, BlockMessage as c, BWMessage as d, BWRequestMessage as e, getDefaultExportFromCjs as g, hexZeroPad as h, isBigNumberish as i, toBase58 as t, version as v };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContractMessage, T as TransactionMessage, c as BlockMessage, d as BWMessage, e as BWRequestMessage, V as ValidatorMessage } from './index-
|
|
1
|
+
import { C as ContractMessage, T as TransactionMessage, c as BlockMessage, d as BWMessage, e as BWRequestMessage, V as ValidatorMessage } from './index-c3bd3090.js';
|
|
2
2
|
|
|
3
3
|
var nodeConfig = async (config = {
|
|
4
4
|
network: 'leofcoin:peach',
|
|
@@ -27178,7 +27178,7 @@ class Identity {
|
|
|
27178
27178
|
this.selectedAccount = new TextDecoder().decode(selected);
|
|
27179
27179
|
}
|
|
27180
27180
|
else {
|
|
27181
|
-
const importee = await import(/* webpackChunkName: "generate-account" */ './index-
|
|
27181
|
+
const importee = await import(/* webpackChunkName: "generate-account" */ './index-7dedefe5-b92d7eab.js');
|
|
27182
27182
|
const { identity, accounts } = await importee.default(password, this.network);
|
|
27183
27183
|
await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
|
|
27184
27184
|
await globalThis.walletStore.put('version', String(1));
|
|
@@ -27254,17 +27254,18 @@ class Peernet {
|
|
|
27254
27254
|
autoStart = true;
|
|
27255
27255
|
#starting = false;
|
|
27256
27256
|
#started = false;
|
|
27257
|
-
#connections = {};
|
|
27258
27257
|
requestProtos = {};
|
|
27259
27258
|
_messageHandler;
|
|
27260
27259
|
_peerHandler;
|
|
27261
27260
|
protos;
|
|
27261
|
+
version;
|
|
27262
27262
|
/**
|
|
27263
27263
|
* @access public
|
|
27264
27264
|
* @param {Object} options
|
|
27265
27265
|
* @param {String} options.network - desired network
|
|
27266
27266
|
* @param {String} options.stars - star list for selected network (these should match, don't mix networks)
|
|
27267
27267
|
* @param {String} options.root - path to root directory
|
|
27268
|
+
* @param {String} options.version - path to root directory
|
|
27268
27269
|
* @param {String} options.storePrefix - prefix for datatores (lfc)
|
|
27269
27270
|
*
|
|
27270
27271
|
* @return {Promise} instance of Peernet
|
|
@@ -27279,6 +27280,7 @@ class Peernet {
|
|
|
27279
27280
|
this.network = options.network || 'leofcoin';
|
|
27280
27281
|
this.autoStart = options.autoStart === undefined ? true : options.autoStart;
|
|
27281
27282
|
this.stars = options.stars;
|
|
27283
|
+
this.version = options.version;
|
|
27282
27284
|
const parts = this.network.split(':');
|
|
27283
27285
|
this.networkVersion = options.networkVersion || parts.length > 1 ? parts[1] : 'mainnet';
|
|
27284
27286
|
if (!options.storePrefix)
|
|
@@ -27343,13 +27345,10 @@ class Peernet {
|
|
|
27343
27345
|
* @return {Array} peerId
|
|
27344
27346
|
*/
|
|
27345
27347
|
get peers() {
|
|
27346
|
-
return Object.entries(this
|
|
27348
|
+
return Object.entries(this.client?.connections);
|
|
27347
27349
|
}
|
|
27348
27350
|
get connections() {
|
|
27349
|
-
return
|
|
27350
|
-
}
|
|
27351
|
-
get peerEntries() {
|
|
27352
|
-
return Object.values(this.#connections);
|
|
27351
|
+
return this.client?.connections || {};
|
|
27353
27352
|
}
|
|
27354
27353
|
/**
|
|
27355
27354
|
* @return {String} id - peerId
|
|
@@ -27370,7 +27369,7 @@ class Peernet {
|
|
|
27370
27369
|
this.root = options.root;
|
|
27371
27370
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
27372
27371
|
// FolderMessageResponse
|
|
27373
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-
|
|
27372
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-7cab2a51-aba26369.js');
|
|
27374
27373
|
/**
|
|
27375
27374
|
* proto Object containing protos
|
|
27376
27375
|
* @type {Object}
|
|
@@ -27404,55 +27403,58 @@ class Peernet {
|
|
|
27404
27403
|
await this.identity.load(password);
|
|
27405
27404
|
this._peerHandler = new PeerDiscovery(this.id);
|
|
27406
27405
|
this.peerId = this.id;
|
|
27407
|
-
this.addRequestHandler('handshake', () => {
|
|
27408
|
-
|
|
27409
|
-
|
|
27410
|
-
|
|
27411
|
-
})
|
|
27412
|
-
pubsub.subscribe('peer:discovered', async (peer) => {
|
|
27413
|
-
|
|
27414
|
-
|
|
27415
|
-
|
|
27416
|
-
|
|
27417
|
-
|
|
27418
|
-
|
|
27419
|
-
|
|
27420
|
-
|
|
27421
|
-
|
|
27422
|
-
|
|
27423
|
-
|
|
27424
|
-
|
|
27425
|
-
|
|
27426
|
-
|
|
27427
|
-
|
|
27428
|
-
|
|
27429
|
-
|
|
27430
|
-
|
|
27431
|
-
|
|
27432
|
-
|
|
27433
|
-
}
|
|
27434
|
-
|
|
27406
|
+
// this.addRequestHandler('handshake', () => {
|
|
27407
|
+
// return new peernet.protos['peernet-response']({
|
|
27408
|
+
// response: { peerId: this.id }
|
|
27409
|
+
// })
|
|
27410
|
+
// })
|
|
27411
|
+
// pubsub.subscribe('peer:discovered', async (peer) => {
|
|
27412
|
+
// // console.log(peer);
|
|
27413
|
+
// if (this.requestProtos['version'] && !peer.version) {
|
|
27414
|
+
// let data = await new globalThis.peernet.protos['peernet-request']({
|
|
27415
|
+
// request: 'version'
|
|
27416
|
+
// })
|
|
27417
|
+
// let node = await globalThis.peernet.prepareMessage(data)
|
|
27418
|
+
// let response = await peer.request(node.encoded)
|
|
27419
|
+
// response = await new globalThis.peernet.protos['peernet-response'](new Uint8Array(Object.values(response)))
|
|
27420
|
+
// peer.version = response.decoded.response.version
|
|
27421
|
+
// }
|
|
27422
|
+
// if (!peer.peerId) {
|
|
27423
|
+
// let data = await new globalThis.peernet.protos['peernet-request']({
|
|
27424
|
+
// request: 'handshake'
|
|
27425
|
+
// })
|
|
27426
|
+
// let node = await globalThis.peernet.prepareMessage(data)
|
|
27427
|
+
// let response = await peer.request(node.encoded)
|
|
27428
|
+
// response = await new globalThis.peernet.protos['peernet-response'](new Uint8Array(Object.values(response)))
|
|
27429
|
+
// // todo: response.decoded should be the response and not response.peerId
|
|
27430
|
+
// // todo: ignore above and remove discover completly
|
|
27431
|
+
// response.decoded.response.peerId
|
|
27432
|
+
// }
|
|
27433
|
+
// this.connections[peer.peerId] = peer
|
|
27434
|
+
// pubsub.publish('peer:connected', peer)
|
|
27435
|
+
// todo: cleanup discovered
|
|
27436
|
+
// })
|
|
27437
|
+
// pubsub.subscribe('peer:left', this.#peerLeft.bind(this))
|
|
27435
27438
|
/**
|
|
27436
27439
|
* converts data -> message -> proto
|
|
27437
27440
|
* @see DataHandler
|
|
27438
27441
|
*/
|
|
27439
27442
|
pubsub.subscribe('peer:data', dataHandler);
|
|
27440
|
-
|
|
27441
|
-
|
|
27442
|
-
|
|
27443
|
-
else {
|
|
27444
|
-
|
|
27445
|
-
|
|
27446
|
-
|
|
27447
|
-
|
|
27448
|
-
|
|
27449
|
-
|
|
27450
|
-
|
|
27451
|
-
|
|
27452
|
-
|
|
27453
|
-
|
|
27454
|
-
|
|
27455
|
-
}
|
|
27443
|
+
// // todo: remove below, already handles in the swarm
|
|
27444
|
+
// if (globalThis.navigator) {
|
|
27445
|
+
// globalThis.addEventListener('beforeunload', async () => this.client.close())
|
|
27446
|
+
// } else {
|
|
27447
|
+
// process.on('SIGTERM', async () => {
|
|
27448
|
+
// process.stdin.resume()
|
|
27449
|
+
// try {
|
|
27450
|
+
// await this.client.close()
|
|
27451
|
+
// } catch (error) {
|
|
27452
|
+
// // @ts-ignore
|
|
27453
|
+
// await this.client.close()
|
|
27454
|
+
// }
|
|
27455
|
+
// process.exit()
|
|
27456
|
+
// })
|
|
27457
|
+
// }
|
|
27456
27458
|
if (this.autoStart)
|
|
27457
27459
|
await this.start();
|
|
27458
27460
|
return this;
|
|
@@ -27465,6 +27467,7 @@ class Peernet {
|
|
|
27465
27467
|
#peerId;
|
|
27466
27468
|
#connections = {};
|
|
27467
27469
|
#stars = {};
|
|
27470
|
+
#connectEvent = 'peer:connected';
|
|
27468
27471
|
id;
|
|
27469
27472
|
networkVersion;
|
|
27470
27473
|
starsConfig;
|
|
@@ -27484,18 +27487,32 @@ class Peernet {
|
|
|
27484
27487
|
getPeer(peerId) {
|
|
27485
27488
|
return this.#connections[peerId];
|
|
27486
27489
|
}
|
|
27487
|
-
|
|
27490
|
+
/**
|
|
27491
|
+
*
|
|
27492
|
+
* @param options {object}
|
|
27493
|
+
* @param options.peerId {string}
|
|
27494
|
+
* @param options.networkVersion {string}
|
|
27495
|
+
* @param options.version {string}
|
|
27496
|
+
* @param options.stars {string[]}
|
|
27497
|
+
* @param options.connectEvent {string} defaults to peer:connected, can be renamed to handle different protocols, like peer:discovered (setup peer props before fireing the connect event)
|
|
27498
|
+
*/
|
|
27499
|
+
constructor(options) {
|
|
27500
|
+
const { peerId, networkVersion, version, connectEvent, stars } = {
|
|
27501
|
+
...defaultOptions,
|
|
27502
|
+
...options
|
|
27503
|
+
};
|
|
27488
27504
|
this.#peerId = peerId;
|
|
27489
27505
|
this.networkVersion = networkVersion;
|
|
27490
27506
|
this.version = version;
|
|
27491
|
-
this
|
|
27492
|
-
}
|
|
27493
|
-
async _init(stars = []) {
|
|
27507
|
+
this.#connectEvent = connectEvent;
|
|
27494
27508
|
this.starsConfig = stars;
|
|
27509
|
+
this._init();
|
|
27510
|
+
}
|
|
27511
|
+
async _init() {
|
|
27495
27512
|
// reconnectJob()
|
|
27496
27513
|
if (!globalThis.RTCPeerConnection)
|
|
27497
27514
|
globalThis.wrtc = (await import('./browser-2c73e2ef-2c73e2ef.js').then(function (n) { return n.b; })).default;
|
|
27498
|
-
for (const star of
|
|
27515
|
+
for (const star of this.starsConfig) {
|
|
27499
27516
|
try {
|
|
27500
27517
|
const client = new SocketRequestClient(star, this.networkVersion);
|
|
27501
27518
|
this.#stars[star] = await client.init();
|
|
@@ -27506,7 +27523,8 @@ class Peernet {
|
|
|
27506
27523
|
});
|
|
27507
27524
|
}
|
|
27508
27525
|
catch (e) {
|
|
27509
|
-
if (
|
|
27526
|
+
if (this.starsConfig.indexOf(star) === this.starsConfig.length - 1 &&
|
|
27527
|
+
!this.socketClient)
|
|
27510
27528
|
throw new Error(`No star available to connect`);
|
|
27511
27529
|
}
|
|
27512
27530
|
}
|
|
@@ -27632,7 +27650,7 @@ class Peernet {
|
|
|
27632
27650
|
};
|
|
27633
27651
|
#peerConnect = (peer) => {
|
|
27634
27652
|
globalThis.debug(`${peer.peerId} connected`);
|
|
27635
|
-
globalThis.pubsub.publish(
|
|
27653
|
+
globalThis.pubsub.publish(this.#connectEvent, peer.peerId);
|
|
27636
27654
|
};
|
|
27637
27655
|
#noticeMessage = (message, id) => {
|
|
27638
27656
|
if (globalThis.pubsub.subscribers[id]) {
|
|
@@ -27682,18 +27700,24 @@ class Peernet {
|
|
|
27682
27700
|
* @type {PeernetClient}
|
|
27683
27701
|
*/
|
|
27684
27702
|
console.log(this.stars);
|
|
27685
|
-
this.client = new importee.default(
|
|
27703
|
+
this.client = new importee.default({
|
|
27704
|
+
peerId: this.id,
|
|
27705
|
+
networkVersion: this.networkVersion,
|
|
27706
|
+
version: this.version,
|
|
27707
|
+
stars: this.stars
|
|
27708
|
+
});
|
|
27686
27709
|
this.#started = true;
|
|
27687
27710
|
this.#starting = false;
|
|
27688
27711
|
}
|
|
27689
|
-
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
|
|
27693
|
-
|
|
27694
|
-
|
|
27695
|
-
|
|
27696
|
-
}
|
|
27712
|
+
// todo: remove, handled in swarm now
|
|
27713
|
+
// #peerLeft(peer: SwarmPeer) {
|
|
27714
|
+
// for (const [id, _peer] of Object.entries(this.connections)) {
|
|
27715
|
+
// if (_peer.id === peer.id && this.connections[id] && !this.connections[id].connected) {
|
|
27716
|
+
// delete this.connections[id]
|
|
27717
|
+
// this.removePeer(_peer)
|
|
27718
|
+
// }
|
|
27719
|
+
// }
|
|
27720
|
+
// }
|
|
27697
27721
|
addRequestHandler(name, method) {
|
|
27698
27722
|
this.requestProtos[name] = method;
|
|
27699
27723
|
}
|
|
@@ -27797,7 +27821,7 @@ class Peernet {
|
|
|
27797
27821
|
this.dht.addProvider(peerInfo, proto.decoded.hash);
|
|
27798
27822
|
};
|
|
27799
27823
|
let walks = [];
|
|
27800
|
-
for (const [peerId, peer] of Object.entries(this
|
|
27824
|
+
for (const [peerId, peer] of Object.entries(this.connections)) {
|
|
27801
27825
|
if (peerId !== this.id) {
|
|
27802
27826
|
walks.push(walk(peer, peerId));
|
|
27803
27827
|
}
|
|
@@ -27864,7 +27888,7 @@ class Peernet {
|
|
|
27864
27888
|
if (!closestPeer || !closestPeer.id)
|
|
27865
27889
|
return this.requestData(hash, store?.name || store);
|
|
27866
27890
|
const id = closestPeer.id;
|
|
27867
|
-
const peer = this
|
|
27891
|
+
const peer = this.connections[id];
|
|
27868
27892
|
if (peer?.connected) {
|
|
27869
27893
|
let data = await new globalThis.peernet.protos['peernet-data']({
|
|
27870
27894
|
hash,
|
|
@@ -27878,7 +27902,7 @@ class Peernet {
|
|
|
27878
27902
|
const promises = [];
|
|
27879
27903
|
const providers = await this.providersFor(hash, store);
|
|
27880
27904
|
for (const provider of Object.values(providers)) {
|
|
27881
|
-
const peer = this
|
|
27905
|
+
const peer = this.connections[provider.id];
|
|
27882
27906
|
if (peer)
|
|
27883
27907
|
promises.push(peer.request(node.encoded));
|
|
27884
27908
|
}
|
|
@@ -28092,7 +28116,7 @@ class Peernet {
|
|
|
28092
28116
|
// globalSub.publish(topic, data)
|
|
28093
28117
|
const id = Math.random().toString(36).slice(-12);
|
|
28094
28118
|
data = await new globalThis.peernet.protos['peernet-ps']({ data, topic });
|
|
28095
|
-
for (const [peerId, peer] of Object.entries(this
|
|
28119
|
+
for (const [peerId, peer] of Object.entries(this.connections)) {
|
|
28096
28120
|
if (peerId !== this.id) {
|
|
28097
28121
|
const node = await this.prepareMessage(data);
|
|
28098
28122
|
this.sendMessage(peer, id, node.encoded);
|
|
@@ -28114,16 +28138,15 @@ class Peernet {
|
|
|
28114
28138
|
}
|
|
28115
28139
|
async removePeer(peer) {
|
|
28116
28140
|
console.log('removepeer', peer.id);
|
|
28117
|
-
|
|
28118
|
-
await this.client.
|
|
28119
|
-
if (this.client.peers[id]) {
|
|
28120
|
-
|
|
28121
|
-
|
|
28122
|
-
|
|
28123
|
-
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
}
|
|
28141
|
+
peer.id;
|
|
28142
|
+
// await this.client.connections(peer)
|
|
28143
|
+
// if (this.client.peers[id]) {
|
|
28144
|
+
// for (const connection of Object.keys(this.client.peers[id])) {
|
|
28145
|
+
// // if (this.client.peers[id][connection].connected === false) delete this.client.peers[id][connection]
|
|
28146
|
+
// // @ts-ignore
|
|
28147
|
+
// if (this.client.peers[id][connection].connected) return this.client.emit('peerconnect', connection)
|
|
28148
|
+
// }
|
|
28149
|
+
// }
|
|
28127
28150
|
}
|
|
28128
28151
|
get Buffer() {
|
|
28129
28152
|
return Buffer;
|
|
@@ -28165,6 +28188,7 @@ class Node {
|
|
|
28165
28188
|
network: 'leofcoin:peach',
|
|
28166
28189
|
networkName: 'leofcoin:peach',
|
|
28167
28190
|
networkVersion: 'peach',
|
|
28191
|
+
version: '1.2.0',
|
|
28168
28192
|
stars: networks.leofcoin.peach.stars
|
|
28169
28193
|
}, password) {
|
|
28170
28194
|
this.#node = globalThis.Peernet
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { N as default } from './node-browser-
|
|
2
|
-
import './index-
|
|
1
|
+
export { N as default } from './node-browser-ccc3409e.js';
|
|
2
|
+
import './index-c3bd3090.js';
|
package/exports/chain.js
CHANGED
|
@@ -2,6 +2,7 @@ import { formatBytes, BigNumber, formatUnits, parseUnits } from '@leofcoin/utils
|
|
|
2
2
|
import { TransactionMessage, BlockMessage, ContractMessage, BWMessage, BWRequestMessage } from '@leofcoin/messages';
|
|
3
3
|
import addresses, { contractFactory, nativeToken, validators, nameService } from '@leofcoin/addresses';
|
|
4
4
|
import { calculateFee, createContractMessage, signTransaction, contractFactoryMessage, nativeTokenMessage, validatorsMessage, nameServiceMessage } from '@leofcoin/lib';
|
|
5
|
+
import semver from 'semver';
|
|
5
6
|
import { randombytes } from '@leofcoin/crypto';
|
|
6
7
|
import EasyWorker from '@vandeurenglenn/easy-worker';
|
|
7
8
|
import { ContractDeploymentError, ExecutionError, isResolveError, ResolveError, isExecutionError } from '@leofcoin/errors';
|
|
@@ -1106,9 +1107,13 @@ class VersionControl extends State {
|
|
|
1106
1107
|
constructor(config) {
|
|
1107
1108
|
super(config);
|
|
1108
1109
|
}
|
|
1110
|
+
#currentVersion;
|
|
1111
|
+
async #setCurrentVersion() {
|
|
1112
|
+
this.version = this.#currentVersion;
|
|
1113
|
+
await globalThis.chainStore.put('version', this.version);
|
|
1114
|
+
}
|
|
1109
1115
|
async init() {
|
|
1110
1116
|
super.init && (await super.init());
|
|
1111
|
-
console.log('init');
|
|
1112
1117
|
try {
|
|
1113
1118
|
const version = await globalThis.chainStore.get('version');
|
|
1114
1119
|
this.version = new TextDecoder().decode(version);
|
|
@@ -1119,18 +1124,16 @@ class VersionControl extends State {
|
|
|
1119
1124
|
* in the future we want newer nodes to handle the new changes and still confirm old version transactions
|
|
1120
1125
|
* unless there is a security issue!
|
|
1121
1126
|
*/
|
|
1122
|
-
if (this.version
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
await globalThis.chainStore.put('version', this.version);
|
|
1127
|
+
if (semver.compare(this.#currentVersion, this.version) === 1) {
|
|
1128
|
+
// await this.clearAll()
|
|
1129
|
+
this.#setCurrentVersion();
|
|
1126
1130
|
}
|
|
1127
1131
|
// if (version)
|
|
1128
1132
|
}
|
|
1129
1133
|
catch (e) {
|
|
1130
1134
|
console.log(e);
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
await globalThis.chainStore.put('version', this.version);
|
|
1135
|
+
// await this.clearAll()
|
|
1136
|
+
this.#setCurrentVersion();
|
|
1134
1137
|
}
|
|
1135
1138
|
}
|
|
1136
1139
|
}
|
|
@@ -1469,7 +1472,7 @@ class Chain extends VersionControl {
|
|
|
1469
1472
|
// }
|
|
1470
1473
|
// }, [])
|
|
1471
1474
|
const peers = {};
|
|
1472
|
-
for (const entry of globalThis.peernet.
|
|
1475
|
+
for (const entry of globalThis.peernet.peers) {
|
|
1473
1476
|
peers[entry[0]] = entry[1];
|
|
1474
1477
|
}
|
|
1475
1478
|
for (const validator of Object.keys(validators)) {
|
package/exports/node.d.ts
CHANGED
package/exports/node.js
CHANGED