@cartridge/controller-wasm 0.3.19 → 0.7.14-24e7b0f

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartridge/controller-wasm",
3
- "version": "0.3.19",
3
+ "version": "0.7.14-24e7b0f",
4
4
  "description": "Wasm bindings for Cartridge Controller and Session Account",
5
5
  "type": "module",
6
6
  "main": "./pkg-controller/account_wasm.js",
@@ -283,6 +283,16 @@ export class CartridgeAccount {
283
283
  * A `JsSignedOutsideExecution` containing the OutsideExecution V3 object and its signature
284
284
  */
285
285
  signExecuteFromOutside(calls: JsCall[]): Promise<JsSignedOutsideExecution>;
286
+ /**
287
+ * Checks if there are stored policies for a given app_id.
288
+ *
289
+ * # Parameters
290
+ * - `app_id`: The application identifier to check for stored policies
291
+ *
292
+ * # Returns
293
+ * `true` if policies exist for the given app_id, `false` otherwise
294
+ */
295
+ hasPoliciesForAppId(app_id: string): Promise<boolean>;
286
296
  }
287
297
  /**
288
298
  * A type for accessing fixed attributes of `CartridgeAccount`.
@@ -359,20 +359,20 @@ export function signerToGuid(signer) {
359
359
  }
360
360
  }
361
361
 
362
- function __wasm_bindgen_func_elem_8823(arg0, arg1, arg2) {
363
- wasm.__wasm_bindgen_func_elem_8823(arg0, arg1, addHeapObject(arg2));
362
+ function __wasm_bindgen_func_elem_3186(arg0, arg1, arg2) {
363
+ wasm.__wasm_bindgen_func_elem_3186(arg0, arg1, addHeapObject(arg2));
364
364
  }
365
365
 
366
- function __wasm_bindgen_func_elem_8679(arg0, arg1) {
367
- wasm.__wasm_bindgen_func_elem_8679(arg0, arg1);
366
+ function __wasm_bindgen_func_elem_8834(arg0, arg1, arg2) {
367
+ wasm.__wasm_bindgen_func_elem_8834(arg0, arg1, addHeapObject(arg2));
368
368
  }
369
369
 
370
- function __wasm_bindgen_func_elem_3186(arg0, arg1, arg2) {
371
- wasm.__wasm_bindgen_func_elem_3186(arg0, arg1, addHeapObject(arg2));
370
+ function __wasm_bindgen_func_elem_8690(arg0, arg1) {
371
+ wasm.__wasm_bindgen_func_elem_8690(arg0, arg1);
372
372
  }
373
373
 
374
- function __wasm_bindgen_func_elem_10951(arg0, arg1, arg2, arg3) {
375
- wasm.__wasm_bindgen_func_elem_10951(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
374
+ function __wasm_bindgen_func_elem_10962(arg0, arg1, arg2, arg3) {
375
+ wasm.__wasm_bindgen_func_elem_10962(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
376
376
  }
377
377
 
378
378
  /**
@@ -828,6 +828,23 @@ export class CartridgeAccount {
828
828
  const ret = wasm.cartridgeaccount_signExecuteFromOutside(this.__wbg_ptr, ptr0, len0);
829
829
  return takeObject(ret);
830
830
  }
831
+ /**
832
+ * Checks if there are stored policies for a given app_id.
833
+ *
834
+ * # Parameters
835
+ * - `app_id`: The application identifier to check for stored policies
836
+ *
837
+ * # Returns
838
+ * `true` if policies exist for the given app_id, `false` otherwise
839
+ * @param {string} app_id
840
+ * @returns {Promise<boolean>}
841
+ */
842
+ hasPoliciesForAppId(app_id) {
843
+ const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
844
+ const len0 = WASM_VECTOR_LEN;
845
+ const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
846
+ return takeObject(ret);
847
+ }
831
848
  }
832
849
  if (Symbol.dispose) CartridgeAccount.prototype[Symbol.dispose] = CartridgeAccount.prototype.free;
833
850
 
@@ -1858,7 +1875,7 @@ export function __wbg_new_3c3d849046688a66(arg0, arg1) {
1858
1875
  const a = state0.a;
1859
1876
  state0.a = 0;
1860
1877
  try {
1861
- return __wasm_bindgen_func_elem_10951(a, state0.b, arg0, arg1);
1878
+ return __wasm_bindgen_func_elem_10962(a, state0.b, arg0, arg1);
1862
1879
  } finally {
1863
1880
  state0.a = a;
1864
1881
  }
@@ -2202,9 +2219,9 @@ export function __wbindgen_cast_4082834687a71a5d(arg0, arg1) {
2202
2219
  return addHeapObject(ret);
2203
2220
  };
2204
2221
 
2205
- export function __wbindgen_cast_4892f1fb8f346ce7(arg0, arg1) {
2206
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1000, function: Function { arguments: [Externref], shim_idx: 1001, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2207
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8808, __wasm_bindgen_func_elem_8823);
2222
+ export function __wbindgen_cast_838747baf6b6553b(arg0, arg1) {
2223
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1004, function: Function { arguments: [Externref], shim_idx: 1005, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2224
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8819, __wasm_bindgen_func_elem_8834);
2208
2225
  return addHeapObject(ret);
2209
2226
  };
2210
2227
 
@@ -2214,6 +2231,12 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
2214
2231
  return addHeapObject(ret);
2215
2232
  };
2216
2233
 
2234
+ export function __wbindgen_cast_a572ca3f1306512c(arg0, arg1) {
2235
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 971, function: Function { arguments: [], shim_idx: 972, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2236
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8681, __wasm_bindgen_func_elem_8690);
2237
+ return addHeapObject(ret);
2238
+ };
2239
+
2217
2240
  export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
2218
2241
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
2219
2242
  const ret = getArrayU8FromWasm0(arg0, arg1);
@@ -2226,12 +2249,6 @@ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
2226
2249
  return addHeapObject(ret);
2227
2250
  };
2228
2251
 
2229
- export function __wbindgen_cast_d92f130ade9da151(arg0, arg1) {
2230
- // Cast intrinsic for `Closure(Closure { dtor_idx: 967, function: Function { arguments: [], shim_idx: 968, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2231
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8670, __wasm_bindgen_func_elem_8679);
2232
- return addHeapObject(ret);
2233
- };
2234
-
2235
2252
  export function __wbindgen_object_clone_ref(arg0) {
2236
2253
  const ret = getObject(arg0);
2237
2254
  return addHeapObject(ret);
Binary file
@@ -286,14 +286,14 @@ export function signerToGuid(signer) {
286
286
  }
287
287
  }
288
288
 
289
- function __wasm_bindgen_func_elem_3921(arg0, arg1) {
290
- wasm.__wasm_bindgen_func_elem_3921(arg0, arg1);
291
- }
292
-
293
289
  function __wasm_bindgen_func_elem_4060(arg0, arg1, arg2) {
294
290
  wasm.__wasm_bindgen_func_elem_4060(arg0, arg1, addHeapObject(arg2));
295
291
  }
296
292
 
293
+ function __wasm_bindgen_func_elem_3921(arg0, arg1) {
294
+ wasm.__wasm_bindgen_func_elem_3921(arg0, arg1);
295
+ }
296
+
297
297
  function __wasm_bindgen_func_elem_5872(arg0, arg1, arg2, arg3) {
298
298
  wasm.__wasm_bindgen_func_elem_5872(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
299
299
  }
Binary file