@provablehq/wasm 0.7.0 → 0.7.2

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/README.md CHANGED
@@ -23,7 +23,7 @@ Functionality exposed by this crate includes:
23
23
  * Aleo primitives such as `Records`, `Programs`, and `Transactions` and their associated helper methods
24
24
  * A `ProgramManager` object that contains methods for authoring, deploying, and interacting with Aleo programs
25
25
 
26
- More information on these concepts can be found at the [Aleo Developer Hub](https://developer.aleo.org/concepts).
26
+ More information on these concepts can be found at the [Aleo Developer Hub](https://docs.leo-lang.org/concepts).
27
27
 
28
28
  ## Usage
29
29
 
@@ -285,9 +285,15 @@ export class OfflineQuery {
285
285
  free(): void;
286
286
  /**
287
287
  * Creates a new offline query object. The state root is required to be passed in as a string
288
+ * @param {number} block_height
288
289
  * @param {string} state_root
289
290
  */
290
- constructor(state_root: string);
291
+ constructor(block_height: number, state_root: string);
292
+ /**
293
+ * Add a new block height to the offline query object.
294
+ * @param {number} block_height
295
+ */
296
+ addBlockHeight(block_height: number): void;
291
297
  /**
292
298
  * Add a new state path to the offline query object.
293
299
  *
@@ -238,7 +238,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
238
238
  return real;
239
239
  }
240
240
  function __wbg_adapter_34(arg0, arg1, arg2) {
241
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h35d22bc77031ed81(arg0, arg1, addHeapObject(arg2));
241
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1503081f6025e61c(arg0, arg1, addHeapObject(arg2));
242
242
  }
243
243
 
244
244
  function _assertClass(instance, klass) {
@@ -328,8 +328,8 @@ function handleError(f, args) {
328
328
  wasm.__wbindgen_exn_store(addHeapObject(e));
329
329
  }
330
330
  }
331
- function __wbg_adapter_281(arg0, arg1, arg2, arg3) {
332
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h3625646991d7d545(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
331
+ function __wbg_adapter_282(arg0, arg1, arg2, arg3) {
332
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__hc5c49be524f0cde8(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
333
333
  }
334
334
 
335
335
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1106,14 +1106,15 @@ class OfflineQuery {
1106
1106
  }
1107
1107
  /**
1108
1108
  * Creates a new offline query object. The state root is required to be passed in as a string
1109
+ * @param {number} block_height
1109
1110
  * @param {string} state_root
1110
1111
  */
1111
- constructor(state_root) {
1112
+ constructor(block_height, state_root) {
1112
1113
  try {
1113
1114
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1114
1115
  const ptr0 = passStringToWasm0(state_root, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1115
1116
  const len0 = WASM_VECTOR_LEN;
1116
- wasm.offlinequery_new(retptr, ptr0, len0);
1117
+ wasm.offlinequery_new(retptr, block_height, ptr0, len0);
1117
1118
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1118
1119
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1119
1120
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -1127,6 +1128,13 @@ class OfflineQuery {
1127
1128
  }
1128
1129
  }
1129
1130
  /**
1131
+ * Add a new block height to the offline query object.
1132
+ * @param {number} block_height
1133
+ */
1134
+ addBlockHeight(block_height) {
1135
+ wasm.offlinequery_addBlockHeight(this.__wbg_ptr, block_height);
1136
+ }
1137
+ /**
1130
1138
  * Add a new state path to the offline query object.
1131
1139
  *
1132
1140
  * @param {string} commitment: The commitment corresponding to a record inpout
@@ -4147,27 +4155,27 @@ function __wbg_get_imports() {
4147
4155
  getInt32Memory0()[arg0 / 4 + 1] = len1;
4148
4156
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
4149
4157
  };
4150
- imports.wbg.__wbg_executionresponse_new = function(arg0) {
4151
- const ret = ExecutionResponse.__wrap(arg0);
4158
+ imports.wbg.__wbg_log_eb85b4536c227931 = function(arg0, arg1) {
4159
+ console.log(getStringFromWasm0(arg0, arg1));
4160
+ };
4161
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
4162
+ const ret = BigInt.asUintN(64, arg0);
4152
4163
  return addHeapObject(ret);
4153
4164
  };
4154
4165
  imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
4155
4166
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
4156
4167
  return addHeapObject(ret);
4157
4168
  }, arguments) };
4158
- imports.wbg.__wbg_transaction_new = function(arg0) {
4159
- const ret = Transaction.__wrap(arg0);
4160
- return addHeapObject(ret);
4161
- };
4162
4169
  imports.wbg.__wbg_keypair_new = function(arg0) {
4163
4170
  const ret = KeyPair.__wrap(arg0);
4164
4171
  return addHeapObject(ret);
4165
4172
  };
4166
- imports.wbg.__wbg_log_9388602cb1684929 = function(arg0, arg1) {
4167
- console.log(getStringFromWasm0(arg0, arg1));
4173
+ imports.wbg.__wbg_transaction_new = function(arg0) {
4174
+ const ret = Transaction.__wrap(arg0);
4175
+ return addHeapObject(ret);
4168
4176
  };
4169
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
4170
- const ret = BigInt.asUintN(64, arg0);
4177
+ imports.wbg.__wbg_executionresponse_new = function(arg0) {
4178
+ const ret = ExecutionResponse.__wrap(arg0);
4171
4179
  return addHeapObject(ret);
4172
4180
  };
4173
4181
  imports.wbg.__wbg_newwithlength_66ae46612e7f0234 = function(arg0) {
@@ -4185,7 +4193,7 @@ function __wbg_get_imports() {
4185
4193
  const ret = wasm.memory;
4186
4194
  return addHeapObject(ret);
4187
4195
  };
4188
- imports.wbg.__wbg_spawnWorker_df78bbd4c32ac5b6 = function(arg0, arg1, arg2, arg3) {
4196
+ imports.wbg.__wbg_spawnWorker_4026f00664f3193f = function(arg0, arg1, arg2, arg3) {
4189
4197
  const ret = spawnWorker(getObject(arg0), getObject(arg1), getObject(arg2), arg3 >>> 0);
4190
4198
  return addHeapObject(ret);
4191
4199
  };
@@ -4225,7 +4233,7 @@ function __wbg_get_imports() {
4225
4233
  const a = state0.a;
4226
4234
  state0.a = 0;
4227
4235
  try {
4228
- return __wbg_adapter_281(a, state0.b, arg0, arg1);
4236
+ return __wbg_adapter_282(a, state0.b, arg0, arg1);
4229
4237
  } finally {
4230
4238
  state0.a = a;
4231
4239
  }
@@ -4453,11 +4461,11 @@ function __wbg_get_imports() {
4453
4461
  getInt32Memory0()[arg0 / 4 + 1] = len1;
4454
4462
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
4455
4463
  }, arguments) };
4456
- imports.wbg.__wbindgen_closure_wrapper5975 = function(arg0, arg1, arg2) {
4464
+ imports.wbg.__wbindgen_closure_wrapper5994 = function(arg0, arg1, arg2) {
4457
4465
  const ret = makeMutClosure(arg0, arg1, 622, __wbg_adapter_34);
4458
4466
  return addHeapObject(ret);
4459
4467
  };
4460
- imports.wbg.__wbindgen_closure_wrapper6001 = function(arg0, arg1, arg2) {
4468
+ imports.wbg.__wbindgen_closure_wrapper6020 = function(arg0, arg1, arg2) {
4461
4469
  const ret = makeMutClosure(arg0, arg1, 622, __wbg_adapter_34);
4462
4470
  return addHeapObject(ret);
4463
4471
  };