@provablehq/wasm 0.10.2 → 0.10.4
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 +7 -1
- package/dist/mainnet/aleo_wasm.wasm +0 -0
- package/dist/mainnet/index.cjs +18883 -0
- package/dist/mainnet/index.cjs.map +1 -0
- package/dist/mainnet/index.d.cts +8 -0
- package/dist/mainnet/index.js +42 -32
- package/dist/mainnet/index.js.map +1 -1
- package/dist/mainnet/worker.js +42 -32
- package/dist/mainnet/worker.js.map +1 -1
- package/dist/testnet/aleo_wasm.d.ts +19 -13
- package/dist/testnet/aleo_wasm.wasm +0 -0
- package/dist/testnet/index.cjs +18883 -0
- package/dist/testnet/index.cjs.map +1 -0
- package/dist/testnet/index.d.cts +8 -0
- package/dist/testnet/index.js +69 -59
- package/dist/testnet/index.js.map +1 -1
- package/dist/testnet/worker.js +69 -59
- package/dist/testnet/worker.js.map +1 -1
- package/package.json +35 -7
package/dist/mainnet/worker.js
CHANGED
|
@@ -410,26 +410,6 @@ function snarkVerifyBatch(verifying_keys, inputs, proof) {
|
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
-
/**
|
|
414
|
-
* Set test consensus version heights for testing.
|
|
415
|
-
*
|
|
416
|
-
* @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.
|
|
417
|
-
*
|
|
418
|
-
* @example
|
|
419
|
-
* import { getOrInitConsensusVersionTestHeights } from '@provablehq/sdk';
|
|
420
|
-
*
|
|
421
|
-
* Set the consensus version heights.
|
|
422
|
-
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13");
|
|
423
|
-
* @param {string | null} [heights]
|
|
424
|
-
* @returns {Array<any>}
|
|
425
|
-
*/
|
|
426
|
-
function getOrInitConsensusVersionTestHeights(heights) {
|
|
427
|
-
var ptr0 = isLikeNone(heights) ? 0 : passStringToWasm0(heights, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
428
|
-
var len0 = WASM_VECTOR_LEN;
|
|
429
|
-
const ret = wasm.getOrInitConsensusVersionTestHeights(ptr0, len0);
|
|
430
|
-
return takeObject(ret);
|
|
431
|
-
}
|
|
432
|
-
|
|
433
413
|
/**
|
|
434
414
|
* @param {string} string
|
|
435
415
|
* @returns {Field}
|
|
@@ -452,6 +432,26 @@ function stringToField(string) {
|
|
|
452
432
|
}
|
|
453
433
|
}
|
|
454
434
|
|
|
435
|
+
/**
|
|
436
|
+
* Set test consensus version heights for testing.
|
|
437
|
+
*
|
|
438
|
+
* @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.
|
|
439
|
+
*
|
|
440
|
+
* @example
|
|
441
|
+
* import { getOrInitConsensusVersionTestHeights } from '@provablehq/sdk';
|
|
442
|
+
*
|
|
443
|
+
* Set the consensus version heights.
|
|
444
|
+
* getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13");
|
|
445
|
+
* @param {string | null} [heights]
|
|
446
|
+
* @returns {Array<any>}
|
|
447
|
+
*/
|
|
448
|
+
function getOrInitConsensusVersionTestHeights(heights) {
|
|
449
|
+
var ptr0 = isLikeNone(heights) ? 0 : passStringToWasm0(heights, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
450
|
+
var len0 = WASM_VECTOR_LEN;
|
|
451
|
+
const ret = wasm.getOrInitConsensusVersionTestHeights(ptr0, len0);
|
|
452
|
+
return takeObject(ret);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
455
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
456
456
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
457
457
|
const mem = getDataViewMemory0();
|
|
@@ -471,16 +471,16 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
471
471
|
}
|
|
472
472
|
return result;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
wasm.
|
|
474
|
+
function __wasm_bindgen_func_elem_8536(arg0, arg1, arg2) {
|
|
475
|
+
wasm.__wasm_bindgen_func_elem_8536(arg0, arg1, addHeapObject(arg2));
|
|
476
476
|
}
|
|
477
477
|
|
|
478
|
-
function
|
|
479
|
-
wasm.
|
|
478
|
+
function __wasm_bindgen_func_elem_7170(arg0, arg1) {
|
|
479
|
+
wasm.__wasm_bindgen_func_elem_7170(arg0, arg1);
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
function
|
|
483
|
-
wasm.
|
|
482
|
+
function __wasm_bindgen_func_elem_7443(arg0, arg1, arg2, arg3) {
|
|
483
|
+
wasm.__wasm_bindgen_func_elem_7443(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
@@ -9870,6 +9870,16 @@ class Program {
|
|
|
9870
9870
|
const ret = wasm.program_getImports(this.__wbg_ptr);
|
|
9871
9871
|
return takeObject(ret);
|
|
9872
9872
|
}
|
|
9873
|
+
/**
|
|
9874
|
+
* Get the checksum of the program.
|
|
9875
|
+
*
|
|
9876
|
+
* @returns {Uint8Array} The checksum of the program as a 32-byte Uint8Array
|
|
9877
|
+
* @returns {Uint8Array}
|
|
9878
|
+
*/
|
|
9879
|
+
toChecksum() {
|
|
9880
|
+
const ret = wasm.program_toChecksum(this.__wbg_ptr);
|
|
9881
|
+
return takeObject(ret);
|
|
9882
|
+
}
|
|
9873
9883
|
/**
|
|
9874
9884
|
* Get a the list of a program's mappings and the names/types of their keys and values.
|
|
9875
9885
|
*
|
|
@@ -18336,7 +18346,7 @@ function __wbg_get_imports(memory) {
|
|
|
18336
18346
|
const ret = getObject(arg0).length;
|
|
18337
18347
|
return ret;
|
|
18338
18348
|
};
|
|
18339
|
-
imports.wbg.
|
|
18349
|
+
imports.wbg.__wbg_log_4688d4dee83f4df4 = function(arg0, arg1) {
|
|
18340
18350
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
18341
18351
|
};
|
|
18342
18352
|
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
@@ -18358,7 +18368,7 @@ function __wbg_get_imports(memory) {
|
|
|
18358
18368
|
const a = state0.a;
|
|
18359
18369
|
state0.a = 0;
|
|
18360
18370
|
try {
|
|
18361
|
-
return
|
|
18371
|
+
return __wasm_bindgen_func_elem_7443(a, state0.b, arg0, arg1);
|
|
18362
18372
|
} finally {
|
|
18363
18373
|
state0.a = a;
|
|
18364
18374
|
}
|
|
@@ -18545,7 +18555,7 @@ function __wbg_get_imports(memory) {
|
|
|
18545
18555
|
const ret = Signature.__wrap(arg0);
|
|
18546
18556
|
return addHeapObject(ret);
|
|
18547
18557
|
};
|
|
18548
|
-
imports.wbg.
|
|
18558
|
+
imports.wbg.__wbg_spawnWorker_9ce4a98fc7b6f238 = function(arg0, arg1, arg2, arg3) {
|
|
18549
18559
|
const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
|
|
18550
18560
|
return addHeapObject(ret);
|
|
18551
18561
|
};
|
|
@@ -18652,7 +18662,7 @@ function __wbg_get_imports(memory) {
|
|
|
18652
18662
|
};
|
|
18653
18663
|
imports.wbg.__wbindgen_cast_711d7deea8fc39ca = function(arg0, arg1) {
|
|
18654
18664
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 356, function: Function { arguments: [Externref], shim_idx: 357, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
18655
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
18665
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7169, __wasm_bindgen_func_elem_8536);
|
|
18656
18666
|
return addHeapObject(ret);
|
|
18657
18667
|
};
|
|
18658
18668
|
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
@@ -18662,12 +18672,12 @@ function __wbg_get_imports(memory) {
|
|
|
18662
18672
|
};
|
|
18663
18673
|
imports.wbg.__wbindgen_cast_bff04fdc9653fdb7 = function(arg0, arg1) {
|
|
18664
18674
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 356, function: Function { arguments: [], shim_idx: 465, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
18665
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
18675
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7169, __wasm_bindgen_func_elem_7170);
|
|
18666
18676
|
return addHeapObject(ret);
|
|
18667
18677
|
};
|
|
18668
18678
|
imports.wbg.__wbindgen_cast_cada7727142cd213 = function(arg0, arg1) {
|
|
18669
18679
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 356, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 357, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
18670
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
18680
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7169, __wasm_bindgen_func_elem_8536);
|
|
18671
18681
|
return addHeapObject(ret);
|
|
18672
18682
|
};
|
|
18673
18683
|
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|