@cartridge/controller-wasm 0.7.14-3d082f2 → 0.7.14-4ec2e4fc
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 +7 -4
- package/pkg-controller/account_wasm.d.ts +382 -330
- package/pkg-controller/account_wasm.js +7 -2
- package/pkg-controller/account_wasm_bg.js +1274 -1353
- package/pkg-controller/account_wasm_bg.wasm +0 -0
- package/pkg-session/session_wasm.d.ts +205 -165
- package/pkg-session/session_wasm.js +7 -2
- package/pkg-session/session_wasm_bg.js +842 -940
- package/pkg-session/session_wasm_bg.wasm +0 -0
|
@@ -1,471 +1,7 @@
|
|
|
1
1
|
import { Mutex } from './snippets/account-wasm-35da9c7350cbc3ae/src/wasm-mutex.js';
|
|
2
2
|
|
|
3
|
-
let wasm;
|
|
4
|
-
export function __wbg_set_wasm(val) {
|
|
5
|
-
wasm = val;
|
|
6
|
-
}
|
|
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
|
-
function addHeapObject(obj) {
|
|
46
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
47
|
-
const idx = heap_next;
|
|
48
|
-
heap_next = heap[idx];
|
|
49
|
-
|
|
50
|
-
heap[idx] = obj;
|
|
51
|
-
return idx;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function getObject(idx) { return heap[idx]; }
|
|
55
|
-
|
|
56
|
-
let WASM_VECTOR_LEN = 0;
|
|
57
|
-
|
|
58
|
-
const cachedTextEncoder = new TextEncoder();
|
|
59
|
-
|
|
60
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
61
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
62
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
63
|
-
view.set(buf);
|
|
64
|
-
return {
|
|
65
|
-
read: arg.length,
|
|
66
|
-
written: buf.length
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
72
|
-
|
|
73
|
-
if (realloc === undefined) {
|
|
74
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
75
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
76
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
77
|
-
WASM_VECTOR_LEN = buf.length;
|
|
78
|
-
return ptr;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
let len = arg.length;
|
|
82
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
83
|
-
|
|
84
|
-
const mem = getUint8ArrayMemory0();
|
|
85
|
-
|
|
86
|
-
let offset = 0;
|
|
87
|
-
|
|
88
|
-
for (; offset < len; offset++) {
|
|
89
|
-
const code = arg.charCodeAt(offset);
|
|
90
|
-
if (code > 0x7F) break;
|
|
91
|
-
mem[ptr + offset] = code;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (offset !== len) {
|
|
95
|
-
if (offset !== 0) {
|
|
96
|
-
arg = arg.slice(offset);
|
|
97
|
-
}
|
|
98
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
99
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
100
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
101
|
-
|
|
102
|
-
offset += ret.written;
|
|
103
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
WASM_VECTOR_LEN = offset;
|
|
107
|
-
return ptr;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
let cachedDataViewMemory0 = null;
|
|
111
|
-
|
|
112
|
-
function getDataViewMemory0() {
|
|
113
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
114
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
115
|
-
}
|
|
116
|
-
return cachedDataViewMemory0;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function isLikeNone(x) {
|
|
120
|
-
return x === undefined || x === null;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function debugString(val) {
|
|
124
|
-
// primitive types
|
|
125
|
-
const type = typeof val;
|
|
126
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
127
|
-
return `${val}`;
|
|
128
|
-
}
|
|
129
|
-
if (type == 'string') {
|
|
130
|
-
return `"${val}"`;
|
|
131
|
-
}
|
|
132
|
-
if (type == 'symbol') {
|
|
133
|
-
const description = val.description;
|
|
134
|
-
if (description == null) {
|
|
135
|
-
return 'Symbol';
|
|
136
|
-
} else {
|
|
137
|
-
return `Symbol(${description})`;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (type == 'function') {
|
|
141
|
-
const name = val.name;
|
|
142
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
143
|
-
return `Function(${name})`;
|
|
144
|
-
} else {
|
|
145
|
-
return 'Function';
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
// objects
|
|
149
|
-
if (Array.isArray(val)) {
|
|
150
|
-
const length = val.length;
|
|
151
|
-
let debug = '[';
|
|
152
|
-
if (length > 0) {
|
|
153
|
-
debug += debugString(val[0]);
|
|
154
|
-
}
|
|
155
|
-
for(let i = 1; i < length; i++) {
|
|
156
|
-
debug += ', ' + debugString(val[i]);
|
|
157
|
-
}
|
|
158
|
-
debug += ']';
|
|
159
|
-
return debug;
|
|
160
|
-
}
|
|
161
|
-
// Test for built-in
|
|
162
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
163
|
-
let className;
|
|
164
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
165
|
-
className = builtInMatches[1];
|
|
166
|
-
} else {
|
|
167
|
-
// Failed to match the standard '[object ClassName]'
|
|
168
|
-
return toString.call(val);
|
|
169
|
-
}
|
|
170
|
-
if (className == 'Object') {
|
|
171
|
-
// we're a user defined class or Object
|
|
172
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
173
|
-
// easier than looping through ownProperties of `val`.
|
|
174
|
-
try {
|
|
175
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
176
|
-
} catch (_) {
|
|
177
|
-
return 'Object';
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
// errors
|
|
181
|
-
if (val instanceof Error) {
|
|
182
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
183
|
-
}
|
|
184
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
185
|
-
return className;
|
|
186
|
-
}
|
|
187
|
-
|
|
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
|
-
function dropObject(idx) {
|
|
197
|
-
if (idx < 132) return;
|
|
198
|
-
heap[idx] = heap_next;
|
|
199
|
-
heap_next = idx;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
function takeObject(idx) {
|
|
203
|
-
const ret = getObject(idx);
|
|
204
|
-
dropObject(idx);
|
|
205
|
-
return ret;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
209
|
-
ptr = ptr >>> 0;
|
|
210
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
214
|
-
? { register: () => {}, unregister: () => {} }
|
|
215
|
-
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
216
|
-
|
|
217
|
-
function makeClosure(arg0, arg1, dtor, f) {
|
|
218
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
219
|
-
const real = (...args) => {
|
|
220
|
-
|
|
221
|
-
// First up with a closure we increment the internal reference
|
|
222
|
-
// count. This ensures that the Rust closure environment won't
|
|
223
|
-
// be deallocated while we're invoking it.
|
|
224
|
-
state.cnt++;
|
|
225
|
-
try {
|
|
226
|
-
return f(state.a, state.b, ...args);
|
|
227
|
-
} finally {
|
|
228
|
-
real._wbg_cb_unref();
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
real._wbg_cb_unref = () => {
|
|
232
|
-
if (--state.cnt === 0) {
|
|
233
|
-
state.dtor(state.a, state.b);
|
|
234
|
-
state.a = 0;
|
|
235
|
-
CLOSURE_DTORS.unregister(state);
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
239
|
-
return real;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
243
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
244
|
-
const real = (...args) => {
|
|
245
|
-
|
|
246
|
-
// First up with a closure we increment the internal reference
|
|
247
|
-
// count. This ensures that the Rust closure environment won't
|
|
248
|
-
// be deallocated while we're invoking it.
|
|
249
|
-
state.cnt++;
|
|
250
|
-
const a = state.a;
|
|
251
|
-
state.a = 0;
|
|
252
|
-
try {
|
|
253
|
-
return f(a, state.b, ...args);
|
|
254
|
-
} finally {
|
|
255
|
-
state.a = a;
|
|
256
|
-
real._wbg_cb_unref();
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
real._wbg_cb_unref = () => {
|
|
260
|
-
if (--state.cnt === 0) {
|
|
261
|
-
state.dtor(state.a, state.b);
|
|
262
|
-
state.a = 0;
|
|
263
|
-
CLOSURE_DTORS.unregister(state);
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
267
|
-
return real;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
271
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
272
|
-
const mem = getDataViewMemory0();
|
|
273
|
-
for (let i = 0; i < array.length; i++) {
|
|
274
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
275
|
-
}
|
|
276
|
-
WASM_VECTOR_LEN = array.length;
|
|
277
|
-
return ptr;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Computes the Starknet contract address for a controller account without needing a full instance.
|
|
281
|
-
*
|
|
282
|
-
* # Arguments
|
|
283
|
-
*
|
|
284
|
-
* * `class_hash` - The class hash of the account contract (JsFelt).
|
|
285
|
-
* * `owner` - The owner configuration for the account.
|
|
286
|
-
* * `salt` - The salt used for address calculation (JsFelt).
|
|
287
|
-
*
|
|
288
|
-
* # Returns
|
|
289
|
-
*
|
|
290
|
-
* The computed Starknet contract address as a `JsFelt`.
|
|
291
|
-
* @param {JsFelt} class_hash
|
|
292
|
-
* @param {Owner} owner
|
|
293
|
-
* @param {JsFelt} salt
|
|
294
|
-
* @returns {JsFelt}
|
|
295
|
-
*/
|
|
296
|
-
export function computeAccountAddress(class_hash, owner, salt) {
|
|
297
|
-
try {
|
|
298
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
299
|
-
wasm.computeAccountAddress(retptr, addHeapObject(class_hash), addHeapObject(owner), addHeapObject(salt));
|
|
300
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
301
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
302
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
303
|
-
if (r2) {
|
|
304
|
-
throw takeObject(r1);
|
|
305
|
-
}
|
|
306
|
-
return takeObject(r0);
|
|
307
|
-
} finally {
|
|
308
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
function _assertClass(instance, klass) {
|
|
313
|
-
if (!(instance instanceof klass)) {
|
|
314
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
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
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* @param {Signer} signer
|
|
344
|
-
* @returns {JsFelt}
|
|
345
|
-
*/
|
|
346
|
-
export function signerToGuid(signer) {
|
|
347
|
-
try {
|
|
348
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
349
|
-
wasm.signerToGuid(retptr, addHeapObject(signer));
|
|
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);
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
function __wasm_bindgen_func_elem_8834(arg0, arg1, arg2) {
|
|
363
|
-
wasm.__wasm_bindgen_func_elem_8834(arg0, arg1, addHeapObject(arg2));
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
function __wasm_bindgen_func_elem_3186(arg0, arg1, arg2) {
|
|
367
|
-
wasm.__wasm_bindgen_func_elem_3186(arg0, arg1, addHeapObject(arg2));
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
function __wasm_bindgen_func_elem_8690(arg0, arg1) {
|
|
371
|
-
wasm.__wasm_bindgen_func_elem_8690(arg0, arg1);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
function __wasm_bindgen_func_elem_10962(arg0, arg1, arg2, arg3) {
|
|
375
|
-
wasm.__wasm_bindgen_func_elem_10962(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* @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}
|
|
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
|
-
});
|
|
456
|
-
|
|
457
|
-
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
458
|
-
|
|
459
|
-
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
460
|
-
|
|
461
|
-
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
462
|
-
|
|
463
|
-
const CartridgeAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
464
|
-
? { register: () => {}, unregister: () => {} }
|
|
465
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccount_free(ptr >>> 0, 1));
|
|
466
3
|
|
|
467
4
|
export class CartridgeAccount {
|
|
468
|
-
|
|
469
5
|
static __wrap(ptr) {
|
|
470
6
|
ptr = ptr >>> 0;
|
|
471
7
|
const obj = Object.create(CartridgeAccount.prototype);
|
|
@@ -473,126 +9,36 @@ export class CartridgeAccount {
|
|
|
473
9
|
CartridgeAccountFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
474
10
|
return obj;
|
|
475
11
|
}
|
|
476
|
-
|
|
477
12
|
__destroy_into_raw() {
|
|
478
13
|
const ptr = this.__wbg_ptr;
|
|
479
14
|
this.__wbg_ptr = 0;
|
|
480
15
|
CartridgeAccountFinalization.unregister(this);
|
|
481
16
|
return ptr;
|
|
482
17
|
}
|
|
483
|
-
|
|
484
18
|
free() {
|
|
485
19
|
const ptr = this.__destroy_into_raw();
|
|
486
20
|
wasm.__wbg_cartridgeaccount_free(ptr, 0);
|
|
487
21
|
}
|
|
488
22
|
/**
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
493
|
-
* - `address`: The blockchain address associated with the account.
|
|
494
|
-
* - `username`: Username associated with the account.
|
|
495
|
-
* - `owner`: A Owner struct containing the owner signer and associated data.
|
|
496
|
-
* @param {JsFelt} class_hash
|
|
497
|
-
* @param {string} rpc_url
|
|
498
|
-
* @param {JsFelt} address
|
|
499
|
-
* @param {string} username
|
|
500
|
-
* @param {Owner} owner
|
|
501
|
-
* @param {string} cartridge_api_url
|
|
502
|
-
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
503
|
-
*/
|
|
504
|
-
static new(class_hash, rpc_url, address, username, owner, cartridge_api_url) {
|
|
505
|
-
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
506
|
-
const len0 = WASM_VECTOR_LEN;
|
|
507
|
-
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
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);
|
|
512
|
-
return takeObject(ret);
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Creates a new `CartridgeAccount` instance with a randomly generated Starknet signer.
|
|
516
|
-
* The controller address is computed internally based on the generated signer.
|
|
517
|
-
*
|
|
518
|
-
* # Parameters
|
|
519
|
-
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
520
|
-
* - `username`: Username associated with the account.
|
|
521
|
-
* @param {JsFelt} class_hash
|
|
522
|
-
* @param {string} rpc_url
|
|
523
|
-
* @param {string} username
|
|
524
|
-
* @param {string} cartridge_api_url
|
|
525
|
-
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
526
|
-
*/
|
|
527
|
-
static newHeadless(class_hash, rpc_url, username, cartridge_api_url) {
|
|
528
|
-
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
529
|
-
const len0 = WASM_VECTOR_LEN;
|
|
530
|
-
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
531
|
-
const len1 = WASM_VECTOR_LEN;
|
|
532
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
533
|
-
const len2 = WASM_VECTOR_LEN;
|
|
534
|
-
const ret = wasm.cartridgeaccount_newHeadless(addHeapObject(class_hash), ptr0, len0, ptr1, len1, ptr2, len2);
|
|
535
|
-
return takeObject(ret);
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* @param {string} cartridge_api_url
|
|
539
|
-
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
540
|
-
*/
|
|
541
|
-
static fromStorage(cartridge_api_url) {
|
|
542
|
-
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
543
|
-
const len0 = WASM_VECTOR_LEN;
|
|
544
|
-
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
545
|
-
return takeObject(ret);
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
23
|
+
* @param {Signer | null} [owner]
|
|
24
|
+
* @param {JsAddSignerInput | null} [signer_input]
|
|
25
|
+
* @param {string | null} [rp_id]
|
|
548
26
|
* @returns {Promise<void>}
|
|
549
27
|
*/
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* @param {string} app_id
|
|
556
|
-
* @param {Policy[]} policies
|
|
557
|
-
* @param {bigint} expires_at
|
|
558
|
-
* @param {JsFelt} public_key
|
|
559
|
-
* @param {JsFeeEstimate | null} [max_fee]
|
|
560
|
-
* @returns {Promise<any>}
|
|
561
|
-
*/
|
|
562
|
-
registerSession(app_id, policies, expires_at, public_key, max_fee) {
|
|
563
|
-
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
564
|
-
const len0 = WASM_VECTOR_LEN;
|
|
565
|
-
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
566
|
-
const len1 = WASM_VECTOR_LEN;
|
|
567
|
-
const ret = wasm.cartridgeaccount_registerSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, addHeapObject(public_key), isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
28
|
+
addOwner(owner, signer_input, rp_id) {
|
|
29
|
+
var ptr0 = isLikeNone(rp_id) ? 0 : passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
30
|
+
var len0 = WASM_VECTOR_LEN;
|
|
31
|
+
const ret = wasm.cartridgeaccount_addOwner(this.__wbg_ptr, isLikeNone(owner) ? 0 : addHeapObject(owner), isLikeNone(signer_input) ? 0 : addHeapObject(signer_input), ptr0, len0);
|
|
568
32
|
return takeObject(ret);
|
|
569
33
|
}
|
|
570
34
|
/**
|
|
571
|
-
* @param {
|
|
572
|
-
* @
|
|
573
|
-
* @param {JsFelt} public_key
|
|
574
|
-
* @returns {Promise<any>}
|
|
35
|
+
* @param {string} rp_id
|
|
36
|
+
* @returns {Promise<JsAddSignerInput>}
|
|
575
37
|
*/
|
|
576
|
-
|
|
577
|
-
const ptr0 =
|
|
38
|
+
createPasskeySigner(rp_id) {
|
|
39
|
+
const ptr0 = passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
578
40
|
const len0 = WASM_VECTOR_LEN;
|
|
579
|
-
const ret = wasm.
|
|
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));
|
|
41
|
+
const ret = wasm.cartridgeaccount_createPasskeySigner(this.__wbg_ptr, ptr0, len0);
|
|
596
42
|
return takeObject(ret);
|
|
597
43
|
}
|
|
598
44
|
/**
|
|
@@ -611,46 +57,25 @@ export class CartridgeAccount {
|
|
|
611
57
|
return takeObject(ret);
|
|
612
58
|
}
|
|
613
59
|
/**
|
|
614
|
-
* @
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
skipSession(app_id, policies) {
|
|
619
|
-
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
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);
|
|
624
|
-
return takeObject(ret);
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* @param {Signer | null} [owner]
|
|
628
|
-
* @param {JsAddSignerInput | null} [signer_input]
|
|
629
|
-
* @param {string | null} [rp_id]
|
|
630
|
-
* @returns {Promise<void>}
|
|
631
|
-
*/
|
|
632
|
-
addOwner(owner, signer_input, rp_id) {
|
|
633
|
-
var ptr0 = isLikeNone(rp_id) ? 0 : passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
634
|
-
var len0 = WASM_VECTOR_LEN;
|
|
635
|
-
const ret = wasm.cartridgeaccount_addOwner(this.__wbg_ptr, isLikeNone(owner) ? 0 : addHeapObject(owner), isLikeNone(signer_input) ? 0 : addHeapObject(signer_input), ptr0, len0);
|
|
60
|
+
* @returns {Promise<JsFelt>}
|
|
61
|
+
*/
|
|
62
|
+
delegateAccount() {
|
|
63
|
+
const ret = wasm.cartridgeaccount_delegateAccount(this.__wbg_ptr);
|
|
636
64
|
return takeObject(ret);
|
|
637
65
|
}
|
|
638
66
|
/**
|
|
639
|
-
* @param {
|
|
640
|
-
* @returns {Promise<
|
|
67
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
68
|
+
* @returns {Promise<any>}
|
|
641
69
|
*/
|
|
642
|
-
|
|
643
|
-
const ret = wasm.
|
|
70
|
+
deploySelf(max_fee) {
|
|
71
|
+
const ret = wasm.cartridgeaccount_deploySelf(this.__wbg_ptr, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
644
72
|
return takeObject(ret);
|
|
645
73
|
}
|
|
646
74
|
/**
|
|
647
|
-
* @
|
|
648
|
-
* @returns {Promise<JsAddSignerInput>}
|
|
75
|
+
* @returns {Promise<void>}
|
|
649
76
|
*/
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
const len0 = WASM_VECTOR_LEN;
|
|
653
|
-
const ret = wasm.cartridgeaccount_createPasskeySigner(this.__wbg_ptr, ptr0, len0);
|
|
77
|
+
disconnect() {
|
|
78
|
+
const ret = wasm.cartridgeaccount_disconnect(this.__wbg_ptr);
|
|
654
79
|
return takeObject(ret);
|
|
655
80
|
}
|
|
656
81
|
/**
|
|
@@ -697,29 +122,81 @@ export class CartridgeAccount {
|
|
|
697
122
|
const ret = wasm.cartridgeaccount_executeFromOutsideV3(this.__wbg_ptr, ptr0, len0, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
698
123
|
return takeObject(ret);
|
|
699
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* @param {string | null} [app_id]
|
|
127
|
+
* @returns {Promise<ImportedSessionMetadata | undefined>}
|
|
128
|
+
*/
|
|
129
|
+
exportAuthorizedSession(app_id) {
|
|
130
|
+
var ptr0 = isLikeNone(app_id) ? 0 : passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
131
|
+
var len0 = WASM_VECTOR_LEN;
|
|
132
|
+
const ret = wasm.cartridgeaccount_exportAuthorizedSession(this.__wbg_ptr, ptr0, len0);
|
|
133
|
+
return takeObject(ret);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @returns {Promise<ImportedControllerMetadata>}
|
|
137
|
+
*/
|
|
138
|
+
exportMetadata() {
|
|
139
|
+
const ret = wasm.cartridgeaccount_exportMetadata(this.__wbg_ptr);
|
|
140
|
+
return takeObject(ret);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* @param {string} cartridge_api_url
|
|
144
|
+
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
145
|
+
*/
|
|
146
|
+
static fromStorage(cartridge_api_url) {
|
|
147
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
148
|
+
const len0 = WASM_VECTOR_LEN;
|
|
149
|
+
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
150
|
+
return takeObject(ret);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* @returns {Promise<any>}
|
|
154
|
+
*/
|
|
155
|
+
getNonce() {
|
|
156
|
+
const ret = wasm.cartridgeaccount_getNonce(this.__wbg_ptr);
|
|
157
|
+
return takeObject(ret);
|
|
158
|
+
}
|
|
700
159
|
/**
|
|
701
160
|
* @param {string} app_id
|
|
702
161
|
* @param {JsCall[]} calls
|
|
703
|
-
* @
|
|
704
|
-
* @returns {Promise<any>}
|
|
162
|
+
* @returns {Promise<boolean>}
|
|
705
163
|
*/
|
|
706
|
-
|
|
164
|
+
hasAuthorizedPoliciesForCalls(app_id, calls) {
|
|
707
165
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
708
166
|
const len0 = WASM_VECTOR_LEN;
|
|
709
167
|
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
710
168
|
const len1 = WASM_VECTOR_LEN;
|
|
711
|
-
const ret = wasm.
|
|
169
|
+
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForCalls(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
712
170
|
return takeObject(ret);
|
|
713
171
|
}
|
|
714
172
|
/**
|
|
715
|
-
* @param {
|
|
716
|
-
* @param {
|
|
717
|
-
* @returns {Promise<
|
|
173
|
+
* @param {string} app_id
|
|
174
|
+
* @param {string} typed_data
|
|
175
|
+
* @returns {Promise<boolean>}
|
|
718
176
|
*/
|
|
719
|
-
|
|
720
|
-
const ptr0 =
|
|
177
|
+
hasAuthorizedPoliciesForMessage(app_id, typed_data) {
|
|
178
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
721
179
|
const len0 = WASM_VECTOR_LEN;
|
|
722
|
-
const
|
|
180
|
+
const ptr1 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
181
|
+
const len1 = WASM_VECTOR_LEN;
|
|
182
|
+
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
183
|
+
return takeObject(ret);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Checks if there are stored policies for a given app_id.
|
|
187
|
+
*
|
|
188
|
+
* # Parameters
|
|
189
|
+
* - `app_id`: The application identifier to check for stored policies
|
|
190
|
+
*
|
|
191
|
+
* # Returns
|
|
192
|
+
* `true` if policies exist for the given app_id, `false` otherwise
|
|
193
|
+
* @param {string} app_id
|
|
194
|
+
* @returns {Promise<boolean>}
|
|
195
|
+
*/
|
|
196
|
+
hasPoliciesForAppId(app_id) {
|
|
197
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
198
|
+
const len0 = WASM_VECTOR_LEN;
|
|
199
|
+
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
723
200
|
return takeObject(ret);
|
|
724
201
|
}
|
|
725
202
|
/**
|
|
@@ -736,79 +213,133 @@ export class CartridgeAccount {
|
|
|
736
213
|
return takeObject(ret);
|
|
737
214
|
}
|
|
738
215
|
/**
|
|
739
|
-
* @param {
|
|
216
|
+
* @param {ImportedSessionMetadata} imported_session
|
|
740
217
|
* @returns {Promise<void>}
|
|
741
218
|
*/
|
|
742
|
-
|
|
743
|
-
const ret = wasm.
|
|
219
|
+
importSession(imported_session) {
|
|
220
|
+
const ret = wasm.cartridgeaccount_importSession(this.__wbg_ptr, addHeapObject(imported_session));
|
|
744
221
|
return takeObject(ret);
|
|
745
222
|
}
|
|
746
223
|
/**
|
|
747
|
-
* @param {
|
|
748
|
-
* @
|
|
224
|
+
* @param {Policy[]} policies
|
|
225
|
+
* @param {JsFelt | null} [public_key]
|
|
226
|
+
* @returns {Promise<AuthorizedSession | undefined>}
|
|
749
227
|
*/
|
|
750
|
-
|
|
751
|
-
const ptr0 = passArrayJsValueToWasm0(
|
|
228
|
+
isRegisteredSessionAuthorized(policies, public_key) {
|
|
229
|
+
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
752
230
|
const len0 = WASM_VECTOR_LEN;
|
|
753
|
-
const ret = wasm.
|
|
231
|
+
const ret = wasm.cartridgeaccount_isRegisteredSessionAuthorized(this.__wbg_ptr, ptr0, len0, isLikeNone(public_key) ? 0 : addHeapObject(public_key));
|
|
754
232
|
return takeObject(ret);
|
|
755
233
|
}
|
|
756
234
|
/**
|
|
757
|
-
*
|
|
758
|
-
*
|
|
235
|
+
* Creates a new `CartridgeAccount` instance.
|
|
236
|
+
*
|
|
237
|
+
* # Parameters
|
|
238
|
+
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
239
|
+
* - `address`: The blockchain address associated with the account.
|
|
240
|
+
* - `username`: Username associated with the account.
|
|
241
|
+
* - `owner`: A Owner struct containing the owner signer and associated data.
|
|
242
|
+
* @param {JsFelt} class_hash
|
|
243
|
+
* @param {string} rpc_url
|
|
244
|
+
* @param {JsFelt} address
|
|
245
|
+
* @param {string} username
|
|
246
|
+
* @param {Owner} owner
|
|
247
|
+
* @param {string} cartridge_api_url
|
|
248
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
759
249
|
*/
|
|
760
|
-
|
|
761
|
-
const ptr0 = passStringToWasm0(
|
|
250
|
+
static new(class_hash, rpc_url, address, username, owner, cartridge_api_url) {
|
|
251
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
762
252
|
const len0 = WASM_VECTOR_LEN;
|
|
763
|
-
const
|
|
253
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
254
|
+
const len1 = WASM_VECTOR_LEN;
|
|
255
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
256
|
+
const len2 = WASM_VECTOR_LEN;
|
|
257
|
+
const ret = wasm.cartridgeaccount_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(address), ptr1, len1, addHeapObject(owner), ptr2, len2);
|
|
764
258
|
return takeObject(ret);
|
|
765
259
|
}
|
|
766
260
|
/**
|
|
767
|
-
*
|
|
261
|
+
* Creates a new `CartridgeAccount` instance with a randomly generated Starknet signer.
|
|
262
|
+
* The controller address is computed internally based on the generated signer.
|
|
263
|
+
*
|
|
264
|
+
* # Parameters
|
|
265
|
+
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
266
|
+
* - `username`: Username associated with the account.
|
|
267
|
+
* @param {JsFelt} class_hash
|
|
268
|
+
* @param {string} rpc_url
|
|
269
|
+
* @param {string} username
|
|
270
|
+
* @param {string} cartridge_api_url
|
|
271
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
768
272
|
*/
|
|
769
|
-
|
|
770
|
-
const
|
|
273
|
+
static newHeadless(class_hash, rpc_url, username, cartridge_api_url) {
|
|
274
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
275
|
+
const len0 = WASM_VECTOR_LEN;
|
|
276
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
277
|
+
const len1 = WASM_VECTOR_LEN;
|
|
278
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
279
|
+
const len2 = WASM_VECTOR_LEN;
|
|
280
|
+
const ret = wasm.cartridgeaccount_newHeadless(addHeapObject(class_hash), ptr0, len0, ptr1, len1, ptr2, len2);
|
|
281
|
+
return takeObject(ret);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* @param {JsRegister} register
|
|
285
|
+
* @returns {Promise<JsRegisterResponse>}
|
|
286
|
+
*/
|
|
287
|
+
register(register) {
|
|
288
|
+
const ret = wasm.cartridgeaccount_register(this.__wbg_ptr, addHeapObject(register));
|
|
771
289
|
return takeObject(ret);
|
|
772
290
|
}
|
|
773
291
|
/**
|
|
292
|
+
* @param {string} app_id
|
|
293
|
+
* @param {Policy[]} policies
|
|
294
|
+
* @param {bigint} expires_at
|
|
295
|
+
* @param {JsFelt} public_key
|
|
774
296
|
* @param {JsFeeEstimate | null} [max_fee]
|
|
775
297
|
* @returns {Promise<any>}
|
|
776
298
|
*/
|
|
777
|
-
|
|
778
|
-
const
|
|
299
|
+
registerSession(app_id, policies, expires_at, public_key, max_fee) {
|
|
300
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
301
|
+
const len0 = WASM_VECTOR_LEN;
|
|
302
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
303
|
+
const len1 = WASM_VECTOR_LEN;
|
|
304
|
+
const ret = wasm.cartridgeaccount_registerSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, addHeapObject(public_key), isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
779
305
|
return takeObject(ret);
|
|
780
306
|
}
|
|
781
307
|
/**
|
|
782
|
-
* @
|
|
308
|
+
* @param {Policy[]} policies
|
|
309
|
+
* @param {bigint} expires_at
|
|
310
|
+
* @param {JsFelt} public_key
|
|
311
|
+
* @returns {Promise<any>}
|
|
783
312
|
*/
|
|
784
|
-
|
|
785
|
-
const
|
|
313
|
+
registerSessionCalldata(policies, expires_at, public_key) {
|
|
314
|
+
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
315
|
+
const len0 = WASM_VECTOR_LEN;
|
|
316
|
+
const ret = wasm.cartridgeaccount_registerSessionCalldata(this.__wbg_ptr, ptr0, len0, expires_at, addHeapObject(public_key));
|
|
786
317
|
return takeObject(ret);
|
|
787
318
|
}
|
|
788
319
|
/**
|
|
789
|
-
* @param {
|
|
790
|
-
* @
|
|
791
|
-
* @returns {Promise<boolean>}
|
|
320
|
+
* @param {JsRemoveSignerInput} signer
|
|
321
|
+
* @returns {Promise<void>}
|
|
792
322
|
*/
|
|
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);
|
|
323
|
+
removeOwner(signer) {
|
|
324
|
+
const ret = wasm.cartridgeaccount_removeOwner(this.__wbg_ptr, addHeapObject(signer));
|
|
799
325
|
return takeObject(ret);
|
|
800
326
|
}
|
|
801
327
|
/**
|
|
802
|
-
* @param {
|
|
803
|
-
* @
|
|
804
|
-
* @returns {Promise<boolean>}
|
|
328
|
+
* @param {JsRevokableSession} session
|
|
329
|
+
* @returns {Promise<void>}
|
|
805
330
|
*/
|
|
806
|
-
|
|
807
|
-
const
|
|
331
|
+
revokeSession(session) {
|
|
332
|
+
const ret = wasm.cartridgeaccount_revokeSession(this.__wbg_ptr, addHeapObject(session));
|
|
333
|
+
return takeObject(ret);
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* @param {JsRevokableSession[]} sessions
|
|
337
|
+
* @returns {Promise<void>}
|
|
338
|
+
*/
|
|
339
|
+
revokeSessions(sessions) {
|
|
340
|
+
const ptr0 = passArrayJsValueToWasm0(sessions, wasm.__wbindgen_export);
|
|
808
341
|
const len0 = WASM_VECTOR_LEN;
|
|
809
|
-
const
|
|
810
|
-
const len1 = WASM_VECTOR_LEN;
|
|
811
|
-
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
342
|
+
const ret = wasm.cartridgeaccount_revokeSessions(this.__wbg_ptr, ptr0, len0);
|
|
812
343
|
return takeObject(ret);
|
|
813
344
|
}
|
|
814
345
|
/**
|
|
@@ -829,28 +360,53 @@ export class CartridgeAccount {
|
|
|
829
360
|
return takeObject(ret);
|
|
830
361
|
}
|
|
831
362
|
/**
|
|
832
|
-
*
|
|
833
|
-
*
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
363
|
+
* @param {string} typed_data
|
|
364
|
+
* @returns {Promise<Felts>}
|
|
365
|
+
*/
|
|
366
|
+
signMessage(typed_data) {
|
|
367
|
+
const ptr0 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
368
|
+
const len0 = WASM_VECTOR_LEN;
|
|
369
|
+
const ret = wasm.cartridgeaccount_signMessage(this.__wbg_ptr, ptr0, len0);
|
|
370
|
+
return takeObject(ret);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
839
373
|
* @param {string} app_id
|
|
840
|
-
* @
|
|
374
|
+
* @param {Policy[]} policies
|
|
375
|
+
* @returns {Promise<void>}
|
|
376
|
+
*/
|
|
377
|
+
skipSession(app_id, policies) {
|
|
378
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
379
|
+
const len0 = WASM_VECTOR_LEN;
|
|
380
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
381
|
+
const len1 = WASM_VECTOR_LEN;
|
|
382
|
+
const ret = wasm.cartridgeaccount_skipSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
383
|
+
return takeObject(ret);
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* @param {string} app_id
|
|
387
|
+
* @param {JsCall[]} calls
|
|
388
|
+
* @param {JsFeeSource | null} [fee_source]
|
|
389
|
+
* @returns {Promise<any>}
|
|
390
|
+
*/
|
|
391
|
+
trySessionExecute(app_id, calls, fee_source) {
|
|
392
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
393
|
+
const len0 = WASM_VECTOR_LEN;
|
|
394
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
395
|
+
const len1 = WASM_VECTOR_LEN;
|
|
396
|
+
const ret = wasm.cartridgeaccount_trySessionExecute(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
397
|
+
return takeObject(ret);
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* @param {JsFelt} new_class_hash
|
|
401
|
+
* @returns {Promise<JsCall>}
|
|
841
402
|
*/
|
|
842
|
-
|
|
843
|
-
const
|
|
844
|
-
const len0 = WASM_VECTOR_LEN;
|
|
845
|
-
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
403
|
+
upgrade(new_class_hash) {
|
|
404
|
+
const ret = wasm.cartridgeaccount_upgrade(this.__wbg_ptr, addHeapObject(new_class_hash));
|
|
846
405
|
return takeObject(ret);
|
|
847
406
|
}
|
|
848
407
|
}
|
|
849
408
|
if (Symbol.dispose) CartridgeAccount.prototype[Symbol.dispose] = CartridgeAccount.prototype.free;
|
|
850
409
|
|
|
851
|
-
const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
852
|
-
? { register: () => {}, unregister: () => {} }
|
|
853
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountmeta_free(ptr >>> 0, 1));
|
|
854
410
|
/**
|
|
855
411
|
* A type for accessing fixed attributes of `CartridgeAccount`.
|
|
856
412
|
*
|
|
@@ -865,7 +421,6 @@ const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undef
|
|
|
865
421
|
* be needed.
|
|
866
422
|
*/
|
|
867
423
|
export class CartridgeAccountMeta {
|
|
868
|
-
|
|
869
424
|
static __wrap(ptr) {
|
|
870
425
|
ptr = ptr >>> 0;
|
|
871
426
|
const obj = Object.create(CartridgeAccountMeta.prototype);
|
|
@@ -873,14 +428,12 @@ export class CartridgeAccountMeta {
|
|
|
873
428
|
CartridgeAccountMetaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
874
429
|
return obj;
|
|
875
430
|
}
|
|
876
|
-
|
|
877
431
|
__destroy_into_raw() {
|
|
878
432
|
const ptr = this.__wbg_ptr;
|
|
879
433
|
this.__wbg_ptr = 0;
|
|
880
434
|
CartridgeAccountMetaFinalization.unregister(this);
|
|
881
435
|
return ptr;
|
|
882
436
|
}
|
|
883
|
-
|
|
884
437
|
free() {
|
|
885
438
|
const ptr = this.__destroy_into_raw();
|
|
886
439
|
wasm.__wbg_cartridgeaccountmeta_free(ptr, 0);
|
|
@@ -888,12 +441,12 @@ export class CartridgeAccountMeta {
|
|
|
888
441
|
/**
|
|
889
442
|
* @returns {string}
|
|
890
443
|
*/
|
|
891
|
-
|
|
444
|
+
address() {
|
|
892
445
|
let deferred1_0;
|
|
893
446
|
let deferred1_1;
|
|
894
447
|
try {
|
|
895
448
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
896
|
-
wasm.
|
|
449
|
+
wasm.cartridgeaccountmeta_address(retptr, this.__wbg_ptr);
|
|
897
450
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
898
451
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
899
452
|
deferred1_0 = r0;
|
|
@@ -907,12 +460,12 @@ export class CartridgeAccountMeta {
|
|
|
907
460
|
/**
|
|
908
461
|
* @returns {string}
|
|
909
462
|
*/
|
|
910
|
-
|
|
463
|
+
chainId() {
|
|
911
464
|
let deferred1_0;
|
|
912
465
|
let deferred1_1;
|
|
913
466
|
try {
|
|
914
467
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
915
|
-
wasm.
|
|
468
|
+
wasm.cartridgeaccountmeta_chainId(retptr, this.__wbg_ptr);
|
|
916
469
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
917
470
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
918
471
|
deferred1_0 = r0;
|
|
@@ -942,6 +495,20 @@ export class CartridgeAccountMeta {
|
|
|
942
495
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
943
496
|
}
|
|
944
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* @returns {Owner}
|
|
500
|
+
*/
|
|
501
|
+
owner() {
|
|
502
|
+
const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
|
|
503
|
+
return takeObject(ret);
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* @returns {JsFelt}
|
|
507
|
+
*/
|
|
508
|
+
ownerGuid() {
|
|
509
|
+
const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
|
|
510
|
+
return takeObject(ret);
|
|
511
|
+
}
|
|
945
512
|
/**
|
|
946
513
|
* @returns {string}
|
|
947
514
|
*/
|
|
@@ -964,12 +531,12 @@ export class CartridgeAccountMeta {
|
|
|
964
531
|
/**
|
|
965
532
|
* @returns {string}
|
|
966
533
|
*/
|
|
967
|
-
|
|
534
|
+
username() {
|
|
968
535
|
let deferred1_0;
|
|
969
536
|
let deferred1_1;
|
|
970
537
|
try {
|
|
971
538
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
972
|
-
wasm.
|
|
539
|
+
wasm.cartridgeaccountmeta_username(retptr, this.__wbg_ptr);
|
|
973
540
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
974
541
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
975
542
|
deferred1_0 = r0;
|
|
@@ -980,26 +547,9 @@ export class CartridgeAccountMeta {
|
|
|
980
547
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
981
548
|
}
|
|
982
549
|
}
|
|
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
550
|
}
|
|
998
551
|
if (Symbol.dispose) CartridgeAccountMeta.prototype[Symbol.dispose] = CartridgeAccountMeta.prototype.free;
|
|
999
552
|
|
|
1000
|
-
const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1001
|
-
? { register: () => {}, unregister: () => {} }
|
|
1002
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountwithmeta_free(ptr >>> 0, 1));
|
|
1003
553
|
/**
|
|
1004
554
|
* A type used as the return type for constructing `CartridgeAccount` to provide an extra,
|
|
1005
555
|
* separately borrowable `meta` field for synchronously accessing fixed fields.
|
|
@@ -1008,7 +558,6 @@ const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'u
|
|
|
1008
558
|
* don't implement `IntoWasmAbi` which is needed for crossing JS-WASM boundary.
|
|
1009
559
|
*/
|
|
1010
560
|
export class CartridgeAccountWithMeta {
|
|
1011
|
-
|
|
1012
561
|
static __wrap(ptr) {
|
|
1013
562
|
ptr = ptr >>> 0;
|
|
1014
563
|
const obj = Object.create(CartridgeAccountWithMeta.prototype);
|
|
@@ -1016,25 +565,16 @@ export class CartridgeAccountWithMeta {
|
|
|
1016
565
|
CartridgeAccountWithMetaFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1017
566
|
return obj;
|
|
1018
567
|
}
|
|
1019
|
-
|
|
1020
568
|
__destroy_into_raw() {
|
|
1021
569
|
const ptr = this.__wbg_ptr;
|
|
1022
570
|
this.__wbg_ptr = 0;
|
|
1023
571
|
CartridgeAccountWithMetaFinalization.unregister(this);
|
|
1024
572
|
return ptr;
|
|
1025
573
|
}
|
|
1026
|
-
|
|
1027
574
|
free() {
|
|
1028
575
|
const ptr = this.__destroy_into_raw();
|
|
1029
576
|
wasm.__wbg_cartridgeaccountwithmeta_free(ptr, 0);
|
|
1030
577
|
}
|
|
1031
|
-
/**
|
|
1032
|
-
* @returns {CartridgeAccountMeta}
|
|
1033
|
-
*/
|
|
1034
|
-
meta() {
|
|
1035
|
-
const ret = wasm.cartridgeaccountwithmeta_meta(this.__wbg_ptr);
|
|
1036
|
-
return CartridgeAccountMeta.__wrap(ret);
|
|
1037
|
-
}
|
|
1038
578
|
/**
|
|
1039
579
|
* @returns {CartridgeAccount}
|
|
1040
580
|
*/
|
|
@@ -1043,26 +583,58 @@ export class CartridgeAccountWithMeta {
|
|
|
1043
583
|
const ret = wasm.cartridgeaccountwithmeta_intoAccount(ptr);
|
|
1044
584
|
return CartridgeAccount.__wrap(ret);
|
|
1045
585
|
}
|
|
586
|
+
/**
|
|
587
|
+
* @returns {CartridgeAccountMeta}
|
|
588
|
+
*/
|
|
589
|
+
meta() {
|
|
590
|
+
const ret = wasm.cartridgeaccountwithmeta_meta(this.__wbg_ptr);
|
|
591
|
+
return CartridgeAccountMeta.__wrap(ret);
|
|
592
|
+
}
|
|
1046
593
|
}
|
|
1047
594
|
if (Symbol.dispose) CartridgeAccountWithMeta.prototype[Symbol.dispose] = CartridgeAccountWithMeta.prototype.free;
|
|
1048
595
|
|
|
1049
|
-
const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1050
|
-
? { register: () => {}, unregister: () => {} }
|
|
1051
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
|
|
1052
|
-
|
|
1053
596
|
export class ControllerFactory {
|
|
1054
|
-
|
|
1055
597
|
__destroy_into_raw() {
|
|
1056
598
|
const ptr = this.__wbg_ptr;
|
|
1057
599
|
this.__wbg_ptr = 0;
|
|
1058
600
|
ControllerFactoryFinalization.unregister(this);
|
|
1059
601
|
return ptr;
|
|
1060
602
|
}
|
|
1061
|
-
|
|
1062
603
|
free() {
|
|
1063
604
|
const ptr = this.__destroy_into_raw();
|
|
1064
605
|
wasm.__wbg_controllerfactory_free(ptr, 0);
|
|
1065
606
|
}
|
|
607
|
+
/**
|
|
608
|
+
* This should only be used with webauthn signers
|
|
609
|
+
* @param {string} username
|
|
610
|
+
* @param {JsFelt} class_hash
|
|
611
|
+
* @param {string} rpc_url
|
|
612
|
+
* @param {JsFelt} address
|
|
613
|
+
* @param {Owner} owner
|
|
614
|
+
* @param {string} cartridge_api_url
|
|
615
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
616
|
+
*/
|
|
617
|
+
static apiLogin(username, class_hash, rpc_url, address, owner, cartridge_api_url) {
|
|
618
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
619
|
+
const len0 = WASM_VECTOR_LEN;
|
|
620
|
+
const ptr1 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
621
|
+
const len1 = WASM_VECTOR_LEN;
|
|
622
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
623
|
+
const len2 = WASM_VECTOR_LEN;
|
|
624
|
+
const ret = wasm.controllerfactory_apiLogin(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), addHeapObject(owner), ptr2, len2);
|
|
625
|
+
return takeObject(ret);
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* @param {ImportedControllerMetadata} metadata
|
|
629
|
+
* @param {string} cartridge_api_url
|
|
630
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
631
|
+
*/
|
|
632
|
+
static fromMetadata(metadata, cartridge_api_url) {
|
|
633
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
634
|
+
const len0 = WASM_VECTOR_LEN;
|
|
635
|
+
const ret = wasm.controllerfactory_fromMetadata(addHeapObject(metadata), ptr0, len0);
|
|
636
|
+
return takeObject(ret);
|
|
637
|
+
}
|
|
1066
638
|
/**
|
|
1067
639
|
* @param {string} cartridge_api_url
|
|
1068
640
|
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
@@ -1124,55 +696,122 @@ export class ControllerFactory {
|
|
|
1124
696
|
const ret = wasm.controllerfactory_login(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), addHeapObject(owner), ptr2, len2, session_expires_at_s, isLikeNone(is_controller_registered) ? 0xFFFFFF : is_controller_registered ? 1 : 0, isLikeNone(create_wildcard_session) ? 0xFFFFFF : create_wildcard_session ? 1 : 0, ptr3, len3);
|
|
1125
697
|
return takeObject(ret);
|
|
1126
698
|
}
|
|
1127
|
-
/**
|
|
1128
|
-
* This should only be used with webauthn signers
|
|
1129
|
-
* @param {string} username
|
|
1130
|
-
* @param {JsFelt} class_hash
|
|
1131
|
-
* @param {string} rpc_url
|
|
1132
|
-
* @param {JsFelt} address
|
|
1133
|
-
* @param {Owner} owner
|
|
1134
|
-
* @param {string} cartridge_api_url
|
|
1135
|
-
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
1136
|
-
*/
|
|
1137
|
-
static apiLogin(username, class_hash, rpc_url, address, owner, cartridge_api_url) {
|
|
1138
|
-
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1139
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1140
|
-
const ptr1 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1141
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1142
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1143
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1144
|
-
const ret = wasm.controllerfactory_apiLogin(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), addHeapObject(owner), ptr2, len2);
|
|
1145
|
-
return takeObject(ret);
|
|
1146
|
-
}
|
|
1147
699
|
}
|
|
1148
700
|
if (Symbol.dispose) ControllerFactory.prototype[Symbol.dispose] = ControllerFactory.prototype.free;
|
|
1149
701
|
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
702
|
+
/**
|
|
703
|
+
* @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}
|
|
704
|
+
*/
|
|
705
|
+
export const ErrorCode = Object.freeze({
|
|
706
|
+
StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
|
|
707
|
+
StarknetContractNotFound: 20, "20": "StarknetContractNotFound",
|
|
708
|
+
StarknetBlockNotFound: 24, "24": "StarknetBlockNotFound",
|
|
709
|
+
StarknetInvalidTransactionIndex: 27, "27": "StarknetInvalidTransactionIndex",
|
|
710
|
+
StarknetClassHashNotFound: 28, "28": "StarknetClassHashNotFound",
|
|
711
|
+
StarknetTransactionHashNotFound: 29, "29": "StarknetTransactionHashNotFound",
|
|
712
|
+
StarknetPageSizeTooBig: 31, "31": "StarknetPageSizeTooBig",
|
|
713
|
+
StarknetNoBlocks: 32, "32": "StarknetNoBlocks",
|
|
714
|
+
StarknetInvalidContinuationToken: 33, "33": "StarknetInvalidContinuationToken",
|
|
715
|
+
StarknetTooManyKeysInFilter: 34, "34": "StarknetTooManyKeysInFilter",
|
|
716
|
+
StarknetContractError: 40, "40": "StarknetContractError",
|
|
717
|
+
StarknetTransactionExecutionError: 41, "41": "StarknetTransactionExecutionError",
|
|
718
|
+
StarknetClassAlreadyDeclared: 51, "51": "StarknetClassAlreadyDeclared",
|
|
719
|
+
StarknetInvalidTransactionNonce: 52, "52": "StarknetInvalidTransactionNonce",
|
|
720
|
+
StarknetInsufficientMaxFee: 53, "53": "StarknetInsufficientMaxFee",
|
|
721
|
+
StarknetInsufficientAccountBalance: 54, "54": "StarknetInsufficientAccountBalance",
|
|
722
|
+
StarknetValidationFailure: 55, "55": "StarknetValidationFailure",
|
|
723
|
+
StarknetCompilationFailed: 56, "56": "StarknetCompilationFailed",
|
|
724
|
+
StarknetContractClassSizeIsTooLarge: 57, "57": "StarknetContractClassSizeIsTooLarge",
|
|
725
|
+
StarknetNonAccount: 58, "58": "StarknetNonAccount",
|
|
726
|
+
StarknetDuplicateTx: 59, "59": "StarknetDuplicateTx",
|
|
727
|
+
StarknetCompiledClassHashMismatch: 60, "60": "StarknetCompiledClassHashMismatch",
|
|
728
|
+
StarknetUnsupportedTxVersion: 61, "61": "StarknetUnsupportedTxVersion",
|
|
729
|
+
StarknetUnsupportedContractClassVersion: 62, "62": "StarknetUnsupportedContractClassVersion",
|
|
730
|
+
StarknetUnexpectedError: 63, "63": "StarknetUnexpectedError",
|
|
731
|
+
StarknetNoTraceAvailable: 10, "10": "StarknetNoTraceAvailable",
|
|
732
|
+
StarknetReplacementTransactionUnderpriced: 64, "64": "StarknetReplacementTransactionUnderpriced",
|
|
733
|
+
StarknetFeeBelowMinimum: 65, "65": "StarknetFeeBelowMinimum",
|
|
734
|
+
SignError: 101, "101": "SignError",
|
|
735
|
+
StorageError: 102, "102": "StorageError",
|
|
736
|
+
AccountFactoryError: 103, "103": "AccountFactoryError",
|
|
737
|
+
PaymasterExecutionTimeNotReached: 104, "104": "PaymasterExecutionTimeNotReached",
|
|
738
|
+
PaymasterExecutionTimePassed: 105, "105": "PaymasterExecutionTimePassed",
|
|
739
|
+
PaymasterInvalidCaller: 106, "106": "PaymasterInvalidCaller",
|
|
740
|
+
PaymasterRateLimitExceeded: 107, "107": "PaymasterRateLimitExceeded",
|
|
741
|
+
PaymasterNotSupported: 108, "108": "PaymasterNotSupported",
|
|
742
|
+
PaymasterHttp: 109, "109": "PaymasterHttp",
|
|
743
|
+
PaymasterExcecution: 110, "110": "PaymasterExcecution",
|
|
744
|
+
PaymasterSerialization: 111, "111": "PaymasterSerialization",
|
|
745
|
+
CartridgeControllerNotDeployed: 112, "112": "CartridgeControllerNotDeployed",
|
|
746
|
+
InsufficientBalance: 113, "113": "InsufficientBalance",
|
|
747
|
+
OriginError: 114, "114": "OriginError",
|
|
748
|
+
EncodingError: 115, "115": "EncodingError",
|
|
749
|
+
SerdeWasmBindgenError: 116, "116": "SerdeWasmBindgenError",
|
|
750
|
+
CairoSerdeError: 117, "117": "CairoSerdeError",
|
|
751
|
+
CairoShortStringToFeltError: 118, "118": "CairoShortStringToFeltError",
|
|
752
|
+
DeviceCreateCredential: 119, "119": "DeviceCreateCredential",
|
|
753
|
+
DeviceGetAssertion: 120, "120": "DeviceGetAssertion",
|
|
754
|
+
DeviceBadAssertion: 121, "121": "DeviceBadAssertion",
|
|
755
|
+
DeviceChannel: 122, "122": "DeviceChannel",
|
|
756
|
+
DeviceOrigin: 123, "123": "DeviceOrigin",
|
|
757
|
+
AccountSigning: 124, "124": "AccountSigning",
|
|
758
|
+
AccountProvider: 125, "125": "AccountProvider",
|
|
759
|
+
AccountClassHashCalculation: 126, "126": "AccountClassHashCalculation",
|
|
760
|
+
AccountFeeOutOfRange: 128, "128": "AccountFeeOutOfRange",
|
|
761
|
+
ProviderRateLimited: 129, "129": "ProviderRateLimited",
|
|
762
|
+
ProviderArrayLengthMismatch: 130, "130": "ProviderArrayLengthMismatch",
|
|
763
|
+
ProviderOther: 131, "131": "ProviderOther",
|
|
764
|
+
SessionAlreadyRegistered: 132, "132": "SessionAlreadyRegistered",
|
|
765
|
+
UrlParseError: 133, "133": "UrlParseError",
|
|
766
|
+
Base64DecodeError: 134, "134": "Base64DecodeError",
|
|
767
|
+
CoseError: 135, "135": "CoseError",
|
|
768
|
+
PolicyChainIdMismatch: 136, "136": "PolicyChainIdMismatch",
|
|
769
|
+
InvalidOwner: 137, "137": "InvalidOwner",
|
|
770
|
+
GasPriceTooHigh: 138, "138": "GasPriceTooHigh",
|
|
771
|
+
TransactionTimeout: 139, "139": "TransactionTimeout",
|
|
772
|
+
ConversionError: 140, "140": "ConversionError",
|
|
773
|
+
InvalidChainId: 141, "141": "InvalidChainId",
|
|
774
|
+
SessionRefreshRequired: 142, "142": "SessionRefreshRequired",
|
|
775
|
+
ManualExecutionRequired: 143, "143": "ManualExecutionRequired",
|
|
776
|
+
ForbiddenEntrypoint: 144, "144": "ForbiddenEntrypoint",
|
|
777
|
+
GasAmountTooHigh: 145, "145": "GasAmountTooHigh",
|
|
778
|
+
ApproveExecutionRequired: 146, "146": "ApproveExecutionRequired",
|
|
779
|
+
});
|
|
780
|
+
|
|
1153
781
|
/**
|
|
1154
782
|
* JavaScript-friendly chain configuration
|
|
1155
783
|
*/
|
|
1156
784
|
export class JsChainConfig {
|
|
1157
|
-
|
|
1158
785
|
static __unwrap(jsValue) {
|
|
1159
786
|
if (!(jsValue instanceof JsChainConfig)) {
|
|
1160
787
|
return 0;
|
|
1161
788
|
}
|
|
1162
789
|
return jsValue.__destroy_into_raw();
|
|
1163
790
|
}
|
|
1164
|
-
|
|
1165
791
|
__destroy_into_raw() {
|
|
1166
792
|
const ptr = this.__wbg_ptr;
|
|
1167
793
|
this.__wbg_ptr = 0;
|
|
1168
794
|
JsChainConfigFinalization.unregister(this);
|
|
1169
795
|
return ptr;
|
|
1170
796
|
}
|
|
1171
|
-
|
|
1172
797
|
free() {
|
|
1173
798
|
const ptr = this.__destroy_into_raw();
|
|
1174
799
|
wasm.__wbg_jschainconfig_free(ptr, 0);
|
|
1175
800
|
}
|
|
801
|
+
/**
|
|
802
|
+
* @returns {JsFelt | undefined}
|
|
803
|
+
*/
|
|
804
|
+
get address() {
|
|
805
|
+
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
806
|
+
return takeObject(ret);
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* @returns {JsFelt}
|
|
810
|
+
*/
|
|
811
|
+
get class_hash() {
|
|
812
|
+
const ret = wasm.jschainconfig_class_hash(this.__wbg_ptr);
|
|
813
|
+
return takeObject(ret);
|
|
814
|
+
}
|
|
1176
815
|
/**
|
|
1177
816
|
* @param {JsFelt} class_hash
|
|
1178
817
|
* @param {string} rpc_url
|
|
@@ -1188,10 +827,10 @@ export class JsChainConfig {
|
|
|
1188
827
|
return this;
|
|
1189
828
|
}
|
|
1190
829
|
/**
|
|
1191
|
-
* @returns {
|
|
830
|
+
* @returns {Owner}
|
|
1192
831
|
*/
|
|
1193
|
-
get
|
|
1194
|
-
const ret = wasm.
|
|
832
|
+
get owner() {
|
|
833
|
+
const ret = wasm.jschainconfig_owner(this.__wbg_ptr);
|
|
1195
834
|
return takeObject(ret);
|
|
1196
835
|
}
|
|
1197
836
|
/**
|
|
@@ -1203,54 +842,26 @@ export class JsChainConfig {
|
|
|
1203
842
|
try {
|
|
1204
843
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1205
844
|
wasm.jschainconfig_rpc_url(retptr, this.__wbg_ptr);
|
|
1206
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1207
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1208
|
-
deferred1_0 = r0;
|
|
1209
|
-
deferred1_1 = r1;
|
|
1210
|
-
return getStringFromWasm0(r0, r1);
|
|
1211
|
-
} finally {
|
|
1212
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1213
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
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);
|
|
845
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
846
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
847
|
+
deferred1_0 = r0;
|
|
848
|
+
deferred1_1 = r1;
|
|
849
|
+
return getStringFromWasm0(r0, r1);
|
|
850
|
+
} finally {
|
|
851
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
852
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
853
|
+
}
|
|
1229
854
|
}
|
|
1230
855
|
}
|
|
1231
856
|
if (Symbol.dispose) JsChainConfig.prototype[Symbol.dispose] = JsChainConfig.prototype.free;
|
|
1232
857
|
|
|
1233
|
-
const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1234
|
-
? { register: () => {}, unregister: () => {} }
|
|
1235
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
|
|
1236
|
-
|
|
1237
858
|
export class JsControllerError {
|
|
1238
|
-
|
|
1239
|
-
static __wrap(ptr) {
|
|
1240
|
-
ptr = ptr >>> 0;
|
|
1241
|
-
const obj = Object.create(JsControllerError.prototype);
|
|
1242
|
-
obj.__wbg_ptr = ptr;
|
|
1243
|
-
JsControllerErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1244
|
-
return obj;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
859
|
__destroy_into_raw() {
|
|
1248
860
|
const ptr = this.__wbg_ptr;
|
|
1249
861
|
this.__wbg_ptr = 0;
|
|
1250
862
|
JsControllerErrorFinalization.unregister(this);
|
|
1251
863
|
return ptr;
|
|
1252
864
|
}
|
|
1253
|
-
|
|
1254
865
|
free() {
|
|
1255
866
|
const ptr = this.__destroy_into_raw();
|
|
1256
867
|
wasm.__wbg_jscontrollererror_free(ptr, 0);
|
|
@@ -1263,10 +874,23 @@ export class JsControllerError {
|
|
|
1263
874
|
return ret;
|
|
1264
875
|
}
|
|
1265
876
|
/**
|
|
1266
|
-
* @
|
|
877
|
+
* @returns {string | undefined}
|
|
1267
878
|
*/
|
|
1268
|
-
|
|
1269
|
-
|
|
879
|
+
get data() {
|
|
880
|
+
try {
|
|
881
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
882
|
+
wasm.__wbg_get_jscontrollererror_data(retptr, this.__wbg_ptr);
|
|
883
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
884
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
885
|
+
let v1;
|
|
886
|
+
if (r0 !== 0) {
|
|
887
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
888
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
889
|
+
}
|
|
890
|
+
return v1;
|
|
891
|
+
} finally {
|
|
892
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
893
|
+
}
|
|
1270
894
|
}
|
|
1271
895
|
/**
|
|
1272
896
|
* @returns {string}
|
|
@@ -1288,31 +912,10 @@ export class JsControllerError {
|
|
|
1288
912
|
}
|
|
1289
913
|
}
|
|
1290
914
|
/**
|
|
1291
|
-
* @param {
|
|
1292
|
-
*/
|
|
1293
|
-
set message(arg0) {
|
|
1294
|
-
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1295
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1296
|
-
wasm.__wbg_set_jscontrollererror_message(this.__wbg_ptr, ptr0, len0);
|
|
1297
|
-
}
|
|
1298
|
-
/**
|
|
1299
|
-
* @returns {string | undefined}
|
|
915
|
+
* @param {ErrorCode} arg0
|
|
1300
916
|
*/
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1304
|
-
wasm.__wbg_get_jscontrollererror_data(retptr, this.__wbg_ptr);
|
|
1305
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1306
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1307
|
-
let v1;
|
|
1308
|
-
if (r0 !== 0) {
|
|
1309
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1310
|
-
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1311
|
-
}
|
|
1312
|
-
return v1;
|
|
1313
|
-
} finally {
|
|
1314
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1315
|
-
}
|
|
917
|
+
set code(arg0) {
|
|
918
|
+
wasm.__wbg_set_jscontrollererror_code(this.__wbg_ptr, arg0);
|
|
1316
919
|
}
|
|
1317
920
|
/**
|
|
1318
921
|
* @param {string | null} [arg0]
|
|
@@ -1322,15 +925,18 @@ export class JsControllerError {
|
|
|
1322
925
|
var len0 = WASM_VECTOR_LEN;
|
|
1323
926
|
wasm.__wbg_set_jscontrollererror_data(this.__wbg_ptr, ptr0, len0);
|
|
1324
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
* @param {string} arg0
|
|
930
|
+
*/
|
|
931
|
+
set message(arg0) {
|
|
932
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
933
|
+
const len0 = WASM_VECTOR_LEN;
|
|
934
|
+
wasm.__wbg_set_jscontrollererror_message(this.__wbg_ptr, ptr0, len0);
|
|
935
|
+
}
|
|
1325
936
|
}
|
|
1326
937
|
if (Symbol.dispose) JsControllerError.prototype[Symbol.dispose] = JsControllerError.prototype.free;
|
|
1327
938
|
|
|
1328
|
-
const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1329
|
-
? { register: () => {}, unregister: () => {} }
|
|
1330
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
|
|
1331
|
-
|
|
1332
939
|
export class LoginResult {
|
|
1333
|
-
|
|
1334
940
|
static __wrap(ptr) {
|
|
1335
941
|
ptr = ptr >>> 0;
|
|
1336
942
|
const obj = Object.create(LoginResult.prototype);
|
|
@@ -1338,14 +944,12 @@ export class LoginResult {
|
|
|
1338
944
|
LoginResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1339
945
|
return obj;
|
|
1340
946
|
}
|
|
1341
|
-
|
|
1342
947
|
__destroy_into_raw() {
|
|
1343
948
|
const ptr = this.__wbg_ptr;
|
|
1344
949
|
this.__wbg_ptr = 0;
|
|
1345
950
|
LoginResultFinalization.unregister(this);
|
|
1346
951
|
return ptr;
|
|
1347
952
|
}
|
|
1348
|
-
|
|
1349
953
|
free() {
|
|
1350
954
|
const ptr = this.__destroy_into_raw();
|
|
1351
955
|
wasm.__wbg_loginresult_free(ptr, 0);
|
|
@@ -1361,14 +965,10 @@ export class LoginResult {
|
|
|
1361
965
|
}
|
|
1362
966
|
if (Symbol.dispose) LoginResult.prototype[Symbol.dispose] = LoginResult.prototype.free;
|
|
1363
967
|
|
|
1364
|
-
const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1365
|
-
? { register: () => {}, unregister: () => {} }
|
|
1366
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
|
|
1367
968
|
/**
|
|
1368
969
|
* WASM bindings for MultiChainController
|
|
1369
970
|
*/
|
|
1370
971
|
export class MultiChainAccount {
|
|
1371
|
-
|
|
1372
972
|
static __wrap(ptr) {
|
|
1373
973
|
ptr = ptr >>> 0;
|
|
1374
974
|
const obj = Object.create(MultiChainAccount.prototype);
|
|
@@ -1376,18 +976,36 @@ export class MultiChainAccount {
|
|
|
1376
976
|
MultiChainAccountFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1377
977
|
return obj;
|
|
1378
978
|
}
|
|
1379
|
-
|
|
1380
979
|
__destroy_into_raw() {
|
|
1381
980
|
const ptr = this.__wbg_ptr;
|
|
1382
981
|
this.__wbg_ptr = 0;
|
|
1383
982
|
MultiChainAccountFinalization.unregister(this);
|
|
1384
983
|
return ptr;
|
|
1385
984
|
}
|
|
1386
|
-
|
|
1387
985
|
free() {
|
|
1388
986
|
const ptr = this.__destroy_into_raw();
|
|
1389
987
|
wasm.__wbg_multichainaccount_free(ptr, 0);
|
|
1390
988
|
}
|
|
989
|
+
/**
|
|
990
|
+
* Adds a new chain configuration
|
|
991
|
+
* @param {JsChainConfig} config
|
|
992
|
+
* @returns {Promise<void>}
|
|
993
|
+
*/
|
|
994
|
+
addChain(config) {
|
|
995
|
+
_assertClass(config, JsChainConfig);
|
|
996
|
+
var ptr0 = config.__destroy_into_raw();
|
|
997
|
+
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
998
|
+
return takeObject(ret);
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Gets an account instance for a specific chain
|
|
1002
|
+
* @param {JsFelt} chain_id
|
|
1003
|
+
* @returns {Promise<CartridgeAccount>}
|
|
1004
|
+
*/
|
|
1005
|
+
controller(chain_id) {
|
|
1006
|
+
const ret = wasm.multichainaccount_controller(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1007
|
+
return takeObject(ret);
|
|
1008
|
+
}
|
|
1391
1009
|
/**
|
|
1392
1010
|
* Creates a new MultiChainAccount with multiple chain configurations
|
|
1393
1011
|
* @param {string} username
|
|
@@ -1416,17 +1034,6 @@ export class MultiChainAccount {
|
|
|
1416
1034
|
const ret = wasm.multichainaccount_fromStorage(ptr0, len0);
|
|
1417
1035
|
return takeObject(ret);
|
|
1418
1036
|
}
|
|
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
1037
|
/**
|
|
1431
1038
|
* Removes a chain configuration
|
|
1432
1039
|
* @param {JsFelt} chain_id
|
|
@@ -1436,299 +1043,313 @@ export class MultiChainAccount {
|
|
|
1436
1043
|
const ret = wasm.multichainaccount_removeChain(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1437
1044
|
return takeObject(ret);
|
|
1438
1045
|
}
|
|
1439
|
-
/**
|
|
1440
|
-
* Gets an account instance for a specific chain
|
|
1441
|
-
* @param {JsFelt} chain_id
|
|
1442
|
-
* @returns {Promise<CartridgeAccount>}
|
|
1443
|
-
*/
|
|
1444
|
-
controller(chain_id) {
|
|
1445
|
-
const ret = wasm.multichainaccount_controller(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1446
|
-
return takeObject(ret);
|
|
1447
|
-
}
|
|
1448
1046
|
}
|
|
1449
1047
|
if (Symbol.dispose) MultiChainAccount.prototype[Symbol.dispose] = MultiChainAccount.prototype.free;
|
|
1450
1048
|
|
|
1451
|
-
const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1452
|
-
? { register: () => {}, unregister: () => {} }
|
|
1453
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
|
|
1454
1049
|
/**
|
|
1455
1050
|
* Metadata for displaying multi-chain information
|
|
1456
1051
|
*/
|
|
1457
1052
|
export class MultiChainAccountMeta {
|
|
1458
|
-
|
|
1459
1053
|
__destroy_into_raw() {
|
|
1460
1054
|
const ptr = this.__wbg_ptr;
|
|
1461
1055
|
this.__wbg_ptr = 0;
|
|
1462
1056
|
MultiChainAccountMetaFinalization.unregister(this);
|
|
1463
1057
|
return ptr;
|
|
1464
1058
|
}
|
|
1465
|
-
|
|
1466
1059
|
free() {
|
|
1467
1060
|
const ptr = this.__destroy_into_raw();
|
|
1468
1061
|
wasm.__wbg_multichainaccountmeta_free(ptr, 0);
|
|
1469
1062
|
}
|
|
1470
1063
|
/**
|
|
1471
|
-
* @returns {
|
|
1064
|
+
* @returns {JsFelt[]}
|
|
1472
1065
|
*/
|
|
1473
|
-
get
|
|
1474
|
-
let deferred1_0;
|
|
1475
|
-
let deferred1_1;
|
|
1066
|
+
get chains() {
|
|
1476
1067
|
try {
|
|
1477
1068
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1478
|
-
wasm.
|
|
1069
|
+
wasm.multichainaccountmeta_chains(retptr, this.__wbg_ptr);
|
|
1479
1070
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1480
1071
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
return
|
|
1072
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1073
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
1074
|
+
return v1;
|
|
1484
1075
|
} finally {
|
|
1485
1076
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1486
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1487
1077
|
}
|
|
1488
1078
|
}
|
|
1489
1079
|
/**
|
|
1490
|
-
* @returns {
|
|
1080
|
+
* @returns {string}
|
|
1491
1081
|
*/
|
|
1492
|
-
get
|
|
1082
|
+
get username() {
|
|
1083
|
+
let deferred1_0;
|
|
1084
|
+
let deferred1_1;
|
|
1493
1085
|
try {
|
|
1494
1086
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1495
|
-
wasm.
|
|
1087
|
+
wasm.multichainaccountmeta_username(retptr, this.__wbg_ptr);
|
|
1496
1088
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1497
1089
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
return
|
|
1090
|
+
deferred1_0 = r0;
|
|
1091
|
+
deferred1_1 = r1;
|
|
1092
|
+
return getStringFromWasm0(r0, r1);
|
|
1501
1093
|
} finally {
|
|
1502
1094
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1095
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1503
1096
|
}
|
|
1504
1097
|
}
|
|
1505
1098
|
}
|
|
1506
1099
|
if (Symbol.dispose) MultiChainAccountMeta.prototype[Symbol.dispose] = MultiChainAccountMeta.prototype.free;
|
|
1507
1100
|
|
|
1508
|
-
|
|
1101
|
+
/**
|
|
1102
|
+
* Computes the Starknet contract address for a controller account without needing a full instance.
|
|
1103
|
+
*
|
|
1104
|
+
* # Arguments
|
|
1105
|
+
*
|
|
1106
|
+
* * `class_hash` - The class hash of the account contract (JsFelt).
|
|
1107
|
+
* * `owner` - The owner configuration for the account.
|
|
1108
|
+
* * `salt` - The salt used for address calculation (JsFelt).
|
|
1109
|
+
*
|
|
1110
|
+
* # Returns
|
|
1111
|
+
*
|
|
1112
|
+
* The computed Starknet contract address as a `JsFelt`.
|
|
1113
|
+
* @param {JsFelt} class_hash
|
|
1114
|
+
* @param {Owner} owner
|
|
1115
|
+
* @param {JsFelt} salt
|
|
1116
|
+
* @returns {JsFelt}
|
|
1117
|
+
*/
|
|
1118
|
+
export function computeAccountAddress(class_hash, owner, salt) {
|
|
1119
|
+
try {
|
|
1120
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1121
|
+
wasm.computeAccountAddress(retptr, addHeapObject(class_hash), addHeapObject(owner), addHeapObject(salt));
|
|
1122
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1123
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1124
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1125
|
+
if (r2) {
|
|
1126
|
+
throw takeObject(r1);
|
|
1127
|
+
}
|
|
1128
|
+
return takeObject(r0);
|
|
1129
|
+
} finally {
|
|
1130
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* @param {Signer} signer
|
|
1136
|
+
* @returns {JsFelt}
|
|
1137
|
+
*/
|
|
1138
|
+
export function signerToGuid(signer) {
|
|
1139
|
+
try {
|
|
1140
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1141
|
+
wasm.signerToGuid(retptr, addHeapObject(signer));
|
|
1142
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1143
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1144
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1145
|
+
if (r2) {
|
|
1146
|
+
throw takeObject(r1);
|
|
1147
|
+
}
|
|
1148
|
+
return takeObject(r0);
|
|
1149
|
+
} finally {
|
|
1150
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* Subscribes to the creation of a session for a given controller, session_key_guid and cartridge api url.
|
|
1156
|
+
* The goal of this function is to know from any place when the register session flow has been completed, and to
|
|
1157
|
+
* get the authorization.
|
|
1158
|
+
* @param {JsFelt} session_key_guid
|
|
1159
|
+
* @param {string} cartridge_api_url
|
|
1160
|
+
* @returns {Promise<JsSubscribeSessionResult>}
|
|
1161
|
+
*/
|
|
1162
|
+
export function subscribeCreateSession(session_key_guid, cartridge_api_url) {
|
|
1163
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1164
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1165
|
+
const ret = wasm.subscribeCreateSession(addHeapObject(session_key_guid), ptr0, len0);
|
|
1166
|
+
return takeObject(ret);
|
|
1167
|
+
}
|
|
1168
|
+
export function __wbg_Error_960c155d3d49e4c2(arg0, arg1) {
|
|
1509
1169
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1510
1170
|
return addHeapObject(ret);
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
1171
|
+
}
|
|
1172
|
+
export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
1514
1173
|
const ret = String(getObject(arg1));
|
|
1515
1174
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1516
1175
|
const len1 = WASM_VECTOR_LEN;
|
|
1517
1176
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1518
1177
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
export function __wbg___wbindgen_boolean_get_6d5a1ee65bab5f68(arg0) {
|
|
1178
|
+
}
|
|
1179
|
+
export function __wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff(arg0) {
|
|
1522
1180
|
const v = getObject(arg0);
|
|
1523
1181
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1524
1182
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
export function __wbg___wbindgen_debug_string_df47ffb5e35e6763(arg0, arg1) {
|
|
1183
|
+
}
|
|
1184
|
+
export function __wbg___wbindgen_debug_string_ab4b34d23d6778bd(arg0, arg1) {
|
|
1528
1185
|
const ret = debugString(getObject(arg1));
|
|
1529
1186
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1530
1187
|
const len1 = WASM_VECTOR_LEN;
|
|
1531
1188
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1532
1189
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
|
|
1190
|
+
}
|
|
1191
|
+
export function __wbg___wbindgen_in_a5d8b22e52b24dd1(arg0, arg1) {
|
|
1536
1192
|
const ret = getObject(arg0) in getObject(arg1);
|
|
1537
1193
|
return ret;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
|
|
1194
|
+
}
|
|
1195
|
+
export function __wbg___wbindgen_is_function_3baa9db1a987f47d(arg0) {
|
|
1541
1196
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
1542
1197
|
return ret;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
|
|
1198
|
+
}
|
|
1199
|
+
export function __wbg___wbindgen_is_object_63322ec0cd6ea4ef(arg0) {
|
|
1546
1200
|
const val = getObject(arg0);
|
|
1547
1201
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1548
1202
|
return ret;
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
export function __wbg___wbindgen_is_string_fbb76cb2940daafd(arg0) {
|
|
1203
|
+
}
|
|
1204
|
+
export function __wbg___wbindgen_is_string_6df3bf7ef1164ed3(arg0) {
|
|
1552
1205
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
1553
1206
|
return ret;
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
export function __wbg___wbindgen_is_undefined_2d472862bd29a478(arg0) {
|
|
1207
|
+
}
|
|
1208
|
+
export function __wbg___wbindgen_is_undefined_29a43b4d42920abd(arg0) {
|
|
1557
1209
|
const ret = getObject(arg0) === undefined;
|
|
1558
1210
|
return ret;
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
export function __wbg___wbindgen_jsval_loose_eq_b664b38a2f582147(arg0, arg1) {
|
|
1211
|
+
}
|
|
1212
|
+
export function __wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c(arg0, arg1) {
|
|
1562
1213
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1563
1214
|
return ret;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
export function __wbg___wbindgen_number_get_a20bf9b85341449d(arg0, arg1) {
|
|
1215
|
+
}
|
|
1216
|
+
export function __wbg___wbindgen_number_get_c7f42aed0525c451(arg0, arg1) {
|
|
1567
1217
|
const obj = getObject(arg1);
|
|
1568
1218
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1569
1219
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1570
1220
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
export function __wbg___wbindgen_string_get_e4f06c90489ad01b(arg0, arg1) {
|
|
1221
|
+
}
|
|
1222
|
+
export function __wbg___wbindgen_string_get_7ed5322991caaec5(arg0, arg1) {
|
|
1574
1223
|
const obj = getObject(arg1);
|
|
1575
1224
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1576
1225
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1577
1226
|
var len1 = WASM_VECTOR_LEN;
|
|
1578
1227
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1579
1228
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
|
|
1229
|
+
}
|
|
1230
|
+
export function __wbg___wbindgen_throw_6b64449b9b9ed33c(arg0, arg1) {
|
|
1583
1231
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
export function __wbg__wbg_cb_unref_2454a539ea5790d9(arg0) {
|
|
1232
|
+
}
|
|
1233
|
+
export function __wbg__wbg_cb_unref_b46c9b5a9f08ec37(arg0) {
|
|
1587
1234
|
getObject(arg0)._wbg_cb_unref();
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
export function __wbg_abort_28ad55c5825b004d(arg0, arg1) {
|
|
1591
|
-
getObject(arg0).abort(getObject(arg1));
|
|
1592
|
-
};
|
|
1593
|
-
|
|
1594
|
-
export function __wbg_abort_e7eb059f72f9ed0c(arg0) {
|
|
1235
|
+
}
|
|
1236
|
+
export function __wbg_abort_4ce5b484434ef6fd(arg0) {
|
|
1595
1237
|
getObject(arg0).abort();
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
|
|
1238
|
+
}
|
|
1239
|
+
export function __wbg_abort_d53712380a54cc81(arg0, arg1) {
|
|
1240
|
+
getObject(arg0).abort(getObject(arg1));
|
|
1241
|
+
}
|
|
1242
|
+
export function __wbg_addEventListener_8176dab41b09531c() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1599
1243
|
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
1600
|
-
}, arguments) }
|
|
1601
|
-
|
|
1602
|
-
export function __wbg_append_b577eb3a177bc0fa() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1244
|
+
}, arguments); }
|
|
1245
|
+
export function __wbg_append_e8fc56ce7c00e874() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1603
1246
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1604
|
-
}, arguments) }
|
|
1605
|
-
|
|
1606
|
-
export function __wbg_arrayBuffer_b375eccb84b4ddf3() { return handleError(function (arg0) {
|
|
1247
|
+
}, arguments); }
|
|
1248
|
+
export function __wbg_arrayBuffer_848c392b70c67d3d() { return handleError(function (arg0) {
|
|
1607
1249
|
const ret = getObject(arg0).arrayBuffer();
|
|
1608
1250
|
return addHeapObject(ret);
|
|
1609
|
-
}, arguments) }
|
|
1610
|
-
|
|
1611
|
-
export function __wbg_call_525440f72fbfc0ea() { return handleError(function (arg0, arg1, arg2) {
|
|
1612
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1613
|
-
return addHeapObject(ret);
|
|
1614
|
-
}, arguments) };
|
|
1615
|
-
|
|
1616
|
-
export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
|
|
1251
|
+
}, arguments); }
|
|
1252
|
+
export function __wbg_call_14b169f759b26747() { return handleError(function (arg0, arg1) {
|
|
1617
1253
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1618
1254
|
return addHeapObject(ret);
|
|
1619
|
-
}, arguments) }
|
|
1620
|
-
|
|
1255
|
+
}, arguments); }
|
|
1256
|
+
export function __wbg_call_a24592a6f349a97e() { return handleError(function (arg0, arg1, arg2) {
|
|
1257
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1258
|
+
return addHeapObject(ret);
|
|
1259
|
+
}, arguments); }
|
|
1621
1260
|
export function __wbg_cartridgeaccount_new(arg0) {
|
|
1622
1261
|
const ret = CartridgeAccount.__wrap(arg0);
|
|
1623
1262
|
return addHeapObject(ret);
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1263
|
+
}
|
|
1626
1264
|
export function __wbg_cartridgeaccountwithmeta_new(arg0) {
|
|
1627
1265
|
const ret = CartridgeAccountWithMeta.__wrap(arg0);
|
|
1628
1266
|
return addHeapObject(ret);
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
export function __wbg_clearTimeout_7a42b49784aea641(arg0) {
|
|
1267
|
+
}
|
|
1268
|
+
export function __wbg_clearTimeout_6b8d9a38b9263d65(arg0) {
|
|
1632
1269
|
const ret = clearTimeout(takeObject(arg0));
|
|
1633
1270
|
return addHeapObject(ret);
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
export function __wbg_clear_cb2a4a548aeda3df() { return handleError(function (arg0) {
|
|
1271
|
+
}
|
|
1272
|
+
export function __wbg_clear_399cfd0dd432663c() { return handleError(function (arg0) {
|
|
1637
1273
|
getObject(arg0).clear();
|
|
1638
|
-
}, arguments) }
|
|
1639
|
-
|
|
1640
|
-
export function __wbg_create_00dd406d2e274297() { return handleError(function (arg0, arg1) {
|
|
1274
|
+
}, arguments); }
|
|
1275
|
+
export function __wbg_create_b2b9af26ea12a639() { return handleError(function (arg0, arg1) {
|
|
1641
1276
|
const ret = getObject(arg0).create(getObject(arg1));
|
|
1642
1277
|
return addHeapObject(ret);
|
|
1643
|
-
}, arguments) }
|
|
1644
|
-
|
|
1645
|
-
export function __wbg_credentials_8cadf6cea6a4f922(arg0) {
|
|
1278
|
+
}, arguments); }
|
|
1279
|
+
export function __wbg_credentials_93aa093b507f1fa0(arg0) {
|
|
1646
1280
|
const ret = getObject(arg0).credentials;
|
|
1647
1281
|
return addHeapObject(ret);
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
export function __wbg_crypto_574e78ad8b13b65f(arg0) {
|
|
1282
|
+
}
|
|
1283
|
+
export function __wbg_crypto_38df2bab126b63dc(arg0) {
|
|
1651
1284
|
const ret = getObject(arg0).crypto;
|
|
1652
1285
|
return addHeapObject(ret);
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
export function __wbg_data_ee4306d069f24f2d(arg0) {
|
|
1286
|
+
}
|
|
1287
|
+
export function __wbg_data_bb9dffdd1e99cf2d(arg0) {
|
|
1656
1288
|
const ret = getObject(arg0).data;
|
|
1657
1289
|
return addHeapObject(ret);
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
export function __wbg_done_2042aa2670fb1db1(arg0) {
|
|
1290
|
+
}
|
|
1291
|
+
export function __wbg_done_9158f7cc8751ba32(arg0) {
|
|
1661
1292
|
const ret = getObject(arg0).done;
|
|
1662
1293
|
return ret;
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
export function __wbg_error_a7f8fbb0523dae15(arg0) {
|
|
1294
|
+
}
|
|
1295
|
+
export function __wbg_error_2001591ad2463697(arg0) {
|
|
1666
1296
|
console.error(getObject(arg0));
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
const ret = fetch(getObject(arg0));
|
|
1297
|
+
}
|
|
1298
|
+
export function __wbg_fetch_0d322c0aed196b8b(arg0, arg1) {
|
|
1299
|
+
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1671
1300
|
return addHeapObject(ret);
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
export function __wbg_fetch_f1856afdb49415d1(arg0) {
|
|
1301
|
+
}
|
|
1302
|
+
export function __wbg_fetch_9dad4fe911207b37(arg0) {
|
|
1675
1303
|
const ret = fetch(getObject(arg0));
|
|
1676
1304
|
return addHeapObject(ret);
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1305
|
+
}
|
|
1306
|
+
export function __wbg_fetch_fda7bc27c982b1f3(arg0) {
|
|
1307
|
+
const ret = fetch(getObject(arg0));
|
|
1681
1308
|
return addHeapObject(ret);
|
|
1682
|
-
}
|
|
1683
|
-
|
|
1684
|
-
export function __wbg_getClientExtensionResults_3fbb568c5f7347cf(arg0) {
|
|
1309
|
+
}
|
|
1310
|
+
export function __wbg_getClientExtensionResults_475703637eac9055(arg0) {
|
|
1685
1311
|
const ret = getObject(arg0).getClientExtensionResults();
|
|
1686
1312
|
return addHeapObject(ret);
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
export function __wbg_getItem_89f57d6acc51a876() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1313
|
+
}
|
|
1314
|
+
export function __wbg_getItem_7fe1351b9ea3b2f3() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1690
1315
|
const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
|
|
1691
1316
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1692
1317
|
var len1 = WASM_VECTOR_LEN;
|
|
1693
1318
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1694
1319
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1695
|
-
}, arguments) }
|
|
1696
|
-
|
|
1697
|
-
export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(function (arg0, arg1) {
|
|
1320
|
+
}, arguments); }
|
|
1321
|
+
export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
|
|
1698
1322
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1699
|
-
}, arguments) }
|
|
1700
|
-
|
|
1701
|
-
export function __wbg_getTime_14776bfb48a1bff9(arg0) {
|
|
1323
|
+
}, arguments); }
|
|
1324
|
+
export function __wbg_getTime_da7c55f52b71e8c6(arg0) {
|
|
1702
1325
|
const ret = getObject(arg0).getTime();
|
|
1703
1326
|
return ret;
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
export function __wbg_get_de97927282f5fc02() { return handleError(function (arg0, arg1) {
|
|
1327
|
+
}
|
|
1328
|
+
export function __wbg_get_02de74621e37122a() { return handleError(function (arg0, arg1) {
|
|
1707
1329
|
const ret = getObject(arg0).get(getObject(arg1));
|
|
1708
1330
|
return addHeapObject(ret);
|
|
1709
|
-
}, arguments) }
|
|
1710
|
-
|
|
1711
|
-
export function __wbg_get_efcb449f58ec27c2() { return handleError(function (arg0, arg1) {
|
|
1331
|
+
}, arguments); }
|
|
1332
|
+
export function __wbg_get_1affdbdd5573b16a() { return handleError(function (arg0, arg1) {
|
|
1712
1333
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1713
1334
|
return addHeapObject(ret);
|
|
1714
|
-
}, arguments) }
|
|
1715
|
-
|
|
1716
|
-
|
|
1335
|
+
}, arguments); }
|
|
1336
|
+
export function __wbg_get_6011fa3a58f61074() { return handleError(function (arg0, arg1) {
|
|
1337
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1338
|
+
return addHeapObject(ret);
|
|
1339
|
+
}, arguments); }
|
|
1340
|
+
export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
|
|
1717
1341
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
1718
1342
|
return addHeapObject(ret);
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
export function __wbg_has_787fafc980c3ccdb() { return handleError(function (arg0, arg1) {
|
|
1343
|
+
}
|
|
1344
|
+
export function __wbg_has_880f1d472f7cecba() { return handleError(function (arg0, arg1) {
|
|
1722
1345
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1723
1346
|
return ret;
|
|
1724
|
-
}, arguments) }
|
|
1725
|
-
|
|
1726
|
-
export function __wbg_headers_b87d7eaba61c3278(arg0) {
|
|
1347
|
+
}, arguments); }
|
|
1348
|
+
export function __wbg_headers_6022deb4e576fb8e(arg0) {
|
|
1727
1349
|
const ret = getObject(arg0).headers;
|
|
1728
1350
|
return addHeapObject(ret);
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
|
|
1351
|
+
}
|
|
1352
|
+
export function __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3(arg0) {
|
|
1732
1353
|
let result;
|
|
1733
1354
|
try {
|
|
1734
1355
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -1737,9 +1358,8 @@ export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
|
|
|
1737
1358
|
}
|
|
1738
1359
|
const ret = result;
|
|
1739
1360
|
return ret;
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
export function __wbg_instanceof_Object_10bb762262230c68(arg0) {
|
|
1361
|
+
}
|
|
1362
|
+
export function __wbg_instanceof_Object_7c99480a1cdfb911(arg0) {
|
|
1743
1363
|
let result;
|
|
1744
1364
|
try {
|
|
1745
1365
|
result = getObject(arg0) instanceof Object;
|
|
@@ -1748,9 +1368,8 @@ export function __wbg_instanceof_Object_10bb762262230c68(arg0) {
|
|
|
1748
1368
|
}
|
|
1749
1369
|
const ret = result;
|
|
1750
1370
|
return ret;
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
export function __wbg_instanceof_Response_f4f3e87e07f3135c(arg0) {
|
|
1371
|
+
}
|
|
1372
|
+
export function __wbg_instanceof_Response_9b2d111407865ff2(arg0) {
|
|
1754
1373
|
let result;
|
|
1755
1374
|
try {
|
|
1756
1375
|
result = getObject(arg0) instanceof Response;
|
|
@@ -1759,9 +1378,8 @@ export function __wbg_instanceof_Response_f4f3e87e07f3135c(arg0) {
|
|
|
1759
1378
|
}
|
|
1760
1379
|
const ret = result;
|
|
1761
1380
|
return ret;
|
|
1762
|
-
}
|
|
1763
|
-
|
|
1764
|
-
export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
|
|
1381
|
+
}
|
|
1382
|
+
export function __wbg_instanceof_Uint8Array_152ba1f289edcf3f(arg0) {
|
|
1765
1383
|
let result;
|
|
1766
1384
|
try {
|
|
1767
1385
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -1770,9 +1388,8 @@ export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
|
|
|
1770
1388
|
}
|
|
1771
1389
|
const ret = result;
|
|
1772
1390
|
return ret;
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
export function __wbg_instanceof_Window_4846dbb3de56c84c(arg0) {
|
|
1391
|
+
}
|
|
1392
|
+
export function __wbg_instanceof_Window_cc64c86c8ef9e02b(arg0) {
|
|
1776
1393
|
let result;
|
|
1777
1394
|
try {
|
|
1778
1395
|
result = getObject(arg0) instanceof Window;
|
|
@@ -1781,9 +1398,8 @@ export function __wbg_instanceof_Window_4846dbb3de56c84c(arg0) {
|
|
|
1781
1398
|
}
|
|
1782
1399
|
const ret = result;
|
|
1783
1400
|
return ret;
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
export function __wbg_instanceof_WorkerGlobalScope_e31f49b6d33fcadd(arg0) {
|
|
1401
|
+
}
|
|
1402
|
+
export function __wbg_instanceof_WorkerGlobalScope_47026c798529a771(arg0) {
|
|
1787
1403
|
let result;
|
|
1788
1404
|
try {
|
|
1789
1405
|
result = getObject(arg0) instanceof WorkerGlobalScope;
|
|
@@ -1792,90 +1408,123 @@ export function __wbg_instanceof_WorkerGlobalScope_e31f49b6d33fcadd(arg0) {
|
|
|
1792
1408
|
}
|
|
1793
1409
|
const ret = result;
|
|
1794
1410
|
return ret;
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
export function __wbg_iterator_e5822695327a3c39() {
|
|
1411
|
+
}
|
|
1412
|
+
export function __wbg_iterator_013bc09ec998c2a7() {
|
|
1798
1413
|
const ret = Symbol.iterator;
|
|
1799
1414
|
return addHeapObject(ret);
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1415
|
+
}
|
|
1802
1416
|
export function __wbg_jschainconfig_unwrap(arg0) {
|
|
1803
|
-
const ret = JsChainConfig.__unwrap(
|
|
1417
|
+
const ret = JsChainConfig.__unwrap(getObject(arg0));
|
|
1804
1418
|
return ret;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1419
|
+
}
|
|
1420
|
+
export function __wbg_key_8413ee53931c540f() { return handleError(function (arg0, arg1, arg2) {
|
|
1421
|
+
const ret = getObject(arg1).key(arg2 >>> 0);
|
|
1422
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1423
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1424
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1425
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1426
|
+
}, arguments); }
|
|
1427
|
+
export function __wbg_length_1d7129addb9154f9() { return handleError(function (arg0) {
|
|
1813
1428
|
const ret = getObject(arg0).length;
|
|
1814
1429
|
return ret;
|
|
1815
|
-
};
|
|
1816
|
-
|
|
1817
|
-
|
|
1430
|
+
}, arguments); }
|
|
1431
|
+
export function __wbg_length_9f1775224cf1d815(arg0) {
|
|
1432
|
+
const ret = getObject(arg0).length;
|
|
1433
|
+
return ret;
|
|
1434
|
+
}
|
|
1435
|
+
export function __wbg_localStorage_f5f66b1ffd2486bc() { return handleError(function (arg0) {
|
|
1818
1436
|
const ret = getObject(arg0).localStorage;
|
|
1819
1437
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1820
|
-
}, arguments) }
|
|
1821
|
-
|
|
1822
|
-
export function __wbg_location_ef1665506d996dd9(arg0) {
|
|
1438
|
+
}, arguments); }
|
|
1439
|
+
export function __wbg_location_73c89ca5bb53ddf3(arg0) {
|
|
1823
1440
|
const ret = getObject(arg0).location;
|
|
1824
1441
|
return addHeapObject(ret);
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
export function __wbg_log_8cec76766b8c0e33(arg0) {
|
|
1442
|
+
}
|
|
1443
|
+
export function __wbg_log_7e1aa9064a1dbdbd(arg0) {
|
|
1828
1444
|
console.log(getObject(arg0));
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1445
|
+
}
|
|
1831
1446
|
export function __wbg_loginresult_new(arg0) {
|
|
1832
1447
|
const ret = LoginResult.__wrap(arg0);
|
|
1833
1448
|
return addHeapObject(ret);
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
|
|
1449
|
+
}
|
|
1450
|
+
export function __wbg_msCrypto_bd5a034af96bcba6(arg0) {
|
|
1837
1451
|
const ret = getObject(arg0).msCrypto;
|
|
1838
1452
|
return addHeapObject(ret);
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1453
|
+
}
|
|
1841
1454
|
export function __wbg_multichainaccount_new(arg0) {
|
|
1842
1455
|
const ret = MultiChainAccount.__wrap(arg0);
|
|
1843
1456
|
return addHeapObject(ret);
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
export function __wbg_navigator_971384882e8ea23a(arg0) {
|
|
1457
|
+
}
|
|
1458
|
+
export function __wbg_navigator_bc077756492232c5(arg0) {
|
|
1847
1459
|
const ret = getObject(arg0).navigator;
|
|
1848
1460
|
return addHeapObject(ret);
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
|
|
1461
|
+
}
|
|
1462
|
+
export function __wbg_new_036bd6cd9cea9e73(arg0, arg1) {
|
|
1463
|
+
try {
|
|
1464
|
+
var state0 = {a: arg0, b: arg1};
|
|
1465
|
+
var cb0 = (arg0, arg1) => {
|
|
1466
|
+
const a = state0.a;
|
|
1467
|
+
state0.a = 0;
|
|
1468
|
+
try {
|
|
1469
|
+
return __wasm_bindgen_func_elem_11199(a, state0.b, arg0, arg1);
|
|
1470
|
+
} finally {
|
|
1471
|
+
state0.a = a;
|
|
1472
|
+
}
|
|
1473
|
+
};
|
|
1474
|
+
const ret = new Promise(cb0);
|
|
1475
|
+
return addHeapObject(ret);
|
|
1476
|
+
} finally {
|
|
1477
|
+
state0.a = 0;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
export function __wbg_new_0_4d657201ced14de3() {
|
|
1852
1481
|
const ret = new Date();
|
|
1853
1482
|
return addHeapObject(ret);
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
const ret = new Object();
|
|
1483
|
+
}
|
|
1484
|
+
export function __wbg_new_0c7403db6e782f19(arg0) {
|
|
1485
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1858
1486
|
return addHeapObject(ret);
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
const ret = new AbortController();
|
|
1487
|
+
}
|
|
1488
|
+
export function __wbg_new_15a4889b4b90734d() { return handleError(function () {
|
|
1489
|
+
const ret = new Headers();
|
|
1863
1490
|
return addHeapObject(ret);
|
|
1864
|
-
}, arguments) }
|
|
1865
|
-
|
|
1866
|
-
|
|
1491
|
+
}, arguments); }
|
|
1492
|
+
export function __wbg_new_34d45cc8e36aaead() {
|
|
1493
|
+
const ret = new Map();
|
|
1494
|
+
return addHeapObject(ret);
|
|
1495
|
+
}
|
|
1496
|
+
export function __wbg_new_5e360d2ff7b9e1c3(arg0, arg1) {
|
|
1497
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1498
|
+
return addHeapObject(ret);
|
|
1499
|
+
}
|
|
1500
|
+
export function __wbg_new_682678e2f47e32bc() {
|
|
1501
|
+
const ret = new Array();
|
|
1502
|
+
return addHeapObject(ret);
|
|
1503
|
+
}
|
|
1504
|
+
export function __wbg_new_8f7f8d552bd2ab6d() {
|
|
1867
1505
|
const ret = new Mutex();
|
|
1868
1506
|
return addHeapObject(ret);
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1507
|
+
}
|
|
1508
|
+
export function __wbg_new_98c22165a42231aa() { return handleError(function () {
|
|
1509
|
+
const ret = new AbortController();
|
|
1510
|
+
return addHeapObject(ret);
|
|
1511
|
+
}, arguments); }
|
|
1512
|
+
export function __wbg_new_aa8d0fa9762c29bd() {
|
|
1513
|
+
const ret = new Object();
|
|
1514
|
+
return addHeapObject(ret);
|
|
1515
|
+
}
|
|
1516
|
+
export function __wbg_new_from_slice_b5ea43e23f6008c0(arg0, arg1) {
|
|
1517
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1518
|
+
return addHeapObject(ret);
|
|
1519
|
+
}
|
|
1520
|
+
export function __wbg_new_typed_323f37fd55ab048d(arg0, arg1) {
|
|
1872
1521
|
try {
|
|
1873
1522
|
var state0 = {a: arg0, b: arg1};
|
|
1874
1523
|
var cb0 = (arg0, arg1) => {
|
|
1875
1524
|
const a = state0.a;
|
|
1876
1525
|
state0.a = 0;
|
|
1877
1526
|
try {
|
|
1878
|
-
return
|
|
1527
|
+
return __wasm_bindgen_func_elem_11199(a, state0.b, arg0, arg1);
|
|
1879
1528
|
} finally {
|
|
1880
1529
|
state0.a = a;
|
|
1881
1530
|
}
|
|
@@ -1883,378 +1532,650 @@ export function __wbg_new_3c3d849046688a66(arg0, arg1) {
|
|
|
1883
1532
|
const ret = new Promise(cb0);
|
|
1884
1533
|
return addHeapObject(ret);
|
|
1885
1534
|
} finally {
|
|
1886
|
-
state0.a =
|
|
1535
|
+
state0.a = 0;
|
|
1887
1536
|
}
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1537
|
+
}
|
|
1538
|
+
export function __wbg_new_with_length_8c854e41ea4dae9b(arg0) {
|
|
1539
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1892
1540
|
return addHeapObject(ret);
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
const ret = new Map();
|
|
1541
|
+
}
|
|
1542
|
+
export function __wbg_new_with_str_and_init_897be1708e42f39d() { return handleError(function (arg0, arg1, arg2) {
|
|
1543
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1897
1544
|
return addHeapObject(ret);
|
|
1898
|
-
};
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
const ret = new Headers();
|
|
1545
|
+
}, arguments); }
|
|
1546
|
+
export function __wbg_next_0340c4ae324393c3() { return handleError(function (arg0) {
|
|
1547
|
+
const ret = getObject(arg0).next();
|
|
1902
1548
|
return addHeapObject(ret);
|
|
1903
|
-
}, arguments) }
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
const ret = new Array();
|
|
1549
|
+
}, arguments); }
|
|
1550
|
+
export function __wbg_next_7646edaa39458ef7(arg0) {
|
|
1551
|
+
const ret = getObject(arg0).next;
|
|
1907
1552
|
return addHeapObject(ret);
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1553
|
+
}
|
|
1554
|
+
export function __wbg_node_84ea875411254db1(arg0) {
|
|
1555
|
+
const ret = getObject(arg0).node;
|
|
1912
1556
|
return addHeapObject(ret);
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1557
|
+
}
|
|
1558
|
+
export function __wbg_now_a9b7df1cbee90986() {
|
|
1559
|
+
const ret = Date.now();
|
|
1560
|
+
return ret;
|
|
1561
|
+
}
|
|
1562
|
+
export function __wbg_obtain_513d6156ff4b4fb7(arg0) {
|
|
1563
|
+
const ret = getObject(arg0).obtain();
|
|
1917
1564
|
return addHeapObject(ret);
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1565
|
+
}
|
|
1566
|
+
export function __wbg_open_184ef8d3b9351293() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1567
|
+
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6));
|
|
1568
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1569
|
+
}, arguments); }
|
|
1570
|
+
export function __wbg_origin_1f038926109a2a37() { return handleError(function (arg0, arg1) {
|
|
1571
|
+
const ret = getObject(arg1).origin;
|
|
1572
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1573
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1574
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1575
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1576
|
+
}, arguments); }
|
|
1577
|
+
export function __wbg_origin_99fe4a28bf8b8810(arg0, arg1) {
|
|
1578
|
+
const ret = getObject(arg1).origin;
|
|
1579
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1580
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1581
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1582
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1583
|
+
}
|
|
1584
|
+
export function __wbg_parse_29ba05b712596e33(arg0, arg1) {
|
|
1585
|
+
let deferred0_0;
|
|
1586
|
+
let deferred0_1;
|
|
1587
|
+
try {
|
|
1588
|
+
deferred0_0 = arg0;
|
|
1589
|
+
deferred0_1 = arg1;
|
|
1590
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1591
|
+
return addHeapObject(ret);
|
|
1592
|
+
} finally {
|
|
1593
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
export function __wbg_process_44c7a14e11e9f69e(arg0) {
|
|
1597
|
+
const ret = getObject(arg0).process;
|
|
1598
|
+
return addHeapObject(ret);
|
|
1599
|
+
}
|
|
1600
|
+
export function __wbg_prototypesetcall_a6b02eb00b0f4ce2(arg0, arg1, arg2) {
|
|
1601
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1602
|
+
}
|
|
1603
|
+
export function __wbg_push_471a5b068a5295f6(arg0, arg1) {
|
|
1604
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
1605
|
+
return ret;
|
|
1606
|
+
}
|
|
1607
|
+
export function __wbg_queueMicrotask_5d15a957e6aa920e(arg0) {
|
|
1608
|
+
queueMicrotask(getObject(arg0));
|
|
1609
|
+
}
|
|
1610
|
+
export function __wbg_queueMicrotask_f8819e5ffc402f36(arg0) {
|
|
1611
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
1612
|
+
return addHeapObject(ret);
|
|
1613
|
+
}
|
|
1614
|
+
export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
|
|
1615
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1616
|
+
}, arguments); }
|
|
1617
|
+
export function __wbg_removeEventListener_7bdf07404d9b24bd() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1618
|
+
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
1619
|
+
}, arguments); }
|
|
1620
|
+
export function __wbg_removeItem_487c385a3066a8ed() { return handleError(function (arg0, arg1, arg2) {
|
|
1621
|
+
getObject(arg0).removeItem(getStringFromWasm0(arg1, arg2));
|
|
1622
|
+
}, arguments); }
|
|
1623
|
+
export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function () {
|
|
1624
|
+
const ret = module.require;
|
|
1625
|
+
return addHeapObject(ret);
|
|
1626
|
+
}, arguments); }
|
|
1627
|
+
export function __wbg_resolve_e6c466bc1052f16c(arg0) {
|
|
1628
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1629
|
+
return addHeapObject(ret);
|
|
1630
|
+
}
|
|
1631
|
+
export function __wbg_setItem_e6399d3faae141dc() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1632
|
+
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1633
|
+
}, arguments); }
|
|
1634
|
+
export function __wbg_setTimeout_1626da6d64c92a3c() { return handleError(function (arg0, arg1, arg2) {
|
|
1635
|
+
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
1636
|
+
return ret;
|
|
1637
|
+
}, arguments); }
|
|
1638
|
+
export function __wbg_setTimeout_d8786dd31f90da0f() { return handleError(function (arg0, arg1, arg2) {
|
|
1639
|
+
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
1640
|
+
return ret;
|
|
1641
|
+
}, arguments); }
|
|
1642
|
+
export function __wbg_setTimeout_f757f00851f76c42(arg0, arg1) {
|
|
1643
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
1644
|
+
return addHeapObject(ret);
|
|
1645
|
+
}
|
|
1646
|
+
export function __wbg_set_022bee52d0b05b19() { return handleError(function (arg0, arg1, arg2) {
|
|
1647
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1648
|
+
return ret;
|
|
1649
|
+
}, arguments); }
|
|
1650
|
+
export function __wbg_set_3bf1de9fab0cd644(arg0, arg1, arg2) {
|
|
1651
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1652
|
+
}
|
|
1653
|
+
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1654
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1655
|
+
}
|
|
1656
|
+
export function __wbg_set_body_be11680f34217f75(arg0, arg1) {
|
|
1657
|
+
getObject(arg0).body = getObject(arg1);
|
|
1658
|
+
}
|
|
1659
|
+
export function __wbg_set_cache_968edea422613d1b(arg0, arg1) {
|
|
1660
|
+
getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
|
|
1661
|
+
}
|
|
1662
|
+
export function __wbg_set_credentials_6577be90e0e85eb6(arg0, arg1) {
|
|
1663
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1664
|
+
}
|
|
1665
|
+
export function __wbg_set_d1cb61e9f39c870f(arg0, arg1, arg2) {
|
|
1666
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1667
|
+
}
|
|
1668
|
+
export function __wbg_set_fde2cec06c23692b(arg0, arg1, arg2) {
|
|
1669
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1670
|
+
return addHeapObject(ret);
|
|
1671
|
+
}
|
|
1672
|
+
export function __wbg_set_headers_50fc01786240a440(arg0, arg1) {
|
|
1673
|
+
getObject(arg0).headers = getObject(arg1);
|
|
1674
|
+
}
|
|
1675
|
+
export function __wbg_set_method_c9f1f985f6b6c427(arg0, arg1, arg2) {
|
|
1676
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
1677
|
+
}
|
|
1678
|
+
export function __wbg_set_mode_5e08d503428c06b9(arg0, arg1) {
|
|
1679
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
1680
|
+
}
|
|
1681
|
+
export function __wbg_set_signal_1d4e73c2305a0e7c(arg0, arg1) {
|
|
1682
|
+
getObject(arg0).signal = getObject(arg1);
|
|
1683
|
+
}
|
|
1684
|
+
export function __wbg_signMessage_a4d5bd6a6a624a40() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1685
|
+
let deferred0_0;
|
|
1686
|
+
let deferred0_1;
|
|
1687
|
+
let deferred1_0;
|
|
1688
|
+
let deferred1_1;
|
|
1689
|
+
try {
|
|
1690
|
+
deferred0_0 = arg0;
|
|
1691
|
+
deferred0_1 = arg1;
|
|
1692
|
+
deferred1_0 = arg2;
|
|
1693
|
+
deferred1_1 = arg3;
|
|
1694
|
+
const ret = window.keychain_wallets.signMessage(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
1695
|
+
return addHeapObject(ret);
|
|
1696
|
+
} finally {
|
|
1697
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1698
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1699
|
+
}
|
|
1700
|
+
}, arguments); }
|
|
1701
|
+
export function __wbg_signal_fdc54643b47bf85b(arg0) {
|
|
1702
|
+
const ret = getObject(arg0).signal;
|
|
1922
1703
|
return addHeapObject(ret);
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1704
|
+
}
|
|
1705
|
+
export function __wbg_static_accessor_GLOBAL_8cfadc87a297ca02() {
|
|
1706
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1707
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1708
|
+
}
|
|
1709
|
+
export function __wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf() {
|
|
1710
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1711
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1712
|
+
}
|
|
1713
|
+
export function __wbg_static_accessor_SELF_e445c1c7484aecc3() {
|
|
1714
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
1715
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1716
|
+
}
|
|
1717
|
+
export function __wbg_static_accessor_WINDOW_f20e8576ef1e0f17() {
|
|
1718
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
1719
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1720
|
+
}
|
|
1721
|
+
export function __wbg_status_43e0d2f15b22d69f(arg0) {
|
|
1722
|
+
const ret = getObject(arg0).status;
|
|
1723
|
+
return ret;
|
|
1724
|
+
}
|
|
1725
|
+
export function __wbg_stringify_057c4027271f8007(arg0, arg1) {
|
|
1726
|
+
const ret = JSON.stringify(getObject(arg1));
|
|
1727
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1728
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1729
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1730
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1731
|
+
}
|
|
1732
|
+
export function __wbg_stringify_91082ed7a5a5769e() { return handleError(function (arg0) {
|
|
1733
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
1927
1734
|
return addHeapObject(ret);
|
|
1928
|
-
}, arguments) }
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
const ret = getObject(arg0).next();
|
|
1735
|
+
}, arguments); }
|
|
1736
|
+
export function __wbg_subarray_f8ca46a25b1f5e0d(arg0, arg1, arg2) {
|
|
1737
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1932
1738
|
return addHeapObject(ret);
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
const ret = getObject(arg0).next;
|
|
1739
|
+
}
|
|
1740
|
+
export function __wbg_text_595ef75535aa25c1() { return handleError(function (arg0) {
|
|
1741
|
+
const ret = getObject(arg0).text();
|
|
1937
1742
|
return addHeapObject(ret);
|
|
1938
|
-
};
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
const ret = getObject(arg0).node;
|
|
1743
|
+
}, arguments); }
|
|
1744
|
+
export function __wbg_then_792e0c862b060889(arg0, arg1, arg2) {
|
|
1745
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1942
1746
|
return addHeapObject(ret);
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
const ret = Date.now();
|
|
1947
|
-
return ret;
|
|
1948
|
-
};
|
|
1949
|
-
|
|
1950
|
-
export function __wbg_obtain_a9626b3b96e6dc2c(arg0) {
|
|
1951
|
-
const ret = getObject(arg0).obtain();
|
|
1747
|
+
}
|
|
1748
|
+
export function __wbg_then_8e16ee11f05e4827(arg0, arg1) {
|
|
1749
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
1952
1750
|
return addHeapObject(ret);
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6));
|
|
1957
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1958
|
-
}, arguments) };
|
|
1959
|
-
|
|
1960
|
-
export function __wbg_origin_2b5e7986f349f4f3() { return handleError(function (arg0, arg1) {
|
|
1961
|
-
const ret = getObject(arg1).origin;
|
|
1751
|
+
}
|
|
1752
|
+
export function __wbg_url_2bf741820e6563a0(arg0, arg1) {
|
|
1753
|
+
const ret = getObject(arg1).url;
|
|
1962
1754
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1963
1755
|
const len1 = WASM_VECTOR_LEN;
|
|
1964
1756
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1965
1757
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
const ret = getObject(arg1).origin;
|
|
1758
|
+
}
|
|
1759
|
+
export function __wbg_userAgent_609f939440dc6b62() { return handleError(function (arg0, arg1) {
|
|
1760
|
+
const ret = getObject(arg1).userAgent;
|
|
1970
1761
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1971
1762
|
const len1 = WASM_VECTOR_LEN;
|
|
1972
1763
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1973
1764
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1974
|
-
};
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
let deferred0_0;
|
|
1978
|
-
let deferred0_1;
|
|
1979
|
-
try {
|
|
1980
|
-
deferred0_0 = arg0;
|
|
1981
|
-
deferred0_1 = arg1;
|
|
1982
|
-
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1983
|
-
return addHeapObject(ret);
|
|
1984
|
-
} finally {
|
|
1985
|
-
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1986
|
-
}
|
|
1987
|
-
};
|
|
1988
|
-
|
|
1989
|
-
export function __wbg_process_dc0fbacc7c1c06f7(arg0) {
|
|
1990
|
-
const ret = getObject(arg0).process;
|
|
1765
|
+
}, arguments); }
|
|
1766
|
+
export function __wbg_value_ee3a06f4579184fa(arg0) {
|
|
1767
|
+
const ret = getObject(arg0).value;
|
|
1991
1768
|
return addHeapObject(ret);
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
}
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
const ret =
|
|
2000
|
-
return ret;
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
const ret =
|
|
1769
|
+
}
|
|
1770
|
+
export function __wbg_versions_276b2795b1c6a219(arg0) {
|
|
1771
|
+
const ret = getObject(arg0).versions;
|
|
1772
|
+
return addHeapObject(ret);
|
|
1773
|
+
}
|
|
1774
|
+
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1775
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1192, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1776
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11189);
|
|
1777
|
+
return addHeapObject(ret);
|
|
1778
|
+
}
|
|
1779
|
+
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1780
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Function")], shim_idx: 16, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1781
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3394);
|
|
1782
|
+
return addHeapObject(ret);
|
|
1783
|
+
}
|
|
1784
|
+
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1785
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 15, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
1786
|
+
const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_3393);
|
|
1787
|
+
return addHeapObject(ret);
|
|
1788
|
+
}
|
|
1789
|
+
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1790
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1044, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1791
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_8969);
|
|
1792
|
+
return addHeapObject(ret);
|
|
1793
|
+
}
|
|
1794
|
+
export function __wbindgen_cast_0000000000000005(arg0) {
|
|
1795
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1796
|
+
const ret = arg0;
|
|
1797
|
+
return addHeapObject(ret);
|
|
1798
|
+
}
|
|
1799
|
+
export function __wbindgen_cast_0000000000000006(arg0) {
|
|
1800
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
1801
|
+
const ret = arg0;
|
|
1802
|
+
return addHeapObject(ret);
|
|
1803
|
+
}
|
|
1804
|
+
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
1805
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1806
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1807
|
+
return addHeapObject(ret);
|
|
1808
|
+
}
|
|
1809
|
+
export function __wbindgen_cast_0000000000000008(arg0, arg1) {
|
|
1810
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1811
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1812
|
+
return addHeapObject(ret);
|
|
1813
|
+
}
|
|
1814
|
+
export function __wbindgen_object_clone_ref(arg0) {
|
|
1815
|
+
const ret = getObject(arg0);
|
|
2005
1816
|
return addHeapObject(ret);
|
|
2006
|
-
}
|
|
1817
|
+
}
|
|
1818
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
|
1819
|
+
takeObject(arg0);
|
|
1820
|
+
}
|
|
1821
|
+
function __wasm_bindgen_func_elem_8969(arg0, arg1) {
|
|
1822
|
+
wasm.__wasm_bindgen_func_elem_8969(arg0, arg1);
|
|
1823
|
+
}
|
|
2007
1824
|
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
}
|
|
1825
|
+
function __wasm_bindgen_func_elem_3393(arg0, arg1, arg2) {
|
|
1826
|
+
wasm.__wasm_bindgen_func_elem_3393(arg0, arg1, addHeapObject(arg2));
|
|
1827
|
+
}
|
|
2011
1828
|
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
1829
|
+
function __wasm_bindgen_func_elem_11189(arg0, arg1, arg2) {
|
|
1830
|
+
try {
|
|
1831
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1832
|
+
wasm.__wasm_bindgen_func_elem_11189(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1833
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1834
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1835
|
+
if (r1) {
|
|
1836
|
+
throw takeObject(r0);
|
|
1837
|
+
}
|
|
1838
|
+
} finally {
|
|
1839
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
2015
1842
|
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
1843
|
+
function __wasm_bindgen_func_elem_3394(arg0, arg1, arg2) {
|
|
1844
|
+
try {
|
|
1845
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1846
|
+
wasm.__wasm_bindgen_func_elem_3394(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1847
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1848
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1849
|
+
if (r1) {
|
|
1850
|
+
throw takeObject(r0);
|
|
1851
|
+
}
|
|
1852
|
+
} finally {
|
|
1853
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
2019
1856
|
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
}
|
|
1857
|
+
function __wasm_bindgen_func_elem_11199(arg0, arg1, arg2, arg3) {
|
|
1858
|
+
wasm.__wasm_bindgen_func_elem_11199(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1859
|
+
}
|
|
2023
1860
|
|
|
2024
|
-
export function __wbg_require_60cc747a6bc5215a() { return handleError(function () {
|
|
2025
|
-
const ret = module.require;
|
|
2026
|
-
return addHeapObject(ret);
|
|
2027
|
-
}, arguments) };
|
|
2028
1861
|
|
|
2029
|
-
|
|
2030
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
2031
|
-
return addHeapObject(ret);
|
|
2032
|
-
};
|
|
1862
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
2033
1863
|
|
|
2034
|
-
export function __wbg_setItem_64dfb54d7b20d84c() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2035
|
-
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2036
|
-
}, arguments) };
|
|
2037
1864
|
|
|
2038
|
-
|
|
2039
|
-
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2040
|
-
return ret;
|
|
2041
|
-
}, arguments) };
|
|
1865
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
2042
1866
|
|
|
2043
|
-
export function __wbg_setTimeout_7bb3429662ab1e70(arg0, arg1) {
|
|
2044
|
-
const ret = setTimeout(getObject(arg0), arg1);
|
|
2045
|
-
return addHeapObject(ret);
|
|
2046
|
-
};
|
|
2047
1867
|
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
1868
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1869
|
+
const CartridgeAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1870
|
+
? { register: () => {}, unregister: () => {} }
|
|
1871
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccount_free(ptr >>> 0, 1));
|
|
1872
|
+
const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1873
|
+
? { register: () => {}, unregister: () => {} }
|
|
1874
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountmeta_free(ptr >>> 0, 1));
|
|
1875
|
+
const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1876
|
+
? { register: () => {}, unregister: () => {} }
|
|
1877
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountwithmeta_free(ptr >>> 0, 1));
|
|
1878
|
+
const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1879
|
+
? { register: () => {}, unregister: () => {} }
|
|
1880
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
|
|
1881
|
+
const JsChainConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1882
|
+
? { register: () => {}, unregister: () => {} }
|
|
1883
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jschainconfig_free(ptr >>> 0, 1));
|
|
1884
|
+
const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1885
|
+
? { register: () => {}, unregister: () => {} }
|
|
1886
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
|
|
1887
|
+
const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1888
|
+
? { register: () => {}, unregister: () => {} }
|
|
1889
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
|
|
1890
|
+
const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1891
|
+
? { register: () => {}, unregister: () => {} }
|
|
1892
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
|
|
1893
|
+
const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1894
|
+
? { register: () => {}, unregister: () => {} }
|
|
1895
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
|
|
2052
1896
|
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
1897
|
+
function addHeapObject(obj) {
|
|
1898
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
1899
|
+
const idx = heap_next;
|
|
1900
|
+
heap_next = heap[idx];
|
|
2056
1901
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
}
|
|
1902
|
+
heap[idx] = obj;
|
|
1903
|
+
return idx;
|
|
1904
|
+
}
|
|
2060
1905
|
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
}
|
|
1906
|
+
function _assertClass(instance, klass) {
|
|
1907
|
+
if (!(instance instanceof klass)) {
|
|
1908
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
2065
1911
|
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
1912
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1913
|
+
? { register: () => {}, unregister: () => {} }
|
|
1914
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_export5(state.a, state.b));
|
|
2069
1915
|
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
1916
|
+
function debugString(val) {
|
|
1917
|
+
// primitive types
|
|
1918
|
+
const type = typeof val;
|
|
1919
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1920
|
+
return `${val}`;
|
|
1921
|
+
}
|
|
1922
|
+
if (type == 'string') {
|
|
1923
|
+
return `"${val}"`;
|
|
1924
|
+
}
|
|
1925
|
+
if (type == 'symbol') {
|
|
1926
|
+
const description = val.description;
|
|
1927
|
+
if (description == null) {
|
|
1928
|
+
return 'Symbol';
|
|
1929
|
+
} else {
|
|
1930
|
+
return `Symbol(${description})`;
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
if (type == 'function') {
|
|
1934
|
+
const name = val.name;
|
|
1935
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1936
|
+
return `Function(${name})`;
|
|
1937
|
+
} else {
|
|
1938
|
+
return 'Function';
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
// objects
|
|
1942
|
+
if (Array.isArray(val)) {
|
|
1943
|
+
const length = val.length;
|
|
1944
|
+
let debug = '[';
|
|
1945
|
+
if (length > 0) {
|
|
1946
|
+
debug += debugString(val[0]);
|
|
1947
|
+
}
|
|
1948
|
+
for(let i = 1; i < length; i++) {
|
|
1949
|
+
debug += ', ' + debugString(val[i]);
|
|
1950
|
+
}
|
|
1951
|
+
debug += ']';
|
|
1952
|
+
return debug;
|
|
1953
|
+
}
|
|
1954
|
+
// Test for built-in
|
|
1955
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1956
|
+
let className;
|
|
1957
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1958
|
+
className = builtInMatches[1];
|
|
1959
|
+
} else {
|
|
1960
|
+
// Failed to match the standard '[object ClassName]'
|
|
1961
|
+
return toString.call(val);
|
|
1962
|
+
}
|
|
1963
|
+
if (className == 'Object') {
|
|
1964
|
+
// we're a user defined class or Object
|
|
1965
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1966
|
+
// easier than looping through ownProperties of `val`.
|
|
1967
|
+
try {
|
|
1968
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1969
|
+
} catch (_) {
|
|
1970
|
+
return 'Object';
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
// errors
|
|
1974
|
+
if (val instanceof Error) {
|
|
1975
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1976
|
+
}
|
|
1977
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1978
|
+
return className;
|
|
1979
|
+
}
|
|
2073
1980
|
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
1981
|
+
function dropObject(idx) {
|
|
1982
|
+
if (idx < 1028) return;
|
|
1983
|
+
heap[idx] = heap_next;
|
|
1984
|
+
heap_next = idx;
|
|
1985
|
+
}
|
|
2078
1986
|
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
1987
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1988
|
+
ptr = ptr >>> 0;
|
|
1989
|
+
const mem = getDataViewMemory0();
|
|
1990
|
+
const result = [];
|
|
1991
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1992
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
1993
|
+
}
|
|
1994
|
+
return result;
|
|
1995
|
+
}
|
|
2082
1996
|
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
1997
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1998
|
+
ptr = ptr >>> 0;
|
|
1999
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
2000
|
+
}
|
|
2086
2001
|
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2002
|
+
let cachedDataViewMemory0 = null;
|
|
2003
|
+
function getDataViewMemory0() {
|
|
2004
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
2005
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
2006
|
+
}
|
|
2007
|
+
return cachedDataViewMemory0;
|
|
2008
|
+
}
|
|
2090
2009
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2010
|
+
function getStringFromWasm0(ptr, len) {
|
|
2011
|
+
ptr = ptr >>> 0;
|
|
2012
|
+
return decodeText(ptr, len);
|
|
2013
|
+
}
|
|
2094
2014
|
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2015
|
+
let cachedUint8ArrayMemory0 = null;
|
|
2016
|
+
function getUint8ArrayMemory0() {
|
|
2017
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
2018
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
2019
|
+
}
|
|
2020
|
+
return cachedUint8ArrayMemory0;
|
|
2021
|
+
}
|
|
2098
2022
|
|
|
2099
|
-
|
|
2100
|
-
getObject(arg0).signal = getObject(arg1);
|
|
2101
|
-
};
|
|
2023
|
+
function getObject(idx) { return heap[idx]; }
|
|
2102
2024
|
|
|
2103
|
-
|
|
2104
|
-
let deferred0_0;
|
|
2105
|
-
let deferred0_1;
|
|
2106
|
-
let deferred1_0;
|
|
2107
|
-
let deferred1_1;
|
|
2025
|
+
function handleError(f, args) {
|
|
2108
2026
|
try {
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
deferred1_1 = arg3;
|
|
2113
|
-
const ret = window.keychain_wallets.signMessage(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
2114
|
-
return addHeapObject(ret);
|
|
2115
|
-
} finally {
|
|
2116
|
-
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
2117
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2027
|
+
return f.apply(this, args);
|
|
2028
|
+
} catch (e) {
|
|
2029
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
2118
2030
|
}
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
export function __wbg_signal_4db5aa055bf9eb9a(arg0) {
|
|
2122
|
-
const ret = getObject(arg0).signal;
|
|
2123
|
-
return addHeapObject(ret);
|
|
2124
|
-
};
|
|
2125
|
-
|
|
2126
|
-
export function __wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e() {
|
|
2127
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
2128
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2129
|
-
};
|
|
2130
|
-
|
|
2131
|
-
export function __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac() {
|
|
2132
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2133
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2134
|
-
};
|
|
2135
|
-
|
|
2136
|
-
export function __wbg_static_accessor_SELF_6fdf4b64710cc91b() {
|
|
2137
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
2138
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2139
|
-
};
|
|
2031
|
+
}
|
|
2140
2032
|
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2144
|
-
};
|
|
2033
|
+
let heap = new Array(1024).fill(undefined);
|
|
2034
|
+
heap.push(undefined, null, true, false);
|
|
2145
2035
|
|
|
2146
|
-
|
|
2147
|
-
const ret = getObject(arg0).status;
|
|
2148
|
-
return ret;
|
|
2149
|
-
};
|
|
2036
|
+
let heap_next = heap.length;
|
|
2150
2037
|
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2155
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2156
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2157
|
-
};
|
|
2038
|
+
function isLikeNone(x) {
|
|
2039
|
+
return x === undefined || x === null;
|
|
2040
|
+
}
|
|
2158
2041
|
|
|
2159
|
-
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2162
|
-
}, arguments) };
|
|
2042
|
+
function makeClosure(arg0, arg1, f) {
|
|
2043
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
2044
|
+
const real = (...args) => {
|
|
2163
2045
|
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2046
|
+
// First up with a closure we increment the internal reference
|
|
2047
|
+
// count. This ensures that the Rust closure environment won't
|
|
2048
|
+
// be deallocated while we're invoking it.
|
|
2049
|
+
state.cnt++;
|
|
2050
|
+
try {
|
|
2051
|
+
return f(state.a, state.b, ...args);
|
|
2052
|
+
} finally {
|
|
2053
|
+
real._wbg_cb_unref();
|
|
2054
|
+
}
|
|
2055
|
+
};
|
|
2056
|
+
real._wbg_cb_unref = () => {
|
|
2057
|
+
if (--state.cnt === 0) {
|
|
2058
|
+
wasm.__wbindgen_export5(state.a, state.b);
|
|
2059
|
+
state.a = 0;
|
|
2060
|
+
CLOSURE_DTORS.unregister(state);
|
|
2061
|
+
}
|
|
2062
|
+
};
|
|
2063
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2064
|
+
return real;
|
|
2065
|
+
}
|
|
2168
2066
|
|
|
2169
|
-
|
|
2170
|
-
const
|
|
2171
|
-
|
|
2172
|
-
}, arguments) };
|
|
2067
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
2068
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
2069
|
+
const real = (...args) => {
|
|
2173
2070
|
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2071
|
+
// First up with a closure we increment the internal reference
|
|
2072
|
+
// count. This ensures that the Rust closure environment won't
|
|
2073
|
+
// be deallocated while we're invoking it.
|
|
2074
|
+
state.cnt++;
|
|
2075
|
+
const a = state.a;
|
|
2076
|
+
state.a = 0;
|
|
2077
|
+
try {
|
|
2078
|
+
return f(a, state.b, ...args);
|
|
2079
|
+
} finally {
|
|
2080
|
+
state.a = a;
|
|
2081
|
+
real._wbg_cb_unref();
|
|
2082
|
+
}
|
|
2083
|
+
};
|
|
2084
|
+
real._wbg_cb_unref = () => {
|
|
2085
|
+
if (--state.cnt === 0) {
|
|
2086
|
+
wasm.__wbindgen_export5(state.a, state.b);
|
|
2087
|
+
state.a = 0;
|
|
2088
|
+
CLOSURE_DTORS.unregister(state);
|
|
2089
|
+
}
|
|
2090
|
+
};
|
|
2091
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2092
|
+
return real;
|
|
2093
|
+
}
|
|
2178
2094
|
|
|
2179
|
-
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2182
|
-
|
|
2095
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
2096
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
2097
|
+
const mem = getDataViewMemory0();
|
|
2098
|
+
for (let i = 0; i < array.length; i++) {
|
|
2099
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
2100
|
+
}
|
|
2101
|
+
WASM_VECTOR_LEN = array.length;
|
|
2102
|
+
return ptr;
|
|
2103
|
+
}
|
|
2183
2104
|
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2105
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2106
|
+
if (realloc === undefined) {
|
|
2107
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2108
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
2109
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
2110
|
+
WASM_VECTOR_LEN = buf.length;
|
|
2111
|
+
return ptr;
|
|
2112
|
+
}
|
|
2191
2113
|
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2195
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2196
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2197
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2198
|
-
}, arguments) };
|
|
2114
|
+
let len = arg.length;
|
|
2115
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2199
2116
|
|
|
2200
|
-
|
|
2201
|
-
const ret = getObject(arg0).value;
|
|
2202
|
-
return addHeapObject(ret);
|
|
2203
|
-
};
|
|
2117
|
+
const mem = getUint8ArrayMemory0();
|
|
2204
2118
|
|
|
2205
|
-
|
|
2206
|
-
const ret = getObject(arg0).versions;
|
|
2207
|
-
return addHeapObject(ret);
|
|
2208
|
-
};
|
|
2119
|
+
let offset = 0;
|
|
2209
2120
|
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
}
|
|
2121
|
+
for (; offset < len; offset++) {
|
|
2122
|
+
const code = arg.charCodeAt(offset);
|
|
2123
|
+
if (code > 0x7F) break;
|
|
2124
|
+
mem[ptr + offset] = code;
|
|
2125
|
+
}
|
|
2126
|
+
if (offset !== len) {
|
|
2127
|
+
if (offset !== 0) {
|
|
2128
|
+
arg = arg.slice(offset);
|
|
2129
|
+
}
|
|
2130
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2131
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2132
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
2215
2133
|
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
return addHeapObject(ret);
|
|
2220
|
-
};
|
|
2134
|
+
offset += ret.written;
|
|
2135
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
2136
|
+
}
|
|
2221
2137
|
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
return addHeapObject(ret);
|
|
2226
|
-
};
|
|
2138
|
+
WASM_VECTOR_LEN = offset;
|
|
2139
|
+
return ptr;
|
|
2140
|
+
}
|
|
2227
2141
|
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
return
|
|
2232
|
-
}
|
|
2142
|
+
function takeObject(idx) {
|
|
2143
|
+
const ret = getObject(idx);
|
|
2144
|
+
dropObject(idx);
|
|
2145
|
+
return ret;
|
|
2146
|
+
}
|
|
2233
2147
|
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2148
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2149
|
+
cachedTextDecoder.decode();
|
|
2150
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2151
|
+
let numBytesDecoded = 0;
|
|
2152
|
+
function decodeText(ptr, len) {
|
|
2153
|
+
numBytesDecoded += len;
|
|
2154
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2155
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2156
|
+
cachedTextDecoder.decode();
|
|
2157
|
+
numBytesDecoded = len;
|
|
2158
|
+
}
|
|
2159
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2160
|
+
}
|
|
2239
2161
|
|
|
2240
|
-
|
|
2241
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
2242
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
2243
|
-
return addHeapObject(ret);
|
|
2244
|
-
};
|
|
2162
|
+
const cachedTextEncoder = new TextEncoder();
|
|
2245
2163
|
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2164
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
2165
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
2166
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2167
|
+
view.set(buf);
|
|
2168
|
+
return {
|
|
2169
|
+
read: arg.length,
|
|
2170
|
+
written: buf.length
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
2173
|
+
}
|
|
2251
2174
|
|
|
2252
|
-
|
|
2253
|
-
const ret = getObject(arg0);
|
|
2254
|
-
return addHeapObject(ret);
|
|
2255
|
-
};
|
|
2175
|
+
let WASM_VECTOR_LEN = 0;
|
|
2256
2176
|
|
|
2257
|
-
export function __wbindgen_object_drop_ref(arg0) {
|
|
2258
|
-
takeObject(arg0);
|
|
2259
|
-
};
|
|
2260
2177
|
|
|
2178
|
+
let wasm;
|
|
2179
|
+
export function __wbg_set_wasm(val) {
|
|
2180
|
+
wasm = val;
|
|
2181
|
+
}
|