@hive-p2p/browser 1.0.38 → 1.0.40
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/core/node.mjs +8 -6
- package/hive-p2p.min.js +3 -3
- package/libs/ed25519-3.0.0.js +630 -0
- package/libs/hashes-2.0.0.js +397 -0
- package/package.json +1 -1
- package/rendering/visualizer.mjs +2 -2
- package/services/cryptos.mjs +6 -4
package/core/node.mjs
CHANGED
|
@@ -55,12 +55,13 @@ export async function createNode(options = {}) {
|
|
|
55
55
|
|
|
56
56
|
export class Node {
|
|
57
57
|
started = false;
|
|
58
|
-
id; cryptoCodex; verbose;
|
|
59
|
-
/**
|
|
60
|
-
/**
|
|
61
|
-
/**
|
|
62
|
-
/**
|
|
63
|
-
/**
|
|
58
|
+
id; cryptoCodex; verbose;
|
|
59
|
+
/** @type {OfferManager} */ offerManager;
|
|
60
|
+
/** @type {Arbiter} */ arbiter;
|
|
61
|
+
/** @type {PeerStore} */ peerStore;
|
|
62
|
+
/** @type {UnicastMessager} */ messager;
|
|
63
|
+
/** @type {Gossip} */ gossip;
|
|
64
|
+
/** @type {Topologist} */ topologist;
|
|
64
65
|
/** @type {NodeServices | undefined} */ services;
|
|
65
66
|
|
|
66
67
|
/** Initialize a new P2P node instance, use .start() to init topologist
|
|
@@ -142,6 +143,7 @@ export class Node {
|
|
|
142
143
|
// PUBLIC API
|
|
143
144
|
/** @returns {string | undefined} */
|
|
144
145
|
get publicUrl() { return this.services?.publicUrl; }
|
|
146
|
+
get time() { return CLOCK.time; }
|
|
145
147
|
|
|
146
148
|
onMessageData(callback) { this.messager.on('message', callback); }
|
|
147
149
|
onGossipData(callback) { this.gossip.on('gossip', callback); }
|