@provablehq/wasm 0.8.8 → 0.9.0
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/mainnet/aleo_wasm.d.ts +6 -4
- package/dist/mainnet/aleo_wasm.wasm +0 -0
- package/dist/mainnet/index.js +17 -9
- package/dist/mainnet/index.js.map +1 -1
- package/dist/mainnet/worker.js +17 -9
- package/dist/mainnet/worker.js.map +1 -1
- package/dist/testnet/aleo_wasm.d.ts +6 -4
- package/dist/testnet/aleo_wasm.wasm +0 -0
- package/dist/testnet/index.js +17 -9
- package/dist/testnet/index.js.map +1 -1
- package/dist/testnet/worker.js +17 -9
- package/dist/testnet/worker.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
* Verify an execution with
|
|
5
|
-
*
|
|
6
|
-
* the execution is included in the Aleo Network ledger.
|
|
4
|
+
* Verify an execution. Executions with multiple transitions must have the program source code and
|
|
5
|
+
* verifying keys of imported functions supplied from outside to correctly verify. Also, this does
|
|
6
|
+
* not verify that the state root of the execution is included in the Aleo Network ledger.
|
|
7
7
|
*
|
|
8
8
|
* @param {Execution} execution The function execution to verify
|
|
9
9
|
* @param {VerifyingKey} verifying_key The verifying key for the function
|
|
10
10
|
* @param {Program} program The program that the function execution belongs to
|
|
11
11
|
* @param {String} function_id The name of the function that was executed
|
|
12
|
+
* @param {Object} imports The imports for the program in the form of { "program_id.aleo":"source code", ... }
|
|
13
|
+
* @param {Object} import_verifying_keys The verifying keys for the imports in the form of { "program_id.aleo": [["function, "verifying_key"], ...], ...}
|
|
12
14
|
* @returns {boolean} True if the execution is valid, false otherwise
|
|
13
15
|
*/
|
|
14
|
-
export function verifyFunctionExecution(execution: Execution, verifying_key: VerifyingKey, program: Program, function_id: string): boolean;
|
|
16
|
+
export function verifyFunctionExecution(execution: Execution, verifying_key: VerifyingKey, program: Program, function_id: string, imports?: object | null, imported_verifying_keys?: object | null): boolean;
|
|
15
17
|
export function runRayonThread(receiver: number): void;
|
|
16
18
|
export function initThreadPool(url: URL, num_threads: number): Promise<void>;
|
|
17
19
|
/**
|
|
Binary file
|
package/dist/mainnet/index.js
CHANGED
|
@@ -194,22 +194,26 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
194
194
|
return ptr;
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
|
-
* Verify an execution with
|
|
198
|
-
*
|
|
199
|
-
* the execution is included in the Aleo Network ledger.
|
|
197
|
+
* Verify an execution. Executions with multiple transitions must have the program source code and
|
|
198
|
+
* verifying keys of imported functions supplied from outside to correctly verify. Also, this does
|
|
199
|
+
* not verify that the state root of the execution is included in the Aleo Network ledger.
|
|
200
200
|
*
|
|
201
201
|
* @param {Execution} execution The function execution to verify
|
|
202
202
|
* @param {VerifyingKey} verifying_key The verifying key for the function
|
|
203
203
|
* @param {Program} program The program that the function execution belongs to
|
|
204
204
|
* @param {String} function_id The name of the function that was executed
|
|
205
|
+
* @param {Object} imports The imports for the program in the form of { "program_id.aleo":"source code", ... }
|
|
206
|
+
* @param {Object} import_verifying_keys The verifying keys for the imports in the form of { "program_id.aleo": [["function, "verifying_key"], ...], ...}
|
|
205
207
|
* @returns {boolean} True if the execution is valid, false otherwise
|
|
206
208
|
* @param {Execution} execution
|
|
207
209
|
* @param {VerifyingKey} verifying_key
|
|
208
210
|
* @param {Program} program
|
|
209
211
|
* @param {string} function_id
|
|
212
|
+
* @param {object | null} [imports]
|
|
213
|
+
* @param {object | null} [imported_verifying_keys]
|
|
210
214
|
* @returns {boolean}
|
|
211
215
|
*/
|
|
212
|
-
function verifyFunctionExecution(execution, verifying_key, program, function_id) {
|
|
216
|
+
function verifyFunctionExecution(execution, verifying_key, program, function_id, imports, imported_verifying_keys) {
|
|
213
217
|
try {
|
|
214
218
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
215
219
|
_assertClass(execution, Execution);
|
|
@@ -217,7 +221,7 @@ function verifyFunctionExecution(execution, verifying_key, program, function_id)
|
|
|
217
221
|
_assertClass(program, Program);
|
|
218
222
|
const ptr0 = passStringToWasm0(function_id, wasm.__wbindgen_export_3, wasm.__wbindgen_export_4);
|
|
219
223
|
const len0 = WASM_VECTOR_LEN;
|
|
220
|
-
wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0);
|
|
224
|
+
wasm.verifyFunctionExecution(retptr, execution.__wbg_ptr, verifying_key.__wbg_ptr, program.__wbg_ptr, ptr0, len0, isLikeNone(imports) ? 0 : addHeapObject(imports), isLikeNone(imported_verifying_keys) ? 0 : addHeapObject(imported_verifying_keys));
|
|
221
225
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
222
226
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
223
227
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -263,7 +267,7 @@ function __wbg_adapter_40(arg0, arg1, arg2) {
|
|
|
263
267
|
wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
|
|
264
268
|
}
|
|
265
269
|
|
|
266
|
-
function
|
|
270
|
+
function __wbg_adapter_526(arg0, arg1, arg2, arg3) {
|
|
267
271
|
wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
268
272
|
}
|
|
269
273
|
|
|
@@ -8026,6 +8030,10 @@ function __wbg_get_imports() {
|
|
|
8026
8030
|
const ret = KeyPair.__wrap(arg0);
|
|
8027
8031
|
return addHeapObject(ret);
|
|
8028
8032
|
};
|
|
8033
|
+
imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
|
|
8034
|
+
const ret = Object.keys(getObject(arg0));
|
|
8035
|
+
return addHeapObject(ret);
|
|
8036
|
+
};
|
|
8029
8037
|
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
8030
8038
|
const ret = getObject(arg0).length;
|
|
8031
8039
|
return ret;
|
|
@@ -8052,7 +8060,7 @@ function __wbg_get_imports() {
|
|
|
8052
8060
|
const a = state0.a;
|
|
8053
8061
|
state0.a = 0;
|
|
8054
8062
|
try {
|
|
8055
|
-
return
|
|
8063
|
+
return __wbg_adapter_526(a, state0.b, arg0, arg1);
|
|
8056
8064
|
} finally {
|
|
8057
8065
|
state0.a = a;
|
|
8058
8066
|
}
|
|
@@ -8351,11 +8359,11 @@ function __wbg_get_imports() {
|
|
|
8351
8359
|
const ret = false;
|
|
8352
8360
|
return ret;
|
|
8353
8361
|
};
|
|
8354
|
-
imports.wbg.
|
|
8362
|
+
imports.wbg.__wbindgen_closure_wrapper6083 = function(arg0, arg1, arg2) {
|
|
8355
8363
|
const ret = makeMutClosure(arg0, arg1, 519, __wbg_adapter_40);
|
|
8356
8364
|
return addHeapObject(ret);
|
|
8357
8365
|
};
|
|
8358
|
-
imports.wbg.
|
|
8366
|
+
imports.wbg.__wbindgen_closure_wrapper6089 = function(arg0, arg1, arg2) {
|
|
8359
8367
|
const ret = makeMutClosure(arg0, arg1, 519, __wbg_adapter_40);
|
|
8360
8368
|
return addHeapObject(ret);
|
|
8361
8369
|
};
|