@cartridge/controller-wasm 0.7.14-3b036eb → 0.7.14-44f18f37
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 +367 -299
- package/pkg-controller/account_wasm.js +7 -2
- package/pkg-controller/account_wasm_bg.js +1093 -1142
- package/pkg-controller/account_wasm_bg.wasm +0 -0
- package/pkg-session/session_wasm.d.ts +190 -155
- package/pkg-session/session_wasm.js +7 -2
- package/pkg-session/session_wasm_bg.js +696 -777
- package/pkg-session/session_wasm_bg.wasm +0 -0
|
@@ -1,348 +1,5 @@
|
|
|
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
|
-
function addHeapObject(obj) {
|
|
9
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
10
|
-
const idx = heap_next;
|
|
11
|
-
heap_next = heap[idx];
|
|
12
|
-
|
|
13
|
-
heap[idx] = obj;
|
|
14
|
-
return idx;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function _assertClass(instance, klass) {
|
|
18
|
-
if (!(instance instanceof klass)) {
|
|
19
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
24
|
-
? { register: () => {}, unregister: () => {} }
|
|
25
|
-
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
26
|
-
|
|
27
|
-
function debugString(val) {
|
|
28
|
-
// primitive types
|
|
29
|
-
const type = typeof val;
|
|
30
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
31
|
-
return `${val}`;
|
|
32
|
-
}
|
|
33
|
-
if (type == 'string') {
|
|
34
|
-
return `"${val}"`;
|
|
35
|
-
}
|
|
36
|
-
if (type == 'symbol') {
|
|
37
|
-
const description = val.description;
|
|
38
|
-
if (description == null) {
|
|
39
|
-
return 'Symbol';
|
|
40
|
-
} else {
|
|
41
|
-
return `Symbol(${description})`;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (type == 'function') {
|
|
45
|
-
const name = val.name;
|
|
46
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
47
|
-
return `Function(${name})`;
|
|
48
|
-
} else {
|
|
49
|
-
return 'Function';
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
// objects
|
|
53
|
-
if (Array.isArray(val)) {
|
|
54
|
-
const length = val.length;
|
|
55
|
-
let debug = '[';
|
|
56
|
-
if (length > 0) {
|
|
57
|
-
debug += debugString(val[0]);
|
|
58
|
-
}
|
|
59
|
-
for(let i = 1; i < length; i++) {
|
|
60
|
-
debug += ', ' + debugString(val[i]);
|
|
61
|
-
}
|
|
62
|
-
debug += ']';
|
|
63
|
-
return debug;
|
|
64
|
-
}
|
|
65
|
-
// Test for built-in
|
|
66
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
67
|
-
let className;
|
|
68
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
69
|
-
className = builtInMatches[1];
|
|
70
|
-
} else {
|
|
71
|
-
// Failed to match the standard '[object ClassName]'
|
|
72
|
-
return toString.call(val);
|
|
73
|
-
}
|
|
74
|
-
if (className == 'Object') {
|
|
75
|
-
// we're a user defined class or Object
|
|
76
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
77
|
-
// easier than looping through ownProperties of `val`.
|
|
78
|
-
try {
|
|
79
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
80
|
-
} catch (_) {
|
|
81
|
-
return 'Object';
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
// errors
|
|
85
|
-
if (val instanceof Error) {
|
|
86
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
87
|
-
}
|
|
88
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
89
|
-
return className;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function dropObject(idx) {
|
|
93
|
-
if (idx < 132) return;
|
|
94
|
-
heap[idx] = heap_next;
|
|
95
|
-
heap_next = idx;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
99
|
-
ptr = ptr >>> 0;
|
|
100
|
-
const mem = getDataViewMemory0();
|
|
101
|
-
const result = [];
|
|
102
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
103
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
|
104
|
-
}
|
|
105
|
-
return result;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
109
|
-
ptr = ptr >>> 0;
|
|
110
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
let cachedDataViewMemory0 = null;
|
|
114
|
-
function getDataViewMemory0() {
|
|
115
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
116
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
117
|
-
}
|
|
118
|
-
return cachedDataViewMemory0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function getStringFromWasm0(ptr, len) {
|
|
122
|
-
ptr = ptr >>> 0;
|
|
123
|
-
return decodeText(ptr, len);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
let cachedUint8ArrayMemory0 = null;
|
|
127
|
-
function getUint8ArrayMemory0() {
|
|
128
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
129
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
130
|
-
}
|
|
131
|
-
return cachedUint8ArrayMemory0;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function getObject(idx) { return heap[idx]; }
|
|
135
|
-
|
|
136
|
-
function handleError(f, args) {
|
|
137
|
-
try {
|
|
138
|
-
return f.apply(this, args);
|
|
139
|
-
} catch (e) {
|
|
140
|
-
wasm.__wbindgen_export3(addHeapObject(e));
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
let heap = new Array(128).fill(undefined);
|
|
145
|
-
heap.push(undefined, null, true, false);
|
|
146
|
-
|
|
147
|
-
let heap_next = heap.length;
|
|
148
|
-
|
|
149
|
-
function isLikeNone(x) {
|
|
150
|
-
return x === undefined || x === null;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function makeClosure(arg0, arg1, dtor, f) {
|
|
154
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
155
|
-
const real = (...args) => {
|
|
156
|
-
|
|
157
|
-
// First up with a closure we increment the internal reference
|
|
158
|
-
// count. This ensures that the Rust closure environment won't
|
|
159
|
-
// be deallocated while we're invoking it.
|
|
160
|
-
state.cnt++;
|
|
161
|
-
try {
|
|
162
|
-
return f(state.a, state.b, ...args);
|
|
163
|
-
} finally {
|
|
164
|
-
real._wbg_cb_unref();
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
real._wbg_cb_unref = () => {
|
|
168
|
-
if (--state.cnt === 0) {
|
|
169
|
-
state.dtor(state.a, state.b);
|
|
170
|
-
state.a = 0;
|
|
171
|
-
CLOSURE_DTORS.unregister(state);
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
175
|
-
return real;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
179
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
180
|
-
const real = (...args) => {
|
|
181
|
-
|
|
182
|
-
// First up with a closure we increment the internal reference
|
|
183
|
-
// count. This ensures that the Rust closure environment won't
|
|
184
|
-
// be deallocated while we're invoking it.
|
|
185
|
-
state.cnt++;
|
|
186
|
-
const a = state.a;
|
|
187
|
-
state.a = 0;
|
|
188
|
-
try {
|
|
189
|
-
return f(a, state.b, ...args);
|
|
190
|
-
} finally {
|
|
191
|
-
state.a = a;
|
|
192
|
-
real._wbg_cb_unref();
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
real._wbg_cb_unref = () => {
|
|
196
|
-
if (--state.cnt === 0) {
|
|
197
|
-
state.dtor(state.a, state.b);
|
|
198
|
-
state.a = 0;
|
|
199
|
-
CLOSURE_DTORS.unregister(state);
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
203
|
-
return real;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
207
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
208
|
-
const mem = getDataViewMemory0();
|
|
209
|
-
for (let i = 0; i < array.length; i++) {
|
|
210
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
211
|
-
}
|
|
212
|
-
WASM_VECTOR_LEN = array.length;
|
|
213
|
-
return ptr;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
217
|
-
if (realloc === undefined) {
|
|
218
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
219
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
220
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
221
|
-
WASM_VECTOR_LEN = buf.length;
|
|
222
|
-
return ptr;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
let len = arg.length;
|
|
226
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
227
|
-
|
|
228
|
-
const mem = getUint8ArrayMemory0();
|
|
229
|
-
|
|
230
|
-
let offset = 0;
|
|
231
|
-
|
|
232
|
-
for (; offset < len; offset++) {
|
|
233
|
-
const code = arg.charCodeAt(offset);
|
|
234
|
-
if (code > 0x7F) break;
|
|
235
|
-
mem[ptr + offset] = code;
|
|
236
|
-
}
|
|
237
|
-
if (offset !== len) {
|
|
238
|
-
if (offset !== 0) {
|
|
239
|
-
arg = arg.slice(offset);
|
|
240
|
-
}
|
|
241
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
242
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
243
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
244
|
-
|
|
245
|
-
offset += ret.written;
|
|
246
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
WASM_VECTOR_LEN = offset;
|
|
250
|
-
return ptr;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
function takeObject(idx) {
|
|
254
|
-
const ret = getObject(idx);
|
|
255
|
-
dropObject(idx);
|
|
256
|
-
return ret;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
260
|
-
cachedTextDecoder.decode();
|
|
261
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
262
|
-
let numBytesDecoded = 0;
|
|
263
|
-
function decodeText(ptr, len) {
|
|
264
|
-
numBytesDecoded += len;
|
|
265
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
266
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
267
|
-
cachedTextDecoder.decode();
|
|
268
|
-
numBytesDecoded = len;
|
|
269
|
-
}
|
|
270
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
const cachedTextEncoder = new TextEncoder();
|
|
274
|
-
|
|
275
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
276
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
277
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
278
|
-
view.set(buf);
|
|
279
|
-
return {
|
|
280
|
-
read: arg.length,
|
|
281
|
-
written: buf.length
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
let WASM_VECTOR_LEN = 0;
|
|
287
|
-
|
|
288
|
-
function __wasm_bindgen_func_elem_8794(arg0, arg1, arg2) {
|
|
289
|
-
wasm.__wasm_bindgen_func_elem_8794(arg0, arg1, addHeapObject(arg2));
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function __wasm_bindgen_func_elem_3269(arg0, arg1, arg2) {
|
|
293
|
-
wasm.__wasm_bindgen_func_elem_3269(arg0, arg1, addHeapObject(arg2));
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
function __wasm_bindgen_func_elem_8644(arg0, arg1) {
|
|
297
|
-
wasm.__wasm_bindgen_func_elem_8644(arg0, arg1);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
function __wasm_bindgen_func_elem_10894(arg0, arg1, arg2, arg3) {
|
|
301
|
-
wasm.__wasm_bindgen_func_elem_10894(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
305
|
-
|
|
306
|
-
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
307
|
-
|
|
308
|
-
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
309
|
-
|
|
310
|
-
const CartridgeAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
311
|
-
? { register: () => {}, unregister: () => {} }
|
|
312
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccount_free(ptr >>> 0, 1));
|
|
313
|
-
|
|
314
|
-
const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
315
|
-
? { register: () => {}, unregister: () => {} }
|
|
316
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountmeta_free(ptr >>> 0, 1));
|
|
317
|
-
|
|
318
|
-
const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
319
|
-
? { register: () => {}, unregister: () => {} }
|
|
320
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountwithmeta_free(ptr >>> 0, 1));
|
|
321
|
-
|
|
322
|
-
const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
323
|
-
? { register: () => {}, unregister: () => {} }
|
|
324
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
|
|
325
|
-
|
|
326
|
-
const JsChainConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
327
|
-
? { register: () => {}, unregister: () => {} }
|
|
328
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jschainconfig_free(ptr >>> 0, 1));
|
|
329
|
-
|
|
330
|
-
const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
331
|
-
? { register: () => {}, unregister: () => {} }
|
|
332
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
|
|
333
|
-
|
|
334
|
-
const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
335
|
-
? { register: () => {}, unregister: () => {} }
|
|
336
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
|
|
337
|
-
|
|
338
|
-
const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
339
|
-
? { register: () => {}, unregister: () => {} }
|
|
340
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
|
|
341
|
-
|
|
342
|
-
const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
343
|
-
? { register: () => {}, unregister: () => {} }
|
|
344
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
|
|
345
|
-
|
|
346
3
|
export class CartridgeAccount {
|
|
347
4
|
static __wrap(ptr) {
|
|
348
5
|
ptr = ptr >>> 0;
|
|
@@ -362,82 +19,25 @@ export class CartridgeAccount {
|
|
|
362
19
|
wasm.__wbg_cartridgeaccount_free(ptr, 0);
|
|
363
20
|
}
|
|
364
21
|
/**
|
|
22
|
+
* @param {Signer | null} [owner]
|
|
23
|
+
* @param {JsAddSignerInput | null} [signer_input]
|
|
24
|
+
* @param {string | null} [rp_id]
|
|
365
25
|
* @returns {Promise<void>}
|
|
366
26
|
*/
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* @param {JsFeeEstimate | null} [max_fee]
|
|
373
|
-
* @returns {Promise<any>}
|
|
374
|
-
*/
|
|
375
|
-
deploySelf(max_fee) {
|
|
376
|
-
const ret = wasm.cartridgeaccount_deploySelf(this.__wbg_ptr, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
377
|
-
return takeObject(ret);
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* @param {string} cartridge_api_url
|
|
381
|
-
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
382
|
-
*/
|
|
383
|
-
static fromStorage(cartridge_api_url) {
|
|
384
|
-
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
385
|
-
const len0 = WASM_VECTOR_LEN;
|
|
386
|
-
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
387
|
-
return takeObject(ret);
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Creates a new `CartridgeAccount` instance with a randomly generated Starknet signer.
|
|
391
|
-
* The controller address is computed internally based on the generated signer.
|
|
392
|
-
*
|
|
393
|
-
* # Parameters
|
|
394
|
-
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
395
|
-
* - `username`: Username associated with the account.
|
|
396
|
-
* @param {JsFelt} class_hash
|
|
397
|
-
* @param {string} rpc_url
|
|
398
|
-
* @param {string} username
|
|
399
|
-
* @param {string} cartridge_api_url
|
|
400
|
-
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
401
|
-
*/
|
|
402
|
-
static newHeadless(class_hash, rpc_url, username, cartridge_api_url) {
|
|
403
|
-
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
404
|
-
const len0 = WASM_VECTOR_LEN;
|
|
405
|
-
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
406
|
-
const len1 = WASM_VECTOR_LEN;
|
|
407
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
408
|
-
const len2 = WASM_VECTOR_LEN;
|
|
409
|
-
const ret = wasm.cartridgeaccount_newHeadless(addHeapObject(class_hash), ptr0, len0, ptr1, len1, ptr2, len2);
|
|
410
|
-
return takeObject(ret);
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* @param {JsRemoveSignerInput} signer
|
|
414
|
-
* @returns {Promise<void>}
|
|
415
|
-
*/
|
|
416
|
-
removeOwner(signer) {
|
|
417
|
-
const ret = wasm.cartridgeaccount_removeOwner(this.__wbg_ptr, addHeapObject(signer));
|
|
418
|
-
return takeObject(ret);
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* @param {string} typed_data
|
|
422
|
-
* @returns {Promise<Felts>}
|
|
423
|
-
*/
|
|
424
|
-
signMessage(typed_data) {
|
|
425
|
-
const ptr0 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
426
|
-
const len0 = WASM_VECTOR_LEN;
|
|
427
|
-
const ret = wasm.cartridgeaccount_signMessage(this.__wbg_ptr, ptr0, len0);
|
|
27
|
+
addOwner(owner, signer_input, rp_id) {
|
|
28
|
+
var ptr0 = isLikeNone(rp_id) ? 0 : passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
29
|
+
var len0 = WASM_VECTOR_LEN;
|
|
30
|
+
const ret = wasm.cartridgeaccount_addOwner(this.__wbg_ptr, isLikeNone(owner) ? 0 : addHeapObject(owner), isLikeNone(signer_input) ? 0 : addHeapObject(signer_input), ptr0, len0);
|
|
428
31
|
return takeObject(ret);
|
|
429
32
|
}
|
|
430
33
|
/**
|
|
431
|
-
* @param {string}
|
|
432
|
-
* @
|
|
433
|
-
* @returns {Promise<void>}
|
|
34
|
+
* @param {string} rp_id
|
|
35
|
+
* @returns {Promise<JsAddSignerInput>}
|
|
434
36
|
*/
|
|
435
|
-
|
|
436
|
-
const ptr0 = passStringToWasm0(
|
|
37
|
+
createPasskeySigner(rp_id) {
|
|
38
|
+
const ptr0 = passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
437
39
|
const len0 = WASM_VECTOR_LEN;
|
|
438
|
-
const
|
|
439
|
-
const len1 = WASM_VECTOR_LEN;
|
|
440
|
-
const ret = wasm.cartridgeaccount_skipSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
40
|
+
const ret = wasm.cartridgeaccount_createPasskeySigner(this.__wbg_ptr, ptr0, len0);
|
|
441
41
|
return takeObject(ret);
|
|
442
42
|
}
|
|
443
43
|
/**
|
|
@@ -455,24 +55,6 @@ export class CartridgeAccount {
|
|
|
455
55
|
const ret = wasm.cartridgeaccount_createSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, isLikeNone(authorize_user_execution) ? 0xFFFFFF : authorize_user_execution ? 1 : 0);
|
|
456
56
|
return takeObject(ret);
|
|
457
57
|
}
|
|
458
|
-
/**
|
|
459
|
-
* @param {JsRevokableSession} session
|
|
460
|
-
* @returns {Promise<void>}
|
|
461
|
-
*/
|
|
462
|
-
revokeSession(session) {
|
|
463
|
-
const ret = wasm.cartridgeaccount_revokeSession(this.__wbg_ptr, addHeapObject(session));
|
|
464
|
-
return takeObject(ret);
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* @param {JsRevokableSession[]} sessions
|
|
468
|
-
* @returns {Promise<void>}
|
|
469
|
-
*/
|
|
470
|
-
revokeSessions(sessions) {
|
|
471
|
-
const ptr0 = passArrayJsValueToWasm0(sessions, wasm.__wbindgen_export);
|
|
472
|
-
const len0 = WASM_VECTOR_LEN;
|
|
473
|
-
const ret = wasm.cartridgeaccount_revokeSessions(this.__wbg_ptr, ptr0, len0);
|
|
474
|
-
return takeObject(ret);
|
|
475
|
-
}
|
|
476
58
|
/**
|
|
477
59
|
* @returns {Promise<JsFelt>}
|
|
478
60
|
*/
|
|
@@ -481,66 +63,40 @@ export class CartridgeAccount {
|
|
|
481
63
|
return takeObject(ret);
|
|
482
64
|
}
|
|
483
65
|
/**
|
|
484
|
-
* @param {string} app_id
|
|
485
|
-
* @param {Policy[]} policies
|
|
486
|
-
* @param {bigint} expires_at
|
|
487
|
-
* @param {JsFelt} public_key
|
|
488
66
|
* @param {JsFeeEstimate | null} [max_fee]
|
|
489
67
|
* @returns {Promise<any>}
|
|
490
68
|
*/
|
|
491
|
-
|
|
492
|
-
const
|
|
493
|
-
const len0 = WASM_VECTOR_LEN;
|
|
494
|
-
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
495
|
-
const len1 = WASM_VECTOR_LEN;
|
|
496
|
-
const ret = wasm.cartridgeaccount_registerSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, addHeapObject(public_key), isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
497
|
-
return takeObject(ret);
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* @param {JsCall[]} calls
|
|
501
|
-
* @returns {Promise<JsFeeEstimate>}
|
|
502
|
-
*/
|
|
503
|
-
estimateInvokeFee(calls) {
|
|
504
|
-
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
505
|
-
const len0 = WASM_VECTOR_LEN;
|
|
506
|
-
const ret = wasm.cartridgeaccount_estimateInvokeFee(this.__wbg_ptr, ptr0, len0);
|
|
69
|
+
deploySelf(max_fee) {
|
|
70
|
+
const ret = wasm.cartridgeaccount_deploySelf(this.__wbg_ptr, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
507
71
|
return takeObject(ret);
|
|
508
72
|
}
|
|
509
73
|
/**
|
|
510
|
-
* @
|
|
511
|
-
* @param {JsCall[]} calls
|
|
512
|
-
* @param {JsFeeSource | null} [fee_source]
|
|
513
|
-
* @returns {Promise<any>}
|
|
74
|
+
* @returns {Promise<void>}
|
|
514
75
|
*/
|
|
515
|
-
|
|
516
|
-
const
|
|
517
|
-
const len0 = WASM_VECTOR_LEN;
|
|
518
|
-
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
519
|
-
const len1 = WASM_VECTOR_LEN;
|
|
520
|
-
const ret = wasm.cartridgeaccount_trySessionExecute(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
76
|
+
disconnect() {
|
|
77
|
+
const ret = wasm.cartridgeaccount_disconnect(this.__wbg_ptr);
|
|
521
78
|
return takeObject(ret);
|
|
522
79
|
}
|
|
523
80
|
/**
|
|
524
|
-
* @param {
|
|
525
|
-
* @returns {Promise<
|
|
81
|
+
* @param {JsCall[]} calls
|
|
82
|
+
* @returns {Promise<JsFeeEstimate>}
|
|
526
83
|
*/
|
|
527
|
-
|
|
528
|
-
const ptr0 =
|
|
84
|
+
estimateInvokeFee(calls) {
|
|
85
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
529
86
|
const len0 = WASM_VECTOR_LEN;
|
|
530
|
-
const ret = wasm.
|
|
87
|
+
const ret = wasm.cartridgeaccount_estimateInvokeFee(this.__wbg_ptr, ptr0, len0);
|
|
531
88
|
return takeObject(ret);
|
|
532
89
|
}
|
|
533
90
|
/**
|
|
534
|
-
* @param {
|
|
535
|
-
* @param {
|
|
536
|
-
* @
|
|
91
|
+
* @param {JsCall[]} calls
|
|
92
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
93
|
+
* @param {JsFeeSource | null} [fee_source]
|
|
94
|
+
* @returns {Promise<any>}
|
|
537
95
|
*/
|
|
538
|
-
|
|
539
|
-
const ptr0 =
|
|
96
|
+
execute(calls, max_fee, fee_source) {
|
|
97
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
540
98
|
const len0 = WASM_VECTOR_LEN;
|
|
541
|
-
const
|
|
542
|
-
const len1 = WASM_VECTOR_LEN;
|
|
543
|
-
const ret = wasm.cartridgeaccount_hasRequestedSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
99
|
+
const ret = wasm.cartridgeaccount_execute(this.__wbg_ptr, ptr0, len0, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee), isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
544
100
|
return takeObject(ret);
|
|
545
101
|
}
|
|
546
102
|
/**
|
|
@@ -566,60 +122,37 @@ export class CartridgeAccount {
|
|
|
566
122
|
return takeObject(ret);
|
|
567
123
|
}
|
|
568
124
|
/**
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
* # Parameters
|
|
572
|
-
* - `app_id`: The application identifier to check for stored policies
|
|
573
|
-
*
|
|
574
|
-
* # Returns
|
|
575
|
-
* `true` if policies exist for the given app_id, `false` otherwise
|
|
576
|
-
* @param {string} app_id
|
|
577
|
-
* @returns {Promise<boolean>}
|
|
125
|
+
* @param {string | null} [app_id]
|
|
126
|
+
* @returns {Promise<ImportedSessionMetadata | undefined>}
|
|
578
127
|
*/
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
const ret = wasm.
|
|
128
|
+
exportAuthorizedSession(app_id) {
|
|
129
|
+
var ptr0 = isLikeNone(app_id) ? 0 : passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
130
|
+
var len0 = WASM_VECTOR_LEN;
|
|
131
|
+
const ret = wasm.cartridgeaccount_exportAuthorizedSession(this.__wbg_ptr, ptr0, len0);
|
|
583
132
|
return takeObject(ret);
|
|
584
133
|
}
|
|
585
134
|
/**
|
|
586
|
-
* @
|
|
587
|
-
* @param {bigint} expires_at
|
|
588
|
-
* @param {JsFelt} public_key
|
|
589
|
-
* @returns {Promise<any>}
|
|
135
|
+
* @returns {Promise<ImportedControllerMetadata>}
|
|
590
136
|
*/
|
|
591
|
-
|
|
592
|
-
const
|
|
593
|
-
const len0 = WASM_VECTOR_LEN;
|
|
594
|
-
const ret = wasm.cartridgeaccount_registerSessionCalldata(this.__wbg_ptr, ptr0, len0, expires_at, addHeapObject(public_key));
|
|
137
|
+
exportMetadata() {
|
|
138
|
+
const ret = wasm.cartridgeaccount_exportMetadata(this.__wbg_ptr);
|
|
595
139
|
return takeObject(ret);
|
|
596
140
|
}
|
|
597
141
|
/**
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
* # Parameters
|
|
601
|
-
* - `calls`: Array of calls to execute from outside
|
|
602
|
-
*
|
|
603
|
-
* # Returns
|
|
604
|
-
* A `JsSignedOutsideExecution` containing the OutsideExecution V3 object and its signature
|
|
605
|
-
* @param {JsCall[]} calls
|
|
606
|
-
* @returns {Promise<JsSignedOutsideExecution>}
|
|
142
|
+
* @param {string} cartridge_api_url
|
|
143
|
+
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
607
144
|
*/
|
|
608
|
-
|
|
609
|
-
const ptr0 =
|
|
145
|
+
static fromStorage(cartridge_api_url) {
|
|
146
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
610
147
|
const len0 = WASM_VECTOR_LEN;
|
|
611
|
-
const ret = wasm.
|
|
148
|
+
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
612
149
|
return takeObject(ret);
|
|
613
150
|
}
|
|
614
151
|
/**
|
|
615
|
-
* @
|
|
616
|
-
* @param {JsFelt | null} [public_key]
|
|
617
|
-
* @returns {Promise<AuthorizedSession | undefined>}
|
|
152
|
+
* @returns {Promise<any>}
|
|
618
153
|
*/
|
|
619
|
-
|
|
620
|
-
const
|
|
621
|
-
const len0 = WASM_VECTOR_LEN;
|
|
622
|
-
const ret = wasm.cartridgeaccount_isRegisteredSessionAuthorized(this.__wbg_ptr, ptr0, len0, isLikeNone(public_key) ? 0 : addHeapObject(public_key));
|
|
154
|
+
getNonce() {
|
|
155
|
+
const ret = wasm.cartridgeaccount_getNonce(this.__wbg_ptr);
|
|
623
156
|
return takeObject(ret);
|
|
624
157
|
}
|
|
625
158
|
/**
|
|
@@ -648,6 +181,55 @@ export class CartridgeAccount {
|
|
|
648
181
|
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
649
182
|
return takeObject(ret);
|
|
650
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Checks if there are stored policies for a given app_id.
|
|
186
|
+
*
|
|
187
|
+
* # Parameters
|
|
188
|
+
* - `app_id`: The application identifier to check for stored policies
|
|
189
|
+
*
|
|
190
|
+
* # Returns
|
|
191
|
+
* `true` if policies exist for the given app_id, `false` otherwise
|
|
192
|
+
* @param {string} app_id
|
|
193
|
+
* @returns {Promise<boolean>}
|
|
194
|
+
*/
|
|
195
|
+
hasPoliciesForAppId(app_id) {
|
|
196
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
197
|
+
const len0 = WASM_VECTOR_LEN;
|
|
198
|
+
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
199
|
+
return takeObject(ret);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @param {string} app_id
|
|
203
|
+
* @param {Policy[]} policies
|
|
204
|
+
* @returns {Promise<boolean>}
|
|
205
|
+
*/
|
|
206
|
+
hasRequestedSession(app_id, policies) {
|
|
207
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
208
|
+
const len0 = WASM_VECTOR_LEN;
|
|
209
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
210
|
+
const len1 = WASM_VECTOR_LEN;
|
|
211
|
+
const ret = wasm.cartridgeaccount_hasRequestedSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
212
|
+
return takeObject(ret);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* @param {ImportedSessionMetadata} imported_session
|
|
216
|
+
* @returns {Promise<void>}
|
|
217
|
+
*/
|
|
218
|
+
importSession(imported_session) {
|
|
219
|
+
const ret = wasm.cartridgeaccount_importSession(this.__wbg_ptr, addHeapObject(imported_session));
|
|
220
|
+
return takeObject(ret);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* @param {Policy[]} policies
|
|
224
|
+
* @param {JsFelt | null} [public_key]
|
|
225
|
+
* @returns {Promise<AuthorizedSession | undefined>}
|
|
226
|
+
*/
|
|
227
|
+
isRegisteredSessionAuthorized(policies, public_key) {
|
|
228
|
+
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
229
|
+
const len0 = WASM_VECTOR_LEN;
|
|
230
|
+
const ret = wasm.cartridgeaccount_isRegisteredSessionAuthorized(this.__wbg_ptr, ptr0, len0, isLikeNone(public_key) ? 0 : addHeapObject(public_key));
|
|
231
|
+
return takeObject(ret);
|
|
232
|
+
}
|
|
651
233
|
/**
|
|
652
234
|
* Creates a new `CartridgeAccount` instance.
|
|
653
235
|
*
|
|
@@ -675,50 +257,150 @@ export class CartridgeAccount {
|
|
|
675
257
|
return takeObject(ret);
|
|
676
258
|
}
|
|
677
259
|
/**
|
|
678
|
-
*
|
|
260
|
+
* Creates a new `CartridgeAccount` instance with a randomly generated Starknet signer.
|
|
261
|
+
* The controller address is computed internally based on the generated signer.
|
|
262
|
+
*
|
|
263
|
+
* # Parameters
|
|
264
|
+
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
265
|
+
* - `username`: Username associated with the account.
|
|
266
|
+
* @param {JsFelt} class_hash
|
|
267
|
+
* @param {string} rpc_url
|
|
268
|
+
* @param {string} username
|
|
269
|
+
* @param {string} cartridge_api_url
|
|
270
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
271
|
+
*/
|
|
272
|
+
static newHeadless(class_hash, rpc_url, username, cartridge_api_url) {
|
|
273
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
274
|
+
const len0 = WASM_VECTOR_LEN;
|
|
275
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
276
|
+
const len1 = WASM_VECTOR_LEN;
|
|
277
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
278
|
+
const len2 = WASM_VECTOR_LEN;
|
|
279
|
+
const ret = wasm.cartridgeaccount_newHeadless(addHeapObject(class_hash), ptr0, len0, ptr1, len1, ptr2, len2);
|
|
280
|
+
return takeObject(ret);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* @param {JsRegister} register
|
|
284
|
+
* @returns {Promise<JsRegisterResponse>}
|
|
285
|
+
*/
|
|
286
|
+
register(register) {
|
|
287
|
+
const ret = wasm.cartridgeaccount_register(this.__wbg_ptr, addHeapObject(register));
|
|
288
|
+
return takeObject(ret);
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @param {string} app_id
|
|
292
|
+
* @param {Policy[]} policies
|
|
293
|
+
* @param {bigint} expires_at
|
|
294
|
+
* @param {JsFelt} public_key
|
|
679
295
|
* @param {JsFeeEstimate | null} [max_fee]
|
|
680
|
-
* @param {JsFeeSource | null} [fee_source]
|
|
681
296
|
* @returns {Promise<any>}
|
|
682
297
|
*/
|
|
683
|
-
|
|
684
|
-
const ptr0 =
|
|
298
|
+
registerSession(app_id, policies, expires_at, public_key, max_fee) {
|
|
299
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
685
300
|
const len0 = WASM_VECTOR_LEN;
|
|
686
|
-
const
|
|
301
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
302
|
+
const len1 = WASM_VECTOR_LEN;
|
|
303
|
+
const ret = wasm.cartridgeaccount_registerSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, addHeapObject(public_key), isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
687
304
|
return takeObject(ret);
|
|
688
305
|
}
|
|
689
306
|
/**
|
|
690
|
-
* @param {
|
|
691
|
-
* @
|
|
307
|
+
* @param {Policy[]} policies
|
|
308
|
+
* @param {bigint} expires_at
|
|
309
|
+
* @param {JsFelt} public_key
|
|
310
|
+
* @returns {Promise<any>}
|
|
692
311
|
*/
|
|
693
|
-
|
|
694
|
-
const
|
|
312
|
+
registerSessionCalldata(policies, expires_at, public_key) {
|
|
313
|
+
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
314
|
+
const len0 = WASM_VECTOR_LEN;
|
|
315
|
+
const ret = wasm.cartridgeaccount_registerSessionCalldata(this.__wbg_ptr, ptr0, len0, expires_at, addHeapObject(public_key));
|
|
695
316
|
return takeObject(ret);
|
|
696
317
|
}
|
|
697
318
|
/**
|
|
698
|
-
* @param {
|
|
699
|
-
* @returns {Promise<
|
|
319
|
+
* @param {JsRemoveSignerInput} signer
|
|
320
|
+
* @returns {Promise<void>}
|
|
700
321
|
*/
|
|
701
|
-
|
|
702
|
-
const ret = wasm.
|
|
322
|
+
removeOwner(signer) {
|
|
323
|
+
const ret = wasm.cartridgeaccount_removeOwner(this.__wbg_ptr, addHeapObject(signer));
|
|
703
324
|
return takeObject(ret);
|
|
704
325
|
}
|
|
705
326
|
/**
|
|
706
|
-
* @param {
|
|
707
|
-
* @param {JsAddSignerInput | null} [signer_input]
|
|
708
|
-
* @param {string | null} [rp_id]
|
|
327
|
+
* @param {JsRevokableSession} session
|
|
709
328
|
* @returns {Promise<void>}
|
|
710
329
|
*/
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
330
|
+
revokeSession(session) {
|
|
331
|
+
const ret = wasm.cartridgeaccount_revokeSession(this.__wbg_ptr, addHeapObject(session));
|
|
332
|
+
return takeObject(ret);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* @param {JsRevokableSession[]} sessions
|
|
336
|
+
* @returns {Promise<void>}
|
|
337
|
+
*/
|
|
338
|
+
revokeSessions(sessions) {
|
|
339
|
+
const ptr0 = passArrayJsValueToWasm0(sessions, wasm.__wbindgen_export);
|
|
340
|
+
const len0 = WASM_VECTOR_LEN;
|
|
341
|
+
const ret = wasm.cartridgeaccount_revokeSessions(this.__wbg_ptr, ptr0, len0);
|
|
342
|
+
return takeObject(ret);
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Signs an OutsideExecution V3 transaction and returns both the OutsideExecution object and its signature.
|
|
346
|
+
*
|
|
347
|
+
* # Parameters
|
|
348
|
+
* - `calls`: Array of calls to execute from outside
|
|
349
|
+
*
|
|
350
|
+
* # Returns
|
|
351
|
+
* A `JsSignedOutsideExecution` containing the OutsideExecution V3 object and its signature
|
|
352
|
+
* @param {JsCall[]} calls
|
|
353
|
+
* @returns {Promise<JsSignedOutsideExecution>}
|
|
354
|
+
*/
|
|
355
|
+
signExecuteFromOutside(calls) {
|
|
356
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
357
|
+
const len0 = WASM_VECTOR_LEN;
|
|
358
|
+
const ret = wasm.cartridgeaccount_signExecuteFromOutside(this.__wbg_ptr, ptr0, len0);
|
|
359
|
+
return takeObject(ret);
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* @param {string} typed_data
|
|
363
|
+
* @returns {Promise<Felts>}
|
|
364
|
+
*/
|
|
365
|
+
signMessage(typed_data) {
|
|
366
|
+
const ptr0 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
367
|
+
const len0 = WASM_VECTOR_LEN;
|
|
368
|
+
const ret = wasm.cartridgeaccount_signMessage(this.__wbg_ptr, ptr0, len0);
|
|
369
|
+
return takeObject(ret);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* @param {string} app_id
|
|
373
|
+
* @param {Policy[]} policies
|
|
374
|
+
* @returns {Promise<void>}
|
|
375
|
+
*/
|
|
376
|
+
skipSession(app_id, policies) {
|
|
377
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
378
|
+
const len0 = WASM_VECTOR_LEN;
|
|
379
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
380
|
+
const len1 = WASM_VECTOR_LEN;
|
|
381
|
+
const ret = wasm.cartridgeaccount_skipSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
382
|
+
return takeObject(ret);
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* @param {string} app_id
|
|
386
|
+
* @param {JsCall[]} calls
|
|
387
|
+
* @param {JsFeeSource | null} [fee_source]
|
|
388
|
+
* @returns {Promise<any>}
|
|
389
|
+
*/
|
|
390
|
+
trySessionExecute(app_id, calls, fee_source) {
|
|
391
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
392
|
+
const len0 = WASM_VECTOR_LEN;
|
|
393
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
394
|
+
const len1 = WASM_VECTOR_LEN;
|
|
395
|
+
const ret = wasm.cartridgeaccount_trySessionExecute(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
715
396
|
return takeObject(ret);
|
|
716
397
|
}
|
|
717
398
|
/**
|
|
718
|
-
* @
|
|
399
|
+
* @param {JsFelt} new_class_hash
|
|
400
|
+
* @returns {Promise<JsCall>}
|
|
719
401
|
*/
|
|
720
|
-
|
|
721
|
-
const ret = wasm.
|
|
402
|
+
upgrade(new_class_hash) {
|
|
403
|
+
const ret = wasm.cartridgeaccount_upgrade(this.__wbg_ptr, addHeapObject(new_class_hash));
|
|
722
404
|
return takeObject(ret);
|
|
723
405
|
}
|
|
724
406
|
}
|
|
@@ -758,12 +440,12 @@ export class CartridgeAccountMeta {
|
|
|
758
440
|
/**
|
|
759
441
|
* @returns {string}
|
|
760
442
|
*/
|
|
761
|
-
|
|
443
|
+
address() {
|
|
762
444
|
let deferred1_0;
|
|
763
445
|
let deferred1_1;
|
|
764
446
|
try {
|
|
765
447
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
766
|
-
wasm.
|
|
448
|
+
wasm.cartridgeaccountmeta_address(retptr, this.__wbg_ptr);
|
|
767
449
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
768
450
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
769
451
|
deferred1_0 = r0;
|
|
@@ -774,29 +456,15 @@ export class CartridgeAccountMeta {
|
|
|
774
456
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
775
457
|
}
|
|
776
458
|
}
|
|
777
|
-
/**
|
|
778
|
-
* @returns {JsFelt}
|
|
779
|
-
*/
|
|
780
|
-
ownerGuid() {
|
|
781
|
-
const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
|
|
782
|
-
return takeObject(ret);
|
|
783
|
-
}
|
|
784
|
-
/**
|
|
785
|
-
* @returns {Owner}
|
|
786
|
-
*/
|
|
787
|
-
owner() {
|
|
788
|
-
const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
|
|
789
|
-
return takeObject(ret);
|
|
790
|
-
}
|
|
791
459
|
/**
|
|
792
460
|
* @returns {string}
|
|
793
461
|
*/
|
|
794
|
-
|
|
462
|
+
chainId() {
|
|
795
463
|
let deferred1_0;
|
|
796
464
|
let deferred1_1;
|
|
797
465
|
try {
|
|
798
466
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
799
|
-
wasm.
|
|
467
|
+
wasm.cartridgeaccountmeta_chainId(retptr, this.__wbg_ptr);
|
|
800
468
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
801
469
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
802
470
|
deferred1_0 = r0;
|
|
@@ -810,12 +478,12 @@ export class CartridgeAccountMeta {
|
|
|
810
478
|
/**
|
|
811
479
|
* @returns {string}
|
|
812
480
|
*/
|
|
813
|
-
|
|
481
|
+
classHash() {
|
|
814
482
|
let deferred1_0;
|
|
815
483
|
let deferred1_1;
|
|
816
484
|
try {
|
|
817
485
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
818
|
-
wasm.
|
|
486
|
+
wasm.cartridgeaccountmeta_classHash(retptr, this.__wbg_ptr);
|
|
819
487
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
820
488
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
821
489
|
deferred1_0 = r0;
|
|
@@ -826,15 +494,29 @@ export class CartridgeAccountMeta {
|
|
|
826
494
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
827
495
|
}
|
|
828
496
|
}
|
|
497
|
+
/**
|
|
498
|
+
* @returns {Owner}
|
|
499
|
+
*/
|
|
500
|
+
owner() {
|
|
501
|
+
const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
|
|
502
|
+
return takeObject(ret);
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* @returns {JsFelt}
|
|
506
|
+
*/
|
|
507
|
+
ownerGuid() {
|
|
508
|
+
const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
|
|
509
|
+
return takeObject(ret);
|
|
510
|
+
}
|
|
829
511
|
/**
|
|
830
512
|
* @returns {string}
|
|
831
513
|
*/
|
|
832
|
-
|
|
514
|
+
rpcUrl() {
|
|
833
515
|
let deferred1_0;
|
|
834
516
|
let deferred1_1;
|
|
835
517
|
try {
|
|
836
518
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
837
|
-
wasm.
|
|
519
|
+
wasm.cartridgeaccountmeta_rpcUrl(retptr, this.__wbg_ptr);
|
|
838
520
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
839
521
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
840
522
|
deferred1_0 = r0;
|
|
@@ -921,6 +603,37 @@ export class ControllerFactory {
|
|
|
921
603
|
const ptr = this.__destroy_into_raw();
|
|
922
604
|
wasm.__wbg_controllerfactory_free(ptr, 0);
|
|
923
605
|
}
|
|
606
|
+
/**
|
|
607
|
+
* This should only be used with webauthn signers
|
|
608
|
+
* @param {string} username
|
|
609
|
+
* @param {JsFelt} class_hash
|
|
610
|
+
* @param {string} rpc_url
|
|
611
|
+
* @param {JsFelt} address
|
|
612
|
+
* @param {Owner} owner
|
|
613
|
+
* @param {string} cartridge_api_url
|
|
614
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
615
|
+
*/
|
|
616
|
+
static apiLogin(username, class_hash, rpc_url, address, owner, cartridge_api_url) {
|
|
617
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
618
|
+
const len0 = WASM_VECTOR_LEN;
|
|
619
|
+
const ptr1 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
620
|
+
const len1 = WASM_VECTOR_LEN;
|
|
621
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
622
|
+
const len2 = WASM_VECTOR_LEN;
|
|
623
|
+
const ret = wasm.controllerfactory_apiLogin(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), addHeapObject(owner), ptr2, len2);
|
|
624
|
+
return takeObject(ret);
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* @param {ImportedControllerMetadata} metadata
|
|
628
|
+
* @param {string} cartridge_api_url
|
|
629
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
630
|
+
*/
|
|
631
|
+
static fromMetadata(metadata, cartridge_api_url) {
|
|
632
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
633
|
+
const len0 = WASM_VECTOR_LEN;
|
|
634
|
+
const ret = wasm.controllerfactory_fromMetadata(addHeapObject(metadata), ptr0, len0);
|
|
635
|
+
return takeObject(ret);
|
|
636
|
+
}
|
|
924
637
|
/**
|
|
925
638
|
* @param {string} cartridge_api_url
|
|
926
639
|
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
@@ -982,26 +695,6 @@ export class ControllerFactory {
|
|
|
982
695
|
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);
|
|
983
696
|
return takeObject(ret);
|
|
984
697
|
}
|
|
985
|
-
/**
|
|
986
|
-
* This should only be used with webauthn signers
|
|
987
|
-
* @param {string} username
|
|
988
|
-
* @param {JsFelt} class_hash
|
|
989
|
-
* @param {string} rpc_url
|
|
990
|
-
* @param {JsFelt} address
|
|
991
|
-
* @param {Owner} owner
|
|
992
|
-
* @param {string} cartridge_api_url
|
|
993
|
-
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
994
|
-
*/
|
|
995
|
-
static apiLogin(username, class_hash, rpc_url, address, owner, cartridge_api_url) {
|
|
996
|
-
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
997
|
-
const len0 = WASM_VECTOR_LEN;
|
|
998
|
-
const ptr1 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
999
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1000
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1001
|
-
const len2 = WASM_VECTOR_LEN;
|
|
1002
|
-
const ret = wasm.controllerfactory_apiLogin(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), addHeapObject(owner), ptr2, len2);
|
|
1003
|
-
return takeObject(ret);
|
|
1004
|
-
}
|
|
1005
698
|
}
|
|
1006
699
|
if (Symbol.dispose) ControllerFactory.prototype[Symbol.dispose] = ControllerFactory.prototype.free;
|
|
1007
700
|
|
|
@@ -1104,6 +797,13 @@ export class JsChainConfig {
|
|
|
1104
797
|
const ptr = this.__destroy_into_raw();
|
|
1105
798
|
wasm.__wbg_jschainconfig_free(ptr, 0);
|
|
1106
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* @returns {JsFelt | undefined}
|
|
802
|
+
*/
|
|
803
|
+
get address() {
|
|
804
|
+
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
805
|
+
return takeObject(ret);
|
|
806
|
+
}
|
|
1107
807
|
/**
|
|
1108
808
|
* @returns {JsFelt}
|
|
1109
809
|
*/
|
|
@@ -1132,13 +832,6 @@ export class JsChainConfig {
|
|
|
1132
832
|
const ret = wasm.jschainconfig_owner(this.__wbg_ptr);
|
|
1133
833
|
return takeObject(ret);
|
|
1134
834
|
}
|
|
1135
|
-
/**
|
|
1136
|
-
* @returns {JsFelt | undefined}
|
|
1137
|
-
*/
|
|
1138
|
-
get address() {
|
|
1139
|
-
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
1140
|
-
return takeObject(ret);
|
|
1141
|
-
}
|
|
1142
835
|
/**
|
|
1143
836
|
* @returns {string}
|
|
1144
837
|
*/
|
|
@@ -1162,13 +855,6 @@ export class JsChainConfig {
|
|
|
1162
855
|
if (Symbol.dispose) JsChainConfig.prototype[Symbol.dispose] = JsChainConfig.prototype.free;
|
|
1163
856
|
|
|
1164
857
|
export class JsControllerError {
|
|
1165
|
-
static __wrap(ptr) {
|
|
1166
|
-
ptr = ptr >>> 0;
|
|
1167
|
-
const obj = Object.create(JsControllerError.prototype);
|
|
1168
|
-
obj.__wbg_ptr = ptr;
|
|
1169
|
-
JsControllerErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1170
|
-
return obj;
|
|
1171
|
-
}
|
|
1172
858
|
__destroy_into_raw() {
|
|
1173
859
|
const ptr = this.__wbg_ptr;
|
|
1174
860
|
this.__wbg_ptr = 0;
|
|
@@ -1187,10 +873,23 @@ export class JsControllerError {
|
|
|
1187
873
|
return ret;
|
|
1188
874
|
}
|
|
1189
875
|
/**
|
|
1190
|
-
* @
|
|
876
|
+
* @returns {string | undefined}
|
|
1191
877
|
*/
|
|
1192
|
-
|
|
1193
|
-
|
|
878
|
+
get data() {
|
|
879
|
+
try {
|
|
880
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
881
|
+
wasm.__wbg_get_jscontrollererror_data(retptr, this.__wbg_ptr);
|
|
882
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
883
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
884
|
+
let v1;
|
|
885
|
+
if (r0 !== 0) {
|
|
886
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
887
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
888
|
+
}
|
|
889
|
+
return v1;
|
|
890
|
+
} finally {
|
|
891
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
892
|
+
}
|
|
1194
893
|
}
|
|
1195
894
|
/**
|
|
1196
895
|
* @returns {string}
|
|
@@ -1212,31 +911,10 @@ export class JsControllerError {
|
|
|
1212
911
|
}
|
|
1213
912
|
}
|
|
1214
913
|
/**
|
|
1215
|
-
* @param {
|
|
1216
|
-
*/
|
|
1217
|
-
set message(arg0) {
|
|
1218
|
-
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1219
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1220
|
-
wasm.__wbg_set_jscontrollererror_message(this.__wbg_ptr, ptr0, len0);
|
|
1221
|
-
}
|
|
1222
|
-
/**
|
|
1223
|
-
* @returns {string | undefined}
|
|
914
|
+
* @param {ErrorCode} arg0
|
|
1224
915
|
*/
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1228
|
-
wasm.__wbg_get_jscontrollererror_data(retptr, this.__wbg_ptr);
|
|
1229
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1230
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1231
|
-
let v1;
|
|
1232
|
-
if (r0 !== 0) {
|
|
1233
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1234
|
-
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1235
|
-
}
|
|
1236
|
-
return v1;
|
|
1237
|
-
} finally {
|
|
1238
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1239
|
-
}
|
|
916
|
+
set code(arg0) {
|
|
917
|
+
wasm.__wbg_set_jscontrollererror_code(this.__wbg_ptr, arg0);
|
|
1240
918
|
}
|
|
1241
919
|
/**
|
|
1242
920
|
* @param {string | null} [arg0]
|
|
@@ -1246,6 +924,14 @@ export class JsControllerError {
|
|
|
1246
924
|
var len0 = WASM_VECTOR_LEN;
|
|
1247
925
|
wasm.__wbg_set_jscontrollererror_data(this.__wbg_ptr, ptr0, len0);
|
|
1248
926
|
}
|
|
927
|
+
/**
|
|
928
|
+
* @param {string} arg0
|
|
929
|
+
*/
|
|
930
|
+
set message(arg0) {
|
|
931
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
932
|
+
const len0 = WASM_VECTOR_LEN;
|
|
933
|
+
wasm.__wbg_set_jscontrollererror_message(this.__wbg_ptr, ptr0, len0);
|
|
934
|
+
}
|
|
1249
935
|
}
|
|
1250
936
|
if (Symbol.dispose) JsControllerError.prototype[Symbol.dispose] = JsControllerError.prototype.free;
|
|
1251
937
|
|
|
@@ -1300,32 +986,23 @@ export class MultiChainAccount {
|
|
|
1300
986
|
wasm.__wbg_multichainaccount_free(ptr, 0);
|
|
1301
987
|
}
|
|
1302
988
|
/**
|
|
1303
|
-
*
|
|
1304
|
-
* @param {
|
|
1305
|
-
* @returns {Promise<
|
|
1306
|
-
*/
|
|
1307
|
-
controller(chain_id) {
|
|
1308
|
-
const ret = wasm.multichainaccount_controller(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1309
|
-
return takeObject(ret);
|
|
1310
|
-
}
|
|
1311
|
-
/**
|
|
1312
|
-
* Loads a MultiChainAccount from storage
|
|
1313
|
-
* @param {string} cartridge_api_url
|
|
1314
|
-
* @returns {Promise<MultiChainAccount | undefined>}
|
|
989
|
+
* Adds a new chain configuration
|
|
990
|
+
* @param {JsChainConfig} config
|
|
991
|
+
* @returns {Promise<void>}
|
|
1315
992
|
*/
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
const ret = wasm.
|
|
993
|
+
addChain(config) {
|
|
994
|
+
_assertClass(config, JsChainConfig);
|
|
995
|
+
var ptr0 = config.__destroy_into_raw();
|
|
996
|
+
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
1320
997
|
return takeObject(ret);
|
|
1321
998
|
}
|
|
1322
999
|
/**
|
|
1323
|
-
*
|
|
1000
|
+
* Gets an account instance for a specific chain
|
|
1324
1001
|
* @param {JsFelt} chain_id
|
|
1325
|
-
* @returns {Promise<
|
|
1002
|
+
* @returns {Promise<CartridgeAccount>}
|
|
1326
1003
|
*/
|
|
1327
|
-
|
|
1328
|
-
const ret = wasm.
|
|
1004
|
+
controller(chain_id) {
|
|
1005
|
+
const ret = wasm.multichainaccount_controller(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1329
1006
|
return takeObject(ret);
|
|
1330
1007
|
}
|
|
1331
1008
|
/**
|
|
@@ -1346,14 +1023,23 @@ export class MultiChainAccount {
|
|
|
1346
1023
|
return takeObject(ret);
|
|
1347
1024
|
}
|
|
1348
1025
|
/**
|
|
1349
|
-
*
|
|
1350
|
-
* @param {
|
|
1026
|
+
* Loads a MultiChainAccount from storage
|
|
1027
|
+
* @param {string} cartridge_api_url
|
|
1028
|
+
* @returns {Promise<MultiChainAccount | undefined>}
|
|
1029
|
+
*/
|
|
1030
|
+
static fromStorage(cartridge_api_url) {
|
|
1031
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1032
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1033
|
+
const ret = wasm.multichainaccount_fromStorage(ptr0, len0);
|
|
1034
|
+
return takeObject(ret);
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Removes a chain configuration
|
|
1038
|
+
* @param {JsFelt} chain_id
|
|
1351
1039
|
* @returns {Promise<void>}
|
|
1352
1040
|
*/
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
var ptr0 = config.__destroy_into_raw();
|
|
1356
|
-
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
1041
|
+
removeChain(chain_id) {
|
|
1042
|
+
const ret = wasm.multichainaccount_removeChain(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1357
1043
|
return takeObject(ret);
|
|
1358
1044
|
}
|
|
1359
1045
|
}
|
|
@@ -1478,231 +1164,191 @@ export function subscribeCreateSession(session_key_guid, cartridge_api_url) {
|
|
|
1478
1164
|
const ret = wasm.subscribeCreateSession(addHeapObject(session_key_guid), ptr0, len0);
|
|
1479
1165
|
return takeObject(ret);
|
|
1480
1166
|
}
|
|
1481
|
-
|
|
1482
|
-
export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
|
|
1167
|
+
export function __wbg_Error_83742b46f01ce22d(arg0, arg1) {
|
|
1483
1168
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1484
1169
|
return addHeapObject(ret);
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
1170
|
+
}
|
|
1171
|
+
export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
1488
1172
|
const ret = String(getObject(arg1));
|
|
1489
1173
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1490
1174
|
const len1 = WASM_VECTOR_LEN;
|
|
1491
1175
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1492
1176
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0) {
|
|
1177
|
+
}
|
|
1178
|
+
export function __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1(arg0) {
|
|
1496
1179
|
const v = getObject(arg0);
|
|
1497
1180
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1498
1181
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
|
|
1182
|
+
}
|
|
1183
|
+
export function __wbg___wbindgen_debug_string_5398f5bb970e0daa(arg0, arg1) {
|
|
1502
1184
|
const ret = debugString(getObject(arg1));
|
|
1503
1185
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1504
1186
|
const len1 = WASM_VECTOR_LEN;
|
|
1505
1187
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1506
1188
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
export function __wbg___wbindgen_in_0d3e1e8f0c669317(arg0, arg1) {
|
|
1189
|
+
}
|
|
1190
|
+
export function __wbg___wbindgen_in_41dbb8413020e076(arg0, arg1) {
|
|
1510
1191
|
const ret = getObject(arg0) in getObject(arg1);
|
|
1511
1192
|
return ret;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
|
|
1193
|
+
}
|
|
1194
|
+
export function __wbg___wbindgen_is_function_3c846841762788c1(arg0) {
|
|
1515
1195
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
1516
1196
|
return ret;
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
|
|
1197
|
+
}
|
|
1198
|
+
export function __wbg___wbindgen_is_object_781bc9f159099513(arg0) {
|
|
1520
1199
|
const val = getObject(arg0);
|
|
1521
1200
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1522
1201
|
return ret;
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) {
|
|
1202
|
+
}
|
|
1203
|
+
export function __wbg___wbindgen_is_string_7ef6b97b02428fae(arg0) {
|
|
1526
1204
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
1527
1205
|
return ret;
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
|
|
1206
|
+
}
|
|
1207
|
+
export function __wbg___wbindgen_is_undefined_52709e72fb9f179c(arg0) {
|
|
1531
1208
|
const ret = getObject(arg0) === undefined;
|
|
1532
1209
|
return ret;
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0, arg1) {
|
|
1210
|
+
}
|
|
1211
|
+
export function __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b(arg0, arg1) {
|
|
1536
1212
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1537
1213
|
return ret;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
|
|
1214
|
+
}
|
|
1215
|
+
export function __wbg___wbindgen_number_get_34bb9d9dcfa21373(arg0, arg1) {
|
|
1541
1216
|
const obj = getObject(arg1);
|
|
1542
1217
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1543
1218
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1544
1219
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
|
|
1220
|
+
}
|
|
1221
|
+
export function __wbg___wbindgen_string_get_395e606bd0ee4427(arg0, arg1) {
|
|
1548
1222
|
const obj = getObject(arg1);
|
|
1549
1223
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1550
1224
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1551
1225
|
var len1 = WASM_VECTOR_LEN;
|
|
1552
1226
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1553
1227
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
|
|
1228
|
+
}
|
|
1229
|
+
export function __wbg___wbindgen_throw_6ddd609b62940d55(arg0, arg1) {
|
|
1557
1230
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
export function __wbg__wbg_cb_unref_87dfb5aaa0cbcea7(arg0) {
|
|
1231
|
+
}
|
|
1232
|
+
export function __wbg__wbg_cb_unref_6b5b6b8576d35cb1(arg0) {
|
|
1561
1233
|
getObject(arg0)._wbg_cb_unref();
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
export function __wbg_abort_07646c894ebbf2bd(arg0) {
|
|
1234
|
+
}
|
|
1235
|
+
export function __wbg_abort_5ef96933660780b7(arg0) {
|
|
1565
1236
|
getObject(arg0).abort();
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
export function __wbg_abort_399ecbcfd6ef3c8e(arg0, arg1) {
|
|
1237
|
+
}
|
|
1238
|
+
export function __wbg_abort_6479c2d794ebf2ee(arg0, arg1) {
|
|
1569
1239
|
getObject(arg0).abort(getObject(arg1));
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
export function __wbg_addEventListener_6a82629b3d430a48() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1240
|
+
}
|
|
1241
|
+
export function __wbg_addEventListener_2d985aa8a656f6dc() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1573
1242
|
getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
1574
|
-
}, arguments) }
|
|
1575
|
-
|
|
1576
|
-
export function __wbg_append_c5cbdf46455cc776() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1243
|
+
}, arguments); }
|
|
1244
|
+
export function __wbg_append_608dfb635ee8998f() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1577
1245
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1578
|
-
}, arguments) }
|
|
1579
|
-
|
|
1580
|
-
export function __wbg_arrayBuffer_c04af4fce566092d() { return handleError(function (arg0) {
|
|
1246
|
+
}, arguments); }
|
|
1247
|
+
export function __wbg_arrayBuffer_eb8e9ca620af2a19() { return handleError(function (arg0) {
|
|
1581
1248
|
const ret = getObject(arg0).arrayBuffer();
|
|
1582
1249
|
return addHeapObject(ret);
|
|
1583
|
-
}, arguments) }
|
|
1584
|
-
|
|
1585
|
-
export function __wbg_call_3020136f7a2d6e44() { return handleError(function (arg0, arg1, arg2) {
|
|
1250
|
+
}, arguments); }
|
|
1251
|
+
export function __wbg_call_2d781c1f4d5c0ef8() { return handleError(function (arg0, arg1, arg2) {
|
|
1586
1252
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1587
1253
|
return addHeapObject(ret);
|
|
1588
|
-
}, arguments) }
|
|
1589
|
-
|
|
1590
|
-
export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
|
|
1254
|
+
}, arguments); }
|
|
1255
|
+
export function __wbg_call_e133b57c9155d22c() { return handleError(function (arg0, arg1) {
|
|
1591
1256
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1592
1257
|
return addHeapObject(ret);
|
|
1593
|
-
}, arguments) }
|
|
1594
|
-
|
|
1258
|
+
}, arguments); }
|
|
1595
1259
|
export function __wbg_cartridgeaccount_new(arg0) {
|
|
1596
1260
|
const ret = CartridgeAccount.__wrap(arg0);
|
|
1597
1261
|
return addHeapObject(ret);
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1262
|
+
}
|
|
1600
1263
|
export function __wbg_cartridgeaccountwithmeta_new(arg0) {
|
|
1601
1264
|
const ret = CartridgeAccountWithMeta.__wrap(arg0);
|
|
1602
1265
|
return addHeapObject(ret);
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
export function __wbg_clearTimeout_42d9ccd50822fd3a(arg0) {
|
|
1266
|
+
}
|
|
1267
|
+
export function __wbg_clearTimeout_6b8d9a38b9263d65(arg0) {
|
|
1606
1268
|
const ret = clearTimeout(takeObject(arg0));
|
|
1607
1269
|
return addHeapObject(ret);
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
export function __wbg_clear_9fc28ed354d59d5e() { return handleError(function (arg0) {
|
|
1270
|
+
}
|
|
1271
|
+
export function __wbg_clear_f0a9edc1f780da4e() { return handleError(function (arg0) {
|
|
1611
1272
|
getObject(arg0).clear();
|
|
1612
|
-
}, arguments) }
|
|
1613
|
-
|
|
1614
|
-
export function __wbg_create_07d71296a0909e61() { return handleError(function (arg0, arg1) {
|
|
1273
|
+
}, arguments); }
|
|
1274
|
+
export function __wbg_create_48a66894da5b46c4() { return handleError(function (arg0, arg1) {
|
|
1615
1275
|
const ret = getObject(arg0).create(getObject(arg1));
|
|
1616
1276
|
return addHeapObject(ret);
|
|
1617
|
-
}, arguments) }
|
|
1618
|
-
|
|
1619
|
-
export function __wbg_credentials_36e0572b476d4883(arg0) {
|
|
1277
|
+
}, arguments); }
|
|
1278
|
+
export function __wbg_credentials_512715b843dae8c8(arg0) {
|
|
1620
1279
|
const ret = getObject(arg0).credentials;
|
|
1621
1280
|
return addHeapObject(ret);
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
export function __wbg_crypto_574e78ad8b13b65f(arg0) {
|
|
1281
|
+
}
|
|
1282
|
+
export function __wbg_crypto_38df2bab126b63dc(arg0) {
|
|
1625
1283
|
const ret = getObject(arg0).crypto;
|
|
1626
1284
|
return addHeapObject(ret);
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
export function __wbg_data_8bf4ae669a78a688(arg0) {
|
|
1285
|
+
}
|
|
1286
|
+
export function __wbg_data_a3d9ff9cdd801002(arg0) {
|
|
1630
1287
|
const ret = getObject(arg0).data;
|
|
1631
1288
|
return addHeapObject(ret);
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
export function __wbg_done_62ea16af4ce34b24(arg0) {
|
|
1289
|
+
}
|
|
1290
|
+
export function __wbg_done_08ce71ee07e3bd17(arg0) {
|
|
1635
1291
|
const ret = getObject(arg0).done;
|
|
1636
1292
|
return ret;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
export function __wbg_error_7bc7d576a6aaf855(arg0) {
|
|
1293
|
+
}
|
|
1294
|
+
export function __wbg_error_8d9a8e04cd1d3588(arg0) {
|
|
1640
1295
|
console.error(getObject(arg0));
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
export function __wbg_fetch_6bbc32f991730587(arg0) {
|
|
1644
|
-
const ret = fetch(getObject(arg0));
|
|
1645
|
-
return addHeapObject(ret);
|
|
1646
|
-
};
|
|
1647
|
-
|
|
1648
|
-
export function __wbg_fetch_90447c28cc0b095e(arg0, arg1) {
|
|
1296
|
+
}
|
|
1297
|
+
export function __wbg_fetch_5550a88cf343aaa9(arg0, arg1) {
|
|
1649
1298
|
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1650
1299
|
return addHeapObject(ret);
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
export function __wbg_fetch_f1856afdb49415d1(arg0) {
|
|
1300
|
+
}
|
|
1301
|
+
export function __wbg_fetch_9dad4fe911207b37(arg0) {
|
|
1654
1302
|
const ret = fetch(getObject(arg0));
|
|
1655
1303
|
return addHeapObject(ret);
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
|
|
1304
|
+
}
|
|
1305
|
+
export function __wbg_fetch_fda7bc27c982b1f3(arg0) {
|
|
1306
|
+
const ret = fetch(getObject(arg0));
|
|
1307
|
+
return addHeapObject(ret);
|
|
1308
|
+
}
|
|
1309
|
+
export function __wbg_getClientExtensionResults_0c58ae7175717c3d(arg0) {
|
|
1659
1310
|
const ret = getObject(arg0).getClientExtensionResults();
|
|
1660
1311
|
return addHeapObject(ret);
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
export function __wbg_getItem_1340bfc9a10d5991() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1312
|
+
}
|
|
1313
|
+
export function __wbg_getItem_a7cc1d4f154f2e6f() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1664
1314
|
const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
|
|
1665
1315
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1666
1316
|
var len1 = WASM_VECTOR_LEN;
|
|
1667
1317
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1668
1318
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1669
|
-
}, arguments) }
|
|
1670
|
-
|
|
1671
|
-
export function __wbg_getRandomValues_b8f5dbd5f3995a9e() { return handleError(function (arg0, arg1) {
|
|
1319
|
+
}, arguments); }
|
|
1320
|
+
export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
|
|
1672
1321
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1673
|
-
}, arguments) }
|
|
1674
|
-
|
|
1675
|
-
export function __wbg_getTime_ad1e9878a735af08(arg0) {
|
|
1322
|
+
}, arguments); }
|
|
1323
|
+
export function __wbg_getTime_1dad7b5386ddd2d9(arg0) {
|
|
1676
1324
|
const ret = getObject(arg0).getTime();
|
|
1677
1325
|
return ret;
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
export function __wbg_get_29726a9b608aea28() { return handleError(function (arg0, arg1) {
|
|
1326
|
+
}
|
|
1327
|
+
export function __wbg_get_2803136e052c1ea0() { return handleError(function (arg0, arg1) {
|
|
1681
1328
|
const ret = getObject(arg0).get(getObject(arg1));
|
|
1682
1329
|
return addHeapObject(ret);
|
|
1683
|
-
}, arguments) }
|
|
1684
|
-
|
|
1685
|
-
export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
|
|
1330
|
+
}, arguments); }
|
|
1331
|
+
export function __wbg_get_326e41e095fb2575() { return handleError(function (arg0, arg1) {
|
|
1686
1332
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1687
1333
|
return addHeapObject(ret);
|
|
1688
|
-
}, arguments) }
|
|
1689
|
-
|
|
1690
|
-
|
|
1334
|
+
}, arguments); }
|
|
1335
|
+
export function __wbg_get_3ef1eba1850ade27() { return handleError(function (arg0, arg1) {
|
|
1336
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1337
|
+
return addHeapObject(ret);
|
|
1338
|
+
}, arguments); }
|
|
1339
|
+
export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
|
|
1691
1340
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
1692
1341
|
return addHeapObject(ret);
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
export function __wbg_has_0e670569d65d3a45() { return handleError(function (arg0, arg1) {
|
|
1342
|
+
}
|
|
1343
|
+
export function __wbg_has_926ef2ff40b308cf() { return handleError(function (arg0, arg1) {
|
|
1696
1344
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1697
1345
|
return ret;
|
|
1698
|
-
}, arguments) }
|
|
1699
|
-
|
|
1700
|
-
export function __wbg_headers_654c30e1bcccc552(arg0) {
|
|
1346
|
+
}, arguments); }
|
|
1347
|
+
export function __wbg_headers_eb2234545f9ff993(arg0) {
|
|
1701
1348
|
const ret = getObject(arg0).headers;
|
|
1702
1349
|
return addHeapObject(ret);
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
|
|
1350
|
+
}
|
|
1351
|
+
export function __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6(arg0) {
|
|
1706
1352
|
let result;
|
|
1707
1353
|
try {
|
|
1708
1354
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -1711,9 +1357,8 @@ export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
|
|
|
1711
1357
|
}
|
|
1712
1358
|
const ret = result;
|
|
1713
1359
|
return ret;
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
|
|
1360
|
+
}
|
|
1361
|
+
export function __wbg_instanceof_Object_be1962063fcc0c9f(arg0) {
|
|
1717
1362
|
let result;
|
|
1718
1363
|
try {
|
|
1719
1364
|
result = getObject(arg0) instanceof Object;
|
|
@@ -1722,9 +1367,8 @@ export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
|
|
|
1722
1367
|
}
|
|
1723
1368
|
const ret = result;
|
|
1724
1369
|
return ret;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
|
|
1370
|
+
}
|
|
1371
|
+
export function __wbg_instanceof_Response_9b4d9fd451e051b1(arg0) {
|
|
1728
1372
|
let result;
|
|
1729
1373
|
try {
|
|
1730
1374
|
result = getObject(arg0) instanceof Response;
|
|
@@ -1733,9 +1377,8 @@ export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
|
|
|
1733
1377
|
}
|
|
1734
1378
|
const ret = result;
|
|
1735
1379
|
return ret;
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
|
|
1380
|
+
}
|
|
1381
|
+
export function __wbg_instanceof_Uint8Array_740438561a5b956d(arg0) {
|
|
1739
1382
|
let result;
|
|
1740
1383
|
try {
|
|
1741
1384
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -1744,9 +1387,8 @@ export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
|
|
|
1744
1387
|
}
|
|
1745
1388
|
const ret = result;
|
|
1746
1389
|
return ret;
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
|
|
1390
|
+
}
|
|
1391
|
+
export function __wbg_instanceof_Window_23e677d2c6843922(arg0) {
|
|
1750
1392
|
let result;
|
|
1751
1393
|
try {
|
|
1752
1394
|
result = getObject(arg0) instanceof Window;
|
|
@@ -1755,9 +1397,8 @@ export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
|
|
|
1755
1397
|
}
|
|
1756
1398
|
const ret = result;
|
|
1757
1399
|
return ret;
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
export function __wbg_instanceof_WorkerGlobalScope_9a3411db21c65a54(arg0) {
|
|
1400
|
+
}
|
|
1401
|
+
export function __wbg_instanceof_WorkerGlobalScope_de6976d00cb213c6(arg0) {
|
|
1761
1402
|
let result;
|
|
1762
1403
|
try {
|
|
1763
1404
|
result = getObject(arg0) instanceof WorkerGlobalScope;
|
|
@@ -1766,110 +1407,97 @@ export function __wbg_instanceof_WorkerGlobalScope_9a3411db21c65a54(arg0) {
|
|
|
1766
1407
|
}
|
|
1767
1408
|
const ret = result;
|
|
1768
1409
|
return ret;
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
export function __wbg_iterator_27b7c8b35ab3e86b() {
|
|
1410
|
+
}
|
|
1411
|
+
export function __wbg_iterator_d8f549ec8fb061b1() {
|
|
1772
1412
|
const ret = Symbol.iterator;
|
|
1773
1413
|
return addHeapObject(ret);
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1414
|
+
}
|
|
1776
1415
|
export function __wbg_jschainconfig_unwrap(arg0) {
|
|
1777
1416
|
const ret = JsChainConfig.__unwrap(getObject(arg0));
|
|
1778
1417
|
return ret;
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1418
|
+
}
|
|
1419
|
+
export function __wbg_key_84733a6ee7e4d63e() { return handleError(function (arg0, arg1, arg2) {
|
|
1420
|
+
const ret = getObject(arg1).key(arg2 >>> 0);
|
|
1421
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1422
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1423
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1424
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1425
|
+
}, arguments); }
|
|
1426
|
+
export function __wbg_length_8632bd8b5ab30449() { return handleError(function (arg0) {
|
|
1787
1427
|
const ret = getObject(arg0).length;
|
|
1788
1428
|
return ret;
|
|
1789
|
-
};
|
|
1790
|
-
|
|
1791
|
-
|
|
1429
|
+
}, arguments); }
|
|
1430
|
+
export function __wbg_length_ea16607d7b61445b(arg0) {
|
|
1431
|
+
const ret = getObject(arg0).length;
|
|
1432
|
+
return ret;
|
|
1433
|
+
}
|
|
1434
|
+
export function __wbg_localStorage_51c38b3b222e1ed2() { return handleError(function (arg0) {
|
|
1792
1435
|
const ret = getObject(arg0).localStorage;
|
|
1793
1436
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1794
|
-
}, arguments) }
|
|
1795
|
-
|
|
1796
|
-
export function __wbg_location_962e75c1c1b3ebed(arg0) {
|
|
1437
|
+
}, arguments); }
|
|
1438
|
+
export function __wbg_location_fc8d47802682dd93(arg0) {
|
|
1797
1439
|
const ret = getObject(arg0).location;
|
|
1798
1440
|
return addHeapObject(ret);
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
export function __wbg_log_1d990106d99dacb7(arg0) {
|
|
1441
|
+
}
|
|
1442
|
+
export function __wbg_log_524eedafa26daa59(arg0) {
|
|
1802
1443
|
console.log(getObject(arg0));
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1444
|
+
}
|
|
1805
1445
|
export function __wbg_loginresult_new(arg0) {
|
|
1806
1446
|
const ret = LoginResult.__wrap(arg0);
|
|
1807
1447
|
return addHeapObject(ret);
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
|
|
1448
|
+
}
|
|
1449
|
+
export function __wbg_msCrypto_bd5a034af96bcba6(arg0) {
|
|
1811
1450
|
const ret = getObject(arg0).msCrypto;
|
|
1812
1451
|
return addHeapObject(ret);
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1452
|
+
}
|
|
1815
1453
|
export function __wbg_multichainaccount_new(arg0) {
|
|
1816
1454
|
const ret = MultiChainAccount.__wrap(arg0);
|
|
1817
1455
|
return addHeapObject(ret);
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
export function __wbg_navigator_b49edef831236138(arg0) {
|
|
1456
|
+
}
|
|
1457
|
+
export function __wbg_navigator_9cebf56f28aa719b(arg0) {
|
|
1821
1458
|
const ret = getObject(arg0).navigator;
|
|
1822
1459
|
return addHeapObject(ret);
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
|
|
1460
|
+
}
|
|
1461
|
+
export function __wbg_new_0837727332ac86ba() { return handleError(function () {
|
|
1462
|
+
const ret = new Headers();
|
|
1463
|
+
return addHeapObject(ret);
|
|
1464
|
+
}, arguments); }
|
|
1465
|
+
export function __wbg_new_0_1dcafdf5e786e876() {
|
|
1826
1466
|
const ret = new Date();
|
|
1827
1467
|
return addHeapObject(ret);
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
const ret = new Object();
|
|
1468
|
+
}
|
|
1469
|
+
export function __wbg_new_49d5571bd3f0c4d4() {
|
|
1470
|
+
const ret = new Map();
|
|
1832
1471
|
return addHeapObject(ret);
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
const ret = new Array();
|
|
1472
|
+
}
|
|
1473
|
+
export function __wbg_new_5f486cdf45a04d78(arg0) {
|
|
1474
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1837
1475
|
return addHeapObject(ret);
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
export function __wbg_new_2658d63118834d8e() {
|
|
1476
|
+
}
|
|
1477
|
+
export function __wbg_new_8f7f8d552bd2ab6d() {
|
|
1841
1478
|
const ret = new Mutex();
|
|
1842
1479
|
return addHeapObject(ret);
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
const ret = new Headers();
|
|
1480
|
+
}
|
|
1481
|
+
export function __wbg_new_a70fbab9066b301f() {
|
|
1482
|
+
const ret = new Array();
|
|
1847
1483
|
return addHeapObject(ret);
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1484
|
+
}
|
|
1485
|
+
export function __wbg_new_ab79df5bd7c26067() {
|
|
1486
|
+
const ret = new Object();
|
|
1852
1487
|
return addHeapObject(ret);
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
export function __wbg_new_881a222c65f168fc() { return handleError(function () {
|
|
1488
|
+
}
|
|
1489
|
+
export function __wbg_new_c518c60af666645b() { return handleError(function () {
|
|
1856
1490
|
const ret = new AbortController();
|
|
1857
1491
|
return addHeapObject(ret);
|
|
1858
|
-
}, arguments) }
|
|
1859
|
-
|
|
1860
|
-
export function __wbg_new_b546ae120718850e() {
|
|
1861
|
-
const ret = new Map();
|
|
1862
|
-
return addHeapObject(ret);
|
|
1863
|
-
};
|
|
1864
|
-
|
|
1865
|
-
export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
|
|
1492
|
+
}, arguments); }
|
|
1493
|
+
export function __wbg_new_d098e265629cd10f(arg0, arg1) {
|
|
1866
1494
|
try {
|
|
1867
1495
|
var state0 = {a: arg0, b: arg1};
|
|
1868
1496
|
var cb0 = (arg0, arg1) => {
|
|
1869
1497
|
const a = state0.a;
|
|
1870
1498
|
state0.a = 0;
|
|
1871
1499
|
try {
|
|
1872
|
-
return
|
|
1500
|
+
return __wasm_bindgen_func_elem_11254(a, state0.b, arg0, arg1);
|
|
1873
1501
|
} finally {
|
|
1874
1502
|
state0.a = a;
|
|
1875
1503
|
}
|
|
@@ -1879,355 +1507,678 @@ export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
|
|
|
1879
1507
|
} finally {
|
|
1880
1508
|
state0.a = state0.b = 0;
|
|
1881
1509
|
}
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
|
|
1510
|
+
}
|
|
1511
|
+
export function __wbg_new_d15cb560a6a0e5f0(arg0, arg1) {
|
|
1512
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1513
|
+
return addHeapObject(ret);
|
|
1514
|
+
}
|
|
1515
|
+
export function __wbg_new_from_slice_22da9388ac046e50(arg0, arg1) {
|
|
1885
1516
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1886
1517
|
return addHeapObject(ret);
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1518
|
+
}
|
|
1519
|
+
export function __wbg_new_typed_aaaeaf29cf802876(arg0, arg1) {
|
|
1520
|
+
try {
|
|
1521
|
+
var state0 = {a: arg0, b: arg1};
|
|
1522
|
+
var cb0 = (arg0, arg1) => {
|
|
1523
|
+
const a = state0.a;
|
|
1524
|
+
state0.a = 0;
|
|
1525
|
+
try {
|
|
1526
|
+
return __wasm_bindgen_func_elem_11254(a, state0.b, arg0, arg1);
|
|
1527
|
+
} finally {
|
|
1528
|
+
state0.a = a;
|
|
1529
|
+
}
|
|
1530
|
+
};
|
|
1531
|
+
const ret = new Promise(cb0);
|
|
1532
|
+
return addHeapObject(ret);
|
|
1533
|
+
} finally {
|
|
1534
|
+
state0.a = state0.b = 0;
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
export function __wbg_new_typed_bccac67128ed885a() {
|
|
1538
|
+
const ret = new Array();
|
|
1891
1539
|
return addHeapObject(ret);
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
export function __wbg_new_with_length_aa5eaf41d35235e5(arg0) {
|
|
1540
|
+
}
|
|
1541
|
+
export function __wbg_new_with_length_825018a1616e9e55(arg0) {
|
|
1895
1542
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1896
1543
|
return addHeapObject(ret);
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1544
|
+
}
|
|
1545
|
+
export function __wbg_new_with_str_and_init_b4b54d1a819bc724() { return handleError(function (arg0, arg1, arg2) {
|
|
1546
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1547
|
+
return addHeapObject(ret);
|
|
1548
|
+
}, arguments); }
|
|
1549
|
+
export function __wbg_next_11b99ee6237339e3() { return handleError(function (arg0) {
|
|
1550
|
+
const ret = getObject(arg0).next();
|
|
1551
|
+
return addHeapObject(ret);
|
|
1552
|
+
}, arguments); }
|
|
1553
|
+
export function __wbg_next_e01a967809d1aa68(arg0) {
|
|
1554
|
+
const ret = getObject(arg0).next;
|
|
1555
|
+
return addHeapObject(ret);
|
|
1556
|
+
}
|
|
1557
|
+
export function __wbg_node_84ea875411254db1(arg0) {
|
|
1558
|
+
const ret = getObject(arg0).node;
|
|
1559
|
+
return addHeapObject(ret);
|
|
1560
|
+
}
|
|
1561
|
+
export function __wbg_now_16f0c993d5dd6c27() {
|
|
1562
|
+
const ret = Date.now();
|
|
1563
|
+
return ret;
|
|
1564
|
+
}
|
|
1565
|
+
export function __wbg_obtain_513d6156ff4b4fb7(arg0) {
|
|
1566
|
+
const ret = getObject(arg0).obtain();
|
|
1567
|
+
return addHeapObject(ret);
|
|
1568
|
+
}
|
|
1569
|
+
export function __wbg_open_891ac0b929710544() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1570
|
+
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6));
|
|
1571
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1572
|
+
}, arguments); }
|
|
1573
|
+
export function __wbg_origin_3a929219cb000f49(arg0, arg1) {
|
|
1574
|
+
const ret = getObject(arg1).origin;
|
|
1575
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1576
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1577
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1578
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1579
|
+
}
|
|
1580
|
+
export function __wbg_origin_bac5c3119fe40a90() { return handleError(function (arg0, arg1) {
|
|
1581
|
+
const ret = getObject(arg1).origin;
|
|
1582
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1583
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1584
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1585
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1586
|
+
}, arguments); }
|
|
1587
|
+
export function __wbg_parse_d8e59ac01c35b18b(arg0, arg1) {
|
|
1588
|
+
let deferred0_0;
|
|
1589
|
+
let deferred0_1;
|
|
1590
|
+
try {
|
|
1591
|
+
deferred0_0 = arg0;
|
|
1592
|
+
deferred0_1 = arg1;
|
|
1593
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1594
|
+
return addHeapObject(ret);
|
|
1595
|
+
} finally {
|
|
1596
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
export function __wbg_process_44c7a14e11e9f69e(arg0) {
|
|
1600
|
+
const ret = getObject(arg0).process;
|
|
1601
|
+
return addHeapObject(ret);
|
|
1602
|
+
}
|
|
1603
|
+
export function __wbg_prototypesetcall_d62e5099504357e6(arg0, arg1, arg2) {
|
|
1604
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1605
|
+
}
|
|
1606
|
+
export function __wbg_push_e87b0e732085a946(arg0, arg1) {
|
|
1607
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
1608
|
+
return ret;
|
|
1609
|
+
}
|
|
1610
|
+
export function __wbg_queueMicrotask_0c399741342fb10f(arg0) {
|
|
1611
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
1612
|
+
return addHeapObject(ret);
|
|
1613
|
+
}
|
|
1614
|
+
export function __wbg_queueMicrotask_a082d78ce798393e(arg0) {
|
|
1615
|
+
queueMicrotask(getObject(arg0));
|
|
1616
|
+
}
|
|
1617
|
+
export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
|
|
1618
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1619
|
+
}, arguments); }
|
|
1620
|
+
export function __wbg_removeEventListener_d27694700fc0df8b() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1621
|
+
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
1622
|
+
}, arguments); }
|
|
1623
|
+
export function __wbg_removeItem_95c258b9afdd7580() { return handleError(function (arg0, arg1, arg2) {
|
|
1624
|
+
getObject(arg0).removeItem(getStringFromWasm0(arg1, arg2));
|
|
1625
|
+
}, arguments); }
|
|
1626
|
+
export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function () {
|
|
1627
|
+
const ret = module.require;
|
|
1628
|
+
return addHeapObject(ret);
|
|
1629
|
+
}, arguments); }
|
|
1630
|
+
export function __wbg_resolve_ae8d83246e5bcc12(arg0) {
|
|
1631
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1632
|
+
return addHeapObject(ret);
|
|
1633
|
+
}
|
|
1634
|
+
export function __wbg_setItem_5f84aeef0d7f3c17() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1635
|
+
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1636
|
+
}, arguments); }
|
|
1637
|
+
export function __wbg_setTimeout_7f7035ad0b026458() { return handleError(function (arg0, arg1, arg2) {
|
|
1638
|
+
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
1639
|
+
return ret;
|
|
1640
|
+
}, arguments); }
|
|
1641
|
+
export function __wbg_setTimeout_c8336cac3e6a81ea() { return handleError(function (arg0, arg1, arg2) {
|
|
1642
|
+
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
1643
|
+
return ret;
|
|
1644
|
+
}, arguments); }
|
|
1645
|
+
export function __wbg_setTimeout_f757f00851f76c42(arg0, arg1) {
|
|
1646
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
1647
|
+
return addHeapObject(ret);
|
|
1648
|
+
}
|
|
1649
|
+
export function __wbg_set_282384002438957f(arg0, arg1, arg2) {
|
|
1650
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1651
|
+
}
|
|
1652
|
+
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1653
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1654
|
+
}
|
|
1655
|
+
export function __wbg_set_7eaa4f96924fd6b3() { return handleError(function (arg0, arg1, arg2) {
|
|
1656
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1657
|
+
return ret;
|
|
1658
|
+
}, arguments); }
|
|
1659
|
+
export function __wbg_set_bf7251625df30a02(arg0, arg1, arg2) {
|
|
1660
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1661
|
+
return addHeapObject(ret);
|
|
1662
|
+
}
|
|
1663
|
+
export function __wbg_set_body_a3d856b097dfda04(arg0, arg1) {
|
|
1664
|
+
getObject(arg0).body = getObject(arg1);
|
|
1665
|
+
}
|
|
1666
|
+
export function __wbg_set_cache_ec7e430c6056ebda(arg0, arg1) {
|
|
1667
|
+
getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
|
|
1668
|
+
}
|
|
1669
|
+
export function __wbg_set_credentials_ed63183445882c65(arg0, arg1) {
|
|
1670
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1671
|
+
}
|
|
1672
|
+
export function __wbg_set_d1cb61e9f39c870f(arg0, arg1, arg2) {
|
|
1673
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1674
|
+
}
|
|
1675
|
+
export function __wbg_set_headers_3c8fecc693b75327(arg0, arg1) {
|
|
1676
|
+
getObject(arg0).headers = getObject(arg1);
|
|
1677
|
+
}
|
|
1678
|
+
export function __wbg_set_method_8c015e8bcafd7be1(arg0, arg1, arg2) {
|
|
1679
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
1680
|
+
}
|
|
1681
|
+
export function __wbg_set_mode_5a87f2c809cf37c2(arg0, arg1) {
|
|
1682
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
1683
|
+
}
|
|
1684
|
+
export function __wbg_set_signal_0cebecb698f25d21(arg0, arg1) {
|
|
1685
|
+
getObject(arg0).signal = getObject(arg1);
|
|
1686
|
+
}
|
|
1687
|
+
export function __wbg_signMessage_a4d5bd6a6a624a40() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1688
|
+
let deferred0_0;
|
|
1689
|
+
let deferred0_1;
|
|
1690
|
+
let deferred1_0;
|
|
1691
|
+
let deferred1_1;
|
|
1692
|
+
try {
|
|
1693
|
+
deferred0_0 = arg0;
|
|
1694
|
+
deferred0_1 = arg1;
|
|
1695
|
+
deferred1_0 = arg2;
|
|
1696
|
+
deferred1_1 = arg3;
|
|
1697
|
+
const ret = window.keychain_wallets.signMessage(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
1698
|
+
return addHeapObject(ret);
|
|
1699
|
+
} finally {
|
|
1700
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1701
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1702
|
+
}
|
|
1703
|
+
}, arguments); }
|
|
1704
|
+
export function __wbg_signal_166e1da31adcac18(arg0) {
|
|
1705
|
+
const ret = getObject(arg0).signal;
|
|
1706
|
+
return addHeapObject(ret);
|
|
1707
|
+
}
|
|
1708
|
+
export function __wbg_static_accessor_GLOBAL_8adb955bd33fac2f() {
|
|
1709
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1710
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1711
|
+
}
|
|
1712
|
+
export function __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913() {
|
|
1713
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1714
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1715
|
+
}
|
|
1716
|
+
export function __wbg_static_accessor_SELF_f207c857566db248() {
|
|
1717
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
1718
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1719
|
+
}
|
|
1720
|
+
export function __wbg_static_accessor_WINDOW_bb9f1ba69d61b386() {
|
|
1721
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
1722
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1723
|
+
}
|
|
1724
|
+
export function __wbg_status_318629ab93a22955(arg0) {
|
|
1725
|
+
const ret = getObject(arg0).status;
|
|
1726
|
+
return ret;
|
|
1727
|
+
}
|
|
1728
|
+
export function __wbg_stringify_26436a2becff957e(arg0, arg1) {
|
|
1729
|
+
const ret = JSON.stringify(getObject(arg1));
|
|
1730
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1731
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1732
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1733
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1734
|
+
}
|
|
1735
|
+
export function __wbg_stringify_5ae93966a84901ac() { return handleError(function (arg0) {
|
|
1736
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
1901
1737
|
return addHeapObject(ret);
|
|
1902
|
-
}, arguments) }
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
const ret = getObject(arg0).next;
|
|
1738
|
+
}, arguments); }
|
|
1739
|
+
export function __wbg_subarray_a068d24e39478a8a(arg0, arg1, arg2) {
|
|
1740
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1906
1741
|
return addHeapObject(ret);
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
const ret = getObject(arg0).next();
|
|
1742
|
+
}
|
|
1743
|
+
export function __wbg_text_372f5b91442c50f9() { return handleError(function (arg0) {
|
|
1744
|
+
const ret = getObject(arg0).text();
|
|
1911
1745
|
return addHeapObject(ret);
|
|
1912
|
-
}, arguments) }
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
const ret = getObject(arg0).node;
|
|
1746
|
+
}, arguments); }
|
|
1747
|
+
export function __wbg_then_098abe61755d12f6(arg0, arg1) {
|
|
1748
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
1916
1749
|
return addHeapObject(ret);
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
const ret = Date.now();
|
|
1921
|
-
return ret;
|
|
1922
|
-
};
|
|
1923
|
-
|
|
1924
|
-
export function __wbg_obtain_a9626b3b96e6dc2c(arg0) {
|
|
1925
|
-
const ret = getObject(arg0).obtain();
|
|
1750
|
+
}
|
|
1751
|
+
export function __wbg_then_9e335f6dd892bc11(arg0, arg1, arg2) {
|
|
1752
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1926
1753
|
return addHeapObject(ret);
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6));
|
|
1931
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1932
|
-
}, arguments) };
|
|
1933
|
-
|
|
1934
|
-
export function __wbg_origin_4ab782e7fd21eede(arg0, arg1) {
|
|
1935
|
-
const ret = getObject(arg1).origin;
|
|
1754
|
+
}
|
|
1755
|
+
export function __wbg_url_7fefc1820fba4e0c(arg0, arg1) {
|
|
1756
|
+
const ret = getObject(arg1).url;
|
|
1936
1757
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1937
1758
|
const len1 = WASM_VECTOR_LEN;
|
|
1938
1759
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1939
1760
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
const ret = getObject(arg1).origin;
|
|
1761
|
+
}
|
|
1762
|
+
export function __wbg_userAgent_161a5f2d2a8dee61() { return handleError(function (arg0, arg1) {
|
|
1763
|
+
const ret = getObject(arg1).userAgent;
|
|
1944
1764
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1945
1765
|
const len1 = WASM_VECTOR_LEN;
|
|
1946
1766
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1947
1767
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1948
|
-
}, arguments) }
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
let deferred0_0;
|
|
1952
|
-
let deferred0_1;
|
|
1953
|
-
try {
|
|
1954
|
-
deferred0_0 = arg0;
|
|
1955
|
-
deferred0_1 = arg1;
|
|
1956
|
-
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1957
|
-
return addHeapObject(ret);
|
|
1958
|
-
} finally {
|
|
1959
|
-
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1960
|
-
}
|
|
1961
|
-
};
|
|
1962
|
-
|
|
1963
|
-
export function __wbg_process_dc0fbacc7c1c06f7(arg0) {
|
|
1964
|
-
const ret = getObject(arg0).process;
|
|
1768
|
+
}, arguments); }
|
|
1769
|
+
export function __wbg_value_21fc78aab0322612(arg0) {
|
|
1770
|
+
const ret = getObject(arg0).value;
|
|
1965
1771
|
return addHeapObject(ret);
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
const ret =
|
|
1974
|
-
return ret;
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
const ret =
|
|
1772
|
+
}
|
|
1773
|
+
export function __wbg_versions_276b2795b1c6a219(arg0) {
|
|
1774
|
+
const ret = getObject(arg0).versions;
|
|
1775
|
+
return addHeapObject(ret);
|
|
1776
|
+
}
|
|
1777
|
+
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1778
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1044, function: Function { arguments: [], shim_idx: 1045, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1779
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8966, __wasm_bindgen_func_elem_8975);
|
|
1780
|
+
return addHeapObject(ret);
|
|
1781
|
+
}
|
|
1782
|
+
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1783
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1078, function: Function { arguments: [Externref], shim_idx: 1209, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1784
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_9110, __wasm_bindgen_func_elem_11243);
|
|
1785
|
+
return addHeapObject(ret);
|
|
1786
|
+
}
|
|
1787
|
+
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1788
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [NamedExternref("Function")], shim_idx: 17, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1789
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_768, __wasm_bindgen_func_elem_3395);
|
|
1790
|
+
return addHeapObject(ret);
|
|
1791
|
+
}
|
|
1792
|
+
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
1793
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 16, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
1794
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_768, __wasm_bindgen_func_elem_3394);
|
|
1795
|
+
return addHeapObject(ret);
|
|
1796
|
+
}
|
|
1797
|
+
export function __wbindgen_cast_0000000000000005(arg0) {
|
|
1798
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1799
|
+
const ret = arg0;
|
|
1800
|
+
return addHeapObject(ret);
|
|
1801
|
+
}
|
|
1802
|
+
export function __wbindgen_cast_0000000000000006(arg0) {
|
|
1803
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
1804
|
+
const ret = arg0;
|
|
1805
|
+
return addHeapObject(ret);
|
|
1806
|
+
}
|
|
1807
|
+
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
1808
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1809
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1979
1810
|
return addHeapObject(ret);
|
|
1980
|
-
}
|
|
1811
|
+
}
|
|
1812
|
+
export function __wbindgen_cast_0000000000000008(arg0, arg1) {
|
|
1813
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1814
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1815
|
+
return addHeapObject(ret);
|
|
1816
|
+
}
|
|
1817
|
+
export function __wbindgen_object_clone_ref(arg0) {
|
|
1818
|
+
const ret = getObject(arg0);
|
|
1819
|
+
return addHeapObject(ret);
|
|
1820
|
+
}
|
|
1821
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
|
1822
|
+
takeObject(arg0);
|
|
1823
|
+
}
|
|
1824
|
+
function __wasm_bindgen_func_elem_8975(arg0, arg1) {
|
|
1825
|
+
wasm.__wasm_bindgen_func_elem_8975(arg0, arg1);
|
|
1826
|
+
}
|
|
1981
1827
|
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
}
|
|
1828
|
+
function __wasm_bindgen_func_elem_3394(arg0, arg1, arg2) {
|
|
1829
|
+
wasm.__wasm_bindgen_func_elem_3394(arg0, arg1, addHeapObject(arg2));
|
|
1830
|
+
}
|
|
1985
1831
|
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1832
|
+
function __wasm_bindgen_func_elem_11243(arg0, arg1, arg2) {
|
|
1833
|
+
try {
|
|
1834
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1835
|
+
wasm.__wasm_bindgen_func_elem_11243(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1836
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1837
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1838
|
+
if (r1) {
|
|
1839
|
+
throw takeObject(r0);
|
|
1840
|
+
}
|
|
1841
|
+
} finally {
|
|
1842
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1989
1845
|
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1846
|
+
function __wasm_bindgen_func_elem_3395(arg0, arg1, arg2) {
|
|
1847
|
+
try {
|
|
1848
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1849
|
+
wasm.__wasm_bindgen_func_elem_3395(retptr, arg0, arg1, addHeapObject(arg2));
|
|
1850
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1851
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1852
|
+
if (r1) {
|
|
1853
|
+
throw takeObject(r0);
|
|
1854
|
+
}
|
|
1855
|
+
} finally {
|
|
1856
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1993
1859
|
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
}
|
|
1860
|
+
function __wasm_bindgen_func_elem_11254(arg0, arg1, arg2, arg3) {
|
|
1861
|
+
wasm.__wasm_bindgen_func_elem_11254(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1862
|
+
}
|
|
1997
1863
|
|
|
1998
|
-
export function __wbg_require_60cc747a6bc5215a() { return handleError(function () {
|
|
1999
|
-
const ret = module.require;
|
|
2000
|
-
return addHeapObject(ret);
|
|
2001
|
-
}, arguments) };
|
|
2002
1864
|
|
|
2003
|
-
|
|
2004
|
-
const ret = Promise.resolve(getObject(arg0));
|
|
2005
|
-
return addHeapObject(ret);
|
|
2006
|
-
};
|
|
1865
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
2007
1866
|
|
|
2008
|
-
export function __wbg_setItem_1167ad38996d6426() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2009
|
-
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
2010
|
-
}, arguments) };
|
|
2011
1867
|
|
|
2012
|
-
|
|
2013
|
-
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2014
|
-
return ret;
|
|
2015
|
-
}, arguments) };
|
|
1868
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
2016
1869
|
|
|
2017
|
-
export function __wbg_setTimeout_425032fd8860bd1e() { return handleError(function (arg0, arg1, arg2) {
|
|
2018
|
-
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2019
|
-
return ret;
|
|
2020
|
-
}, arguments) };
|
|
2021
1870
|
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
1871
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1872
|
+
const CartridgeAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1873
|
+
? { register: () => {}, unregister: () => {} }
|
|
1874
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccount_free(ptr >>> 0, 1));
|
|
1875
|
+
const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1876
|
+
? { register: () => {}, unregister: () => {} }
|
|
1877
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountmeta_free(ptr >>> 0, 1));
|
|
1878
|
+
const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1879
|
+
? { register: () => {}, unregister: () => {} }
|
|
1880
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountwithmeta_free(ptr >>> 0, 1));
|
|
1881
|
+
const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1882
|
+
? { register: () => {}, unregister: () => {} }
|
|
1883
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
|
|
1884
|
+
const JsChainConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1885
|
+
? { register: () => {}, unregister: () => {} }
|
|
1886
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jschainconfig_free(ptr >>> 0, 1));
|
|
1887
|
+
const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1888
|
+
? { register: () => {}, unregister: () => {} }
|
|
1889
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
|
|
1890
|
+
const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1891
|
+
? { register: () => {}, unregister: () => {} }
|
|
1892
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
|
|
1893
|
+
const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1894
|
+
? { register: () => {}, unregister: () => {} }
|
|
1895
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
|
|
1896
|
+
const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1897
|
+
? { register: () => {}, unregister: () => {} }
|
|
1898
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
|
|
2026
1899
|
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
1900
|
+
function addHeapObject(obj) {
|
|
1901
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
1902
|
+
const idx = heap_next;
|
|
1903
|
+
heap_next = heap[idx];
|
|
2030
1904
|
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
}
|
|
1905
|
+
heap[idx] = obj;
|
|
1906
|
+
return idx;
|
|
1907
|
+
}
|
|
2034
1908
|
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
}
|
|
1909
|
+
function _assertClass(instance, klass) {
|
|
1910
|
+
if (!(instance instanceof klass)) {
|
|
1911
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
2039
1914
|
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
1915
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1916
|
+
? { register: () => {}, unregister: () => {} }
|
|
1917
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
2043
1918
|
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
1919
|
+
function debugString(val) {
|
|
1920
|
+
// primitive types
|
|
1921
|
+
const type = typeof val;
|
|
1922
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1923
|
+
return `${val}`;
|
|
1924
|
+
}
|
|
1925
|
+
if (type == 'string') {
|
|
1926
|
+
return `"${val}"`;
|
|
1927
|
+
}
|
|
1928
|
+
if (type == 'symbol') {
|
|
1929
|
+
const description = val.description;
|
|
1930
|
+
if (description == null) {
|
|
1931
|
+
return 'Symbol';
|
|
1932
|
+
} else {
|
|
1933
|
+
return `Symbol(${description})`;
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
if (type == 'function') {
|
|
1937
|
+
const name = val.name;
|
|
1938
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1939
|
+
return `Function(${name})`;
|
|
1940
|
+
} else {
|
|
1941
|
+
return 'Function';
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
// objects
|
|
1945
|
+
if (Array.isArray(val)) {
|
|
1946
|
+
const length = val.length;
|
|
1947
|
+
let debug = '[';
|
|
1948
|
+
if (length > 0) {
|
|
1949
|
+
debug += debugString(val[0]);
|
|
1950
|
+
}
|
|
1951
|
+
for(let i = 1; i < length; i++) {
|
|
1952
|
+
debug += ', ' + debugString(val[i]);
|
|
1953
|
+
}
|
|
1954
|
+
debug += ']';
|
|
1955
|
+
return debug;
|
|
1956
|
+
}
|
|
1957
|
+
// Test for built-in
|
|
1958
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1959
|
+
let className;
|
|
1960
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1961
|
+
className = builtInMatches[1];
|
|
1962
|
+
} else {
|
|
1963
|
+
// Failed to match the standard '[object ClassName]'
|
|
1964
|
+
return toString.call(val);
|
|
1965
|
+
}
|
|
1966
|
+
if (className == 'Object') {
|
|
1967
|
+
// we're a user defined class or Object
|
|
1968
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1969
|
+
// easier than looping through ownProperties of `val`.
|
|
1970
|
+
try {
|
|
1971
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1972
|
+
} catch (_) {
|
|
1973
|
+
return 'Object';
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
// errors
|
|
1977
|
+
if (val instanceof Error) {
|
|
1978
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1979
|
+
}
|
|
1980
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1981
|
+
return className;
|
|
1982
|
+
}
|
|
2047
1983
|
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
1984
|
+
function dropObject(idx) {
|
|
1985
|
+
if (idx < 1028) return;
|
|
1986
|
+
heap[idx] = heap_next;
|
|
1987
|
+
heap_next = idx;
|
|
1988
|
+
}
|
|
2051
1989
|
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
1990
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1991
|
+
ptr = ptr >>> 0;
|
|
1992
|
+
const mem = getDataViewMemory0();
|
|
1993
|
+
const result = [];
|
|
1994
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1995
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
1996
|
+
}
|
|
1997
|
+
return result;
|
|
1998
|
+
}
|
|
2055
1999
|
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
return
|
|
2059
|
-
}
|
|
2000
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
2001
|
+
ptr = ptr >>> 0;
|
|
2002
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
2003
|
+
}
|
|
2060
2004
|
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2005
|
+
let cachedDataViewMemory0 = null;
|
|
2006
|
+
function getDataViewMemory0() {
|
|
2007
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
2008
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
2009
|
+
}
|
|
2010
|
+
return cachedDataViewMemory0;
|
|
2011
|
+
}
|
|
2064
2012
|
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2013
|
+
function getStringFromWasm0(ptr, len) {
|
|
2014
|
+
ptr = ptr >>> 0;
|
|
2015
|
+
return decodeText(ptr, len);
|
|
2016
|
+
}
|
|
2068
2017
|
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2018
|
+
let cachedUint8ArrayMemory0 = null;
|
|
2019
|
+
function getUint8ArrayMemory0() {
|
|
2020
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
2021
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
2022
|
+
}
|
|
2023
|
+
return cachedUint8ArrayMemory0;
|
|
2024
|
+
}
|
|
2072
2025
|
|
|
2073
|
-
|
|
2074
|
-
getObject(arg0).signal = getObject(arg1);
|
|
2075
|
-
};
|
|
2026
|
+
function getObject(idx) { return heap[idx]; }
|
|
2076
2027
|
|
|
2077
|
-
|
|
2078
|
-
let deferred0_0;
|
|
2079
|
-
let deferred0_1;
|
|
2080
|
-
let deferred1_0;
|
|
2081
|
-
let deferred1_1;
|
|
2028
|
+
function handleError(f, args) {
|
|
2082
2029
|
try {
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
deferred1_1 = arg3;
|
|
2087
|
-
const ret = window.keychain_wallets.signMessage(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
2088
|
-
return addHeapObject(ret);
|
|
2089
|
-
} finally {
|
|
2090
|
-
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
2091
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2030
|
+
return f.apply(this, args);
|
|
2031
|
+
} catch (e) {
|
|
2032
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
2092
2033
|
}
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
export function __wbg_signal_3c14fbdc89694b39(arg0) {
|
|
2096
|
-
const ret = getObject(arg0).signal;
|
|
2097
|
-
return addHeapObject(ret);
|
|
2098
|
-
};
|
|
2099
|
-
|
|
2100
|
-
export function __wbg_static_accessor_GLOBAL_769e6b65d6557335() {
|
|
2101
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
2102
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2103
|
-
};
|
|
2104
|
-
|
|
2105
|
-
export function __wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1() {
|
|
2106
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
2107
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2108
|
-
};
|
|
2034
|
+
}
|
|
2109
2035
|
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2113
|
-
};
|
|
2036
|
+
let heap = new Array(1024).fill(undefined);
|
|
2037
|
+
heap.push(undefined, null, true, false);
|
|
2114
2038
|
|
|
2115
|
-
|
|
2116
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
2117
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2118
|
-
};
|
|
2039
|
+
let heap_next = heap.length;
|
|
2119
2040
|
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
};
|
|
2041
|
+
function isLikeNone(x) {
|
|
2042
|
+
return x === undefined || x === null;
|
|
2043
|
+
}
|
|
2124
2044
|
|
|
2125
|
-
|
|
2126
|
-
const
|
|
2127
|
-
|
|
2128
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2129
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2130
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2131
|
-
};
|
|
2045
|
+
function makeClosure(arg0, arg1, dtor, f) {
|
|
2046
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
2047
|
+
const real = (...args) => {
|
|
2132
2048
|
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2049
|
+
// First up with a closure we increment the internal reference
|
|
2050
|
+
// count. This ensures that the Rust closure environment won't
|
|
2051
|
+
// be deallocated while we're invoking it.
|
|
2052
|
+
state.cnt++;
|
|
2053
|
+
try {
|
|
2054
|
+
return f(state.a, state.b, ...args);
|
|
2055
|
+
} finally {
|
|
2056
|
+
real._wbg_cb_unref();
|
|
2057
|
+
}
|
|
2058
|
+
};
|
|
2059
|
+
real._wbg_cb_unref = () => {
|
|
2060
|
+
if (--state.cnt === 0) {
|
|
2061
|
+
state.dtor(state.a, state.b);
|
|
2062
|
+
state.a = 0;
|
|
2063
|
+
CLOSURE_DTORS.unregister(state);
|
|
2064
|
+
}
|
|
2065
|
+
};
|
|
2066
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2067
|
+
return real;
|
|
2068
|
+
}
|
|
2137
2069
|
|
|
2138
|
-
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2141
|
-
};
|
|
2070
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
2071
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
2072
|
+
const real = (...args) => {
|
|
2142
2073
|
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2074
|
+
// First up with a closure we increment the internal reference
|
|
2075
|
+
// count. This ensures that the Rust closure environment won't
|
|
2076
|
+
// be deallocated while we're invoking it.
|
|
2077
|
+
state.cnt++;
|
|
2078
|
+
const a = state.a;
|
|
2079
|
+
state.a = 0;
|
|
2080
|
+
try {
|
|
2081
|
+
return f(a, state.b, ...args);
|
|
2082
|
+
} finally {
|
|
2083
|
+
state.a = a;
|
|
2084
|
+
real._wbg_cb_unref();
|
|
2085
|
+
}
|
|
2086
|
+
};
|
|
2087
|
+
real._wbg_cb_unref = () => {
|
|
2088
|
+
if (--state.cnt === 0) {
|
|
2089
|
+
state.dtor(state.a, state.b);
|
|
2090
|
+
state.a = 0;
|
|
2091
|
+
CLOSURE_DTORS.unregister(state);
|
|
2092
|
+
}
|
|
2093
|
+
};
|
|
2094
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2095
|
+
return real;
|
|
2096
|
+
}
|
|
2147
2097
|
|
|
2148
|
-
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2151
|
-
|
|
2098
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
2099
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
2100
|
+
const mem = getDataViewMemory0();
|
|
2101
|
+
for (let i = 0; i < array.length; i++) {
|
|
2102
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
2103
|
+
}
|
|
2104
|
+
WASM_VECTOR_LEN = array.length;
|
|
2105
|
+
return ptr;
|
|
2106
|
+
}
|
|
2152
2107
|
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2108
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2109
|
+
if (realloc === undefined) {
|
|
2110
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2111
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
2112
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
2113
|
+
WASM_VECTOR_LEN = buf.length;
|
|
2114
|
+
return ptr;
|
|
2115
|
+
}
|
|
2157
2116
|
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2161
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2162
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2163
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2164
|
-
};
|
|
2117
|
+
let len = arg.length;
|
|
2118
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2165
2119
|
|
|
2166
|
-
|
|
2167
|
-
const ret = getObject(arg1).userAgent;
|
|
2168
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2169
|
-
const len1 = WASM_VECTOR_LEN;
|
|
2170
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2171
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2172
|
-
}, arguments) };
|
|
2120
|
+
const mem = getUint8ArrayMemory0();
|
|
2173
2121
|
|
|
2174
|
-
|
|
2175
|
-
const ret = getObject(arg0).value;
|
|
2176
|
-
return addHeapObject(ret);
|
|
2177
|
-
};
|
|
2122
|
+
let offset = 0;
|
|
2178
2123
|
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2124
|
+
for (; offset < len; offset++) {
|
|
2125
|
+
const code = arg.charCodeAt(offset);
|
|
2126
|
+
if (code > 0x7F) break;
|
|
2127
|
+
mem[ptr + offset] = code;
|
|
2128
|
+
}
|
|
2129
|
+
if (offset !== len) {
|
|
2130
|
+
if (offset !== 0) {
|
|
2131
|
+
arg = arg.slice(offset);
|
|
2132
|
+
}
|
|
2133
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2134
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2135
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
2183
2136
|
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
return addHeapObject(ret);
|
|
2188
|
-
};
|
|
2137
|
+
offset += ret.written;
|
|
2138
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
2139
|
+
}
|
|
2189
2140
|
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
return addHeapObject(ret);
|
|
2194
|
-
};
|
|
2141
|
+
WASM_VECTOR_LEN = offset;
|
|
2142
|
+
return ptr;
|
|
2143
|
+
}
|
|
2195
2144
|
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
return
|
|
2200
|
-
}
|
|
2145
|
+
function takeObject(idx) {
|
|
2146
|
+
const ret = getObject(idx);
|
|
2147
|
+
dropObject(idx);
|
|
2148
|
+
return ret;
|
|
2149
|
+
}
|
|
2201
2150
|
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2151
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2152
|
+
cachedTextDecoder.decode();
|
|
2153
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2154
|
+
let numBytesDecoded = 0;
|
|
2155
|
+
function decodeText(ptr, len) {
|
|
2156
|
+
numBytesDecoded += len;
|
|
2157
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2158
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2159
|
+
cachedTextDecoder.decode();
|
|
2160
|
+
numBytesDecoded = len;
|
|
2161
|
+
}
|
|
2162
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2163
|
+
}
|
|
2207
2164
|
|
|
2208
|
-
|
|
2209
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
2210
|
-
const ret = arg0;
|
|
2211
|
-
return addHeapObject(ret);
|
|
2212
|
-
};
|
|
2165
|
+
const cachedTextEncoder = new TextEncoder();
|
|
2213
2166
|
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2167
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
2168
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
2169
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2170
|
+
view.set(buf);
|
|
2171
|
+
return {
|
|
2172
|
+
read: arg.length,
|
|
2173
|
+
written: buf.length
|
|
2174
|
+
};
|
|
2175
|
+
};
|
|
2176
|
+
}
|
|
2219
2177
|
|
|
2220
|
-
|
|
2221
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
2222
|
-
const ret = arg0;
|
|
2223
|
-
return addHeapObject(ret);
|
|
2224
|
-
};
|
|
2178
|
+
let WASM_VECTOR_LEN = 0;
|
|
2225
2179
|
|
|
2226
|
-
export function __wbindgen_object_clone_ref(arg0) {
|
|
2227
|
-
const ret = getObject(arg0);
|
|
2228
|
-
return addHeapObject(ret);
|
|
2229
|
-
};
|
|
2230
2180
|
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2181
|
+
let wasm;
|
|
2182
|
+
export function __wbg_set_wasm(val) {
|
|
2183
|
+
wasm = val;
|
|
2184
|
+
}
|