@cartridge/controller-wasm 0.3.18 → 0.7.14-0df5a4c
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 +134 -144
- package/pkg-controller/account_wasm_bg.js +556 -606
- package/pkg-controller/account_wasm_bg.wasm +0 -0
- package/pkg-session/session_wasm.d.ts +87 -82
- package/pkg-session/session_wasm_bg.js +362 -376
- package/pkg-session/session_wasm_bg.wasm +0 -0
|
@@ -5,43 +5,6 @@ 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
|
-
|
|
45
8
|
function addHeapObject(obj) {
|
|
46
9
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
10
|
const idx = heap_next;
|
|
@@ -51,74 +14,15 @@ function addHeapObject(obj) {
|
|
|
51
14
|
return idx;
|
|
52
15
|
}
|
|
53
16
|
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
|
|
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);
|
|
17
|
+
function _assertClass(instance, klass) {
|
|
18
|
+
if (!(instance instanceof klass)) {
|
|
19
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
115
20
|
}
|
|
116
|
-
return cachedDataViewMemory0;
|
|
117
21
|
}
|
|
118
22
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
23
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
24
|
+
? { register: () => {}, unregister: () => {} }
|
|
25
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
122
26
|
|
|
123
27
|
function debugString(val) {
|
|
124
28
|
// primitive types
|
|
@@ -185,24 +89,20 @@ function debugString(val) {
|
|
|
185
89
|
return className;
|
|
186
90
|
}
|
|
187
91
|
|
|
188
|
-
function handleError(f, args) {
|
|
189
|
-
try {
|
|
190
|
-
return f.apply(this, args);
|
|
191
|
-
} catch (e) {
|
|
192
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
92
|
function dropObject(idx) {
|
|
197
93
|
if (idx < 132) return;
|
|
198
94
|
heap[idx] = heap_next;
|
|
199
95
|
heap_next = idx;
|
|
200
96
|
}
|
|
201
97
|
|
|
202
|
-
function
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
98
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
99
|
+
ptr = ptr >>> 0;
|
|
100
|
+
const mem = getDataViewMemory0();
|
|
101
|
+
const result = [];
|
|
102
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
103
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
104
|
+
}
|
|
105
|
+
return result;
|
|
206
106
|
}
|
|
207
107
|
|
|
208
108
|
function getArrayU8FromWasm0(ptr, len) {
|
|
@@ -210,9 +110,45 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
210
110
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
211
111
|
}
|
|
212
112
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
113
|
+
let cachedDataViewMemory0 = null;
|
|
114
|
+
function getDataViewMemory0() {
|
|
115
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
116
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
117
|
+
}
|
|
118
|
+
return cachedDataViewMemory0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function getStringFromWasm0(ptr, len) {
|
|
122
|
+
ptr = ptr >>> 0;
|
|
123
|
+
return decodeText(ptr, len);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
let cachedUint8ArrayMemory0 = null;
|
|
127
|
+
function getUint8ArrayMemory0() {
|
|
128
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
129
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
130
|
+
}
|
|
131
|
+
return cachedUint8ArrayMemory0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function getObject(idx) { return heap[idx]; }
|
|
135
|
+
|
|
136
|
+
function handleError(f, args) {
|
|
137
|
+
try {
|
|
138
|
+
return f.apply(this, args);
|
|
139
|
+
} catch (e) {
|
|
140
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
let heap = new Array(128).fill(undefined);
|
|
145
|
+
heap.push(undefined, null, true, false);
|
|
146
|
+
|
|
147
|
+
let heap_next = heap.length;
|
|
148
|
+
|
|
149
|
+
function isLikeNone(x) {
|
|
150
|
+
return x === undefined || x === null;
|
|
151
|
+
}
|
|
216
152
|
|
|
217
153
|
function makeClosure(arg0, arg1, dtor, f) {
|
|
218
154
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
@@ -276,183 +212,94 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
276
212
|
WASM_VECTOR_LEN = array.length;
|
|
277
213
|
return ptr;
|
|
278
214
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
throw takeObject(r1);
|
|
215
|
+
|
|
216
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
217
|
+
if (realloc === undefined) {
|
|
218
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
219
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
220
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
221
|
+
WASM_VECTOR_LEN = buf.length;
|
|
222
|
+
return ptr;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
let len = arg.length;
|
|
226
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
227
|
+
|
|
228
|
+
const mem = getUint8ArrayMemory0();
|
|
229
|
+
|
|
230
|
+
let offset = 0;
|
|
231
|
+
|
|
232
|
+
for (; offset < len; offset++) {
|
|
233
|
+
const code = arg.charCodeAt(offset);
|
|
234
|
+
if (code > 0x7F) break;
|
|
235
|
+
mem[ptr + offset] = code;
|
|
236
|
+
}
|
|
237
|
+
if (offset !== len) {
|
|
238
|
+
if (offset !== 0) {
|
|
239
|
+
arg = arg.slice(offset);
|
|
305
240
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
241
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
242
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
243
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
244
|
+
|
|
245
|
+
offset += ret.written;
|
|
246
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
309
247
|
}
|
|
248
|
+
|
|
249
|
+
WASM_VECTOR_LEN = offset;
|
|
250
|
+
return ptr;
|
|
310
251
|
}
|
|
311
252
|
|
|
312
|
-
function
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
253
|
+
function takeObject(idx) {
|
|
254
|
+
const ret = getObject(idx);
|
|
255
|
+
dropObject(idx);
|
|
256
|
+
return ret;
|
|
316
257
|
}
|
|
317
258
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
259
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
260
|
+
cachedTextDecoder.decode();
|
|
261
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
262
|
+
let numBytesDecoded = 0;
|
|
263
|
+
function decodeText(ptr, len) {
|
|
264
|
+
numBytesDecoded += len;
|
|
265
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
266
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
267
|
+
cachedTextDecoder.decode();
|
|
268
|
+
numBytesDecoded = len;
|
|
324
269
|
}
|
|
325
|
-
return
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Subscribes to the creation of a session for a given controller, session_key_guid and cartridge api url.
|
|
329
|
-
* The goal of this function is to know from any place when the register session flow has been completed, and to
|
|
330
|
-
* get the authorization.
|
|
331
|
-
* @param {JsFelt} session_key_guid
|
|
332
|
-
* @param {string} cartridge_api_url
|
|
333
|
-
* @returns {Promise<JsSubscribeSessionResult>}
|
|
334
|
-
*/
|
|
335
|
-
export function subscribeCreateSession(session_key_guid, cartridge_api_url) {
|
|
336
|
-
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
337
|
-
const len0 = WASM_VECTOR_LEN;
|
|
338
|
-
const ret = wasm.subscribeCreateSession(addHeapObject(session_key_guid), ptr0, len0);
|
|
339
|
-
return takeObject(ret);
|
|
270
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
340
271
|
}
|
|
341
272
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
353
|
-
if (r2) {
|
|
354
|
-
throw takeObject(r1);
|
|
355
|
-
}
|
|
356
|
-
return takeObject(r0);
|
|
357
|
-
} finally {
|
|
358
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
273
|
+
const cachedTextEncoder = new TextEncoder();
|
|
274
|
+
|
|
275
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
276
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
277
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
278
|
+
view.set(buf);
|
|
279
|
+
return {
|
|
280
|
+
read: arg.length,
|
|
281
|
+
written: buf.length
|
|
282
|
+
};
|
|
359
283
|
}
|
|
360
284
|
}
|
|
361
285
|
|
|
362
|
-
|
|
363
|
-
wasm.__wasm_bindgen_func_elem_8699(arg0, arg1);
|
|
364
|
-
}
|
|
286
|
+
let WASM_VECTOR_LEN = 0;
|
|
365
287
|
|
|
366
|
-
function
|
|
367
|
-
wasm.
|
|
288
|
+
function __wasm_bindgen_func_elem_8857(arg0, arg1, arg2) {
|
|
289
|
+
wasm.__wasm_bindgen_func_elem_8857(arg0, arg1, addHeapObject(arg2));
|
|
368
290
|
}
|
|
369
291
|
|
|
370
|
-
function
|
|
371
|
-
wasm.
|
|
292
|
+
function __wasm_bindgen_func_elem_3187(arg0, arg1, arg2) {
|
|
293
|
+
wasm.__wasm_bindgen_func_elem_3187(arg0, arg1, addHeapObject(arg2));
|
|
372
294
|
}
|
|
373
295
|
|
|
374
|
-
function
|
|
375
|
-
wasm.
|
|
296
|
+
function __wasm_bindgen_func_elem_8709(arg0, arg1) {
|
|
297
|
+
wasm.__wasm_bindgen_func_elem_8709(arg0, arg1);
|
|
376
298
|
}
|
|
377
299
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
export const ErrorCode = Object.freeze({
|
|
382
|
-
StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
|
|
383
|
-
StarknetContractNotFound: 20, "20": "StarknetContractNotFound",
|
|
384
|
-
StarknetBlockNotFound: 24, "24": "StarknetBlockNotFound",
|
|
385
|
-
StarknetInvalidTransactionIndex: 27, "27": "StarknetInvalidTransactionIndex",
|
|
386
|
-
StarknetClassHashNotFound: 28, "28": "StarknetClassHashNotFound",
|
|
387
|
-
StarknetTransactionHashNotFound: 29, "29": "StarknetTransactionHashNotFound",
|
|
388
|
-
StarknetPageSizeTooBig: 31, "31": "StarknetPageSizeTooBig",
|
|
389
|
-
StarknetNoBlocks: 32, "32": "StarknetNoBlocks",
|
|
390
|
-
StarknetInvalidContinuationToken: 33, "33": "StarknetInvalidContinuationToken",
|
|
391
|
-
StarknetTooManyKeysInFilter: 34, "34": "StarknetTooManyKeysInFilter",
|
|
392
|
-
StarknetContractError: 40, "40": "StarknetContractError",
|
|
393
|
-
StarknetTransactionExecutionError: 41, "41": "StarknetTransactionExecutionError",
|
|
394
|
-
StarknetClassAlreadyDeclared: 51, "51": "StarknetClassAlreadyDeclared",
|
|
395
|
-
StarknetInvalidTransactionNonce: 52, "52": "StarknetInvalidTransactionNonce",
|
|
396
|
-
StarknetInsufficientMaxFee: 53, "53": "StarknetInsufficientMaxFee",
|
|
397
|
-
StarknetInsufficientAccountBalance: 54, "54": "StarknetInsufficientAccountBalance",
|
|
398
|
-
StarknetValidationFailure: 55, "55": "StarknetValidationFailure",
|
|
399
|
-
StarknetCompilationFailed: 56, "56": "StarknetCompilationFailed",
|
|
400
|
-
StarknetContractClassSizeIsTooLarge: 57, "57": "StarknetContractClassSizeIsTooLarge",
|
|
401
|
-
StarknetNonAccount: 58, "58": "StarknetNonAccount",
|
|
402
|
-
StarknetDuplicateTx: 59, "59": "StarknetDuplicateTx",
|
|
403
|
-
StarknetCompiledClassHashMismatch: 60, "60": "StarknetCompiledClassHashMismatch",
|
|
404
|
-
StarknetUnsupportedTxVersion: 61, "61": "StarknetUnsupportedTxVersion",
|
|
405
|
-
StarknetUnsupportedContractClassVersion: 62, "62": "StarknetUnsupportedContractClassVersion",
|
|
406
|
-
StarknetUnexpectedError: 63, "63": "StarknetUnexpectedError",
|
|
407
|
-
StarknetNoTraceAvailable: 10, "10": "StarknetNoTraceAvailable",
|
|
408
|
-
StarknetReplacementTransactionUnderpriced: 64, "64": "StarknetReplacementTransactionUnderpriced",
|
|
409
|
-
StarknetFeeBelowMinimum: 65, "65": "StarknetFeeBelowMinimum",
|
|
410
|
-
SignError: 101, "101": "SignError",
|
|
411
|
-
StorageError: 102, "102": "StorageError",
|
|
412
|
-
AccountFactoryError: 103, "103": "AccountFactoryError",
|
|
413
|
-
PaymasterExecutionTimeNotReached: 104, "104": "PaymasterExecutionTimeNotReached",
|
|
414
|
-
PaymasterExecutionTimePassed: 105, "105": "PaymasterExecutionTimePassed",
|
|
415
|
-
PaymasterInvalidCaller: 106, "106": "PaymasterInvalidCaller",
|
|
416
|
-
PaymasterRateLimitExceeded: 107, "107": "PaymasterRateLimitExceeded",
|
|
417
|
-
PaymasterNotSupported: 108, "108": "PaymasterNotSupported",
|
|
418
|
-
PaymasterHttp: 109, "109": "PaymasterHttp",
|
|
419
|
-
PaymasterExcecution: 110, "110": "PaymasterExcecution",
|
|
420
|
-
PaymasterSerialization: 111, "111": "PaymasterSerialization",
|
|
421
|
-
CartridgeControllerNotDeployed: 112, "112": "CartridgeControllerNotDeployed",
|
|
422
|
-
InsufficientBalance: 113, "113": "InsufficientBalance",
|
|
423
|
-
OriginError: 114, "114": "OriginError",
|
|
424
|
-
EncodingError: 115, "115": "EncodingError",
|
|
425
|
-
SerdeWasmBindgenError: 116, "116": "SerdeWasmBindgenError",
|
|
426
|
-
CairoSerdeError: 117, "117": "CairoSerdeError",
|
|
427
|
-
CairoShortStringToFeltError: 118, "118": "CairoShortStringToFeltError",
|
|
428
|
-
DeviceCreateCredential: 119, "119": "DeviceCreateCredential",
|
|
429
|
-
DeviceGetAssertion: 120, "120": "DeviceGetAssertion",
|
|
430
|
-
DeviceBadAssertion: 121, "121": "DeviceBadAssertion",
|
|
431
|
-
DeviceChannel: 122, "122": "DeviceChannel",
|
|
432
|
-
DeviceOrigin: 123, "123": "DeviceOrigin",
|
|
433
|
-
AccountSigning: 124, "124": "AccountSigning",
|
|
434
|
-
AccountProvider: 125, "125": "AccountProvider",
|
|
435
|
-
AccountClassHashCalculation: 126, "126": "AccountClassHashCalculation",
|
|
436
|
-
AccountFeeOutOfRange: 128, "128": "AccountFeeOutOfRange",
|
|
437
|
-
ProviderRateLimited: 129, "129": "ProviderRateLimited",
|
|
438
|
-
ProviderArrayLengthMismatch: 130, "130": "ProviderArrayLengthMismatch",
|
|
439
|
-
ProviderOther: 131, "131": "ProviderOther",
|
|
440
|
-
SessionAlreadyRegistered: 132, "132": "SessionAlreadyRegistered",
|
|
441
|
-
UrlParseError: 133, "133": "UrlParseError",
|
|
442
|
-
Base64DecodeError: 134, "134": "Base64DecodeError",
|
|
443
|
-
CoseError: 135, "135": "CoseError",
|
|
444
|
-
PolicyChainIdMismatch: 136, "136": "PolicyChainIdMismatch",
|
|
445
|
-
InvalidOwner: 137, "137": "InvalidOwner",
|
|
446
|
-
GasPriceTooHigh: 138, "138": "GasPriceTooHigh",
|
|
447
|
-
TransactionTimeout: 139, "139": "TransactionTimeout",
|
|
448
|
-
ConversionError: 140, "140": "ConversionError",
|
|
449
|
-
InvalidChainId: 141, "141": "InvalidChainId",
|
|
450
|
-
SessionRefreshRequired: 142, "142": "SessionRefreshRequired",
|
|
451
|
-
ManualExecutionRequired: 143, "143": "ManualExecutionRequired",
|
|
452
|
-
ForbiddenEntrypoint: 144, "144": "ForbiddenEntrypoint",
|
|
453
|
-
GasAmountTooHigh: 145, "145": "GasAmountTooHigh",
|
|
454
|
-
ApproveExecutionRequired: 146, "146": "ApproveExecutionRequired",
|
|
455
|
-
});
|
|
300
|
+
function __wasm_bindgen_func_elem_10966(arg0, arg1, arg2, arg3) {
|
|
301
|
+
wasm.__wasm_bindgen_func_elem_10966(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
302
|
+
}
|
|
456
303
|
|
|
457
304
|
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
458
305
|
|
|
@@ -464,8 +311,39 @@ const CartridgeAccountFinalization = (typeof FinalizationRegistry === 'undefined
|
|
|
464
311
|
? { register: () => {}, unregister: () => {} }
|
|
465
312
|
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccount_free(ptr >>> 0, 1));
|
|
466
313
|
|
|
467
|
-
|
|
314
|
+
const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
315
|
+
? { register: () => {}, unregister: () => {} }
|
|
316
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountmeta_free(ptr >>> 0, 1));
|
|
317
|
+
|
|
318
|
+
const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
319
|
+
? { register: () => {}, unregister: () => {} }
|
|
320
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountwithmeta_free(ptr >>> 0, 1));
|
|
321
|
+
|
|
322
|
+
const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
323
|
+
? { register: () => {}, unregister: () => {} }
|
|
324
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
|
|
325
|
+
|
|
326
|
+
const JsChainConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
327
|
+
? { register: () => {}, unregister: () => {} }
|
|
328
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jschainconfig_free(ptr >>> 0, 1));
|
|
329
|
+
|
|
330
|
+
const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
331
|
+
? { register: () => {}, unregister: () => {} }
|
|
332
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
|
|
333
|
+
|
|
334
|
+
const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
335
|
+
? { register: () => {}, unregister: () => {} }
|
|
336
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
|
|
337
|
+
|
|
338
|
+
const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
339
|
+
? { register: () => {}, unregister: () => {} }
|
|
340
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
|
|
341
|
+
|
|
342
|
+
const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
343
|
+
? { register: () => {}, unregister: () => {} }
|
|
344
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
|
|
468
345
|
|
|
346
|
+
export class CartridgeAccount {
|
|
469
347
|
static __wrap(ptr) {
|
|
470
348
|
ptr = ptr >>> 0;
|
|
471
349
|
const obj = Object.create(CartridgeAccount.prototype);
|
|
@@ -473,14 +351,12 @@ export class CartridgeAccount {
|
|
|
473
351
|
CartridgeAccountFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
474
352
|
return obj;
|
|
475
353
|
}
|
|
476
|
-
|
|
477
354
|
__destroy_into_raw() {
|
|
478
355
|
const ptr = this.__wbg_ptr;
|
|
479
356
|
this.__wbg_ptr = 0;
|
|
480
357
|
CartridgeAccountFinalization.unregister(this);
|
|
481
358
|
return ptr;
|
|
482
359
|
}
|
|
483
|
-
|
|
484
360
|
free() {
|
|
485
361
|
const ptr = this.__destroy_into_raw();
|
|
486
362
|
wasm.__wbg_cartridgeaccount_free(ptr, 0);
|
|
@@ -489,12 +365,10 @@ export class CartridgeAccount {
|
|
|
489
365
|
* Creates a new `CartridgeAccount` instance.
|
|
490
366
|
*
|
|
491
367
|
* # Parameters
|
|
492
|
-
* - `app_id`: Application identifier.
|
|
493
368
|
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
494
369
|
* - `address`: The blockchain address associated with the account.
|
|
495
370
|
* - `username`: Username associated with the account.
|
|
496
371
|
* - `owner`: A Owner struct containing the owner signer and associated data.
|
|
497
|
-
* @param {string} app_id
|
|
498
372
|
* @param {JsFelt} class_hash
|
|
499
373
|
* @param {string} rpc_url
|
|
500
374
|
* @param {JsFelt} address
|
|
@@ -503,16 +377,14 @@ export class CartridgeAccount {
|
|
|
503
377
|
* @param {string} cartridge_api_url
|
|
504
378
|
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
505
379
|
*/
|
|
506
|
-
static new(
|
|
507
|
-
const ptr0 = passStringToWasm0(
|
|
380
|
+
static new(class_hash, rpc_url, address, username, owner, cartridge_api_url) {
|
|
381
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
508
382
|
const len0 = WASM_VECTOR_LEN;
|
|
509
|
-
const ptr1 = passStringToWasm0(
|
|
383
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
510
384
|
const len1 = WASM_VECTOR_LEN;
|
|
511
|
-
const ptr2 = passStringToWasm0(
|
|
385
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
512
386
|
const len2 = WASM_VECTOR_LEN;
|
|
513
|
-
const
|
|
514
|
-
const len3 = WASM_VECTOR_LEN;
|
|
515
|
-
const ret = wasm.cartridgeaccount_new(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), ptr2, len2, addHeapObject(owner), ptr3, len3);
|
|
387
|
+
const ret = wasm.cartridgeaccount_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(address), ptr1, len1, addHeapObject(owner), ptr2, len2);
|
|
516
388
|
return takeObject(ret);
|
|
517
389
|
}
|
|
518
390
|
/**
|
|
@@ -520,39 +392,32 @@ export class CartridgeAccount {
|
|
|
520
392
|
* The controller address is computed internally based on the generated signer.
|
|
521
393
|
*
|
|
522
394
|
* # Parameters
|
|
523
|
-
* - `app_id`: Application identifier.
|
|
524
395
|
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
525
396
|
* - `username`: Username associated with the account.
|
|
526
|
-
* @param {string} app_id
|
|
527
397
|
* @param {JsFelt} class_hash
|
|
528
398
|
* @param {string} rpc_url
|
|
529
399
|
* @param {string} username
|
|
530
400
|
* @param {string} cartridge_api_url
|
|
531
401
|
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
532
402
|
*/
|
|
533
|
-
static newHeadless(
|
|
534
|
-
const ptr0 = passStringToWasm0(
|
|
403
|
+
static newHeadless(class_hash, rpc_url, username, cartridge_api_url) {
|
|
404
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
535
405
|
const len0 = WASM_VECTOR_LEN;
|
|
536
|
-
const ptr1 = passStringToWasm0(
|
|
406
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
537
407
|
const len1 = WASM_VECTOR_LEN;
|
|
538
|
-
const ptr2 = passStringToWasm0(
|
|
408
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
539
409
|
const len2 = WASM_VECTOR_LEN;
|
|
540
|
-
const
|
|
541
|
-
const len3 = WASM_VECTOR_LEN;
|
|
542
|
-
const ret = wasm.cartridgeaccount_newHeadless(ptr0, len0, addHeapObject(class_hash), ptr1, len1, ptr2, len2, ptr3, len3);
|
|
410
|
+
const ret = wasm.cartridgeaccount_newHeadless(addHeapObject(class_hash), ptr0, len0, ptr1, len1, ptr2, len2);
|
|
543
411
|
return takeObject(ret);
|
|
544
412
|
}
|
|
545
413
|
/**
|
|
546
|
-
* @param {string} app_id
|
|
547
414
|
* @param {string} cartridge_api_url
|
|
548
415
|
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
549
416
|
*/
|
|
550
|
-
static fromStorage(
|
|
551
|
-
const ptr0 = passStringToWasm0(
|
|
417
|
+
static fromStorage(cartridge_api_url) {
|
|
418
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
552
419
|
const len0 = WASM_VECTOR_LEN;
|
|
553
|
-
const
|
|
554
|
-
const len1 = WASM_VECTOR_LEN;
|
|
555
|
-
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0, ptr1, len1);
|
|
420
|
+
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
556
421
|
return takeObject(ret);
|
|
557
422
|
}
|
|
558
423
|
/**
|
|
@@ -563,16 +428,19 @@ export class CartridgeAccount {
|
|
|
563
428
|
return takeObject(ret);
|
|
564
429
|
}
|
|
565
430
|
/**
|
|
431
|
+
* @param {string} app_id
|
|
566
432
|
* @param {Policy[]} policies
|
|
567
433
|
* @param {bigint} expires_at
|
|
568
434
|
* @param {JsFelt} public_key
|
|
569
435
|
* @param {JsFeeEstimate | null} [max_fee]
|
|
570
436
|
* @returns {Promise<any>}
|
|
571
437
|
*/
|
|
572
|
-
registerSession(policies, expires_at, public_key, max_fee) {
|
|
573
|
-
const ptr0 =
|
|
438
|
+
registerSession(app_id, policies, expires_at, public_key, max_fee) {
|
|
439
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
574
440
|
const len0 = WASM_VECTOR_LEN;
|
|
575
|
-
const
|
|
441
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
442
|
+
const len1 = WASM_VECTOR_LEN;
|
|
443
|
+
const ret = wasm.cartridgeaccount_registerSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, addHeapObject(public_key), isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
576
444
|
return takeObject(ret);
|
|
577
445
|
}
|
|
578
446
|
/**
|
|
@@ -604,25 +472,31 @@ export class CartridgeAccount {
|
|
|
604
472
|
return takeObject(ret);
|
|
605
473
|
}
|
|
606
474
|
/**
|
|
475
|
+
* @param {string} app_id
|
|
607
476
|
* @param {Policy[]} policies
|
|
608
477
|
* @param {bigint} expires_at
|
|
609
478
|
* @param {boolean | null} [authorize_user_execution]
|
|
610
479
|
* @returns {Promise<AuthorizedSession | undefined>}
|
|
611
480
|
*/
|
|
612
|
-
createSession(policies, expires_at, authorize_user_execution) {
|
|
613
|
-
const ptr0 =
|
|
481
|
+
createSession(app_id, policies, expires_at, authorize_user_execution) {
|
|
482
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
614
483
|
const len0 = WASM_VECTOR_LEN;
|
|
615
|
-
const
|
|
484
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
485
|
+
const len1 = WASM_VECTOR_LEN;
|
|
486
|
+
const ret = wasm.cartridgeaccount_createSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, isLikeNone(authorize_user_execution) ? 0xFFFFFF : authorize_user_execution ? 1 : 0);
|
|
616
487
|
return takeObject(ret);
|
|
617
488
|
}
|
|
618
489
|
/**
|
|
490
|
+
* @param {string} app_id
|
|
619
491
|
* @param {Policy[]} policies
|
|
620
492
|
* @returns {Promise<void>}
|
|
621
493
|
*/
|
|
622
|
-
skipSession(policies) {
|
|
623
|
-
const ptr0 =
|
|
494
|
+
skipSession(app_id, policies) {
|
|
495
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
624
496
|
const len0 = WASM_VECTOR_LEN;
|
|
625
|
-
const
|
|
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);
|
|
626
500
|
return takeObject(ret);
|
|
627
501
|
}
|
|
628
502
|
/**
|
|
@@ -700,14 +574,17 @@ export class CartridgeAccount {
|
|
|
700
574
|
return takeObject(ret);
|
|
701
575
|
}
|
|
702
576
|
/**
|
|
577
|
+
* @param {string} app_id
|
|
703
578
|
* @param {JsCall[]} calls
|
|
704
579
|
* @param {JsFeeSource | null} [fee_source]
|
|
705
580
|
* @returns {Promise<any>}
|
|
706
581
|
*/
|
|
707
|
-
trySessionExecute(calls, fee_source) {
|
|
708
|
-
const ptr0 =
|
|
582
|
+
trySessionExecute(app_id, calls, fee_source) {
|
|
583
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
709
584
|
const len0 = WASM_VECTOR_LEN;
|
|
710
|
-
const
|
|
585
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
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));
|
|
711
588
|
return takeObject(ret);
|
|
712
589
|
}
|
|
713
590
|
/**
|
|
@@ -722,13 +599,16 @@ export class CartridgeAccount {
|
|
|
722
599
|
return takeObject(ret);
|
|
723
600
|
}
|
|
724
601
|
/**
|
|
602
|
+
* @param {string} app_id
|
|
725
603
|
* @param {Policy[]} policies
|
|
726
604
|
* @returns {Promise<boolean>}
|
|
727
605
|
*/
|
|
728
|
-
hasRequestedSession(policies) {
|
|
729
|
-
const ptr0 =
|
|
606
|
+
hasRequestedSession(app_id, policies) {
|
|
607
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
730
608
|
const len0 = WASM_VECTOR_LEN;
|
|
731
|
-
const
|
|
609
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
610
|
+
const len1 = WASM_VECTOR_LEN;
|
|
611
|
+
const ret = wasm.cartridgeaccount_hasRequestedSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
732
612
|
return takeObject(ret);
|
|
733
613
|
}
|
|
734
614
|
/**
|
|
@@ -782,23 +662,29 @@ export class CartridgeAccount {
|
|
|
782
662
|
return takeObject(ret);
|
|
783
663
|
}
|
|
784
664
|
/**
|
|
665
|
+
* @param {string} app_id
|
|
785
666
|
* @param {JsCall[]} calls
|
|
786
667
|
* @returns {Promise<boolean>}
|
|
787
668
|
*/
|
|
788
|
-
hasAuthorizedPoliciesForCalls(calls) {
|
|
789
|
-
const ptr0 =
|
|
669
|
+
hasAuthorizedPoliciesForCalls(app_id, calls) {
|
|
670
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
790
671
|
const len0 = WASM_VECTOR_LEN;
|
|
791
|
-
const
|
|
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);
|
|
792
675
|
return takeObject(ret);
|
|
793
676
|
}
|
|
794
677
|
/**
|
|
678
|
+
* @param {string} app_id
|
|
795
679
|
* @param {string} typed_data
|
|
796
680
|
* @returns {Promise<boolean>}
|
|
797
681
|
*/
|
|
798
|
-
hasAuthorizedPoliciesForMessage(typed_data) {
|
|
799
|
-
const ptr0 = passStringToWasm0(
|
|
682
|
+
hasAuthorizedPoliciesForMessage(app_id, typed_data) {
|
|
683
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
800
684
|
const len0 = WASM_VECTOR_LEN;
|
|
801
|
-
const
|
|
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);
|
|
802
688
|
return takeObject(ret);
|
|
803
689
|
}
|
|
804
690
|
/**
|
|
@@ -818,12 +704,26 @@ export class CartridgeAccount {
|
|
|
818
704
|
const ret = wasm.cartridgeaccount_signExecuteFromOutside(this.__wbg_ptr, ptr0, len0);
|
|
819
705
|
return takeObject(ret);
|
|
820
706
|
}
|
|
707
|
+
/**
|
|
708
|
+
* Checks if there are stored policies for a given app_id.
|
|
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>}
|
|
717
|
+
*/
|
|
718
|
+
hasPoliciesForAppId(app_id) {
|
|
719
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
720
|
+
const len0 = WASM_VECTOR_LEN;
|
|
721
|
+
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
722
|
+
return takeObject(ret);
|
|
723
|
+
}
|
|
821
724
|
}
|
|
822
725
|
if (Symbol.dispose) CartridgeAccount.prototype[Symbol.dispose] = CartridgeAccount.prototype.free;
|
|
823
726
|
|
|
824
|
-
const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
825
|
-
? { register: () => {}, unregister: () => {} }
|
|
826
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountmeta_free(ptr >>> 0, 1));
|
|
827
727
|
/**
|
|
828
728
|
* A type for accessing fixed attributes of `CartridgeAccount`.
|
|
829
729
|
*
|
|
@@ -838,7 +738,6 @@ const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undef
|
|
|
838
738
|
* be needed.
|
|
839
739
|
*/
|
|
840
740
|
export class CartridgeAccountMeta {
|
|
841
|
-
|
|
842
741
|
static __wrap(ptr) {
|
|
843
742
|
ptr = ptr >>> 0;
|
|
844
743
|
const obj = Object.create(CartridgeAccountMeta.prototype);
|
|
@@ -846,37 +745,16 @@ export class CartridgeAccountMeta {
|
|
|
846
745
|
CartridgeAccountMetaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
847
746
|
return obj;
|
|
848
747
|
}
|
|
849
|
-
|
|
850
748
|
__destroy_into_raw() {
|
|
851
749
|
const ptr = this.__wbg_ptr;
|
|
852
750
|
this.__wbg_ptr = 0;
|
|
853
751
|
CartridgeAccountMetaFinalization.unregister(this);
|
|
854
752
|
return ptr;
|
|
855
753
|
}
|
|
856
|
-
|
|
857
754
|
free() {
|
|
858
755
|
const ptr = this.__destroy_into_raw();
|
|
859
756
|
wasm.__wbg_cartridgeaccountmeta_free(ptr, 0);
|
|
860
757
|
}
|
|
861
|
-
/**
|
|
862
|
-
* @returns {string}
|
|
863
|
-
*/
|
|
864
|
-
appId() {
|
|
865
|
-
let deferred1_0;
|
|
866
|
-
let deferred1_1;
|
|
867
|
-
try {
|
|
868
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
869
|
-
wasm.cartridgeaccountmeta_appId(retptr, this.__wbg_ptr);
|
|
870
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
871
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
872
|
-
deferred1_0 = r0;
|
|
873
|
-
deferred1_1 = r1;
|
|
874
|
-
return getStringFromWasm0(r0, r1);
|
|
875
|
-
} finally {
|
|
876
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
877
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
758
|
/**
|
|
881
759
|
* @returns {string}
|
|
882
760
|
*/
|
|
@@ -989,9 +867,6 @@ export class CartridgeAccountMeta {
|
|
|
989
867
|
}
|
|
990
868
|
if (Symbol.dispose) CartridgeAccountMeta.prototype[Symbol.dispose] = CartridgeAccountMeta.prototype.free;
|
|
991
869
|
|
|
992
|
-
const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
993
|
-
? { register: () => {}, unregister: () => {} }
|
|
994
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountwithmeta_free(ptr >>> 0, 1));
|
|
995
870
|
/**
|
|
996
871
|
* A type used as the return type for constructing `CartridgeAccount` to provide an extra,
|
|
997
872
|
* separately borrowable `meta` field for synchronously accessing fixed fields.
|
|
@@ -1000,7 +875,6 @@ const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'u
|
|
|
1000
875
|
* don't implement `IntoWasmAbi` which is needed for crossing JS-WASM boundary.
|
|
1001
876
|
*/
|
|
1002
877
|
export class CartridgeAccountWithMeta {
|
|
1003
|
-
|
|
1004
878
|
static __wrap(ptr) {
|
|
1005
879
|
ptr = ptr >>> 0;
|
|
1006
880
|
const obj = Object.create(CartridgeAccountWithMeta.prototype);
|
|
@@ -1008,14 +882,12 @@ export class CartridgeAccountWithMeta {
|
|
|
1008
882
|
CartridgeAccountWithMetaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1009
883
|
return obj;
|
|
1010
884
|
}
|
|
1011
|
-
|
|
1012
885
|
__destroy_into_raw() {
|
|
1013
886
|
const ptr = this.__wbg_ptr;
|
|
1014
887
|
this.__wbg_ptr = 0;
|
|
1015
888
|
CartridgeAccountWithMetaFinalization.unregister(this);
|
|
1016
889
|
return ptr;
|
|
1017
890
|
}
|
|
1018
|
-
|
|
1019
891
|
free() {
|
|
1020
892
|
const ptr = this.__destroy_into_raw();
|
|
1021
893
|
wasm.__wbg_cartridgeaccountwithmeta_free(ptr, 0);
|
|
@@ -1038,34 +910,25 @@ export class CartridgeAccountWithMeta {
|
|
|
1038
910
|
}
|
|
1039
911
|
if (Symbol.dispose) CartridgeAccountWithMeta.prototype[Symbol.dispose] = CartridgeAccountWithMeta.prototype.free;
|
|
1040
912
|
|
|
1041
|
-
const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1042
|
-
? { register: () => {}, unregister: () => {} }
|
|
1043
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
|
|
1044
|
-
|
|
1045
913
|
export class ControllerFactory {
|
|
1046
|
-
|
|
1047
914
|
__destroy_into_raw() {
|
|
1048
915
|
const ptr = this.__wbg_ptr;
|
|
1049
916
|
this.__wbg_ptr = 0;
|
|
1050
917
|
ControllerFactoryFinalization.unregister(this);
|
|
1051
918
|
return ptr;
|
|
1052
919
|
}
|
|
1053
|
-
|
|
1054
920
|
free() {
|
|
1055
921
|
const ptr = this.__destroy_into_raw();
|
|
1056
922
|
wasm.__wbg_controllerfactory_free(ptr, 0);
|
|
1057
923
|
}
|
|
1058
924
|
/**
|
|
1059
|
-
* @param {string} app_id
|
|
1060
925
|
* @param {string} cartridge_api_url
|
|
1061
926
|
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
1062
927
|
*/
|
|
1063
|
-
static fromStorage(
|
|
1064
|
-
const ptr0 = passStringToWasm0(
|
|
928
|
+
static fromStorage(cartridge_api_url) {
|
|
929
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1065
930
|
const len0 = WASM_VECTOR_LEN;
|
|
1066
|
-
const
|
|
1067
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1068
|
-
const ret = wasm.controllerfactory_fromStorage(ptr0, len0, ptr1, len1);
|
|
931
|
+
const ret = wasm.controllerfactory_fromStorage(ptr0, len0);
|
|
1069
932
|
return takeObject(ret);
|
|
1070
933
|
}
|
|
1071
934
|
/**
|
|
@@ -1095,7 +958,6 @@ export class ControllerFactory {
|
|
|
1095
958
|
* 2. Calls `Controller::new` and optionally `create_wildcard_session`
|
|
1096
959
|
* 3. Handles WebAuthn signer updates when multiple signers are present
|
|
1097
960
|
* 4. Registers the session with Cartridge API if requested
|
|
1098
|
-
* @param {string} app_id
|
|
1099
961
|
* @param {string} username
|
|
1100
962
|
* @param {JsFelt} class_hash
|
|
1101
963
|
* @param {string} rpc_url
|
|
@@ -1105,23 +967,23 @@ export class ControllerFactory {
|
|
|
1105
967
|
* @param {bigint} session_expires_at_s
|
|
1106
968
|
* @param {boolean | null} [is_controller_registered]
|
|
1107
969
|
* @param {boolean | null} [create_wildcard_session]
|
|
970
|
+
* @param {string | null} [app_id]
|
|
1108
971
|
* @returns {Promise<LoginResult>}
|
|
1109
972
|
*/
|
|
1110
|
-
static login(
|
|
1111
|
-
const ptr0 = passStringToWasm0(
|
|
973
|
+
static login(username, class_hash, rpc_url, address, owner, cartridge_api_url, session_expires_at_s, is_controller_registered, create_wildcard_session, app_id) {
|
|
974
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1112
975
|
const len0 = WASM_VECTOR_LEN;
|
|
1113
|
-
const ptr1 = passStringToWasm0(
|
|
976
|
+
const ptr1 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1114
977
|
const len1 = WASM_VECTOR_LEN;
|
|
1115
|
-
const ptr2 = passStringToWasm0(
|
|
978
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1116
979
|
const len2 = WASM_VECTOR_LEN;
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
const ret = wasm.controllerfactory_login(ptr0, len0,
|
|
980
|
+
var ptr3 = isLikeNone(app_id) ? 0 : passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
981
|
+
var len3 = WASM_VECTOR_LEN;
|
|
982
|
+
const ret = wasm.controllerfactory_login(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), addHeapObject(owner), ptr2, len2, session_expires_at_s, isLikeNone(is_controller_registered) ? 0xFFFFFF : is_controller_registered ? 1 : 0, isLikeNone(create_wildcard_session) ? 0xFFFFFF : create_wildcard_session ? 1 : 0, ptr3, len3);
|
|
1120
983
|
return takeObject(ret);
|
|
1121
984
|
}
|
|
1122
985
|
/**
|
|
1123
986
|
* This should only be used with webauthn signers
|
|
1124
|
-
* @param {string} app_id
|
|
1125
987
|
* @param {string} username
|
|
1126
988
|
* @param {JsFelt} class_hash
|
|
1127
989
|
* @param {string} rpc_url
|
|
@@ -1130,43 +992,114 @@ export class ControllerFactory {
|
|
|
1130
992
|
* @param {string} cartridge_api_url
|
|
1131
993
|
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
1132
994
|
*/
|
|
1133
|
-
static apiLogin(
|
|
1134
|
-
const ptr0 = passStringToWasm0(
|
|
995
|
+
static apiLogin(username, class_hash, rpc_url, address, owner, cartridge_api_url) {
|
|
996
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1135
997
|
const len0 = WASM_VECTOR_LEN;
|
|
1136
|
-
const ptr1 = passStringToWasm0(
|
|
998
|
+
const ptr1 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1137
999
|
const len1 = WASM_VECTOR_LEN;
|
|
1138
|
-
const ptr2 = passStringToWasm0(
|
|
1000
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1139
1001
|
const len2 = WASM_VECTOR_LEN;
|
|
1140
|
-
const
|
|
1141
|
-
const len3 = WASM_VECTOR_LEN;
|
|
1142
|
-
const ret = wasm.controllerfactory_apiLogin(ptr0, len0, ptr1, len1, addHeapObject(class_hash), ptr2, len2, addHeapObject(address), addHeapObject(owner), ptr3, len3);
|
|
1002
|
+
const ret = wasm.controllerfactory_apiLogin(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), addHeapObject(owner), ptr2, len2);
|
|
1143
1003
|
return takeObject(ret);
|
|
1144
1004
|
}
|
|
1145
1005
|
}
|
|
1146
1006
|
if (Symbol.dispose) ControllerFactory.prototype[Symbol.dispose] = ControllerFactory.prototype.free;
|
|
1147
1007
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1008
|
+
/**
|
|
1009
|
+
* @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}
|
|
1010
|
+
*/
|
|
1011
|
+
export const ErrorCode = Object.freeze({
|
|
1012
|
+
StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
|
|
1013
|
+
StarknetContractNotFound: 20, "20": "StarknetContractNotFound",
|
|
1014
|
+
StarknetBlockNotFound: 24, "24": "StarknetBlockNotFound",
|
|
1015
|
+
StarknetInvalidTransactionIndex: 27, "27": "StarknetInvalidTransactionIndex",
|
|
1016
|
+
StarknetClassHashNotFound: 28, "28": "StarknetClassHashNotFound",
|
|
1017
|
+
StarknetTransactionHashNotFound: 29, "29": "StarknetTransactionHashNotFound",
|
|
1018
|
+
StarknetPageSizeTooBig: 31, "31": "StarknetPageSizeTooBig",
|
|
1019
|
+
StarknetNoBlocks: 32, "32": "StarknetNoBlocks",
|
|
1020
|
+
StarknetInvalidContinuationToken: 33, "33": "StarknetInvalidContinuationToken",
|
|
1021
|
+
StarknetTooManyKeysInFilter: 34, "34": "StarknetTooManyKeysInFilter",
|
|
1022
|
+
StarknetContractError: 40, "40": "StarknetContractError",
|
|
1023
|
+
StarknetTransactionExecutionError: 41, "41": "StarknetTransactionExecutionError",
|
|
1024
|
+
StarknetClassAlreadyDeclared: 51, "51": "StarknetClassAlreadyDeclared",
|
|
1025
|
+
StarknetInvalidTransactionNonce: 52, "52": "StarknetInvalidTransactionNonce",
|
|
1026
|
+
StarknetInsufficientMaxFee: 53, "53": "StarknetInsufficientMaxFee",
|
|
1027
|
+
StarknetInsufficientAccountBalance: 54, "54": "StarknetInsufficientAccountBalance",
|
|
1028
|
+
StarknetValidationFailure: 55, "55": "StarknetValidationFailure",
|
|
1029
|
+
StarknetCompilationFailed: 56, "56": "StarknetCompilationFailed",
|
|
1030
|
+
StarknetContractClassSizeIsTooLarge: 57, "57": "StarknetContractClassSizeIsTooLarge",
|
|
1031
|
+
StarknetNonAccount: 58, "58": "StarknetNonAccount",
|
|
1032
|
+
StarknetDuplicateTx: 59, "59": "StarknetDuplicateTx",
|
|
1033
|
+
StarknetCompiledClassHashMismatch: 60, "60": "StarknetCompiledClassHashMismatch",
|
|
1034
|
+
StarknetUnsupportedTxVersion: 61, "61": "StarknetUnsupportedTxVersion",
|
|
1035
|
+
StarknetUnsupportedContractClassVersion: 62, "62": "StarknetUnsupportedContractClassVersion",
|
|
1036
|
+
StarknetUnexpectedError: 63, "63": "StarknetUnexpectedError",
|
|
1037
|
+
StarknetNoTraceAvailable: 10, "10": "StarknetNoTraceAvailable",
|
|
1038
|
+
StarknetReplacementTransactionUnderpriced: 64, "64": "StarknetReplacementTransactionUnderpriced",
|
|
1039
|
+
StarknetFeeBelowMinimum: 65, "65": "StarknetFeeBelowMinimum",
|
|
1040
|
+
SignError: 101, "101": "SignError",
|
|
1041
|
+
StorageError: 102, "102": "StorageError",
|
|
1042
|
+
AccountFactoryError: 103, "103": "AccountFactoryError",
|
|
1043
|
+
PaymasterExecutionTimeNotReached: 104, "104": "PaymasterExecutionTimeNotReached",
|
|
1044
|
+
PaymasterExecutionTimePassed: 105, "105": "PaymasterExecutionTimePassed",
|
|
1045
|
+
PaymasterInvalidCaller: 106, "106": "PaymasterInvalidCaller",
|
|
1046
|
+
PaymasterRateLimitExceeded: 107, "107": "PaymasterRateLimitExceeded",
|
|
1047
|
+
PaymasterNotSupported: 108, "108": "PaymasterNotSupported",
|
|
1048
|
+
PaymasterHttp: 109, "109": "PaymasterHttp",
|
|
1049
|
+
PaymasterExcecution: 110, "110": "PaymasterExcecution",
|
|
1050
|
+
PaymasterSerialization: 111, "111": "PaymasterSerialization",
|
|
1051
|
+
CartridgeControllerNotDeployed: 112, "112": "CartridgeControllerNotDeployed",
|
|
1052
|
+
InsufficientBalance: 113, "113": "InsufficientBalance",
|
|
1053
|
+
OriginError: 114, "114": "OriginError",
|
|
1054
|
+
EncodingError: 115, "115": "EncodingError",
|
|
1055
|
+
SerdeWasmBindgenError: 116, "116": "SerdeWasmBindgenError",
|
|
1056
|
+
CairoSerdeError: 117, "117": "CairoSerdeError",
|
|
1057
|
+
CairoShortStringToFeltError: 118, "118": "CairoShortStringToFeltError",
|
|
1058
|
+
DeviceCreateCredential: 119, "119": "DeviceCreateCredential",
|
|
1059
|
+
DeviceGetAssertion: 120, "120": "DeviceGetAssertion",
|
|
1060
|
+
DeviceBadAssertion: 121, "121": "DeviceBadAssertion",
|
|
1061
|
+
DeviceChannel: 122, "122": "DeviceChannel",
|
|
1062
|
+
DeviceOrigin: 123, "123": "DeviceOrigin",
|
|
1063
|
+
AccountSigning: 124, "124": "AccountSigning",
|
|
1064
|
+
AccountProvider: 125, "125": "AccountProvider",
|
|
1065
|
+
AccountClassHashCalculation: 126, "126": "AccountClassHashCalculation",
|
|
1066
|
+
AccountFeeOutOfRange: 128, "128": "AccountFeeOutOfRange",
|
|
1067
|
+
ProviderRateLimited: 129, "129": "ProviderRateLimited",
|
|
1068
|
+
ProviderArrayLengthMismatch: 130, "130": "ProviderArrayLengthMismatch",
|
|
1069
|
+
ProviderOther: 131, "131": "ProviderOther",
|
|
1070
|
+
SessionAlreadyRegistered: 132, "132": "SessionAlreadyRegistered",
|
|
1071
|
+
UrlParseError: 133, "133": "UrlParseError",
|
|
1072
|
+
Base64DecodeError: 134, "134": "Base64DecodeError",
|
|
1073
|
+
CoseError: 135, "135": "CoseError",
|
|
1074
|
+
PolicyChainIdMismatch: 136, "136": "PolicyChainIdMismatch",
|
|
1075
|
+
InvalidOwner: 137, "137": "InvalidOwner",
|
|
1076
|
+
GasPriceTooHigh: 138, "138": "GasPriceTooHigh",
|
|
1077
|
+
TransactionTimeout: 139, "139": "TransactionTimeout",
|
|
1078
|
+
ConversionError: 140, "140": "ConversionError",
|
|
1079
|
+
InvalidChainId: 141, "141": "InvalidChainId",
|
|
1080
|
+
SessionRefreshRequired: 142, "142": "SessionRefreshRequired",
|
|
1081
|
+
ManualExecutionRequired: 143, "143": "ManualExecutionRequired",
|
|
1082
|
+
ForbiddenEntrypoint: 144, "144": "ForbiddenEntrypoint",
|
|
1083
|
+
GasAmountTooHigh: 145, "145": "GasAmountTooHigh",
|
|
1084
|
+
ApproveExecutionRequired: 146, "146": "ApproveExecutionRequired",
|
|
1085
|
+
});
|
|
1086
|
+
|
|
1151
1087
|
/**
|
|
1152
1088
|
* JavaScript-friendly chain configuration
|
|
1153
1089
|
*/
|
|
1154
1090
|
export class JsChainConfig {
|
|
1155
|
-
|
|
1156
1091
|
static __unwrap(jsValue) {
|
|
1157
1092
|
if (!(jsValue instanceof JsChainConfig)) {
|
|
1158
1093
|
return 0;
|
|
1159
1094
|
}
|
|
1160
1095
|
return jsValue.__destroy_into_raw();
|
|
1161
1096
|
}
|
|
1162
|
-
|
|
1163
1097
|
__destroy_into_raw() {
|
|
1164
1098
|
const ptr = this.__wbg_ptr;
|
|
1165
1099
|
this.__wbg_ptr = 0;
|
|
1166
1100
|
JsChainConfigFinalization.unregister(this);
|
|
1167
1101
|
return ptr;
|
|
1168
1102
|
}
|
|
1169
|
-
|
|
1170
1103
|
free() {
|
|
1171
1104
|
const ptr = this.__destroy_into_raw();
|
|
1172
1105
|
wasm.__wbg_jschainconfig_free(ptr, 0);
|
|
@@ -1228,12 +1161,7 @@ export class JsChainConfig {
|
|
|
1228
1161
|
}
|
|
1229
1162
|
if (Symbol.dispose) JsChainConfig.prototype[Symbol.dispose] = JsChainConfig.prototype.free;
|
|
1230
1163
|
|
|
1231
|
-
const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1232
|
-
? { register: () => {}, unregister: () => {} }
|
|
1233
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
|
|
1234
|
-
|
|
1235
1164
|
export class JsControllerError {
|
|
1236
|
-
|
|
1237
1165
|
static __wrap(ptr) {
|
|
1238
1166
|
ptr = ptr >>> 0;
|
|
1239
1167
|
const obj = Object.create(JsControllerError.prototype);
|
|
@@ -1241,14 +1169,12 @@ export class JsControllerError {
|
|
|
1241
1169
|
JsControllerErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1242
1170
|
return obj;
|
|
1243
1171
|
}
|
|
1244
|
-
|
|
1245
1172
|
__destroy_into_raw() {
|
|
1246
1173
|
const ptr = this.__wbg_ptr;
|
|
1247
1174
|
this.__wbg_ptr = 0;
|
|
1248
1175
|
JsControllerErrorFinalization.unregister(this);
|
|
1249
1176
|
return ptr;
|
|
1250
1177
|
}
|
|
1251
|
-
|
|
1252
1178
|
free() {
|
|
1253
1179
|
const ptr = this.__destroy_into_raw();
|
|
1254
1180
|
wasm.__wbg_jscontrollererror_free(ptr, 0);
|
|
@@ -1323,12 +1249,7 @@ export class JsControllerError {
|
|
|
1323
1249
|
}
|
|
1324
1250
|
if (Symbol.dispose) JsControllerError.prototype[Symbol.dispose] = JsControllerError.prototype.free;
|
|
1325
1251
|
|
|
1326
|
-
const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1327
|
-
? { register: () => {}, unregister: () => {} }
|
|
1328
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
|
|
1329
|
-
|
|
1330
1252
|
export class LoginResult {
|
|
1331
|
-
|
|
1332
1253
|
static __wrap(ptr) {
|
|
1333
1254
|
ptr = ptr >>> 0;
|
|
1334
1255
|
const obj = Object.create(LoginResult.prototype);
|
|
@@ -1336,14 +1257,12 @@ export class LoginResult {
|
|
|
1336
1257
|
LoginResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1337
1258
|
return obj;
|
|
1338
1259
|
}
|
|
1339
|
-
|
|
1340
1260
|
__destroy_into_raw() {
|
|
1341
1261
|
const ptr = this.__wbg_ptr;
|
|
1342
1262
|
this.__wbg_ptr = 0;
|
|
1343
1263
|
LoginResultFinalization.unregister(this);
|
|
1344
1264
|
return ptr;
|
|
1345
1265
|
}
|
|
1346
|
-
|
|
1347
1266
|
free() {
|
|
1348
1267
|
const ptr = this.__destroy_into_raw();
|
|
1349
1268
|
wasm.__wbg_loginresult_free(ptr, 0);
|
|
@@ -1359,14 +1278,10 @@ export class LoginResult {
|
|
|
1359
1278
|
}
|
|
1360
1279
|
if (Symbol.dispose) LoginResult.prototype[Symbol.dispose] = LoginResult.prototype.free;
|
|
1361
1280
|
|
|
1362
|
-
const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1363
|
-
? { register: () => {}, unregister: () => {} }
|
|
1364
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
|
|
1365
1281
|
/**
|
|
1366
1282
|
* WASM bindings for MultiChainController
|
|
1367
1283
|
*/
|
|
1368
1284
|
export class MultiChainAccount {
|
|
1369
|
-
|
|
1370
1285
|
static __wrap(ptr) {
|
|
1371
1286
|
ptr = ptr >>> 0;
|
|
1372
1287
|
const obj = Object.create(MultiChainAccount.prototype);
|
|
@@ -1374,50 +1289,42 @@ export class MultiChainAccount {
|
|
|
1374
1289
|
MultiChainAccountFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1375
1290
|
return obj;
|
|
1376
1291
|
}
|
|
1377
|
-
|
|
1378
1292
|
__destroy_into_raw() {
|
|
1379
1293
|
const ptr = this.__wbg_ptr;
|
|
1380
1294
|
this.__wbg_ptr = 0;
|
|
1381
1295
|
MultiChainAccountFinalization.unregister(this);
|
|
1382
1296
|
return ptr;
|
|
1383
1297
|
}
|
|
1384
|
-
|
|
1385
1298
|
free() {
|
|
1386
1299
|
const ptr = this.__destroy_into_raw();
|
|
1387
1300
|
wasm.__wbg_multichainaccount_free(ptr, 0);
|
|
1388
1301
|
}
|
|
1389
1302
|
/**
|
|
1390
1303
|
* Creates a new MultiChainAccount with multiple chain configurations
|
|
1391
|
-
* @param {string} app_id
|
|
1392
1304
|
* @param {string} username
|
|
1393
1305
|
* @param {JsChainConfig[]} chain_configs
|
|
1394
1306
|
* @param {string} cartridge_api_url
|
|
1395
1307
|
* @returns {Promise<MultiChainAccount>}
|
|
1396
1308
|
*/
|
|
1397
|
-
static create(
|
|
1398
|
-
const ptr0 = passStringToWasm0(
|
|
1309
|
+
static create(username, chain_configs, cartridge_api_url) {
|
|
1310
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1399
1311
|
const len0 = WASM_VECTOR_LEN;
|
|
1400
|
-
const ptr1 =
|
|
1312
|
+
const ptr1 = passArrayJsValueToWasm0(chain_configs, wasm.__wbindgen_export);
|
|
1401
1313
|
const len1 = WASM_VECTOR_LEN;
|
|
1402
|
-
const ptr2 =
|
|
1314
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1403
1315
|
const len2 = WASM_VECTOR_LEN;
|
|
1404
|
-
const
|
|
1405
|
-
const len3 = WASM_VECTOR_LEN;
|
|
1406
|
-
const ret = wasm.multichainaccount_create(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1316
|
+
const ret = wasm.multichainaccount_create(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1407
1317
|
return takeObject(ret);
|
|
1408
1318
|
}
|
|
1409
1319
|
/**
|
|
1410
1320
|
* Loads a MultiChainAccount from storage
|
|
1411
|
-
* @param {string} app_id
|
|
1412
1321
|
* @param {string} cartridge_api_url
|
|
1413
1322
|
* @returns {Promise<MultiChainAccount | undefined>}
|
|
1414
1323
|
*/
|
|
1415
|
-
static fromStorage(
|
|
1416
|
-
const ptr0 = passStringToWasm0(
|
|
1324
|
+
static fromStorage(cartridge_api_url) {
|
|
1325
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1417
1326
|
const len0 = WASM_VECTOR_LEN;
|
|
1418
|
-
const
|
|
1419
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1420
|
-
const ret = wasm.multichainaccount_fromStorage(ptr0, len0, ptr1, len1);
|
|
1327
|
+
const ret = wasm.multichainaccount_fromStorage(ptr0, len0);
|
|
1421
1328
|
return takeObject(ret);
|
|
1422
1329
|
}
|
|
1423
1330
|
/**
|
|
@@ -1452,44 +1359,20 @@ export class MultiChainAccount {
|
|
|
1452
1359
|
}
|
|
1453
1360
|
if (Symbol.dispose) MultiChainAccount.prototype[Symbol.dispose] = MultiChainAccount.prototype.free;
|
|
1454
1361
|
|
|
1455
|
-
const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1456
|
-
? { register: () => {}, unregister: () => {} }
|
|
1457
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
|
|
1458
1362
|
/**
|
|
1459
1363
|
* Metadata for displaying multi-chain information
|
|
1460
1364
|
*/
|
|
1461
1365
|
export class MultiChainAccountMeta {
|
|
1462
|
-
|
|
1463
1366
|
__destroy_into_raw() {
|
|
1464
1367
|
const ptr = this.__wbg_ptr;
|
|
1465
1368
|
this.__wbg_ptr = 0;
|
|
1466
1369
|
MultiChainAccountMetaFinalization.unregister(this);
|
|
1467
1370
|
return ptr;
|
|
1468
1371
|
}
|
|
1469
|
-
|
|
1470
1372
|
free() {
|
|
1471
1373
|
const ptr = this.__destroy_into_raw();
|
|
1472
1374
|
wasm.__wbg_multichainaccountmeta_free(ptr, 0);
|
|
1473
1375
|
}
|
|
1474
|
-
/**
|
|
1475
|
-
* @returns {string}
|
|
1476
|
-
*/
|
|
1477
|
-
get app_id() {
|
|
1478
|
-
let deferred1_0;
|
|
1479
|
-
let deferred1_1;
|
|
1480
|
-
try {
|
|
1481
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1482
|
-
wasm.multichainaccountmeta_app_id(retptr, this.__wbg_ptr);
|
|
1483
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1484
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1485
|
-
deferred1_0 = r0;
|
|
1486
|
-
deferred1_1 = r1;
|
|
1487
|
-
return getStringFromWasm0(r0, r1);
|
|
1488
|
-
} finally {
|
|
1489
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1490
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
1376
|
/**
|
|
1494
1377
|
* @returns {string}
|
|
1495
1378
|
*/
|
|
@@ -1528,7 +1411,75 @@ export class MultiChainAccountMeta {
|
|
|
1528
1411
|
}
|
|
1529
1412
|
if (Symbol.dispose) MultiChainAccountMeta.prototype[Symbol.dispose] = MultiChainAccountMeta.prototype.free;
|
|
1530
1413
|
|
|
1531
|
-
|
|
1414
|
+
/**
|
|
1415
|
+
* Computes the Starknet contract address for a controller account without needing a full instance.
|
|
1416
|
+
*
|
|
1417
|
+
* # Arguments
|
|
1418
|
+
*
|
|
1419
|
+
* * `class_hash` - The class hash of the account contract (JsFelt).
|
|
1420
|
+
* * `owner` - The owner configuration for the account.
|
|
1421
|
+
* * `salt` - The salt used for address calculation (JsFelt).
|
|
1422
|
+
*
|
|
1423
|
+
* # Returns
|
|
1424
|
+
*
|
|
1425
|
+
* The computed Starknet contract address as a `JsFelt`.
|
|
1426
|
+
* @param {JsFelt} class_hash
|
|
1427
|
+
* @param {Owner} owner
|
|
1428
|
+
* @param {JsFelt} salt
|
|
1429
|
+
* @returns {JsFelt}
|
|
1430
|
+
*/
|
|
1431
|
+
export function computeAccountAddress(class_hash, owner, salt) {
|
|
1432
|
+
try {
|
|
1433
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1434
|
+
wasm.computeAccountAddress(retptr, addHeapObject(class_hash), addHeapObject(owner), addHeapObject(salt));
|
|
1435
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1436
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1437
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1438
|
+
if (r2) {
|
|
1439
|
+
throw takeObject(r1);
|
|
1440
|
+
}
|
|
1441
|
+
return takeObject(r0);
|
|
1442
|
+
} finally {
|
|
1443
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* @param {Signer} signer
|
|
1449
|
+
* @returns {JsFelt}
|
|
1450
|
+
*/
|
|
1451
|
+
export function signerToGuid(signer) {
|
|
1452
|
+
try {
|
|
1453
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1454
|
+
wasm.signerToGuid(retptr, addHeapObject(signer));
|
|
1455
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1456
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1457
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1458
|
+
if (r2) {
|
|
1459
|
+
throw takeObject(r1);
|
|
1460
|
+
}
|
|
1461
|
+
return takeObject(r0);
|
|
1462
|
+
} finally {
|
|
1463
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
/**
|
|
1468
|
+
* Subscribes to the creation of a session for a given controller, session_key_guid and cartridge api url.
|
|
1469
|
+
* The goal of this function is to know from any place when the register session flow has been completed, and to
|
|
1470
|
+
* get the authorization.
|
|
1471
|
+
* @param {JsFelt} session_key_guid
|
|
1472
|
+
* @param {string} cartridge_api_url
|
|
1473
|
+
* @returns {Promise<JsSubscribeSessionResult>}
|
|
1474
|
+
*/
|
|
1475
|
+
export function subscribeCreateSession(session_key_guid, cartridge_api_url) {
|
|
1476
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1477
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1478
|
+
const ret = wasm.subscribeCreateSession(addHeapObject(session_key_guid), ptr0, len0);
|
|
1479
|
+
return takeObject(ret);
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
|
|
1532
1483
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1533
1484
|
return addHeapObject(ret);
|
|
1534
1485
|
};
|
|
@@ -1541,13 +1492,13 @@ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
|
1541
1492
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1542
1493
|
};
|
|
1543
1494
|
|
|
1544
|
-
export function
|
|
1495
|
+
export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0) {
|
|
1545
1496
|
const v = getObject(arg0);
|
|
1546
1497
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1547
1498
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1548
1499
|
};
|
|
1549
1500
|
|
|
1550
|
-
export function
|
|
1501
|
+
export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
|
|
1551
1502
|
const ret = debugString(getObject(arg1));
|
|
1552
1503
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1553
1504
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -1555,45 +1506,45 @@ export function __wbg___wbindgen_debug_string_df47ffb5e35e6763(arg0, arg1) {
|
|
|
1555
1506
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1556
1507
|
};
|
|
1557
1508
|
|
|
1558
|
-
export function
|
|
1509
|
+
export function __wbg___wbindgen_in_0d3e1e8f0c669317(arg0, arg1) {
|
|
1559
1510
|
const ret = getObject(arg0) in getObject(arg1);
|
|
1560
1511
|
return ret;
|
|
1561
1512
|
};
|
|
1562
1513
|
|
|
1563
|
-
export function
|
|
1514
|
+
export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
|
|
1564
1515
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
1565
1516
|
return ret;
|
|
1566
1517
|
};
|
|
1567
1518
|
|
|
1568
|
-
export function
|
|
1519
|
+
export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
|
|
1569
1520
|
const val = getObject(arg0);
|
|
1570
1521
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1571
1522
|
return ret;
|
|
1572
1523
|
};
|
|
1573
1524
|
|
|
1574
|
-
export function
|
|
1525
|
+
export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) {
|
|
1575
1526
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
1576
1527
|
return ret;
|
|
1577
1528
|
};
|
|
1578
1529
|
|
|
1579
|
-
export function
|
|
1530
|
+
export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
|
|
1580
1531
|
const ret = getObject(arg0) === undefined;
|
|
1581
1532
|
return ret;
|
|
1582
1533
|
};
|
|
1583
1534
|
|
|
1584
|
-
export function
|
|
1535
|
+
export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0, arg1) {
|
|
1585
1536
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1586
1537
|
return ret;
|
|
1587
1538
|
};
|
|
1588
1539
|
|
|
1589
|
-
export function
|
|
1540
|
+
export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
|
|
1590
1541
|
const obj = getObject(arg1);
|
|
1591
1542
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1592
1543
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1593
1544
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1594
1545
|
};
|
|
1595
1546
|
|
|
1596
|
-
export function
|
|
1547
|
+
export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
|
|
1597
1548
|
const obj = getObject(arg1);
|
|
1598
1549
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1599
1550
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -1602,41 +1553,41 @@ export function __wbg___wbindgen_string_get_e4f06c90489ad01b(arg0, arg1) {
|
|
|
1602
1553
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1603
1554
|
};
|
|
1604
1555
|
|
|
1605
|
-
export function
|
|
1556
|
+
export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
|
|
1606
1557
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1607
1558
|
};
|
|
1608
1559
|
|
|
1609
|
-
export function
|
|
1560
|
+
export function __wbg__wbg_cb_unref_87dfb5aaa0cbcea7(arg0) {
|
|
1610
1561
|
getObject(arg0)._wbg_cb_unref();
|
|
1611
1562
|
};
|
|
1612
1563
|
|
|
1613
|
-
export function
|
|
1614
|
-
getObject(arg0).abort(
|
|
1564
|
+
export function __wbg_abort_07646c894ebbf2bd(arg0) {
|
|
1565
|
+
getObject(arg0).abort();
|
|
1615
1566
|
};
|
|
1616
1567
|
|
|
1617
|
-
export function
|
|
1618
|
-
getObject(arg0).abort();
|
|
1568
|
+
export function __wbg_abort_399ecbcfd6ef3c8e(arg0, arg1) {
|
|
1569
|
+
getObject(arg0).abort(getObject(arg1));
|
|
1619
1570
|
};
|
|
1620
1571
|
|
|
1621
|
-
export function
|
|
1572
|
+
export function __wbg_addEventListener_6a82629b3d430a48() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1622
1573
|
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
1623
1574
|
}, arguments) };
|
|
1624
1575
|
|
|
1625
|
-
export function
|
|
1576
|
+
export function __wbg_append_c5cbdf46455cc776() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1626
1577
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1627
1578
|
}, arguments) };
|
|
1628
1579
|
|
|
1629
|
-
export function
|
|
1580
|
+
export function __wbg_arrayBuffer_c04af4fce566092d() { return handleError(function (arg0) {
|
|
1630
1581
|
const ret = getObject(arg0).arrayBuffer();
|
|
1631
1582
|
return addHeapObject(ret);
|
|
1632
1583
|
}, arguments) };
|
|
1633
1584
|
|
|
1634
|
-
export function
|
|
1585
|
+
export function __wbg_call_3020136f7a2d6e44() { return handleError(function (arg0, arg1, arg2) {
|
|
1635
1586
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1636
1587
|
return addHeapObject(ret);
|
|
1637
1588
|
}, arguments) };
|
|
1638
1589
|
|
|
1639
|
-
export function
|
|
1590
|
+
export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
|
|
1640
1591
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1641
1592
|
return addHeapObject(ret);
|
|
1642
1593
|
}, arguments) };
|
|
@@ -1651,21 +1602,21 @@ export function __wbg_cartridgeaccountwithmeta_new(arg0) {
|
|
|
1651
1602
|
return addHeapObject(ret);
|
|
1652
1603
|
};
|
|
1653
1604
|
|
|
1654
|
-
export function
|
|
1605
|
+
export function __wbg_clearTimeout_b716ecb44bea14ed(arg0) {
|
|
1655
1606
|
const ret = clearTimeout(takeObject(arg0));
|
|
1656
1607
|
return addHeapObject(ret);
|
|
1657
1608
|
};
|
|
1658
1609
|
|
|
1659
|
-
export function
|
|
1610
|
+
export function __wbg_clear_9fc28ed354d59d5e() { return handleError(function (arg0) {
|
|
1660
1611
|
getObject(arg0).clear();
|
|
1661
1612
|
}, arguments) };
|
|
1662
1613
|
|
|
1663
|
-
export function
|
|
1614
|
+
export function __wbg_create_07d71296a0909e61() { return handleError(function (arg0, arg1) {
|
|
1664
1615
|
const ret = getObject(arg0).create(getObject(arg1));
|
|
1665
1616
|
return addHeapObject(ret);
|
|
1666
1617
|
}, arguments) };
|
|
1667
1618
|
|
|
1668
|
-
export function
|
|
1619
|
+
export function __wbg_credentials_36e0572b476d4883(arg0) {
|
|
1669
1620
|
const ret = getObject(arg0).credentials;
|
|
1670
1621
|
return addHeapObject(ret);
|
|
1671
1622
|
};
|
|
@@ -1675,41 +1626,41 @@ export function __wbg_crypto_574e78ad8b13b65f(arg0) {
|
|
|
1675
1626
|
return addHeapObject(ret);
|
|
1676
1627
|
};
|
|
1677
1628
|
|
|
1678
|
-
export function
|
|
1629
|
+
export function __wbg_data_8bf4ae669a78a688(arg0) {
|
|
1679
1630
|
const ret = getObject(arg0).data;
|
|
1680
1631
|
return addHeapObject(ret);
|
|
1681
1632
|
};
|
|
1682
1633
|
|
|
1683
|
-
export function
|
|
1634
|
+
export function __wbg_done_62ea16af4ce34b24(arg0) {
|
|
1684
1635
|
const ret = getObject(arg0).done;
|
|
1685
1636
|
return ret;
|
|
1686
1637
|
};
|
|
1687
1638
|
|
|
1688
|
-
export function
|
|
1639
|
+
export function __wbg_error_7bc7d576a6aaf855(arg0) {
|
|
1689
1640
|
console.error(getObject(arg0));
|
|
1690
1641
|
};
|
|
1691
1642
|
|
|
1692
|
-
export function
|
|
1643
|
+
export function __wbg_fetch_7fb7602a1bf647ec(arg0) {
|
|
1693
1644
|
const ret = fetch(getObject(arg0));
|
|
1694
1645
|
return addHeapObject(ret);
|
|
1695
1646
|
};
|
|
1696
1647
|
|
|
1697
|
-
export function
|
|
1698
|
-
const ret = fetch(getObject(
|
|
1648
|
+
export function __wbg_fetch_90447c28cc0b095e(arg0, arg1) {
|
|
1649
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1699
1650
|
return addHeapObject(ret);
|
|
1700
1651
|
};
|
|
1701
1652
|
|
|
1702
|
-
export function
|
|
1703
|
-
const ret =
|
|
1653
|
+
export function __wbg_fetch_f1856afdb49415d1(arg0) {
|
|
1654
|
+
const ret = fetch(getObject(arg0));
|
|
1704
1655
|
return addHeapObject(ret);
|
|
1705
1656
|
};
|
|
1706
1657
|
|
|
1707
|
-
export function
|
|
1658
|
+
export function __wbg_getClientExtensionResults_8668622b21a5eef7(arg0) {
|
|
1708
1659
|
const ret = getObject(arg0).getClientExtensionResults();
|
|
1709
1660
|
return addHeapObject(ret);
|
|
1710
1661
|
};
|
|
1711
1662
|
|
|
1712
|
-
export function
|
|
1663
|
+
export function __wbg_getItem_1340bfc9a10d5991() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1713
1664
|
const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
|
|
1714
1665
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1715
1666
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -1721,17 +1672,17 @@ export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(fu
|
|
|
1721
1672
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1722
1673
|
}, arguments) };
|
|
1723
1674
|
|
|
1724
|
-
export function
|
|
1675
|
+
export function __wbg_getTime_ad1e9878a735af08(arg0) {
|
|
1725
1676
|
const ret = getObject(arg0).getTime();
|
|
1726
1677
|
return ret;
|
|
1727
1678
|
};
|
|
1728
1679
|
|
|
1729
|
-
export function
|
|
1680
|
+
export function __wbg_get_29726a9b608aea28() { return handleError(function (arg0, arg1) {
|
|
1730
1681
|
const ret = getObject(arg0).get(getObject(arg1));
|
|
1731
1682
|
return addHeapObject(ret);
|
|
1732
1683
|
}, arguments) };
|
|
1733
1684
|
|
|
1734
|
-
export function
|
|
1685
|
+
export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
|
|
1735
1686
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1736
1687
|
return addHeapObject(ret);
|
|
1737
1688
|
}, arguments) };
|
|
@@ -1741,17 +1692,17 @@ export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
|
|
|
1741
1692
|
return addHeapObject(ret);
|
|
1742
1693
|
};
|
|
1743
1694
|
|
|
1744
|
-
export function
|
|
1695
|
+
export function __wbg_has_0e670569d65d3a45() { return handleError(function (arg0, arg1) {
|
|
1745
1696
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1746
1697
|
return ret;
|
|
1747
1698
|
}, arguments) };
|
|
1748
1699
|
|
|
1749
|
-
export function
|
|
1700
|
+
export function __wbg_headers_654c30e1bcccc552(arg0) {
|
|
1750
1701
|
const ret = getObject(arg0).headers;
|
|
1751
1702
|
return addHeapObject(ret);
|
|
1752
1703
|
};
|
|
1753
1704
|
|
|
1754
|
-
export function
|
|
1705
|
+
export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
|
|
1755
1706
|
let result;
|
|
1756
1707
|
try {
|
|
1757
1708
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -1762,7 +1713,7 @@ export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
|
|
|
1762
1713
|
return ret;
|
|
1763
1714
|
};
|
|
1764
1715
|
|
|
1765
|
-
export function
|
|
1716
|
+
export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
|
|
1766
1717
|
let result;
|
|
1767
1718
|
try {
|
|
1768
1719
|
result = getObject(arg0) instanceof Object;
|
|
@@ -1773,7 +1724,7 @@ export function __wbg_instanceof_Object_10bb762262230c68(arg0) {
|
|
|
1773
1724
|
return ret;
|
|
1774
1725
|
};
|
|
1775
1726
|
|
|
1776
|
-
export function
|
|
1727
|
+
export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
|
|
1777
1728
|
let result;
|
|
1778
1729
|
try {
|
|
1779
1730
|
result = getObject(arg0) instanceof Response;
|
|
@@ -1784,7 +1735,7 @@ export function __wbg_instanceof_Response_f4f3e87e07f3135c(arg0) {
|
|
|
1784
1735
|
return ret;
|
|
1785
1736
|
};
|
|
1786
1737
|
|
|
1787
|
-
export function
|
|
1738
|
+
export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
|
|
1788
1739
|
let result;
|
|
1789
1740
|
try {
|
|
1790
1741
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -1795,7 +1746,7 @@ export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
|
|
|
1795
1746
|
return ret;
|
|
1796
1747
|
};
|
|
1797
1748
|
|
|
1798
|
-
export function
|
|
1749
|
+
export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
|
|
1799
1750
|
let result;
|
|
1800
1751
|
try {
|
|
1801
1752
|
result = getObject(arg0) instanceof Window;
|
|
@@ -1806,7 +1757,7 @@ export function __wbg_instanceof_Window_4846dbb3de56c84c(arg0) {
|
|
|
1806
1757
|
return ret;
|
|
1807
1758
|
};
|
|
1808
1759
|
|
|
1809
|
-
export function
|
|
1760
|
+
export function __wbg_instanceof_WorkerGlobalScope_9a3411db21c65a54(arg0) {
|
|
1810
1761
|
let result;
|
|
1811
1762
|
try {
|
|
1812
1763
|
result = getObject(arg0) instanceof WorkerGlobalScope;
|
|
@@ -1817,13 +1768,13 @@ export function __wbg_instanceof_WorkerGlobalScope_e31f49b6d33fcadd(arg0) {
|
|
|
1817
1768
|
return ret;
|
|
1818
1769
|
};
|
|
1819
1770
|
|
|
1820
|
-
export function
|
|
1771
|
+
export function __wbg_iterator_27b7c8b35ab3e86b() {
|
|
1821
1772
|
const ret = Symbol.iterator;
|
|
1822
1773
|
return addHeapObject(ret);
|
|
1823
1774
|
};
|
|
1824
1775
|
|
|
1825
1776
|
export function __wbg_jschainconfig_unwrap(arg0) {
|
|
1826
|
-
const ret = JsChainConfig.__unwrap(
|
|
1777
|
+
const ret = JsChainConfig.__unwrap(getObject(arg0));
|
|
1827
1778
|
return ret;
|
|
1828
1779
|
};
|
|
1829
1780
|
|
|
@@ -1832,22 +1783,22 @@ export function __wbg_jscontrollererror_new(arg0) {
|
|
|
1832
1783
|
return addHeapObject(ret);
|
|
1833
1784
|
};
|
|
1834
1785
|
|
|
1835
|
-
export function
|
|
1786
|
+
export function __wbg_length_22ac23eaec9d8053(arg0) {
|
|
1836
1787
|
const ret = getObject(arg0).length;
|
|
1837
1788
|
return ret;
|
|
1838
1789
|
};
|
|
1839
1790
|
|
|
1840
|
-
export function
|
|
1791
|
+
export function __wbg_localStorage_e7a9e9fee8fc608d() { return handleError(function (arg0) {
|
|
1841
1792
|
const ret = getObject(arg0).localStorage;
|
|
1842
1793
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1843
1794
|
}, arguments) };
|
|
1844
1795
|
|
|
1845
|
-
export function
|
|
1796
|
+
export function __wbg_location_962e75c1c1b3ebed(arg0) {
|
|
1846
1797
|
const ret = getObject(arg0).location;
|
|
1847
1798
|
return addHeapObject(ret);
|
|
1848
1799
|
};
|
|
1849
1800
|
|
|
1850
|
-
export function
|
|
1801
|
+
export function __wbg_log_1d990106d99dacb7(arg0) {
|
|
1851
1802
|
console.log(getObject(arg0));
|
|
1852
1803
|
};
|
|
1853
1804
|
|
|
@@ -1866,39 +1817,59 @@ export function __wbg_multichainaccount_new(arg0) {
|
|
|
1866
1817
|
return addHeapObject(ret);
|
|
1867
1818
|
};
|
|
1868
1819
|
|
|
1869
|
-
export function
|
|
1820
|
+
export function __wbg_navigator_b49edef831236138(arg0) {
|
|
1870
1821
|
const ret = getObject(arg0).navigator;
|
|
1871
1822
|
return addHeapObject(ret);
|
|
1872
1823
|
};
|
|
1873
1824
|
|
|
1874
|
-
export function
|
|
1825
|
+
export function __wbg_new_0_23cedd11d9b40c9d() {
|
|
1875
1826
|
const ret = new Date();
|
|
1876
1827
|
return addHeapObject(ret);
|
|
1877
1828
|
};
|
|
1878
1829
|
|
|
1879
|
-
export function
|
|
1830
|
+
export function __wbg_new_1ba21ce319a06297() {
|
|
1880
1831
|
const ret = new Object();
|
|
1881
1832
|
return addHeapObject(ret);
|
|
1882
1833
|
};
|
|
1883
1834
|
|
|
1884
|
-
export function
|
|
1885
|
-
const ret = new
|
|
1835
|
+
export function __wbg_new_25f239778d6112b9() {
|
|
1836
|
+
const ret = new Array();
|
|
1886
1837
|
return addHeapObject(ret);
|
|
1887
|
-
}
|
|
1838
|
+
};
|
|
1888
1839
|
|
|
1889
1840
|
export function __wbg_new_2658d63118834d8e() {
|
|
1890
1841
|
const ret = new Mutex();
|
|
1891
1842
|
return addHeapObject(ret);
|
|
1892
1843
|
};
|
|
1893
1844
|
|
|
1894
|
-
export function
|
|
1845
|
+
export function __wbg_new_3c79b3bb1b32b7d3() { return handleError(function () {
|
|
1846
|
+
const ret = new Headers();
|
|
1847
|
+
return addHeapObject(ret);
|
|
1848
|
+
}, arguments) };
|
|
1849
|
+
|
|
1850
|
+
export function __wbg_new_6421f6084cc5bc5a(arg0) {
|
|
1851
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1852
|
+
return addHeapObject(ret);
|
|
1853
|
+
};
|
|
1854
|
+
|
|
1855
|
+
export function __wbg_new_881a222c65f168fc() { return handleError(function () {
|
|
1856
|
+
const ret = new AbortController();
|
|
1857
|
+
return addHeapObject(ret);
|
|
1858
|
+
}, arguments) };
|
|
1859
|
+
|
|
1860
|
+
export function __wbg_new_b546ae120718850e() {
|
|
1861
|
+
const ret = new Map();
|
|
1862
|
+
return addHeapObject(ret);
|
|
1863
|
+
};
|
|
1864
|
+
|
|
1865
|
+
export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
|
|
1895
1866
|
try {
|
|
1896
1867
|
var state0 = {a: arg0, b: arg1};
|
|
1897
1868
|
var cb0 = (arg0, arg1) => {
|
|
1898
1869
|
const a = state0.a;
|
|
1899
1870
|
state0.a = 0;
|
|
1900
1871
|
try {
|
|
1901
|
-
return
|
|
1872
|
+
return __wasm_bindgen_func_elem_10966(a, state0.b, arg0, arg1);
|
|
1902
1873
|
} finally {
|
|
1903
1874
|
state0.a = a;
|
|
1904
1875
|
}
|
|
@@ -1910,62 +1881,42 @@ export function __wbg_new_3c3d849046688a66(arg0, arg1) {
|
|
|
1910
1881
|
}
|
|
1911
1882
|
};
|
|
1912
1883
|
|
|
1913
|
-
export function
|
|
1914
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1915
|
-
return addHeapObject(ret);
|
|
1916
|
-
};
|
|
1917
|
-
|
|
1918
|
-
export function __wbg_new_68651c719dcda04e() {
|
|
1919
|
-
const ret = new Map();
|
|
1920
|
-
return addHeapObject(ret);
|
|
1921
|
-
};
|
|
1922
|
-
|
|
1923
|
-
export function __wbg_new_9edf9838a2def39c() { return handleError(function () {
|
|
1924
|
-
const ret = new Headers();
|
|
1925
|
-
return addHeapObject(ret);
|
|
1926
|
-
}, arguments) };
|
|
1927
|
-
|
|
1928
|
-
export function __wbg_new_e17d9f43105b08be() {
|
|
1929
|
-
const ret = new Array();
|
|
1930
|
-
return addHeapObject(ret);
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
export function __wbg_new_from_slice_92f4d78ca282a2d2(arg0, arg1) {
|
|
1884
|
+
export function __wbg_new_from_slice_f9c22b9153b26992(arg0, arg1) {
|
|
1934
1885
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1935
1886
|
return addHeapObject(ret);
|
|
1936
1887
|
};
|
|
1937
1888
|
|
|
1938
|
-
export function
|
|
1889
|
+
export function __wbg_new_no_args_cb138f77cf6151ee(arg0, arg1) {
|
|
1939
1890
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1940
1891
|
return addHeapObject(ret);
|
|
1941
1892
|
};
|
|
1942
1893
|
|
|
1943
|
-
export function
|
|
1894
|
+
export function __wbg_new_with_length_aa5eaf41d35235e5(arg0) {
|
|
1944
1895
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1945
1896
|
return addHeapObject(ret);
|
|
1946
1897
|
};
|
|
1947
1898
|
|
|
1948
|
-
export function
|
|
1899
|
+
export function __wbg_new_with_str_and_init_c5748f76f5108934() { return handleError(function (arg0, arg1, arg2) {
|
|
1949
1900
|
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1950
1901
|
return addHeapObject(ret);
|
|
1951
1902
|
}, arguments) };
|
|
1952
1903
|
|
|
1953
|
-
export function
|
|
1954
|
-
const ret = getObject(arg0).next();
|
|
1955
|
-
return addHeapObject(ret);
|
|
1956
|
-
}, arguments) };
|
|
1957
|
-
|
|
1958
|
-
export function __wbg_next_2c826fe5dfec6b6a(arg0) {
|
|
1904
|
+
export function __wbg_next_138a17bbf04e926c(arg0) {
|
|
1959
1905
|
const ret = getObject(arg0).next;
|
|
1960
1906
|
return addHeapObject(ret);
|
|
1961
1907
|
};
|
|
1962
1908
|
|
|
1909
|
+
export function __wbg_next_3cfe5c0fe2a4cc53() { return handleError(function (arg0) {
|
|
1910
|
+
const ret = getObject(arg0).next();
|
|
1911
|
+
return addHeapObject(ret);
|
|
1912
|
+
}, arguments) };
|
|
1913
|
+
|
|
1963
1914
|
export function __wbg_node_905d3e251edff8a2(arg0) {
|
|
1964
1915
|
const ret = getObject(arg0).node;
|
|
1965
1916
|
return addHeapObject(ret);
|
|
1966
1917
|
};
|
|
1967
1918
|
|
|
1968
|
-
export function
|
|
1919
|
+
export function __wbg_now_69d776cd24f5215b() {
|
|
1969
1920
|
const ret = Date.now();
|
|
1970
1921
|
return ret;
|
|
1971
1922
|
};
|
|
@@ -1975,28 +1926,28 @@ export function __wbg_obtain_a9626b3b96e6dc2c(arg0) {
|
|
|
1975
1926
|
return addHeapObject(ret);
|
|
1976
1927
|
};
|
|
1977
1928
|
|
|
1978
|
-
export function
|
|
1929
|
+
export function __wbg_open_1611d5d1a9d8cf79() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1979
1930
|
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6));
|
|
1980
1931
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1981
1932
|
}, arguments) };
|
|
1982
1933
|
|
|
1983
|
-
export function
|
|
1934
|
+
export function __wbg_origin_4ab782e7fd21eede(arg0, arg1) {
|
|
1984
1935
|
const ret = getObject(arg1).origin;
|
|
1985
1936
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1986
1937
|
const len1 = WASM_VECTOR_LEN;
|
|
1987
1938
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1988
1939
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1989
|
-
}
|
|
1940
|
+
};
|
|
1990
1941
|
|
|
1991
|
-
export function
|
|
1942
|
+
export function __wbg_origin_c4ac149104b9ebad() { return handleError(function (arg0, arg1) {
|
|
1992
1943
|
const ret = getObject(arg1).origin;
|
|
1993
1944
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1994
1945
|
const len1 = WASM_VECTOR_LEN;
|
|
1995
1946
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1996
1947
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1997
|
-
};
|
|
1948
|
+
}, arguments) };
|
|
1998
1949
|
|
|
1999
|
-
export function
|
|
1950
|
+
export function __wbg_parse_7ff95c018af680b3(arg0, arg1) {
|
|
2000
1951
|
let deferred0_0;
|
|
2001
1952
|
let deferred0_1;
|
|
2002
1953
|
try {
|
|
@@ -2014,21 +1965,21 @@ export function __wbg_process_dc0fbacc7c1c06f7(arg0) {
|
|
|
2014
1965
|
return addHeapObject(ret);
|
|
2015
1966
|
};
|
|
2016
1967
|
|
|
2017
|
-
export function
|
|
1968
|
+
export function __wbg_prototypesetcall_dfe9b766cdc1f1fd(arg0, arg1, arg2) {
|
|
2018
1969
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
2019
1970
|
};
|
|
2020
1971
|
|
|
2021
|
-
export function
|
|
1972
|
+
export function __wbg_push_7d9be8f38fc13975(arg0, arg1) {
|
|
2022
1973
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
2023
1974
|
return ret;
|
|
2024
1975
|
};
|
|
2025
1976
|
|
|
2026
|
-
export function
|
|
1977
|
+
export function __wbg_queueMicrotask_9b549dfce8865860(arg0) {
|
|
2027
1978
|
const ret = getObject(arg0).queueMicrotask;
|
|
2028
1979
|
return addHeapObject(ret);
|
|
2029
1980
|
};
|
|
2030
1981
|
|
|
2031
|
-
export function
|
|
1982
|
+
export function __wbg_queueMicrotask_fca69f5bfad613a5(arg0) {
|
|
2032
1983
|
queueMicrotask(getObject(arg0));
|
|
2033
1984
|
};
|
|
2034
1985
|
|
|
@@ -2036,11 +1987,11 @@ export function __wbg_randomFillSync_ac0988aba3254290() { return handleError(fun
|
|
|
2036
1987
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
2037
1988
|
}, arguments) };
|
|
2038
1989
|
|
|
2039
|
-
export function
|
|
1990
|
+
export function __wbg_removeEventListener_565e273024b68b75() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2040
1991
|
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
2041
1992
|
}, arguments) };
|
|
2042
1993
|
|
|
2043
|
-
export function
|
|
1994
|
+
export function __wbg_removeItem_33ed1aeb2dc68e96() { return handleError(function (arg0, arg1, arg2) {
|
|
2044
1995
|
getObject(arg0).removeItem(getStringFromWasm0(arg1, arg2));
|
|
2045
1996
|
}, arguments) };
|
|
2046
1997
|
|
|
@@ -2049,30 +2000,30 @@ export function __wbg_require_60cc747a6bc5215a() { return handleError(function (
|
|
|
2049
2000
|
return addHeapObject(ret);
|
|
2050
2001
|
}, arguments) };
|
|
2051
2002
|
|
|
2052
|
-
export function
|
|
2003
|
+
export function __wbg_resolve_fd5bfbaa4ce36e1e(arg0) {
|
|
2053
2004
|
const ret = Promise.resolve(getObject(arg0));
|
|
2054
2005
|
return addHeapObject(ret);
|
|
2055
2006
|
};
|
|
2056
2007
|
|
|
2057
|
-
export function
|
|
2008
|
+
export function __wbg_setItem_1167ad38996d6426() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2058
2009
|
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2059
2010
|
}, arguments) };
|
|
2060
2011
|
|
|
2061
|
-
export function
|
|
2012
|
+
export function __wbg_setTimeout_06477c23d31efef1() { return handleError(function (arg0, arg1, arg2) {
|
|
2062
2013
|
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2063
2014
|
return ret;
|
|
2064
2015
|
}, arguments) };
|
|
2065
2016
|
|
|
2066
|
-
export function
|
|
2067
|
-
const ret = setTimeout(getObject(arg0), arg1);
|
|
2068
|
-
return addHeapObject(ret);
|
|
2069
|
-
};
|
|
2070
|
-
|
|
2071
|
-
export function __wbg_setTimeout_d673afe2a3649259() { return handleError(function (arg0, arg1, arg2) {
|
|
2017
|
+
export function __wbg_setTimeout_425032fd8860bd1e() { return handleError(function (arg0, arg1, arg2) {
|
|
2072
2018
|
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2073
2019
|
return ret;
|
|
2074
2020
|
}, arguments) };
|
|
2075
2021
|
|
|
2022
|
+
export function __wbg_setTimeout_4302406184dcc5be(arg0, arg1) {
|
|
2023
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
2024
|
+
return addHeapObject(ret);
|
|
2025
|
+
};
|
|
2026
|
+
|
|
2076
2027
|
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
2077
2028
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
2078
2029
|
};
|
|
@@ -2081,45 +2032,45 @@ export function __wbg_set_3fda3bac07393de4(arg0, arg1, arg2) {
|
|
|
2081
2032
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
2082
2033
|
};
|
|
2083
2034
|
|
|
2084
|
-
export function
|
|
2085
|
-
const ret = getObject(arg0)
|
|
2086
|
-
return
|
|
2087
|
-
};
|
|
2088
|
-
|
|
2089
|
-
export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
|
|
2090
|
-
getObject(arg0).body = getObject(arg1);
|
|
2091
|
-
};
|
|
2035
|
+
export function __wbg_set_781438a03c0c3c81() { return handleError(function (arg0, arg1, arg2) {
|
|
2036
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
2037
|
+
return ret;
|
|
2038
|
+
}, arguments) };
|
|
2092
2039
|
|
|
2093
|
-
export function
|
|
2040
|
+
export function __wbg_set_7df433eea03a5c14(arg0, arg1, arg2) {
|
|
2094
2041
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
2095
2042
|
};
|
|
2096
2043
|
|
|
2097
|
-
export function
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
}, arguments) };
|
|
2044
|
+
export function __wbg_set_body_8e743242d6076a4f(arg0, arg1) {
|
|
2045
|
+
getObject(arg0).body = getObject(arg1);
|
|
2046
|
+
};
|
|
2101
2047
|
|
|
2102
|
-
export function
|
|
2048
|
+
export function __wbg_set_cache_0e437c7c8e838b9b(arg0, arg1) {
|
|
2103
2049
|
getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
|
|
2104
2050
|
};
|
|
2105
2051
|
|
|
2106
|
-
export function
|
|
2052
|
+
export function __wbg_set_credentials_55ae7c3c106fd5be(arg0, arg1) {
|
|
2107
2053
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
2108
2054
|
};
|
|
2109
2055
|
|
|
2110
|
-
export function
|
|
2056
|
+
export function __wbg_set_efaaf145b9377369(arg0, arg1, arg2) {
|
|
2057
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
2058
|
+
return addHeapObject(ret);
|
|
2059
|
+
};
|
|
2060
|
+
|
|
2061
|
+
export function __wbg_set_headers_5671cf088e114d2b(arg0, arg1) {
|
|
2111
2062
|
getObject(arg0).headers = getObject(arg1);
|
|
2112
2063
|
};
|
|
2113
2064
|
|
|
2114
|
-
export function
|
|
2065
|
+
export function __wbg_set_method_76c69e41b3570627(arg0, arg1, arg2) {
|
|
2115
2066
|
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
2116
2067
|
};
|
|
2117
2068
|
|
|
2118
|
-
export function
|
|
2069
|
+
export function __wbg_set_mode_611016a6818fc690(arg0, arg1) {
|
|
2119
2070
|
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
2120
2071
|
};
|
|
2121
2072
|
|
|
2122
|
-
export function
|
|
2073
|
+
export function __wbg_set_signal_e89be862d0091009(arg0, arg1) {
|
|
2123
2074
|
getObject(arg0).signal = getObject(arg1);
|
|
2124
2075
|
};
|
|
2125
2076
|
|
|
@@ -2141,37 +2092,37 @@ export function __wbg_signMessage_c732ea9d998cac79() { return handleError(functi
|
|
|
2141
2092
|
}
|
|
2142
2093
|
}, arguments) };
|
|
2143
2094
|
|
|
2144
|
-
export function
|
|
2095
|
+
export function __wbg_signal_3c14fbdc89694b39(arg0) {
|
|
2145
2096
|
const ret = getObject(arg0).signal;
|
|
2146
2097
|
return addHeapObject(ret);
|
|
2147
2098
|
};
|
|
2148
2099
|
|
|
2149
|
-
export function
|
|
2100
|
+
export function __wbg_static_accessor_GLOBAL_769e6b65d6557335() {
|
|
2150
2101
|
const ret = typeof global === 'undefined' ? null : global;
|
|
2151
2102
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2152
2103
|
};
|
|
2153
2104
|
|
|
2154
|
-
export function
|
|
2105
|
+
export function __wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1() {
|
|
2155
2106
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2156
2107
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2157
2108
|
};
|
|
2158
2109
|
|
|
2159
|
-
export function
|
|
2110
|
+
export function __wbg_static_accessor_SELF_08f5a74c69739274() {
|
|
2160
2111
|
const ret = typeof self === 'undefined' ? null : self;
|
|
2161
2112
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2162
2113
|
};
|
|
2163
2114
|
|
|
2164
|
-
export function
|
|
2115
|
+
export function __wbg_static_accessor_WINDOW_a8924b26aa92d024() {
|
|
2165
2116
|
const ret = typeof window === 'undefined' ? null : window;
|
|
2166
2117
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2167
2118
|
};
|
|
2168
2119
|
|
|
2169
|
-
export function
|
|
2120
|
+
export function __wbg_status_9bfc680efca4bdfd(arg0) {
|
|
2170
2121
|
const ret = getObject(arg0).status;
|
|
2171
2122
|
return ret;
|
|
2172
2123
|
};
|
|
2173
2124
|
|
|
2174
|
-
export function
|
|
2125
|
+
export function __wbg_stringify_56d3c6664110414f(arg0, arg1) {
|
|
2175
2126
|
const ret = JSON.stringify(getObject(arg1));
|
|
2176
2127
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2177
2128
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -2179,32 +2130,32 @@ export function __wbg_stringify_404baa47f2ce77aa(arg0, arg1) {
|
|
|
2179
2130
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2180
2131
|
};
|
|
2181
2132
|
|
|
2182
|
-
export function
|
|
2133
|
+
export function __wbg_stringify_655a6390e1f5eb6b() { return handleError(function (arg0) {
|
|
2183
2134
|
const ret = JSON.stringify(getObject(arg0));
|
|
2184
2135
|
return addHeapObject(ret);
|
|
2185
2136
|
}, arguments) };
|
|
2186
2137
|
|
|
2187
|
-
export function
|
|
2138
|
+
export function __wbg_subarray_845f2f5bce7d061a(arg0, arg1, arg2) {
|
|
2188
2139
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2189
2140
|
return addHeapObject(ret);
|
|
2190
2141
|
};
|
|
2191
2142
|
|
|
2192
|
-
export function
|
|
2143
|
+
export function __wbg_text_51046bb33d257f63() { return handleError(function (arg0) {
|
|
2193
2144
|
const ret = getObject(arg0).text();
|
|
2194
2145
|
return addHeapObject(ret);
|
|
2195
2146
|
}, arguments) };
|
|
2196
2147
|
|
|
2197
|
-
export function
|
|
2198
|
-
const ret = getObject(arg0).then(getObject(arg1));
|
|
2148
|
+
export function __wbg_then_429f7caf1026411d(arg0, arg1, arg2) {
|
|
2149
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
2199
2150
|
return addHeapObject(ret);
|
|
2200
2151
|
};
|
|
2201
2152
|
|
|
2202
|
-
export function
|
|
2203
|
-
const ret = getObject(arg0).then(getObject(arg1)
|
|
2153
|
+
export function __wbg_then_4f95312d68691235(arg0, arg1) {
|
|
2154
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
2204
2155
|
return addHeapObject(ret);
|
|
2205
2156
|
};
|
|
2206
2157
|
|
|
2207
|
-
export function
|
|
2158
|
+
export function __wbg_url_b6d11838a4f95198(arg0, arg1) {
|
|
2208
2159
|
const ret = getObject(arg1).url;
|
|
2209
2160
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2210
2161
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -2212,7 +2163,7 @@ export function __wbg_url_b36d2a5008eb056f(arg0, arg1) {
|
|
|
2212
2163
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2213
2164
|
};
|
|
2214
2165
|
|
|
2215
|
-
export function
|
|
2166
|
+
export function __wbg_userAgent_e18bc0cc9ad38ec1() { return handleError(function (arg0, arg1) {
|
|
2216
2167
|
const ret = getObject(arg1).userAgent;
|
|
2217
2168
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2218
2169
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -2220,7 +2171,7 @@ export function __wbg_userAgent_b20949aa6be940a6() { return handleError(function
|
|
|
2220
2171
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2221
2172
|
}, arguments) };
|
|
2222
2173
|
|
|
2223
|
-
export function
|
|
2174
|
+
export function __wbg_value_57b7b035e117f7ee(arg0) {
|
|
2224
2175
|
const ret = getObject(arg0).value;
|
|
2225
2176
|
return addHeapObject(ret);
|
|
2226
2177
|
};
|
|
@@ -2230,6 +2181,12 @@ export function __wbg_versions_c01dfd4722a88165(arg0) {
|
|
|
2230
2181
|
return addHeapObject(ret);
|
|
2231
2182
|
};
|
|
2232
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
|
+
|
|
2233
2190
|
export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
2234
2191
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2235
2192
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -2238,13 +2195,13 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
|
2238
2195
|
|
|
2239
2196
|
export function __wbindgen_cast_4082834687a71a5d(arg0, arg1) {
|
|
2240
2197
|
// 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`.
|
|
2241
|
-
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_225,
|
|
2198
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_225, __wasm_bindgen_func_elem_3187);
|
|
2242
2199
|
return addHeapObject(ret);
|
|
2243
2200
|
};
|
|
2244
2201
|
|
|
2245
|
-
export function
|
|
2246
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2247
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2202
|
+
export function __wbindgen_cast_74f525bc4433b335(arg0, arg1) {
|
|
2203
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1003, function: Function { arguments: [Externref], shim_idx: 1004, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2204
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8842, __wasm_bindgen_func_elem_8857);
|
|
2248
2205
|
return addHeapObject(ret);
|
|
2249
2206
|
};
|
|
2250
2207
|
|
|
@@ -2266,12 +2223,6 @@ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
|
|
|
2266
2223
|
return addHeapObject(ret);
|
|
2267
2224
|
};
|
|
2268
2225
|
|
|
2269
|
-
export function __wbindgen_cast_f8c41a10414abe07(arg0, arg1) {
|
|
2270
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 968, function: Function { arguments: [], shim_idx: 969, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2271
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8690, __wasm_bindgen_func_elem_8699);
|
|
2272
|
-
return addHeapObject(ret);
|
|
2273
|
-
};
|
|
2274
|
-
|
|
2275
2226
|
export function __wbindgen_object_clone_ref(arg0) {
|
|
2276
2227
|
const ret = getObject(arg0);
|
|
2277
2228
|
return addHeapObject(ret);
|
|
@@ -2280,4 +2231,3 @@ export function __wbindgen_object_clone_ref(arg0) {
|
|
|
2280
2231
|
export function __wbindgen_object_drop_ref(arg0) {
|
|
2281
2232
|
takeObject(arg0);
|
|
2282
2233
|
};
|
|
2283
|
-
|