beamdb 0.9.2 → 0.10.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 +7 -3
- package/beam_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,7 +111,7 @@ await init();
|
|
|
111
111
|
|
|
112
112
|
// Create a BEAM node
|
|
113
113
|
const beam = new Beam(); // in-memory (lost on reload)
|
|
114
|
-
// or: const beam =
|
|
114
|
+
// or: const beam = Beam.new_persistent(); // IndexedDB (survives reload)
|
|
115
115
|
|
|
116
116
|
// Connect to a relay server
|
|
117
117
|
beam.connect("wss://relay.example.com/ws");
|
|
@@ -125,7 +125,7 @@ beam.put_null("users.alice.deleted"); // explicit null
|
|
|
125
125
|
// Read once (returns a Promise)
|
|
126
126
|
const name = await beam.get("users.alice.name"); // "Alice"
|
|
127
127
|
|
|
128
|
-
// Subscribe to updates
|
|
128
|
+
// Subscribe to child updates (Gun.js .on() semantics)
|
|
129
129
|
beam.on("users.alice.name", (value) => {
|
|
130
130
|
console.log("name changed:", value);
|
|
131
131
|
});
|
|
@@ -180,7 +180,7 @@ beam.stop();
|
|
|
180
180
|
import init, { Beam } from "./beam.js";
|
|
181
181
|
await init();
|
|
182
182
|
|
|
183
|
-
const beam =
|
|
183
|
+
const beam = Beam.new_persistent();
|
|
184
184
|
beam.connect("wss://relay.example.com/ws");
|
|
185
185
|
|
|
186
186
|
// Writes survive page reload via IndexedDB
|
|
@@ -244,6 +244,10 @@ BEAM browser nodes are wire-compatible with Gun.js. A BEAM WASM node can:
|
|
|
244
244
|
- Verify Gun.js SEA signatures (P-256 ECDSA, double-hashed)
|
|
245
245
|
- Interoperate with the Gun.js graph format
|
|
246
246
|
|
|
247
|
+
Bidirectional compatibility is verified by Playwright E2E tests
|
|
248
|
+
(`tests/e2e/gun-beam-interop.spec.mjs`) covering Gun.js→BEAM, BEAM→Gun.js,
|
|
249
|
+
and bidirectional convergence scenarios.
|
|
250
|
+
|
|
247
251
|
## Quick Start
|
|
248
252
|
|
|
249
253
|
### Build & Run a Node
|
package/beam_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"David Newman <david.r.newman@proton.me>"
|
|
7
7
|
],
|
|
8
8
|
"description": "BEAM — distributed graph database syncing over WebSocket, WebRTC, and multicast. Successor to rod.",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.10.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|