@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/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
- const HiveP2P = { Node, createNode, CryptoCodex, CONFIG };
6
- export { Node, createNode, CryptoCodex, CONFIG };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hive-p2p/browser",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -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();