@provablehq/wasm 0.11.6 → 0.11.8
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 +25 -25
- package/dist/mainnet/aleo_wasm.wasm +0 -0
- package/dist/mainnet/index.cjs +95 -95
- package/dist/mainnet/index.cjs.map +1 -1
- package/dist/mainnet/index.js +95 -95
- package/dist/mainnet/index.js.map +1 -1
- package/dist/mainnet/worker.js +95 -95
- package/dist/mainnet/worker.js.map +1 -1
- package/dist/testnet/aleo_wasm.d.ts +13 -13
- package/dist/testnet/aleo_wasm.wasm +0 -0
- package/dist/testnet/index.cjs +50 -50
- package/dist/testnet/index.cjs.map +1 -1
- package/dist/testnet/index.js +50 -50
- package/dist/testnet/index.js.map +1 -1
- package/dist/testnet/worker.js +50 -50
- package/dist/testnet/worker.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export function runRayonThread(receiver: number): void;
|
|
4
|
+
export function initThreadPool(url: URL, num_threads: number): Promise<void>;
|
|
4
5
|
/**
|
|
5
6
|
* Set the WASM log level from JS. Called automatically by the SDK's
|
|
6
7
|
* `setLogLevel(level)` to keep TS and WASM logging in sync.
|
|
@@ -8,7 +9,6 @@ export function runRayonThread(receiver: number): void;
|
|
|
8
9
|
* Values above 4 are clamped to debug.
|
|
9
10
|
*/
|
|
10
11
|
export function setWasmLogLevel(level: number): void;
|
|
11
|
-
export function initThreadPool(url: URL, num_threads: number): Promise<void>;
|
|
12
12
|
/**
|
|
13
13
|
* Verify a SNARK proof against a verifying key and public inputs.
|
|
14
14
|
*
|
|
@@ -47,18 +47,6 @@ export function verifyFunctionExecution(execution: Execution, verifying_key: Ver
|
|
|
47
47
|
* @returns {boolean} True if the batch proof is valid, false otherwise
|
|
48
48
|
*/
|
|
49
49
|
export function snarkVerifyBatch(verifying_keys: Array<any>, inputs: Array<any>, proof: Proof): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Set test consensus version heights for testing.
|
|
52
|
-
*
|
|
53
|
-
* @param {string | undefined} heights The block heights at which each consensus version applies. This input should be a simple csv list of block heights and there should be one number for each consensus version. If left undefined, the default test heights will be applied.
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* import { getOrInitConsensusVersionTestHeights } from '@provablehq/sdk';
|
|
57
|
-
*
|
|
58
|
-
* Set the consensus version heights.
|
|
59
|
-
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17");
|
|
60
|
-
*/
|
|
61
|
-
export function getOrInitConsensusVersionTestHeights(heights?: string | null): Array<any>;
|
|
62
50
|
/**
|
|
63
51
|
* Returns the maximum number of imports allowed in a program by the
|
|
64
52
|
* snarkVM network implementation this SDK was built against.
|
|
@@ -71,6 +59,18 @@ export function getOrInitConsensusVersionTestHeights(heights?: string | null): A
|
|
|
71
59
|
* const maxImports = getMaxProgramImports();
|
|
72
60
|
*/
|
|
73
61
|
export function getMaxProgramImports(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Set test consensus version heights for testing.
|
|
64
|
+
*
|
|
65
|
+
* @param {string | undefined} heights The block heights at which each consensus version applies. This input should be a simple csv list of block heights and there should be one number for each consensus version. If left undefined, the default test heights will be applied.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* import { getOrInitConsensusVersionTestHeights } from '@provablehq/sdk';
|
|
69
|
+
*
|
|
70
|
+
* Set the consensus version heights.
|
|
71
|
+
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18");
|
|
72
|
+
*/
|
|
73
|
+
export function getOrInitConsensusVersionTestHeights(heights?: string | null): Array<any>;
|
|
74
74
|
export function stringToField(string: string): Field;
|
|
75
75
|
/**
|
|
76
76
|
* Public address of an Aleo account
|
|
Binary file
|
package/dist/testnet/index.cjs
CHANGED
|
@@ -292,6 +292,16 @@ function runRayonThread(receiver) {
|
|
|
292
292
|
wasm$1.runRayonThread(receiver);
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
+
/**
|
|
296
|
+
* @param {URL} url
|
|
297
|
+
* @param {number} num_threads
|
|
298
|
+
* @returns {Promise<void>}
|
|
299
|
+
*/
|
|
300
|
+
function initThreadPool(url, num_threads) {
|
|
301
|
+
const ret = wasm$1.initThreadPool(addHeapObject(url), num_threads);
|
|
302
|
+
return takeObject(ret);
|
|
303
|
+
}
|
|
304
|
+
|
|
295
305
|
/**
|
|
296
306
|
* Set the WASM log level from JS. Called automatically by the SDK's
|
|
297
307
|
* `setLogLevel(level)` to keep TS and WASM logging in sync.
|
|
@@ -303,16 +313,6 @@ function setWasmLogLevel(level) {
|
|
|
303
313
|
wasm$1.setWasmLogLevel(level);
|
|
304
314
|
}
|
|
305
315
|
|
|
306
|
-
/**
|
|
307
|
-
* @param {URL} url
|
|
308
|
-
* @param {number} num_threads
|
|
309
|
-
* @returns {Promise<void>}
|
|
310
|
-
*/
|
|
311
|
-
function initThreadPool(url, num_threads) {
|
|
312
|
-
const ret = wasm$1.initThreadPool(addHeapObject(url), num_threads);
|
|
313
|
-
return takeObject(ret);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
316
|
let stack_pointer = 128;
|
|
317
317
|
|
|
318
318
|
function addBorrowedObject(obj) {
|
|
@@ -433,6 +433,23 @@ function snarkVerifyBatch(verifying_keys, inputs, proof) {
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
+
/**
|
|
437
|
+
* Returns the maximum number of imports allowed in a program by the
|
|
438
|
+
* snarkVM network implementation this SDK was built against.
|
|
439
|
+
*
|
|
440
|
+
* @returns {number} The maximum number of program imports.
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* import { getMaxProgramImports } from '@provablehq/sdk';
|
|
444
|
+
*
|
|
445
|
+
* const maxImports = getMaxProgramImports();
|
|
446
|
+
* @returns {number}
|
|
447
|
+
*/
|
|
448
|
+
function getMaxProgramImports() {
|
|
449
|
+
const ret = wasm$1.getMaxProgramImports();
|
|
450
|
+
return ret >>> 0;
|
|
451
|
+
}
|
|
452
|
+
|
|
436
453
|
/**
|
|
437
454
|
* Set test consensus version heights for testing.
|
|
438
455
|
*
|
|
@@ -442,7 +459,7 @@ function snarkVerifyBatch(verifying_keys, inputs, proof) {
|
|
|
442
459
|
* import { getOrInitConsensusVersionTestHeights } from '@provablehq/sdk';
|
|
443
460
|
*
|
|
444
461
|
* Set the consensus version heights.
|
|
445
|
-
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17");
|
|
462
|
+
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18");
|
|
446
463
|
* @param {string | null} [heights]
|
|
447
464
|
* @returns {Array<any>}
|
|
448
465
|
*/
|
|
@@ -453,23 +470,6 @@ function getOrInitConsensusVersionTestHeights(heights) {
|
|
|
453
470
|
return takeObject(ret);
|
|
454
471
|
}
|
|
455
472
|
|
|
456
|
-
/**
|
|
457
|
-
* Returns the maximum number of imports allowed in a program by the
|
|
458
|
-
* snarkVM network implementation this SDK was built against.
|
|
459
|
-
*
|
|
460
|
-
* @returns {number} The maximum number of program imports.
|
|
461
|
-
*
|
|
462
|
-
* @example
|
|
463
|
-
* import { getMaxProgramImports } from '@provablehq/sdk';
|
|
464
|
-
*
|
|
465
|
-
* const maxImports = getMaxProgramImports();
|
|
466
|
-
* @returns {number}
|
|
467
|
-
*/
|
|
468
|
-
function getMaxProgramImports() {
|
|
469
|
-
const ret = wasm$1.getMaxProgramImports();
|
|
470
|
-
return ret >>> 0;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
473
|
/**
|
|
474
474
|
* @param {string} string
|
|
475
475
|
* @returns {Field}
|
|
@@ -511,16 +511,16 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
511
511
|
}
|
|
512
512
|
return result;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
515
|
-
wasm$1.
|
|
514
|
+
function __wasm_bindgen_func_elem_7506(arg0, arg1) {
|
|
515
|
+
wasm$1.__wasm_bindgen_func_elem_7506(arg0, arg1);
|
|
516
516
|
}
|
|
517
517
|
|
|
518
|
-
function
|
|
519
|
-
wasm$1.
|
|
518
|
+
function __wasm_bindgen_func_elem_8948(arg0, arg1, arg2) {
|
|
519
|
+
wasm$1.__wasm_bindgen_func_elem_8948(arg0, arg1, addHeapObject(arg2));
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
function
|
|
523
|
-
wasm$1.
|
|
522
|
+
function __wasm_bindgen_func_elem_7779(arg0, arg1, arg2, arg3) {
|
|
523
|
+
wasm$1.__wasm_bindgen_func_elem_7779(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
@@ -19325,7 +19325,7 @@ function __wbg_get_imports(memory) {
|
|
|
19325
19325
|
const ret = getObject(arg0).length;
|
|
19326
19326
|
return ret;
|
|
19327
19327
|
};
|
|
19328
|
-
imports.wbg.
|
|
19328
|
+
imports.wbg.__wbg_log_7ab0c7ccba2f0588 = function(arg0, arg1) {
|
|
19329
19329
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
19330
19330
|
};
|
|
19331
19331
|
imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
|
|
@@ -19343,7 +19343,7 @@ function __wbg_get_imports(memory) {
|
|
|
19343
19343
|
const a = state0.a;
|
|
19344
19344
|
state0.a = 0;
|
|
19345
19345
|
try {
|
|
19346
|
-
return
|
|
19346
|
+
return __wasm_bindgen_func_elem_7779(a, state0.b, arg0, arg1);
|
|
19347
19347
|
} finally {
|
|
19348
19348
|
state0.a = a;
|
|
19349
19349
|
}
|
|
@@ -19515,7 +19515,7 @@ function __wbg_get_imports(memory) {
|
|
|
19515
19515
|
const ret = Signature.__wrap(arg0);
|
|
19516
19516
|
return addHeapObject(ret);
|
|
19517
19517
|
};
|
|
19518
|
-
imports.wbg.
|
|
19518
|
+
imports.wbg.__wbg_spawnWorker_69898deb011084cf = function(arg0, arg1, arg2, arg3) {
|
|
19519
19519
|
const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
|
|
19520
19520
|
return addHeapObject(ret);
|
|
19521
19521
|
};
|
|
@@ -19597,6 +19597,11 @@ function __wbg_get_imports(memory) {
|
|
|
19597
19597
|
const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
|
|
19598
19598
|
return addHeapObject(ret);
|
|
19599
19599
|
};
|
|
19600
|
+
imports.wbg.__wbindgen_cast_19cdf6e41653eb6c = function(arg0, arg1) {
|
|
19601
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 397, function: Function { arguments: [Externref], shim_idx: 398, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
19602
|
+
const ret = makeMutClosure(arg0, arg1, wasm$1.__wasm_bindgen_func_elem_7505, __wasm_bindgen_func_elem_8948);
|
|
19603
|
+
return addHeapObject(ret);
|
|
19604
|
+
};
|
|
19600
19605
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
19601
19606
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
19602
19607
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -19612,9 +19617,9 @@ function __wbg_get_imports(memory) {
|
|
|
19612
19617
|
const ret = BigInt.asUintN(64, arg0);
|
|
19613
19618
|
return addHeapObject(ret);
|
|
19614
19619
|
};
|
|
19615
|
-
imports.wbg.
|
|
19616
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
19617
|
-
const ret = makeMutClosure(arg0, arg1, wasm$1.
|
|
19620
|
+
imports.wbg.__wbindgen_cast_601de75c058a35e1 = function(arg0, arg1) {
|
|
19621
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 397, function: Function { arguments: [], shim_idx: 528, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
19622
|
+
const ret = makeMutClosure(arg0, arg1, wasm$1.__wasm_bindgen_func_elem_7505, __wasm_bindgen_func_elem_7506);
|
|
19618
19623
|
return addHeapObject(ret);
|
|
19619
19624
|
};
|
|
19620
19625
|
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
@@ -19622,26 +19627,21 @@ function __wbg_get_imports(memory) {
|
|
|
19622
19627
|
const ret = arg0;
|
|
19623
19628
|
return addHeapObject(ret);
|
|
19624
19629
|
};
|
|
19625
|
-
imports.wbg.__wbindgen_cast_b5deba2f813aede2 = function(arg0, arg1) {
|
|
19626
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 390, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 391, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
19627
|
-
const ret = makeMutClosure(arg0, arg1, wasm$1.__wasm_bindgen_func_elem_7462, __wasm_bindgen_func_elem_8910);
|
|
19628
|
-
return addHeapObject(ret);
|
|
19629
|
-
};
|
|
19630
19630
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
19631
19631
|
// Cast intrinsic for `F64 -> Externref`.
|
|
19632
19632
|
const ret = arg0;
|
|
19633
19633
|
return addHeapObject(ret);
|
|
19634
19634
|
};
|
|
19635
|
-
imports.wbg.__wbindgen_cast_e15614d8168764d1 = function(arg0, arg1) {
|
|
19636
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 390, function: Function { arguments: [Externref], shim_idx: 391, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
19637
|
-
const ret = makeMutClosure(arg0, arg1, wasm$1.__wasm_bindgen_func_elem_7462, __wasm_bindgen_func_elem_8910);
|
|
19638
|
-
return addHeapObject(ret);
|
|
19639
|
-
};
|
|
19640
19635
|
imports.wbg.__wbindgen_cast_e7b45dd881f38ce3 = function(arg0, arg1) {
|
|
19641
19636
|
// Cast intrinsic for `U128 -> Externref`.
|
|
19642
19637
|
const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
|
|
19643
19638
|
return addHeapObject(ret);
|
|
19644
19639
|
};
|
|
19640
|
+
imports.wbg.__wbindgen_cast_eb522c22a7f98ff2 = function(arg0, arg1) {
|
|
19641
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 397, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 398, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
19642
|
+
const ret = makeMutClosure(arg0, arg1, wasm$1.__wasm_bindgen_func_elem_7505, __wasm_bindgen_func_elem_8948);
|
|
19643
|
+
return addHeapObject(ret);
|
|
19644
|
+
};
|
|
19645
19645
|
imports.wbg.__wbindgen_link_b9f45ffe079ef2c1 = function(arg0) {
|
|
19646
19646
|
const val = `onmessage = function (ev) {
|
|
19647
19647
|
let [ia, index, value] = ev.data;
|