@moyodb/sdk 0.0.0-alpha.3 → 1.0.1

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.
Files changed (40) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +10 -2
  3. package/dist/LICENSE +202 -0
  4. package/dist/assets/worker-KDc8Khl_.js +4 -0
  5. package/dist/assets/worker-KDc8Khl_.js.map +1 -0
  6. package/dist/change-events.d.ts.map +1 -1
  7. package/dist/codec.d.ts.map +1 -1
  8. package/dist/compression.d.ts.map +1 -1
  9. package/dist/engine/README.md +26 -9
  10. package/dist/engine/moyodb_engine.d.ts +125 -54
  11. package/dist/engine/moyodb_engine.js +935 -391
  12. package/dist/engine/moyodb_engine_bg.wasm +0 -0
  13. package/dist/engine/moyodb_engine_bg.wasm.d.ts +57 -47
  14. package/dist/engine/package.json +3 -3
  15. package/dist/engine/snippets/moyodb-engine-8ebe6af0cc2e81b7/js/opfs_shim.js +602 -0
  16. package/dist/engine/snippets/moyodb-engine-cff0a0e2441a7a8f/js/opfs_shim.js +192 -81
  17. package/dist/errors.d.ts +8 -0
  18. package/dist/errors.d.ts.map +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/indexing.d.ts +8 -0
  21. package/dist/indexing.d.ts.map +1 -1
  22. package/dist/moyodb-sdk.js +2034 -1985
  23. package/dist/moyodb-sdk.js.map +1 -1
  24. package/dist/registry.d.ts +3 -1
  25. package/dist/registry.d.ts.map +1 -1
  26. package/dist/subscriptions.d.ts.map +1 -1
  27. package/dist/types.d.ts +29 -1
  28. package/dist/types.d.ts.map +1 -1
  29. package/dist/worker-api.d.ts +50 -37
  30. package/dist/worker-api.d.ts.map +1 -1
  31. package/dist/worker-client.d.ts +13 -2
  32. package/dist/worker-client.d.ts.map +1 -1
  33. package/dist/worker-protocol.d.ts +42 -3
  34. package/dist/worker-protocol.d.ts.map +1 -1
  35. package/dist/worker-server.d.ts.map +1 -1
  36. package/package.json +13 -9
  37. package/dist/assets/worker-CaOzbBz1.js +0 -2351
  38. package/dist/assets/worker-CaOzbBz1.js.map +0 -1
  39. package/dist/moyodb-sdk.umd.cjs +0 -2
  40. package/dist/moyodb-sdk.umd.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"change-events.d.ts","sourceRoot":"","sources":["../src/change-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,QAAQ,EAAE,CAAC;CACvB;AACD,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,EAAE,CAAC;CAC5B;AACD,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;CACd;AACD,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;CACd;AACD,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;CACd;AACD,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,aAAa,GAAG,cAAc,CAAC;AAY3G,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAShF"}
