@provablehq/wasm 0.9.15-enc → 0.9.15-experimental
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 +0 -22
- package/dist/mainnet/aleo_wasm.wasm +0 -0
- package/dist/mainnet/index.js +17 -107
- package/dist/mainnet/index.js.map +1 -1
- package/dist/mainnet/worker.js +17 -107
- package/dist/mainnet/worker.js.map +1 -1
- package/dist/testnet/aleo_wasm.d.ts +0 -22
- package/dist/testnet/aleo_wasm.wasm +0 -0
- package/dist/testnet/index.js +15 -105
- package/dist/testnet/index.js.map +1 -1
- package/dist/testnet/worker.js +15 -105
- package/dist/testnet/worker.js.map +1 -1
- package/package.json +1 -1
|
@@ -120,14 +120,6 @@ export class Address {
|
|
|
120
120
|
* @returns {boolean} Boolean representing whether or not the signature is valid
|
|
121
121
|
*/
|
|
122
122
|
verify(message: Uint8Array, signature: Signature): boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Check if the input is a valid Aleo address.
|
|
125
|
-
*
|
|
126
|
-
* @param {string | Uint8Array} address - Either a string representation of an address
|
|
127
|
-
* or a Uint8Array of bytes in little-endian format.
|
|
128
|
-
* @returns {boolean} True if the input is a valid address, false otherwise.
|
|
129
|
-
*/
|
|
130
|
-
static isValid(address: any): boolean;
|
|
131
123
|
/**
|
|
132
124
|
* Get the group representation of the address object.
|
|
133
125
|
*/
|
|
@@ -4350,20 +4342,6 @@ export class ViewKey {
|
|
|
4350
4342
|
* @returns {ViewKey} View key
|
|
4351
4343
|
*/
|
|
4352
4344
|
static from_string(view_key: string): ViewKey;
|
|
4353
|
-
/**
|
|
4354
|
-
* Get the underlying bytes of a view key.
|
|
4355
|
-
*
|
|
4356
|
-
* @returns {Uint8Array} Left endian byte array representation of the view key.
|
|
4357
|
-
*/
|
|
4358
|
-
toBytesLe(): Uint8Array;
|
|
4359
|
-
/**
|
|
4360
|
-
* Get a ViewKey from a series of bytes.
|
|
4361
|
-
*
|
|
4362
|
-
* @param {Uint8Array} bytes A left endian byte array representing the view key.
|
|
4363
|
-
*
|
|
4364
|
-
* @returns {ViewKey} The view key object.
|
|
4365
|
-
*/
|
|
4366
|
-
static fromBytesLe(bytes: Uint8Array): ViewKey;
|
|
4367
4345
|
/**
|
|
4368
4346
|
* Create a new view key from a private key
|
|
4369
4347
|
*
|
|
Binary file
|
package/dist/mainnet/index.js
CHANGED
|
@@ -384,16 +384,12 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
384
384
|
}
|
|
385
385
|
return result;
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
wasm.
|
|
387
|
+
function __wasm_bindgen_func_elem_7904(arg0, arg1, arg2) {
|
|
388
|
+
wasm.__wasm_bindgen_func_elem_7904(arg0, arg1, addHeapObject(arg2));
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
function
|
|
392
|
-
wasm.
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
function __wasm_bindgen_func_elem_6806(arg0, arg1, arg2, arg3) {
|
|
396
|
-
wasm.__wasm_bindgen_func_elem_6806(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
391
|
+
function __wasm_bindgen_func_elem_6843(arg0, arg1, arg2, arg3) {
|
|
392
|
+
wasm.__wasm_bindgen_func_elem_6843(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
397
393
|
}
|
|
398
394
|
|
|
399
395
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
@@ -642,19 +638,6 @@ class Address {
|
|
|
642
638
|
const ret = wasm.address_verify(this.__wbg_ptr, ptr0, len0, signature.__wbg_ptr);
|
|
643
639
|
return ret !== 0;
|
|
644
640
|
}
|
|
645
|
-
/**
|
|
646
|
-
* Check if the input is a valid Aleo address.
|
|
647
|
-
*
|
|
648
|
-
* @param {string | Uint8Array} address - Either a string representation of an address
|
|
649
|
-
* or a Uint8Array of bytes in little-endian format.
|
|
650
|
-
* @returns {boolean} True if the input is a valid address, false otherwise.
|
|
651
|
-
* @param {any} address
|
|
652
|
-
* @returns {boolean}
|
|
653
|
-
*/
|
|
654
|
-
static isValid(address) {
|
|
655
|
-
const ret = wasm.address_isValid(addHeapObject(address));
|
|
656
|
-
return ret !== 0;
|
|
657
|
-
}
|
|
658
641
|
/**
|
|
659
642
|
* Get the group representation of the address object.
|
|
660
643
|
* @returns {Group}
|
|
@@ -13347,56 +13330,6 @@ class ViewKey {
|
|
|
13347
13330
|
const ret = wasm.viewkey_from_string(ptr0, len0);
|
|
13348
13331
|
return ViewKey.__wrap(ret);
|
|
13349
13332
|
}
|
|
13350
|
-
/**
|
|
13351
|
-
* Get the underlying bytes of a view key.
|
|
13352
|
-
*
|
|
13353
|
-
* @returns {Uint8Array} Left endian byte array representation of the view key.
|
|
13354
|
-
* @returns {Uint8Array}
|
|
13355
|
-
*/
|
|
13356
|
-
toBytesLe() {
|
|
13357
|
-
try {
|
|
13358
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
13359
|
-
wasm.viewkey_toBytesLe(retptr, this.__wbg_ptr);
|
|
13360
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
13361
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
13362
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
13363
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
13364
|
-
if (r3) {
|
|
13365
|
-
throw takeObject(r2);
|
|
13366
|
-
}
|
|
13367
|
-
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
13368
|
-
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
13369
|
-
return v1;
|
|
13370
|
-
} finally {
|
|
13371
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
13372
|
-
}
|
|
13373
|
-
}
|
|
13374
|
-
/**
|
|
13375
|
-
* Get a ViewKey from a series of bytes.
|
|
13376
|
-
*
|
|
13377
|
-
* @param {Uint8Array} bytes A left endian byte array representing the view key.
|
|
13378
|
-
*
|
|
13379
|
-
* @returns {ViewKey} The view key object.
|
|
13380
|
-
* @param {Uint8Array} bytes
|
|
13381
|
-
* @returns {ViewKey}
|
|
13382
|
-
*/
|
|
13383
|
-
static fromBytesLe(bytes) {
|
|
13384
|
-
try {
|
|
13385
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
13386
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
13387
|
-
const len0 = WASM_VECTOR_LEN;
|
|
13388
|
-
wasm.viewkey_fromBytesLe(retptr, ptr0, len0);
|
|
13389
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
13390
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
13391
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
13392
|
-
if (r2) {
|
|
13393
|
-
throw takeObject(r1);
|
|
13394
|
-
}
|
|
13395
|
-
return ViewKey.__wrap(r0);
|
|
13396
|
-
} finally {
|
|
13397
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
13398
|
-
}
|
|
13399
|
-
}
|
|
13400
13333
|
/**
|
|
13401
13334
|
* Create a new view key from a private key
|
|
13402
13335
|
*
|
|
@@ -13626,10 +13559,6 @@ function __wbg_get_imports(memory) {
|
|
|
13626
13559
|
const ret = Ciphertext.__wrap(arg0);
|
|
13627
13560
|
return addHeapObject(ret);
|
|
13628
13561
|
};
|
|
13629
|
-
imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
|
|
13630
|
-
const ret = clearTimeout(takeObject(arg0));
|
|
13631
|
-
return addHeapObject(ret);
|
|
13632
|
-
};
|
|
13633
13562
|
imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
13634
13563
|
const ret = getObject(arg0).crypto;
|
|
13635
13564
|
return addHeapObject(ret);
|
|
@@ -13706,16 +13635,6 @@ function __wbg_get_imports(memory) {
|
|
|
13706
13635
|
const ret = result;
|
|
13707
13636
|
return ret;
|
|
13708
13637
|
};
|
|
13709
|
-
imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
|
|
13710
|
-
let result;
|
|
13711
|
-
try {
|
|
13712
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
13713
|
-
} catch (_) {
|
|
13714
|
-
result = false;
|
|
13715
|
-
}
|
|
13716
|
-
const ret = result;
|
|
13717
|
-
return ret;
|
|
13718
|
-
};
|
|
13719
13638
|
imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
|
|
13720
13639
|
const ret = Symbol.iterator;
|
|
13721
13640
|
return addHeapObject(ret);
|
|
@@ -13736,7 +13655,7 @@ function __wbg_get_imports(memory) {
|
|
|
13736
13655
|
const ret = getObject(arg0).length;
|
|
13737
13656
|
return ret;
|
|
13738
13657
|
};
|
|
13739
|
-
imports.wbg.
|
|
13658
|
+
imports.wbg.__wbg_log_18b1b5033e71ce56 = function(arg0, arg1) {
|
|
13740
13659
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
13741
13660
|
};
|
|
13742
13661
|
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
@@ -13758,7 +13677,7 @@ function __wbg_get_imports(memory) {
|
|
|
13758
13677
|
const a = state0.a;
|
|
13759
13678
|
state0.a = 0;
|
|
13760
13679
|
try {
|
|
13761
|
-
return
|
|
13680
|
+
return __wasm_bindgen_func_elem_6843(a, state0.b, arg0, arg1);
|
|
13762
13681
|
} finally {
|
|
13763
13682
|
state0.a = a;
|
|
13764
13683
|
}
|
|
@@ -13905,10 +13824,6 @@ function __wbg_get_imports(memory) {
|
|
|
13905
13824
|
imports.wbg.__wbg_send_2e90b7c1fa1cdaf6 = function() { return handleError(function (arg0) {
|
|
13906
13825
|
getObject(arg0).send();
|
|
13907
13826
|
}, arguments) };
|
|
13908
|
-
imports.wbg.__wbg_setTimeout_db2dbaeefb6f39c7 = function() { return handleError(function (arg0, arg1) {
|
|
13909
|
-
const ret = setTimeout(getObject(arg0), arg1);
|
|
13910
|
-
return addHeapObject(ret);
|
|
13911
|
-
}, arguments) };
|
|
13912
13827
|
imports.wbg.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
|
|
13913
13828
|
getObject(arg0).body = getObject(arg1);
|
|
13914
13829
|
};
|
|
@@ -13945,7 +13860,7 @@ function __wbg_get_imports(memory) {
|
|
|
13945
13860
|
const ret = Signature.__wrap(arg0);
|
|
13946
13861
|
return addHeapObject(ret);
|
|
13947
13862
|
};
|
|
13948
|
-
imports.wbg.
|
|
13863
|
+
imports.wbg.__wbg_spawnWorker_d62aa2b98d4857e3 = function(arg0, arg1, arg2, arg3) {
|
|
13949
13864
|
const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
|
|
13950
13865
|
return addHeapObject(ret);
|
|
13951
13866
|
};
|
|
@@ -14035,16 +13950,6 @@ function __wbg_get_imports(memory) {
|
|
|
14035
13950
|
const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
|
|
14036
13951
|
return addHeapObject(ret);
|
|
14037
13952
|
};
|
|
14038
|
-
imports.wbg.__wbindgen_cast_06d105bd9273956e = function(arg0, arg1) {
|
|
14039
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 418, function: Function { arguments: [], shim_idx: 507, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
14040
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_6532, __wasm_bindgen_func_elem_6533);
|
|
14041
|
-
return addHeapObject(ret);
|
|
14042
|
-
};
|
|
14043
|
-
imports.wbg.__wbindgen_cast_07555e2579ff3863 = function(arg0, arg1) {
|
|
14044
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 418, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 419, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
14045
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_6532, __wasm_bindgen_func_elem_7853);
|
|
14046
|
-
return addHeapObject(ret);
|
|
14047
|
-
};
|
|
14048
13953
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
14049
13954
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
14050
13955
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -14060,16 +13965,16 @@ function __wbg_get_imports(memory) {
|
|
|
14060
13965
|
const ret = BigInt.asUintN(64, arg0);
|
|
14061
13966
|
return addHeapObject(ret);
|
|
14062
13967
|
};
|
|
14063
|
-
imports.wbg.__wbindgen_cast_72bd42f236eeae61 = function(arg0, arg1) {
|
|
14064
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 418, function: Function { arguments: [Externref], shim_idx: 419, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
14065
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_6532, __wasm_bindgen_func_elem_7853);
|
|
14066
|
-
return addHeapObject(ret);
|
|
14067
|
-
};
|
|
14068
13968
|
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
14069
13969
|
// Cast intrinsic for `I64 -> Externref`.
|
|
14070
13970
|
const ret = arg0;
|
|
14071
13971
|
return addHeapObject(ret);
|
|
14072
13972
|
};
|
|
13973
|
+
imports.wbg.__wbindgen_cast_b12e01d2141c5571 = function(arg0, arg1) {
|
|
13974
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 350, function: Function { arguments: [Externref], shim_idx: 351, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
13975
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7903, __wasm_bindgen_func_elem_7904);
|
|
13976
|
+
return addHeapObject(ret);
|
|
13977
|
+
};
|
|
14073
13978
|
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
14074
13979
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
14075
13980
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
@@ -14080,6 +13985,11 @@ function __wbg_get_imports(memory) {
|
|
|
14080
13985
|
const ret = arg0;
|
|
14081
13986
|
return addHeapObject(ret);
|
|
14082
13987
|
};
|
|
13988
|
+
imports.wbg.__wbindgen_cast_e1df7fdea90be615 = function(arg0, arg1) {
|
|
13989
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 350, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 351, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
13990
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7903, __wasm_bindgen_func_elem_7904);
|
|
13991
|
+
return addHeapObject(ret);
|
|
13992
|
+
};
|
|
14083
13993
|
imports.wbg.__wbindgen_cast_e7b45dd881f38ce3 = function(arg0, arg1) {
|
|
14084
13994
|
// Cast intrinsic for `U128 -> Externref`.
|
|
14085
13995
|
const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
|