@provablehq/wasm 0.10.4 → 0.10.5-rc.1
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 +79 -22
- package/dist/mainnet/aleo_wasm.wasm +0 -0
- package/dist/mainnet/index.cjs +241 -73
- package/dist/mainnet/index.cjs.map +1 -1
- package/dist/mainnet/index.js +240 -74
- package/dist/mainnet/index.js.map +1 -1
- package/dist/mainnet/worker.js +241 -73
- package/dist/mainnet/worker.js.map +1 -1
- package/dist/testnet/aleo_wasm.d.ts +63 -6
- package/dist/testnet/aleo_wasm.wasm +0 -0
- package/dist/testnet/index.cjs +220 -52
- package/dist/testnet/index.cjs.map +1 -1
- package/dist/testnet/index.js +219 -53
- package/dist/testnet/index.js.map +1 -1
- package/dist/testnet/worker.js +220 -52
- package/dist/testnet/worker.js.map +1 -1
- package/package.json +1 -1
package/dist/testnet/index.js
CHANGED
|
@@ -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_8577(arg0, arg1, arg2) {
|
|
475
|
+
wasm.__wasm_bindgen_func_elem_8577(arg0, arg1, addHeapObject(arg2));
|
|
476
476
|
}
|
|
477
477
|
|
|
478
|
-
function
|
|
479
|
-
wasm.
|
|
478
|
+
function __wasm_bindgen_func_elem_7220(arg0, arg1) {
|
|
479
|
+
wasm.__wasm_bindgen_func_elem_7220(arg0, arg1);
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
function
|
|
483
|
-
wasm.
|
|
482
|
+
function __wasm_bindgen_func_elem_7492(arg0, arg1, arg2, arg3) {
|
|
483
|
+
wasm.__wasm_bindgen_func_elem_7492(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
@@ -2223,6 +2223,48 @@ class Boolean {
|
|
|
2223
2223
|
}
|
|
2224
2224
|
if (Symbol.dispose) Boolean.prototype[Symbol.dispose] = Boolean.prototype.free;
|
|
2225
2225
|
|
|
2226
|
+
const CallbackQueryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2227
|
+
? { register: () => {}, unregister: () => {} }
|
|
2228
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_callbackquery_free(ptr >>> 0, 1));
|
|
2229
|
+
/**
|
|
2230
|
+
* A query implementation that delegates state fetching to JS callback functions.
|
|
2231
|
+
*
|
|
2232
|
+
* Instead of making direct HTTP calls via reqwest, each QueryTrait method
|
|
2233
|
+
* calls a JS function that returns a Promise. The JS side handles the actual
|
|
2234
|
+
* network request through the configured transport.
|
|
2235
|
+
*/
|
|
2236
|
+
class CallbackQuery {
|
|
2237
|
+
|
|
2238
|
+
__destroy_into_raw() {
|
|
2239
|
+
const ptr = this.__wbg_ptr;
|
|
2240
|
+
this.__wbg_ptr = 0;
|
|
2241
|
+
CallbackQueryFinalization.unregister(this);
|
|
2242
|
+
return ptr;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
free() {
|
|
2246
|
+
const ptr = this.__destroy_into_raw();
|
|
2247
|
+
wasm.__wbg_callbackquery_free(ptr, 0);
|
|
2248
|
+
}
|
|
2249
|
+
/**
|
|
2250
|
+
* Create a new CallbackQuery with JS callback functions.
|
|
2251
|
+
*
|
|
2252
|
+
* @param {Function} get_state_root A function that returns Promise<string> (the state root)
|
|
2253
|
+
* @param {Function} get_state_paths A function that takes string[] (commitments) and returns Promise<string[]> (state paths)
|
|
2254
|
+
* @param {Function} get_block_height A function that returns Promise<number> (the block height)
|
|
2255
|
+
* @param {Function} get_state_root
|
|
2256
|
+
* @param {Function} get_state_paths
|
|
2257
|
+
* @param {Function} get_block_height
|
|
2258
|
+
*/
|
|
2259
|
+
constructor(get_state_root, get_state_paths, get_block_height) {
|
|
2260
|
+
const ret = wasm.callbackquery_new(addHeapObject(get_state_root), addHeapObject(get_state_paths), addHeapObject(get_block_height));
|
|
2261
|
+
this.__wbg_ptr = ret >>> 0;
|
|
2262
|
+
CallbackQueryFinalization.register(this, this.__wbg_ptr, this);
|
|
2263
|
+
return this;
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
if (Symbol.dispose) CallbackQuery.prototype[Symbol.dispose] = CallbackQuery.prototype.free;
|
|
2267
|
+
|
|
2226
2268
|
const CiphertextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2227
2269
|
? { register: () => {}, unregister: () => {} }
|
|
2228
2270
|
: new FinalizationRegistry(ptr => wasm.__wbg_ciphertext_free(ptr >>> 0, 1));
|
|
@@ -10367,10 +10409,10 @@ class ProgramManager {
|
|
|
10367
10409
|
* @param {VerifyingKey | null} [join_verifying_key]
|
|
10368
10410
|
* @param {ProvingKey | null} [fee_proving_key]
|
|
10369
10411
|
* @param {VerifyingKey | null} [fee_verifying_key]
|
|
10370
|
-
* @param {
|
|
10412
|
+
* @param {QueryOption | null} [query]
|
|
10371
10413
|
* @returns {Promise<Transaction>}
|
|
10372
10414
|
*/
|
|
10373
|
-
static buildJoinTransaction(private_key, record_1, record_2, priority_fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key,
|
|
10415
|
+
static buildJoinTransaction(private_key, record_1, record_2, priority_fee_credits, fee_record, url, join_proving_key, join_verifying_key, fee_proving_key, fee_verifying_key, query) {
|
|
10374
10416
|
_assertClass(private_key, PrivateKey);
|
|
10375
10417
|
_assertClass(record_1, RecordPlaintext);
|
|
10376
10418
|
var ptr0 = record_1.__destroy_into_raw();
|
|
@@ -10404,9 +10446,9 @@ class ProgramManager {
|
|
|
10404
10446
|
ptr7 = fee_verifying_key.__destroy_into_raw();
|
|
10405
10447
|
}
|
|
10406
10448
|
let ptr8 = 0;
|
|
10407
|
-
if (!isLikeNone(
|
|
10408
|
-
_assertClass(
|
|
10409
|
-
ptr8 =
|
|
10449
|
+
if (!isLikeNone(query)) {
|
|
10450
|
+
_assertClass(query, QueryOption);
|
|
10451
|
+
ptr8 = query.__destroy_into_raw();
|
|
10410
10452
|
}
|
|
10411
10453
|
const ret = wasm.programmanager_buildJoinTransaction(private_key.__wbg_ptr, ptr0, ptr1, priority_fee_credits, ptr2, ptr3, len3, ptr4, ptr5, ptr6, ptr7, ptr8);
|
|
10412
10454
|
return takeObject(ret);
|
|
@@ -10428,10 +10470,10 @@ class ProgramManager {
|
|
|
10428
10470
|
* @param {string | null} [url]
|
|
10429
10471
|
* @param {ProvingKey | null} [split_proving_key]
|
|
10430
10472
|
* @param {VerifyingKey | null} [split_verifying_key]
|
|
10431
|
-
* @param {
|
|
10473
|
+
* @param {QueryOption | null} [query]
|
|
10432
10474
|
* @returns {Promise<Transaction>}
|
|
10433
10475
|
*/
|
|
10434
|
-
static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key,
|
|
10476
|
+
static buildSplitTransaction(private_key, split_amount, amount_record, url, split_proving_key, split_verifying_key, query) {
|
|
10435
10477
|
_assertClass(private_key, PrivateKey);
|
|
10436
10478
|
_assertClass(amount_record, RecordPlaintext);
|
|
10437
10479
|
var ptr0 = amount_record.__destroy_into_raw();
|
|
@@ -10448,9 +10490,9 @@ class ProgramManager {
|
|
|
10448
10490
|
ptr3 = split_verifying_key.__destroy_into_raw();
|
|
10449
10491
|
}
|
|
10450
10492
|
let ptr4 = 0;
|
|
10451
|
-
if (!isLikeNone(
|
|
10452
|
-
_assertClass(
|
|
10453
|
-
ptr4 =
|
|
10493
|
+
if (!isLikeNone(query)) {
|
|
10494
|
+
_assertClass(query, QueryOption);
|
|
10495
|
+
ptr4 = query.__destroy_into_raw();
|
|
10454
10496
|
}
|
|
10455
10497
|
const ret = wasm.programmanager_buildSplitTransaction(private_key.__wbg_ptr, split_amount, ptr0, ptr1, len1, ptr2, ptr3, ptr4);
|
|
10456
10498
|
return takeObject(ret);
|
|
@@ -10803,10 +10845,10 @@ class ProgramManager {
|
|
|
10803
10845
|
* @param {VerifyingKey | null} [fee_verifying_key]
|
|
10804
10846
|
* @param {object | null} [imports]
|
|
10805
10847
|
* @param {string | null} [url]
|
|
10806
|
-
* @param {
|
|
10848
|
+
* @param {QueryOption | null} [query]
|
|
10807
10849
|
* @returns {Promise<Transaction>}
|
|
10808
10850
|
*/
|
|
10809
|
-
static executeAuthorization(authorization, fee_authorization, program, proving_key, verifying_key, fee_proving_key, fee_verifying_key, imports, url,
|
|
10851
|
+
static executeAuthorization(authorization, fee_authorization, program, proving_key, verifying_key, fee_proving_key, fee_verifying_key, imports, url, query) {
|
|
10810
10852
|
_assertClass(authorization, Authorization);
|
|
10811
10853
|
var ptr0 = authorization.__destroy_into_raw();
|
|
10812
10854
|
let ptr1 = 0;
|
|
@@ -10839,9 +10881,9 @@ class ProgramManager {
|
|
|
10839
10881
|
var ptr7 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
10840
10882
|
var len7 = WASM_VECTOR_LEN;
|
|
10841
10883
|
let ptr8 = 0;
|
|
10842
|
-
if (!isLikeNone(
|
|
10843
|
-
_assertClass(
|
|
10844
|
-
ptr8 =
|
|
10884
|
+
if (!isLikeNone(query)) {
|
|
10885
|
+
_assertClass(query, QueryOption);
|
|
10886
|
+
ptr8 = query.__destroy_into_raw();
|
|
10845
10887
|
}
|
|
10846
10888
|
const ret = wasm.programmanager_executeAuthorization(ptr0, ptr1, ptr2, len2, ptr3, ptr4, ptr5, ptr6, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr7, len7, ptr8);
|
|
10847
10889
|
return takeObject(ret);
|
|
@@ -10912,11 +10954,11 @@ class ProgramManager {
|
|
|
10912
10954
|
* @param {ProvingKey | null} [proving_key]
|
|
10913
10955
|
* @param {VerifyingKey | null} [verifying_key]
|
|
10914
10956
|
* @param {string | null} [url]
|
|
10915
|
-
* @param {
|
|
10957
|
+
* @param {QueryOption | null} [query]
|
|
10916
10958
|
* @param {number | null} [edition]
|
|
10917
10959
|
* @returns {Promise<ExecutionResponse>}
|
|
10918
10960
|
*/
|
|
10919
|
-
static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url,
|
|
10961
|
+
static executeFunctionOffline(private_key, program, _function, inputs, prove_execution, cache, imports, proving_key, verifying_key, url, query, edition) {
|
|
10920
10962
|
_assertClass(private_key, PrivateKey);
|
|
10921
10963
|
const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
10922
10964
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -10935,13 +10977,60 @@ class ProgramManager {
|
|
|
10935
10977
|
var ptr4 = isLikeNone(url) ? 0 : passStringToWasm0(url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
10936
10978
|
var len4 = WASM_VECTOR_LEN;
|
|
10937
10979
|
let ptr5 = 0;
|
|
10938
|
-
if (!isLikeNone(
|
|
10939
|
-
_assertClass(
|
|
10940
|
-
ptr5 =
|
|
10980
|
+
if (!isLikeNone(query)) {
|
|
10981
|
+
_assertClass(query, QueryOption);
|
|
10982
|
+
ptr5 = query.__destroy_into_raw();
|
|
10941
10983
|
}
|
|
10942
10984
|
const ret = wasm.programmanager_executeFunctionOffline(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), prove_execution, cache, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr2, ptr3, ptr4, len4, ptr5, isLikeNone(edition) ? 0xFFFFFF : edition);
|
|
10943
10985
|
return takeObject(ret);
|
|
10944
10986
|
}
|
|
10987
|
+
/**
|
|
10988
|
+
* Compute the query requirements for a function execution without making
|
|
10989
|
+
* any network calls. Returns the commitments that need state paths and
|
|
10990
|
+
* whether the function has dynamic record inputs.
|
|
10991
|
+
*
|
|
10992
|
+
* This enables the JS layer to pre-fetch state data via its configured
|
|
10993
|
+
* transport and construct an OfflineQuery, so that the subsequent WASM
|
|
10994
|
+
* execution call never makes its own network requests.
|
|
10995
|
+
*
|
|
10996
|
+
* @param {string} program The source code of the program
|
|
10997
|
+
* @param {string} function_name The name of the function to execute
|
|
10998
|
+
* @param {Array} inputs The inputs to the function
|
|
10999
|
+
* @param {PrivateKey} private_key The private key (used to derive the view key for commitment computation)
|
|
11000
|
+
* @param {RecordPlaintext | undefined} fee_record Optional fee record to include in commitment computation
|
|
11001
|
+
* @returns {Object} An object with { commitments: string[], hasDynamicInputs: boolean }
|
|
11002
|
+
* @param {string} program
|
|
11003
|
+
* @param {string} function_name
|
|
11004
|
+
* @param {Array<any>} inputs
|
|
11005
|
+
* @param {PrivateKey} private_key
|
|
11006
|
+
* @param {RecordPlaintext | null} [fee_record]
|
|
11007
|
+
* @returns {any}
|
|
11008
|
+
*/
|
|
11009
|
+
static computeQueryRequirements(program, function_name, inputs, private_key, fee_record) {
|
|
11010
|
+
try {
|
|
11011
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
11012
|
+
const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
11013
|
+
const len0 = WASM_VECTOR_LEN;
|
|
11014
|
+
const ptr1 = passStringToWasm0(function_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
11015
|
+
const len1 = WASM_VECTOR_LEN;
|
|
11016
|
+
_assertClass(private_key, PrivateKey);
|
|
11017
|
+
let ptr2 = 0;
|
|
11018
|
+
if (!isLikeNone(fee_record)) {
|
|
11019
|
+
_assertClass(fee_record, RecordPlaintext);
|
|
11020
|
+
ptr2 = fee_record.__destroy_into_raw();
|
|
11021
|
+
}
|
|
11022
|
+
wasm.programmanager_computeQueryRequirements(retptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), private_key.__wbg_ptr, ptr2);
|
|
11023
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
11024
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
11025
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
11026
|
+
if (r2) {
|
|
11027
|
+
throw takeObject(r1);
|
|
11028
|
+
}
|
|
11029
|
+
return takeObject(r0);
|
|
11030
|
+
} finally {
|
|
11031
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
11032
|
+
}
|
|
11033
|
+
}
|
|
10945
11034
|
/**
|
|
10946
11035
|
* Estimate Fee for an Authorization.
|
|
10947
11036
|
*
|
|
@@ -11014,11 +11103,11 @@ class ProgramManager {
|
|
|
11014
11103
|
* @param {VerifyingKey | null} [verifying_key]
|
|
11015
11104
|
* @param {ProvingKey | null} [fee_proving_key]
|
|
11016
11105
|
* @param {VerifyingKey | null} [fee_verifying_key]
|
|
11017
|
-
* @param {
|
|
11106
|
+
* @param {QueryOption | null} [query]
|
|
11018
11107
|
* @param {number | null} [edition]
|
|
11019
11108
|
* @returns {Promise<Transaction>}
|
|
11020
11109
|
*/
|
|
11021
|
-
static buildExecutionTransaction(private_key, program, _function, inputs, priority_fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key,
|
|
11110
|
+
static buildExecutionTransaction(private_key, program, _function, inputs, priority_fee_credits, fee_record, url, imports, proving_key, verifying_key, fee_proving_key, fee_verifying_key, query, edition) {
|
|
11022
11111
|
_assertClass(private_key, PrivateKey);
|
|
11023
11112
|
const ptr0 = passStringToWasm0(program, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
11024
11113
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -11052,9 +11141,9 @@ class ProgramManager {
|
|
|
11052
11141
|
ptr7 = fee_verifying_key.__destroy_into_raw();
|
|
11053
11142
|
}
|
|
11054
11143
|
let ptr8 = 0;
|
|
11055
|
-
if (!isLikeNone(
|
|
11056
|
-
_assertClass(
|
|
11057
|
-
ptr8 =
|
|
11144
|
+
if (!isLikeNone(query)) {
|
|
11145
|
+
_assertClass(query, QueryOption);
|
|
11146
|
+
ptr8 = query.__destroy_into_raw();
|
|
11058
11147
|
}
|
|
11059
11148
|
const ret = wasm.programmanager_buildExecutionTransaction(private_key.__wbg_ptr, ptr0, len0, ptr1, len1, addHeapObject(inputs), priority_fee_credits, ptr2, ptr3, len3, isLikeNone(imports) ? 0 : addHeapObject(imports), ptr4, ptr5, ptr6, ptr7, ptr8, isLikeNone(edition) ? 0xFFFFFF : edition);
|
|
11060
11149
|
return takeObject(ret);
|
|
@@ -11087,10 +11176,10 @@ class ProgramManager {
|
|
|
11087
11176
|
* @param {VerifyingKey | null} [transfer_verifying_key]
|
|
11088
11177
|
* @param {ProvingKey | null} [fee_proving_key]
|
|
11089
11178
|
* @param {VerifyingKey | null} [fee_verifying_key]
|
|
11090
|
-
* @param {
|
|
11179
|
+
* @param {QueryOption | null} [query]
|
|
11091
11180
|
* @returns {Promise<Transaction>}
|
|
11092
11181
|
*/
|
|
11093
|
-
static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, priority_fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key,
|
|
11182
|
+
static buildTransferTransaction(private_key, amount_credits, recipient, transfer_type, amount_record, priority_fee_credits, fee_record, url, transfer_proving_key, transfer_verifying_key, fee_proving_key, fee_verifying_key, query) {
|
|
11094
11183
|
_assertClass(private_key, PrivateKey);
|
|
11095
11184
|
const ptr0 = passStringToWasm0(recipient, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
11096
11185
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -11129,9 +11218,9 @@ class ProgramManager {
|
|
|
11129
11218
|
ptr8 = fee_verifying_key.__destroy_into_raw();
|
|
11130
11219
|
}
|
|
11131
11220
|
let ptr9 = 0;
|
|
11132
|
-
if (!isLikeNone(
|
|
11133
|
-
_assertClass(
|
|
11134
|
-
ptr9 =
|
|
11221
|
+
if (!isLikeNone(query)) {
|
|
11222
|
+
_assertClass(query, QueryOption);
|
|
11223
|
+
ptr9 = query.__destroy_into_raw();
|
|
11135
11224
|
}
|
|
11136
11225
|
const ret = wasm.programmanager_buildTransferTransaction(private_key.__wbg_ptr, amount_credits, ptr0, len0, ptr1, len1, ptr2, priority_fee_credits, ptr3, ptr4, len4, ptr5, ptr6, ptr7, ptr8, ptr9);
|
|
11137
11226
|
return takeObject(ret);
|
|
@@ -11913,6 +12002,63 @@ class ProvingRequest {
|
|
|
11913
12002
|
}
|
|
11914
12003
|
if (Symbol.dispose) ProvingRequest.prototype[Symbol.dispose] = ProvingRequest.prototype.free;
|
|
11915
12004
|
|
|
12005
|
+
const QueryOptionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
12006
|
+
? { register: () => {}, unregister: () => {} }
|
|
12007
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_queryoption_free(ptr >>> 0, 1));
|
|
12008
|
+
/**
|
|
12009
|
+
* A unified query type that wraps either an OfflineQuery (pre-fetched state)
|
|
12010
|
+
* or a CallbackQuery (on-demand JS transport delegation).
|
|
12011
|
+
*
|
|
12012
|
+
* Construct from JavaScript using the static factory methods:
|
|
12013
|
+
* - `QueryOption.offlineQuery(offlineQuery)` for pre-fetched state
|
|
12014
|
+
* - `QueryOption.callbackQuery(callbackQuery)` for on-demand JS callbacks
|
|
12015
|
+
*/
|
|
12016
|
+
class QueryOption {
|
|
12017
|
+
|
|
12018
|
+
static __wrap(ptr) {
|
|
12019
|
+
ptr = ptr >>> 0;
|
|
12020
|
+
const obj = Object.create(QueryOption.prototype);
|
|
12021
|
+
obj.__wbg_ptr = ptr;
|
|
12022
|
+
QueryOptionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
12023
|
+
return obj;
|
|
12024
|
+
}
|
|
12025
|
+
|
|
12026
|
+
__destroy_into_raw() {
|
|
12027
|
+
const ptr = this.__wbg_ptr;
|
|
12028
|
+
this.__wbg_ptr = 0;
|
|
12029
|
+
QueryOptionFinalization.unregister(this);
|
|
12030
|
+
return ptr;
|
|
12031
|
+
}
|
|
12032
|
+
|
|
12033
|
+
free() {
|
|
12034
|
+
const ptr = this.__destroy_into_raw();
|
|
12035
|
+
wasm.__wbg_queryoption_free(ptr, 0);
|
|
12036
|
+
}
|
|
12037
|
+
/**
|
|
12038
|
+
* Create a QueryOption from an OfflineQuery.
|
|
12039
|
+
* @param {OfflineQuery} query
|
|
12040
|
+
* @returns {QueryOption}
|
|
12041
|
+
*/
|
|
12042
|
+
static offlineQuery(query) {
|
|
12043
|
+
_assertClass(query, OfflineQuery);
|
|
12044
|
+
var ptr0 = query.__destroy_into_raw();
|
|
12045
|
+
const ret = wasm.queryoption_offlineQuery(ptr0);
|
|
12046
|
+
return QueryOption.__wrap(ret);
|
|
12047
|
+
}
|
|
12048
|
+
/**
|
|
12049
|
+
* Create a QueryOption from a CallbackQuery.
|
|
12050
|
+
* @param {CallbackQuery} query
|
|
12051
|
+
* @returns {QueryOption}
|
|
12052
|
+
*/
|
|
12053
|
+
static callbackQuery(query) {
|
|
12054
|
+
_assertClass(query, CallbackQuery);
|
|
12055
|
+
var ptr0 = query.__destroy_into_raw();
|
|
12056
|
+
const ret = wasm.queryoption_callbackQuery(ptr0);
|
|
12057
|
+
return QueryOption.__wrap(ret);
|
|
12058
|
+
}
|
|
12059
|
+
}
|
|
12060
|
+
if (Symbol.dispose) QueryOption.prototype[Symbol.dispose] = QueryOption.prototype.free;
|
|
12061
|
+
|
|
11916
12062
|
const RecordCiphertextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
11917
12063
|
? { register: () => {}, unregister: () => {} }
|
|
11918
12064
|
: new FinalizationRegistry(ptr => wasm.__wbg_recordciphertext_free(ptr >>> 0, 1));
|
|
@@ -18169,6 +18315,12 @@ function __wbg_get_imports(memory) {
|
|
|
18169
18315
|
const ret = __wbg_init.__wbindgen_wasm_module;
|
|
18170
18316
|
return addHeapObject(ret);
|
|
18171
18317
|
};
|
|
18318
|
+
imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
|
|
18319
|
+
const obj = getObject(arg1);
|
|
18320
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
18321
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
18322
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
18323
|
+
};
|
|
18172
18324
|
imports.wbg.__wbg___wbindgen_rethrow_ea38273dafc473e6 = function(arg0) {
|
|
18173
18325
|
throw takeObject(arg0);
|
|
18174
18326
|
};
|
|
@@ -18196,6 +18348,10 @@ function __wbg_get_imports(memory) {
|
|
|
18196
18348
|
imports.wbg.__wbg_append_b577eb3a177bc0fa = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
18197
18349
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
18198
18350
|
}, arguments) };
|
|
18351
|
+
imports.wbg.__wbg_apply_04097a755e1e4a1e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
18352
|
+
const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
|
|
18353
|
+
return addHeapObject(ret);
|
|
18354
|
+
}, arguments) };
|
|
18199
18355
|
imports.wbg.__wbg_arrayBuffer_b375eccb84b4ddf3 = function() { return handleError(function (arg0) {
|
|
18200
18356
|
const ret = getObject(arg0).arrayBuffer();
|
|
18201
18357
|
return addHeapObject(ret);
|
|
@@ -18302,6 +18458,16 @@ function __wbg_get_imports(memory) {
|
|
|
18302
18458
|
const ret = getObject(arg0).headers;
|
|
18303
18459
|
return addHeapObject(ret);
|
|
18304
18460
|
};
|
|
18461
|
+
imports.wbg.__wbg_instanceof_Promise_001fdd42afa1b7ef = function(arg0) {
|
|
18462
|
+
let result;
|
|
18463
|
+
try {
|
|
18464
|
+
result = getObject(arg0) instanceof Promise;
|
|
18465
|
+
} catch (_) {
|
|
18466
|
+
result = false;
|
|
18467
|
+
}
|
|
18468
|
+
const ret = result;
|
|
18469
|
+
return ret;
|
|
18470
|
+
};
|
|
18305
18471
|
imports.wbg.__wbg_instanceof_Response_f4f3e87e07f3135c = function(arg0) {
|
|
18306
18472
|
let result;
|
|
18307
18473
|
try {
|
|
@@ -18346,7 +18512,7 @@ function __wbg_get_imports(memory) {
|
|
|
18346
18512
|
const ret = getObject(arg0).length;
|
|
18347
18513
|
return ret;
|
|
18348
18514
|
};
|
|
18349
|
-
imports.wbg.
|
|
18515
|
+
imports.wbg.__wbg_log_22dee88c33d8b7ed = function(arg0, arg1) {
|
|
18350
18516
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
18351
18517
|
};
|
|
18352
18518
|
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
@@ -18368,7 +18534,7 @@ function __wbg_get_imports(memory) {
|
|
|
18368
18534
|
const a = state0.a;
|
|
18369
18535
|
state0.a = 0;
|
|
18370
18536
|
try {
|
|
18371
|
-
return
|
|
18537
|
+
return __wasm_bindgen_func_elem_7492(a, state0.b, arg0, arg1);
|
|
18372
18538
|
} finally {
|
|
18373
18539
|
state0.a = a;
|
|
18374
18540
|
}
|
|
@@ -18555,7 +18721,7 @@ function __wbg_get_imports(memory) {
|
|
|
18555
18721
|
const ret = Signature.__wrap(arg0);
|
|
18556
18722
|
return addHeapObject(ret);
|
|
18557
18723
|
};
|
|
18558
|
-
imports.wbg.
|
|
18724
|
+
imports.wbg.__wbg_spawnWorker_33cc8ce5f9639974 = function(arg0, arg1, arg2, arg3) {
|
|
18559
18725
|
const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
|
|
18560
18726
|
return addHeapObject(ret);
|
|
18561
18727
|
};
|
|
@@ -18645,11 +18811,6 @@ function __wbg_get_imports(memory) {
|
|
|
18645
18811
|
const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
|
|
18646
18812
|
return addHeapObject(ret);
|
|
18647
18813
|
};
|
|
18648
|
-
imports.wbg.__wbindgen_cast_0eb37dec5f5def71 = function(arg0, arg1) {
|
|
18649
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 358, function: Function { arguments: [], shim_idx: 465, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
18650
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7165, __wasm_bindgen_func_elem_7166);
|
|
18651
|
-
return addHeapObject(ret);
|
|
18652
|
-
};
|
|
18653
18814
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
18654
18815
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
18655
18816
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -18660,19 +18821,19 @@ function __wbg_get_imports(memory) {
|
|
|
18660
18821
|
const ret = (BigInt.asUintN(64, arg0) | (arg1 << BigInt(64)));
|
|
18661
18822
|
return addHeapObject(ret);
|
|
18662
18823
|
};
|
|
18824
|
+
imports.wbg.__wbindgen_cast_32a97a33ade320ff = function(arg0, arg1) {
|
|
18825
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 359, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 360, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
18826
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7219, __wasm_bindgen_func_elem_8577);
|
|
18827
|
+
return addHeapObject(ret);
|
|
18828
|
+
};
|
|
18663
18829
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
18664
18830
|
// Cast intrinsic for `U64 -> Externref`.
|
|
18665
18831
|
const ret = BigInt.asUintN(64, arg0);
|
|
18666
18832
|
return addHeapObject(ret);
|
|
18667
18833
|
};
|
|
18668
|
-
imports.wbg.
|
|
18669
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
18670
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
18671
|
-
return addHeapObject(ret);
|
|
18672
|
-
};
|
|
18673
|
-
imports.wbg.__wbindgen_cast_65bbaf572cb463ed = function(arg0, arg1) {
|
|
18674
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 358, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 359, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
18675
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7165, __wasm_bindgen_func_elem_8536);
|
|
18834
|
+
imports.wbg.__wbindgen_cast_54fdaf61e7a5e679 = function(arg0, arg1) {
|
|
18835
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 359, function: Function { arguments: [], shim_idx: 465, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
18836
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7219, __wasm_bindgen_func_elem_7220);
|
|
18676
18837
|
return addHeapObject(ret);
|
|
18677
18838
|
};
|
|
18678
18839
|
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
@@ -18690,6 +18851,11 @@ function __wbg_get_imports(memory) {
|
|
|
18690
18851
|
const ret = arg0;
|
|
18691
18852
|
return addHeapObject(ret);
|
|
18692
18853
|
};
|
|
18854
|
+
imports.wbg.__wbindgen_cast_e424aac48c10ba33 = function(arg0, arg1) {
|
|
18855
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 359, function: Function { arguments: [Externref], shim_idx: 360, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
18856
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_7219, __wasm_bindgen_func_elem_8577);
|
|
18857
|
+
return addHeapObject(ret);
|
|
18858
|
+
};
|
|
18693
18859
|
imports.wbg.__wbindgen_cast_e7b45dd881f38ce3 = function(arg0, arg1) {
|
|
18694
18860
|
// Cast intrinsic for `U128 -> Externref`.
|
|
18695
18861
|
const ret = (BigInt.asUintN(64, arg0) | (BigInt.asUintN(64, arg1) << BigInt(64)));
|
|
@@ -18793,5 +18959,5 @@ async function initThreadPool(threads) {
|
|
|
18793
18959
|
await initThreadPool$1(new URL("worker.js", import.meta.url), threads);
|
|
18794
18960
|
}
|
|
18795
18961
|
|
|
18796
|
-
export { Address, Authorization, BHP1024, BHP256, BHP512, BHP768, Boolean, Ciphertext, ComputeKey, DynamicRecord, EncryptionToolkit, Execution, ExecutionRequest, ExecutionResponse, Field, GraphKey, Group, I128, I16, I32, I64, I8, KeyPair, Metadata, OfflineQuery, Pedersen128, Pedersen64, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager, Proof, ProvingKey, ProvingRequest, RecordCiphertext, RecordPlaintext, Scalar, Signature, Transaction, Transition, U128, U16, U32, U64, U8, Value, VerifyingKey, ViewKey, getOrInitConsensusVersionTestHeights, initSync, initThreadPool, runRayonThread, snarkVerify, snarkVerifyBatch, stringToField, verifyFunctionExecution };
|
|
18962
|
+
export { Address, Authorization, BHP1024, BHP256, BHP512, BHP768, Boolean, CallbackQuery, Ciphertext, ComputeKey, DynamicRecord, EncryptionToolkit, Execution, ExecutionRequest, ExecutionResponse, Field, GraphKey, Group, I128, I16, I32, I64, I8, KeyPair, Metadata, OfflineQuery, Pedersen128, Pedersen64, Plaintext, Poseidon2, Poseidon4, Poseidon8, PrivateKey, PrivateKeyCiphertext, Program, ProgramManager, Proof, ProvingKey, ProvingRequest, QueryOption, RecordCiphertext, RecordPlaintext, Scalar, Signature, Transaction, Transition, U128, U16, U32, U64, U8, Value, VerifyingKey, ViewKey, getOrInitConsensusVersionTestHeights, initSync, initThreadPool, runRayonThread, snarkVerify, snarkVerifyBatch, stringToField, verifyFunctionExecution };
|
|
18797
18963
|
//# sourceMappingURL=index.js.map
|