1
+ {"version":3,"file":"change-events.d.ts","sourceRoot":"","sources":["../src/change-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,cAAc;IAC3B,KAAK,EAA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qDrB;AACD,wBAAsB,2BAA2B,CAC7C,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,iBAAiB,GAC/B,OAAO,CAAC,UAAU,CAAC,CAMrB;AACD,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAmCzF"}
1
+ {"version":3,"file":"compression.d.ts","sourceRoot":"","sources":["../src/compression.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,KAAK,CAAC;AAUxD,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAoMtD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAY1E;AACD,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAmBnH;AACD,wBAAsB,sBAAsB,CACxC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE;IACL,MAAM,EAAE,OAAO,CAAC;CACnB,GACF,OAAO,CAAC,UAAU,CAAC,CAqDrB;AACD,wBAAsB,2BAA2B,CAC7C,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,iBAAiB,GAC/B,OAAO,CAAC,UAAU,CAAC,CAOrB;AACD,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAmCzF"}
@@ -19,12 +19,12 @@ Experimental Rust/WASM transactional key-value storage engine for browser apps.
19
19
 
20
20
  It provides ordered byte keys, range scans, snapshots, TTL, recovery checks, and a TypeScript SDK that talks to a dedicated Worker-backed runtime over OPFS.
21
21
 
22
- > Status: **alpha**. MoyoDB is useful for experiments and early integrations. Do not use it for production data without your own durability and compatibility validation.
22
+ > Release: **1.0.0**. MoyoDB is experimental. Validate durability and compatibility for your workload before using it for production data.
23
23
 
24
24
  ## Quick start
25
25
 
26
26
  ```bash
27
- npm install @moyodb/sdk@alpha
27
+ npm install @moyodb/sdk@1.0.1
28
28
  ```
29
29
 
30
30
  ```ts
@@ -40,13 +40,30 @@ console.log(value ? utf8Decode(value) : null);
40
40
  await db.close();
41
41
  ```
42
42
 
43
- The current alpha package is `@moyodb/sdk@0.0.0-alpha.3`. The human-facing project name is **MoyoDB**.
43
+ ## Verification
44
+
45
+ \- Lean checks run with all built-in/extra linters, Heron, JunkLinter and the full Batteries set; every finding fails CI. See [strict Lean linting](docs/LEAN_LINTING.md) and run `npm run lint:lean` locally.\
46
+ \- `proofs/moyodb_proofs` models abstract KV/WAL/transaction semantics and independently checks real inline B-tree pages. The [B-tree checker](docs/LEAN_BTREE_CHECKER.md) has kernel-checked certificates for structure, contents and routing for every byte-string key; CI compares real Rust mutations, lookup/scan and retained COW roots with Lean-computed states and rejects two production mutation witnesses. This proves properties of the Lean checker and checks concrete Rust executions; the Rust engine, checksums, overflow, OPFS I/O, flush ordering and power loss remain outside those proofs.\
47
+ \- The traces exported to `proofs/artifacts` are replayed against the Rust engine by `crates/engine/tests/proof_artifacts.rs` as conformance scenarios.\
48
+ \- Crash behavior is covered by tests: `crates/engine/tests/crash_matrix.rs`, `crates/engine/tests/fault_injection.rs` (failed and short writes plus torn flushes at every WAL, main-file, and superblock operation during commit, checkpoint, and recovery), and `crates/engine/js/opfs_shim.test.mjs` for control-file publication.
44
49
 
45
50
  ## Limitations
46
51
 
47
- - Alpha software; storage format and SDK API may still change.
48
- - Browser-only runtime; there is no Node.js persistence API.
49
- - Requires OPFS and Worker-side sync access handles.
50
- - One active owner per database and one write transaction at a time.
51
- - Raw byte keys and values; no SQL/query planner.
52
- - No cloud sync, multi-tab concurrent writers, SharedWorker runtime, or IndexedDB fallback.
52
+ \- Experimental software; storage format and SDK API may still change.\
53
+ \- Browser-only runtime; there is no Node.js persistence API.\
54
+ \- Requires OPFS and Worker-side sync access handles.\
55
+ \- One active owner per database and one write transaction at a time.\
56
+ \- Raw byte keys and values; no SQL/query planner.\
57
+ \- No cloud sync, multi-tab concurrent writers, SharedWorker runtime, or IndexedDB fallback.
58
+
59
+ ## License
60
+
61
+ Copyright © 2026 Eluvane. The licensor is Eluvane; licensing requests go to [keiko1337@proton.me](mailto:keiko1337@proton.me). The official repository is [eluvane/MoyoDB](https://github.com/eluvane/MoyoDB).
62
+
63
+ MoyoDB **1.0.0** is the first release covered by the [Mother of Licenses 1.0](LICENSE) (`LicenseRef-MoL-1.0`). Earlier published releases retain their original licenses. Third-party dependencies and any separately licensed material retain their own licenses and notices.
64
+
65
+ MoL permits royalty-free use, including commercial use of unmodified code or Authorized Builds inside your own products. Private modifications and production patches are permitted for your own internal use, provided the modified code is not distributed, published, made available to third parties, or used to create a standalone or competing product or provide Project-as-a-Service. The upstream contribution workflow in Section 6 remains permitted. Other publication or distribution of modified versions, independent forks, resale of MoyoDB itself, and hosting MoyoDB itself as a service require written permission. MoyoDB under MoL is source-available, not OSI-approved open source.
66
+
67
+ ## Contributing
68
+
69
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) and the license before submitting changes. Contributions must include explicit acceptance of the contribution and patent terms in Sections 9 and 10.
@@ -4,41 +4,90 @@
4
4
  export class WasmEngine {
5
5
  free(): void;
6
6
  [Symbol.dispose](): void;
7
+ /**
8
+ * Closes without a checkpoint. Used for an engine whose files are
9
+ * about to be replaced or whose memory is not trusted.
10
+ */
11
+ abandon(): void;
7
12
  apply_batch(tx_id: bigint, store: string, ops: any): any;
8
- apply_batch_packed(tx_id: bigint, store: string, ops: Uint8Array): any;
13
+ /**
14
+ * Returns one byte per operation in input order. For puts, 1 means
15
+ * the key existed before the write. For deletes, 1 means it was deleted.
16
+ */
17
+ apply_batch_packed(tx_id: bigint, store: string, ops: Uint8Array): Uint8Array;
9
18
  begin_tx(mode: string): bigint;
19
+ change_feed_policy(): any;
10
20
  changes_since(tx_id: bigint, options: any): any;
21
+ checkpoint(): void;
11
22
  clear_store(tx_id: bigint, name: string): void;
23
+ /**
24
+ * Checkpoints a healthy engine and closes it. Releases the binding
25
+ * handle even on error so a retry cannot reuse a partially closed engine.
26
+ */
12
27
  close(): void;
13
28
  commit_tx(tx_id: bigint): bigint;
29
+ /**
30
+ * Streams this database into a new, empty target generation.
31
+ * Returns the target txid. The caller must activate the generation.
32
+ */
33
+ compact_into(target: WasmEngine): bigint;
34
+ /**
35
+ * Omits the named internal stores during a rebuild. Compaction
36
+ * also omits the change log and retains the other stores.
37
+ */
38
+ compact_into_skipping_stores(target: WasmEngine, skip_stores: any): bigint;
14
39
  create_store(tx_id: bigint, name: string, options: any): void;
15
40
  delete(tx_id: bigint, store: string, key: Uint8Array): boolean;
16
41
  delete_many(tx_id: bigint, store: string, keys: any): any;
17
- delete_many_packed(tx_id: bigint, store: string, keys: Uint8Array): any;
42
+ /**
43
+ * Returns one byte per key: 1 if the key existed and was deleted.
44
+ */
45
+ delete_many_packed(tx_id: bigint, store: string, keys: Uint8Array): Uint8Array;
18
46
  drop_store(tx_id: bigint, name: string): void;
19
47
  export_snapshot(): Uint8Array;
20
48
  get(tx_id: bigint, store: string, key: Uint8Array): any;
21
49
  get_many(tx_id: bigint, store: string, keys: any): any;
22
- get_many_packed(tx_id: bigint, store: string, keys: Uint8Array): any;
50
+ /**
51
+ * Returns packed values as
52
+ * `u32 count | count x u32 length (u32::MAX = missing) | bytes`.
53
+ * All integers are little-endian.
54
+ */
55
+ get_many_packed(tx_id: bigint, store: string, keys: Uint8Array): Uint8Array;
23
56
  get_schema_version(): bigint;
24
57
  has(tx_id: bigint, store: string, key: Uint8Array): boolean;
58
+ /**
59
+ * Checks existence using one TTL timestamp without loading value bodies.
60
+ */
61
+ has_many(tx_id: bigint, store: string, keys: any): any;
62
+ health(): any;
25
63
  import_snapshot(data: Uint8Array): bigint;
26
64
  list_store_configs(): any;
27
65
  list_stores(): any;
66
+ needs_recovery(): boolean;
28
67
  constructor();
29
- open(name: string, options: any): Promise<void>;
30
68
  openGeneration(name: string, generation_name: string, options: any): Promise<void>;
31
- put(tx_id: bigint, store: string, key: Uint8Array, value: Uint8Array, options: any): void;
69
+ open(name: string, options: any): Promise<void>;
70
+ put(tx_id: bigint, store: string, key: Uint8Array, value: Uint8Array, options: any): boolean;
32
71
  put_many(tx_id: bigint, store: string, entries: any, options: any): any;
33
- put_many_packed(tx_id: bigint, store: string, entries: Uint8Array, options: any): any;
72
+ /**
73
+ * Returns one byte per entry: 1 if the key existed before the put.
74
+ */
75
+ put_many_packed(tx_id: bigint, store: string, entries: Uint8Array, options: any): Uint8Array;
76
+ recover(): any;
34
77
  reset(): bigint;
35
78
  rollback_tx(tx_id: bigint): void;
36
79
  scan(tx_id: bigint, store: string, range: any): any;
80
+ set_change_feed_policy(tx_id: bigint, policy: any): void;
37
81
  set_failpoint(failpoint: any): void;
38
82
  set_schema_version(tx_id: bigint, version: bigint): void;
39
83
  stats(): any;
40
84
  }
41
85
 
86
+ /**
87
+ * Returns `"debug"` or `"release"` for the loaded WASM build.
88
+ */
89
+ export function buildProfile(): string;
90
+
42
91
  export function cleanupInactiveEntries(name: string): Promise<void>;
43
92
 
44
93
  export function dbDirectorySize(name: string): Promise<number>;
@@ -47,61 +96,83 @@ export function deleteDB(name: string): Promise<void>;
47
96
 
48
97
  export function prepareRebuildTarget(name: string): Promise<any>;
49
98
 
50
- export function swapActiveGeneration(name: string, generation_name: string): Promise<void>;
99
+ /**
100
+ * Returns the active generation, or `null` for the legacy layout.
101
+ * A corrupt control file permits legacy fallback only while legacy data
102
+ * files remain. Otherwise it is an error.
103
+ */
104
+ export function readActiveGeneration(name: string): Promise<any>;
105
+
106
+ /**
107
+ * Publishes `generation_name` only if the active generation matches
108
+ * `expected_current`. `None` requires no active generation.
109
+ * Verifies the written control file before returning.
110
+ */
111
+ export function swapActiveGeneration(name: string, generation_name: string, expected_current?: string | null): Promise<void>;
51
112
 
52
113
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
53
114
 
54
115
  export interface InitOutput {
55
116
  readonly memory: WebAssembly.Memory;
56
117
  readonly __wbg_wasmengine_free: (a: number, b: number) => void;
57
- readonly cleanupInactiveEntries: (a: number, b: number) => any;
58
- readonly dbDirectorySize: (a: number, b: number) => any;
59
- readonly deleteDB: (a: number, b: number) => any;
60
- readonly prepareRebuildTarget: (a: number, b: number) => any;
61
- readonly swapActiveGeneration: (a: number, b: number, c: number, d: number) => any;
62
- readonly wasmengine_apply_batch: (a: number, b: bigint, c: number, d: number, e: any) => [number, number, number];
63
- readonly wasmengine_apply_batch_packed: (a: number, b: bigint, c: number, d: number, e: any) => [number, number, number];
64
- readonly wasmengine_begin_tx: (a: number, b: number, c: number) => [bigint, number, number];
65
- readonly wasmengine_changes_since: (a: number, b: bigint, c: any) => [number, number, number];
66
- readonly wasmengine_clear_store: (a: number, b: bigint, c: number, d: number) => [number, number];
67
- readonly wasmengine_close: (a: number) => [number, number];
68
- readonly wasmengine_commit_tx: (a: number, b: bigint) => [bigint, number, number];
69
- readonly wasmengine_create_store: (a: number, b: bigint, c: number, d: number, e: any) => [number, number];
70
- readonly wasmengine_delete: (a: number, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
71
- readonly wasmengine_delete_many: (a: number, b: bigint, c: number, d: number, e: any) => [number, number, number];
72
- readonly wasmengine_delete_many_packed: (a: number, b: bigint, c: number, d: number, e: any) => [number, number, number];
73
- readonly wasmengine_drop_store: (a: number, b: bigint, c: number, d: number) => [number, number];
74
- readonly wasmengine_export_snapshot: (a: number) => [number, number, number];
75
- readonly wasmengine_get: (a: number, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
76
- readonly wasmengine_get_many: (a: number, b: bigint, c: number, d: number, e: any) => [number, number, number];
77
- readonly wasmengine_get_many_packed: (a: number, b: bigint, c: number, d: number, e: any) => [number, number, number];
78
- readonly wasmengine_get_schema_version: (a: number) => [bigint, number, number];
79
- readonly wasmengine_has: (a: number, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
80
- readonly wasmengine_import_snapshot: (a: number, b: number, c: number) => [bigint, number, number];
81
- readonly wasmengine_list_store_configs: (a: number) => [number, number, number];
82
- readonly wasmengine_list_stores: (a: number) => [number, number, number];
118
+ readonly buildProfile: (a: number) => void;
119
+ readonly cleanupInactiveEntries: (a: number, b: number) => number;
120
+ readonly dbDirectorySize: (a: number, b: number) => number;
121
+ readonly deleteDB: (a: number, b: number) => number;
122
+ readonly prepareRebuildTarget: (a: number, b: number) => number;
123
+ readonly readActiveGeneration: (a: number, b: number) => number;
124
+ readonly swapActiveGeneration: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
125
+ readonly wasmengine_abandon: (a: number, b: number) => void;
126
+ readonly wasmengine_apply_batch: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
127
+ readonly wasmengine_apply_batch_packed: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
128
+ readonly wasmengine_begin_tx: (a: number, b: number, c: number, d: number) => void;
129
+ readonly wasmengine_change_feed_policy: (a: number, b: number) => void;
130
+ readonly wasmengine_changes_since: (a: number, b: number, c: bigint, d: number) => void;
131
+ readonly wasmengine_checkpoint: (a: number, b: number) => void;
132
+ readonly wasmengine_clear_store: (a: number, b: number, c: bigint, d: number, e: number) => void;
133
+ readonly wasmengine_close: (a: number, b: number) => void;
134
+ readonly wasmengine_commit_tx: (a: number, b: number, c: bigint) => void;
135
+ readonly wasmengine_compact_into: (a: number, b: number, c: number) => void;
136
+ readonly wasmengine_compact_into_skipping_stores: (a: number, b: number, c: number, d: number) => void;
137
+ readonly wasmengine_create_store: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
138
+ readonly wasmengine_delete: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
139
+ readonly wasmengine_delete_many: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
140
+ readonly wasmengine_delete_many_packed: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
141
+ readonly wasmengine_drop_store: (a: number, b: number, c: bigint, d: number, e: number) => void;
142
+ readonly wasmengine_export_snapshot: (a: number, b: number) => void;
143
+ readonly wasmengine_get: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
144
+ readonly wasmengine_get_many: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
145
+ readonly wasmengine_get_many_packed: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
146
+ readonly wasmengine_get_schema_version: (a: number, b: number) => void;
147
+ readonly wasmengine_has: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
148
+ readonly wasmengine_has_many: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
149
+ readonly wasmengine_health: (a: number, b: number) => void;
150
+ readonly wasmengine_import_snapshot: (a: number, b: number, c: number, d: number) => void;
151
+ readonly wasmengine_list_store_configs: (a: number, b: number) => void;
152
+ readonly wasmengine_list_stores: (a: number, b: number) => void;
153
+ readonly wasmengine_needs_recovery: (a: number, b: number) => void;
83
154
  readonly wasmengine_new: () => number;
84
- readonly wasmengine_open: (a: number, b: number, c: number, d: any) => any;
85
- readonly wasmengine_openGeneration: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
86
- readonly wasmengine_put: (a: number, b: bigint, c: number, d: number, e: number, f: number, g: number, h: number, i: any) => [number, number];
87
- readonly wasmengine_put_many: (a: number, b: bigint, c: number, d: number, e: any, f: any) => [number, number, number];
88
- readonly wasmengine_put_many_packed: (a: number, b: bigint, c: number, d: number, e: any, f: any) => [number, number, number];
89
- readonly wasmengine_reset: (a: number) => [bigint, number, number];
90
- readonly wasmengine_rollback_tx: (a: number, b: bigint) => [number, number];
91
- readonly wasmengine_scan: (a: number, b: bigint, c: number, d: number, e: any) => [number, number, number];
92
- readonly wasmengine_set_failpoint: (a: number, b: any) => [number, number];
93
- readonly wasmengine_set_schema_version: (a: number, b: bigint, c: bigint) => [number, number];
94
- readonly wasmengine_stats: (a: number) => [number, number, number];
95
- readonly wasm_bindgen__convert__closures_____invoke__hdef3fd6d98035e1e: (a: number, b: number, c: any) => [number, number];
96
- readonly wasm_bindgen__convert__closures_____invoke__h3f1054a61e4404a3: (a: number, b: number, c: any, d: any) => void;
97
- readonly __wbindgen_malloc: (a: number, b: number) => number;
98
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
99
- readonly __wbindgen_exn_store: (a: number) => void;
100
- readonly __externref_table_alloc: () => number;
101
- readonly __wbindgen_externrefs: WebAssembly.Table;
102
- readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
103
- readonly __externref_table_dealloc: (a: number) => void;
104
- readonly __wbindgen_start: () => void;
155
+ readonly wasmengine_open: (a: number, b: number, c: number, d: number) => number;
156
+ readonly wasmengine_openGeneration: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
157
+ readonly wasmengine_put: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
158
+ readonly wasmengine_put_many: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
159
+ readonly wasmengine_put_many_packed: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number, h: number) => void;
160
+ readonly wasmengine_recover: (a: number, b: number) => void;
161
+ readonly wasmengine_reset: (a: number, b: number) => void;
162
+ readonly wasmengine_rollback_tx: (a: number, b: number, c: bigint) => void;
163
+ readonly wasmengine_scan: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
164
+ readonly wasmengine_set_change_feed_policy: (a: number, b: number, c: bigint, d: number) => void;
165
+ readonly wasmengine_set_failpoint: (a: number, b: number, c: number) => void;
166
+ readonly wasmengine_set_schema_version: (a: number, b: number, c: bigint, d: bigint) => void;
167
+ readonly wasmengine_stats: (a: number, b: number) => void;
168
+ readonly __wasm_bindgen_func_elem_721: (a: number, b: number, c: number, d: number) => void;
169
+ readonly __wasm_bindgen_func_elem_736: (a: number, b: number, c: number, d: number) => void;
170
+ readonly __wbindgen_export: (a: number, b: number) => number;
171
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
172
+ readonly __wbindgen_export3: (a: number) => void;
173
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
174
+ readonly __wbindgen_export5: (a: number, b: number) => void;
175
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
105
176
  }
106
177
 
107
178
  export type SyncInitInput = BufferSource | WebAssembly.Module;