@miden-sdk/miden-sdk 0.14.11 → 0.15.0-alpha.5

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 (59) hide show
  1. package/dist/mt/{Cargo-CZopJ--X.js → Cargo-smJQCGjz.js} +1111 -768
  2. package/dist/mt/Cargo-smJQCGjz.js.map +1 -0
  3. package/dist/mt/api-types.d.ts +122 -33
  4. package/dist/mt/assets/miden_client_web.wasm +0 -0
  5. package/dist/mt/crates/miden_client_web.d.ts +376 -303
  6. package/dist/mt/docs-entry.d.ts +3 -0
  7. package/dist/mt/eager.js +7 -4
  8. package/dist/mt/eager.js.map +1 -1
  9. package/dist/mt/index.d.ts +103 -10
  10. package/dist/mt/index.js +669 -312
  11. package/dist/mt/index.js.map +1 -1
  12. package/dist/mt/wasm.js +1 -1
  13. package/dist/mt/workerHelpers.js +1 -1
  14. package/dist/mt/workers/{Cargo-CZopJ--X-SsyOTzpb.js → Cargo-smJQCGjz-q4GYXDiD.js} +1111 -768
  15. package/dist/mt/workers/Cargo-smJQCGjz-q4GYXDiD.js.map +1 -0
  16. package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
  17. package/dist/mt/workers/web-client-methods-worker.js +1140 -792
  18. package/dist/mt/workers/web-client-methods-worker.js.map +1 -1
  19. package/dist/mt/workers/web-client-methods-worker.module.js +23 -19
  20. package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -1
  21. package/dist/mt/workers/workerHelpers.js +1 -1
  22. package/dist/st/{Cargo-DC6jSekr.js → Cargo-CG4XszZo.js} +1105 -763
  23. package/dist/st/Cargo-CG4XszZo.js.map +1 -0
  24. package/dist/st/api-types.d.ts +122 -33
  25. package/dist/st/assets/miden_client_web.wasm +0 -0
  26. package/dist/st/crates/miden_client_web.d.ts +376 -303
  27. package/dist/st/docs-entry.d.ts +3 -0
  28. package/dist/st/eager.js +7 -4
  29. package/dist/st/eager.js.map +1 -1
  30. package/dist/st/index.d.ts +103 -10
  31. package/dist/st/index.js +669 -312
  32. package/dist/st/index.js.map +1 -1
  33. package/dist/st/wasm.js +1 -1
  34. package/dist/st/workers/{Cargo-DC6jSekr-BG7C7m56.js → Cargo-CG4XszZo-S7EHAZSa.js} +1105 -763
  35. package/dist/st/workers/Cargo-CG4XszZo-S7EHAZSa.js.map +1 -0
  36. package/dist/st/workers/assets/miden_client_web.wasm +0 -0
  37. package/dist/st/workers/web-client-methods-worker.js +1134 -787
  38. package/dist/st/workers/web-client-methods-worker.js.map +1 -1
  39. package/dist/st/workers/web-client-methods-worker.module.js +23 -19
  40. package/dist/st/workers/web-client-methods-worker.module.js.map +1 -1
  41. package/js/client.js +491 -0
  42. package/js/node/client-factory.js +117 -0
  43. package/js/node/loader.js +138 -0
  44. package/js/node/napi-compat.js +253 -0
  45. package/js/node-index.js +194 -0
  46. package/js/resources/accounts.js +222 -0
  47. package/js/resources/compiler.js +74 -0
  48. package/js/resources/keystore.js +54 -0
  49. package/js/resources/notes.js +124 -0
  50. package/js/resources/settings.js +30 -0
  51. package/js/resources/tags.js +31 -0
  52. package/js/resources/transactions.js +667 -0
  53. package/js/standalone.js +109 -0
  54. package/js/utils.js +232 -0
  55. package/package.json +17 -2
  56. package/dist/mt/Cargo-CZopJ--X.js.map +0 -1
  57. package/dist/mt/workers/Cargo-CZopJ--X-SsyOTzpb.js.map +0 -1
  58. package/dist/st/Cargo-DC6jSekr.js.map +0 -1
  59. package/dist/st/workers/Cargo-DC6jSekr-BG7C7m56.js.map +0 -1
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Finds and loads the napi native module (.node binary).
3
+ *
4
+ * Search order:
5
+ * 1. MIDEN_MODULE_PATH environment variable (explicit override)
6
+ * 2. Platform-specific npm package (@miden-sdk/node-darwin-arm64, etc.)
7
+ * 3. Package prebuilds directory
8
+ * 4. Repo target directory (for local development)
9
+ */
10
+ import { createRequire } from "module";
11
+ import path from "path";
12
+ import fs from "fs";
13
+ import os from "os";
14
+
15
+ const require = createRequire(import.meta.url);
16
+
17
+ let _sdk = null;
18
+
19
+ /**
20
+ * Loads the napi SDK module. Caches the result after first load.
21
+ *
22
+ * @param {object} [options]
23
+ * @param {string} [options.modulePath] - Explicit path to the .node file.
24
+ * @returns {object} The napi SDK module.
25
+ */
26
+ export function loadNativeModule(options) {
27
+ if (_sdk) return _sdk;
28
+
29
+ // 1. Explicit path (option or env var)
30
+ const explicit = options?.modulePath || process.env.MIDEN_MODULE_PATH;
31
+ if (explicit) {
32
+ _sdk = require(explicit);
33
+ return _sdk;
34
+ }
35
+
36
+ // 2. Platform-specific npm package (installed via optionalDependencies)
37
+ const platformPackage = getPlatformPackageName();
38
+ if (platformPackage) {
39
+ try {
40
+ _sdk = require(platformPackage);
41
+ return _sdk;
42
+ } catch {
43
+ // Not installed -- fall through to other methods
44
+ }
45
+ }
46
+
47
+ const archMap = { arm64: "aarch64", x64: "x86_64" };
48
+ const arch = archMap[os.arch()] || os.arch();
49
+ const platform =
50
+ os.platform() === "darwin" ? "apple-darwin" : "unknown-linux-gnu";
51
+ const target = `${arch}-${platform}`;
52
+ const ext = os.platform() === "darwin" ? "dylib" : "so";
53
+ const libName = `libmiden_client_web.${ext}`;
54
+
55
+ // 3. Package prebuilds directory
56
+ const packageRoot = path.resolve(import.meta.dirname, "..");
57
+ const prebuildCandidates = [
58
+ path.join(
59
+ packageRoot,
60
+ "prebuilds",
61
+ `${os.platform()}-${os.arch()}`,
62
+ "miden_client_web.node"
63
+ ),
64
+ path.join(packageRoot, "prebuilds", "miden_client_web.node"),
65
+ ];
66
+
67
+ for (const p of prebuildCandidates) {
68
+ if (fs.existsSync(p)) {
69
+ _sdk = require(p);
70
+ return _sdk;
71
+ }
72
+ }
73
+
74
+ // 4. Repo target directory (development)
75
+ const repoRoot = findRepoRoot(packageRoot);
76
+ if (repoRoot) {
77
+ const targetCandidates = [
78
+ path.join(repoRoot, "target", target, "release", libName),
79
+ path.join(repoRoot, "target", "release", libName),
80
+ path.join(repoRoot, "target", target, "debug", libName),
81
+ path.join(repoRoot, "target", "debug", libName),
82
+ ];
83
+
84
+ for (const p of targetCandidates) {
85
+ if (fs.existsSync(p)) {
86
+ // napi requires a .node extension -- copy if needed
87
+ const nodeFile = path.join(path.dirname(p), "miden_client_web.node");
88
+ if (
89
+ !fs.existsSync(nodeFile) ||
90
+ fs.statSync(p).mtimeMs > fs.statSync(nodeFile).mtimeMs
91
+ ) {
92
+ fs.copyFileSync(p, nodeFile);
93
+ }
94
+ _sdk = require(nodeFile);
95
+ return _sdk;
96
+ }
97
+ }
98
+ }
99
+
100
+ throw new Error(
101
+ `Miden napi module not found.\n\n` +
102
+ `Build it with:\n` +
103
+ ` cargo build -p miden-client-web --no-default-features --features nodejs --release\n\n` +
104
+ `Or set MIDEN_MODULE_PATH to the .node file location.`
105
+ );
106
+ }
107
+
108
+ /**
109
+ * Returns the platform-specific npm package name for the current OS/arch,
110
+ * or null if the platform is not supported.
111
+ */
112
+ function getPlatformPackageName() {
113
+ const platformMap = {
114
+ "darwin-arm64": "@miden-sdk/node-darwin-arm64",
115
+ "darwin-x64": "@miden-sdk/node-darwin-x64",
116
+ "linux-x64": "@miden-sdk/node-linux-x64-gnu",
117
+ };
118
+ return platformMap[`${os.platform()}-${os.arch()}`] || null;
119
+ }
120
+
121
+ /**
122
+ * Walks up from startDir looking for the repo root (has Cargo.toml + crates/).
123
+ */
124
+ function findRepoRoot(startDir) {
125
+ let dir = startDir;
126
+ for (let i = 0; i < 10; i++) {
127
+ if (
128
+ fs.existsSync(path.join(dir, "Cargo.toml")) &&
129
+ fs.existsSync(path.join(dir, "crates"))
130
+ ) {
131
+ return dir;
132
+ }
133
+ const parent = path.dirname(dir);
134
+ if (parent === dir) break;
135
+ dir = parent;
136
+ }
137
+ return null;
138
+ }
@@ -0,0 +1,253 @@
1
+ /**
2
+ * NAPI compatibility layer.
3
+ *
4
+ * Normalizes differences between the napi (Node.js) and wasm-bindgen (browser)
5
+ * SDK surfaces so the shared MidenClient wrapper works on both platforms.
6
+ *
7
+ * Key normalizations:
8
+ * - Uint8Array/Buffer -> Array (napi's Vec<u8> expects plain arrays)
9
+ * - BigUint64Array/BigInt64Array -> Array (napi's Vec<u64>/Vec<BigInt> expects plain arrays)
10
+ * - null -> undefined (napi returns null for Option::None, wasm-bindgen returns undefined)
11
+ * - camelCase -> snake_case aliases (napi uses camelCase, wasm-bindgen uses snake_case)
12
+ * - Array type polyfills (browser has typed WASM arrays, napi accepts plain JS arrays)
13
+ */
14
+
15
+ // ── Argument normalization ───────────────────────────────────────────
16
+
17
+ /**
18
+ * Normalizes a single argument for napi compatibility.
19
+ *
20
+ * `BigInt` values are passed through untouched — napi-rs accepts JS `BigInt`
21
+ * for `u64` parameters (via `napi::bindgen_prelude::BigInt`), so no conversion
22
+ * is needed. Typed arrays of BigInts and bytes are converted to plain arrays.
23
+ */
24
+ export function normalizeArg(val) {
25
+ if (val instanceof BigUint64Array) return Array.from(val);
26
+ if (val instanceof BigInt64Array) return Array.from(val);
27
+ if (val instanceof Uint8Array || Buffer.isBuffer(val)) return Array.from(val);
28
+ return val;
29
+ }
30
+
31
+ // ── Class wrapping ───────────────────────────────────────────────────
32
+
33
+ /**
34
+ * Wraps a napi class so constructor and static method args are normalized.
35
+ */
36
+ function wrapClass(Cls) {
37
+ if (!Cls) return Cls;
38
+ const Wrapper = function (...args) {
39
+ return new Cls(...args.map(normalizeArg));
40
+ };
41
+ Wrapper.prototype = Cls.prototype;
42
+ for (const key of Object.getOwnPropertyNames(Cls)) {
43
+ if (key === "prototype" || key === "length" || key === "name") continue;
44
+ const desc = Object.getOwnPropertyDescriptor(Cls, key);
45
+ if (desc && typeof desc.value === "function") {
46
+ Wrapper[key] = (...args) => desc.value.apply(Cls, args.map(normalizeArg));
47
+ } else if (desc) {
48
+ try {
49
+ Object.defineProperty(Wrapper, key, desc);
50
+ } catch {
51
+ /* skip non-configurable */
52
+ }
53
+ }
54
+ }
55
+ return Wrapper;
56
+ }
57
+
58
+ // ── Client wrapping ──────────────────────────────────────────────────
59
+
60
+ /**
61
+ * Wraps a raw napi WebClient to normalize API differences with the browser SDK.
62
+ *
63
+ * - syncState() -> syncStateImpl() (no browser lock coordination needed)
64
+ * - syncStateWithTimeout() -> syncStateImpl() (timeout not applicable)
65
+ * - null -> undefined for Option<T> returns
66
+ * - BigInt/Uint8Array args normalized
67
+ */
68
+ export function wrapClient(rawClient, storeName) {
69
+ return new Proxy(rawClient, {
70
+ get(target, prop) {
71
+ if (prop === "syncState") {
72
+ return (...args) => target.syncStateImpl(...args);
73
+ }
74
+ if (prop === "syncStateWithTimeout") {
75
+ return (_timeoutMs) => target.syncStateImpl();
76
+ }
77
+ if (prop === "storeName") {
78
+ return storeName || "default";
79
+ }
80
+ if (prop === "wasmWebClient") {
81
+ return target;
82
+ }
83
+ if (prop === "storeIdentifier") {
84
+ return () => target.storeIdentifier?.() ?? storeName ?? "unknown";
85
+ }
86
+ // terminate is a no-op on Node.js (no Web Worker to terminate)
87
+ if (prop === "terminate") {
88
+ return () => {};
89
+ }
90
+ // onStateChanged is browser-only (uses BroadcastChannel)
91
+ if (prop === "onStateChanged") {
92
+ return () => undefined;
93
+ }
94
+ // waitForIdle drains the browser SDK's detached `_serializeWasmCall`
95
+ // chain. The napi binding has no such chain — every call is awaited
96
+ // directly by its caller and serialized inside Rust — so there is
97
+ // nothing in flight by the time a caller could invoke this. Resolve
98
+ // immediately to keep the cross-platform MidenClient surface intact.
99
+ if (prop === "waitForIdle") {
100
+ return () => Promise.resolve();
101
+ }
102
+ // lastAuthError surfaces the raw value a JS sign callback threw.
103
+ // The Node binding signs with FilesystemKeyStore (no JS callback can
104
+ // ever run), so "no sign error" is the semantically correct answer,
105
+ // not a stub.
106
+ if (prop === "lastAuthError") {
107
+ return () => null;
108
+ }
109
+ if (prop === "newWallet") {
110
+ return (mode, mutable, authScheme, seed) => {
111
+ const normSeed =
112
+ seed instanceof Uint8Array || Buffer.isBuffer(seed)
113
+ ? Array.from(seed)
114
+ : seed;
115
+ return target
116
+ .newWallet(mode, mutable, authScheme, normSeed ?? null)
117
+ .then((v) => (v === null ? undefined : v));
118
+ };
119
+ }
120
+ const val = target[prop];
121
+ if (typeof val === "function") {
122
+ const bound = val.bind(target);
123
+ return (...args) => {
124
+ const result = bound(...args.map(normalizeArg));
125
+ if (result && typeof result.then === "function") {
126
+ return result.then((v) => (v === null ? undefined : v));
127
+ }
128
+ return result === null ? undefined : result;
129
+ };
130
+ }
131
+ return val;
132
+ },
133
+ });
134
+ }
135
+
136
+ // ── Prototype patching ───────────────────────────────────────────────
137
+
138
+ /**
139
+ * Patches the raw SDK module:
140
+ * - Adds snake_case aliases for camelCase methods
141
+ * - Converts null -> undefined for Option<T> returns
142
+ * - Aliases static methods
143
+ */
144
+ function patchSdkPrototypes(rawSdk) {
145
+ // snake_case aliases for instance methods
146
+ /* eslint-disable camelcase */
147
+ for (const [cls, aliases] of [
148
+ [rawSdk.Account, { to_commitment: "toCommitment" }],
149
+ [rawSdk.AccountHeader, { to_commitment: "toCommitment" }],
150
+ ]) {
151
+ if (!cls?.prototype) continue;
152
+ for (const [snake, camel] of Object.entries(aliases)) {
153
+ if (typeof cls.prototype[camel] === "function" && !cls.prototype[snake]) {
154
+ cls.prototype[snake] = cls.prototype[camel];
155
+ }
156
+ }
157
+ }
158
+ /* eslint-enable camelcase */
159
+
160
+ // null -> undefined for Option<T> return methods
161
+ for (const [cls, methods] of [
162
+ [rawSdk.AccountStorage, ["getItem", "getMapEntries", "getMapItem"]],
163
+ [rawSdk.NoteConsumability, ["consumableAfterBlock"]],
164
+ ]) {
165
+ if (!cls?.prototype) continue;
166
+ for (const method of methods) {
167
+ const original = cls.prototype[method];
168
+ if (typeof original === "function") {
169
+ cls.prototype[method] = function (...args) {
170
+ const result = original.apply(this, args);
171
+ return result === null ? undefined : result;
172
+ };
173
+ }
174
+ }
175
+ }
176
+
177
+ // snake_case aliases for static methods
178
+ if (rawSdk.NoteScript) {
179
+ if (!rawSdk.NoteScript.p2id && rawSdk.NoteScript.p2Id)
180
+ rawSdk.NoteScript.p2id = rawSdk.NoteScript.p2Id;
181
+ if (!rawSdk.NoteScript.p2ide && rawSdk.NoteScript.p2Ide)
182
+ rawSdk.NoteScript.p2ide = rawSdk.NoteScript.p2Ide;
183
+ }
184
+ }
185
+
186
+ // ── Array polyfills ──────────────────────────────────────────────────
187
+
188
+ /**
189
+ * Creates polyfill constructors for WASM typed array types.
190
+ * napi accepts plain JS arrays directly, but the browser SDK requires
191
+ * typed wrappers (NoteAndArgsArray, FeltArray, etc.). These polyfills
192
+ * let `new sdk.FeltArray([a, b])` work on Node.js by returning a plain array.
193
+ */
194
+ function makeArrayPolyfills() {
195
+ function polyfill(items) {
196
+ const arr =
197
+ items === undefined || items === null
198
+ ? []
199
+ : Array.isArray(items)
200
+ ? [...items]
201
+ : [items];
202
+ arr.get = (i) => arr[i];
203
+ arr.replaceAt = (i, val) => {
204
+ arr[i] = val;
205
+ return arr;
206
+ };
207
+ return arr;
208
+ }
209
+ const names = [
210
+ "AccountArray",
211
+ "AccountIdArray",
212
+ "FeltArray",
213
+ "ForeignAccountArray",
214
+ "NoteAndArgsArray",
215
+ "NoteArray",
216
+ "NoteDetailsAndTagArray",
217
+ "NoteIdAndArgsArray",
218
+ "NoteRecipientArray",
219
+ "OutputNoteArray",
220
+ "OutputNotesArray",
221
+ "StorageSlotArray",
222
+ "TransactionScriptInputPairArray",
223
+ ];
224
+ const result = {};
225
+ for (const name of names) {
226
+ result[name] = polyfill;
227
+ }
228
+ return result;
229
+ }
230
+
231
+ // ── SDK wrapper ──────────────────────────────────────────────────────
232
+
233
+ /**
234
+ * Creates a wrapped SDK module suitable for use with the MidenClient wrapper.
235
+ * Applies all patches and returns an object that can be used as `getWasm()` return value.
236
+ */
237
+ export function createSdkWrapper(rawSdk) {
238
+ patchSdkPrototypes(rawSdk);
239
+
240
+ return {
241
+ ...rawSdk,
242
+ // Wrap classes whose constructors/static methods accept BigInt or Uint8Array
243
+ AccountBuilder: wrapClass(rawSdk.AccountBuilder),
244
+ AccountComponent: wrapClass(rawSdk.AccountComponent),
245
+ AuthSecretKey: wrapClass(rawSdk.AuthSecretKey),
246
+ Felt: wrapClass(rawSdk.Felt),
247
+ FungibleAsset: wrapClass(rawSdk.FungibleAsset),
248
+ Word: wrapClass(rawSdk.Word),
249
+ NoteTag: wrapClass(rawSdk.NoteTag),
250
+ // Array type polyfills
251
+ ...makeArrayPolyfills(),
252
+ };
253
+ }
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Node.js entry point for @miden-sdk/miden-sdk.
3
+ *
4
+ * Loaded automatically when Node.js resolves the package import
5
+ * (via the "node" condition in package.json exports).
6
+ *
7
+ * Provides the same API as the browser entry point (index.js),
8
+ * backed by a native napi addon with SQLite storage.
9
+ */
10
+
11
+ import { loadNativeModule } from "./node/loader.js";
12
+ import { createSdkWrapper } from "./node/napi-compat.js";
13
+ import {
14
+ createWasmWebClient,
15
+ createMockWasmWebClient,
16
+ } from "./node/client-factory.js";
17
+ import { MidenClient } from "./client.js";
18
+ import {
19
+ createP2IDNote,
20
+ createP2IDENote,
21
+ buildSwapTag,
22
+ _setWasm as _setStandaloneWasm,
23
+ _setWebClient as _setStandaloneWebClient,
24
+ } from "./standalone.js";
25
+
26
+ // ── Initialization ───────────────────────────────────────────────────
27
+
28
+ let _initialized = false;
29
+ let _rawSdk = null;
30
+ let _wrappedSdk = null;
31
+ let _WasmWebClient = null;
32
+ let _MockWasmWebClient = null;
33
+
34
+ function ensureInitialized() {
35
+ if (_initialized) return;
36
+
37
+ _rawSdk = loadNativeModule();
38
+ _wrappedSdk = createSdkWrapper(_rawSdk);
39
+ _WasmWebClient = createWasmWebClient(_rawSdk);
40
+ _MockWasmWebClient = createMockWasmWebClient(_rawSdk);
41
+
42
+ // Wire MidenClient statics
43
+ MidenClient._WasmWebClient = _WasmWebClient;
44
+ MidenClient._MockWasmWebClient = _MockWasmWebClient;
45
+ MidenClient._getWasmOrThrow = async () => _wrappedSdk;
46
+
47
+ // Wire standalone functions
48
+ _setStandaloneWasm(_wrappedSdk);
49
+ _setStandaloneWebClient(_WasmWebClient);
50
+
51
+ _initialized = true;
52
+ }
53
+
54
+ // Initialize on import
55
+ ensureInitialized();
56
+
57
+ // ── Enum constants (matching browser entry point) ────────────────────
58
+
59
+ export const AccountType = Object.freeze({
60
+ MutableWallet: "MutableWallet",
61
+ ImmutableWallet: "ImmutableWallet",
62
+ FungibleFaucet: "FungibleFaucet",
63
+ ImmutableContract: "ImmutableContract",
64
+ MutableContract: "MutableContract",
65
+ });
66
+
67
+ export const AuthScheme = Object.freeze({
68
+ Falcon: "falcon",
69
+ ECDSA: "ecdsa",
70
+ });
71
+
72
+ export const NoteVisibility = Object.freeze({
73
+ Public: "public",
74
+ Private: "private",
75
+ });
76
+
77
+ export const StorageMode = Object.freeze({
78
+ Public: "public",
79
+ Private: "private",
80
+ });
81
+
82
+ // ── Re-exports ───────────────────────────────────────────────────────
83
+
84
+ export { MidenClient };
85
+ export { createP2IDNote, createP2IDENote, buildSwapTag };
86
+
87
+ // Internal exports (matching browser entry point)
88
+ export {
89
+ _WasmWebClient as WasmWebClient,
90
+ _MockWasmWebClient as MockWasmWebClient,
91
+ _MockWasmWebClient as MockWebClient,
92
+ };
93
+
94
+ // Re-export all napi SDK types (equivalent to browser's `export * from "../Cargo.toml"`).
95
+ // Since we can't statically export dynamic napi bindings, we re-export common types explicitly
96
+ // and provide getNativeModule()/getWrappedSdk() for anything else.
97
+
98
+ export function getNativeModule() {
99
+ ensureInitialized();
100
+ return _rawSdk;
101
+ }
102
+
103
+ export function getWrappedSdk() {
104
+ ensureInitialized();
105
+ return _wrappedSdk;
106
+ }
107
+
108
+ // Re-export commonly used SDK types from the napi module.
109
+ // Uses a lazy getter pattern so the module is loaded on first access.
110
+ function _reexport(name) {
111
+ return {
112
+ get [name]() {
113
+ ensureInitialized();
114
+ return _wrappedSdk[name] ?? _rawSdk[name];
115
+ },
116
+ }[name];
117
+ }
118
+
119
+ // Account types
120
+ export const Account = /* @__PURE__ */ _reexport("Account");
121
+ export const AccountBuilder = /* @__PURE__ */ _reexport("AccountBuilder");
122
+ export const AccountComponent = /* @__PURE__ */ _reexport("AccountComponent");
123
+ export const AccountFile = /* @__PURE__ */ _reexport("AccountFile");
124
+ export const AccountHeader = /* @__PURE__ */ _reexport("AccountHeader");
125
+ export const AccountId = /* @__PURE__ */ _reexport("AccountId");
126
+ export const AccountInterface = /* @__PURE__ */ _reexport("AccountInterface");
127
+ export const AccountStorage = /* @__PURE__ */ _reexport("AccountStorage");
128
+ export const AccountStorageMode =
129
+ /* @__PURE__ */ _reexport("AccountStorageMode");
130
+ export const AccountStorageRequirements = /* @__PURE__ */ _reexport(
131
+ "AccountStorageRequirements"
132
+ );
133
+ export const Address = /* @__PURE__ */ _reexport("Address");
134
+
135
+ // Auth types
136
+ export const AuthSchemeNative = /* @__PURE__ */ _reexport("AuthScheme");
137
+ export const AuthSecretKey = /* @__PURE__ */ _reexport("AuthSecretKey");
138
+
139
+ // Crypto types
140
+ export const Felt = /* @__PURE__ */ _reexport("Felt");
141
+ export const Word = /* @__PURE__ */ _reexport("Word");
142
+ export const Rpo = /* @__PURE__ */ _reexport("Rpo");
143
+ export const Rpo256 = /* @__PURE__ */ _reexport("Rpo256");
144
+ export const PublicKey = /* @__PURE__ */ _reexport("PublicKey");
145
+ export const Signature = /* @__PURE__ */ _reexport("Signature");
146
+
147
+ // Asset types
148
+ export const FungibleAsset = /* @__PURE__ */ _reexport("FungibleAsset");
149
+
150
+ // Note types
151
+ export const Note = /* @__PURE__ */ _reexport("Note");
152
+ export const NoteAssets = /* @__PURE__ */ _reexport("NoteAssets");
153
+ export const NoteAttachment = /* @__PURE__ */ _reexport("NoteAttachment");
154
+ export const NoteExportFormat = /* @__PURE__ */ _reexport("NoteExportFormat");
155
+ export const NoteExecutionHint = /* @__PURE__ */ _reexport("NoteExecutionHint");
156
+ export const NoteFile = /* @__PURE__ */ _reexport("NoteFile");
157
+ export const NoteFilter = /* @__PURE__ */ _reexport("NoteFilter");
158
+ export const NoteFilterTypes = /* @__PURE__ */ _reexport("NoteFilterTypes");
159
+ export const NoteId = /* @__PURE__ */ _reexport("NoteId");
160
+ export const NoteMetadata = /* @__PURE__ */ _reexport("NoteMetadata");
161
+ export const NoteRecipient = /* @__PURE__ */ _reexport("NoteRecipient");
162
+ export const NoteScript = /* @__PURE__ */ _reexport("NoteScript");
163
+ export const NoteStorage = /* @__PURE__ */ _reexport("NoteStorage");
164
+ export const NoteTag = /* @__PURE__ */ _reexport("NoteTag");
165
+ export const NoteType = /* @__PURE__ */ _reexport("NoteType");
166
+ export const OutputNote = /* @__PURE__ */ _reexport("OutputNote");
167
+
168
+ // Transaction types
169
+ export const TransactionFilter = /* @__PURE__ */ _reexport("TransactionFilter");
170
+ export const TransactionProver = /* @__PURE__ */ _reexport("TransactionProver");
171
+ export const TransactionRequestBuilder = /* @__PURE__ */ _reexport(
172
+ "TransactionRequestBuilder"
173
+ );
174
+
175
+ // Network types
176
+ export const NetworkId = /* @__PURE__ */ _reexport("NetworkId");
177
+ export const RpcClient = /* @__PURE__ */ _reexport("RpcClient");
178
+ export const Endpoint = /* @__PURE__ */ _reexport("Endpoint");
179
+
180
+ // Transaction result / sync types
181
+ export const SyncSummary = /* @__PURE__ */ _reexport("SyncSummary");
182
+ export const TransactionResult = /* @__PURE__ */ _reexport("TransactionResult");
183
+
184
+ // Store import/export
185
+ export const exportStore = /* @__PURE__ */ _reexport("exportStore");
186
+ export const importStore = /* @__PURE__ */ _reexport("importStore");
187
+
188
+ // Misc
189
+ export const AdviceMap = /* @__PURE__ */ _reexport("AdviceMap");
190
+ export const ForeignAccount = /* @__PURE__ */ _reexport("ForeignAccount");
191
+ export const Package = /* @__PURE__*/ _reexport("Package");
192
+ export const StorageMap = /* @__PURE__ */ _reexport("StorageMap");
193
+ export const StorageSlot = /* @__PURE__ */ _reexport("StorageSlot");
194
+ export const TokenSymbol = /* @__PURE__ */ _reexport("TokenSymbol");