@cartridge/controller-wasm 0.7.14-0df5a4c → 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.
@@ -5,6 +5,43 @@ export function __wbg_set_wasm(val) {
5
5
  wasm = val;
6
6
  }
7
7
 
8
+
9
+ let cachedUint8ArrayMemory0 = null;
10
+
11
+ function getUint8ArrayMemory0() {
12
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
13
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
14
+ }
15
+ return cachedUint8ArrayMemory0;
16
+ }
17
+
18
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
19
+
20
+ cachedTextDecoder.decode();
21
+
22
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
23
+ let numBytesDecoded = 0;
24
+ function decodeText(ptr, len) {
25
+ numBytesDecoded += len;
26
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
27
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
28
+ cachedTextDecoder.decode();
29
+ numBytesDecoded = len;
30
+ }
31
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
32
+ }
33
+
34
+ function getStringFromWasm0(ptr, len) {
35
+ ptr = ptr >>> 0;
36
+ return decodeText(ptr, len);
37
+ }
38
+
39
+ let heap = new Array(128).fill(undefined);
40
+
41
+ heap.push(undefined, null, true, false);
42
+
43
+ let heap_next = heap.length;
44
+
8
45
  function addHeapObject(obj) {
9
46
  if (heap_next === heap.length) heap.push(heap.length + 1);
10
47
  const idx = heap_next;
@@ -14,9 +51,74 @@ function addHeapObject(obj) {
14
51
  return idx;
15
52
  }
16
53
 
17
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
18
- ? { register: () => {}, unregister: () => {} }
19
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
54
+ function getObject(idx) { return heap[idx]; }
55
+
56
+ let WASM_VECTOR_LEN = 0;
57
+
58
+ const cachedTextEncoder = new TextEncoder();
59
+
60
+ if (!('encodeInto' in cachedTextEncoder)) {
61
+ cachedTextEncoder.encodeInto = function (arg, view) {
62
+ const buf = cachedTextEncoder.encode(arg);
63
+ view.set(buf);
64
+ return {
65
+ read: arg.length,
66
+ written: buf.length
67
+ };
68
+ }
69
+ }
70
+
71
+ function passStringToWasm0(arg, malloc, realloc) {
72
+
73
+ if (realloc === undefined) {
74
+ const buf = cachedTextEncoder.encode(arg);
75
+ const ptr = malloc(buf.length, 1) >>> 0;
76
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
77
+ WASM_VECTOR_LEN = buf.length;
78
+ return ptr;
79
+ }
80
+
81
+ let len = arg.length;
82
+ let ptr = malloc(len, 1) >>> 0;
83
+
84
+ const mem = getUint8ArrayMemory0();
85
+
86
+ let offset = 0;
87
+
88
+ for (; offset < len; offset++) {
89
+ const code = arg.charCodeAt(offset);
90
+ if (code > 0x7F) break;
91
+ mem[ptr + offset] = code;
92
+ }
93
+
94
+ if (offset !== len) {
95
+ if (offset !== 0) {
96
+ arg = arg.slice(offset);
97
+ }
98
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
99
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
100
+ const ret = cachedTextEncoder.encodeInto(arg, view);
101
+
102
+ offset += ret.written;
103
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
104
+ }
105
+
106
+ WASM_VECTOR_LEN = offset;
107
+ return ptr;
108
+ }
109
+
110
+ let cachedDataViewMemory0 = null;
111
+
112
+ function getDataViewMemory0() {
113
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
114
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
115
+ }
116
+ return cachedDataViewMemory0;
117
+ }
118
+
119
+ function isLikeNone(x) {
120
+ return x === undefined || x === null;
121
+ }
20
122
 
