@cartridge/controller-wasm 0.8.0 → 0.9.1
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 +207 -223
- package/pkg-controller/account_wasm_bg.js +735 -762
- package/pkg-controller/account_wasm_bg.wasm +0 -0
- package/pkg-session/session_wasm.d.ts +138 -133
- package/pkg-session/session_wasm_bg.js +382 -396
- 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
|
-
|
|
253
|
+
function takeObject(idx) {
|
|
254
|
+
const ret = getObject(idx);
|
|
255
|
+
dropObject(idx);
|
|
256
|
+
return ret;
|
|
257
|
+
}
|
|
258
|
+
|
|
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;
|
|
315
269
|
}
|
|
270
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
316
271
|
}
|
|
317
272
|
|
|
318
|
-
|
|
319
|
-
ptr = ptr >>> 0;
|
|
320
|
-
const mem = getDataViewMemory0();
|
|
321
|
-
const result = [];
|
|
322
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
323
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
|
324
|
-
}
|
|
325
|
-
return result;
|
|
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);
|
|
340
|
-
}
|
|
273
|
+
const cachedTextEncoder = new TextEncoder();
|
|
341
274
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
351
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
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);
|
|
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_3186(arg0, arg1, addHeapObject(arg2));
|
|
364
|
-
}
|
|
286
|
+
let WASM_VECTOR_LEN = 0;
|
|
365
287
|
|
|
366
|
-
function
|
|
367
|
-
wasm.
|
|
288
|
+
function __wasm_bindgen_func_elem_8624(arg0, arg1) {
|
|
289
|
+
wasm.__wasm_bindgen_func_elem_8624(arg0, arg1);
|
|
368
290
|
}
|
|
369
291
|
|
|
370
|
-
function
|
|
371
|
-
wasm.
|
|
292
|
+
function __wasm_bindgen_func_elem_8774(arg0, arg1, arg2) {
|
|
293
|
+
wasm.__wasm_bindgen_func_elem_8774(arg0, arg1, addHeapObject(arg2));
|
|
372
294
|
}
|
|
373
295
|
|
|
374
|
-
function
|
|
375
|
-
wasm.
|
|
296
|
+
function __wasm_bindgen_func_elem_3270(arg0, arg1, arg2) {
|
|
297
|
+
wasm.__wasm_bindgen_func_elem_3270(arg0, arg1, addHeapObject(arg2));
|
|
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_10868(arg0, arg1, arg2, arg3) {
|
|
301
|
+
wasm.__wasm_bindgen_func_elem_10868(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));
|
|
468
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));
|
|
345
|
+
|
|
346
|
+
export class CartridgeAccount {
|
|
469
347
|
static __wrap(ptr) {
|
|
470
348
|
ptr = ptr >>> 0;
|
|
471
349
|
const obj = Object.create(CartridgeAccount.prototype);
|
|
@@ -473,42 +351,39 @@ 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);
|
|
487
363
|
}
|
|
488
364
|
/**
|
|
489
|
-
*
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
* @param {
|
|
497
|
-
* @
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
365
|
+
* @returns {Promise<void>}
|
|
366
|
+
*/
|
|
367
|
+
disconnect() {
|
|
368
|
+
const ret = wasm.cartridgeaccount_disconnect(this.__wbg_ptr);
|
|
369
|
+
return takeObject(ret);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
373
|
+
* @returns {Promise<any>}
|
|
374
|
+
*/
|
|
375
|
+
deploySelf(max_fee) {
|
|
376
|
+
const ret = wasm.cartridgeaccount_deploySelf(this.__wbg_ptr, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
377
|
+
return takeObject(ret);
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
501
380
|
* @param {string} cartridge_api_url
|
|
502
|
-
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
381
|
+
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
503
382
|
*/
|
|
504
|
-
static
|
|
505
|
-
const ptr0 = passStringToWasm0(
|
|
383
|
+
static fromStorage(cartridge_api_url) {
|
|
384
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
506
385
|
const len0 = WASM_VECTOR_LEN;
|
|
507
|
-
const
|
|
508
|
-
const len1 = WASM_VECTOR_LEN;
|
|
509
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
510
|
-
const len2 = WASM_VECTOR_LEN;
|
|
511
|
-
const ret = wasm.cartridgeaccount_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(address), ptr1, len1, addHeapObject(owner), ptr2, len2);
|
|
386
|
+
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
512
387
|
return takeObject(ret);
|
|
513
388
|
}
|
|
514
389
|
/**
|
|
@@ -535,64 +410,34 @@ export class CartridgeAccount {
|
|
|
535
410
|
return takeObject(ret);
|
|
536
411
|
}
|
|
537
412
|
/**
|
|
538
|
-
* @param {
|
|
539
|
-
* @returns {Promise<
|
|
413
|
+
* @param {JsRemoveSignerInput} signer
|
|
414
|
+
* @returns {Promise<void>}
|
|
540
415
|
*/
|
|
541
|
-
|
|
542
|
-
const
|
|
543
|
-
const len0 = WASM_VECTOR_LEN;
|
|
544
|
-
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
416
|
+
removeOwner(signer) {
|
|
417
|
+
const ret = wasm.cartridgeaccount_removeOwner(this.__wbg_ptr, addHeapObject(signer));
|
|
545
418
|
return takeObject(ret);
|
|
546
419
|
}
|
|
547
420
|
/**
|
|
548
|
-
* @
|
|
421
|
+
* @param {string} typed_data
|
|
422
|
+
* @returns {Promise<Felts>}
|
|
549
423
|
*/
|
|
550
|
-
|
|
551
|
-
const
|
|
424
|
+
signMessage(typed_data) {
|
|
425
|
+
const ptr0 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
426
|
+
const len0 = WASM_VECTOR_LEN;
|
|
427
|
+
const ret = wasm.cartridgeaccount_signMessage(this.__wbg_ptr, ptr0, len0);
|
|
552
428
|
return takeObject(ret);
|
|
553
429
|
}
|
|
554
430
|
/**
|
|
555
431
|
* @param {string} app_id
|
|
556
432
|
* @param {Policy[]} policies
|
|
557
|
-
* @
|
|
558
|
-
* @param {JsFelt} public_key
|
|
559
|
-
* @param {JsFeeEstimate | null} [max_fee]
|
|
560
|
-
* @returns {Promise<any>}
|
|
433
|
+
* @returns {Promise<void>}
|
|
561
434
|
*/
|
|
562
|
-
|
|
435
|
+
skipSession(app_id, policies) {
|
|
563
436
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
564
437
|
const len0 = WASM_VECTOR_LEN;
|
|
565
438
|
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
566
439
|
const len1 = WASM_VECTOR_LEN;
|
|
567
|
-
const ret = wasm.
|
|
568
|
-
return takeObject(ret);
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
* @param {Policy[]} policies
|
|
572
|
-
* @param {bigint} expires_at
|
|
573
|
-
* @param {JsFelt} public_key
|
|
574
|
-
* @returns {Promise<any>}
|
|
575
|
-
*/
|
|
576
|
-
registerSessionCalldata(policies, expires_at, public_key) {
|
|
577
|
-
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
578
|
-
const len0 = WASM_VECTOR_LEN;
|
|
579
|
-
const ret = wasm.cartridgeaccount_registerSessionCalldata(this.__wbg_ptr, ptr0, len0, expires_at, addHeapObject(public_key));
|
|
580
|
-
return takeObject(ret);
|
|
581
|
-
}
|
|
582
|
-
/**
|
|
583
|
-
* @param {JsFelt} new_class_hash
|
|
584
|
-
* @returns {Promise<JsCall>}
|
|
585
|
-
*/
|
|
586
|
-
upgrade(new_class_hash) {
|
|
587
|
-
const ret = wasm.cartridgeaccount_upgrade(this.__wbg_ptr, addHeapObject(new_class_hash));
|
|
588
|
-
return takeObject(ret);
|
|
589
|
-
}
|
|
590
|
-
/**
|
|
591
|
-
* @param {JsRegister} register
|
|
592
|
-
* @returns {Promise<JsRegisterResponse>}
|
|
593
|
-
*/
|
|
594
|
-
register(register) {
|
|
595
|
-
const ret = wasm.cartridgeaccount_register(this.__wbg_ptr, addHeapObject(register));
|
|
440
|
+
const ret = wasm.cartridgeaccount_skipSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
596
441
|
return takeObject(ret);
|
|
597
442
|
}
|
|
598
443
|
/**
|
|
@@ -611,46 +456,44 @@ export class CartridgeAccount {
|
|
|
611
456
|
return takeObject(ret);
|
|
612
457
|
}
|
|
613
458
|
/**
|
|
614
|
-
* @param {
|
|
615
|
-
* @param {Policy[]} policies
|
|
459
|
+
* @param {JsRevokableSession} session
|
|
616
460
|
* @returns {Promise<void>}
|
|
617
461
|
*/
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
const len0 = WASM_VECTOR_LEN;
|
|
621
|
-
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
622
|
-
const len1 = WASM_VECTOR_LEN;
|
|
623
|
-
const ret = wasm.cartridgeaccount_skipSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
462
|
+
revokeSession(session) {
|
|
463
|
+
const ret = wasm.cartridgeaccount_revokeSession(this.__wbg_ptr, addHeapObject(session));
|
|
624
464
|
return takeObject(ret);
|
|
625
465
|
}
|
|
626
466
|
/**
|
|
627
|
-
* @param {
|
|
628
|
-
* @param {JsAddSignerInput | null} [signer_input]
|
|
629
|
-
* @param {string | null} [rp_id]
|
|
467
|
+
* @param {JsRevokableSession[]} sessions
|
|
630
468
|
* @returns {Promise<void>}
|
|
631
469
|
*/
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
const ret = wasm.
|
|
470
|
+
revokeSessions(sessions) {
|
|
471
|
+
const ptr0 = passArrayJsValueToWasm0(sessions, wasm.__wbindgen_export);
|
|
472
|
+
const len0 = WASM_VECTOR_LEN;
|
|
473
|
+
const ret = wasm.cartridgeaccount_revokeSessions(this.__wbg_ptr, ptr0, len0);
|
|
636
474
|
return takeObject(ret);
|
|
637
475
|
}
|
|
638
476
|
/**
|
|
639
|
-
* @
|
|
640
|
-
* @returns {Promise<void>}
|
|
477
|
+
* @returns {Promise<JsFelt>}
|
|
641
478
|
*/
|
|
642
|
-
|
|
643
|
-
const ret = wasm.
|
|
479
|
+
delegateAccount() {
|
|
480
|
+
const ret = wasm.cartridgeaccount_delegateAccount(this.__wbg_ptr);
|
|
644
481
|
return takeObject(ret);
|
|
645
482
|
}
|
|
646
483
|
/**
|
|
647
|
-
* @param {string}
|
|
648
|
-
* @
|
|
484
|
+
* @param {string} app_id
|
|
485
|
+
* @param {Policy[]} policies
|
|
486
|
+
* @param {bigint} expires_at
|
|
487
|
+
* @param {JsFelt} public_key
|
|
488
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
489
|
+
* @returns {Promise<any>}
|
|
649
490
|
*/
|
|
650
|
-
|
|
651
|
-
const ptr0 = passStringToWasm0(
|
|
491
|
+
registerSession(app_id, policies, expires_at, public_key, max_fee) {
|
|
492
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
652
493
|
const len0 = WASM_VECTOR_LEN;
|
|
653
|
-
const
|
|
494
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
495
|
+
const len1 = WASM_VECTOR_LEN;
|
|
496
|
+
const ret = wasm.cartridgeaccount_registerSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, addHeapObject(public_key), isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
654
497
|
return takeObject(ret);
|
|
655
498
|
}
|
|
656
499
|
/**
|
|
@@ -664,15 +507,40 @@ export class CartridgeAccount {
|
|
|
664
507
|
return takeObject(ret);
|
|
665
508
|
}
|
|
666
509
|
/**
|
|
510
|
+
* @param {string} app_id
|
|
667
511
|
* @param {JsCall[]} calls
|
|
668
|
-
* @param {JsFeeEstimate | null} [max_fee]
|
|
669
512
|
* @param {JsFeeSource | null} [fee_source]
|
|
670
513
|
* @returns {Promise<any>}
|
|
671
514
|
*/
|
|
672
|
-
|
|
673
|
-
const ptr0 =
|
|
515
|
+
trySessionExecute(app_id, calls, fee_source) {
|
|
516
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
674
517
|
const len0 = WASM_VECTOR_LEN;
|
|
675
|
-
const
|
|
518
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
519
|
+
const len1 = WASM_VECTOR_LEN;
|
|
520
|
+
const ret = wasm.cartridgeaccount_trySessionExecute(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
521
|
+
return takeObject(ret);
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* @param {string} rp_id
|
|
525
|
+
* @returns {Promise<JsAddSignerInput>}
|
|
526
|
+
*/
|
|
527
|
+
createPasskeySigner(rp_id) {
|
|
528
|
+
const ptr0 = passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
529
|
+
const len0 = WASM_VECTOR_LEN;
|
|
530
|
+
const ret = wasm.cartridgeaccount_createPasskeySigner(this.__wbg_ptr, ptr0, len0);
|
|
531
|
+
return takeObject(ret);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* @param {string} app_id
|
|
535
|
+
* @param {Policy[]} policies
|
|
536
|
+
* @returns {Promise<boolean>}
|
|
537
|
+
*/
|
|
538
|
+
hasRequestedSession(app_id, policies) {
|
|
539
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
540
|
+
const len0 = WASM_VECTOR_LEN;
|
|
541
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
542
|
+
const len1 = WASM_VECTOR_LEN;
|
|
543
|
+
const ret = wasm.cartridgeaccount_hasRequestedSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
676
544
|
return takeObject(ret);
|
|
677
545
|
}
|
|
678
546
|
/**
|
|
@@ -698,159 +566,164 @@ export class CartridgeAccount {
|
|
|
698
566
|
return takeObject(ret);
|
|
699
567
|
}
|
|
700
568
|
/**
|
|
569
|
+
* Checks if there are stored policies for a given app_id.
|
|
570
|
+
*
|
|
571
|
+
* # Parameters
|
|
572
|
+
* - `app_id`: The application identifier to check for stored policies
|
|
573
|
+
*
|
|
574
|
+
* # Returns
|
|
575
|
+
* `true` if policies exist for the given app_id, `false` otherwise
|
|
701
576
|
* @param {string} app_id
|
|
702
|
-
* @
|
|
703
|
-
* @param {JsFeeSource | null} [fee_source]
|
|
704
|
-
* @returns {Promise<any>}
|
|
577
|
+
* @returns {Promise<boolean>}
|
|
705
578
|
*/
|
|
706
|
-
|
|
579
|
+
hasPoliciesForAppId(app_id) {
|
|
707
580
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
708
581
|
const len0 = WASM_VECTOR_LEN;
|
|
709
|
-
const
|
|
710
|
-
const len1 = WASM_VECTOR_LEN;
|
|
711
|
-
const ret = wasm.cartridgeaccount_trySessionExecute(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
582
|
+
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
712
583
|
return takeObject(ret);
|
|
713
584
|
}
|
|
714
585
|
/**
|
|
715
586
|
* @param {Policy[]} policies
|
|
716
|
-
* @param {
|
|
717
|
-
* @
|
|
587
|
+
* @param {bigint} expires_at
|
|
588
|
+
* @param {JsFelt} public_key
|
|
589
|
+
* @returns {Promise<any>}
|
|
718
590
|
*/
|
|
719
|
-
|
|
591
|
+
registerSessionCalldata(policies, expires_at, public_key) {
|
|
720
592
|
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
721
593
|
const len0 = WASM_VECTOR_LEN;
|
|
722
|
-
const ret = wasm.
|
|
594
|
+
const ret = wasm.cartridgeaccount_registerSessionCalldata(this.__wbg_ptr, ptr0, len0, expires_at, addHeapObject(public_key));
|
|
723
595
|
return takeObject(ret);
|
|
724
596
|
}
|
|
725
597
|
/**
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*
|
|
598
|
+
* Signs an OutsideExecution V3 transaction and returns both the OutsideExecution object and its signature.
|
|
599
|
+
*
|
|
600
|
+
* # Parameters
|
|
601
|
+
* - `calls`: Array of calls to execute from outside
|
|
602
|
+
*
|
|
603
|
+
* # Returns
|
|
604
|
+
* A `JsSignedOutsideExecution` containing the OutsideExecution V3 object and its signature
|
|
605
|
+
* @param {JsCall[]} calls
|
|
606
|
+
* @returns {Promise<JsSignedOutsideExecution>}
|
|
729
607
|
*/
|
|
730
|
-
|
|
731
|
-
const ptr0 =
|
|
608
|
+
signExecuteFromOutside(calls) {
|
|
609
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
732
610
|
const len0 = WASM_VECTOR_LEN;
|
|
733
|
-
const
|
|
734
|
-
const len1 = WASM_VECTOR_LEN;
|
|
735
|
-
const ret = wasm.cartridgeaccount_hasRequestedSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
611
|
+
const ret = wasm.cartridgeaccount_signExecuteFromOutside(this.__wbg_ptr, ptr0, len0);
|
|
736
612
|
return takeObject(ret);
|
|
737
613
|
}
|
|
738
614
|
/**
|
|
739
|
-
* @param {
|
|
740
|
-
* @
|
|
615
|
+
* @param {Policy[]} policies
|
|
616
|
+
* @param {JsFelt | null} [public_key]
|
|
617
|
+
* @returns {Promise<AuthorizedSession | undefined>}
|
|
741
618
|
*/
|
|
742
|
-
|
|
743
|
-
const
|
|
619
|
+
isRegisteredSessionAuthorized(policies, public_key) {
|
|
620
|
+
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
621
|
+
const len0 = WASM_VECTOR_LEN;
|
|
622
|
+
const ret = wasm.cartridgeaccount_isRegisteredSessionAuthorized(this.__wbg_ptr, ptr0, len0, isLikeNone(public_key) ? 0 : addHeapObject(public_key));
|
|
744
623
|
return takeObject(ret);
|
|
745
624
|
}
|
|
746
625
|
/**
|
|
747
|
-
* @param {
|
|
748
|
-
* @
|
|
626
|
+
* @param {string} app_id
|
|
627
|
+
* @param {JsCall[]} calls
|
|
628
|
+
* @returns {Promise<boolean>}
|
|
749
629
|
*/
|
|
750
|
-
|
|
751
|
-
const ptr0 =
|
|
630
|
+
hasAuthorizedPoliciesForCalls(app_id, calls) {
|
|
631
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
752
632
|
const len0 = WASM_VECTOR_LEN;
|
|
753
|
-
const
|
|
633
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
634
|
+
const len1 = WASM_VECTOR_LEN;
|
|
635
|
+
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForCalls(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
754
636
|
return takeObject(ret);
|
|
755
637
|
}
|
|
756
638
|
/**
|
|
639
|
+
* @param {string} app_id
|
|
757
640
|
* @param {string} typed_data
|
|
758
|
-
* @returns {Promise<
|
|
641
|
+
* @returns {Promise<boolean>}
|
|
759
642
|
*/
|
|
760
|
-
|
|
761
|
-
const ptr0 = passStringToWasm0(
|
|
643
|
+
hasAuthorizedPoliciesForMessage(app_id, typed_data) {
|
|
644
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
762
645
|
const len0 = WASM_VECTOR_LEN;
|
|
763
|
-
const
|
|
646
|
+
const ptr1 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
647
|
+
const len1 = WASM_VECTOR_LEN;
|
|
648
|
+
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
764
649
|
return takeObject(ret);
|
|
765
650
|
}
|
|
766
651
|
/**
|
|
767
|
-
*
|
|
652
|
+
* Creates a new `CartridgeAccount` instance.
|
|
653
|
+
*
|
|
654
|
+
* # Parameters
|
|
655
|
+
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
656
|
+
* - `address`: The blockchain address associated with the account.
|
|
657
|
+
* - `username`: Username associated with the account.
|
|
658
|
+
* - `owner`: A Owner struct containing the owner signer and associated data.
|
|
659
|
+
* @param {JsFelt} class_hash
|
|
660
|
+
* @param {string} rpc_url
|
|
661
|
+
* @param {JsFelt} address
|
|
662
|
+
* @param {string} username
|
|
663
|
+
* @param {Owner} owner
|
|
664
|
+
* @param {string} cartridge_api_url
|
|
665
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
768
666
|
*/
|
|
769
|
-
|
|
770
|
-
const
|
|
667
|
+
static new(class_hash, rpc_url, address, username, owner, cartridge_api_url) {
|
|
668
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
669
|
+
const len0 = WASM_VECTOR_LEN;
|
|
670
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
671
|
+
const len1 = WASM_VECTOR_LEN;
|
|
672
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
673
|
+
const len2 = WASM_VECTOR_LEN;
|
|
674
|
+
const ret = wasm.cartridgeaccount_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(address), ptr1, len1, addHeapObject(owner), ptr2, len2);
|
|
771
675
|
return takeObject(ret);
|
|
772
676
|
}
|
|
773
677
|
/**
|
|
678
|
+
* @param {JsCall[]} calls
|
|
774
679
|
* @param {JsFeeEstimate | null} [max_fee]
|
|
680
|
+
* @param {JsFeeSource | null} [fee_source]
|
|
775
681
|
* @returns {Promise<any>}
|
|
776
682
|
*/
|
|
777
|
-
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* @returns {Promise<JsFelt>}
|
|
783
|
-
*/
|
|
784
|
-
delegateAccount() {
|
|
785
|
-
const ret = wasm.cartridgeaccount_delegateAccount(this.__wbg_ptr);
|
|
683
|
+
execute(calls, max_fee, fee_source) {
|
|
684
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
685
|
+
const len0 = WASM_VECTOR_LEN;
|
|
686
|
+
const ret = wasm.cartridgeaccount_execute(this.__wbg_ptr, ptr0, len0, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee), isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
786
687
|
return takeObject(ret);
|
|
787
688
|
}
|
|
788
689
|
/**
|
|
789
|
-
* @param {
|
|
790
|
-
* @
|
|
791
|
-
* @returns {Promise<boolean>}
|
|
690
|
+
* @param {JsFelt} new_class_hash
|
|
691
|
+
* @returns {Promise<JsCall>}
|
|
792
692
|
*/
|
|
793
|
-
|
|
794
|
-
const
|
|
795
|
-
const len0 = WASM_VECTOR_LEN;
|
|
796
|
-
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
797
|
-
const len1 = WASM_VECTOR_LEN;
|
|
798
|
-
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForCalls(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
693
|
+
upgrade(new_class_hash) {
|
|
694
|
+
const ret = wasm.cartridgeaccount_upgrade(this.__wbg_ptr, addHeapObject(new_class_hash));
|
|
799
695
|
return takeObject(ret);
|
|
800
696
|
}
|
|
801
697
|
/**
|
|
802
|
-
* @param {
|
|
803
|
-
* @
|
|
804
|
-
* @returns {Promise<boolean>}
|
|
698
|
+
* @param {JsRegister} register
|
|
699
|
+
* @returns {Promise<JsRegisterResponse>}
|
|
805
700
|
*/
|
|
806
|
-
|
|
807
|
-
const
|
|
808
|
-
const len0 = WASM_VECTOR_LEN;
|
|
809
|
-
const ptr1 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
810
|
-
const len1 = WASM_VECTOR_LEN;
|
|
811
|
-
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
701
|
+
register(register) {
|
|
702
|
+
const ret = wasm.cartridgeaccount_register(this.__wbg_ptr, addHeapObject(register));
|
|
812
703
|
return takeObject(ret);
|
|
813
704
|
}
|
|
814
705
|
/**
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
* # Returns
|
|
821
|
-
* A `JsSignedOutsideExecution` containing the OutsideExecution V3 object and its signature
|
|
822
|
-
* @param {JsCall[]} calls
|
|
823
|
-
* @returns {Promise<JsSignedOutsideExecution>}
|
|
706
|
+
* @param {Signer | null} [owner]
|
|
707
|
+
* @param {JsAddSignerInput | null} [signer_input]
|
|
708
|
+
* @param {string | null} [rp_id]
|
|
709
|
+
* @returns {Promise<void>}
|
|
824
710
|
*/
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
const ret = wasm.
|
|
711
|
+
addOwner(owner, signer_input, rp_id) {
|
|
712
|
+
var ptr0 = isLikeNone(rp_id) ? 0 : passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
713
|
+
var len0 = WASM_VECTOR_LEN;
|
|
714
|
+
const ret = wasm.cartridgeaccount_addOwner(this.__wbg_ptr, isLikeNone(owner) ? 0 : addHeapObject(owner), isLikeNone(signer_input) ? 0 : addHeapObject(signer_input), ptr0, len0);
|
|
829
715
|
return takeObject(ret);
|
|
830
716
|
}
|
|
831
717
|
/**
|
|
832
|
-
*
|
|
833
|
-
*
|
|
834
|
-
* # Parameters
|
|
835
|
-
* - `app_id`: The application identifier to check for stored policies
|
|
836
|
-
*
|
|
837
|
-
* # Returns
|
|
838
|
-
* `true` if policies exist for the given app_id, `false` otherwise
|
|
839
|
-
* @param {string} app_id
|
|
840
|
-
* @returns {Promise<boolean>}
|
|
718
|
+
* @returns {Promise<any>}
|
|
841
719
|
*/
|
|
842
|
-
|
|
843
|
-
const
|
|
844
|
-
const len0 = WASM_VECTOR_LEN;
|
|
845
|
-
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
720
|
+
getNonce() {
|
|
721
|
+
const ret = wasm.cartridgeaccount_getNonce(this.__wbg_ptr);
|
|
846
722
|
return takeObject(ret);
|
|
847
723
|
}
|
|
848
724
|
}
|
|
849
725
|
if (Symbol.dispose) CartridgeAccount.prototype[Symbol.dispose] = CartridgeAccount.prototype.free;
|
|
850
726
|
|
|
851
|
-
const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
852
|
-
? { register: () => {}, unregister: () => {} }
|
|
853
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountmeta_free(ptr >>> 0, 1));
|
|
854
727
|
/**
|
|
855
728
|
* A type for accessing fixed attributes of `CartridgeAccount`.
|
|
856
729
|
*
|
|
@@ -865,7 +738,6 @@ const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undef
|
|
|
865
738
|
* be needed.
|
|
866
739
|
*/
|
|
867
740
|
export class CartridgeAccountMeta {
|
|
868
|
-
|
|
869
741
|
static __wrap(ptr) {
|
|
870
742
|
ptr = ptr >>> 0;
|
|
871
743
|
const obj = Object.create(CartridgeAccountMeta.prototype);
|
|
@@ -873,14 +745,12 @@ export class CartridgeAccountMeta {
|
|
|
873
745
|
CartridgeAccountMetaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
874
746
|
return obj;
|
|
875
747
|
}
|
|
876
|
-
|
|
877
748
|
__destroy_into_raw() {
|
|
878
749
|
const ptr = this.__wbg_ptr;
|
|
879
750
|
this.__wbg_ptr = 0;
|
|
880
751
|
CartridgeAccountMetaFinalization.unregister(this);
|
|
881
752
|
return ptr;
|
|
882
753
|
}
|
|
883
|
-
|
|
884
754
|
free() {
|
|
885
755
|
const ptr = this.__destroy_into_raw();
|
|
886
756
|
wasm.__wbg_cartridgeaccountmeta_free(ptr, 0);
|
|
@@ -888,12 +758,12 @@ export class CartridgeAccountMeta {
|
|
|
888
758
|
/**
|
|
889
759
|
* @returns {string}
|
|
890
760
|
*/
|
|
891
|
-
|
|
761
|
+
classHash() {
|
|
892
762
|
let deferred1_0;
|
|
893
763
|
let deferred1_1;
|
|
894
764
|
try {
|
|
895
765
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
896
|
-
wasm.
|
|
766
|
+
wasm.cartridgeaccountmeta_classHash(retptr, this.__wbg_ptr);
|
|
897
767
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
898
768
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
899
769
|
deferred1_0 = r0;
|
|
@@ -904,6 +774,20 @@ export class CartridgeAccountMeta {
|
|
|
904
774
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
905
775
|
}
|
|
906
776
|
}
|
|
777
|
+
/**
|
|
778
|
+
* @returns {JsFelt}
|
|
779
|
+
*/
|
|
780
|
+
ownerGuid() {
|
|
781
|
+
const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
|
|
782
|
+
return takeObject(ret);
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* @returns {Owner}
|
|
786
|
+
*/
|
|
787
|
+
owner() {
|
|
788
|
+
const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
|
|
789
|
+
return takeObject(ret);
|
|
790
|
+
}
|
|
907
791
|
/**
|
|
908
792
|
* @returns {string}
|
|
909
793
|
*/
|
|
@@ -926,12 +810,12 @@ export class CartridgeAccountMeta {
|
|
|
926
810
|
/**
|
|
927
811
|
* @returns {string}
|
|
928
812
|
*/
|
|
929
|
-
|
|
813
|
+
rpcUrl() {
|
|
930
814
|
let deferred1_0;
|
|
931
815
|
let deferred1_1;
|
|
932
816
|
try {
|
|
933
817
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
934
|
-
wasm.
|
|
818
|
+
wasm.cartridgeaccountmeta_rpcUrl(retptr, this.__wbg_ptr);
|
|
935
819
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
936
820
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
937
821
|
deferred1_0 = r0;
|
|
@@ -945,12 +829,12 @@ export class CartridgeAccountMeta {
|
|
|
945
829
|
/**
|
|
946
830
|
* @returns {string}
|
|
947
831
|
*/
|
|
948
|
-
|
|
832
|
+
chainId() {
|
|
949
833
|
let deferred1_0;
|
|
950
834
|
let deferred1_1;
|
|
951
835
|
try {
|
|
952
836
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
953
|
-
wasm.
|
|
837
|
+
wasm.cartridgeaccountmeta_chainId(retptr, this.__wbg_ptr);
|
|
954
838
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
955
839
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
956
840
|
deferred1_0 = r0;
|
|
@@ -964,12 +848,12 @@ export class CartridgeAccountMeta {
|
|
|
964
848
|
/**
|
|
965
849
|
* @returns {string}
|
|
966
850
|
*/
|
|
967
|
-
|
|
851
|
+
username() {
|
|
968
852
|
let deferred1_0;
|
|
969
853
|
let deferred1_1;
|
|
970
854
|
try {
|
|
971
855
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
972
|
-
wasm.
|
|
856
|
+
wasm.cartridgeaccountmeta_username(retptr, this.__wbg_ptr);
|
|
973
857
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
974
858
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
975
859
|
deferred1_0 = r0;
|
|
@@ -980,26 +864,9 @@ export class CartridgeAccountMeta {
|
|
|
980
864
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
981
865
|
}
|
|
982
866
|
}
|
|
983
|
-
/**
|
|
984
|
-
* @returns {Owner}
|
|
985
|
-
*/
|
|
986
|
-
owner() {
|
|
987
|
-
const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
|
|
988
|
-
return takeObject(ret);
|
|
989
|
-
}
|
|
990
|
-
/**
|
|
991
|
-
* @returns {JsFelt}
|
|
992
|
-
*/
|
|
993
|
-
ownerGuid() {
|
|
994
|
-
const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
|
|
995
|
-
return takeObject(ret);
|
|
996
|
-
}
|
|
997
867
|
}
|
|
998
868
|
if (Symbol.dispose) CartridgeAccountMeta.prototype[Symbol.dispose] = CartridgeAccountMeta.prototype.free;
|
|
999
869
|
|
|
1000
|
-
const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1001
|
-
? { register: () => {}, unregister: () => {} }
|
|
1002
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountwithmeta_free(ptr >>> 0, 1));
|
|
1003
870
|
/**
|
|
1004
871
|
* A type used as the return type for constructing `CartridgeAccount` to provide an extra,
|
|
1005
872
|
* separately borrowable `meta` field for synchronously accessing fixed fields.
|
|
@@ -1008,7 +875,6 @@ const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'u
|
|
|
1008
875
|
* don't implement `IntoWasmAbi` which is needed for crossing JS-WASM boundary.
|
|
1009
876
|
*/
|
|
1010
877
|
export class CartridgeAccountWithMeta {
|
|
1011
|
-
|
|
1012
878
|
static __wrap(ptr) {
|
|
1013
879
|
ptr = ptr >>> 0;
|
|
1014
880
|
const obj = Object.create(CartridgeAccountWithMeta.prototype);
|
|
@@ -1016,25 +882,16 @@ export class CartridgeAccountWithMeta {
|
|
|
1016
882
|
CartridgeAccountWithMetaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1017
883
|
return obj;
|
|
1018
884
|
}
|
|
1019
|
-
|
|
1020
885
|
__destroy_into_raw() {
|
|
1021
886
|
const ptr = this.__wbg_ptr;
|
|
1022
887
|
this.__wbg_ptr = 0;
|
|
1023
888
|
CartridgeAccountWithMetaFinalization.unregister(this);
|
|
1024
889
|
return ptr;
|
|
1025
890
|
}
|
|
1026
|
-
|
|
1027
891
|
free() {
|
|
1028
892
|
const ptr = this.__destroy_into_raw();
|
|
1029
893
|
wasm.__wbg_cartridgeaccountwithmeta_free(ptr, 0);
|
|
1030
894
|
}
|
|
1031
|
-
/**
|
|
1032
|
-
* @returns {CartridgeAccountMeta}
|
|
1033
|
-
*/
|
|
1034
|
-
meta() {
|
|
1035
|
-
const ret = wasm.cartridgeaccountwithmeta_meta(this.__wbg_ptr);
|
|
1036
|
-
return CartridgeAccountMeta.__wrap(ret);
|
|
1037
|
-
}
|
|
1038
895
|
/**
|
|
1039
896
|
* @returns {CartridgeAccount}
|
|
1040
897
|
*/
|
|
@@ -1043,22 +900,23 @@ export class CartridgeAccountWithMeta {
|
|
|
1043
900
|
const ret = wasm.cartridgeaccountwithmeta_intoAccount(ptr);
|
|
1044
901
|
return CartridgeAccount.__wrap(ret);
|
|
1045
902
|
}
|
|
903
|
+
/**
|
|
904
|
+
* @returns {CartridgeAccountMeta}
|
|
905
|
+
*/
|
|
906
|
+
meta() {
|
|
907
|
+
const ret = wasm.cartridgeaccountwithmeta_meta(this.__wbg_ptr);
|
|
908
|
+
return CartridgeAccountMeta.__wrap(ret);
|
|
909
|
+
}
|
|
1046
910
|
}
|
|
1047
911
|
if (Symbol.dispose) CartridgeAccountWithMeta.prototype[Symbol.dispose] = CartridgeAccountWithMeta.prototype.free;
|
|
1048
912
|
|
|
1049
|
-
const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1050
|
-
? { register: () => {}, unregister: () => {} }
|
|
1051
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
|
|
1052
|
-
|
|
1053
913
|
export class ControllerFactory {
|
|
1054
|
-
|
|
1055
914
|
__destroy_into_raw() {
|
|
1056
915
|
const ptr = this.__wbg_ptr;
|
|
1057
916
|
this.__wbg_ptr = 0;
|
|
1058
917
|
ControllerFactoryFinalization.unregister(this);
|
|
1059
918
|
return ptr;
|
|
1060
919
|
}
|
|
1061
|
-
|
|
1062
920
|
free() {
|
|
1063
921
|
const ptr = this.__destroy_into_raw();
|
|
1064
922
|
wasm.__wbg_controllerfactory_free(ptr, 0);
|
|
@@ -1147,32 +1005,112 @@ export class ControllerFactory {
|
|
|
1147
1005
|
}
|
|
1148
1006
|
if (Symbol.dispose) ControllerFactory.prototype[Symbol.dispose] = ControllerFactory.prototype.free;
|
|
1149
1007
|
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
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
|
+
|
|
1153
1087
|
/**
|
|
1154
1088
|
* JavaScript-friendly chain configuration
|
|
1155
1089
|
*/
|
|
1156
1090
|
export class JsChainConfig {
|
|
1157
|
-
|
|
1158
1091
|
static __unwrap(jsValue) {
|
|
1159
1092
|
if (!(jsValue instanceof JsChainConfig)) {
|
|
1160
1093
|
return 0;
|
|
1161
1094
|
}
|
|
1162
1095
|
return jsValue.__destroy_into_raw();
|
|
1163
1096
|
}
|
|
1164
|
-
|
|
1165
1097
|
__destroy_into_raw() {
|
|
1166
1098
|
const ptr = this.__wbg_ptr;
|
|
1167
1099
|
this.__wbg_ptr = 0;
|
|
1168
1100
|
JsChainConfigFinalization.unregister(this);
|
|
1169
1101
|
return ptr;
|
|
1170
1102
|
}
|
|
1171
|
-
|
|
1172
1103
|
free() {
|
|
1173
1104
|
const ptr = this.__destroy_into_raw();
|
|
1174
1105
|
wasm.__wbg_jschainconfig_free(ptr, 0);
|
|
1175
1106
|
}
|
|
1107
|
+
/**
|
|
1108
|
+
* @returns {JsFelt}
|
|
1109
|
+
*/
|
|
1110
|
+
get class_hash() {
|
|
1111
|
+
const ret = wasm.jschainconfig_class_hash(this.__wbg_ptr);
|
|
1112
|
+
return takeObject(ret);
|
|
1113
|
+
}
|
|
1176
1114
|
/**
|
|
1177
1115
|
* @param {JsFelt} class_hash
|
|
1178
1116
|
* @param {string} rpc_url
|
|
@@ -1188,10 +1126,17 @@ export class JsChainConfig {
|
|
|
1188
1126
|
return this;
|
|
1189
1127
|
}
|
|
1190
1128
|
/**
|
|
1191
|
-
* @returns {
|
|
1129
|
+
* @returns {Owner}
|
|
1192
1130
|
*/
|
|
1193
|
-
get
|
|
1194
|
-
const ret = wasm.
|
|
1131
|
+
get owner() {
|
|
1132
|
+
const ret = wasm.jschainconfig_owner(this.__wbg_ptr);
|
|
1133
|
+
return takeObject(ret);
|
|
1134
|
+
}
|
|
1135
|
+
/**
|
|
1136
|
+
* @returns {JsFelt | undefined}
|
|
1137
|
+
*/
|
|
1138
|
+
get address() {
|
|
1139
|
+
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
1195
1140
|
return takeObject(ret);
|
|
1196
1141
|
}
|
|
1197
1142
|
/**
|
|
@@ -1213,29 +1158,10 @@ export class JsChainConfig {
|
|
|
1213
1158
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1214
1159
|
}
|
|
1215
1160
|
}
|
|
1216
|
-
/**
|
|
1217
|
-
* @returns {Owner}
|
|
1218
|
-
*/
|
|
1219
|
-
get owner() {
|
|
1220
|
-
const ret = wasm.jschainconfig_owner(this.__wbg_ptr);
|
|
1221
|
-
return takeObject(ret);
|
|
1222
|
-
}
|
|
1223
|
-
/**
|
|
1224
|
-
* @returns {JsFelt | undefined}
|
|
1225
|
-
*/
|
|
1226
|
-
get address() {
|
|
1227
|
-
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
1228
|
-
return takeObject(ret);
|
|
1229
|
-
}
|
|
1230
1161
|
}
|
|
1231
1162
|
if (Symbol.dispose) JsChainConfig.prototype[Symbol.dispose] = JsChainConfig.prototype.free;
|
|
1232
1163
|
|
|
1233
|
-
const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1234
|
-
? { register: () => {}, unregister: () => {} }
|
|
1235
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
|
|
1236
|
-
|
|
1237
1164
|
export class JsControllerError {
|
|
1238
|
-
|
|
1239
1165
|
static __wrap(ptr) {
|
|
1240
1166
|
ptr = ptr >>> 0;
|
|
1241
1167
|
const obj = Object.create(JsControllerError.prototype);
|
|
@@ -1243,14 +1169,12 @@ export class JsControllerError {
|
|
|
1243
1169
|
JsControllerErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1244
1170
|
return obj;
|
|
1245
1171
|
}
|
|
1246
|
-
|
|
1247
1172
|
__destroy_into_raw() {
|
|
1248
1173
|
const ptr = this.__wbg_ptr;
|
|
1249
1174
|
this.__wbg_ptr = 0;
|
|
1250
1175
|
JsControllerErrorFinalization.unregister(this);
|
|
1251
1176
|
return ptr;
|
|
1252
1177
|
}
|
|
1253
|
-
|
|
1254
1178
|
free() {
|
|
1255
1179
|
const ptr = this.__destroy_into_raw();
|
|
1256
1180
|
wasm.__wbg_jscontrollererror_free(ptr, 0);
|
|
@@ -1325,12 +1249,7 @@ export class JsControllerError {
|
|
|
1325
1249
|
}
|
|
1326
1250
|
if (Symbol.dispose) JsControllerError.prototype[Symbol.dispose] = JsControllerError.prototype.free;
|
|
1327
1251
|
|
|
1328
|
-
const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1329
|
-
? { register: () => {}, unregister: () => {} }
|
|
1330
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
|
|
1331
|
-
|
|
1332
1252
|
export class LoginResult {
|
|
1333
|
-
|
|
1334
1253
|
static __wrap(ptr) {
|
|
1335
1254
|
ptr = ptr >>> 0;
|
|
1336
1255
|
const obj = Object.create(LoginResult.prototype);
|
|
@@ -1338,14 +1257,12 @@ export class LoginResult {
|
|
|
1338
1257
|
LoginResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1339
1258
|
return obj;
|
|
1340
1259
|
}
|
|
1341
|
-
|
|
1342
1260
|
__destroy_into_raw() {
|
|
1343
1261
|
const ptr = this.__wbg_ptr;
|
|
1344
1262
|
this.__wbg_ptr = 0;
|
|
1345
1263
|
LoginResultFinalization.unregister(this);
|
|
1346
1264
|
return ptr;
|
|
1347
1265
|
}
|
|
1348
|
-
|
|
1349
1266
|
free() {
|
|
1350
1267
|
const ptr = this.__destroy_into_raw();
|
|
1351
1268
|
wasm.__wbg_loginresult_free(ptr, 0);
|
|
@@ -1361,14 +1278,10 @@ export class LoginResult {
|
|
|
1361
1278
|
}
|
|
1362
1279
|
if (Symbol.dispose) LoginResult.prototype[Symbol.dispose] = LoginResult.prototype.free;
|
|
1363
1280
|
|
|
1364
|
-
const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1365
|
-
? { register: () => {}, unregister: () => {} }
|
|
1366
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
|
|
1367
1281
|
/**
|
|
1368
1282
|
* WASM bindings for MultiChainController
|
|
1369
1283
|
*/
|
|
1370
1284
|
export class MultiChainAccount {
|
|
1371
|
-
|
|
1372
1285
|
static __wrap(ptr) {
|
|
1373
1286
|
ptr = ptr >>> 0;
|
|
1374
1287
|
const obj = Object.create(MultiChainAccount.prototype);
|
|
@@ -1376,33 +1289,23 @@ export class MultiChainAccount {
|
|
|
1376
1289
|
MultiChainAccountFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1377
1290
|
return obj;
|
|
1378
1291
|
}
|
|
1379
|
-
|
|
1380
1292
|
__destroy_into_raw() {
|
|
1381
1293
|
const ptr = this.__wbg_ptr;
|
|
1382
1294
|
this.__wbg_ptr = 0;
|
|
1383
1295
|
MultiChainAccountFinalization.unregister(this);
|
|
1384
1296
|
return ptr;
|
|
1385
1297
|
}
|
|
1386
|
-
|
|
1387
1298
|
free() {
|
|
1388
1299
|
const ptr = this.__destroy_into_raw();
|
|
1389
1300
|
wasm.__wbg_multichainaccount_free(ptr, 0);
|
|
1390
1301
|
}
|
|
1391
1302
|
/**
|
|
1392
|
-
*
|
|
1393
|
-
* @param {
|
|
1394
|
-
* @
|
|
1395
|
-
* @param {string} cartridge_api_url
|
|
1396
|
-
* @returns {Promise<MultiChainAccount>}
|
|
1303
|
+
* Gets an account instance for a specific chain
|
|
1304
|
+
* @param {JsFelt} chain_id
|
|
1305
|
+
* @returns {Promise<CartridgeAccount>}
|
|
1397
1306
|
*/
|
|
1398
|
-
|
|
1399
|
-
const
|
|
1400
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1401
|
-
const ptr1 = passArrayJsValueToWasm0(chain_configs, wasm.__wbindgen_export);
|
|
1402
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1403
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1404
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1405
|
-
const ret = wasm.multichainaccount_create(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1307
|
+
controller(chain_id) {
|
|
1308
|
+
const ret = wasm.multichainaccount_controller(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1406
1309
|
return takeObject(ret);
|
|
1407
1310
|
}
|
|
1408
1311
|
/**
|
|
@@ -1416,17 +1319,6 @@ export class MultiChainAccount {
|
|
|
1416
1319
|
const ret = wasm.multichainaccount_fromStorage(ptr0, len0);
|
|
1417
1320
|
return takeObject(ret);
|
|
1418
1321
|
}
|
|
1419
|
-
/**
|
|
1420
|
-
* Adds a new chain configuration
|
|
1421
|
-
* @param {JsChainConfig} config
|
|
1422
|
-
* @returns {Promise<void>}
|
|
1423
|
-
*/
|
|
1424
|
-
addChain(config) {
|
|
1425
|
-
_assertClass(config, JsChainConfig);
|
|
1426
|
-
var ptr0 = config.__destroy_into_raw();
|
|
1427
|
-
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
1428
|
-
return takeObject(ret);
|
|
1429
|
-
}
|
|
1430
1322
|
/**
|
|
1431
1323
|
* Removes a chain configuration
|
|
1432
1324
|
* @param {JsFelt} chain_id
|
|
@@ -1437,75 +1329,157 @@ export class MultiChainAccount {
|
|
|
1437
1329
|
return takeObject(ret);
|
|
1438
1330
|
}
|
|
1439
1331
|
/**
|
|
1440
|
-
*
|
|
1441
|
-
* @param {
|
|
1442
|
-
* @
|
|
1332
|
+
* Creates a new MultiChainAccount with multiple chain configurations
|
|
1333
|
+
* @param {string} username
|
|
1334
|
+
* @param {JsChainConfig[]} chain_configs
|
|
1335
|
+
* @param {string} cartridge_api_url
|
|
1336
|
+
* @returns {Promise<MultiChainAccount>}
|
|
1443
1337
|
*/
|
|
1444
|
-
|
|
1445
|
-
const
|
|
1338
|
+
static create(username, chain_configs, cartridge_api_url) {
|
|
1339
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1340
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1341
|
+
const ptr1 = passArrayJsValueToWasm0(chain_configs, wasm.__wbindgen_export);
|
|
1342
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1343
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1344
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1345
|
+
const ret = wasm.multichainaccount_create(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1346
|
+
return takeObject(ret);
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* Adds a new chain configuration
|
|
1350
|
+
* @param {JsChainConfig} config
|
|
1351
|
+
* @returns {Promise<void>}
|
|
1352
|
+
*/
|
|
1353
|
+
addChain(config) {
|
|
1354
|
+
_assertClass(config, JsChainConfig);
|
|
1355
|
+
var ptr0 = config.__destroy_into_raw();
|
|
1356
|
+
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
1446
1357
|
return takeObject(ret);
|
|
1447
1358
|
}
|
|
1448
1359
|
}
|
|
1449
1360
|
if (Symbol.dispose) MultiChainAccount.prototype[Symbol.dispose] = MultiChainAccount.prototype.free;
|
|
1450
1361
|
|
|
1451
|
-
const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1452
|
-
? { register: () => {}, unregister: () => {} }
|
|
1453
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
|
|
1454
1362
|
/**
|
|
1455
1363
|
* Metadata for displaying multi-chain information
|
|
1456
1364
|
*/
|
|
1457
1365
|
export class MultiChainAccountMeta {
|
|
1458
|
-
|
|
1459
1366
|
__destroy_into_raw() {
|
|
1460
1367
|
const ptr = this.__wbg_ptr;
|
|
1461
1368
|
this.__wbg_ptr = 0;
|
|
1462
1369
|
MultiChainAccountMetaFinalization.unregister(this);
|
|
1463
1370
|
return ptr;
|
|
1464
1371
|
}
|
|
1465
|
-
|
|
1466
1372
|
free() {
|
|
1467
1373
|
const ptr = this.__destroy_into_raw();
|
|
1468
1374
|
wasm.__wbg_multichainaccountmeta_free(ptr, 0);
|
|
1469
1375
|
}
|
|
1470
1376
|
/**
|
|
1471
|
-
* @returns {
|
|
1377
|
+
* @returns {JsFelt[]}
|
|
1472
1378
|
*/
|
|
1473
|
-
get
|
|
1474
|
-
let deferred1_0;
|
|
1475
|
-
let deferred1_1;
|
|
1379
|
+
get chains() {
|
|
1476
1380
|
try {
|
|
1477
1381
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1478
|
-
wasm.
|
|
1382
|
+
wasm.multichainaccountmeta_chains(retptr, this.__wbg_ptr);
|
|
1479
1383
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1480
1384
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
return
|
|
1385
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1386
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
1387
|
+
return v1;
|
|
1484
1388
|
} finally {
|
|
1485
1389
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1486
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1487
1390
|
}
|
|
1488
1391
|
}
|
|
1489
1392
|
/**
|
|
1490
|
-
* @returns {
|
|
1393
|
+
* @returns {string}
|
|
1491
1394
|
*/
|
|
1492
|
-
get
|
|
1395
|
+
get username() {
|
|
1396
|
+
let deferred1_0;
|
|
1397
|
+
let deferred1_1;
|
|
1493
1398
|
try {
|
|
1494
1399
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1495
|
-
wasm.
|
|
1400
|
+
wasm.multichainaccountmeta_username(retptr, this.__wbg_ptr);
|
|
1496
1401
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1497
1402
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
return
|
|
1403
|
+
deferred1_0 = r0;
|
|
1404
|
+
deferred1_1 = r1;
|
|
1405
|
+
return getStringFromWasm0(r0, r1);
|
|
1501
1406
|
} finally {
|
|
1502
1407
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1408
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1503
1409
|
}
|
|
1504
1410
|
}
|
|
1505
1411
|
}
|
|
1506
1412
|
if (Symbol.dispose) MultiChainAccountMeta.prototype[Symbol.dispose] = MultiChainAccountMeta.prototype.free;
|
|
1507
1413
|
|
|
1508
|
-
|
|
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) {
|
|
1509
1483
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1510
1484
|
return addHeapObject(ret);
|
|
1511
1485
|
};
|
|
@@ -1518,13 +1492,13 @@ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
|
1518
1492
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1519
1493
|
};
|
|
1520
1494
|
|
|
1521
|
-
export function
|
|
1495
|
+
export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0) {
|
|
1522
1496
|
const v = getObject(arg0);
|
|
1523
1497
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1524
1498
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1525
1499
|
};
|
|
1526
1500
|
|
|
1527
|
-
export function
|
|
1501
|
+
export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
|
|
1528
1502
|
const ret = debugString(getObject(arg1));
|
|
1529
1503
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1530
1504
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -1532,45 +1506,45 @@ export function __wbg___wbindgen_debug_string_df47ffb5e35e6763(arg0, arg1) {
|
|
|
1532
1506
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1533
1507
|
};
|
|
1534
1508
|
|
|
1535
|
-
export function
|
|
1509
|
+
export function __wbg___wbindgen_in_0d3e1e8f0c669317(arg0, arg1) {
|
|
1536
1510
|
const ret = getObject(arg0) in getObject(arg1);
|
|
1537
1511
|
return ret;
|
|
1538
1512
|
};
|
|
1539
1513
|
|
|
1540
|
-
export function
|
|
1514
|
+
export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
|
|
1541
1515
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
1542
1516
|
return ret;
|
|
1543
1517
|
};
|
|
1544
1518
|
|
|
1545
|
-
export function
|
|
1519
|
+
export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
|
|
1546
1520
|
const val = getObject(arg0);
|
|
1547
1521
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1548
1522
|
return ret;
|
|
1549
1523
|
};
|
|
1550
1524
|
|
|
1551
|
-
export function
|
|
1525
|
+
export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) {
|
|
1552
1526
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
1553
1527
|
return ret;
|
|
1554
1528
|
};
|
|
1555
1529
|
|
|
1556
|
-
export function
|
|
1530
|
+
export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
|
|
1557
1531
|
const ret = getObject(arg0) === undefined;
|
|
1558
1532
|
return ret;
|
|
1559
1533
|
};
|
|
1560
1534
|
|
|
1561
|
-
export function
|
|
1535
|
+
export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0, arg1) {
|
|
1562
1536
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1563
1537
|
return ret;
|
|
1564
1538
|
};
|
|
1565
1539
|
|
|
1566
|
-
export function
|
|
1540
|
+
export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
|
|
1567
1541
|
const obj = getObject(arg1);
|
|
1568
1542
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1569
1543
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1570
1544
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1571
1545
|
};
|
|
1572
1546
|
|
|
1573
|
-
export function
|
|
1547
|
+
export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
|
|
1574
1548
|
const obj = getObject(arg1);
|
|
1575
1549
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1576
1550
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -1579,41 +1553,41 @@ export function __wbg___wbindgen_string_get_e4f06c90489ad01b(arg0, arg1) {
|
|
|
1579
1553
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1580
1554
|
};
|
|
1581
1555
|
|
|
1582
|
-
export function
|
|
1556
|
+
export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
|
|
1583
1557
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1584
1558
|
};
|
|
1585
1559
|
|
|
1586
|
-
export function
|
|
1560
|
+
export function __wbg__wbg_cb_unref_87dfb5aaa0cbcea7(arg0) {
|
|
1587
1561
|
getObject(arg0)._wbg_cb_unref();
|
|
1588
1562
|
};
|
|
1589
1563
|
|
|
1590
|
-
export function
|
|
1591
|
-
getObject(arg0).abort(
|
|
1564
|
+
export function __wbg_abort_07646c894ebbf2bd(arg0) {
|
|
1565
|
+
getObject(arg0).abort();
|
|
1592
1566
|
};
|
|
1593
1567
|
|
|
1594
|
-
export function
|
|
1595
|
-
getObject(arg0).abort();
|
|
1568
|
+
export function __wbg_abort_399ecbcfd6ef3c8e(arg0, arg1) {
|
|
1569
|
+
getObject(arg0).abort(getObject(arg1));
|
|
1596
1570
|
};
|
|
1597
1571
|
|
|
1598
|
-
export function
|
|
1572
|
+
export function __wbg_addEventListener_6a82629b3d430a48() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1599
1573
|
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
1600
1574
|
}, arguments) };
|
|
1601
1575
|
|
|
1602
|
-
export function
|
|
1576
|
+
export function __wbg_append_c5cbdf46455cc776() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1603
1577
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1604
1578
|
}, arguments) };
|
|
1605
1579
|
|
|
1606
|
-
export function
|
|
1580
|
+
export function __wbg_arrayBuffer_c04af4fce566092d() { return handleError(function (arg0) {
|
|
1607
1581
|
const ret = getObject(arg0).arrayBuffer();
|
|
1608
1582
|
return addHeapObject(ret);
|
|
1609
1583
|
}, arguments) };
|
|
1610
1584
|
|
|
1611
|
-
export function
|
|
1585
|
+
export function __wbg_call_3020136f7a2d6e44() { return handleError(function (arg0, arg1, arg2) {
|
|
1612
1586
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1613
1587
|
return addHeapObject(ret);
|
|
1614
1588
|
}, arguments) };
|
|
1615
1589
|
|
|
1616
|
-
export function
|
|
1590
|
+
export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
|
|
1617
1591
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1618
1592
|
return addHeapObject(ret);
|
|
1619
1593
|
}, arguments) };
|
|
@@ -1628,65 +1602,65 @@ export function __wbg_cartridgeaccountwithmeta_new(arg0) {
|
|
|
1628
1602
|
return addHeapObject(ret);
|
|
1629
1603
|
};
|
|
1630
1604
|
|
|
1631
|
-
export function
|
|
1605
|
+
export function __wbg_clearTimeout_42d9ccd50822fd3a(arg0) {
|
|
1632
1606
|
const ret = clearTimeout(takeObject(arg0));
|
|
1633
1607
|
return addHeapObject(ret);
|
|
1634
1608
|
};
|
|
1635
1609
|
|
|
1636
|
-
export function
|
|
1610
|
+
export function __wbg_clear_9fc28ed354d59d5e() { return handleError(function (arg0) {
|
|
1637
1611
|
getObject(arg0).clear();
|
|
1638
1612
|
}, arguments) };
|
|
1639
1613
|
|
|
1640
|
-
export function
|
|
1614
|
+
export function __wbg_create_07d71296a0909e61() { return handleError(function (arg0, arg1) {
|
|
1641
1615
|
const ret = getObject(arg0).create(getObject(arg1));
|
|
1642
1616
|
return addHeapObject(ret);
|
|
1643
1617
|
}, arguments) };
|
|
1644
1618
|
|
|
1645
|
-
export function
|
|
1619
|
+
export function __wbg_credentials_36e0572b476d4883(arg0) {
|
|
1646
1620
|
const ret = getObject(arg0).credentials;
|
|
1647
1621
|
return addHeapObject(ret);
|
|
1648
1622
|
};
|
|
1649
1623
|
|
|
1650
|
-
export function
|
|
1624
|
+
export function __wbg_crypto_86f2631e91b51511(arg0) {
|
|
1651
1625
|
const ret = getObject(arg0).crypto;
|
|
1652
1626
|
return addHeapObject(ret);
|
|
1653
1627
|
};
|
|
1654
1628
|
|
|
1655
|
-
export function
|
|
1629
|
+
export function __wbg_data_8bf4ae669a78a688(arg0) {
|
|
1656
1630
|
const ret = getObject(arg0).data;
|
|
1657
1631
|
return addHeapObject(ret);
|
|
1658
1632
|
};
|
|
1659
1633
|
|
|
1660
|
-
export function
|
|
1634
|
+
export function __wbg_done_62ea16af4ce34b24(arg0) {
|
|
1661
1635
|
const ret = getObject(arg0).done;
|
|
1662
1636
|
return ret;
|
|
1663
1637
|
};
|
|
1664
1638
|
|
|
1665
|
-
export function
|
|
1639
|
+
export function __wbg_error_7bc7d576a6aaf855(arg0) {
|
|
1666
1640
|
console.error(getObject(arg0));
|
|
1667
1641
|
};
|
|
1668
1642
|
|
|
1669
|
-
export function
|
|
1643
|
+
export function __wbg_fetch_6bbc32f991730587(arg0) {
|
|
1670
1644
|
const ret = fetch(getObject(arg0));
|
|
1671
1645
|
return addHeapObject(ret);
|
|
1672
1646
|
};
|
|
1673
1647
|
|
|
1674
|
-
export function
|
|
1675
|
-
const ret = fetch(getObject(
|
|
1648
|
+
export function __wbg_fetch_90447c28cc0b095e(arg0, arg1) {
|
|
1649
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1676
1650
|
return addHeapObject(ret);
|
|
1677
1651
|
};
|
|
1678
1652
|
|
|
1679
|
-
export function
|
|
1680
|
-
const ret =
|
|
1653
|
+
export function __wbg_fetch_f1856afdb49415d1(arg0) {
|
|
1654
|
+
const ret = fetch(getObject(arg0));
|
|
1681
1655
|
return addHeapObject(ret);
|
|
1682
1656
|
};
|
|
1683
1657
|
|
|
1684
|
-
export function
|
|
1658
|
+
export function __wbg_getClientExtensionResults_8668622b21a5eef7(arg0) {
|
|
1685
1659
|
const ret = getObject(arg0).getClientExtensionResults();
|
|
1686
1660
|
return addHeapObject(ret);
|
|
1687
1661
|
};
|
|
1688
1662
|
|
|
1689
|
-
export function
|
|
1663
|
+
export function __wbg_getItem_1340bfc9a10d5991() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1690
1664
|
const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
|
|
1691
1665
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1692
1666
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -1694,21 +1668,21 @@ export function __wbg_getItem_89f57d6acc51a876() { return handleError(function (
|
|
|
1694
1668
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1695
1669
|
}, arguments) };
|
|
1696
1670
|
|
|
1697
|
-
export function
|
|
1671
|
+
export function __wbg_getRandomValues_b3f15fcbfabb0f8b() { return handleError(function (arg0, arg1) {
|
|
1698
1672
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1699
1673
|
}, arguments) };
|
|
1700
1674
|
|
|
1701
|
-
export function
|
|
1675
|
+
export function __wbg_getTime_ad1e9878a735af08(arg0) {
|
|
1702
1676
|
const ret = getObject(arg0).getTime();
|
|
1703
1677
|
return ret;
|
|
1704
1678
|
};
|
|
1705
1679
|
|
|
1706
|
-
export function
|
|
1680
|
+
export function __wbg_get_29726a9b608aea28() { return handleError(function (arg0, arg1) {
|
|
1707
1681
|
const ret = getObject(arg0).get(getObject(arg1));
|
|
1708
1682
|
return addHeapObject(ret);
|
|
1709
1683
|
}, arguments) };
|
|
1710
1684
|
|
|
1711
|
-
export function
|
|
1685
|
+
export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
|
|
1712
1686
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1713
1687
|
return addHeapObject(ret);
|
|
1714
1688
|
}, arguments) };
|
|
@@ -1718,17 +1692,17 @@ export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
|
|
|
1718
1692
|
return addHeapObject(ret);
|
|
1719
1693
|
};
|
|
1720
1694
|
|
|
1721
|
-
export function
|
|
1695
|
+
export function __wbg_has_0e670569d65d3a45() { return handleError(function (arg0, arg1) {
|
|
1722
1696
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1723
1697
|
return ret;
|
|
1724
1698
|
}, arguments) };
|
|
1725
1699
|
|
|
1726
|
-
export function
|
|
1700
|
+
export function __wbg_headers_654c30e1bcccc552(arg0) {
|
|
1727
1701
|
const ret = getObject(arg0).headers;
|
|
1728
1702
|
return addHeapObject(ret);
|
|
1729
1703
|
};
|
|
1730
1704
|
|
|
1731
|
-
export function
|
|
1705
|
+
export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
|
|
1732
1706
|
let result;
|
|
1733
1707
|
try {
|
|
1734
1708
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -1739,7 +1713,7 @@ export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
|
|
|
1739
1713
|
return ret;
|
|
1740
1714
|
};
|
|
1741
1715
|
|
|
1742
|
-
export function
|
|
1716
|
+
export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
|
|
1743
1717
|
let result;
|
|
1744
1718
|
try {
|
|
1745
1719
|
result = getObject(arg0) instanceof Object;
|
|
@@ -1750,7 +1724,7 @@ export function __wbg_instanceof_Object_10bb762262230c68(arg0) {
|
|
|
1750
1724
|
return ret;
|
|
1751
1725
|
};
|
|
1752
1726
|
|
|
1753
|
-
export function
|
|
1727
|
+
export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
|
|
1754
1728
|
let result;
|
|
1755
1729
|
try {
|
|
1756
1730
|
result = getObject(arg0) instanceof Response;
|
|
@@ -1761,7 +1735,7 @@ export function __wbg_instanceof_Response_f4f3e87e07f3135c(arg0) {
|
|
|
1761
1735
|
return ret;
|
|
1762
1736
|
};
|
|
1763
1737
|
|
|
1764
|
-
export function
|
|
1738
|
+
export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
|
|
1765
1739
|
let result;
|
|
1766
1740
|
try {
|
|
1767
1741
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -1772,7 +1746,7 @@ export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
|
|
|
1772
1746
|
return ret;
|
|
1773
1747
|
};
|
|
1774
1748
|
|
|
1775
|
-
export function
|
|
1749
|
+
export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
|
|
1776
1750
|
let result;
|
|
1777
1751
|
try {
|
|
1778
1752
|
result = getObject(arg0) instanceof Window;
|
|
@@ -1783,7 +1757,7 @@ export function __wbg_instanceof_Window_4846dbb3de56c84c(arg0) {
|
|
|
1783
1757
|
return ret;
|
|
1784
1758
|
};
|
|
1785
1759
|
|
|
1786
|
-
export function
|
|
1760
|
+
export function __wbg_instanceof_WorkerGlobalScope_9a3411db21c65a54(arg0) {
|
|
1787
1761
|
let result;
|
|
1788
1762
|
try {
|
|
1789
1763
|
result = getObject(arg0) instanceof WorkerGlobalScope;
|
|
@@ -1794,13 +1768,13 @@ export function __wbg_instanceof_WorkerGlobalScope_e31f49b6d33fcadd(arg0) {
|
|
|
1794
1768
|
return ret;
|
|
1795
1769
|
};
|
|
1796
1770
|
|
|
1797
|
-
export function
|
|
1771
|
+
export function __wbg_iterator_27b7c8b35ab3e86b() {
|
|
1798
1772
|
const ret = Symbol.iterator;
|
|
1799
1773
|
return addHeapObject(ret);
|
|
1800
1774
|
};
|
|
1801
1775
|
|
|
1802
1776
|
export function __wbg_jschainconfig_unwrap(arg0) {
|
|
1803
|
-
const ret = JsChainConfig.__unwrap(
|
|
1777
|
+
const ret = JsChainConfig.__unwrap(getObject(arg0));
|
|
1804
1778
|
return ret;
|
|
1805
1779
|
};
|
|
1806
1780
|
|
|
@@ -1809,22 +1783,22 @@ export function __wbg_jscontrollererror_new(arg0) {
|
|
|
1809
1783
|
return addHeapObject(ret);
|
|
1810
1784
|
};
|
|
1811
1785
|
|
|
1812
|
-
export function
|
|
1786
|
+
export function __wbg_length_22ac23eaec9d8053(arg0) {
|
|
1813
1787
|
const ret = getObject(arg0).length;
|
|
1814
1788
|
return ret;
|
|
1815
1789
|
};
|
|
1816
1790
|
|
|
1817
|
-
export function
|
|
1791
|
+
export function __wbg_localStorage_e7a9e9fee8fc608d() { return handleError(function (arg0) {
|
|
1818
1792
|
const ret = getObject(arg0).localStorage;
|
|
1819
1793
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1820
1794
|
}, arguments) };
|
|
1821
1795
|
|
|
1822
|
-
export function
|
|
1796
|
+
export function __wbg_location_962e75c1c1b3ebed(arg0) {
|
|
1823
1797
|
const ret = getObject(arg0).location;
|
|
1824
1798
|
return addHeapObject(ret);
|
|
1825
1799
|
};
|
|
1826
1800
|
|
|
1827
|
-
export function
|
|
1801
|
+
export function __wbg_log_1d990106d99dacb7(arg0) {
|
|
1828
1802
|
console.log(getObject(arg0));
|
|
1829
1803
|
};
|
|
1830
1804
|
|
|
@@ -1833,7 +1807,7 @@ export function __wbg_loginresult_new(arg0) {
|
|
|
1833
1807
|
return addHeapObject(ret);
|
|
1834
1808
|
};
|
|
1835
1809
|
|
|
1836
|
-
export function
|
|
1810
|
+
export function __wbg_msCrypto_d562bbe83e0d4b91(arg0) {
|
|
1837
1811
|
const ret = getObject(arg0).msCrypto;
|
|
1838
1812
|
return addHeapObject(ret);
|
|
1839
1813
|
};
|
|
@@ -1843,39 +1817,59 @@ export function __wbg_multichainaccount_new(arg0) {
|
|
|
1843
1817
|
return addHeapObject(ret);
|
|
1844
1818
|
};
|
|
1845
1819
|
|
|
1846
|
-
export function
|
|
1820
|
+
export function __wbg_navigator_b49edef831236138(arg0) {
|
|
1847
1821
|
const ret = getObject(arg0).navigator;
|
|
1848
1822
|
return addHeapObject(ret);
|
|
1849
1823
|
};
|
|
1850
1824
|
|
|
1851
|
-
export function
|
|
1825
|
+
export function __wbg_new_0_23cedd11d9b40c9d() {
|
|
1852
1826
|
const ret = new Date();
|
|
1853
1827
|
return addHeapObject(ret);
|
|
1854
1828
|
};
|
|
1855
1829
|
|
|
1856
|
-
export function
|
|
1830
|
+
export function __wbg_new_1ba21ce319a06297() {
|
|
1857
1831
|
const ret = new Object();
|
|
1858
1832
|
return addHeapObject(ret);
|
|
1859
1833
|
};
|
|
1860
1834
|
|
|
1861
|
-
export function
|
|
1862
|
-
const ret = new
|
|
1835
|
+
export function __wbg_new_25f239778d6112b9() {
|
|
1836
|
+
const ret = new Array();
|
|
1863
1837
|
return addHeapObject(ret);
|
|
1864
|
-
}
|
|
1838
|
+
};
|
|
1865
1839
|
|
|
1866
1840
|
export function __wbg_new_2658d63118834d8e() {
|
|
1867
1841
|
const ret = new Mutex();
|
|
1868
1842
|
return addHeapObject(ret);
|
|
1869
1843
|
};
|
|
1870
1844
|
|
|
1871
|
-
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) {
|
|
1872
1866
|
try {
|
|
1873
1867
|
var state0 = {a: arg0, b: arg1};
|
|
1874
1868
|
var cb0 = (arg0, arg1) => {
|
|
1875
1869
|
const a = state0.a;
|
|
1876
1870
|
state0.a = 0;
|
|
1877
1871
|
try {
|
|
1878
|
-
return
|
|
1872
|
+
return __wasm_bindgen_func_elem_10868(a, state0.b, arg0, arg1);
|
|
1879
1873
|
} finally {
|
|
1880
1874
|
state0.a = a;
|
|
1881
1875
|
}
|
|
@@ -1887,62 +1881,42 @@ export function __wbg_new_3c3d849046688a66(arg0, arg1) {
|
|
|
1887
1881
|
}
|
|
1888
1882
|
};
|
|
1889
1883
|
|
|
1890
|
-
export function
|
|
1891
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1892
|
-
return addHeapObject(ret);
|
|
1893
|
-
};
|
|
1894
|
-
|
|
1895
|
-
export function __wbg_new_68651c719dcda04e() {
|
|
1896
|
-
const ret = new Map();
|
|
1897
|
-
return addHeapObject(ret);
|
|
1898
|
-
};
|
|
1899
|
-
|
|
1900
|
-
export function __wbg_new_9edf9838a2def39c() { return handleError(function () {
|
|
1901
|
-
const ret = new Headers();
|
|
1902
|
-
return addHeapObject(ret);
|
|
1903
|
-
}, arguments) };
|
|
1904
|
-
|
|
1905
|
-
export function __wbg_new_e17d9f43105b08be() {
|
|
1906
|
-
const ret = new Array();
|
|
1907
|
-
return addHeapObject(ret);
|
|
1908
|
-
};
|
|
1909
|
-
|
|
1910
|
-
export function __wbg_new_from_slice_92f4d78ca282a2d2(arg0, arg1) {
|
|
1884
|
+
export function __wbg_new_from_slice_f9c22b9153b26992(arg0, arg1) {
|
|
1911
1885
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1912
1886
|
return addHeapObject(ret);
|
|
1913
1887
|
};
|
|
1914
1888
|
|
|
1915
|
-
export function
|
|
1889
|
+
export function __wbg_new_no_args_cb138f77cf6151ee(arg0, arg1) {
|
|
1916
1890
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1917
1891
|
return addHeapObject(ret);
|
|
1918
1892
|
};
|
|
1919
1893
|
|
|
1920
|
-
export function
|
|
1894
|
+
export function __wbg_new_with_length_aa5eaf41d35235e5(arg0) {
|
|
1921
1895
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1922
1896
|
return addHeapObject(ret);
|
|
1923
1897
|
};
|
|
1924
1898
|
|
|
1925
|
-
export function
|
|
1899
|
+
export function __wbg_new_with_str_and_init_c5748f76f5108934() { return handleError(function (arg0, arg1, arg2) {
|
|
1926
1900
|
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1927
1901
|
return addHeapObject(ret);
|
|
1928
1902
|
}, arguments) };
|
|
1929
1903
|
|
|
1930
|
-
export function
|
|
1931
|
-
const ret = getObject(arg0).next();
|
|
1932
|
-
return addHeapObject(ret);
|
|
1933
|
-
}, arguments) };
|
|
1934
|
-
|
|
1935
|
-
export function __wbg_next_2c826fe5dfec6b6a(arg0) {
|
|
1904
|
+
export function __wbg_next_138a17bbf04e926c(arg0) {
|
|
1936
1905
|
const ret = getObject(arg0).next;
|
|
1937
1906
|
return addHeapObject(ret);
|
|
1938
1907
|
};
|
|
1939
1908
|
|
|
1940
|
-
export function
|
|
1909
|
+
export function __wbg_next_3cfe5c0fe2a4cc53() { return handleError(function (arg0) {
|
|
1910
|
+
const ret = getObject(arg0).next();
|
|
1911
|
+
return addHeapObject(ret);
|
|
1912
|
+
}, arguments) };
|
|
1913
|
+
|
|
1914
|
+
export function __wbg_node_e1f24f89a7336c2e(arg0) {
|
|
1941
1915
|
const ret = getObject(arg0).node;
|
|
1942
1916
|
return addHeapObject(ret);
|
|
1943
1917
|
};
|
|
1944
1918
|
|
|
1945
|
-
export function
|
|
1919
|
+
export function __wbg_now_69d776cd24f5215b() {
|
|
1946
1920
|
const ret = Date.now();
|
|
1947
1921
|
return ret;
|
|
1948
1922
|
};
|
|
@@ -1952,28 +1926,28 @@ export function __wbg_obtain_a9626b3b96e6dc2c(arg0) {
|
|
|
1952
1926
|
return addHeapObject(ret);
|
|
1953
1927
|
};
|
|
1954
1928
|
|
|
1955
|
-
export function
|
|
1929
|
+
export function __wbg_open_1611d5d1a9d8cf79() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1956
1930
|
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6));
|
|
1957
1931
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1958
1932
|
}, arguments) };
|
|
1959
1933
|
|
|
1960
|
-
export function
|
|
1934
|
+
export function __wbg_origin_4ab782e7fd21eede(arg0, arg1) {
|
|
1961
1935
|
const ret = getObject(arg1).origin;
|
|
1962
1936
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1963
1937
|
const len1 = WASM_VECTOR_LEN;
|
|
1964
1938
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1965
1939
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1966
|
-
}
|
|
1940
|
+
};
|
|
1967
1941
|
|
|
1968
|
-
export function
|
|
1942
|
+
export function __wbg_origin_c4ac149104b9ebad() { return handleError(function (arg0, arg1) {
|
|
1969
1943
|
const ret = getObject(arg1).origin;
|
|
1970
1944
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1971
1945
|
const len1 = WASM_VECTOR_LEN;
|
|
1972
1946
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1973
1947
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1974
|
-
};
|
|
1948
|
+
}, arguments) };
|
|
1975
1949
|
|
|
1976
|
-
export function
|
|
1950
|
+
export function __wbg_parse_7ff95c018af680b3(arg0, arg1) {
|
|
1977
1951
|
let deferred0_0;
|
|
1978
1952
|
let deferred0_1;
|
|
1979
1953
|
try {
|
|
@@ -1986,70 +1960,70 @@ export function __wbg_parse_41503dcdc1dc43f2(arg0, arg1) {
|
|
|
1986
1960
|
}
|
|
1987
1961
|
};
|
|
1988
1962
|
|
|
1989
|
-
export function
|
|
1963
|
+
export function __wbg_process_3975fd6c72f520aa(arg0) {
|
|
1990
1964
|
const ret = getObject(arg0).process;
|
|
1991
1965
|
return addHeapObject(ret);
|
|
1992
1966
|
};
|
|
1993
1967
|
|
|
1994
|
-
export function
|
|
1968
|
+
export function __wbg_prototypesetcall_dfe9b766cdc1f1fd(arg0, arg1, arg2) {
|
|
1995
1969
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1996
1970
|
};
|
|
1997
1971
|
|
|
1998
|
-
export function
|
|
1972
|
+
export function __wbg_push_7d9be8f38fc13975(arg0, arg1) {
|
|
1999
1973
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
2000
1974
|
return ret;
|
|
2001
1975
|
};
|
|
2002
1976
|
|
|
2003
|
-
export function
|
|
1977
|
+
export function __wbg_queueMicrotask_9b549dfce8865860(arg0) {
|
|
2004
1978
|
const ret = getObject(arg0).queueMicrotask;
|
|
2005
1979
|
return addHeapObject(ret);
|
|
2006
1980
|
};
|
|
2007
1981
|
|
|
2008
|
-
export function
|
|
1982
|
+
export function __wbg_queueMicrotask_fca69f5bfad613a5(arg0) {
|
|
2009
1983
|
queueMicrotask(getObject(arg0));
|
|
2010
1984
|
};
|
|
2011
1985
|
|
|
2012
|
-
export function
|
|
1986
|
+
export function __wbg_randomFillSync_f8c153b79f285817() { return handleError(function (arg0, arg1) {
|
|
2013
1987
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
2014
1988
|
}, arguments) };
|
|
2015
1989
|
|
|
2016
|
-
export function
|
|
1990
|
+
export function __wbg_removeEventListener_565e273024b68b75() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2017
1991
|
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
2018
1992
|
}, arguments) };
|
|
2019
1993
|
|
|
2020
|
-
export function
|
|
1994
|
+
export function __wbg_removeItem_33ed1aeb2dc68e96() { return handleError(function (arg0, arg1, arg2) {
|
|
2021
1995
|
getObject(arg0).removeItem(getStringFromWasm0(arg1, arg2));
|
|
2022
1996
|
}, arguments) };
|
|
2023
1997
|
|
|
2024
|
-
export function
|
|
1998
|
+
export function __wbg_require_b74f47fc2d022fd6() { return handleError(function () {
|
|
2025
1999
|
const ret = module.require;
|
|
2026
2000
|
return addHeapObject(ret);
|
|
2027
2001
|
}, arguments) };
|
|
2028
2002
|
|
|
2029
|
-
export function
|
|
2003
|
+
export function __wbg_resolve_fd5bfbaa4ce36e1e(arg0) {
|
|
2030
2004
|
const ret = Promise.resolve(getObject(arg0));
|
|
2031
2005
|
return addHeapObject(ret);
|
|
2032
2006
|
};
|
|
2033
2007
|
|
|
2034
|
-
export function
|
|
2008
|
+
export function __wbg_setItem_1167ad38996d6426() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2035
2009
|
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2036
2010
|
}, arguments) };
|
|
2037
2011
|
|
|
2038
|
-
export function
|
|
2012
|
+
export function __wbg_setTimeout_06477c23d31efef1() { return handleError(function (arg0, arg1, arg2) {
|
|
2039
2013
|
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2040
2014
|
return ret;
|
|
2041
2015
|
}, arguments) };
|
|
2042
2016
|
|
|
2043
|
-
export function
|
|
2044
|
-
const ret = setTimeout(getObject(arg0), arg1);
|
|
2045
|
-
return addHeapObject(ret);
|
|
2046
|
-
};
|
|
2047
|
-
|
|
2048
|
-
export function __wbg_setTimeout_d673afe2a3649259() { return handleError(function (arg0, arg1, arg2) {
|
|
2017
|
+
export function __wbg_setTimeout_425032fd8860bd1e() { return handleError(function (arg0, arg1, arg2) {
|
|
2049
2018
|
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2050
2019
|
return ret;
|
|
2051
2020
|
}, arguments) };
|
|
2052
2021
|
|
|
2022
|
+
export function __wbg_setTimeout_4ec014681668a581(arg0, arg1) {
|
|
2023
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
2024
|
+
return addHeapObject(ret);
|
|
2025
|
+
};
|
|
2026
|
+
|
|
2053
2027
|
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
2054
2028
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
2055
2029
|
};
|
|
@@ -2058,45 +2032,45 @@ export function __wbg_set_3fda3bac07393de4(arg0, arg1, arg2) {
|
|
|
2058
2032
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
2059
2033
|
};
|
|
2060
2034
|
|
|
2061
|
-
export function
|
|
2062
|
-
const ret = getObject(arg0)
|
|
2063
|
-
return
|
|
2064
|
-
};
|
|
2065
|
-
|
|
2066
|
-
export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
|
|
2067
|
-
getObject(arg0).body = getObject(arg1);
|
|
2068
|
-
};
|
|
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) };
|
|
2069
2039
|
|
|
2070
|
-
export function
|
|
2040
|
+
export function __wbg_set_7df433eea03a5c14(arg0, arg1, arg2) {
|
|
2071
2041
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
2072
2042
|
};
|
|
2073
2043
|
|
|
2074
|
-
export function
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
}, arguments) };
|
|
2044
|
+
export function __wbg_set_body_8e743242d6076a4f(arg0, arg1) {
|
|
2045
|
+
getObject(arg0).body = getObject(arg1);
|
|
2046
|
+
};
|
|
2078
2047
|
|
|
2079
|
-
export function
|
|
2048
|
+
export function __wbg_set_cache_0e437c7c8e838b9b(arg0, arg1) {
|
|
2080
2049
|
getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
|
|
2081
2050
|
};
|
|
2082
2051
|
|
|
2083
|
-
export function
|
|
2052
|
+
export function __wbg_set_credentials_55ae7c3c106fd5be(arg0, arg1) {
|
|
2084
2053
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
2085
2054
|
};
|
|
2086
2055
|
|
|
2087
|
-
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) {
|
|
2088
2062
|
getObject(arg0).headers = getObject(arg1);
|
|
2089
2063
|
};
|
|
2090
2064
|
|
|
2091
|
-
export function
|
|
2065
|
+
export function __wbg_set_method_76c69e41b3570627(arg0, arg1, arg2) {
|
|
2092
2066
|
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
2093
2067
|
};
|
|
2094
2068
|
|
|
2095
|
-
export function
|
|
2069
|
+
export function __wbg_set_mode_611016a6818fc690(arg0, arg1) {
|
|
2096
2070
|
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
2097
2071
|
};
|
|
2098
2072
|
|
|
2099
|
-
export function
|
|
2073
|
+
export function __wbg_set_signal_e89be862d0091009(arg0, arg1) {
|
|
2100
2074
|
getObject(arg0).signal = getObject(arg1);
|
|
2101
2075
|
};
|
|
2102
2076
|
|
|
@@ -2118,37 +2092,37 @@ export function __wbg_signMessage_c732ea9d998cac79() { return handleError(functi
|
|
|
2118
2092
|
}
|
|
2119
2093
|
}, arguments) };
|
|
2120
2094
|
|
|
2121
|
-
export function
|
|
2095
|
+
export function __wbg_signal_3c14fbdc89694b39(arg0) {
|
|
2122
2096
|
const ret = getObject(arg0).signal;
|
|
2123
2097
|
return addHeapObject(ret);
|
|
2124
2098
|
};
|
|
2125
2099
|
|
|
2126
|
-
export function
|
|
2100
|
+
export function __wbg_static_accessor_GLOBAL_769e6b65d6557335() {
|
|
2127
2101
|
const ret = typeof global === 'undefined' ? null : global;
|
|
2128
2102
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2129
2103
|
};
|
|
2130
2104
|
|
|
2131
|
-
export function
|
|
2105
|
+
export function __wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1() {
|
|
2132
2106
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2133
2107
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2134
2108
|
};
|
|
2135
2109
|
|
|
2136
|
-
export function
|
|
2110
|
+
export function __wbg_static_accessor_SELF_08f5a74c69739274() {
|
|
2137
2111
|
const ret = typeof self === 'undefined' ? null : self;
|
|
2138
2112
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2139
2113
|
};
|
|
2140
2114
|
|
|
2141
|
-
export function
|
|
2115
|
+
export function __wbg_static_accessor_WINDOW_a8924b26aa92d024() {
|
|
2142
2116
|
const ret = typeof window === 'undefined' ? null : window;
|
|
2143
2117
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2144
2118
|
};
|
|
2145
2119
|
|
|
2146
|
-
export function
|
|
2120
|
+
export function __wbg_status_9bfc680efca4bdfd(arg0) {
|
|
2147
2121
|
const ret = getObject(arg0).status;
|
|
2148
2122
|
return ret;
|
|
2149
2123
|
};
|
|
2150
2124
|
|
|
2151
|
-
export function
|
|
2125
|
+
export function __wbg_stringify_56d3c6664110414f(arg0, arg1) {
|
|
2152
2126
|
const ret = JSON.stringify(getObject(arg1));
|
|
2153
2127
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2154
2128
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -2156,32 +2130,32 @@ export function __wbg_stringify_404baa47f2ce77aa(arg0, arg1) {
|
|
|
2156
2130
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2157
2131
|
};
|
|
2158
2132
|
|
|
2159
|
-
export function
|
|
2133
|
+
export function __wbg_stringify_655a6390e1f5eb6b() { return handleError(function (arg0) {
|
|
2160
2134
|
const ret = JSON.stringify(getObject(arg0));
|
|
2161
2135
|
return addHeapObject(ret);
|
|
2162
2136
|
}, arguments) };
|
|
2163
2137
|
|
|
2164
|
-
export function
|
|
2138
|
+
export function __wbg_subarray_845f2f5bce7d061a(arg0, arg1, arg2) {
|
|
2165
2139
|
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
2166
2140
|
return addHeapObject(ret);
|
|
2167
2141
|
};
|
|
2168
2142
|
|
|
2169
|
-
export function
|
|
2143
|
+
export function __wbg_text_51046bb33d257f63() { return handleError(function (arg0) {
|
|
2170
2144
|
const ret = getObject(arg0).text();
|
|
2171
2145
|
return addHeapObject(ret);
|
|
2172
2146
|
}, arguments) };
|
|
2173
2147
|
|
|
2174
|
-
export function
|
|
2175
|
-
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));
|
|
2176
2150
|
return addHeapObject(ret);
|
|
2177
2151
|
};
|
|
2178
2152
|
|
|
2179
|
-
export function
|
|
2180
|
-
const ret = getObject(arg0).then(getObject(arg1)
|
|
2153
|
+
export function __wbg_then_4f95312d68691235(arg0, arg1) {
|
|
2154
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
2181
2155
|
return addHeapObject(ret);
|
|
2182
2156
|
};
|
|
2183
2157
|
|
|
2184
|
-
export function
|
|
2158
|
+
export function __wbg_url_b6d11838a4f95198(arg0, arg1) {
|
|
2185
2159
|
const ret = getObject(arg1).url;
|
|
2186
2160
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2187
2161
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -2189,7 +2163,7 @@ export function __wbg_url_b36d2a5008eb056f(arg0, arg1) {
|
|
|
2189
2163
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2190
2164
|
};
|
|
2191
2165
|
|
|
2192
|
-
export function
|
|
2166
|
+
export function __wbg_userAgent_e18bc0cc9ad38ec1() { return handleError(function (arg0, arg1) {
|
|
2193
2167
|
const ret = getObject(arg1).userAgent;
|
|
2194
2168
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2195
2169
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -2197,12 +2171,12 @@ export function __wbg_userAgent_b20949aa6be940a6() { return handleError(function
|
|
|
2197
2171
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2198
2172
|
}, arguments) };
|
|
2199
2173
|
|
|
2200
|
-
export function
|
|
2174
|
+
export function __wbg_value_57b7b035e117f7ee(arg0) {
|
|
2201
2175
|
const ret = getObject(arg0).value;
|
|
2202
2176
|
return addHeapObject(ret);
|
|
2203
2177
|
};
|
|
2204
2178
|
|
|
2205
|
-
export function
|
|
2179
|
+
export function __wbg_versions_4e31226f5e8dc909(arg0) {
|
|
2206
2180
|
const ret = getObject(arg0).versions;
|
|
2207
2181
|
return addHeapObject(ret);
|
|
2208
2182
|
};
|
|
@@ -2215,13 +2189,13 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
|
|
|
2215
2189
|
|
|
2216
2190
|
export function __wbindgen_cast_4082834687a71a5d(arg0, arg1) {
|
|
2217
2191
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 1, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
2218
|
-
const ret = makeClosure(arg0, arg1, wasm.
|
|
2192
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_235, __wasm_bindgen_func_elem_3270);
|
|
2219
2193
|
return addHeapObject(ret);
|
|
2220
2194
|
};
|
|
2221
2195
|
|
|
2222
|
-
export function
|
|
2223
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2224
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2196
|
+
export function __wbindgen_cast_7ee5a51087797a77(arg0, arg1) {
|
|
2197
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 964, function: Function { arguments: [], shim_idx: 965, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2198
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8615, __wasm_bindgen_func_elem_8624);
|
|
2225
2199
|
return addHeapObject(ret);
|
|
2226
2200
|
};
|
|
2227
2201
|
|
|
@@ -2231,9 +2205,9 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
|
|
|
2231
2205
|
return addHeapObject(ret);
|
|
2232
2206
|
};
|
|
2233
2207
|
|
|
2234
|
-
export function
|
|
2235
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2236
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2208
|
+
export function __wbindgen_cast_c1e81174c416a26f(arg0, arg1) {
|
|
2209
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 999, function: Function { arguments: [Externref], shim_idx: 1000, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2210
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8759, __wasm_bindgen_func_elem_8774);
|
|
2237
2211
|
return addHeapObject(ret);
|
|
2238
2212
|
};
|
|
2239
2213
|
|
|
@@ -2257,4 +2231,3 @@ export function __wbindgen_object_clone_ref(arg0) {
|
|
|
2257
2231
|
export function __wbindgen_object_drop_ref(arg0) {
|
|
2258
2232
|
takeObject(arg0);
|
|
2259
2233
|
};
|
|
2260
|
-
|