@midnightntwrk/wallet-sdk-prover-client 2.0.0-beta.0 → 2.0.0-beta.2
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.
|
@@ -68,6 +68,9 @@ class HttpProverClientImpl {
|
|
|
68
68
|
serverProverProvider = () => ({
|
|
69
69
|
check: async (serializedPreimage, _keyLocation) => pipe(Effect.succeed(ledger.createCheckPayload(serializedPreimage)), Effect.flatMap((tx) => this.request(CHECK_TX_PATH, tx, 'Failed to check')), Effect.map((response) => ledger.parseCheckResult(response)), Effect.runPromise),
|
|
70
70
|
prove: async (serializedPreimage, _keyLocation, overwriteBindingInput) => pipe(Effect.succeed(ledger.createProvingPayload(serializedPreimage, overwriteBindingInput)), Effect.flatMap((tx) => this.request(PROVE_TX_PATH, tx, 'Failed to prove')), Effect.runPromise),
|
|
71
|
+
// The proof server holds its own key material and resolves circuits from the
|
|
72
|
+
// preimage's key location, so there is never local key material to provide.
|
|
73
|
+
lookupKey: (_keyLocation) => Promise.resolve(undefined),
|
|
71
74
|
});
|
|
72
75
|
proveTransaction(transaction, costModel) {
|
|
73
76
|
return pipe(Effect.succeed(this.serverProverProvider()), Effect.flatMap((provider) => Effect.tryPromise({
|
|
@@ -129,6 +129,7 @@ class WasmProverImpl {
|
|
|
129
129
|
op: 'prove',
|
|
130
130
|
args: [serializedPreimage, overwriteBindingInput],
|
|
131
131
|
}),
|
|
132
|
+
lookupKey: (keyLocation) => (keyMaterialProvider ?? this.keyMaterialProvider).lookupKey(keyLocation),
|
|
132
133
|
});
|
|
133
134
|
proveTransaction(transaction, costModel, keyMaterialProvider) {
|
|
134
135
|
return pipe(Effect.succeed(this.wasmProverProvider(keyMaterialProvider)), Effect.flatMap((provider) => Effect.tryPromise({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midnightntwrk/wallet-sdk-prover-client",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@effect/platform": "^0.96.0",
|
|
34
34
|
"@midnight-ntwrk/zkir-v2": "^2.1.0",
|
|
35
|
-
"@midnightntwrk/ledger-v9": "1.0.0-rc.
|
|
36
|
-
"@midnightntwrk/wallet-sdk-utilities": "
|
|
35
|
+
"@midnightntwrk/ledger-v9": "1.0.0-rc.3",
|
|
36
|
+
"@midnightntwrk/wallet-sdk-utilities": "1.2.0",
|
|
37
37
|
"effect": "^3.19.19",
|
|
38
38
|
"web-worker": "^1.5.0"
|
|
39
39
|
},
|