@miden-sdk/react 0.14.8 → 0.14.10
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/dist/index.d.ts +16 -0
- package/dist/index.mjs +7 -2
- package/dist/lazy.d.ts +16 -0
- package/dist/lazy.mjs +7 -2
- package/dist/mt/lazy.d.ts +16 -0
- package/dist/mt/lazy.mjs +7 -2
- package/dist/mt.d.ts +16 -0
- package/dist/mt.mjs +7 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -150,6 +150,22 @@ interface MidenConfig {
|
|
|
150
150
|
proverUrls?: ProverUrls;
|
|
151
151
|
/** Default timeout for remote prover requests in milliseconds. */
|
|
152
152
|
proverTimeoutMs?: number | bigint;
|
|
153
|
+
/**
|
|
154
|
+
* Enable the Web Worker shim that runs WASM calls off the main thread.
|
|
155
|
+
* Defaults to `true` — leave it that way in browsers/extensions so the UI
|
|
156
|
+
* stays responsive while WASM is busy.
|
|
157
|
+
*
|
|
158
|
+
* Set to `false` when:
|
|
159
|
+
* - You pass a `CallbackProver` (e.g. a native iOS/Android prover via
|
|
160
|
+
* a Capacitor plugin). The worker boundary serializes the prover with
|
|
161
|
+
* `TransactionProver.serialize()`, which has no encoding for the
|
|
162
|
+
* callback variant and silently downgrades to `"local"` — your
|
|
163
|
+
* callback would never fire.
|
|
164
|
+
* - You're embedding the client in a single-WebView native shell
|
|
165
|
+
* (Capacitor host, Tauri, Electron preload), where the UI thread
|
|
166
|
+
* isn't competing with the WASM thread anyway.
|
|
167
|
+
*/
|
|
168
|
+
useWorker?: boolean;
|
|
153
169
|
}
|
|
154
170
|
interface MidenState {
|
|
155
171
|
client: WasmWebClient | null;
|
package/dist/index.mjs
CHANGED
|
@@ -663,7 +663,9 @@ function MidenProvider({
|
|
|
663
663
|
storeName,
|
|
664
664
|
signerContext.getKeyCb,
|
|
665
665
|
signerContext.insertKeyCb,
|
|
666
|
-
wrappedSignCb
|
|
666
|
+
wrappedSignCb,
|
|
667
|
+
void 0,
|
|
668
|
+
resolvedConfig.useWorker
|
|
667
669
|
);
|
|
668
670
|
if (cancelled) return;
|
|
669
671
|
const accountId = await initializeSignerAccount(
|
|
@@ -679,7 +681,10 @@ function MidenProvider({
|
|
|
679
681
|
webClient = await WebClient.createClient(
|
|
680
682
|
resolvedConfig.rpcUrl,
|
|
681
683
|
resolvedConfig.noteTransportUrl,
|
|
682
|
-
seed
|
|
684
|
+
seed,
|
|
685
|
+
void 0,
|
|
686
|
+
void 0,
|
|
687
|
+
resolvedConfig.useWorker
|
|
683
688
|
);
|
|
684
689
|
if (cancelled) return;
|
|
685
690
|
}
|
package/dist/lazy.d.ts
CHANGED
|
@@ -150,6 +150,22 @@ interface MidenConfig {
|
|
|
150
150
|
proverUrls?: ProverUrls;
|
|
151
151
|
/** Default timeout for remote prover requests in milliseconds. */
|
|
152
152
|
proverTimeoutMs?: number | bigint;
|
|
153
|
+
/**
|
|
154
|
+
* Enable the Web Worker shim that runs WASM calls off the main thread.
|
|
155
|
+
* Defaults to `true` — leave it that way in browsers/extensions so the UI
|
|
156
|
+
* stays responsive while WASM is busy.
|
|
157
|
+
*
|
|
158
|
+
* Set to `false` when:
|
|
159
|
+
* - You pass a `CallbackProver` (e.g. a native iOS/Android prover via
|
|
160
|
+
* a Capacitor plugin). The worker boundary serializes the prover with
|
|
161
|
+
* `TransactionProver.serialize()`, which has no encoding for the
|
|
162
|
+
* callback variant and silently downgrades to `"local"` — your
|
|
163
|
+
* callback would never fire.
|
|
164
|
+
* - You're embedding the client in a single-WebView native shell
|
|
165
|
+
* (Capacitor host, Tauri, Electron preload), where the UI thread
|
|
166
|
+
* isn't competing with the WASM thread anyway.
|
|
167
|
+
*/
|
|
168
|
+
useWorker?: boolean;
|
|
153
169
|
}
|
|
154
170
|
interface MidenState {
|
|
155
171
|
client: WasmWebClient | null;
|
package/dist/lazy.mjs
CHANGED
|
@@ -663,7 +663,9 @@ function MidenProvider({
|
|
|
663
663
|
storeName,
|
|
664
664
|
signerContext.getKeyCb,
|
|
665
665
|
signerContext.insertKeyCb,
|
|
666
|
-
wrappedSignCb
|
|
666
|
+
wrappedSignCb,
|
|
667
|
+
void 0,
|
|
668
|
+
resolvedConfig.useWorker
|
|
667
669
|
);
|
|
668
670
|
if (cancelled) return;
|
|
669
671
|
const accountId = await initializeSignerAccount(
|
|
@@ -679,7 +681,10 @@ function MidenProvider({
|
|
|
679
681
|
webClient = await WebClient.createClient(
|
|
680
682
|
resolvedConfig.rpcUrl,
|
|
681
683
|
resolvedConfig.noteTransportUrl,
|
|
682
|
-
seed
|
|
684
|
+
seed,
|
|
685
|
+
void 0,
|
|
686
|
+
void 0,
|
|
687
|
+
resolvedConfig.useWorker
|
|
683
688
|
);
|
|
684
689
|
if (cancelled) return;
|
|
685
690
|
}
|
package/dist/mt/lazy.d.ts
CHANGED
|
@@ -150,6 +150,22 @@ interface MidenConfig {
|
|
|
150
150
|
proverUrls?: ProverUrls;
|
|
151
151
|
/** Default timeout for remote prover requests in milliseconds. */
|
|
152
152
|
proverTimeoutMs?: number | bigint;
|
|
153
|
+
/**
|
|
154
|
+
* Enable the Web Worker shim that runs WASM calls off the main thread.
|
|
155
|
+
* Defaults to `true` — leave it that way in browsers/extensions so the UI
|
|
156
|
+
* stays responsive while WASM is busy.
|
|
157
|
+
*
|
|
158
|
+
* Set to `false` when:
|
|
159
|
+
* - You pass a `CallbackProver` (e.g. a native iOS/Android prover via
|
|
160
|
+
* a Capacitor plugin). The worker boundary serializes the prover with
|
|
161
|
+
* `TransactionProver.serialize()`, which has no encoding for the
|
|
162
|
+
* callback variant and silently downgrades to `"local"` — your
|
|
163
|
+
* callback would never fire.
|
|
164
|
+
* - You're embedding the client in a single-WebView native shell
|
|
165
|
+
* (Capacitor host, Tauri, Electron preload), where the UI thread
|
|
166
|
+
* isn't competing with the WASM thread anyway.
|
|
167
|
+
*/
|
|
168
|
+
useWorker?: boolean;
|
|
153
169
|
}
|
|
154
170
|
interface MidenState {
|
|
155
171
|
client: WasmWebClient | null;
|
package/dist/mt/lazy.mjs
CHANGED
|
@@ -663,7 +663,9 @@ function MidenProvider({
|
|
|
663
663
|
storeName,
|
|
664
664
|
signerContext.getKeyCb,
|
|
665
665
|
signerContext.insertKeyCb,
|
|
666
|
-
wrappedSignCb
|
|
666
|
+
wrappedSignCb,
|
|
667
|
+
void 0,
|
|
668
|
+
resolvedConfig.useWorker
|
|
667
669
|
);
|
|
668
670
|
if (cancelled) return;
|
|
669
671
|
const accountId = await initializeSignerAccount(
|
|
@@ -679,7 +681,10 @@ function MidenProvider({
|
|
|
679
681
|
webClient = await WebClient.createClient(
|
|
680
682
|
resolvedConfig.rpcUrl,
|
|
681
683
|
resolvedConfig.noteTransportUrl,
|
|
682
|
-
seed
|
|
684
|
+
seed,
|
|
685
|
+
void 0,
|
|
686
|
+
void 0,
|
|
687
|
+
resolvedConfig.useWorker
|
|
683
688
|
);
|
|
684
689
|
if (cancelled) return;
|
|
685
690
|
}
|
package/dist/mt.d.ts
CHANGED
|
@@ -150,6 +150,22 @@ interface MidenConfig {
|
|
|
150
150
|
proverUrls?: ProverUrls;
|
|
151
151
|
/** Default timeout for remote prover requests in milliseconds. */
|
|
152
152
|
proverTimeoutMs?: number | bigint;
|
|
153
|
+
/**
|
|
154
|
+
* Enable the Web Worker shim that runs WASM calls off the main thread.
|
|
155
|
+
* Defaults to `true` — leave it that way in browsers/extensions so the UI
|
|
156
|
+
* stays responsive while WASM is busy.
|
|
157
|
+
*
|
|
158
|
+
* Set to `false` when:
|
|
159
|
+
* - You pass a `CallbackProver` (e.g. a native iOS/Android prover via
|
|
160
|
+
* a Capacitor plugin). The worker boundary serializes the prover with
|
|
161
|
+
* `TransactionProver.serialize()`, which has no encoding for the
|
|
162
|
+
* callback variant and silently downgrades to `"local"` — your
|
|
163
|
+
* callback would never fire.
|
|
164
|
+
* - You're embedding the client in a single-WebView native shell
|
|
165
|
+
* (Capacitor host, Tauri, Electron preload), where the UI thread
|
|
166
|
+
* isn't competing with the WASM thread anyway.
|
|
167
|
+
*/
|
|
168
|
+
useWorker?: boolean;
|
|
153
169
|
}
|
|
154
170
|
interface MidenState {
|
|
155
171
|
client: WasmWebClient | null;
|
package/dist/mt.mjs
CHANGED
|
@@ -663,7 +663,9 @@ function MidenProvider({
|
|
|
663
663
|
storeName,
|
|
664
664
|
signerContext.getKeyCb,
|
|
665
665
|
signerContext.insertKeyCb,
|
|
666
|
-
wrappedSignCb
|
|
666
|
+
wrappedSignCb,
|
|
667
|
+
void 0,
|
|
668
|
+
resolvedConfig.useWorker
|
|
667
669
|
);
|
|
668
670
|
if (cancelled) return;
|
|
669
671
|
const accountId = await initializeSignerAccount(
|
|
@@ -679,7 +681,10 @@ function MidenProvider({
|
|
|
679
681
|
webClient = await WebClient.createClient(
|
|
680
682
|
resolvedConfig.rpcUrl,
|
|
681
683
|
resolvedConfig.noteTransportUrl,
|
|
682
|
-
seed
|
|
684
|
+
seed,
|
|
685
|
+
void 0,
|
|
686
|
+
void 0,
|
|
687
|
+
resolvedConfig.useWorker
|
|
683
688
|
);
|
|
684
689
|
if (cancelled) return;
|
|
685
690
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miden-sdk/react",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.10",
|
|
4
4
|
"description": "React hooks library for Miden Web Client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"CLAUDE.md"
|
|
33
33
|
],
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@miden-sdk/miden-sdk": "^0.14.
|
|
35
|
+
"@miden-sdk/miden-sdk": "^0.14.10",
|
|
36
36
|
"react": ">=18.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"tsup": "^8.0.0",
|
|
53
53
|
"typescript": "^5.0.0",
|
|
54
54
|
"vitest": "^3.0.0",
|
|
55
|
-
"@miden-sdk/miden-sdk": "0.14.
|
|
55
|
+
"@miden-sdk/miden-sdk": "0.14.10"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|
|
58
58
|
"miden",
|