@hive-p2p/browser 1.0.32 → 1.0.34
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/arbiter.mjs +2 -1
- package/core/config.mjs +1 -7
- package/core/crypto-codex.mjs +2 -1
- package/core/gossip.mjs +2 -1
- package/core/ice-offer-manager.mjs +2 -1
- package/core/node.mjs +3 -1
- package/core/peer-store.mjs +2 -1
- package/core/topologist.mjs +2 -1
- package/hive-p2p.min.js +3 -3
- package/index.mjs +13 -2
- package/package.json +1 -1
- package/services/clock.mjs +1 -1
package/index.mjs
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { Node, createNode } from "./core/node.mjs";
|
|
2
2
|
import { CryptoCodex } from "./core/crypto-codex.mjs";
|
|
3
|
+
import { CLOCK } from "./services/clock.mjs";
|
|
3
4
|
import CONFIG from "./core/config.mjs";
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {Object} HiveP2PNamespace
|
|
8
|
+
* @property {Clock} CLOCK
|
|
9
|
+
* @property {typeof CONFIG} CONFIG
|
|
10
|
+
* @property {typeof Node} Node
|
|
11
|
+
* @property {typeof createNode} createNode
|
|
12
|
+
* @property {typeof CryptoCodex} CryptoCodex
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** @type {HiveP2PNamespace} */
|
|
16
|
+
const HiveP2P = { CLOCK, CONFIG, Node, createNode, CryptoCodex };
|
|
17
|
+
export { CLOCK, CONFIG, Node, createNode, CryptoCodex };
|
|
7
18
|
export default HiveP2P;
|
|
8
19
|
|
|
9
20
|
if (typeof window !== 'undefined') window.HiveP2P = HiveP2P;
|
package/package.json
CHANGED
package/services/clock.mjs
CHANGED
|
@@ -126,7 +126,7 @@ export class Clock {
|
|
|
126
126
|
} catch (error) { if (this.verbose) console.warn('[Clock] Background refine failed:', error); }
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
export const CLOCK = Clock.instance; // Singleton instance
|
|
130
130
|
|
|
131
131
|
export async function CLOCK_TEST() { // DEBUG TEST WHILE RUNNING AS STANDALONE
|
|
132
132
|
const startTime = Date.now();
|