21
123
  function debugString(val) {
22
124
  // primitive types
@@ -83,40 +185,6 @@ function debugString(val) {
83
185
  return className;
84
186
  }
85
187
 
86
- function dropObject(idx) {
87
- if (idx < 132) return;
88
- heap[idx] = heap_next;
89
- heap_next = idx;
90
- }
91
-
92
- function getArrayU8FromWasm0(ptr, len) {
93
- ptr = ptr >>> 0;
94
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
95
- }
96
-
97
- let cachedDataViewMemory0 = null;
98
- function getDataViewMemory0() {
99
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
100
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
101
- }
102
- return cachedDataViewMemory0;
103
- }
104
-
105
- function getStringFromWasm0(ptr, len) {
106
- ptr = ptr >>> 0;
107
- return decodeText(ptr, len);
108
- }
109
-
110
- let cachedUint8ArrayMemory0 = null;
111
- function getUint8ArrayMemory0() {
112
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
113
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
114
- }
115
- return cachedUint8ArrayMemory0;
116
- }
117
-
118
- function getObject(idx) { return heap[idx]; }
119
-
120
188
  function handleError(f, args) {
121
189
  try {
122
190
  return f.apply(this, args);
@@ -125,15 +193,27 @@ function handleError(f, args) {
125
193
  }
126
194
  }
127
195
 
128
- let heap = new Array(128).fill(undefined);
129
- heap.push(undefined, null, true, false);
196
+ function dropObject(idx) {
197
+ if (idx < 132) return;
198
+ heap[idx] = heap_next;
199
+ heap_next = idx;
200
+ }
130
201
 
131
- let heap_next = heap.length;
202
+ function takeObject(idx) {
203
+ const ret = getObject(idx);
204
+ dropObject(idx);
205
+ return ret;
206
+ }
132
207
 
133
- function isLikeNone(x) {
134
- return x === undefined || x === null;
208
+ function getArrayU8FromWasm0(ptr, len) {
209
+ ptr = ptr >>> 0;
210
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
135
211
  }
136
212
 
213
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
214
+ ? { register: () => {}, unregister: () => {} }
215
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
216
+
137
217
  function makeMutClosure(arg0, arg1, dtor, f) {
138
218
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
139
219
  const real = (...args) => {
@@ -171,90 +251,131 @@ function passArrayJsValueToWasm0(array, malloc) {
171
251
  WASM_VECTOR_LEN = array.length;
172
252
  return ptr;
173
253
  }
174
-
175
- function passStringToWasm0(arg, malloc, realloc) {
176
- if (realloc === undefined) {
177
- const buf = cachedTextEncoder.encode(arg);
178
- const ptr = malloc(buf.length, 1) >>> 0;
179
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
180
- WASM_VECTOR_LEN = buf.length;
181
- return ptr;
182
- }
183
-
184
- let len = arg.length;
185
- let ptr = malloc(len, 1) >>> 0;
186
-
187
- const mem = getUint8ArrayMemory0();
188
-
189
- let offset = 0;
190
-
191
- for (; offset < len; offset++) {
192
- const code = arg.charCodeAt(offset);
193
- if (code > 0x7F) break;
194
- mem[ptr + offset] = code;
195
- }
196
- if (offset !== len) {
197
- if (offset !== 0) {
198
- arg = arg.slice(offset);
199
- }
200
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
201
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
202
- const ret = cachedTextEncoder.encodeInto(arg, view);
203
-
204
- offset += ret.written;
205
- ptr = realloc(ptr, len, offset, 1) >>> 0;
206
- }
207
-
208
- WASM_VECTOR_LEN = offset;
209
- return ptr;
210
- }
211
-
212
- function takeObject(idx) {
213
- const ret = getObject(idx);
214
- dropObject(idx);
215
- return ret;
254
+ /**
255
+ * Subscribes to the creation of a session for a given controller, session_key_guid and cartridge api url.
256
+ * The goal of this function is to know from any place when the register session flow has been completed, and to
257
+ * get the authorization.
258
+ * @param {JsFelt} session_key_guid
259
+ * @param {string} cartridge_api_url
260
+ * @returns {Promise<JsSubscribeSessionResult>}
261
+ */
262
+ export function subscribeCreateSession(session_key_guid, cartridge_api_url) {
263
+ const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
264
+ const len0 = WASM_VECTOR_LEN;
265
+ const ret = wasm.subscribeCreateSession(addHeapObject(session_key_guid), ptr0, len0);
266
+ return takeObject(ret);
216
267
  }
217
268
 
218
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
219
- cachedTextDecoder.decode();
220
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
221
- let numBytesDecoded = 0;
222
- function decodeText(ptr, len) {
223
- numBytesDecoded += len;
224
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
225
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
226
- cachedTextDecoder.decode();
227
- numBytesDecoded = len;
269
+ /**
270
+ * @param {Signer} signer
271
+ * @returns {JsFelt}
272
+ */
273
+ export function signerToGuid(signer) {
274
+ try {
275
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
276
+ wasm.signerToGuid(retptr, addHeapObject(signer));
277
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
278
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
279
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
280
+ if (r2) {
281
+ throw takeObject(r1);
282
+ }
283
+ return takeObject(r0);
284
+ } finally {
285
+ wasm.__wbindgen_add_to_stack_pointer(16);
228
286
  }
229
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
230
287
  }
231
288
 
232
- const cachedTextEncoder = new TextEncoder();
233
-
234
- if (!('encodeInto' in cachedTextEncoder)) {
235
- cachedTextEncoder.encodeInto = function (arg, view) {
236
- const buf = cachedTextEncoder.encode(arg);
237
- view.set(buf);
238
- return {
239
- read: arg.length,
240
- written: buf.length
241
- };
242
- }
289
+ function __wasm_bindgen_func_elem_4060(arg0, arg1, arg2) {
290
+ wasm.__wasm_bindgen_func_elem_4060(arg0, arg1, addHeapObject(arg2));
243
291
  }
244
292
 
245
- let WASM_VECTOR_LEN = 0;
246
-
247
- function __wasm_bindgen_func_elem_3935(arg0, arg1) {
248
- wasm.__wasm_bindgen_func_elem_3935(arg0, arg1);
293
+ function __wasm_bindgen_func_elem_3921(arg0, arg1) {
294
+ wasm.__wasm_bindgen_func_elem_3921(arg0, arg1);
249
295
  }
250
296
 
251
- function __wasm_bindgen_func_elem_4078(arg0, arg1, arg2) {
252
- wasm.__wasm_bindgen_func_elem_4078(arg0, arg1, addHeapObject(arg2));
297
+ function __wasm_bindgen_func_elem_5872(arg0, arg1, arg2, arg3) {
298
+ wasm.__wasm_bindgen_func_elem_5872(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
253
299
  }
254
300
 
255
- function __wasm_bindgen_func_elem_5869(arg0, arg1, arg2, arg3) {
256
- wasm.__wasm_bindgen_func_elem_5869(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
257
- }
301
+ /**
302
+ * @enum {1 | 20 | 24 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 40 | 41 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 10 | 64 | 65 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146}
303
+ */
304
+ export const ErrorCode = Object.freeze({
305
+ StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
306
+ StarknetContractNotFound: 20, "20": "StarknetContractNotFound",
307
+ StarknetBlockNotFound: 24, "24": "StarknetBlockNotFound",
308
+ StarknetInvalidTransactionIndex: 27, "27": "StarknetInvalidTransactionIndex",
309
+ StarknetClassHashNotFound: 28, "28": "StarknetClassHashNotFound",
310
+ StarknetTransactionHashNotFound: 29, "29": "StarknetTransactionHashNotFound",
311
+ StarknetPageSizeTooBig: 31, "31": "StarknetPageSizeTooBig",
312
+ StarknetNoBlocks: 32, "32": "StarknetNoBlocks",
313
+ StarknetInvalidContinuationToken: 33, "33": "StarknetInvalidContinuationToken",
314
+ StarknetTooManyKeysInFilter: 34, "34": "StarknetTooManyKeysInFilter",
315
+ StarknetContractError: 40, "40": "StarknetContractError",
316
+ StarknetTransactionExecutionError: 41, "41": "StarknetTransactionExecutionError",
317
+ StarknetClassAlreadyDeclared: 51, "51": "StarknetClassAlreadyDeclared",
318
+ StarknetInvalidTransactionNonce: 52, "52": "StarknetInvalidTransactionNonce",
319
+ StarknetInsufficientMaxFee: 53, "53": "StarknetInsufficientMaxFee",
320
+ StarknetInsufficientAccountBalance: 54, "54": "StarknetInsufficientAccountBalance",
321
+ StarknetValidationFailure: 55, "55": "StarknetValidationFailure",
322
+ StarknetCompilationFailed: 56, "56": "StarknetCompilationFailed",
323
+ StarknetContractClassSizeIsTooLarge: 57, "57": "StarknetContractClassSizeIsTooLarge",
324
+ StarknetNonAccount: 58, "58": "StarknetNonAccount",
325
+ StarknetDuplicateTx: 59, "59": "StarknetDuplicateTx",
326
+ StarknetCompiledClassHashMismatch: 60, "60": "StarknetCompiledClassHashMismatch",
327
+ StarknetUnsupportedTxVersion: 61, "61": "StarknetUnsupportedTxVersion",
328
+ StarknetUnsupportedContractClassVersion: 62, "62": "StarknetUnsupportedContractClassVersion",
329
+ StarknetUnexpectedError: 63, "63": "StarknetUnexpectedError",
330
+ StarknetNoTraceAvailable: 10, "10": "StarknetNoTraceAvailable",
331
+ StarknetReplacementTransactionUnderpriced: 64, "64": "StarknetReplacementTransactionUnderpriced",
332
+ StarknetFeeBelowMinimum: 65, "65": "StarknetFeeBelowMinimum",
333
+ SignError: 101, "101": "SignError",
334
+ StorageError: 102, "102": "StorageError",
335
+ AccountFactoryError: 103, "103": "AccountFactoryError",
336
+ PaymasterExecutionTimeNotReached: 104, "104": "PaymasterExecutionTimeNotReached",
337
+ PaymasterExecutionTimePassed: 105, "105": "PaymasterExecutionTimePassed",
338
+ PaymasterInvalidCaller: 106, "106": "PaymasterInvalidCaller",
339
+ PaymasterRateLimitExceeded: 107, "107": "PaymasterRateLimitExceeded",
340
+ PaymasterNotSupported: 108, "108": "PaymasterNotSupported",
341
+ PaymasterHttp: 109, "109": "PaymasterHttp",
342
+ PaymasterExcecution: 110, "110": "PaymasterExcecution",
343
+ PaymasterSerialization: 111, "111": "PaymasterSerialization",
344
+ CartridgeControllerNotDeployed: 112, "112": "CartridgeControllerNotDeployed",
345
+ InsufficientBalance: 113, "113": "InsufficientBalance",
346
+ OriginError: 114, "114": "OriginError",
347
+ EncodingError: 115, "115": "EncodingError",
348
+ SerdeWasmBindgenError: 116, "116": "SerdeWasmBindgenError",
349
+ CairoSerdeError: 117, "117": "CairoSerdeError",
350
+ CairoShortStringToFeltError: 118, "118": "CairoShortStringToFeltError",
351
+ DeviceCreateCredential: 119, "119": "DeviceCreateCredential",
352
+ DeviceGetAssertion: 120, "120": "DeviceGetAssertion",
353
+ DeviceBadAssertion: 121, "121": "DeviceBadAssertion",
354
+ DeviceChannel: 122, "122": "DeviceChannel",
355
+ DeviceOrigin: 123, "123": "DeviceOrigin",
356
+ AccountSigning: 124, "124": "AccountSigning",
357
+ AccountProvider: 125, "125": "AccountProvider",
358
+ AccountClassHashCalculation: 126, "126": "AccountClassHashCalculation",
359
+ AccountFeeOutOfRange: 128, "128": "AccountFeeOutOfRange",
360
+ ProviderRateLimited: 129, "129": "ProviderRateLimited",
361
+ ProviderArrayLengthMismatch: 130, "130": "ProviderArrayLengthMismatch",
362
+ ProviderOther: 131, "131": "ProviderOther",
363
+ SessionAlreadyRegistered: 132, "132": "SessionAlreadyRegistered",
364
+ UrlParseError: 133, "133": "UrlParseError",
365
+ Base64DecodeError: 134, "134": "Base64DecodeError",
366
+ CoseError: 135, "135": "CoseError",
367
+ PolicyChainIdMismatch: 136, "136": "PolicyChainIdMismatch",
368
+ InvalidOwner: 137, "137": "InvalidOwner",
369
+ GasPriceTooHigh: 138, "138": "GasPriceTooHigh",
370
+ TransactionTimeout: 139, "139": "TransactionTimeout",
371
+ ConversionError: 140, "140": "ConversionError",
372
+ InvalidChainId: 141, "141": "InvalidChainId",
373
+ SessionRefreshRequired: 142, "142": "SessionRefreshRequired",
374
+ ManualExecutionRequired: 143, "143": "ManualExecutionRequired",
375
+ ForbiddenEntrypoint: 144, "144": "ForbiddenEntrypoint",
376
+ GasAmountTooHigh: 145, "145": "GasAmountTooHigh",
377
+ ApproveExecutionRequired: 146, "146": "ApproveExecutionRequired",
378
+ });
258
379
 
259
380
  const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
260
381
 
@@ -266,11 +387,8 @@ const CartridgeSessionAccountFinalization = (typeof FinalizationRegistry === 'un
266
387
  ? { register: () => {}, unregister: () => {} }
267
388
  : new FinalizationRegistry(ptr => wasm.__wbg_cartridgesessionaccount_free(ptr >>> 0, 1));
268
389
 
269
- const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
270
- ? { register: () => {}, unregister: () => {} }
271
- : new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
272
-
273
390
  export class CartridgeSessionAccount {
391
+
274
392
  static __wrap(ptr) {
275
393
  ptr = ptr >>> 0;
276
394
  const obj = Object.create(CartridgeSessionAccount.prototype);
@@ -278,12 +396,14 @@ export class CartridgeSessionAccount {
278
396
  CartridgeSessionAccountFinalization.register(obj, obj.__wbg_ptr, obj);
279
397
  return obj;
280
398
  }
399
+
281
400
  __destroy_into_raw() {
282
401
  const ptr = this.__wbg_ptr;
283
402
  this.__wbg_ptr = 0;
284
403
  CartridgeSessionAccountFinalization.unregister(this);
285
404
  return ptr;
286
405
  }
406
+
287
407
  free() {
288
408
  const ptr = this.__destroy_into_raw();
289
409
  wasm.__wbg_cartridgesessionaccount_free(ptr, 0);
@@ -376,86 +496,12 @@ export class CartridgeSessionAccount {
376
496
  }
377
497
  if (Symbol.dispose) CartridgeSessionAccount.prototype[Symbol.dispose] = CartridgeSessionAccount.prototype.free;
378
498
 
379
- /**
380
- * @enum {1 | 20 | 24 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 40 | 41 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 10 | 64 | 65 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146}
381
- */
382
- export const ErrorCode = Object.freeze({
383
- StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
384
- StarknetContractNotFound: 20, "20": "StarknetContractNotFound",
385
- StarknetBlockNotFound: 24, "24": "StarknetBlockNotFound",
386
- StarknetInvalidTransactionIndex: 27, "27": "StarknetInvalidTransactionIndex",
387
- StarknetClassHashNotFound: 28, "28": "StarknetClassHashNotFound",
388
- StarknetTransactionHashNotFound: 29, "29": "StarknetTransactionHashNotFound",
389
- StarknetPageSizeTooBig: 31, "31": "StarknetPageSizeTooBig",
390
- StarknetNoBlocks: 32, "32": "StarknetNoBlocks",
391
- StarknetInvalidContinuationToken: 33, "33": "StarknetInvalidContinuationToken",
392
- StarknetTooManyKeysInFilter: 34, "34": "StarknetTooManyKeysInFilter",
393
- StarknetContractError: 40, "40": "StarknetContractError",
394
- StarknetTransactionExecutionError: 41, "41": "StarknetTransactionExecutionError",
395
- StarknetClassAlreadyDeclared: 51, "51": "StarknetClassAlreadyDeclared",
396
- StarknetInvalidTransactionNonce: 52, "52": "StarknetInvalidTransactionNonce",
397
- StarknetInsufficientMaxFee: 53, "53": "StarknetInsufficientMaxFee",
398
- StarknetInsufficientAccountBalance: 54, "54": "StarknetInsufficientAccountBalance",
399
- StarknetValidationFailure: 55, "55": "StarknetValidationFailure",
400
- StarknetCompilationFailed: 56, "56": "StarknetCompilationFailed",
401
- StarknetContractClassSizeIsTooLarge: 57, "57": "StarknetContractClassSizeIsTooLarge",
402
- StarknetNonAccount: 58, "58": "StarknetNonAccount",
403
- StarknetDuplicateTx: 59, "59": "StarknetDuplicateTx",
404
- StarknetCompiledClassHashMismatch: 60, "60": "StarknetCompiledClassHashMismatch",
405
- StarknetUnsupportedTxVersion: 61, "61": "StarknetUnsupportedTxVersion",
406
- StarknetUnsupportedContractClassVersion: 62, "62": "StarknetUnsupportedContractClassVersion",
407
- StarknetUnexpectedError: 63, "63": "StarknetUnexpectedError",
408
- StarknetNoTraceAvailable: 10, "10": "StarknetNoTraceAvailable",
409
- StarknetReplacementTransactionUnderpriced: 64, "64": "StarknetReplacementTransactionUnderpriced",
410
- StarknetFeeBelowMinimum: 65, "65": "StarknetFeeBelowMinimum",
411
- SignError: 101, "101": "SignError",
412
- StorageError: 102, "102": "StorageError",
413
- AccountFactoryError: 103, "103": "AccountFactoryError",
414
- PaymasterExecutionTimeNotReached: 104, "104": "PaymasterExecutionTimeNotReached",
415
- PaymasterExecutionTimePassed: 105, "105": "PaymasterExecutionTimePassed",
416
- PaymasterInvalidCaller: 106, "106": "PaymasterInvalidCaller",
417
- PaymasterRateLimitExceeded: 107, "107": "PaymasterRateLimitExceeded",
418
- PaymasterNotSupported: 108, "108": "PaymasterNotSupported",
419
- PaymasterHttp: 109, "109": "PaymasterHttp",
420
- PaymasterExcecution: 110, "110": "PaymasterExcecution",
421
- PaymasterSerialization: 111, "111": "PaymasterSerialization",
422
- CartridgeControllerNotDeployed: 112, "112": "CartridgeControllerNotDeployed",
423
- InsufficientBalance: 113, "113": "InsufficientBalance",
424
- OriginError: 114, "114": "OriginError",
425
- EncodingError: 115, "115": "EncodingError",
426
- SerdeWasmBindgenError: 116, "116": "SerdeWasmBindgenError",
427
- CairoSerdeError: 117, "117": "CairoSerdeError",
428
- CairoShortStringToFeltError: 118, "118": "CairoShortStringToFeltError",
429
- DeviceCreateCredential: 119, "119": "DeviceCreateCredential",
430
- DeviceGetAssertion: 120, "120": "DeviceGetAssertion",
431
- DeviceBadAssertion: 121, "121": "DeviceBadAssertion",
432
- DeviceChannel: 122, "122": "DeviceChannel",
433
- DeviceOrigin: 123, "123": "DeviceOrigin",
434
- AccountSigning: 124, "124": "AccountSigning",
435
- AccountProvider: 125, "125": "AccountProvider",
436
- AccountClassHashCalculation: 126, "126": "AccountClassHashCalculation",
437
- AccountFeeOutOfRange: 128, "128": "AccountFeeOutOfRange",
438
- ProviderRateLimited: 129, "129": "ProviderRateLimited",
439
- ProviderArrayLengthMismatch: 130, "130": "ProviderArrayLengthMismatch",
440
- ProviderOther: 131, "131": "ProviderOther",
441
- SessionAlreadyRegistered: 132, "132": "SessionAlreadyRegistered",
442
- UrlParseError: 133, "133": "UrlParseError",
443
- Base64DecodeError: 134, "134": "Base64DecodeError",
444
- CoseError: 135, "135": "CoseError",
445
- PolicyChainIdMismatch: 136, "136": "PolicyChainIdMismatch",
446
- InvalidOwner: 137, "137": "InvalidOwner",
447
- GasPriceTooHigh: 138, "138": "GasPriceTooHigh",
448
- TransactionTimeout: 139, "139": "TransactionTimeout",
449
- ConversionError: 140, "140": "ConversionError",
450
- InvalidChainId: 141, "141": "InvalidChainId",
451
- SessionRefreshRequired: 142, "142": "SessionRefreshRequired",
452
- ManualExecutionRequired: 143, "143": "ManualExecutionRequired",
453
- ForbiddenEntrypoint: 144, "144": "ForbiddenEntrypoint",
454
- GasAmountTooHigh: 145, "145": "GasAmountTooHigh",
455
- ApproveExecutionRequired: 146, "146": "ApproveExecutionRequired",
456
- });
499
+ const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
500
+ ? { register: () => {}, unregister: () => {} }
501
+ : new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
457
502
 
458
503
  export class JsControllerError {
504
+
459
505
  static __wrap(ptr) {
460
506
  ptr = ptr >>> 0;
461
507
  const obj = Object.create(JsControllerError.prototype);
@@ -463,12 +509,14 @@ export class JsControllerError {
463
509
  JsControllerErrorFinalization.register(obj, obj.__wbg_ptr, obj);
464
510
  return obj;
465
511
  }
512
+
466
513
  __destroy_into_raw() {
467
514
  const ptr = this.__wbg_ptr;
468
515
  this.__wbg_ptr = 0;
469
516
  JsControllerErrorFinalization.unregister(this);
470
517
  return ptr;
471
518
  }
519
+
472
520
  free() {
473
521
  const ptr = this.__destroy_into_raw();
474
522
  wasm.__wbg_jscontrollererror_free(ptr, 0);
@@ -543,42 +591,7 @@ export class JsControllerError {
543
591
  }
544
592
  if (Symbol.dispose) JsControllerError.prototype[Symbol.dispose] = JsControllerError.prototype.free;
545
593
 
546
- /**
547
- * @param {Signer} signer
548
- * @returns {JsFelt}
549
- */
550
- export function signerToGuid(signer) {
551
- try {
552
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
553
- wasm.signerToGuid(retptr, addHeapObject(signer));
554
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
555
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
556
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
557
- if (r2) {
558
- throw takeObject(r1);
559
- }
560
- return takeObject(r0);
561
- } finally {
562
- wasm.__wbindgen_add_to_stack_pointer(16);
563
- }
564
- }
565
-
566
- /**
567
- * Subscribes to the creation of a session for a given controller, session_key_guid and cartridge api url.
568
- * The goal of this function is to know from any place when the register session flow has been completed, and to
569
- * get the authorization.
570
- * @param {JsFelt} session_key_guid
571
- * @param {string} cartridge_api_url
572
- * @returns {Promise<JsSubscribeSessionResult>}
573
- */
574
- export function subscribeCreateSession(session_key_guid, cartridge_api_url) {
575
- const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
576
- const len0 = WASM_VECTOR_LEN;
577
- const ret = wasm.subscribeCreateSession(addHeapObject(session_key_guid), ptr0, len0);
578
- return takeObject(ret);
579
- }
580
-
581
- export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
594
+ export function __wbg_Error_e83987f665cf5504(arg0, arg1) {
582
595
  const ret = Error(getStringFromWasm0(arg0, arg1));
583
596
  return addHeapObject(ret);
584
597
  };
@@ -591,13 +604,13 @@ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
591
604
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
592
605
  };
593
606
 
594
- export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0) {
607
+ export function __wbg___wbindgen_boolean_get_6d5a1ee65bab5f68(arg0) {
595
608
  const v = getObject(arg0);
596
609
  const ret = typeof(v) === 'boolean' ? v : undefined;
597
610
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
598
611
  };
599
612
 
600
- export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
613
+ export function __wbg___wbindgen_debug_string_df47ffb5e35e6763(arg0, arg1) {
601
614
  const ret = debugString(getObject(arg1));
602
615
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
603
616
  const len1 = WASM_VECTOR_LEN;
@@ -605,45 +618,45 @@ export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
605
618
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
606
619
  };
607
620
 
608
- export function __wbg___wbindgen_in_0d3e1e8f0c669317(arg0, arg1) {
621
+ export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
609
622
  const ret = getObject(arg0) in getObject(arg1);
610
623
  return ret;
611
624
  };
612
625
 
613
- export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
626
+ export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
614
627
  const ret = typeof(getObject(arg0)) === 'function';
615
628
  return ret;
616
629
  };
617
630
 
618
- export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
631
+ export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
619
632
  const val = getObject(arg0);
620
633
  const ret = typeof(val) === 'object' && val !== null;
621
634
  return ret;
622
635
  };
623
636
 
624
- export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) {
637
+ export function __wbg___wbindgen_is_string_fbb76cb2940daafd(arg0) {
625
638
  const ret = typeof(getObject(arg0)) === 'string';
626
639
  return ret;
627
640
  };
628
641
 
629
- export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
642
+ export function __wbg___wbindgen_is_undefined_2d472862bd29a478(arg0) {
630
643
  const ret = getObject(arg0) === undefined;
631
644
  return ret;
632
645
  };
633
646
 
634
- export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0, arg1) {
647
+ export function __wbg___wbindgen_jsval_loose_eq_b664b38a2f582147(arg0, arg1) {
635
648
  const ret = getObject(arg0) == getObject(arg1);
636
649
  return ret;
637
650
  };
638
651
 
639
- export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
652
+ export function __wbg___wbindgen_number_get_a20bf9b85341449d(arg0, arg1) {
640
653
  const obj = getObject(arg1);
641
654
  const ret = typeof(obj) === 'number' ? obj : undefined;
642
655
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
643
656
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
644
657
  };
645
658
 
646
- export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
659
+ export function __wbg___wbindgen_string_get_e4f06c90489ad01b(arg0, arg1) {
647
660
  const obj = getObject(arg1);
648
661
  const ret = typeof(obj) === 'string' ? obj : undefined;
649
662
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -652,47 +665,47 @@ export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
652
665
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
653
666
  };
654
667
 
655
- export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
668
+ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
656
669
  throw new Error(getStringFromWasm0(arg0, arg1));
657
670
  };
658
671
 
659
- export function __wbg__wbg_cb_unref_87dfb5aaa0cbcea7(arg0) {
672
+ export function __wbg__wbg_cb_unref_2454a539ea5790d9(arg0) {
660
673
  getObject(arg0)._wbg_cb_unref();
661
674
  };
662
675
 
663
- export function __wbg_abort_07646c894ebbf2bd(arg0) {
664
- getObject(arg0).abort();
676
+ export function __wbg_abort_28ad55c5825b004d(arg0, arg1) {
677
+ getObject(arg0).abort(getObject(arg1));
665
678
  };
666
679
 
667
- export function __wbg_abort_399ecbcfd6ef3c8e(arg0, arg1) {
668
- getObject(arg0).abort(getObject(arg1));
680
+ export function __wbg_abort_e7eb059f72f9ed0c(arg0) {
681
+ getObject(arg0).abort();
669
682
  };
670
683
 
671
- export function __wbg_append_c5cbdf46455cc776() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
684
+ export function __wbg_append_b577eb3a177bc0fa() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
672
685
  getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
673
686
  }, arguments) };
674
687
 
675
- export function __wbg_arrayBuffer_c04af4fce566092d() { return handleError(function (arg0) {
688
+ export function __wbg_arrayBuffer_b375eccb84b4ddf3() { return handleError(function (arg0) {
676
689
  const ret = getObject(arg0).arrayBuffer();
677
690
  return addHeapObject(ret);
678
691
  }, arguments) };
679
692
 
680
- export function __wbg_call_3020136f7a2d6e44() { return handleError(function (arg0, arg1, arg2) {
693
+ export function __wbg_call_525440f72fbfc0ea() { return handleError(function (arg0, arg1, arg2) {
681
694
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
682
695
  return addHeapObject(ret);
683
696
  }, arguments) };
684
697
 
685
- export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
698
+ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
686
699
  const ret = getObject(arg0).call(getObject(arg1));
687
700
  return addHeapObject(ret);
688
701
  }, arguments) };
689
702
 
690
- export function __wbg_clearTimeout_b716ecb44bea14ed(arg0) {
703
+ export function __wbg_clearTimeout_7a42b49784aea641(arg0) {
691
704
  const ret = clearTimeout(takeObject(arg0));
692
705
  return addHeapObject(ret);
693
706
  };
694
707
 
695
- export function __wbg_credentials_36e0572b476d4883(arg0) {
708
+ export function __wbg_credentials_8cadf6cea6a4f922(arg0) {
696
709
  const ret = getObject(arg0).credentials;
697
710
  return addHeapObject(ret);
698
711
  };
@@ -702,27 +715,27 @@ export function __wbg_crypto_574e78ad8b13b65f(arg0) {
702
715
  return addHeapObject(ret);
703
716
  };
704
717
 
705
- export function __wbg_done_62ea16af4ce34b24(arg0) {
718
+ export function __wbg_done_2042aa2670fb1db1(arg0) {
706
719
  const ret = getObject(arg0).done;
707
720
  return ret;
708
721
  };
709
722
 
710
- export function __wbg_fetch_7fb7602a1bf647ec(arg0) {
723
+ export function __wbg_fetch_74a3e84ebd2c9a0e(arg0) {
711
724
  const ret = fetch(getObject(arg0));
712
725
  return addHeapObject(ret);
713
726
  };
714
727
 
715
- export function __wbg_fetch_90447c28cc0b095e(arg0, arg1) {
716
- const ret = getObject(arg0).fetch(getObject(arg1));
728
+ export function __wbg_fetch_f1856afdb49415d1(arg0) {
729
+ const ret = fetch(getObject(arg0));
717
730
  return addHeapObject(ret);
718
731
  };
719
732
 
720
- export function __wbg_fetch_f1856afdb49415d1(arg0) {
721
- const ret = fetch(getObject(arg0));
733
+ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
734
+ const ret = getObject(arg0).fetch(getObject(arg1));
722
735
  return addHeapObject(ret);
723
736
  };
724
737
 
725
- export function __wbg_getClientExtensionResults_8668622b21a5eef7(arg0) {
738
+ export function __wbg_getClientExtensionResults_3fbb568c5f7347cf(arg0) {
726
739
  const ret = getObject(arg0).getClientExtensionResults();
727
740
  return addHeapObject(ret);
728
741
  };
@@ -731,17 +744,17 @@ export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(fu
731
744
  getObject(arg0).getRandomValues(getObject(arg1));
732
745
  }, arguments) };
733
746
 
734
- export function __wbg_getTime_ad1e9878a735af08(arg0) {
747
+ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
735
748
  const ret = getObject(arg0).getTime();
736
749
  return ret;
737
750
  };
738
751
 
739
- export function __wbg_get_29726a9b608aea28() { return handleError(function (arg0, arg1) {
752
+ export function __wbg_get_de97927282f5fc02() { return handleError(function (arg0, arg1) {
740
753
  const ret = getObject(arg0).get(getObject(arg1));
741
754
  return addHeapObject(ret);
742
755
  }, arguments) };
743
756
 
744
- export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
757
+ export function __wbg_get_efcb449f58ec27c2() { return handleError(function (arg0, arg1) {
745
758
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
746
759
  return addHeapObject(ret);
747
760
  }, arguments) };
@@ -751,17 +764,17 @@ export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
751
764
  return addHeapObject(ret);
752
765
  };
753
766
 
754
- export function __wbg_has_0e670569d65d3a45() { return handleError(function (arg0, arg1) {
767
+ export function __wbg_has_787fafc980c3ccdb() { return handleError(function (arg0, arg1) {
755
768
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
756
769
  return ret;
757
770
  }, arguments) };
758
771
 
759
- export function __wbg_headers_654c30e1bcccc552(arg0) {
772
+ export function __wbg_headers_b87d7eaba61c3278(arg0) {
760
773
  const ret = getObject(arg0).headers;
761
774
  return addHeapObject(ret);
762
775
  };
763
776
 
764
- export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
777
+ export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
765
778
  let result;
766
779
  try {
767
780
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -772,7 +785,7 @@ export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
772
785
  return ret;
773
786
  };
774
787
 
775
- export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
788
+ export function __wbg_instanceof_Object_10bb762262230c68(arg0) {
776
789
  let result;
777
790
  try {
778
791
  result = getObject(arg0) instanceof Object;
@@ -783,7 +796,7 @@ export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
783
796
  return ret;
784
797
  };
785
798
 
786
- export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
799
+ export function __wbg_instanceof_Response_f4f3e87e07f3135c(arg0) {
787
800
  let result;
788
801
  try {
789
802
  result = getObject(arg0) instanceof Response;
@@ -794,7 +807,7 @@ export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
794
807
  return ret;
795
808
  };
796
809
 
797
- export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
810
+ export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
798
811
  let result;
799
812
  try {
800
813
  result = getObject(arg0) instanceof Uint8Array;
@@ -805,7 +818,7 @@ export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
805
818
  return ret;
806
819
  };
807
820
 
808
- export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
821
+ export function __wbg_instanceof_Window_4846dbb3de56c84c(arg0) {
809
822
  let result;
810
823
  try {
811
824
  result = getObject(arg0) instanceof Window;
@@ -816,7 +829,7 @@ export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
816
829
  return ret;
817
830
  };
818
831
 
819
- export function __wbg_iterator_27b7c8b35ab3e86b() {
832
+ export function __wbg_iterator_e5822695327a3c39() {
820
833
  const ret = Symbol.iterator;
821
834
  return addHeapObject(ret);
822
835
  };
@@ -826,17 +839,17 @@ export function __wbg_jscontrollererror_new(arg0) {
826
839
  return addHeapObject(ret);
827
840
  };
828
841
 
829
- export function __wbg_length_22ac23eaec9d8053(arg0) {
842
+ export function __wbg_length_69bca3cb64fc8748(arg0) {
830
843
  const ret = getObject(arg0).length;
831
844
  return ret;
832
845
  };
833
846
 
834
- export function __wbg_location_962e75c1c1b3ebed(arg0) {
847
+ export function __wbg_location_ef1665506d996dd9(arg0) {
835
848
  const ret = getObject(arg0).location;
836
849
  return addHeapObject(ret);
837
850
  };
838
851
 
839
- export function __wbg_log_1d990106d99dacb7(arg0) {
852
+ export function __wbg_log_8cec76766b8c0e33(arg0) {
840
853
  console.log(getObject(arg0));
841
854
  };
842
855
 
@@ -845,54 +858,39 @@ export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
845
858
  return addHeapObject(ret);
846
859
  };
847
860
 
848
- export function __wbg_navigator_b49edef831236138(arg0) {
861
+ export function __wbg_navigator_971384882e8ea23a(arg0) {
849
862
  const ret = getObject(arg0).navigator;
850
863
  return addHeapObject(ret);
851
864
  };
852
865
 
853
- export function __wbg_new_0_23cedd11d9b40c9d() {
866
+ export function __wbg_new_0_f9740686d739025c() {
854
867
  const ret = new Date();
855
868
  return addHeapObject(ret);
856
869
  };
857
870
 
858
- export function __wbg_new_1ba21ce319a06297() {
871
+ export function __wbg_new_1acc0b6eea89d040() {
859
872
  const ret = new Object();
860
873
  return addHeapObject(ret);
861
874
  };
862
875
 
863
- export function __wbg_new_25f239778d6112b9() {
864
- const ret = new Array();
876
+ export function __wbg_new_2531773dac38ebb3() { return handleError(function () {
877
+ const ret = new AbortController();
865
878
  return addHeapObject(ret);
866
- };
879
+ }, arguments) };
867
880
 
868
881
  export function __wbg_new_2658d63118834d8e() {
869
882
  const ret = new Mutex();
870
883
  return addHeapObject(ret);
871
884
  };
872
885
 
873
- export function __wbg_new_3c79b3bb1b32b7d3() { return handleError(function () {
874
- const ret = new Headers();
875
- return addHeapObject(ret);
876
- }, arguments) };
877
-
878
- export function __wbg_new_6421f6084cc5bc5a(arg0) {
879
- const ret = new Uint8Array(getObject(arg0));
880
- return addHeapObject(ret);
881
- };
882
-
883
- export function __wbg_new_881a222c65f168fc() { return handleError(function () {
884
- const ret = new AbortController();
885
- return addHeapObject(ret);
886
- }, arguments) };
887
-
888
- export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
886
+ export function __wbg_new_3c3d849046688a66(arg0, arg1) {
889
887
  try {
890
888
  var state0 = {a: arg0, b: arg1};
891
889
  var cb0 = (arg0, arg1) => {
892
890
  const a = state0.a;
893
891
  state0.a = 0;
894
892
  try {
895
- return __wasm_bindgen_func_elem_5869(a, state0.b, arg0, arg1);
893
+ return __wasm_bindgen_func_elem_5872(a, state0.b, arg0, arg1);
896
894
  } finally {
897
895
  state0.a = a;
898
896
  }
@@ -904,36 +902,51 @@ export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
904
902
  }
905
903
  };
906
904
 
907
- export function __wbg_new_from_slice_f9c22b9153b26992(arg0, arg1) {
905
+ export function __wbg_new_5a79be3ab53b8aa5(arg0) {
906
+ const ret = new Uint8Array(getObject(arg0));
907
+ return addHeapObject(ret);
908
+ };
909
+
910
+ export function __wbg_new_9edf9838a2def39c() { return handleError(function () {
911
+ const ret = new Headers();
912
+ return addHeapObject(ret);
913
+ }, arguments) };
914
+
915
+ export function __wbg_new_e17d9f43105b08be() {
916
+ const ret = new Array();
917
+ return addHeapObject(ret);
918
+ };
919
+
920
+ export function __wbg_new_from_slice_92f4d78ca282a2d2(arg0, arg1) {
908
921
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
909
922
  return addHeapObject(ret);
910
923
  };
911
924
 
912
- export function __wbg_new_no_args_cb138f77cf6151ee(arg0, arg1) {
925
+ export function __wbg_new_no_args_ee98eee5275000a4(arg0, arg1) {
913
926
  const ret = new Function(getStringFromWasm0(arg0, arg1));
914
927
  return addHeapObject(ret);
915
928
  };
916
929
 
917
- export function __wbg_new_with_length_aa5eaf41d35235e5(arg0) {
930
+ export function __wbg_new_with_length_01aa0dc35aa13543(arg0) {
918
931
  const ret = new Uint8Array(arg0 >>> 0);
919
932
  return addHeapObject(ret);
920
933
  };
921
934
 
922
- export function __wbg_new_with_str_and_init_c5748f76f5108934() { return handleError(function (arg0, arg1, arg2) {
935
+ export function __wbg_new_with_str_and_init_0ae7728b6ec367b1() { return handleError(function (arg0, arg1, arg2) {
923
936
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
924
937
  return addHeapObject(ret);
925
938
  }, arguments) };
926
939
 
927
- export function __wbg_next_138a17bbf04e926c(arg0) {
928
- const ret = getObject(arg0).next;
929
- return addHeapObject(ret);
930
- };
931
-
932
- export function __wbg_next_3cfe5c0fe2a4cc53() { return handleError(function (arg0) {
940
+ export function __wbg_next_020810e0ae8ebcb0() { return handleError(function (arg0) {
933
941
  const ret = getObject(arg0).next();
934
942
  return addHeapObject(ret);
935
943
  }, arguments) };
936
944
 
945
+ export function __wbg_next_2c826fe5dfec6b6a(arg0) {
946
+ const ret = getObject(arg0).next;
947
+ return addHeapObject(ret);
948
+ };
949
+
937
950
  export function __wbg_node_905d3e251edff8a2(arg0) {
938
951
  const ret = getObject(arg0).node;
939
952
  return addHeapObject(ret);
@@ -944,7 +957,7 @@ export function __wbg_obtain_a9626b3b96e6dc2c(arg0) {
944
957
  return addHeapObject(ret);
945
958
  };
946
959
 
947
- export function __wbg_origin_c4ac149104b9ebad() { return handleError(function (arg0, arg1) {
960
+ export function __wbg_origin_2b5e7986f349f4f3() { return handleError(function (arg0, arg1) {
948
961
  const ret = getObject(arg1).origin;
949
962
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
950
963
  const len1 = WASM_VECTOR_LEN;
@@ -952,7 +965,7 @@ export function __wbg_origin_c4ac149104b9ebad() { return handleError(function (a
952
965
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
953
966
  }, arguments) };
954
967
 
955
- export function __wbg_parse_7ff95c018af680b3(arg0, arg1) {
968
+ export function __wbg_parse_41503dcdc1dc43f2(arg0, arg1) {
956
969
  let deferred0_0;
957
970
  let deferred0_1;
958
971
  try {
@@ -970,21 +983,21 @@ export function __wbg_process_dc0fbacc7c1c06f7(arg0) {
970
983
  return addHeapObject(ret);
971
984
  };
972
985
 
973
- export function __wbg_prototypesetcall_dfe9b766cdc1f1fd(arg0, arg1, arg2) {
986
+ export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
974
987
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
975
988
  };
976
989
 
977
- export function __wbg_push_7d9be8f38fc13975(arg0, arg1) {
990
+ export function __wbg_push_df81a39d04db858c(arg0, arg1) {
978
991
  const ret = getObject(arg0).push(getObject(arg1));
979
992
  return ret;
980
993
  };
981
994
 
982
- export function __wbg_queueMicrotask_9b549dfce8865860(arg0) {
995
+ export function __wbg_queueMicrotask_34d692c25c47d05b(arg0) {
983
996
  const ret = getObject(arg0).queueMicrotask;
984
997
  return addHeapObject(ret);
985
998
  };
986
999
 
987
- export function __wbg_queueMicrotask_fca69f5bfad613a5(arg0) {
1000
+ export function __wbg_queueMicrotask_9d76cacb20c84d58(arg0) {
988
1001
  queueMicrotask(getObject(arg0));
989
1002
  };
990
1003
 
@@ -997,12 +1010,12 @@ export function __wbg_require_60cc747a6bc5215a() { return handleError(function (
997
1010
  return addHeapObject(ret);
998
1011
  }, arguments) };
999
1012
 
1000
- export function __wbg_resolve_fd5bfbaa4ce36e1e(arg0) {
1013
+ export function __wbg_resolve_caf97c30b83f7053(arg0) {
1001
1014
  const ret = Promise.resolve(getObject(arg0));
1002
1015
  return addHeapObject(ret);
1003
1016
  };
1004
1017
 
1005
- export function __wbg_setTimeout_4302406184dcc5be(arg0, arg1) {
1018
+ export function __wbg_setTimeout_7bb3429662ab1e70(arg0, arg1) {
1006
1019
  const ret = setTimeout(getObject(arg0), arg1);
1007
1020
  return addHeapObject(ret);
1008
1021
  };
@@ -1015,40 +1028,40 @@ export function __wbg_set_3fda3bac07393de4(arg0, arg1, arg2) {
1015
1028
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1016
1029
  };
1017
1030
 
1018
- export function __wbg_set_781438a03c0c3c81() { return handleError(function (arg0, arg1, arg2) {
1019
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1020
- return ret;
1021
- }, arguments) };
1031
+ export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
1032
+ getObject(arg0).body = getObject(arg1);
1033
+ };
1022
1034
 
1023
- export function __wbg_set_7df433eea03a5c14(arg0, arg1, arg2) {
1035
+ export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
1024
1036
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1025
1037
  };
1026
1038
 
1027
- export function __wbg_set_body_8e743242d6076a4f(arg0, arg1) {
1028
- getObject(arg0).body = getObject(arg1);
1029
- };
1039
+ export function __wbg_set_c2abbebe8b9ebee1() { return handleError(function (arg0, arg1, arg2) {
1040
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1041
+ return ret;
1042
+ }, arguments) };
1030
1043
 
1031
- export function __wbg_set_cache_0e437c7c8e838b9b(arg0, arg1) {
1044
+ export function __wbg_set_cache_2f9deb19b92b81e3(arg0, arg1) {
1032
1045
  getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
1033
1046
  };
1034
1047
 
1035
- export function __wbg_set_credentials_55ae7c3c106fd5be(arg0, arg1) {
1048
+ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
1036
1049
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1037
1050
  };
1038
1051
 
1039
- export function __wbg_set_headers_5671cf088e114d2b(arg0, arg1) {
1052
+ export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
1040
1053
  getObject(arg0).headers = getObject(arg1);
1041
1054
  };
1042
1055
 
1043
- export function __wbg_set_method_76c69e41b3570627(arg0, arg1, arg2) {
1056
+ export function __wbg_set_method_c02d8cbbe204ac2d(arg0, arg1, arg2) {
1044
1057
  getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1045
1058
  };
1046
1059
 
1047
- export function __wbg_set_mode_611016a6818fc690(arg0, arg1) {
1060
+ export function __wbg_set_mode_52ef73cfa79639cb(arg0, arg1) {
1048
1061
  getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1049
1062
  };
1050
1063
 
1051
- export function __wbg_set_signal_e89be862d0091009(arg0, arg1) {
1064
+ export function __wbg_set_signal_dda2cf7ccb6bee0f(arg0, arg1) {
1052
1065
  getObject(arg0).signal = getObject(arg1);
1053
1066
  };
1054
1067
 
@@ -1070,37 +1083,37 @@ export function __wbg_signMessage_c732ea9d998cac79() { return handleError(functi
1070
1083
  }
1071
1084
  }, arguments) };
1072
1085
 
1073
- export function __wbg_signal_3c14fbdc89694b39(arg0) {
1086
+ export function __wbg_signal_4db5aa055bf9eb9a(arg0) {
1074
1087
  const ret = getObject(arg0).signal;
1075
1088
  return addHeapObject(ret);
1076
1089
  };
1077
1090
 
1078
- export function __wbg_static_accessor_GLOBAL_769e6b65d6557335() {
1091
+ export function __wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e() {
1079
1092
  const ret = typeof global === 'undefined' ? null : global;
1080
1093
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
1081
1094
  };
1082
1095
 
1083
- export function __wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1() {
1096
+ export function __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac() {
1084
1097
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
1085
1098
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
1086
1099
  };
1087
1100
 
1088
- export function __wbg_static_accessor_SELF_08f5a74c69739274() {
1101
+ export function __wbg_static_accessor_SELF_6fdf4b64710cc91b() {
1089
1102
  const ret = typeof self === 'undefined' ? null : self;
1090
1103
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
1091
1104
  };
1092
1105
 
1093
- export function __wbg_static_accessor_WINDOW_a8924b26aa92d024() {
1106
+ export function __wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2() {
1094
1107
  const ret = typeof window === 'undefined' ? null : window;
1095
1108
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
1096
1109
  };
1097
1110
 
1098
- export function __wbg_status_9bfc680efca4bdfd(arg0) {
1111
+ export function __wbg_status_de7eed5a7a5bfd5d(arg0) {
1099
1112
  const ret = getObject(arg0).status;
1100
1113
  return ret;
1101
1114
  };
1102
1115
 
1103
- export function __wbg_stringify_56d3c6664110414f(arg0, arg1) {
1116
+ export function __wbg_stringify_404baa47f2ce77aa(arg0, arg1) {
1104
1117
  const ret = JSON.stringify(getObject(arg1));
1105
1118
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1106
1119
  var len1 = WASM_VECTOR_LEN;
@@ -1108,32 +1121,32 @@ export function __wbg_stringify_56d3c6664110414f(arg0, arg1) {
1108
1121
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1109
1122
  };
1110
1123
 
1111
- export function __wbg_stringify_655a6390e1f5eb6b() { return handleError(function (arg0) {
1124
+ export function __wbg_stringify_b5fb28f6465d9c3e() { return handleError(function (arg0) {
1112
1125
  const ret = JSON.stringify(getObject(arg0));
1113
1126
  return addHeapObject(ret);
1114
1127
  }, arguments) };
1115
1128
 
1116
- export function __wbg_subarray_845f2f5bce7d061a(arg0, arg1, arg2) {
1129
+ export function __wbg_subarray_480600f3d6a9f26c(arg0, arg1, arg2) {
1117
1130
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1118
1131
  return addHeapObject(ret);
1119
1132
  };
1120
1133
 
1121
- export function __wbg_text_51046bb33d257f63() { return handleError(function (arg0) {
1134
+ export function __wbg_text_dc33c15c17bdfb52() { return handleError(function (arg0) {
1122
1135
  const ret = getObject(arg0).text();
1123
1136
  return addHeapObject(ret);
1124
1137
  }, arguments) };
1125
1138
 
1126
- export function __wbg_then_429f7caf1026411d(arg0, arg1, arg2) {
1127
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1139
+ export function __wbg_then_4f46f6544e6b4a28(arg0, arg1) {
1140
+ const ret = getObject(arg0).then(getObject(arg1));
1128
1141
  return addHeapObject(ret);
1129
1142
  };
1130
1143
 
1131
- export function __wbg_then_4f95312d68691235(arg0, arg1) {
1132
- const ret = getObject(arg0).then(getObject(arg1));
1144
+ export function __wbg_then_70d05cf780a18d77(arg0, arg1, arg2) {
1145
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1133
1146
  return addHeapObject(ret);
1134
1147
  };
1135
1148
 
1136
- export function __wbg_url_b6d11838a4f95198(arg0, arg1) {
1149
+ export function __wbg_url_b36d2a5008eb056f(arg0, arg1) {
1137
1150
  const ret = getObject(arg1).url;
1138
1151
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1139
1152
  const len1 = WASM_VECTOR_LEN;
@@ -1141,7 +1154,7 @@ export function __wbg_url_b6d11838a4f95198(arg0, arg1) {
1141
1154
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1142
1155
  };
1143
1156
 
1144
- export function __wbg_value_57b7b035e117f7ee(arg0) {
1157
+ export function __wbg_value_692627309814bb8c(arg0) {
1145
1158
  const ret = getObject(arg0).value;
1146
1159
  return addHeapObject(ret);
1147
1160
  };
@@ -1151,21 +1164,15 @@ export function __wbg_versions_c01dfd4722a88165(arg0) {
1151
1164
  return addHeapObject(ret);
1152
1165
  };
1153
1166
 
1154
- export function __wbindgen_cast_07a7cf3b22b8fd7a(arg0, arg1) {
1155
- // Cast intrinsic for `Closure(Closure { dtor_idx: 457, function: Function { arguments: [], shim_idx: 458, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1156
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3926, __wasm_bindgen_func_elem_3935);
1157
- return addHeapObject(ret);
1158
- };
1159
-
1160
1167
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1161
1168
  // Cast intrinsic for `Ref(String) -> Externref`.
1162
1169
  const ret = getStringFromWasm0(arg0, arg1);
1163
1170
  return addHeapObject(ret);
1164
1171
  };
1165
1172
 
1166
- export function __wbindgen_cast_4b1c6ecbf5b749c2(arg0, arg1) {
1167
- // Cast intrinsic for `Closure(Closure { dtor_idx: 490, function: Function { arguments: [Externref], shim_idx: 491, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1168
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4063, __wasm_bindgen_func_elem_4078);
1173
+ export function __wbindgen_cast_84b1c647b29b7771(arg0, arg1) {
1174
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 491, function: Function { arguments: [Externref], shim_idx: 492, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1175
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4045, __wasm_bindgen_func_elem_4060);
1169
1176
  return addHeapObject(ret);
1170
1177
  };
1171
1178
 
@@ -1175,6 +1182,12 @@ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
1175
1182
  return addHeapObject(ret);
1176
1183
  };
1177
1184
 
1185
+ export function __wbindgen_cast_cbae8fdbdf7d2814(arg0, arg1) {
1186
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 458, function: Function { arguments: [], shim_idx: 459, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1187
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3912, __wasm_bindgen_func_elem_3921);
1188
+ return addHeapObject(ret);
1189
+ };
1190
+
1178
1191
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1179
1192
  // Cast intrinsic for `F64 -> Externref`.
1180
1193
  const ret = arg0;
@@ -1189,3 +1202,4 @@ export function __wbindgen_object_clone_ref(arg0) {
1189
1202
  export function __wbindgen_object_drop_ref(arg0) {
1190
1203
  takeObject(arg0);
1191
1204
  };
1205
+