@cartridge/controller-wasm 0.7.14-0df5a4c → 0.7.14-3a84802
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 +1 -1
- package/pkg-controller/account_wasm.d.ts +98 -98
- package/pkg-controller/account_wasm_bg.js +292 -292
- package/pkg-controller/account_wasm_bg.wasm +0 -0
- package/pkg-session/session_wasm.d.ts +63 -63
- package/pkg-session/session_wasm_bg.js +37 -37
- package/pkg-session/session_wasm_bg.wasm +0 -0
|
@@ -285,20 +285,20 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
285
285
|
|
|
286
286
|
let WASM_VECTOR_LEN = 0;
|
|
287
287
|
|
|
288
|
-
function
|
|
289
|
-
wasm.
|
|
288
|
+
function __wasm_bindgen_func_elem_3270(arg0, arg1, arg2) {
|
|
289
|
+
wasm.__wasm_bindgen_func_elem_3270(arg0, arg1, addHeapObject(arg2));
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
function
|
|
293
|
-
wasm.
|
|
292
|
+
function __wasm_bindgen_func_elem_8637(arg0, arg1) {
|
|
293
|
+
wasm.__wasm_bindgen_func_elem_8637(arg0, arg1);
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
function
|
|
297
|
-
wasm.
|
|
296
|
+
function __wasm_bindgen_func_elem_8787(arg0, arg1, arg2) {
|
|
297
|
+
wasm.__wasm_bindgen_func_elem_8787(arg0, arg1, addHeapObject(arg2));
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
function
|
|
301
|
-
wasm.
|
|
300
|
+
function __wasm_bindgen_func_elem_10881(arg0, arg1, arg2, arg3) {
|
|
301
|
+
wasm.__wasm_bindgen_func_elem_10881(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
@@ -362,29 +362,28 @@ export class CartridgeAccount {
|
|
|
362
362
|
wasm.__wbg_cartridgeaccount_free(ptr, 0);
|
|
363
363
|
}
|
|
364
364
|
/**
|
|
365
|
-
*
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
* @param {
|
|
373
|
-
* @
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
365
|
+
* @returns {Promise<void>}
|
|
366
|
+
*/
|
|
367
|
+
disconnect() {
|
|
368
|
+
const ret = wasm.cartridgeaccount_disconnect(this.__wbg_ptr);
|
|
369
|
+
return takeObject(ret);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
373
|
+
* @returns {Promise<any>}
|
|
374
|
+
*/
|
|
375
|
+
deploySelf(max_fee) {
|
|
376
|
+
const ret = wasm.cartridgeaccount_deploySelf(this.__wbg_ptr, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
377
|
+
return takeObject(ret);
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
377
380
|
* @param {string} cartridge_api_url
|
|
378
|
-
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
381
|
+
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
379
382
|
*/
|
|
380
|
-
static
|
|
381
|
-
const ptr0 = passStringToWasm0(
|
|
383
|
+
static fromStorage(cartridge_api_url) {
|
|
384
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
382
385
|
const len0 = WASM_VECTOR_LEN;
|
|
383
|
-
const
|
|
384
|
-
const len1 = WASM_VECTOR_LEN;
|
|
385
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
386
|
-
const len2 = WASM_VECTOR_LEN;
|
|
387
|
-
const ret = wasm.cartridgeaccount_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(address), ptr1, len1, addHeapObject(owner), ptr2, len2);
|
|
386
|
+
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
388
387
|
return takeObject(ret);
|
|
389
388
|
}
|
|
390
389
|
/**
|
|
@@ -411,64 +410,34 @@ export class CartridgeAccount {
|
|
|
411
410
|
return takeObject(ret);
|
|
412
411
|
}
|
|
413
412
|
/**
|
|
414
|
-
* @param {
|
|
415
|
-
* @returns {Promise<
|
|
413
|
+
* @param {JsRemoveSignerInput} signer
|
|
414
|
+
* @returns {Promise<void>}
|
|
416
415
|
*/
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
const len0 = WASM_VECTOR_LEN;
|
|
420
|
-
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
416
|
+
removeOwner(signer) {
|
|
417
|
+
const ret = wasm.cartridgeaccount_removeOwner(this.__wbg_ptr, addHeapObject(signer));
|
|
421
418
|
return takeObject(ret);
|
|
422
419
|
}
|
|
423
420
|
/**
|
|
424
|
-
* @
|
|
421
|
+
* @param {string} typed_data
|
|
422
|
+
* @returns {Promise<Felts>}
|
|
425
423
|
*/
|
|
426
|
-
|
|
427
|
-
const
|
|
424
|
+
signMessage(typed_data) {
|
|
425
|
+
const ptr0 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
426
|
+
const len0 = WASM_VECTOR_LEN;
|
|
427
|
+
const ret = wasm.cartridgeaccount_signMessage(this.__wbg_ptr, ptr0, len0);
|
|
428
428
|
return takeObject(ret);
|
|
429
429
|
}
|
|
430
430
|
/**
|
|
431
431
|
* @param {string} app_id
|
|
432
432
|
* @param {Policy[]} policies
|
|
433
|
-
* @
|
|
434
|
-
* @param {JsFelt} public_key
|
|
435
|
-
* @param {JsFeeEstimate | null} [max_fee]
|
|
436
|
-
* @returns {Promise<any>}
|
|
433
|
+
* @returns {Promise<void>}
|
|
437
434
|
*/
|
|
438
|
-
|
|
435
|
+
skipSession(app_id, policies) {
|
|
439
436
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
440
437
|
const len0 = WASM_VECTOR_LEN;
|
|
441
438
|
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
442
439
|
const len1 = WASM_VECTOR_LEN;
|
|
443
|
-
const ret = wasm.
|
|
444
|
-
return takeObject(ret);
|
|
445
|
-
}
|
|
446
|
-
/**
|
|
447
|
-
* @param {Policy[]} policies
|
|
448
|
-
* @param {bigint} expires_at
|
|
449
|
-
* @param {JsFelt} public_key
|
|
450
|
-
* @returns {Promise<any>}
|
|
451
|
-
*/
|
|
452
|
-
registerSessionCalldata(policies, expires_at, public_key) {
|
|
453
|
-
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
454
|
-
const len0 = WASM_VECTOR_LEN;
|
|
455
|
-
const ret = wasm.cartridgeaccount_registerSessionCalldata(this.__wbg_ptr, ptr0, len0, expires_at, addHeapObject(public_key));
|
|
456
|
-
return takeObject(ret);
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* @param {JsFelt} new_class_hash
|
|
460
|
-
* @returns {Promise<JsCall>}
|
|
461
|
-
*/
|
|
462
|
-
upgrade(new_class_hash) {
|
|
463
|
-
const ret = wasm.cartridgeaccount_upgrade(this.__wbg_ptr, addHeapObject(new_class_hash));
|
|
464
|
-
return takeObject(ret);
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* @param {JsRegister} register
|
|
468
|
-
* @returns {Promise<JsRegisterResponse>}
|
|
469
|
-
*/
|
|
470
|
-
register(register) {
|
|
471
|
-
const ret = wasm.cartridgeaccount_register(this.__wbg_ptr, addHeapObject(register));
|
|
440
|
+
const ret = wasm.cartridgeaccount_skipSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
472
441
|
return takeObject(ret);
|
|
473
442
|
}
|
|
474
443
|
/**
|
|
@@ -487,46 +456,44 @@ export class CartridgeAccount {
|
|
|
487
456
|
return takeObject(ret);
|
|
488
457
|
}
|
|
489
458
|
/**
|
|
490
|
-
* @param {
|
|
491
|
-
* @param {Policy[]} policies
|
|
459
|
+
* @param {JsRevokableSession} session
|
|
492
460
|
* @returns {Promise<void>}
|
|
493
461
|
*/
|
|
494
|
-
|
|
495
|
-
const
|
|
496
|
-
const len0 = WASM_VECTOR_LEN;
|
|
497
|
-
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
498
|
-
const len1 = WASM_VECTOR_LEN;
|
|
499
|
-
const ret = wasm.cartridgeaccount_skipSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
462
|
+
revokeSession(session) {
|
|
463
|
+
const ret = wasm.cartridgeaccount_revokeSession(this.__wbg_ptr, addHeapObject(session));
|
|
500
464
|
return takeObject(ret);
|
|
501
465
|
}
|
|
502
466
|
/**
|
|
503
|
-
* @param {
|
|
504
|
-
* @param {JsAddSignerInput | null} [signer_input]
|
|
505
|
-
* @param {string | null} [rp_id]
|
|
467
|
+
* @param {JsRevokableSession[]} sessions
|
|
506
468
|
* @returns {Promise<void>}
|
|
507
469
|
*/
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
const ret = wasm.
|
|
470
|
+
revokeSessions(sessions) {
|
|
471
|
+
const ptr0 = passArrayJsValueToWasm0(sessions, wasm.__wbindgen_export);
|
|
472
|
+
const len0 = WASM_VECTOR_LEN;
|
|
473
|
+
const ret = wasm.cartridgeaccount_revokeSessions(this.__wbg_ptr, ptr0, len0);
|
|
512
474
|
return takeObject(ret);
|
|
513
475
|
}
|
|
514
476
|
/**
|
|
515
|
-
* @
|
|
516
|
-
* @returns {Promise<void>}
|
|
477
|
+
* @returns {Promise<JsFelt>}
|
|
517
478
|
*/
|
|
518
|
-
|
|
519
|
-
const ret = wasm.
|
|
479
|
+
delegateAccount() {
|
|
480
|
+
const ret = wasm.cartridgeaccount_delegateAccount(this.__wbg_ptr);
|
|
520
481
|
return takeObject(ret);
|
|
521
482
|
}
|
|
522
483
|
/**
|
|
523
|
-
* @param {string}
|
|
524
|
-
* @
|
|
484
|
+
* @param {string} app_id
|
|
485
|
+
* @param {Policy[]} policies
|
|
486
|
+
* @param {bigint} expires_at
|
|
487
|
+
* @param {JsFelt} public_key
|
|
488
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
489
|
+
* @returns {Promise<any>}
|
|
525
490
|
*/
|
|
526
|
-
|
|
527
|
-
const ptr0 = passStringToWasm0(
|
|
491
|
+
registerSession(app_id, policies, expires_at, public_key, max_fee) {
|
|
492
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
528
493
|
const len0 = WASM_VECTOR_LEN;
|
|
529
|
-
const
|
|
494
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
495
|
+
const len1 = WASM_VECTOR_LEN;
|
|
496
|
+
const ret = wasm.cartridgeaccount_registerSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, addHeapObject(public_key), isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
530
497
|
return takeObject(ret);
|
|
531
498
|
}
|
|
532
499
|
/**
|
|
@@ -540,15 +507,40 @@ export class CartridgeAccount {
|
|
|
540
507
|
return takeObject(ret);
|
|
541
508
|
}
|
|
542
509
|
/**
|
|
510
|
+
* @param {string} app_id
|
|
543
511
|
* @param {JsCall[]} calls
|
|
544
|
-
* @param {JsFeeEstimate | null} [max_fee]
|
|
545
512
|
* @param {JsFeeSource | null} [fee_source]
|
|
546
513
|
* @returns {Promise<any>}
|
|
547
514
|
*/
|
|
548
|
-
|
|
549
|
-
const ptr0 =
|
|
515
|
+
trySessionExecute(app_id, calls, fee_source) {
|
|
516
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
550
517
|
const len0 = WASM_VECTOR_LEN;
|
|
551
|
-
const
|
|
518
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
519
|
+
const len1 = WASM_VECTOR_LEN;
|
|
520
|
+
const ret = wasm.cartridgeaccount_trySessionExecute(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
521
|
+
return takeObject(ret);
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* @param {string} rp_id
|
|
525
|
+
* @returns {Promise<JsAddSignerInput>}
|
|
526
|
+
*/
|
|
527
|
+
createPasskeySigner(rp_id) {
|
|
528
|
+
const ptr0 = passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
529
|
+
const len0 = WASM_VECTOR_LEN;
|
|
530
|
+
const ret = wasm.cartridgeaccount_createPasskeySigner(this.__wbg_ptr, ptr0, len0);
|
|
531
|
+
return takeObject(ret);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* @param {string} app_id
|
|
535
|
+
* @param {Policy[]} policies
|
|
536
|
+
* @returns {Promise<boolean>}
|
|
537
|
+
*/
|
|
538
|
+
hasRequestedSession(app_id, policies) {
|
|
539
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
540
|
+
const len0 = WASM_VECTOR_LEN;
|
|
541
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
542
|
+
const len1 = WASM_VECTOR_LEN;
|
|
543
|
+
const ret = wasm.cartridgeaccount_hasRequestedSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
552
544
|
return takeObject(ret);
|
|
553
545
|
}
|
|
554
546
|
/**
|
|
@@ -574,151 +566,159 @@ export class CartridgeAccount {
|
|
|
574
566
|
return takeObject(ret);
|
|
575
567
|
}
|
|
576
568
|
/**
|
|
569
|
+
* Checks if there are stored policies for a given app_id.
|
|
570
|
+
*
|
|
571
|
+
* # Parameters
|
|
572
|
+
* - `app_id`: The application identifier to check for stored policies
|
|
573
|
+
*
|
|
574
|
+
* # Returns
|
|
575
|
+
* `true` if policies exist for the given app_id, `false` otherwise
|
|
577
576
|
* @param {string} app_id
|
|
578
|
-
* @
|
|
579
|
-
* @param {JsFeeSource | null} [fee_source]
|
|
580
|
-
* @returns {Promise<any>}
|
|
577
|
+
* @returns {Promise<boolean>}
|
|
581
578
|
*/
|
|
582
|
-
|
|
579
|
+
hasPoliciesForAppId(app_id) {
|
|
583
580
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
584
581
|
const len0 = WASM_VECTOR_LEN;
|
|
585
|
-
const
|
|
586
|
-
const len1 = WASM_VECTOR_LEN;
|
|
587
|
-
const ret = wasm.cartridgeaccount_trySessionExecute(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
582
|
+
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
588
583
|
return takeObject(ret);
|
|
589
584
|
}
|
|
590
585
|
/**
|
|
591
586
|
* @param {Policy[]} policies
|
|
592
|
-
* @param {
|
|
593
|
-
* @
|
|
587
|
+
* @param {bigint} expires_at
|
|
588
|
+
* @param {JsFelt} public_key
|
|
589
|
+
* @returns {Promise<any>}
|
|
594
590
|
*/
|
|
595
|
-
|
|
591
|
+
registerSessionCalldata(policies, expires_at, public_key) {
|
|
596
592
|
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
597
593
|
const len0 = WASM_VECTOR_LEN;
|
|
598
|
-
const ret = wasm.
|
|
594
|
+
const ret = wasm.cartridgeaccount_registerSessionCalldata(this.__wbg_ptr, ptr0, len0, expires_at, addHeapObject(public_key));
|
|
599
595
|
return takeObject(ret);
|
|
600
596
|
}
|
|
601
597
|
/**
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
598
|
+
* Signs an OutsideExecution V3 transaction and returns both the OutsideExecution object and its signature.
|
|
599
|
+
*
|
|
600
|
+
* # Parameters
|
|
601
|
+
* - `calls`: Array of calls to execute from outside
|
|
602
|
+
*
|
|
603
|
+
* # Returns
|
|
604
|
+
* A `JsSignedOutsideExecution` containing the OutsideExecution V3 object and its signature
|
|
605
|
+
* @param {JsCall[]} calls
|
|
606
|
+
* @returns {Promise<JsSignedOutsideExecution>}
|
|
605
607
|
*/
|
|
606
|
-
|
|
607
|
-
const ptr0 =
|
|
608
|
+
signExecuteFromOutside(calls) {
|
|
609
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
608
610
|
const len0 = WASM_VECTOR_LEN;
|
|
609
|
-
const
|
|
610
|
-
const len1 = WASM_VECTOR_LEN;
|
|
611
|
-
const ret = wasm.cartridgeaccount_hasRequestedSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
611
|
+
const ret = wasm.cartridgeaccount_signExecuteFromOutside(this.__wbg_ptr, ptr0, len0);
|
|
612
612
|
return takeObject(ret);
|
|
613
613
|
}
|
|
614
614
|
/**
|
|
615
|
-
* @param {
|
|
616
|
-
* @
|
|
615
|
+
* @param {Policy[]} policies
|
|
616
|
+
* @param {JsFelt | null} [public_key]
|
|
617
|
+
* @returns {Promise<AuthorizedSession | undefined>}
|
|
617
618
|
*/
|
|
618
|
-
|
|
619
|
-
const
|
|
619
|
+
isRegisteredSessionAuthorized(policies, public_key) {
|
|
620
|
+
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
621
|
+
const len0 = WASM_VECTOR_LEN;
|
|
622
|
+
const ret = wasm.cartridgeaccount_isRegisteredSessionAuthorized(this.__wbg_ptr, ptr0, len0, isLikeNone(public_key) ? 0 : addHeapObject(public_key));
|
|
620
623
|
return takeObject(ret);
|
|
621
624
|
}
|
|
622
625
|
/**
|
|
623
|
-
* @param {
|
|
624
|
-
* @
|
|
626
|
+
* @param {string} app_id
|
|
627
|
+
* @param {JsCall[]} calls
|
|
628
|
+
* @returns {Promise<boolean>}
|
|
625
629
|
*/
|
|
626
|
-
|
|
627
|
-
const ptr0 =
|
|
630
|
+
hasAuthorizedPoliciesForCalls(app_id, calls) {
|
|
631
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
628
632
|
const len0 = WASM_VECTOR_LEN;
|
|
629
|
-
const
|
|
633
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
634
|
+
const len1 = WASM_VECTOR_LEN;
|
|
635
|
+
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForCalls(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
630
636
|
return takeObject(ret);
|
|
631
637
|
}
|
|
632
638
|
/**
|
|
639
|
+
* @param {string} app_id
|
|
633
640
|
* @param {string} typed_data
|
|
634
|
-
* @returns {Promise<
|
|
641
|
+
* @returns {Promise<boolean>}
|
|
635
642
|
*/
|
|
636
|
-
|
|
637
|
-
const ptr0 = passStringToWasm0(
|
|
643
|
+
hasAuthorizedPoliciesForMessage(app_id, typed_data) {
|
|
644
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
638
645
|
const len0 = WASM_VECTOR_LEN;
|
|
639
|
-
const
|
|
646
|
+
const ptr1 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
647
|
+
const len1 = WASM_VECTOR_LEN;
|
|
648
|
+
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
640
649
|
return takeObject(ret);
|
|
641
650
|
}
|
|
642
651
|
/**
|
|
643
|
-
*
|
|
652
|
+
* Creates a new `CartridgeAccount` instance.
|
|
653
|
+
*
|
|
654
|
+
* # Parameters
|
|
655
|
+
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
656
|
+
* - `address`: The blockchain address associated with the account.
|
|
657
|
+
* - `username`: Username associated with the account.
|
|
658
|
+
* - `owner`: A Owner struct containing the owner signer and associated data.
|
|
659
|
+
* @param {JsFelt} class_hash
|
|
660
|
+
* @param {string} rpc_url
|
|
661
|
+
* @param {JsFelt} address
|
|
662
|
+
* @param {string} username
|
|
663
|
+
* @param {Owner} owner
|
|
664
|
+
* @param {string} cartridge_api_url
|
|
665
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
644
666
|
*/
|
|
645
|
-
|
|
646
|
-
const
|
|
667
|
+
static new(class_hash, rpc_url, address, username, owner, cartridge_api_url) {
|
|
668
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
669
|
+
const len0 = WASM_VECTOR_LEN;
|
|
670
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
671
|
+
const len1 = WASM_VECTOR_LEN;
|
|
672
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
673
|
+
const len2 = WASM_VECTOR_LEN;
|
|
674
|
+
const ret = wasm.cartridgeaccount_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(address), ptr1, len1, addHeapObject(owner), ptr2, len2);
|
|
647
675
|
return takeObject(ret);
|
|
648
676
|
}
|
|
649
677
|
/**
|
|
678
|
+
* @param {JsCall[]} calls
|
|
650
679
|
* @param {JsFeeEstimate | null} [max_fee]
|
|
651
|
-
* @
|
|
652
|
-
|
|
653
|
-
deploySelf(max_fee) {
|
|
654
|
-
const ret = wasm.cartridgeaccount_deploySelf(this.__wbg_ptr, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
655
|
-
return takeObject(ret);
|
|
656
|
-
}
|
|
657
|
-
/**
|
|
658
|
-
* @returns {Promise<JsFelt>}
|
|
680
|
+
* @param {JsFeeSource | null} [fee_source]
|
|
681
|
+
* @returns {Promise<any>}
|
|
659
682
|
*/
|
|
660
|
-
|
|
661
|
-
const
|
|
683
|
+
execute(calls, max_fee, fee_source) {
|
|
684
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
685
|
+
const len0 = WASM_VECTOR_LEN;
|
|
686
|
+
const ret = wasm.cartridgeaccount_execute(this.__wbg_ptr, ptr0, len0, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee), isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
662
687
|
return takeObject(ret);
|
|
663
688
|
}
|
|
664
689
|
/**
|
|
665
|
-
* @param {
|
|
666
|
-
* @
|
|
667
|
-
* @returns {Promise<boolean>}
|
|
690
|
+
* @param {JsFelt} new_class_hash
|
|
691
|
+
* @returns {Promise<JsCall>}
|
|
668
692
|
*/
|
|
669
|
-
|
|
670
|
-
const
|
|
671
|
-
const len0 = WASM_VECTOR_LEN;
|
|
672
|
-
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
673
|
-
const len1 = WASM_VECTOR_LEN;
|
|
674
|
-
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForCalls(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
693
|
+
upgrade(new_class_hash) {
|
|
694
|
+
const ret = wasm.cartridgeaccount_upgrade(this.__wbg_ptr, addHeapObject(new_class_hash));
|
|
675
695
|
return takeObject(ret);
|
|
676
696
|
}
|
|
677
697
|
/**
|
|
678
|
-
* @param {
|
|
679
|
-
* @
|
|
680
|
-
* @returns {Promise<boolean>}
|
|
698
|
+
* @param {JsRegister} register
|
|
699
|
+
* @returns {Promise<JsRegisterResponse>}
|
|
681
700
|
*/
|
|
682
|
-
|
|
683
|
-
const
|
|
684
|
-
const len0 = WASM_VECTOR_LEN;
|
|
685
|
-
const ptr1 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
686
|
-
const len1 = WASM_VECTOR_LEN;
|
|
687
|
-
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
701
|
+
register(register) {
|
|
702
|
+
const ret = wasm.cartridgeaccount_register(this.__wbg_ptr, addHeapObject(register));
|
|
688
703
|
return takeObject(ret);
|
|
689
704
|
}
|
|
690
705
|
/**
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
* # Returns
|
|
697
|
-
* A `JsSignedOutsideExecution` containing the OutsideExecution V3 object and its signature
|
|
698
|
-
* @param {JsCall[]} calls
|
|
699
|
-
* @returns {Promise<JsSignedOutsideExecution>}
|
|
706
|
+
* @param {Signer | null} [owner]
|
|
707
|
+
* @param {JsAddSignerInput | null} [signer_input]
|
|
708
|
+
* @param {string | null} [rp_id]
|
|
709
|
+
* @returns {Promise<void>}
|
|
700
710
|
*/
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
const ret = wasm.
|
|
711
|
+
addOwner(owner, signer_input, rp_id) {
|
|
712
|
+
var ptr0 = isLikeNone(rp_id) ? 0 : passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
713
|
+
var len0 = WASM_VECTOR_LEN;
|
|
714
|
+
const ret = wasm.cartridgeaccount_addOwner(this.__wbg_ptr, isLikeNone(owner) ? 0 : addHeapObject(owner), isLikeNone(signer_input) ? 0 : addHeapObject(signer_input), ptr0, len0);
|
|
705
715
|
return takeObject(ret);
|
|
706
716
|
}
|
|
707
717
|
/**
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
* # Parameters
|
|
711
|
-
* - `app_id`: The application identifier to check for stored policies
|
|
712
|
-
*
|
|
713
|
-
* # Returns
|
|
714
|
-
* `true` if policies exist for the given app_id, `false` otherwise
|
|
715
|
-
* @param {string} app_id
|
|
716
|
-
* @returns {Promise<boolean>}
|
|
718
|
+
* @returns {Promise<any>}
|
|
717
719
|
*/
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
const len0 = WASM_VECTOR_LEN;
|
|
721
|
-
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
720
|
+
getNonce() {
|
|
721
|
+
const ret = wasm.cartridgeaccount_getNonce(this.__wbg_ptr);
|
|
722
722
|
return takeObject(ret);
|
|
723
723
|
}
|
|
724
724
|
}
|
|
@@ -758,12 +758,12 @@ export class CartridgeAccountMeta {
|
|
|
758
758
|
/**
|
|
759
759
|
* @returns {string}
|
|
760
760
|
*/
|
|
761
|
-
|
|
761
|
+
classHash() {
|
|
762
762
|
let deferred1_0;
|
|
763
763
|
let deferred1_1;
|
|
764
764
|
try {
|
|
765
765
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
766
|
-
wasm.
|
|
766
|
+
wasm.cartridgeaccountmeta_classHash(retptr, this.__wbg_ptr);
|
|
767
767
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
768
768
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
769
769
|
deferred1_0 = r0;
|
|
@@ -774,6 +774,20 @@ export class CartridgeAccountMeta {
|
|
|
774
774
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
|
+
/**
|
|
778
|
+
* @returns {JsFelt}
|
|
779
|
+
*/
|
|
780
|
+
ownerGuid() {
|
|
781
|
+
const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
|
|
782
|
+
return takeObject(ret);
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* @returns {Owner}
|
|
786
|
+
*/
|
|
787
|
+
owner() {
|
|
788
|
+
const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
|
|
789
|
+
return takeObject(ret);
|
|
790
|
+
}
|
|
777
791
|
/**
|
|
778
792
|
* @returns {string}
|
|
779
793
|
*/
|
|
@@ -796,12 +810,12 @@ export class CartridgeAccountMeta {
|
|
|
796
810
|
/**
|
|
797
811
|
* @returns {string}
|
|
798
812
|
*/
|
|
799
|
-
|
|
813
|
+
rpcUrl() {
|
|
800
814
|
let deferred1_0;
|
|
801
815
|
let deferred1_1;
|
|
802
816
|
try {
|
|
803
817
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
804
|
-
wasm.
|
|
818
|
+
wasm.cartridgeaccountmeta_rpcUrl(retptr, this.__wbg_ptr);
|
|
805
819
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
806
820
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
807
821
|
deferred1_0 = r0;
|
|
@@ -815,12 +829,12 @@ export class CartridgeAccountMeta {
|
|
|
815
829
|
/**
|
|
816
830
|
* @returns {string}
|
|
817
831
|
*/
|
|
818
|
-
|
|
832
|
+
chainId() {
|
|
819
833
|
let deferred1_0;
|
|
820
834
|
let deferred1_1;
|
|
821
835
|
try {
|
|
822
836
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
823
|
-
wasm.
|
|
837
|
+
wasm.cartridgeaccountmeta_chainId(retptr, this.__wbg_ptr);
|
|
824
838
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
825
839
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
826
840
|
deferred1_0 = r0;
|
|
@@ -834,12 +848,12 @@ export class CartridgeAccountMeta {
|
|
|
834
848
|
/**
|
|
835
849
|
* @returns {string}
|
|
836
850
|
*/
|
|
837
|
-
|
|
851
|
+
username() {
|
|
838
852
|
let deferred1_0;
|
|
839
853
|
let deferred1_1;
|
|
840
854
|
try {
|
|
841
855
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
842
|
-
wasm.
|
|
856
|
+
wasm.cartridgeaccountmeta_username(retptr, this.__wbg_ptr);
|
|
843
857
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
844
858
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
845
859
|
deferred1_0 = r0;
|
|
@@ -850,20 +864,6 @@ export class CartridgeAccountMeta {
|
|
|
850
864
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
851
865
|
}
|
|
852
866
|
}
|
|
853
|
-
/**
|
|
854
|
-
* @returns {Owner}
|
|
855
|
-
*/
|
|
856
|
-
owner() {
|
|
857
|
-
const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
|
|
858
|
-
return takeObject(ret);
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* @returns {JsFelt}
|
|
862
|
-
*/
|
|
863
|
-
ownerGuid() {
|
|
864
|
-
const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
|
|
865
|
-
return takeObject(ret);
|
|
866
|
-
}
|
|
867
867
|
}
|
|
868
868
|
if (Symbol.dispose) CartridgeAccountMeta.prototype[Symbol.dispose] = CartridgeAccountMeta.prototype.free;
|
|
869
869
|
|
|
@@ -892,13 +892,6 @@ export class CartridgeAccountWithMeta {
|
|
|
892
892
|
const ptr = this.__destroy_into_raw();
|
|
893
893
|
wasm.__wbg_cartridgeaccountwithmeta_free(ptr, 0);
|
|
894
894
|
}
|
|
895
|
-
/**
|
|
896
|
-
* @returns {CartridgeAccountMeta}
|
|
897
|
-
*/
|
|
898
|
-
meta() {
|
|
899
|
-
const ret = wasm.cartridgeaccountwithmeta_meta(this.__wbg_ptr);
|
|
900
|
-
return CartridgeAccountMeta.__wrap(ret);
|
|
901
|
-
}
|
|
902
895
|
/**
|
|
903
896
|
* @returns {CartridgeAccount}
|
|
904
897
|
*/
|
|
@@ -907,6 +900,13 @@ export class CartridgeAccountWithMeta {
|
|
|
907
900
|
const ret = wasm.cartridgeaccountwithmeta_intoAccount(ptr);
|
|
908
901
|
return CartridgeAccount.__wrap(ret);
|
|
909
902
|
}
|
|
903
|
+
/**
|
|
904
|
+
* @returns {CartridgeAccountMeta}
|
|
905
|
+
*/
|
|
906
|
+
meta() {
|
|
907
|
+
const ret = wasm.cartridgeaccountwithmeta_meta(this.__wbg_ptr);
|
|
908
|
+
return CartridgeAccountMeta.__wrap(ret);
|
|
909
|
+
}
|
|
910
910
|
}
|
|
911
911
|
if (Symbol.dispose) CartridgeAccountWithMeta.prototype[Symbol.dispose] = CartridgeAccountWithMeta.prototype.free;
|
|
912
912
|
|
|
@@ -1104,6 +1104,13 @@ export class JsChainConfig {
|
|
|
1104
1104
|
const ptr = this.__destroy_into_raw();
|
|
1105
1105
|
wasm.__wbg_jschainconfig_free(ptr, 0);
|
|
1106
1106
|
}
|
|
1107
|
+
/**
|
|
1108
|
+
* @returns {JsFelt}
|
|
1109
|
+
*/
|
|
1110
|
+
get class_hash() {
|
|
1111
|
+
const ret = wasm.jschainconfig_class_hash(this.__wbg_ptr);
|
|
1112
|
+
return takeObject(ret);
|
|
1113
|
+
}
|
|
1107
1114
|
/**
|
|
1108
1115
|
* @param {JsFelt} class_hash
|
|
1109
1116
|
* @param {string} rpc_url
|
|
@@ -1119,10 +1126,17 @@ export class JsChainConfig {
|
|
|
1119
1126
|
return this;
|
|
1120
1127
|
}
|
|
1121
1128
|
/**
|
|
1122
|
-
* @returns {
|
|
1129
|
+
* @returns {Owner}
|
|
1123
1130
|
*/
|
|
1124
|
-
get
|
|
1125
|
-
const ret = wasm.
|
|
1131
|
+
get owner() {
|
|
1132
|
+
const ret = wasm.jschainconfig_owner(this.__wbg_ptr);
|
|
1133
|
+
return takeObject(ret);
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* @returns {JsFelt | undefined}
|
|
1137
|
+
*/
|
|
1138
|
+
get address() {
|
|
1139
|
+
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
1126
1140
|
return takeObject(ret);
|
|
1127
1141
|
}
|
|
1128
1142
|
/**
|
|
@@ -1144,20 +1158,6 @@ export class JsChainConfig {
|
|
|
1144
1158
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1145
1159
|
}
|
|
1146
1160
|
}
|
|
1147
|
-
/**
|
|
1148
|
-
* @returns {Owner}
|
|
1149
|
-
*/
|
|
1150
|
-
get owner() {
|
|
1151
|
-
const ret = wasm.jschainconfig_owner(this.__wbg_ptr);
|
|
1152
|
-
return takeObject(ret);
|
|
1153
|
-
}
|
|
1154
|
-
/**
|
|
1155
|
-
* @returns {JsFelt | undefined}
|
|
1156
|
-
*/
|
|
1157
|
-
get address() {
|
|
1158
|
-
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
1159
|
-
return takeObject(ret);
|
|
1160
|
-
}
|
|
1161
1161
|
}
|
|
1162
1162
|
if (Symbol.dispose) JsChainConfig.prototype[Symbol.dispose] = JsChainConfig.prototype.free;
|
|
1163
1163
|
|
|
@@ -1300,20 +1300,12 @@ export class MultiChainAccount {
|
|
|
1300
1300
|
wasm.__wbg_multichainaccount_free(ptr, 0);
|
|
1301
1301
|
}
|
|
1302
1302
|
/**
|
|
1303
|
-
*
|
|
1304
|
-
* @param {
|
|
1305
|
-
* @
|
|
1306
|
-
* @param {string} cartridge_api_url
|
|
1307
|
-
* @returns {Promise<MultiChainAccount>}
|
|
1303
|
+
* Gets an account instance for a specific chain
|
|
1304
|
+
* @param {JsFelt} chain_id
|
|
1305
|
+
* @returns {Promise<CartridgeAccount>}
|
|
1308
1306
|
*/
|
|
1309
|
-
|
|
1310
|
-
const
|
|
1311
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1312
|
-
const ptr1 = passArrayJsValueToWasm0(chain_configs, wasm.__wbindgen_export);
|
|
1313
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1314
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1315
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1316
|
-
const ret = wasm.multichainaccount_create(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1307
|
+
controller(chain_id) {
|
|
1308
|
+
const ret = wasm.multichainaccount_controller(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1317
1309
|
return takeObject(ret);
|
|
1318
1310
|
}
|
|
1319
1311
|
/**
|
|
@@ -1327,17 +1319,6 @@ export class MultiChainAccount {
|
|
|
1327
1319
|
const ret = wasm.multichainaccount_fromStorage(ptr0, len0);
|
|
1328
1320
|
return takeObject(ret);
|
|
1329
1321
|
}
|
|
1330
|
-
/**
|
|
1331
|
-
* Adds a new chain configuration
|
|
1332
|
-
* @param {JsChainConfig} config
|
|
1333
|
-
* @returns {Promise<void>}
|
|
1334
|
-
*/
|
|
1335
|
-
addChain(config) {
|
|
1336
|
-
_assertClass(config, JsChainConfig);
|
|
1337
|
-
var ptr0 = config.__destroy_into_raw();
|
|
1338
|
-
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
1339
|
-
return takeObject(ret);
|
|
1340
|
-
}
|
|
1341
1322
|
/**
|
|
1342
1323
|
* Removes a chain configuration
|
|
1343
1324
|
* @param {JsFelt} chain_id
|
|
@@ -1348,12 +1329,31 @@ export class MultiChainAccount {
|
|
|
1348
1329
|
return takeObject(ret);
|
|
1349
1330
|
}
|
|
1350
1331
|
/**
|
|
1351
|
-
*
|
|
1352
|
-
* @param {
|
|
1353
|
-
* @
|
|
1332
|
+
* Creates a new MultiChainAccount with multiple chain configurations
|
|
1333
|
+
* @param {string} username
|
|
1334
|
+
* @param {JsChainConfig[]} chain_configs
|
|
1335
|
+
* @param {string} cartridge_api_url
|
|
1336
|
+
* @returns {Promise<MultiChainAccount>}
|
|
1354
1337
|
*/
|
|
1355
|
-
|
|
1356
|
-
const
|
|
1338
|
+
static create(username, chain_configs, cartridge_api_url) {
|
|
1339
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1340
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1341
|
+
const ptr1 = passArrayJsValueToWasm0(chain_configs, wasm.__wbindgen_export);
|
|
1342
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1343
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1344
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1345
|
+
const ret = wasm.multichainaccount_create(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1346
|
+
return takeObject(ret);
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Adds a new chain configuration
|
|
1350
|
+
* @param {JsChainConfig} config
|
|
1351
|
+
* @returns {Promise<void>}
|
|
1352
|
+
*/
|
|
1353
|
+
addChain(config) {
|
|
1354
|
+
_assertClass(config, JsChainConfig);
|
|
1355
|
+
var ptr0 = config.__destroy_into_raw();
|
|
1356
|
+
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
1357
1357
|
return takeObject(ret);
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
@@ -1374,38 +1374,38 @@ export class MultiChainAccountMeta {
|
|
|
1374
1374
|
wasm.__wbg_multichainaccountmeta_free(ptr, 0);
|
|
1375
1375
|
}
|
|
1376
1376
|
/**
|
|
1377
|
-
* @returns {
|
|
1377
|
+
* @returns {JsFelt[]}
|
|
1378
1378
|
*/
|
|
1379
|
-
get
|
|
1380
|
-
let deferred1_0;
|
|
1381
|
-
let deferred1_1;
|
|
1379
|
+
get chains() {
|
|
1382
1380
|
try {
|
|
1383
1381
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1384
|
-
wasm.
|
|
1382
|
+
wasm.multichainaccountmeta_chains(retptr, this.__wbg_ptr);
|
|
1385
1383
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1386
1384
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
return
|
|
1385
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1386
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
1387
|
+
return v1;
|
|
1390
1388
|
} finally {
|
|
1391
1389
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1392
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1393
1390
|
}
|
|
1394
1391
|
}
|
|
1395
1392
|
/**
|
|
1396
|
-
* @returns {
|
|
1393
|
+
* @returns {string}
|
|
1397
1394
|
*/
|
|
1398
|
-
get
|
|
1395
|
+
get username() {
|
|
1396
|
+
let deferred1_0;
|
|
1397
|
+
let deferred1_1;
|
|
1399
1398
|
try {
|
|
1400
1399
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1401
|
-
wasm.
|
|
1400
|
+
wasm.multichainaccountmeta_username(retptr, this.__wbg_ptr);
|
|
1402
1401
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1403
1402
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
return
|
|
1403
|
+
deferred1_0 = r0;
|
|
1404
|
+
deferred1_1 = r1;
|
|
1405
|
+
return getStringFromWasm0(r0, r1);
|
|
1407
1406
|
} finally {
|
|
1408
1407
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1408
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
@@ -1602,7 +1602,7 @@ export function __wbg_cartridgeaccountwithmeta_new(arg0) {
|
|
|
1602
1602
|
return addHeapObject(ret);
|
|
1603
1603
|
};
|
|
1604
1604
|
|
|
1605
|
-
export function
|
|
1605
|
+
export function __wbg_clearTimeout_42d9ccd50822fd3a(arg0) {
|
|
1606
1606
|
const ret = clearTimeout(takeObject(arg0));
|
|
1607
1607
|
return addHeapObject(ret);
|
|
1608
1608
|
};
|
|
@@ -1640,7 +1640,7 @@ export function __wbg_error_7bc7d576a6aaf855(arg0) {
|
|
|
1640
1640
|
console.error(getObject(arg0));
|
|
1641
1641
|
};
|
|
1642
1642
|
|
|
1643
|
-
export function
|
|
1643
|
+
export function __wbg_fetch_6bbc32f991730587(arg0) {
|
|
1644
1644
|
const ret = fetch(getObject(arg0));
|
|
1645
1645
|
return addHeapObject(ret);
|
|
1646
1646
|
};
|
|
@@ -1869,7 +1869,7 @@ export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
|
|
|
1869
1869
|
const a = state0.a;
|
|
1870
1870
|
state0.a = 0;
|
|
1871
1871
|
try {
|
|
1872
|
-
return
|
|
1872
|
+
return __wasm_bindgen_func_elem_10881(a, state0.b, arg0, arg1);
|
|
1873
1873
|
} finally {
|
|
1874
1874
|
state0.a = a;
|
|
1875
1875
|
}
|
|
@@ -2019,7 +2019,7 @@ export function __wbg_setTimeout_425032fd8860bd1e() { return handleError(functio
|
|
|
2019
2019
|
return ret;
|
|
2020
2020
|
}, arguments) };
|
|
2021
2021
|
|
|
2022
|
-
export function
|
|
2022
|
+
export function __wbg_setTimeout_4ec014681668a581(arg0, arg1) {
|
|
2023
2023
|
const ret = setTimeout(getObject(arg0), arg1);
|
|
2024
2024
|
return addHeapObject(ret);
|
|
2025
2025
|
};
|
|
@@ -2181,12 +2181,6 @@ export function __wbg_versions_c01dfd4722a88165(arg0) {
|
|
|
2181
2181
|
return addHeapObject(ret);
|
|
2182
2182
|
};
|
|
2183
2183
|
|
|
2184
|
-
export function __wbindgen_cast_049472464cf157cc(arg0, arg1) {
|
|
2185
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 970, function: Function { arguments: [], shim_idx: 971, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2186
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8700, __wasm_bindgen_func_elem_8709);
|
|
2187
|
-
return addHeapObject(ret);
|
|
2188
|
-
};
|
|
2189
|
-
|
|
2190
2184
|
export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
2191
2185
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2192
2186
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -2195,13 +2189,19 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
|
2195
2189
|
|
|
2196
2190
|
export function __wbindgen_cast_4082834687a71a5d(arg0, arg1) {
|
|
2197
2191
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 1, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
2198
|
-
const ret = makeClosure(arg0, arg1, wasm.
|
|
2192
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_235, __wasm_bindgen_func_elem_3270);
|
|
2193
|
+
return addHeapObject(ret);
|
|
2194
|
+
};
|
|
2195
|
+
|
|
2196
|
+
export function __wbindgen_cast_7150eb18024763bc(arg0, arg1) {
|
|
2197
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 969, function: Function { arguments: [], shim_idx: 970, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2198
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8628, __wasm_bindgen_func_elem_8637);
|
|
2199
2199
|
return addHeapObject(ret);
|
|
2200
2200
|
};
|
|
2201
2201
|
|
|
2202
|
-
export function
|
|
2203
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2204
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2202
|
+
export function __wbindgen_cast_838747baf6b6553b(arg0, arg1) {
|
|
2203
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1004, function: Function { arguments: [Externref], shim_idx: 1005, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2204
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8772, __wasm_bindgen_func_elem_8787);
|
|
2205
2205
|
return addHeapObject(ret);
|
|
2206
2206
|
};
|
|
2207
2207
|
|