@effectstream/node-sdk 0.100.13 → 0.100.15

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 ADDED
@@ -0,0 +1,70 @@
1
+ # @effectstream/node-sdk
2
+
3
+ An umbrella package that re-exports every EffectStream runtime piece
4
+ (runtime, state machine, sync, database, events, config, utils, concise
5
+ schemas) under stable subpaths. Depend on this if you want a single
6
+ name; import the underlying packages directly if you prefer.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ bun add @effectstream/node-sdk
12
+ # or
13
+ npm install @effectstream/node-sdk
14
+ ```
15
+
16
+ ## Standalone usage
17
+
18
+ Every piece is reachable from one dependency:
19
+
20
+ ```typescript
21
+ import { init, start } from "@effectstream/node-sdk/runtime";
22
+ import { Stm } from "@effectstream/node-sdk/sm";
23
+ import { getConnection } from "@effectstream/node-sdk/db";
24
+ import { ConfigBuilder, ConfigNetworkType } from "@effectstream/node-sdk/config";
25
+ ```
26
+
27
+ The subpaths are thin re-exports — semantics are identical to importing
28
+ from the underlying packages.
29
+
30
+ ## Inside EffectStream
31
+
32
+ A namespace seam, not a runtime piece. Each subpath simply re-exports
33
+ the corresponding package:
34
+
35
+ ```
36
+ @effectstream/node-sdk/runtime → @effectstream/runtime
37
+ @effectstream/node-sdk/sm → @effectstream/sm
38
+ @effectstream/node-sdk/db → @effectstream/db
39
+ …
40
+ ```
41
+
42
+ ## Subpath exports
43
+
44
+ - `@effectstream/node-sdk/runtime` — `init`, `start`, `StartConfig`, `DBMigrations`.
45
+ - `@effectstream/node-sdk/sm` — `Stm`, state-machine types and helpers.
46
+ - `@effectstream/node-sdk/sm/builtin` — built-in primitive type tags (ERC20, ERC721, ERC1155, Cardano transfer/mint-burn/pool-delegation, Midnight generic, NEAR, Avail, Celestia, …).
47
+ - `@effectstream/node-sdk/sm/grammar` — concise/grammar parsing utilities.
48
+ - `@effectstream/node-sdk/sync` — `genSyncProtocols`, per-chain fetcher classes.
49
+ - `@effectstream/node-sdk/db` — `getConnection`, query helpers, snapshot utilities.
50
+ - `@effectstream/node-sdk/db/start-pglite`, `./db/apply-migrations`, `./db/db-wait`, `./db/pgtyped-update`, `./db/version` — DB operations scripts.
51
+ - `@effectstream/node-sdk/db-emulator` — in-memory test DB migration runner.
52
+ - `@effectstream/node-sdk/event-server` — local MQTT broker.
53
+ - `@effectstream/node-sdk/config` — `ConfigBuilder` and friends.
54
+ - `@effectstream/node-sdk/chain-types`, `./precompile`, `./concise`, `./coroutine` — pass-throughs to the same-named SDK packages.
55
+ - `@effectstream/node-sdk/utils`, `./utils/node-env`, `./utils/runtime` — utility helpers.
56
+
57
+ ## Examples
58
+
59
+ Runnable: [`test/examples.test.ts`](./test/examples.test.ts) — verifies
60
+ each subpath resolves.
61
+
62
+ For full working nodes, see:
63
+
64
+ - [`templates/minimal/`](https://github.com/PaimaStudios/paima-engine/tree/main/templates/minimal)
65
+ - [`templates/dice/`](https://github.com/PaimaStudios/paima-engine/tree/main/templates/dice)
66
+
67
+ ## Links
68
+
69
+ - Docs: https://effectstream.github.io/docs/packages/node/node-sdk
70
+ - Source: https://github.com/PaimaStudios/paima-engine/tree/main/packages/node-sdk/node
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effectstream/node-sdk",
3
- "version": "0.100.13",
3
+ "version": "0.100.15",
4
4
  "license": "MIT",
5
5
  "homepage": "https://effectstream.github.io/docs/",
6
6
  "repository": {
@@ -83,18 +83,18 @@
83
83
  }
84
84
  },
85
85
  "dependencies": {
86
- "@effectstream/runtime": "0.100.13",
87
- "@effectstream/sm": "0.100.13",
88
- "@effectstream/sync": "0.100.13",
89
- "@effectstream/db": "0.100.13",
90
- "@effectstream/db-emulator": "0.100.13",
91
- "@effectstream/coroutine": "0.100.13",
92
- "@effectstream/event-server": "0.100.13",
93
- "@effectstream/config": "0.100.13",
94
- "@effectstream/chain-types": "0.100.13",
95
- "@effectstream/precompile": "0.100.13",
96
- "@effectstream/utils": "0.100.13",
97
- "@effectstream/concise": "0.100.13"
86
+ "@effectstream/runtime": "0.100.15",
87
+ "@effectstream/sm": "0.100.15",
88
+ "@effectstream/sync": "0.100.15",
89
+ "@effectstream/db": "0.100.15",
90
+ "@effectstream/db-emulator": "0.100.15",
91
+ "@effectstream/coroutine": "0.100.15",
92
+ "@effectstream/event-server": "0.100.15",
93
+ "@effectstream/config": "0.100.15",
94
+ "@effectstream/chain-types": "0.100.15",
95
+ "@effectstream/precompile": "0.100.15",
96
+ "@effectstream/utils": "0.100.15",
97
+ "@effectstream/concise": "0.100.15"
98
98
  },
99
99
  "description": "Main application node SDK for EffectStream"
100
100
  }
@@ -0,0 +1,25 @@
1
+ // Examples for the README — verify the subpath surface resolves.
2
+
3
+ import { test, expect } from "bun:test";
4
+
5
+ test("README: subpaths resolve to live modules", async () => {
6
+ const runtime = await import("../src/mod.ts");
7
+ expect(typeof runtime.init).toBe("function");
8
+ expect(typeof runtime.start).toBe("function");
9
+ });
10
+
11
+ test("README: state-machine subpath exposes Stm", async () => {
12
+ const sm = await import("../src/sm.ts");
13
+ expect("Stm" in sm).toBe(true);
14
+ });
15
+
16
+ test("README: db subpath exposes getConnection", async () => {
17
+ const db = await import("../src/db.ts");
18
+ expect(typeof db.getConnection).toBe("function");
19
+ });
20
+
21
+ test("README: concise re-export keeps generateStmInput in shape", async () => {
22
+ const concise = await import("../src/concise.ts");
23
+ expect(typeof concise.generateStmInput).toBe("function");
24
+ expect(typeof concise.parseStmInput).toBe("function");
25
+ });