@miden-sdk/miden-sdk 0.14.5 → 0.14.9

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 (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +148 -18
  3. package/dist/mt/Cargo-DKB2aRX-.js +25826 -0
  4. package/dist/mt/Cargo-DKB2aRX-.js.map +1 -0
  5. package/dist/{api-types.d.ts → mt/api-types.d.ts} +18 -3
  6. package/dist/mt/assets/miden_client_web.wasm +0 -0
  7. package/dist/mt/crates/miden_client_web.d.ts +4726 -0
  8. package/dist/{docs-entry.d.ts → mt/docs-entry.d.ts} +2 -2
  9. package/dist/mt/eager.js +35 -0
  10. package/dist/mt/eager.js.map +1 -0
  11. package/dist/{index.d.ts → mt/index.d.ts} +9 -7
  12. package/dist/mt/index.js +3371 -0
  13. package/dist/mt/index.js.map +1 -0
  14. package/dist/{wasm.js → mt/wasm.js} +1 -1
  15. package/dist/mt/wasm.js.map +1 -0
  16. package/dist/mt/workerHelpers.js +28 -0
  17. package/dist/mt/workers/Cargo-DKB2aRX--C6T4l3AF.js +25827 -0
  18. package/dist/mt/workers/Cargo-DKB2aRX--C6T4l3AF.js.map +1 -0
  19. package/dist/mt/workers/assets/miden_client_web.wasm +0 -0
  20. package/dist/mt/workers/web-client-methods-worker.js +26560 -0
  21. package/dist/mt/workers/web-client-methods-worker.js.map +1 -0
  22. package/dist/{workers → mt/workers}/web-client-methods-worker.module.js +17 -1
  23. package/dist/mt/workers/web-client-methods-worker.module.js.map +1 -0
  24. package/dist/mt/workers/workerHelpers.js +28 -0
  25. package/dist/{Cargo-M3382VZc.js → st/Cargo-jOTNoFyS.js} +6714 -5926
  26. package/dist/st/Cargo-jOTNoFyS.js.map +1 -0
  27. package/dist/st/api-types.d.ts +1051 -0
  28. package/dist/{workers → st}/assets/miden_client_web.wasm +0 -0
  29. package/dist/{crates → st/crates}/miden_client_web.d.ts +31 -0
  30. package/dist/st/docs-entry.d.ts +35 -0
  31. package/dist/{eager.js → st/eager.js} +1 -1
  32. package/dist/st/eager.js.map +1 -0
  33. package/dist/st/index.d.ts +89 -0
  34. package/dist/{index.js → st/index.js} +126 -13
  35. package/dist/st/index.js.map +1 -0
  36. package/dist/st/wasm.js +23 -0
  37. package/dist/st/wasm.js.map +1 -0
  38. package/dist/{workers/Cargo-M3382VZc-Dfw4tXwh.js → st/workers/Cargo-jOTNoFyS-DRTcF6wf.js} +6714 -5926
  39. package/dist/st/workers/Cargo-jOTNoFyS-DRTcF6wf.js.map +1 -0
  40. package/dist/{assets → st/workers/assets}/miden_client_web.wasm +0 -0
  41. package/dist/{workers → st/workers}/web-client-methods-worker.js +6731 -5926
  42. package/dist/st/workers/web-client-methods-worker.js.map +1 -0
  43. package/dist/st/workers/web-client-methods-worker.module.js +571 -0
  44. package/dist/st/workers/web-client-methods-worker.module.js.map +1 -0
  45. package/lazy/package.json +4 -0
  46. package/mt/lazy/package.json +4 -0
  47. package/mt/package.json +4 -0
  48. package/package.json +66 -44
  49. package/dist/Cargo-M3382VZc.js.map +0 -1
  50. package/dist/eager.js.map +0 -1
  51. package/dist/index.js.map +0 -1
  52. package/dist/wasm.js.map +0 -1
  53. package/dist/workers/Cargo-M3382VZc-Dfw4tXwh.js.map +0 -1
  54. package/dist/workers/web-client-methods-worker.js.map +0 -1
  55. package/dist/workers/web-client-methods-worker.module.js.map +0 -1
@@ -32,17 +32,17 @@ import type {
32
32
  NoteScript,
33
33
  AdviceInputs,
34
34
  FeltArray,
35
- } from "./crates/miden_client_web";
35
+ } from "./crates/miden_client_web.js";
36
36
 
37
37
  // Import the full namespace for the MidenArrayConstructors type
38
- import type * as WasmExports from "./crates/miden_client_web";
38
+ import type * as WasmExports from "./crates/miden_client_web.js";
39
39
 
40
40
  // Source of truth for standalone-wrapper return types. By deriving them from
41
41
  // the wasm-bindgen-generated namespace (rather than hand-writing `: Note`),
42
42
  // the declarations below cannot drift from the actual runtime behavior — the
43
43
  // exact class of bug behind #2042. Any forwarder-style wrapper should follow
44
44
  // the same pattern: `ReturnType<WasmModule["Class"]["method"]>`.
45
- type WasmModule = typeof import("./crates/miden_client_web");
45
+ type WasmModule = typeof import("./crates/miden_client_web.js");
46
46
 
47
47
  // ════════════════════════════════════════════════════════════════
48
48
  // Callback types for external keystore support
@@ -209,6 +209,21 @@ export interface ClientOptions {
209
209
  insertKey: InsertKeyCallback;
210
210
  sign: SignCallback;
211
211
  };
212
+ /**
213
+ * Enable the Web Worker shim that runs WASM calls off the main thread.
214
+ * Defaults to `true` — leave it that way in browsers/extensions so the UI
215
+ * stays responsive while WASM is busy.
216
+ *
217
+ * Set to `false` when:
218
+ * - You pass a `CallbackProver` via `TransactionProver.newCallbackProver(jsFn)`.
219
+ * The worker boundary serializes the prover with `TransactionProver.serialize()`,
220
+ * which has no encoding for the callback variant and silently downgrades
221
+ * to `"local"` — your callback would never fire.
222
+ * - You're embedding the client in a single-WebView native shell (iOS/Android
223
+ * Capacitor host, Tauri, Electron preload), where the UI thread isn't
224
+ * competing with the WASM thread anyway.
225
+ */
226
+ useWorker?: boolean;
212
227
  }
213
228
 
214
229
  // ════════════════════════════════════════════════════════════════