@@ -104,15 +104,13 @@ function getInt32Memory0() {
104
104
return cachedInt32Memory0 ;
105
105
}
106
106
107
- const lTextDecoder = typeof TextDecoder === 'undefined' ? ( 0 , module . require ) ( 'util' ) . TextDecoder : TextDecoder ;
108
-
109
- let cachedTextDecoder = new lTextDecoder ( 'utf-8' , { ignoreBOM : true , fatal : true } ) ;
110
-
111
- cachedTextDecoder . decode ( ) ;
107
+ let cachedFloat64Memory0 = null ;
112
108
113
- function getStringFromWasm0 ( ptr , len ) {
114
- ptr = ptr >>> 0 ;
115
- return cachedTextDecoder . decode ( getUint8Memory0 ( ) . subarray ( ptr , ptr + len ) ) ;
109
+ function getFloat64Memory0 ( ) {
110
+ if ( cachedFloat64Memory0 === null || cachedFloat64Memory0 . byteLength === 0 ) {
111
+ cachedFloat64Memory0 = new Float64Array ( wasm . memory . buffer ) ;
112
+ }
113
+ return cachedFloat64Memory0 ;
116
114
}
117
115
118
116
function addHeapObject ( obj ) {
@@ -124,13 +122,15 @@ function addHeapObject(obj) {
124
122
return idx ;
125
123
}
126
124
127
- let cachedFloat64Memory0 = null ;
125
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? ( 0 , module . require ) ( 'util' ) . TextDecoder : TextDecoder ;
128
126
129
- function getFloat64Memory0 ( ) {
130
- if ( cachedFloat64Memory0 === null || cachedFloat64Memory0 . byteLength === 0 ) {
131
- cachedFloat64Memory0 = new Float64Array ( wasm . memory . buffer ) ;
132
- }
133
- return cachedFloat64Memory0 ;
127
+ let cachedTextDecoder = new lTextDecoder ( 'utf-8' , { ignoreBOM : true , fatal : true } ) ;
128
+
129
+ cachedTextDecoder . decode ( ) ;
130
+
131
+ function getStringFromWasm0 ( ptr , len ) {
132
+ ptr = ptr >>> 0 ;
133
+ return cachedTextDecoder . decode ( getUint8Memory0 ( ) . subarray ( ptr , ptr + len ) ) ;
134
134
}
135
135
136
136
let cachedBigInt64Memory0 = null ;
@@ -238,7 +238,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
238
238
return real ;
239
239
}
240
240
function __wbg_adapter_48 ( arg0 , arg1 , arg2 ) {
241
- wasm . _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4f854f1ab9269aba ( arg0 , arg1 , addHeapObject ( arg2 ) ) ;
241
+ wasm . _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h18209be10352b66c ( arg0 , arg1 , addHeapObject ( arg2 ) ) ;
242
242
}
243
243
244
244
let cachedUint32Memory0 = null ;
@@ -267,8 +267,8 @@ function handleError(f, args) {
267
267
wasm . __wbindgen_exn_store ( addHeapObject ( e ) ) ;
268
268
}
269
269
}
270
- function __wbg_adapter_176 ( arg0 , arg1 , arg2 , arg3 ) {
271
- wasm . wasm_bindgen__convert__closures__invoke2_mut__h124d41d3678e7072 ( arg0 , arg1 , addHeapObject ( arg2 ) , addHeapObject ( arg3 ) ) ;
270
+ function __wbg_adapter_180 ( arg0 , arg1 , arg2 , arg3 ) {
271
+ wasm . wasm_bindgen__convert__closures__invoke2_mut__h09491c54862df783 ( arg0 , arg1 , addHeapObject ( arg2 ) , addHeapObject ( arg3 ) ) ;
272
272
}
273
273
274
274
const CartridgeAccountFinalization = ( typeof FinalizationRegistry === 'undefined' )
@@ -435,6 +435,29 @@ export class CartridgeAccount {
435
435
}
436
436
}
437
437
/**
438
+ * @param {any[] } policies
439
+ * @param {bigint } expires_at
440
+ * @param {any } external_account
441
+ * @returns {any }
442
+ */
443
+ static registerSessionCalldata ( policies , expires_at , external_account ) {
444
+ try {
445
+ const retptr = wasm . __wbindgen_add_to_stack_pointer ( - 16 ) ;
446
+ const ptr0 = passArrayJsValueToWasm0 ( policies , wasm . __wbindgen_malloc ) ;
447
+ const len0 = WASM_VECTOR_LEN ;
448
+ wasm . cartridgeaccount_registerSessionCalldata ( retptr , ptr0 , len0 , expires_at , addHeapObject ( external_account ) ) ;
449
+ var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
450
+ var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
451
+ var r2 = getInt32Memory0 ( ) [ retptr / 4 + 2 ] ;
452
+ if ( r2 ) {
453
+ throw takeObject ( r1 ) ;
454
+ }
455
+ return takeObject ( r0 ) ;
456
+ } finally {
457
+ wasm . __wbindgen_add_to_stack_pointer ( 16 ) ;
458
+ }
459
+ }
460
+ /**
438
461
*/
439
462
revokeSession ( ) {
440
463
try {
@@ -474,6 +497,40 @@ export class CartridgeAccount {
474
497
const ret = wasm . cartridgeaccount_delegateAccount ( this . __wbg_ptr ) ;
475
498
return takeObject ( ret ) ;
476
499
}
500
+ /**
501
+ * @param {any } salt
502
+ * @param {any } external_owner
503
+ * @returns {any }
504
+ */
505
+ static getUdcDeployedAddress ( salt , external_owner ) {
506
+ try {
507
+ const retptr = wasm . __wbindgen_add_to_stack_pointer ( - 16 ) ;
508
+ wasm . cartridgeaccount_getUdcDeployedAddress ( retptr , addHeapObject ( salt ) , addHeapObject ( external_owner ) ) ;
509
+ var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
510
+ var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
511
+ var r2 = getInt32Memory0 ( ) [ retptr / 4 + 2 ] ;
512
+ if ( r2 ) {
513
+ throw takeObject ( r1 ) ;
514
+ }
515
+ return takeObject ( r0 ) ;
516
+ } finally {
517
+ wasm . __wbindgen_add_to_stack_pointer ( 16 ) ;
518
+ }
519
+ }
520
+ /**
521
+ * @returns {any }
522
+ */
523
+ static getAccountClassHash ( ) {
524
+ const ret = wasm . cartridgeaccount_getAccountClassHash ( ) ;
525
+ return takeObject ( ret ) ;
526
+ }
527
+ /**
528
+ * @returns {any }
529
+ */
530
+ static getUdcAddress ( ) {
531
+ const ret = wasm . cartridgeaccount_getUdcAddress ( ) ;
532
+ return takeObject ( ret ) ;
533
+ }
477
534
}
478
535
479
536
export function __wbindgen_object_drop_ref ( arg0 ) {
@@ -489,21 +546,6 @@ export function __wbindgen_string_get(arg0, arg1) {
489
546
getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr1 ;
490
547
} ;
491
548
492
- export function __wbindgen_error_new ( arg0 , arg1 ) {
493
- const ret = new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
494
- return addHeapObject ( ret ) ;
495
- } ;
496
-
497
- export function __wbindgen_string_new ( arg0 , arg1 ) {
498
- const ret = getStringFromWasm0 ( arg0 , arg1 ) ;
499
- return addHeapObject ( ret ) ;
500
- } ;
501
-
502
- export function __wbindgen_object_clone_ref ( arg0 ) {
503
- const ret = getObject ( arg0 ) ;
504
- return addHeapObject ( ret ) ;
505
- } ;
506
-
507
549
export function __wbindgen_is_undefined ( arg0 ) {
508
550
const ret = getObject ( arg0 ) === undefined ;
509
551
return ret ;
@@ -553,6 +595,21 @@ export function __wbindgen_bigint_from_u64(arg0) {
553
595
return addHeapObject ( ret ) ;
554
596
} ;
555
597
598
+ export function __wbindgen_error_new ( arg0 , arg1 ) {
599
+ const ret = new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
600
+ return addHeapObject ( ret ) ;
601
+ } ;
602
+
603
+ export function __wbindgen_string_new ( arg0 , arg1 ) {
604
+ const ret = getStringFromWasm0 ( arg0 , arg1 ) ;
605
+ return addHeapObject ( ret ) ;
606
+ } ;
607
+
608
+ export function __wbindgen_object_clone_ref ( arg0 ) {
609
+ const ret = getObject ( arg0 ) ;
610
+ return addHeapObject ( ret ) ;
611
+ } ;
612
+
556
613
export function __wbindgen_jsval_loose_eq ( arg0 , arg1 ) {
557
614
const ret = getObject ( arg0 ) == getObject ( arg1 ) ;
558
615
return ret ;
@@ -931,7 +988,7 @@ export function __wbg_new_81740750da40724f(arg0, arg1) {
931
988
const a = state0 . a ;
932
989
state0 . a = 0 ;
933
990
try {
934
- return __wbg_adapter_176 ( a , state0 . b , arg0 , arg1 ) ;
991
+ return __wbg_adapter_180 ( a , state0 . b , arg0 , arg1 ) ;
935
992
} finally {
936
993
state0 . a = a ;
937
994
}
@@ -1042,8 +1099,8 @@ export function __wbindgen_memory() {
1042
1099
return addHeapObject ( ret ) ;
1043
1100
} ;
1044
1101
1045
- export function __wbindgen_closure_wrapper2261 ( arg0 , arg1 , arg2 ) {
1046
- const ret = makeMutClosure ( arg0 , arg1 , 486 , __wbg_adapter_48 ) ;
1102
+ export function __wbindgen_closure_wrapper2263 ( arg0 , arg1 , arg2 ) {
1103
+ const ret = makeMutClosure ( arg0 , arg1 , 493 , __wbg_adapter_48 ) ;
1047
1104
return addHeapObject ( ret ) ;
1048
1105
} ;
1049
1106
0 commit comments