@cartridge/controller-wasm 0.9.1 → 0.9.3
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 +342 -313
- package/pkg-controller/account_wasm.js +7 -2
- package/pkg-controller/account_wasm_bg.js +1000 -1132
- package/pkg-controller/account_wasm_bg.wasm +0 -0
- package/pkg-session/session_wasm.d.ts +154 -154
- package/pkg-session/session_wasm.js +7 -2
- package/pkg-session/session_wasm_bg.js +582 -689
- 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_8624(arg0, arg1) {
|
|
289
|
-
wasm.__wasm_bindgen_func_elem_8624(arg0, arg1);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function __wasm_bindgen_func_elem_8774(arg0, arg1, arg2) {
|
|
293
|
-
wasm.__wasm_bindgen_func_elem_8774(arg0, arg1, addHeapObject(arg2));
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
function __wasm_bindgen_func_elem_3270(arg0, arg1, arg2) {
|
|
297
|
-
wasm.__wasm_bindgen_func_elem_3270(arg0, arg1, addHeapObject(arg2));
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
function __wasm_bindgen_func_elem_10868(arg0, arg1, arg2, arg3) {
|
|
301
|
-
wasm.__wasm_bindgen_func_elem_10868(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
302
|
-
}
|
|
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,172 +19,166 @@ 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
|
-
|
|
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);
|
|
369
31
|
return takeObject(ret);
|
|
370
32
|
}
|
|
371
33
|
/**
|
|
372
|
-
* @param {
|
|
373
|
-
* @returns {Promise<
|
|
34
|
+
* @param {string} rp_id
|
|
35
|
+
* @returns {Promise<JsAddSignerInput>}
|
|
374
36
|
*/
|
|
375
|
-
|
|
376
|
-
const
|
|
37
|
+
createPasskeySigner(rp_id) {
|
|
38
|
+
const ptr0 = passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
39
|
+
const len0 = WASM_VECTOR_LEN;
|
|
40
|
+
const ret = wasm.cartridgeaccount_createPasskeySigner(this.__wbg_ptr, ptr0, len0);
|
|
377
41
|
return takeObject(ret);
|
|
378
42
|
}
|
|
379
43
|
/**
|
|
380
|
-
* @param {string}
|
|
381
|
-
* @
|
|
44
|
+
* @param {string} app_id
|
|
45
|
+
* @param {Policy[]} policies
|
|
46
|
+
* @param {bigint} expires_at
|
|
47
|
+
* @param {boolean | null} [authorize_user_execution]
|
|
48
|
+
* @returns {Promise<AuthorizedSession | undefined>}
|
|
382
49
|
*/
|
|
383
|
-
|
|
384
|
-
const ptr0 = passStringToWasm0(
|
|
50
|
+
createSession(app_id, policies, expires_at, authorize_user_execution) {
|
|
51
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
385
52
|
const len0 = WASM_VECTOR_LEN;
|
|
386
|
-
const
|
|
53
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
54
|
+
const len1 = WASM_VECTOR_LEN;
|
|
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);
|
|
387
56
|
return takeObject(ret);
|
|
388
57
|
}
|
|
389
58
|
/**
|
|
390
|
-
*
|
|
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>}
|
|
59
|
+
* @returns {Promise<JsFelt>}
|
|
401
60
|
*/
|
|
402
|
-
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
61
|
+
delegateAccount() {
|
|
62
|
+
const ret = wasm.cartridgeaccount_delegateAccount(this.__wbg_ptr);
|
|
63
|
+
return takeObject(ret);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
67
|
+
* @returns {Promise<any>}
|
|
68
|
+
*/
|
|
69
|
+
deploySelf(max_fee) {
|
|
70
|
+
const ret = wasm.cartridgeaccount_deploySelf(this.__wbg_ptr, isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
410
71
|
return takeObject(ret);
|
|
411
72
|
}
|
|
412
73
|
/**
|
|
413
|
-
* @param {JsRemoveSignerInput} signer
|
|
414
74
|
* @returns {Promise<void>}
|
|
415
75
|
*/
|
|
416
|
-
|
|
417
|
-
const ret = wasm.
|
|
76
|
+
disconnect() {
|
|
77
|
+
const ret = wasm.cartridgeaccount_disconnect(this.__wbg_ptr);
|
|
418
78
|
return takeObject(ret);
|
|
419
79
|
}
|
|
420
80
|
/**
|
|
421
|
-
* @param {
|
|
422
|
-
* @returns {Promise<
|
|
81
|
+
* @param {JsCall[]} calls
|
|
82
|
+
* @returns {Promise<JsFeeEstimate>}
|
|
423
83
|
*/
|
|
424
|
-
|
|
425
|
-
const ptr0 =
|
|
84
|
+
estimateInvokeFee(calls) {
|
|
85
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
426
86
|
const len0 = WASM_VECTOR_LEN;
|
|
427
|
-
const ret = wasm.
|
|
87
|
+
const ret = wasm.cartridgeaccount_estimateInvokeFee(this.__wbg_ptr, ptr0, len0);
|
|
428
88
|
return takeObject(ret);
|
|
429
89
|
}
|
|
430
90
|
/**
|
|
431
|
-
* @param {
|
|
432
|
-
* @param {
|
|
433
|
-
* @
|
|
91
|
+
* @param {JsCall[]} calls
|
|
92
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
93
|
+
* @param {JsFeeSource | null} [fee_source]
|
|
94
|
+
* @returns {Promise<any>}
|
|
434
95
|
*/
|
|
435
|
-
|
|
436
|
-
const ptr0 =
|
|
96
|
+
execute(calls, max_fee, fee_source) {
|
|
97
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
437
98
|
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);
|
|
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));
|
|
441
100
|
return takeObject(ret);
|
|
442
101
|
}
|
|
443
102
|
/**
|
|
444
|
-
* @param {
|
|
445
|
-
* @param {
|
|
446
|
-
* @
|
|
447
|
-
* @param {boolean | null} [authorize_user_execution]
|
|
448
|
-
* @returns {Promise<AuthorizedSession | undefined>}
|
|
103
|
+
* @param {JsCall[]} calls
|
|
104
|
+
* @param {JsFeeSource | null} [fee_source]
|
|
105
|
+
* @returns {Promise<any>}
|
|
449
106
|
*/
|
|
450
|
-
|
|
451
|
-
const ptr0 =
|
|
107
|
+
executeFromOutsideV2(calls, fee_source) {
|
|
108
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
452
109
|
const len0 = WASM_VECTOR_LEN;
|
|
453
|
-
const
|
|
454
|
-
const len1 = WASM_VECTOR_LEN;
|
|
455
|
-
const ret = wasm.cartridgeaccount_createSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, isLikeNone(authorize_user_execution) ? 0xFFFFFF : authorize_user_execution ? 1 : 0);
|
|
110
|
+
const ret = wasm.cartridgeaccount_executeFromOutsideV2(this.__wbg_ptr, ptr0, len0, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
456
111
|
return takeObject(ret);
|
|
457
112
|
}
|
|
458
113
|
/**
|
|
459
|
-
* @param {
|
|
460
|
-
* @
|
|
114
|
+
* @param {JsCall[]} calls
|
|
115
|
+
* @param {JsFeeSource | null} [fee_source]
|
|
116
|
+
* @returns {Promise<any>}
|
|
461
117
|
*/
|
|
462
|
-
|
|
463
|
-
const
|
|
118
|
+
executeFromOutsideV3(calls, fee_source) {
|
|
119
|
+
const ptr0 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
120
|
+
const len0 = WASM_VECTOR_LEN;
|
|
121
|
+
const ret = wasm.cartridgeaccount_executeFromOutsideV3(this.__wbg_ptr, ptr0, len0, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
464
122
|
return takeObject(ret);
|
|
465
123
|
}
|
|
466
124
|
/**
|
|
467
|
-
* @param {
|
|
468
|
-
* @returns {Promise<
|
|
125
|
+
* @param {string} cartridge_api_url
|
|
126
|
+
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
469
127
|
*/
|
|
470
|
-
|
|
471
|
-
const ptr0 =
|
|
128
|
+
static fromStorage(cartridge_api_url) {
|
|
129
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
472
130
|
const len0 = WASM_VECTOR_LEN;
|
|
473
|
-
const ret = wasm.
|
|
131
|
+
const ret = wasm.cartridgeaccount_fromStorage(ptr0, len0);
|
|
474
132
|
return takeObject(ret);
|
|
475
133
|
}
|
|
476
134
|
/**
|
|
477
|
-
* @returns {Promise<
|
|
135
|
+
* @returns {Promise<any>}
|
|
478
136
|
*/
|
|
479
|
-
|
|
480
|
-
const ret = wasm.
|
|
137
|
+
getNonce() {
|
|
138
|
+
const ret = wasm.cartridgeaccount_getNonce(this.__wbg_ptr);
|
|
481
139
|
return takeObject(ret);
|
|
482
140
|
}
|
|
483
141
|
/**
|
|
484
142
|
* @param {string} app_id
|
|
485
|
-
* @param {
|
|
486
|
-
* @
|
|
487
|
-
* @param {JsFelt} public_key
|
|
488
|
-
* @param {JsFeeEstimate | null} [max_fee]
|
|
489
|
-
* @returns {Promise<any>}
|
|
143
|
+
* @param {JsCall[]} calls
|
|
144
|
+
* @returns {Promise<boolean>}
|
|
490
145
|
*/
|
|
491
|
-
|
|
146
|
+
hasAuthorizedPoliciesForCalls(app_id, calls) {
|
|
492
147
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
493
148
|
const len0 = WASM_VECTOR_LEN;
|
|
494
|
-
const ptr1 = passArrayJsValueToWasm0(
|
|
149
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
495
150
|
const len1 = WASM_VECTOR_LEN;
|
|
496
|
-
const ret = wasm.
|
|
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);
|
|
151
|
+
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForCalls(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
507
152
|
return takeObject(ret);
|
|
508
153
|
}
|
|
509
154
|
/**
|
|
510
155
|
* @param {string} app_id
|
|
511
|
-
* @param {
|
|
512
|
-
* @
|
|
513
|
-
* @returns {Promise<any>}
|
|
156
|
+
* @param {string} typed_data
|
|
157
|
+
* @returns {Promise<boolean>}
|
|
514
158
|
*/
|
|
515
|
-
|
|
159
|
+
hasAuthorizedPoliciesForMessage(app_id, typed_data) {
|
|
516
160
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
517
161
|
const len0 = WASM_VECTOR_LEN;
|
|
518
|
-
const ptr1 =
|
|
162
|
+
const ptr1 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
519
163
|
const len1 = WASM_VECTOR_LEN;
|
|
520
|
-
const ret = wasm.
|
|
164
|
+
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
521
165
|
return takeObject(ret);
|
|
522
166
|
}
|
|
523
167
|
/**
|
|
524
|
-
*
|
|
525
|
-
*
|
|
168
|
+
* Checks if there are stored policies for a given app_id.
|
|
169
|
+
*
|
|
170
|
+
* # Parameters
|
|
171
|
+
* - `app_id`: The application identifier to check for stored policies
|
|
172
|
+
*
|
|
173
|
+
* # Returns
|
|
174
|
+
* `true` if policies exist for the given app_id, `false` otherwise
|
|
175
|
+
* @param {string} app_id
|
|
176
|
+
* @returns {Promise<boolean>}
|
|
526
177
|
*/
|
|
527
|
-
|
|
528
|
-
const ptr0 = passStringToWasm0(
|
|
178
|
+
hasPoliciesForAppId(app_id) {
|
|
179
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
529
180
|
const len0 = WASM_VECTOR_LEN;
|
|
530
|
-
const ret = wasm.
|
|
181
|
+
const ret = wasm.cartridgeaccount_hasPoliciesForAppId(this.__wbg_ptr, ptr0, len0);
|
|
531
182
|
return takeObject(ret);
|
|
532
183
|
}
|
|
533
184
|
/**
|
|
@@ -544,42 +195,87 @@ export class CartridgeAccount {
|
|
|
544
195
|
return takeObject(ret);
|
|
545
196
|
}
|
|
546
197
|
/**
|
|
547
|
-
* @param {
|
|
548
|
-
* @param {
|
|
549
|
-
* @returns {Promise<
|
|
198
|
+
* @param {Policy[]} policies
|
|
199
|
+
* @param {JsFelt | null} [public_key]
|
|
200
|
+
* @returns {Promise<AuthorizedSession | undefined>}
|
|
550
201
|
*/
|
|
551
|
-
|
|
552
|
-
const ptr0 = passArrayJsValueToWasm0(
|
|
202
|
+
isRegisteredSessionAuthorized(policies, public_key) {
|
|
203
|
+
const ptr0 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
553
204
|
const len0 = WASM_VECTOR_LEN;
|
|
554
|
-
const ret = wasm.
|
|
205
|
+
const ret = wasm.cartridgeaccount_isRegisteredSessionAuthorized(this.__wbg_ptr, ptr0, len0, isLikeNone(public_key) ? 0 : addHeapObject(public_key));
|
|
555
206
|
return takeObject(ret);
|
|
556
207
|
}
|
|
557
208
|
/**
|
|
558
|
-
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
209
|
+
* Creates a new `CartridgeAccount` instance.
|
|
210
|
+
*
|
|
211
|
+
* # Parameters
|
|
212
|
+
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
213
|
+
* - `address`: The blockchain address associated with the account.
|
|
214
|
+
* - `username`: Username associated with the account.
|
|
215
|
+
* - `owner`: A Owner struct containing the owner signer and associated data.
|
|
216
|
+
* @param {JsFelt} class_hash
|
|
217
|
+
* @param {string} rpc_url
|
|
218
|
+
* @param {JsFelt} address
|
|
219
|
+
* @param {string} username
|
|
220
|
+
* @param {Owner} owner
|
|
221
|
+
* @param {string} cartridge_api_url
|
|
222
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
561
223
|
*/
|
|
562
|
-
|
|
563
|
-
const ptr0 =
|
|
224
|
+
static new(class_hash, rpc_url, address, username, owner, cartridge_api_url) {
|
|
225
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
564
226
|
const len0 = WASM_VECTOR_LEN;
|
|
565
|
-
const
|
|
227
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
228
|
+
const len1 = WASM_VECTOR_LEN;
|
|
229
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
230
|
+
const len2 = WASM_VECTOR_LEN;
|
|
231
|
+
const ret = wasm.cartridgeaccount_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(address), ptr1, len1, addHeapObject(owner), ptr2, len2);
|
|
566
232
|
return takeObject(ret);
|
|
567
233
|
}
|
|
568
234
|
/**
|
|
569
|
-
*
|
|
235
|
+
* Creates a new `CartridgeAccount` instance with a randomly generated Starknet signer.
|
|
236
|
+
* The controller address is computed internally based on the generated signer.
|
|
570
237
|
*
|
|
571
238
|
* # Parameters
|
|
572
|
-
* - `
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
239
|
+
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
240
|
+
* - `username`: Username associated with the account.
|
|
241
|
+
* @param {JsFelt} class_hash
|
|
242
|
+
* @param {string} rpc_url
|
|
243
|
+
* @param {string} username
|
|
244
|
+
* @param {string} cartridge_api_url
|
|
245
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
246
|
+
*/
|
|
247
|
+
static newHeadless(class_hash, rpc_url, username, cartridge_api_url) {
|
|
248
|
+
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
249
|
+
const len0 = WASM_VECTOR_LEN;
|
|
250
|
+
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
251
|
+
const len1 = WASM_VECTOR_LEN;
|
|
252
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
253
|
+
const len2 = WASM_VECTOR_LEN;
|
|
254
|
+
const ret = wasm.cartridgeaccount_newHeadless(addHeapObject(class_hash), ptr0, len0, ptr1, len1, ptr2, len2);
|
|
255
|
+
return takeObject(ret);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @param {JsRegister} register
|
|
259
|
+
* @returns {Promise<JsRegisterResponse>}
|
|
260
|
+
*/
|
|
261
|
+
register(register) {
|
|
262
|
+
const ret = wasm.cartridgeaccount_register(this.__wbg_ptr, addHeapObject(register));
|
|
263
|
+
return takeObject(ret);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
576
266
|
* @param {string} app_id
|
|
577
|
-
* @
|
|
267
|
+
* @param {Policy[]} policies
|
|
268
|
+
* @param {bigint} expires_at
|
|
269
|
+
* @param {JsFelt} public_key
|
|
270
|
+
* @param {JsFeeEstimate | null} [max_fee]
|
|
271
|
+
* @returns {Promise<any>}
|
|
578
272
|
*/
|
|
579
|
-
|
|
273
|
+
registerSession(app_id, policies, expires_at, public_key, max_fee) {
|
|
580
274
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
581
275
|
const len0 = WASM_VECTOR_LEN;
|
|
582
|
-
const
|
|
276
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
277
|
+
const len1 = WASM_VECTOR_LEN;
|
|
278
|
+
const ret = wasm.cartridgeaccount_registerSession(this.__wbg_ptr, ptr0, len0, ptr1, len1, expires_at, addHeapObject(public_key), isLikeNone(max_fee) ? 0 : addHeapObject(max_fee));
|
|
583
279
|
return takeObject(ret);
|
|
584
280
|
}
|
|
585
281
|
/**
|
|
@@ -594,6 +290,32 @@ export class CartridgeAccount {
|
|
|
594
290
|
const ret = wasm.cartridgeaccount_registerSessionCalldata(this.__wbg_ptr, ptr0, len0, expires_at, addHeapObject(public_key));
|
|
595
291
|
return takeObject(ret);
|
|
596
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* @param {JsRemoveSignerInput} signer
|
|
295
|
+
* @returns {Promise<void>}
|
|
296
|
+
*/
|
|
297
|
+
removeOwner(signer) {
|
|
298
|
+
const ret = wasm.cartridgeaccount_removeOwner(this.__wbg_ptr, addHeapObject(signer));
|
|
299
|
+
return takeObject(ret);
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* @param {JsRevokableSession} session
|
|
303
|
+
* @returns {Promise<void>}
|
|
304
|
+
*/
|
|
305
|
+
revokeSession(session) {
|
|
306
|
+
const ret = wasm.cartridgeaccount_revokeSession(this.__wbg_ptr, addHeapObject(session));
|
|
307
|
+
return takeObject(ret);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @param {JsRevokableSession[]} sessions
|
|
311
|
+
* @returns {Promise<void>}
|
|
312
|
+
*/
|
|
313
|
+
revokeSessions(sessions) {
|
|
314
|
+
const ptr0 = passArrayJsValueToWasm0(sessions, wasm.__wbindgen_export);
|
|
315
|
+
const len0 = WASM_VECTOR_LEN;
|
|
316
|
+
const ret = wasm.cartridgeaccount_revokeSessions(this.__wbg_ptr, ptr0, len0);
|
|
317
|
+
return takeObject(ret);
|
|
318
|
+
}
|
|
597
319
|
/**
|
|
598
320
|
* Signs an OutsideExecution V3 transaction and returns both the OutsideExecution object and its signature.
|
|
599
321
|
*
|
|
@@ -612,78 +334,40 @@ export class CartridgeAccount {
|
|
|
612
334
|
return takeObject(ret);
|
|
613
335
|
}
|
|
614
336
|
/**
|
|
615
|
-
* @param {
|
|
616
|
-
* @
|
|
617
|
-
* @returns {Promise<AuthorizedSession | undefined>}
|
|
337
|
+
* @param {string} typed_data
|
|
338
|
+
* @returns {Promise<Felts>}
|
|
618
339
|
*/
|
|
619
|
-
|
|
620
|
-
const ptr0 =
|
|
340
|
+
signMessage(typed_data) {
|
|
341
|
+
const ptr0 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
621
342
|
const len0 = WASM_VECTOR_LEN;
|
|
622
|
-
const ret = wasm.
|
|
343
|
+
const ret = wasm.cartridgeaccount_signMessage(this.__wbg_ptr, ptr0, len0);
|
|
623
344
|
return takeObject(ret);
|
|
624
345
|
}
|
|
625
346
|
/**
|
|
626
347
|
* @param {string} app_id
|
|
627
|
-
* @param {
|
|
628
|
-
* @returns {Promise<
|
|
348
|
+
* @param {Policy[]} policies
|
|
349
|
+
* @returns {Promise<void>}
|
|
629
350
|
*/
|
|
630
|
-
|
|
351
|
+
skipSession(app_id, policies) {
|
|
631
352
|
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
632
353
|
const len0 = WASM_VECTOR_LEN;
|
|
633
|
-
const ptr1 = passArrayJsValueToWasm0(
|
|
354
|
+
const ptr1 = passArrayJsValueToWasm0(policies, wasm.__wbindgen_export);
|
|
634
355
|
const len1 = WASM_VECTOR_LEN;
|
|
635
|
-
const ret = wasm.
|
|
356
|
+
const ret = wasm.cartridgeaccount_skipSession(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
636
357
|
return takeObject(ret);
|
|
637
358
|
}
|
|
638
359
|
/**
|
|
639
360
|
* @param {string} app_id
|
|
640
|
-
* @param {string} typed_data
|
|
641
|
-
* @returns {Promise<boolean>}
|
|
642
|
-
*/
|
|
643
|
-
hasAuthorizedPoliciesForMessage(app_id, typed_data) {
|
|
644
|
-
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
645
|
-
const len0 = WASM_VECTOR_LEN;
|
|
646
|
-
const ptr1 = passStringToWasm0(typed_data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
647
|
-
const len1 = WASM_VECTOR_LEN;
|
|
648
|
-
const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
649
|
-
return takeObject(ret);
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* Creates a new `CartridgeAccount` instance.
|
|
653
|
-
*
|
|
654
|
-
* # Parameters
|
|
655
|
-
* - `rpc_url`: The URL of the JSON-RPC endpoint.
|
|
656
|
-
* - `address`: The blockchain address associated with the account.
|
|
657
|
-
* - `username`: Username associated with the account.
|
|
658
|
-
* - `owner`: A Owner struct containing the owner signer and associated data.
|
|
659
|
-
* @param {JsFelt} class_hash
|
|
660
|
-
* @param {string} rpc_url
|
|
661
|
-
* @param {JsFelt} address
|
|
662
|
-
* @param {string} username
|
|
663
|
-
* @param {Owner} owner
|
|
664
|
-
* @param {string} cartridge_api_url
|
|
665
|
-
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
666
|
-
*/
|
|
667
|
-
static new(class_hash, rpc_url, address, username, owner, cartridge_api_url) {
|
|
668
|
-
const ptr0 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
669
|
-
const len0 = WASM_VECTOR_LEN;
|
|
670
|
-
const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
671
|
-
const len1 = WASM_VECTOR_LEN;
|
|
672
|
-
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
673
|
-
const len2 = WASM_VECTOR_LEN;
|
|
674
|
-
const ret = wasm.cartridgeaccount_new(addHeapObject(class_hash), ptr0, len0, addHeapObject(address), ptr1, len1, addHeapObject(owner), ptr2, len2);
|
|
675
|
-
return takeObject(ret);
|
|
676
|
-
}
|
|
677
|
-
/**
|
|
678
361
|
* @param {JsCall[]} calls
|
|
679
|
-
* @param {JsFeeEstimate | null} [max_fee]
|
|
680
362
|
* @param {JsFeeSource | null} [fee_source]
|
|
681
363
|
* @returns {Promise<any>}
|
|
682
364
|
*/
|
|
683
|
-
|
|
684
|
-
const ptr0 =
|
|
365
|
+
trySessionExecute(app_id, calls, fee_source) {
|
|
366
|
+
const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
685
367
|
const len0 = WASM_VECTOR_LEN;
|
|
686
|
-
const
|
|
368
|
+
const ptr1 = passArrayJsValueToWasm0(calls, wasm.__wbindgen_export);
|
|
369
|
+
const len1 = WASM_VECTOR_LEN;
|
|
370
|
+
const ret = wasm.cartridgeaccount_trySessionExecute(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(fee_source) ? 0 : addHeapObject(fee_source));
|
|
687
371
|
return takeObject(ret);
|
|
688
372
|
}
|
|
689
373
|
/**
|
|
@@ -694,33 +378,6 @@ export class CartridgeAccount {
|
|
|
694
378
|
const ret = wasm.cartridgeaccount_upgrade(this.__wbg_ptr, addHeapObject(new_class_hash));
|
|
695
379
|
return takeObject(ret);
|
|
696
380
|
}
|
|
697
|
-
/**
|
|
698
|
-
* @param {JsRegister} register
|
|
699
|
-
* @returns {Promise<JsRegisterResponse>}
|
|
700
|
-
*/
|
|
701
|
-
register(register) {
|
|
702
|
-
const ret = wasm.cartridgeaccount_register(this.__wbg_ptr, addHeapObject(register));
|
|
703
|
-
return takeObject(ret);
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* @param {Signer | null} [owner]
|
|
707
|
-
* @param {JsAddSignerInput | null} [signer_input]
|
|
708
|
-
* @param {string | null} [rp_id]
|
|
709
|
-
* @returns {Promise<void>}
|
|
710
|
-
*/
|
|
711
|
-
addOwner(owner, signer_input, rp_id) {
|
|
712
|
-
var ptr0 = isLikeNone(rp_id) ? 0 : passStringToWasm0(rp_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
713
|
-
var len0 = WASM_VECTOR_LEN;
|
|
714
|
-
const ret = wasm.cartridgeaccount_addOwner(this.__wbg_ptr, isLikeNone(owner) ? 0 : addHeapObject(owner), isLikeNone(signer_input) ? 0 : addHeapObject(signer_input), ptr0, len0);
|
|
715
|
-
return takeObject(ret);
|
|
716
|
-
}
|
|
717
|
-
/**
|
|
718
|
-
* @returns {Promise<any>}
|
|
719
|
-
*/
|
|
720
|
-
getNonce() {
|
|
721
|
-
const ret = wasm.cartridgeaccount_getNonce(this.__wbg_ptr);
|
|
722
|
-
return takeObject(ret);
|
|
723
|
-
}
|
|
724
381
|
}
|
|
725
382
|
if (Symbol.dispose) CartridgeAccount.prototype[Symbol.dispose] = CartridgeAccount.prototype.free;
|
|
726
383
|
|
|
@@ -758,12 +415,12 @@ export class CartridgeAccountMeta {
|
|
|
758
415
|
/**
|
|
759
416
|
* @returns {string}
|
|
760
417
|
*/
|
|
761
|
-
|
|
418
|
+
address() {
|
|
762
419
|
let deferred1_0;
|
|
763
420
|
let deferred1_1;
|
|
764
421
|
try {
|
|
765
422
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
766
|
-
wasm.
|
|
423
|
+
wasm.cartridgeaccountmeta_address(retptr, this.__wbg_ptr);
|
|
767
424
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
768
425
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
769
426
|
deferred1_0 = r0;
|
|
@@ -774,29 +431,15 @@ export class CartridgeAccountMeta {
|
|
|
774
431
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
775
432
|
}
|
|
776
433
|
}
|
|
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
434
|
/**
|
|
792
435
|
* @returns {string}
|
|
793
436
|
*/
|
|
794
|
-
|
|
437
|
+
chainId() {
|
|
795
438
|
let deferred1_0;
|
|
796
439
|
let deferred1_1;
|
|
797
440
|
try {
|
|
798
441
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
799
|
-
wasm.
|
|
442
|
+
wasm.cartridgeaccountmeta_chainId(retptr, this.__wbg_ptr);
|
|
800
443
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
801
444
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
802
445
|
deferred1_0 = r0;
|
|
@@ -810,12 +453,12 @@ export class CartridgeAccountMeta {
|
|
|
810
453
|
/**
|
|
811
454
|
* @returns {string}
|
|
812
455
|
*/
|
|
813
|
-
|
|
456
|
+
classHash() {
|
|
814
457
|
let deferred1_0;
|
|
815
458
|
let deferred1_1;
|
|
816
459
|
try {
|
|
817
460
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
818
|
-
wasm.
|
|
461
|
+
wasm.cartridgeaccountmeta_classHash(retptr, this.__wbg_ptr);
|
|
819
462
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
820
463
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
821
464
|
deferred1_0 = r0;
|
|
@@ -826,15 +469,29 @@ export class CartridgeAccountMeta {
|
|
|
826
469
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
827
470
|
}
|
|
828
471
|
}
|
|
472
|
+
/**
|
|
473
|
+
* @returns {Owner}
|
|
474
|
+
*/
|
|
475
|
+
owner() {
|
|
476
|
+
const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
|
|
477
|
+
return takeObject(ret);
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* @returns {JsFelt}
|
|
481
|
+
*/
|
|
482
|
+
ownerGuid() {
|
|
483
|
+
const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
|
|
484
|
+
return takeObject(ret);
|
|
485
|
+
}
|
|
829
486
|
/**
|
|
830
487
|
* @returns {string}
|
|
831
488
|
*/
|
|
832
|
-
|
|
489
|
+
rpcUrl() {
|
|
833
490
|
let deferred1_0;
|
|
834
491
|
let deferred1_1;
|
|
835
492
|
try {
|
|
836
493
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
837
|
-
wasm.
|
|
494
|
+
wasm.cartridgeaccountmeta_rpcUrl(retptr, this.__wbg_ptr);
|
|
838
495
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
839
496
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
840
497
|
deferred1_0 = r0;
|
|
@@ -921,6 +578,26 @@ export class ControllerFactory {
|
|
|
921
578
|
const ptr = this.__destroy_into_raw();
|
|
922
579
|
wasm.__wbg_controllerfactory_free(ptr, 0);
|
|
923
580
|
}
|
|
581
|
+
/**
|
|
582
|
+
* This should only be used with webauthn signers
|
|
583
|
+
* @param {string} username
|
|
584
|
+
* @param {JsFelt} class_hash
|
|
585
|
+
* @param {string} rpc_url
|
|
586
|
+
* @param {JsFelt} address
|
|
587
|
+
* @param {Owner} owner
|
|
588
|
+
* @param {string} cartridge_api_url
|
|
589
|
+
* @returns {Promise<CartridgeAccountWithMeta>}
|
|
590
|
+
*/
|
|
591
|
+
static apiLogin(username, class_hash, rpc_url, address, owner, cartridge_api_url) {
|
|
592
|
+
const ptr0 = passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
593
|
+
const len0 = WASM_VECTOR_LEN;
|
|
594
|
+
const ptr1 = passStringToWasm0(rpc_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
595
|
+
const len1 = WASM_VECTOR_LEN;
|
|
596
|
+
const ptr2 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
597
|
+
const len2 = WASM_VECTOR_LEN;
|
|
598
|
+
const ret = wasm.controllerfactory_apiLogin(ptr0, len0, addHeapObject(class_hash), ptr1, len1, addHeapObject(address), addHeapObject(owner), ptr2, len2);
|
|
599
|
+
return takeObject(ret);
|
|
600
|
+
}
|
|
924
601
|
/**
|
|
925
602
|
* @param {string} cartridge_api_url
|
|
926
603
|
* @returns {Promise<CartridgeAccountWithMeta | undefined>}
|
|
@@ -982,26 +659,6 @@ export class ControllerFactory {
|
|
|
982
659
|
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
660
|
return takeObject(ret);
|
|
984
661
|
}
|
|
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
662
|
}
|
|
1006
663
|
if (Symbol.dispose) ControllerFactory.prototype[Symbol.dispose] = ControllerFactory.prototype.free;
|
|
1007
664
|
|
|
@@ -1104,6 +761,13 @@ export class JsChainConfig {
|
|
|
1104
761
|
const ptr = this.__destroy_into_raw();
|
|
1105
762
|
wasm.__wbg_jschainconfig_free(ptr, 0);
|
|
1106
763
|
}
|
|
764
|
+
/**
|
|
765
|
+
* @returns {JsFelt | undefined}
|
|
766
|
+
*/
|
|
767
|
+
get address() {
|
|
768
|
+
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
769
|
+
return takeObject(ret);
|
|
770
|
+
}
|
|
1107
771
|
/**
|
|
1108
772
|
* @returns {JsFelt}
|
|
1109
773
|
*/
|
|
@@ -1132,13 +796,6 @@ export class JsChainConfig {
|
|
|
1132
796
|
const ret = wasm.jschainconfig_owner(this.__wbg_ptr);
|
|
1133
797
|
return takeObject(ret);
|
|
1134
798
|
}
|
|
1135
|
-
/**
|
|
1136
|
-
* @returns {JsFelt | undefined}
|
|
1137
|
-
*/
|
|
1138
|
-
get address() {
|
|
1139
|
-
const ret = wasm.jschainconfig_address(this.__wbg_ptr);
|
|
1140
|
-
return takeObject(ret);
|
|
1141
|
-
}
|
|
1142
799
|
/**
|
|
1143
800
|
* @returns {string}
|
|
1144
801
|
*/
|
|
@@ -1187,10 +844,23 @@ export class JsControllerError {
|
|
|
1187
844
|
return ret;
|
|
1188
845
|
}
|
|
1189
846
|
/**
|
|
1190
|
-
* @
|
|
847
|
+
* @returns {string | undefined}
|
|
1191
848
|
*/
|
|
1192
|
-
|
|
1193
|
-
|
|
849
|
+
get data() {
|
|
850
|
+
try {
|
|
851
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
852
|
+
wasm.__wbg_get_jscontrollererror_data(retptr, this.__wbg_ptr);
|
|
853
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
854
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
855
|
+
let v1;
|
|
856
|
+
if (r0 !== 0) {
|
|
857
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
858
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
859
|
+
}
|
|
860
|
+
return v1;
|
|
861
|
+
} finally {
|
|
862
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
863
|
+
}
|
|
1194
864
|
}
|
|
1195
865
|
/**
|
|
1196
866
|
* @returns {string}
|
|
@@ -1212,31 +882,10 @@ export class JsControllerError {
|
|
|
1212
882
|
}
|
|
1213
883
|
}
|
|
1214
884
|
/**
|
|
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}
|
|
885
|
+
* @param {ErrorCode} arg0
|
|
1224
886
|
*/
|
|
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
|
-
}
|
|
887
|
+
set code(arg0) {
|
|
888
|
+
wasm.__wbg_set_jscontrollererror_code(this.__wbg_ptr, arg0);
|
|
1240
889
|
}
|
|
1241
890
|
/**
|
|
1242
891
|
* @param {string | null} [arg0]
|
|
@@ -1246,6 +895,14 @@ export class JsControllerError {
|
|
|
1246
895
|
var len0 = WASM_VECTOR_LEN;
|
|
1247
896
|
wasm.__wbg_set_jscontrollererror_data(this.__wbg_ptr, ptr0, len0);
|
|
1248
897
|
}
|
|
898
|
+
/**
|
|
899
|
+
* @param {string} arg0
|
|
900
|
+
*/
|
|
901
|
+
set message(arg0) {
|
|
902
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
903
|
+
const len0 = WASM_VECTOR_LEN;
|
|
904
|
+
wasm.__wbg_set_jscontrollererror_message(this.__wbg_ptr, ptr0, len0);
|
|
905
|
+
}
|
|
1249
906
|
}
|
|
1250
907
|
if (Symbol.dispose) JsControllerError.prototype[Symbol.dispose] = JsControllerError.prototype.free;
|
|
1251
908
|
|
|
@@ -1300,32 +957,23 @@ export class MultiChainAccount {
|
|
|
1300
957
|
wasm.__wbg_multichainaccount_free(ptr, 0);
|
|
1301
958
|
}
|
|
1302
959
|
/**
|
|
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>}
|
|
960
|
+
* Adds a new chain configuration
|
|
961
|
+
* @param {JsChainConfig} config
|
|
962
|
+
* @returns {Promise<void>}
|
|
1315
963
|
*/
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
const ret = wasm.
|
|
964
|
+
addChain(config) {
|
|
965
|
+
_assertClass(config, JsChainConfig);
|
|
966
|
+
var ptr0 = config.__destroy_into_raw();
|
|
967
|
+
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
1320
968
|
return takeObject(ret);
|
|
1321
969
|
}
|
|
1322
970
|
/**
|
|
1323
|
-
*
|
|
971
|
+
* Gets an account instance for a specific chain
|
|
1324
972
|
* @param {JsFelt} chain_id
|
|
1325
|
-
* @returns {Promise<
|
|
973
|
+
* @returns {Promise<CartridgeAccount>}
|
|
1326
974
|
*/
|
|
1327
|
-
|
|
1328
|
-
const ret = wasm.
|
|
975
|
+
controller(chain_id) {
|
|
976
|
+
const ret = wasm.multichainaccount_controller(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1329
977
|
return takeObject(ret);
|
|
1330
978
|
}
|
|
1331
979
|
/**
|
|
@@ -1346,14 +994,23 @@ export class MultiChainAccount {
|
|
|
1346
994
|
return takeObject(ret);
|
|
1347
995
|
}
|
|
1348
996
|
/**
|
|
1349
|
-
*
|
|
1350
|
-
* @param {
|
|
997
|
+
* Loads a MultiChainAccount from storage
|
|
998
|
+
* @param {string} cartridge_api_url
|
|
999
|
+
* @returns {Promise<MultiChainAccount | undefined>}
|
|
1000
|
+
*/
|
|
1001
|
+
static fromStorage(cartridge_api_url) {
|
|
1002
|
+
const ptr0 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1003
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1004
|
+
const ret = wasm.multichainaccount_fromStorage(ptr0, len0);
|
|
1005
|
+
return takeObject(ret);
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* Removes a chain configuration
|
|
1009
|
+
* @param {JsFelt} chain_id
|
|
1351
1010
|
* @returns {Promise<void>}
|
|
1352
1011
|
*/
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
var ptr0 = config.__destroy_into_raw();
|
|
1356
|
-
const ret = wasm.multichainaccount_addChain(this.__wbg_ptr, ptr0);
|
|
1012
|
+
removeChain(chain_id) {
|
|
1013
|
+
const ret = wasm.multichainaccount_removeChain(this.__wbg_ptr, addHeapObject(chain_id));
|
|
1357
1014
|
return takeObject(ret);
|
|
1358
1015
|
}
|
|
1359
1016
|
}
|
|
@@ -1478,231 +1135,184 @@ export function subscribeCreateSession(session_key_guid, cartridge_api_url) {
|
|
|
1478
1135
|
const ret = wasm.subscribeCreateSession(addHeapObject(session_key_guid), ptr0, len0);
|
|
1479
1136
|
return takeObject(ret);
|
|
1480
1137
|
}
|
|
1481
|
-
|
|
1482
|
-
export function __wbg_Error_52673b7de5a0ca89(arg0, arg1) {
|
|
1138
|
+
export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
|
|
1483
1139
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1484
1140
|
return addHeapObject(ret);
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1141
|
+
}
|
|
1487
1142
|
export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
1488
1143
|
const ret = String(getObject(arg1));
|
|
1489
1144
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1490
1145
|
const len1 = WASM_VECTOR_LEN;
|
|
1491
1146
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1492
1147
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
export function __wbg___wbindgen_boolean_get_dea25b33882b895b(arg0) {
|
|
1148
|
+
}
|
|
1149
|
+
export function __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25(arg0) {
|
|
1496
1150
|
const v = getObject(arg0);
|
|
1497
1151
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1498
1152
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
export function __wbg___wbindgen_debug_string_adfb662ae34724b6(arg0, arg1) {
|
|
1153
|
+
}
|
|
1154
|
+
export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
|
|
1502
1155
|
const ret = debugString(getObject(arg1));
|
|
1503
1156
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1504
1157
|
const len1 = WASM_VECTOR_LEN;
|
|
1505
1158
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1506
1159
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
export function __wbg___wbindgen_in_0d3e1e8f0c669317(arg0, arg1) {
|
|
1160
|
+
}
|
|
1161
|
+
export function __wbg___wbindgen_in_47fa6863be6f2f25(arg0, arg1) {
|
|
1510
1162
|
const ret = getObject(arg0) in getObject(arg1);
|
|
1511
1163
|
return ret;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
export function __wbg___wbindgen_is_function_8d400b8b1af978cd(arg0) {
|
|
1164
|
+
}
|
|
1165
|
+
export function __wbg___wbindgen_is_function_0095a73b8b156f76(arg0) {
|
|
1515
1166
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
1516
1167
|
return ret;
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
export function __wbg___wbindgen_is_object_ce774f3490692386(arg0) {
|
|
1168
|
+
}
|
|
1169
|
+
export function __wbg___wbindgen_is_object_5ae8e5880f2c1fbd(arg0) {
|
|
1520
1170
|
const val = getObject(arg0);
|
|
1521
1171
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1522
1172
|
return ret;
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
export function __wbg___wbindgen_is_string_704ef9c8fc131030(arg0) {
|
|
1173
|
+
}
|
|
1174
|
+
export function __wbg___wbindgen_is_string_cd444516edc5b180(arg0) {
|
|
1526
1175
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
1527
1176
|
return ret;
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
export function __wbg___wbindgen_is_undefined_f6b95eab589e0269(arg0) {
|
|
1177
|
+
}
|
|
1178
|
+
export function __wbg___wbindgen_is_undefined_9e4d92534c42d778(arg0) {
|
|
1531
1179
|
const ret = getObject(arg0) === undefined;
|
|
1532
1180
|
return ret;
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
export function __wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d(arg0, arg1) {
|
|
1181
|
+
}
|
|
1182
|
+
export function __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811(arg0, arg1) {
|
|
1536
1183
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1537
1184
|
return ret;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
export function __wbg___wbindgen_number_get_9619185a74197f95(arg0, arg1) {
|
|
1185
|
+
}
|
|
1186
|
+
export function __wbg___wbindgen_number_get_8ff4255516ccad3e(arg0, arg1) {
|
|
1541
1187
|
const obj = getObject(arg1);
|
|
1542
1188
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1543
1189
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1544
1190
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
export function __wbg___wbindgen_string_get_a2a31e16edf96e42(arg0, arg1) {
|
|
1191
|
+
}
|
|
1192
|
+
export function __wbg___wbindgen_string_get_72fb696202c56729(arg0, arg1) {
|
|
1548
1193
|
const obj = getObject(arg1);
|
|
1549
1194
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1550
1195
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1551
1196
|
var len1 = WASM_VECTOR_LEN;
|
|
1552
1197
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1553
1198
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
|
|
1199
|
+
}
|
|
1200
|
+
export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) {
|
|
1557
1201
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
export function __wbg__wbg_cb_unref_87dfb5aaa0cbcea7(arg0) {
|
|
1202
|
+
}
|
|
1203
|
+
export function __wbg__wbg_cb_unref_d9b87ff7982e3b21(arg0) {
|
|
1561
1204
|
getObject(arg0)._wbg_cb_unref();
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
export function __wbg_abort_07646c894ebbf2bd(arg0) {
|
|
1205
|
+
}
|
|
1206
|
+
export function __wbg_abort_2f0584e03e8e3950(arg0) {
|
|
1565
1207
|
getObject(arg0).abort();
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
export function __wbg_abort_399ecbcfd6ef3c8e(arg0, arg1) {
|
|
1208
|
+
}
|
|
1209
|
+
export function __wbg_abort_d549b92d3c665de1(arg0, arg1) {
|
|
1569
1210
|
getObject(arg0).abort(getObject(arg1));
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
export function __wbg_addEventListener_6a82629b3d430a48() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1211
|
+
}
|
|
1212
|
+
export function __wbg_addEventListener_3acb0aad4483804c() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1573
1213
|
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) {
|
|
1214
|
+
}, arguments); }
|
|
1215
|
+
export function __wbg_append_a992ccc37aa62dc4() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1577
1216
|
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1578
|
-
}, arguments) }
|
|
1579
|
-
|
|
1580
|
-
export function __wbg_arrayBuffer_c04af4fce566092d() { return handleError(function (arg0) {
|
|
1217
|
+
}, arguments); }
|
|
1218
|
+
export function __wbg_arrayBuffer_bb54076166006c39() { return handleError(function (arg0) {
|
|
1581
1219
|
const ret = getObject(arg0).arrayBuffer();
|
|
1582
1220
|
return addHeapObject(ret);
|
|
1583
|
-
}, arguments) }
|
|
1584
|
-
|
|
1585
|
-
export function __wbg_call_3020136f7a2d6e44() { return handleError(function (arg0, arg1, arg2) {
|
|
1586
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1587
|
-
return addHeapObject(ret);
|
|
1588
|
-
}, arguments) };
|
|
1589
|
-
|
|
1590
|
-
export function __wbg_call_abb4ff46ce38be40() { return handleError(function (arg0, arg1) {
|
|
1221
|
+
}, arguments); }
|
|
1222
|
+
export function __wbg_call_389efe28435a9388() { return handleError(function (arg0, arg1) {
|
|
1591
1223
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1592
1224
|
return addHeapObject(ret);
|
|
1593
|
-
}, arguments) }
|
|
1594
|
-
|
|
1225
|
+
}, arguments); }
|
|
1226
|
+
export function __wbg_call_4708e0c13bdc8e95() { return handleError(function (arg0, arg1, arg2) {
|
|
1227
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1228
|
+
return addHeapObject(ret);
|
|
1229
|
+
}, arguments); }
|
|
1595
1230
|
export function __wbg_cartridgeaccount_new(arg0) {
|
|
1596
1231
|
const ret = CartridgeAccount.__wrap(arg0);
|
|
1597
1232
|
return addHeapObject(ret);
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1233
|
+
}
|
|
1600
1234
|
export function __wbg_cartridgeaccountwithmeta_new(arg0) {
|
|
1601
1235
|
const ret = CartridgeAccountWithMeta.__wrap(arg0);
|
|
1602
1236
|
return addHeapObject(ret);
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1237
|
+
}
|
|
1605
1238
|
export function __wbg_clearTimeout_42d9ccd50822fd3a(arg0) {
|
|
1606
1239
|
const ret = clearTimeout(takeObject(arg0));
|
|
1607
1240
|
return addHeapObject(ret);
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
export function __wbg_clear_9fc28ed354d59d5e() { return handleError(function (arg0) {
|
|
1611
|
-
getObject(arg0).clear();
|
|
1612
|
-
}, arguments) };
|
|
1613
|
-
|
|
1614
|
-
export function __wbg_create_07d71296a0909e61() { return handleError(function (arg0, arg1) {
|
|
1241
|
+
}
|
|
1242
|
+
export function __wbg_create_6703e053182342f8() { return handleError(function (arg0, arg1) {
|
|
1615
1243
|
const ret = getObject(arg0).create(getObject(arg1));
|
|
1616
1244
|
return addHeapObject(ret);
|
|
1617
|
-
}, arguments) }
|
|
1618
|
-
|
|
1619
|
-
export function __wbg_credentials_36e0572b476d4883(arg0) {
|
|
1245
|
+
}, arguments); }
|
|
1246
|
+
export function __wbg_credentials_c8f18c5a8bda3a18(arg0) {
|
|
1620
1247
|
const ret = getObject(arg0).credentials;
|
|
1621
1248
|
return addHeapObject(ret);
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1249
|
+
}
|
|
1624
1250
|
export function __wbg_crypto_86f2631e91b51511(arg0) {
|
|
1625
1251
|
const ret = getObject(arg0).crypto;
|
|
1626
1252
|
return addHeapObject(ret);
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
export function __wbg_data_8bf4ae669a78a688(arg0) {
|
|
1253
|
+
}
|
|
1254
|
+
export function __wbg_data_5330da50312d0bc1(arg0) {
|
|
1630
1255
|
const ret = getObject(arg0).data;
|
|
1631
1256
|
return addHeapObject(ret);
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
export function __wbg_done_62ea16af4ce34b24(arg0) {
|
|
1257
|
+
}
|
|
1258
|
+
export function __wbg_done_57b39ecd9addfe81(arg0) {
|
|
1635
1259
|
const ret = getObject(arg0).done;
|
|
1636
1260
|
return ret;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
export function __wbg_error_7bc7d576a6aaf855(arg0) {
|
|
1261
|
+
}
|
|
1262
|
+
export function __wbg_error_9a7fe3f932034cde(arg0) {
|
|
1640
1263
|
console.error(getObject(arg0));
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1264
|
+
}
|
|
1643
1265
|
export function __wbg_fetch_6bbc32f991730587(arg0) {
|
|
1644
1266
|
const ret = fetch(getObject(arg0));
|
|
1645
1267
|
return addHeapObject(ret);
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
export function __wbg_fetch_90447c28cc0b095e(arg0, arg1) {
|
|
1268
|
+
}
|
|
1269
|
+
export function __wbg_fetch_afb6a4b6cacf876d(arg0, arg1) {
|
|
1649
1270
|
const ret = getObject(arg0).fetch(getObject(arg1));
|
|
1650
1271
|
return addHeapObject(ret);
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1272
|
+
}
|
|
1653
1273
|
export function __wbg_fetch_f1856afdb49415d1(arg0) {
|
|
1654
1274
|
const ret = fetch(getObject(arg0));
|
|
1655
1275
|
return addHeapObject(ret);
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
export function __wbg_getClientExtensionResults_8668622b21a5eef7(arg0) {
|
|
1276
|
+
}
|
|
1277
|
+
export function __wbg_getClientExtensionResults_8f33db77a64c1fec(arg0) {
|
|
1659
1278
|
const ret = getObject(arg0).getClientExtensionResults();
|
|
1660
1279
|
return addHeapObject(ret);
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
export function __wbg_getItem_1340bfc9a10d5991() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1280
|
+
}
|
|
1281
|
+
export function __wbg_getItem_0c792d344808dcf5() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1664
1282
|
const ret = getObject(arg1).getItem(getStringFromWasm0(arg2, arg3));
|
|
1665
1283
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1666
1284
|
var len1 = WASM_VECTOR_LEN;
|
|
1667
1285
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1668
1286
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1669
|
-
}, arguments) }
|
|
1670
|
-
|
|
1287
|
+
}, arguments); }
|
|
1671
1288
|
export function __wbg_getRandomValues_b3f15fcbfabb0f8b() { return handleError(function (arg0, arg1) {
|
|
1672
1289
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
1673
|
-
}, arguments) }
|
|
1674
|
-
|
|
1675
|
-
export function __wbg_getTime_ad1e9878a735af08(arg0) {
|
|
1290
|
+
}, arguments); }
|
|
1291
|
+
export function __wbg_getTime_1e3cd1391c5c3995(arg0) {
|
|
1676
1292
|
const ret = getObject(arg0).getTime();
|
|
1677
1293
|
return ret;
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
export function __wbg_get_29726a9b608aea28() { return handleError(function (arg0, arg1) {
|
|
1294
|
+
}
|
|
1295
|
+
export function __wbg_get_4b6d542e6f171f17() { return handleError(function (arg0, arg1) {
|
|
1681
1296
|
const ret = getObject(arg0).get(getObject(arg1));
|
|
1682
1297
|
return addHeapObject(ret);
|
|
1683
|
-
}, arguments) }
|
|
1684
|
-
|
|
1685
|
-
export function __wbg_get_af9dab7e9603ea93() { return handleError(function (arg0, arg1) {
|
|
1298
|
+
}, arguments); }
|
|
1299
|
+
export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0, arg1) {
|
|
1686
1300
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1687
1301
|
return addHeapObject(ret);
|
|
1688
|
-
}, arguments) }
|
|
1689
|
-
|
|
1302
|
+
}, arguments); }
|
|
1690
1303
|
export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
|
|
1691
1304
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
1692
1305
|
return addHeapObject(ret);
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
export function __wbg_has_0e670569d65d3a45() { return handleError(function (arg0, arg1) {
|
|
1306
|
+
}
|
|
1307
|
+
export function __wbg_has_d4e53238966c12b6() { return handleError(function (arg0, arg1) {
|
|
1696
1308
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
1697
1309
|
return ret;
|
|
1698
|
-
}, arguments) }
|
|
1699
|
-
|
|
1700
|
-
export function __wbg_headers_654c30e1bcccc552(arg0) {
|
|
1310
|
+
}, arguments); }
|
|
1311
|
+
export function __wbg_headers_59a2938db9f80985(arg0) {
|
|
1701
1312
|
const ret = getObject(arg0).headers;
|
|
1702
1313
|
return addHeapObject(ret);
|
|
1703
|
-
}
|
|
1704
|
-
|
|
1705
|
-
export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
|
|
1314
|
+
}
|
|
1315
|
+
export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
|
|
1706
1316
|
let result;
|
|
1707
1317
|
try {
|
|
1708
1318
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -1711,9 +1321,8 @@ export function __wbg_instanceof_ArrayBuffer_f3320d2419cd0355(arg0) {
|
|
|
1711
1321
|
}
|
|
1712
1322
|
const ret = result;
|
|
1713
1323
|
return ret;
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
|
|
1324
|
+
}
|
|
1325
|
+
export function __wbg_instanceof_Object_1c6af87502b733ed(arg0) {
|
|
1717
1326
|
let result;
|
|
1718
1327
|
try {
|
|
1719
1328
|
result = getObject(arg0) instanceof Object;
|
|
@@ -1722,9 +1331,8 @@ export function __wbg_instanceof_Object_577e21051f7bcb79(arg0) {
|
|
|
1722
1331
|
}
|
|
1723
1332
|
const ret = result;
|
|
1724
1333
|
return ret;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
|
|
1334
|
+
}
|
|
1335
|
+
export function __wbg_instanceof_Response_ee1d54d79ae41977(arg0) {
|
|
1728
1336
|
let result;
|
|
1729
1337
|
try {
|
|
1730
1338
|
result = getObject(arg0) instanceof Response;
|
|
@@ -1733,9 +1341,8 @@ export function __wbg_instanceof_Response_cd74d1c2ac92cb0b(arg0) {
|
|
|
1733
1341
|
}
|
|
1734
1342
|
const ret = result;
|
|
1735
1343
|
return ret;
|
|
1736
|
-
}
|
|
1737
|
-
|
|
1738
|
-
export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
|
|
1344
|
+
}
|
|
1345
|
+
export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
|
|
1739
1346
|
let result;
|
|
1740
1347
|
try {
|
|
1741
1348
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -1744,9 +1351,8 @@ export function __wbg_instanceof_Uint8Array_da54ccc9d3e09434(arg0) {
|
|
|
1744
1351
|
}
|
|
1745
1352
|
const ret = result;
|
|
1746
1353
|
return ret;
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
|
|
1354
|
+
}
|
|
1355
|
+
export function __wbg_instanceof_Window_ed49b2db8df90359(arg0) {
|
|
1750
1356
|
let result;
|
|
1751
1357
|
try {
|
|
1752
1358
|
result = getObject(arg0) instanceof Window;
|
|
@@ -1755,9 +1361,8 @@ export function __wbg_instanceof_Window_b5cf7783caa68180(arg0) {
|
|
|
1755
1361
|
}
|
|
1756
1362
|
const ret = result;
|
|
1757
1363
|
return ret;
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
export function __wbg_instanceof_WorkerGlobalScope_9a3411db21c65a54(arg0) {
|
|
1364
|
+
}
|
|
1365
|
+
export function __wbg_instanceof_WorkerGlobalScope_07b9d5514ff0156e(arg0) {
|
|
1761
1366
|
let result;
|
|
1762
1367
|
try {
|
|
1763
1368
|
result = getObject(arg0) instanceof WorkerGlobalScope;
|
|
@@ -1766,110 +1371,89 @@ export function __wbg_instanceof_WorkerGlobalScope_9a3411db21c65a54(arg0) {
|
|
|
1766
1371
|
}
|
|
1767
1372
|
const ret = result;
|
|
1768
1373
|
return ret;
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
export function __wbg_iterator_27b7c8b35ab3e86b() {
|
|
1374
|
+
}
|
|
1375
|
+
export function __wbg_iterator_6ff6560ca1568e55() {
|
|
1772
1376
|
const ret = Symbol.iterator;
|
|
1773
1377
|
return addHeapObject(ret);
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1378
|
+
}
|
|
1776
1379
|
export function __wbg_jschainconfig_unwrap(arg0) {
|
|
1777
1380
|
const ret = JsChainConfig.__unwrap(getObject(arg0));
|
|
1778
1381
|
return ret;
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1382
|
+
}
|
|
1781
1383
|
export function __wbg_jscontrollererror_new(arg0) {
|
|
1782
1384
|
const ret = JsControllerError.__wrap(arg0);
|
|
1783
1385
|
return addHeapObject(ret);
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
|
|
1386
|
+
}
|
|
1387
|
+
export function __wbg_key_0167bc764945979a() { return handleError(function (arg0, arg1, arg2) {
|
|
1388
|
+
const ret = getObject(arg1).key(arg2 >>> 0);
|
|
1389
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1390
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1391
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1392
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1393
|
+
}, arguments); }
|
|
1394
|
+
export function __wbg_length_32ed9a279acd054c(arg0) {
|
|
1787
1395
|
const ret = getObject(arg0).length;
|
|
1788
1396
|
return ret;
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
|
|
1397
|
+
}
|
|
1398
|
+
export function __wbg_length_7724867d8e59c610() { return handleError(function (arg0) {
|
|
1399
|
+
const ret = getObject(arg0).length;
|
|
1400
|
+
return ret;
|
|
1401
|
+
}, arguments); }
|
|
1402
|
+
export function __wbg_localStorage_a22d31b9eacc4594() { return handleError(function (arg0) {
|
|
1792
1403
|
const ret = getObject(arg0).localStorage;
|
|
1793
1404
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1794
|
-
}, arguments) }
|
|
1795
|
-
|
|
1796
|
-
export function __wbg_location_962e75c1c1b3ebed(arg0) {
|
|
1405
|
+
}, arguments); }
|
|
1406
|
+
export function __wbg_location_df7ca06c93e51763(arg0) {
|
|
1797
1407
|
const ret = getObject(arg0).location;
|
|
1798
1408
|
return addHeapObject(ret);
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
export function __wbg_log_1d990106d99dacb7(arg0) {
|
|
1409
|
+
}
|
|
1410
|
+
export function __wbg_log_6b5ca2e6124b2808(arg0) {
|
|
1802
1411
|
console.log(getObject(arg0));
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1412
|
+
}
|
|
1805
1413
|
export function __wbg_loginresult_new(arg0) {
|
|
1806
1414
|
const ret = LoginResult.__wrap(arg0);
|
|
1807
1415
|
return addHeapObject(ret);
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1416
|
+
}
|
|
1810
1417
|
export function __wbg_msCrypto_d562bbe83e0d4b91(arg0) {
|
|
1811
1418
|
const ret = getObject(arg0).msCrypto;
|
|
1812
1419
|
return addHeapObject(ret);
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1420
|
+
}
|
|
1815
1421
|
export function __wbg_multichainaccount_new(arg0) {
|
|
1816
1422
|
const ret = MultiChainAccount.__wrap(arg0);
|
|
1817
1423
|
return addHeapObject(ret);
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
export function __wbg_navigator_b49edef831236138(arg0) {
|
|
1424
|
+
}
|
|
1425
|
+
export function __wbg_navigator_43be698ba96fc088(arg0) {
|
|
1821
1426
|
const ret = getObject(arg0).navigator;
|
|
1822
1427
|
return addHeapObject(ret);
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
export function __wbg_new_0_23cedd11d9b40c9d() {
|
|
1428
|
+
}
|
|
1429
|
+
export function __wbg_new_0_73afc35eb544e539() {
|
|
1826
1430
|
const ret = new Date();
|
|
1827
1431
|
return addHeapObject(ret);
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
export function __wbg_new_1ba21ce319a06297() {
|
|
1831
|
-
const ret = new Object();
|
|
1832
|
-
return addHeapObject(ret);
|
|
1833
|
-
};
|
|
1834
|
-
|
|
1835
|
-
export function __wbg_new_25f239778d6112b9() {
|
|
1836
|
-
const ret = new Array();
|
|
1837
|
-
return addHeapObject(ret);
|
|
1838
|
-
};
|
|
1839
|
-
|
|
1432
|
+
}
|
|
1840
1433
|
export function __wbg_new_2658d63118834d8e() {
|
|
1841
1434
|
const ret = new Mutex();
|
|
1842
1435
|
return addHeapObject(ret);
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
const ret = new Headers();
|
|
1847
|
-
return addHeapObject(ret);
|
|
1848
|
-
}, arguments) };
|
|
1849
|
-
|
|
1850
|
-
export function __wbg_new_6421f6084cc5bc5a(arg0) {
|
|
1851
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1436
|
+
}
|
|
1437
|
+
export function __wbg_new_361308b2356cecd0() {
|
|
1438
|
+
const ret = new Object();
|
|
1852
1439
|
return addHeapObject(ret);
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
const ret = new AbortController();
|
|
1440
|
+
}
|
|
1441
|
+
export function __wbg_new_3eb36ae241fe6f44() {
|
|
1442
|
+
const ret = new Array();
|
|
1857
1443
|
return addHeapObject(ret);
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
const ret = new Map();
|
|
1444
|
+
}
|
|
1445
|
+
export function __wbg_new_64284bd487f9d239() { return handleError(function () {
|
|
1446
|
+
const ret = new Headers();
|
|
1862
1447
|
return addHeapObject(ret);
|
|
1863
|
-
};
|
|
1864
|
-
|
|
1865
|
-
export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
|
|
1448
|
+
}, arguments); }
|
|
1449
|
+
export function __wbg_new_b5d9e2fb389fef91(arg0, arg1) {
|
|
1866
1450
|
try {
|
|
1867
1451
|
var state0 = {a: arg0, b: arg1};
|
|
1868
1452
|
var cb0 = (arg0, arg1) => {
|
|
1869
1453
|
const a = state0.a;
|
|
1870
1454
|
state0.a = 0;
|
|
1871
1455
|
try {
|
|
1872
|
-
return
|
|
1456
|
+
return __wasm_bindgen_func_elem_10958(a, state0.b, arg0, arg1);
|
|
1873
1457
|
} finally {
|
|
1874
1458
|
state0.a = a;
|
|
1875
1459
|
}
|
|
@@ -1879,355 +1463,639 @@ export function __wbg_new_ff12d2b041fb48f1(arg0, arg1) {
|
|
|
1879
1463
|
} finally {
|
|
1880
1464
|
state0.a = state0.b = 0;
|
|
1881
1465
|
}
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
|
|
1466
|
+
}
|
|
1467
|
+
export function __wbg_new_b949e7f56150a5d1() { return handleError(function () {
|
|
1468
|
+
const ret = new AbortController();
|
|
1469
|
+
return addHeapObject(ret);
|
|
1470
|
+
}, arguments); }
|
|
1471
|
+
export function __wbg_new_dca287b076112a51() {
|
|
1472
|
+
const ret = new Map();
|
|
1473
|
+
return addHeapObject(ret);
|
|
1474
|
+
}
|
|
1475
|
+
export function __wbg_new_dd2b680c8bf6ae29(arg0) {
|
|
1476
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1477
|
+
return addHeapObject(ret);
|
|
1478
|
+
}
|
|
1479
|
+
export function __wbg_new_from_slice_a3d2629dc1826784(arg0, arg1) {
|
|
1885
1480
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1886
1481
|
return addHeapObject(ret);
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
export function __wbg_new_no_args_cb138f77cf6151ee(arg0, arg1) {
|
|
1482
|
+
}
|
|
1483
|
+
export function __wbg_new_no_args_1c7c842f08d00ebb(arg0, arg1) {
|
|
1890
1484
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1891
1485
|
return addHeapObject(ret);
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
export function __wbg_new_with_length_aa5eaf41d35235e5(arg0) {
|
|
1486
|
+
}
|
|
1487
|
+
export function __wbg_new_with_length_a2c39cbe88fd8ff1(arg0) {
|
|
1895
1488
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
1896
1489
|
return addHeapObject(ret);
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1490
|
+
}
|
|
1491
|
+
export function __wbg_new_with_str_and_init_a61cbc6bdef21614() { return handleError(function (arg0, arg1, arg2) {
|
|
1492
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
1493
|
+
return addHeapObject(ret);
|
|
1494
|
+
}, arguments); }
|
|
1495
|
+
export function __wbg_next_3482f54c49e8af19() { return handleError(function (arg0) {
|
|
1496
|
+
const ret = getObject(arg0).next();
|
|
1497
|
+
return addHeapObject(ret);
|
|
1498
|
+
}, arguments); }
|
|
1499
|
+
export function __wbg_next_418f80d8f5303233(arg0) {
|
|
1500
|
+
const ret = getObject(arg0).next;
|
|
1501
|
+
return addHeapObject(ret);
|
|
1502
|
+
}
|
|
1503
|
+
export function __wbg_node_e1f24f89a7336c2e(arg0) {
|
|
1504
|
+
const ret = getObject(arg0).node;
|
|
1505
|
+
return addHeapObject(ret);
|
|
1506
|
+
}
|
|
1507
|
+
export function __wbg_now_a3af9a2f4bbaa4d1() {
|
|
1508
|
+
const ret = Date.now();
|
|
1509
|
+
return ret;
|
|
1510
|
+
}
|
|
1511
|
+
export function __wbg_obtain_a9626b3b96e6dc2c(arg0) {
|
|
1512
|
+
const ret = getObject(arg0).obtain();
|
|
1513
|
+
return addHeapObject(ret);
|
|
1514
|
+
}
|
|
1515
|
+
export function __wbg_open_d7691c490eaf9349() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
|
|
1516
|
+
const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6));
|
|
1517
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1518
|
+
}, arguments); }
|
|
1519
|
+
export function __wbg_origin_a9c891fa602b4d40() { return handleError(function (arg0, arg1) {
|
|
1520
|
+
const ret = getObject(arg1).origin;
|
|
1521
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1522
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1523
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1524
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1525
|
+
}, arguments); }
|
|
1526
|
+
export function __wbg_origin_ea1e188117b6dcf9(arg0, arg1) {
|
|
1527
|
+
const ret = getObject(arg1).origin;
|
|
1528
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1529
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1530
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1531
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1532
|
+
}
|
|
1533
|
+
export function __wbg_parse_9e3ea228dba1cc2a(arg0, arg1) {
|
|
1534
|
+
let deferred0_0;
|
|
1535
|
+
let deferred0_1;
|
|
1536
|
+
try {
|
|
1537
|
+
deferred0_0 = arg0;
|
|
1538
|
+
deferred0_1 = arg1;
|
|
1539
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1540
|
+
return addHeapObject(ret);
|
|
1541
|
+
} finally {
|
|
1542
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
export function __wbg_process_3975fd6c72f520aa(arg0) {
|
|
1546
|
+
const ret = getObject(arg0).process;
|
|
1547
|
+
return addHeapObject(ret);
|
|
1548
|
+
}
|
|
1549
|
+
export function __wbg_prototypesetcall_bdcdcc5842e4d77d(arg0, arg1, arg2) {
|
|
1550
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1551
|
+
}
|
|
1552
|
+
export function __wbg_push_8ffdcb2063340ba5(arg0, arg1) {
|
|
1553
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
1554
|
+
return ret;
|
|
1555
|
+
}
|
|
1556
|
+
export function __wbg_queueMicrotask_0aa0a927f78f5d98(arg0) {
|
|
1557
|
+
const ret = getObject(arg0).queueMicrotask;
|
|
1558
|
+
return addHeapObject(ret);
|
|
1559
|
+
}
|
|
1560
|
+
export function __wbg_queueMicrotask_5bb536982f78a56f(arg0) {
|
|
1561
|
+
queueMicrotask(getObject(arg0));
|
|
1562
|
+
}
|
|
1563
|
+
export function __wbg_randomFillSync_f8c153b79f285817() { return handleError(function (arg0, arg1) {
|
|
1564
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
1565
|
+
}, arguments); }
|
|
1566
|
+
export function __wbg_removeEventListener_e63328781a5b9af9() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1567
|
+
getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));
|
|
1568
|
+
}, arguments); }
|
|
1569
|
+
export function __wbg_removeItem_f6369b1a6fa39850() { return handleError(function (arg0, arg1, arg2) {
|
|
1570
|
+
getObject(arg0).removeItem(getStringFromWasm0(arg1, arg2));
|
|
1571
|
+
}, arguments); }
|
|
1572
|
+
export function __wbg_require_b74f47fc2d022fd6() { return handleError(function () {
|
|
1573
|
+
const ret = module.require;
|
|
1574
|
+
return addHeapObject(ret);
|
|
1575
|
+
}, arguments); }
|
|
1576
|
+
export function __wbg_resolve_002c4b7d9d8f6b64(arg0) {
|
|
1577
|
+
const ret = Promise.resolve(getObject(arg0));
|
|
1578
|
+
return addHeapObject(ret);
|
|
1579
|
+
}
|
|
1580
|
+
export function __wbg_setItem_cf340bb2edbd3089() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1581
|
+
getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1582
|
+
}, arguments); }
|
|
1583
|
+
export function __wbg_setTimeout_4ec014681668a581(arg0, arg1) {
|
|
1584
|
+
const ret = setTimeout(getObject(arg0), arg1);
|
|
1585
|
+
return addHeapObject(ret);
|
|
1586
|
+
}
|
|
1587
|
+
export function __wbg_setTimeout_e0aacd5a637418a6() { return handleError(function (arg0, arg1, arg2) {
|
|
1588
|
+
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
1589
|
+
return ret;
|
|
1590
|
+
}, arguments); }
|
|
1591
|
+
export function __wbg_setTimeout_eff32631ea138533() { return handleError(function (arg0, arg1, arg2) {
|
|
1592
|
+
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
1593
|
+
return ret;
|
|
1594
|
+
}, arguments); }
|
|
1595
|
+
export function __wbg_set_1eb0999cf5d27fc8(arg0, arg1, arg2) {
|
|
1596
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1597
|
+
return addHeapObject(ret);
|
|
1598
|
+
}
|
|
1599
|
+
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
1600
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1601
|
+
}
|
|
1602
|
+
export function __wbg_set_3fda3bac07393de4(arg0, arg1, arg2) {
|
|
1603
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1604
|
+
}
|
|
1605
|
+
export function __wbg_set_6cb8631f80447a67() { return handleError(function (arg0, arg1, arg2) {
|
|
1606
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1607
|
+
return ret;
|
|
1608
|
+
}, arguments); }
|
|
1609
|
+
export function __wbg_set_body_9a7e00afe3cfe244(arg0, arg1) {
|
|
1610
|
+
getObject(arg0).body = getObject(arg1);
|
|
1611
|
+
}
|
|
1612
|
+
export function __wbg_set_cache_315a3ed773a41543(arg0, arg1) {
|
|
1613
|
+
getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
|
|
1614
|
+
}
|
|
1615
|
+
export function __wbg_set_credentials_c4a58d2e05ef24fb(arg0, arg1) {
|
|
1616
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1617
|
+
}
|
|
1618
|
+
export function __wbg_set_f43e577aea94465b(arg0, arg1, arg2) {
|
|
1619
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1620
|
+
}
|
|
1621
|
+
export function __wbg_set_headers_cfc5f4b2c1f20549(arg0, arg1) {
|
|
1622
|
+
getObject(arg0).headers = getObject(arg1);
|
|
1623
|
+
}
|
|
1624
|
+
export function __wbg_set_method_c3e20375f5ae7fac(arg0, arg1, arg2) {
|
|
1625
|
+
getObject(arg0).method = getStringFromWasm0(arg1, arg2);
|
|
1626
|
+
}
|
|
1627
|
+
export function __wbg_set_mode_b13642c312648202(arg0, arg1) {
|
|
1628
|
+
getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
|
|
1629
|
+
}
|
|
1630
|
+
export function __wbg_set_signal_f2d3f8599248896d(arg0, arg1) {
|
|
1631
|
+
getObject(arg0).signal = getObject(arg1);
|
|
1632
|
+
}
|
|
1633
|
+
export function __wbg_signMessage_c732ea9d998cac79() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1634
|
+
let deferred0_0;
|
|
1635
|
+
let deferred0_1;
|
|
1636
|
+
let deferred1_0;
|
|
1637
|
+
let deferred1_1;
|
|
1638
|
+
try {
|
|
1639
|
+
deferred0_0 = arg0;
|
|
1640
|
+
deferred0_1 = arg1;
|
|
1641
|
+
deferred1_0 = arg2;
|
|
1642
|
+
deferred1_1 = arg3;
|
|
1643
|
+
const ret = window.keychain_wallets.signMessage(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
1644
|
+
return addHeapObject(ret);
|
|
1645
|
+
} finally {
|
|
1646
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
1647
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1648
|
+
}
|
|
1649
|
+
}, arguments); }
|
|
1650
|
+
export function __wbg_signal_d1285ecab4ebc5ad(arg0) {
|
|
1651
|
+
const ret = getObject(arg0).signal;
|
|
1652
|
+
return addHeapObject(ret);
|
|
1653
|
+
}
|
|
1654
|
+
export function __wbg_static_accessor_GLOBAL_12837167ad935116() {
|
|
1655
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1656
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1657
|
+
}
|
|
1658
|
+
export function __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f() {
|
|
1659
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1660
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1661
|
+
}
|
|
1662
|
+
export function __wbg_static_accessor_SELF_a621d3dfbb60d0ce() {
|
|
1663
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
1664
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1665
|
+
}
|
|
1666
|
+
export function __wbg_static_accessor_WINDOW_f8727f0cf888e0bd() {
|
|
1667
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
1668
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1669
|
+
}
|
|
1670
|
+
export function __wbg_status_89d7e803db911ee7(arg0) {
|
|
1671
|
+
const ret = getObject(arg0).status;
|
|
1672
|
+
return ret;
|
|
1673
|
+
}
|
|
1674
|
+
export function __wbg_stringify_8d1cc6ff383e8bae() { return handleError(function (arg0) {
|
|
1675
|
+
const ret = JSON.stringify(getObject(arg0));
|
|
1901
1676
|
return addHeapObject(ret);
|
|
1902
|
-
}, arguments) }
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1677
|
+
}, arguments); }
|
|
1678
|
+
export function __wbg_stringify_e4a940b133e6b7d8(arg0, arg1) {
|
|
1679
|
+
const ret = JSON.stringify(getObject(arg1));
|
|
1680
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1681
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1682
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1683
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1684
|
+
}
|
|
1685
|
+
export function __wbg_subarray_a96e1fef17ed23cb(arg0, arg1, arg2) {
|
|
1686
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1906
1687
|
return addHeapObject(ret);
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
const ret = getObject(arg0).next();
|
|
1688
|
+
}
|
|
1689
|
+
export function __wbg_text_083b8727c990c8c0() { return handleError(function (arg0) {
|
|
1690
|
+
const ret = getObject(arg0).text();
|
|
1911
1691
|
return addHeapObject(ret);
|
|
1912
|
-
}, arguments) }
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
const ret = getObject(arg0).node;
|
|
1692
|
+
}, arguments); }
|
|
1693
|
+
export function __wbg_then_0d9fe2c7b1857d32(arg0, arg1, arg2) {
|
|
1694
|
+
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
1916
1695
|
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();
|
|
1696
|
+
}
|
|
1697
|
+
export function __wbg_then_b9e7b3b5f1a9e1b5(arg0, arg1) {
|
|
1698
|
+
const ret = getObject(arg0).then(getObject(arg1));
|
|
1926
1699
|
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;
|
|
1700
|
+
}
|
|
1701
|
+
export function __wbg_url_c484c26b1fbf5126(arg0, arg1) {
|
|
1702
|
+
const ret = getObject(arg1).url;
|
|
1936
1703
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1937
1704
|
const len1 = WASM_VECTOR_LEN;
|
|
1938
1705
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1939
1706
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
const ret = getObject(arg1).origin;
|
|
1707
|
+
}
|
|
1708
|
+
export function __wbg_userAgent_34463fd660ba4a2a() { return handleError(function (arg0, arg1) {
|
|
1709
|
+
const ret = getObject(arg1).userAgent;
|
|
1944
1710
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1945
1711
|
const len1 = WASM_VECTOR_LEN;
|
|
1946
1712
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1947
1713
|
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_3975fd6c72f520aa(arg0) {
|
|
1964
|
-
const ret = getObject(arg0).process;
|
|
1714
|
+
}, arguments); }
|
|
1715
|
+
export function __wbg_value_0546255b415e96c1(arg0) {
|
|
1716
|
+
const ret = getObject(arg0).value;
|
|
1965
1717
|
return addHeapObject(ret);
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1970
|
-
};
|
|
1971
|
-
|
|
1972
|
-
export function __wbg_push_7d9be8f38fc13975(arg0, arg1) {
|
|
1973
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
1974
|
-
return ret;
|
|
1975
|
-
};
|
|
1976
|
-
|
|
1977
|
-
export function __wbg_queueMicrotask_9b549dfce8865860(arg0) {
|
|
1978
|
-
const ret = getObject(arg0).queueMicrotask;
|
|
1718
|
+
}
|
|
1719
|
+
export function __wbg_versions_4e31226f5e8dc909(arg0) {
|
|
1720
|
+
const ret = getObject(arg0).versions;
|
|
1979
1721
|
return addHeapObject(ret);
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
export function
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1722
|
+
}
|
|
1723
|
+
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
1724
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
1725
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_236, __wasm_bindgen_func_elem_3296);
|
|
1726
|
+
return addHeapObject(ret);
|
|
1727
|
+
}
|
|
1728
|
+
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
1729
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1005, function: Function { arguments: [Externref], shim_idx: 1006, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1730
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8850, __wasm_bindgen_func_elem_8865);
|
|
1731
|
+
return addHeapObject(ret);
|
|
1732
|
+
}
|
|
1733
|
+
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
1734
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 970, function: Function { arguments: [], shim_idx: 971, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1735
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8706, __wasm_bindgen_func_elem_8715);
|
|
1736
|
+
return addHeapObject(ret);
|
|
1737
|
+
}
|
|
1738
|
+
export function __wbindgen_cast_0000000000000004(arg0) {
|
|
1739
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1740
|
+
const ret = arg0;
|
|
1741
|
+
return addHeapObject(ret);
|
|
1742
|
+
}
|
|
1743
|
+
export function __wbindgen_cast_0000000000000005(arg0) {
|
|
1744
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
1745
|
+
const ret = arg0;
|
|
1746
|
+
return addHeapObject(ret);
|
|
1747
|
+
}
|
|
1748
|
+
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
1749
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1750
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1751
|
+
return addHeapObject(ret);
|
|
1752
|
+
}
|
|
1753
|
+
export function __wbindgen_cast_0000000000000007(arg0, arg1) {
|
|
1754
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1755
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1756
|
+
return addHeapObject(ret);
|
|
1757
|
+
}
|
|
1758
|
+
export function __wbindgen_object_clone_ref(arg0) {
|
|
1759
|
+
const ret = getObject(arg0);
|
|
1760
|
+
return addHeapObject(ret);
|
|
1761
|
+
}
|
|
1762
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
|
1763
|
+
takeObject(arg0);
|
|
1764
|
+
}
|
|
1765
|
+
function __wasm_bindgen_func_elem_8715(arg0, arg1) {
|
|
1766
|
+
wasm.__wasm_bindgen_func_elem_8715(arg0, arg1);
|
|
1767
|
+
}
|
|
1993
1768
|
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
}
|
|
1769
|
+
function __wasm_bindgen_func_elem_3296(arg0, arg1, arg2) {
|
|
1770
|
+
wasm.__wasm_bindgen_func_elem_3296(arg0, arg1, addHeapObject(arg2));
|
|
1771
|
+
}
|
|
1997
1772
|
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
}, arguments) };
|
|
1773
|
+
function __wasm_bindgen_func_elem_8865(arg0, arg1, arg2) {
|
|
1774
|
+
wasm.__wasm_bindgen_func_elem_8865(arg0, arg1, addHeapObject(arg2));
|
|
1775
|
+
}
|
|
2002
1776
|
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
};
|
|
1777
|
+
function __wasm_bindgen_func_elem_10958(arg0, arg1, arg2, arg3) {
|
|
1778
|
+
wasm.__wasm_bindgen_func_elem_10958(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
1779
|
+
}
|
|
2007
1780
|
|
|
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
1781
|
|
|
2012
|
-
|
|
2013
|
-
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2014
|
-
return ret;
|
|
2015
|
-
}, arguments) };
|
|
1782
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
2016
1783
|
|
|
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
1784
|
|
|
2022
|
-
|
|
2023
|
-
const ret = setTimeout(getObject(arg0), arg1);
|
|
2024
|
-
return addHeapObject(ret);
|
|
2025
|
-
};
|
|
1785
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
2026
1786
|
|
|
2027
|
-
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
2028
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
2029
|
-
};
|
|
2030
1787
|
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
}
|
|
1788
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
1789
|
+
const CartridgeAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1790
|
+
? { register: () => {}, unregister: () => {} }
|
|
1791
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccount_free(ptr >>> 0, 1));
|
|
1792
|
+
const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1793
|
+
? { register: () => {}, unregister: () => {} }
|
|
1794
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountmeta_free(ptr >>> 0, 1));
|
|
1795
|
+
const CartridgeAccountWithMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1796
|
+
? { register: () => {}, unregister: () => {} }
|
|
1797
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cartridgeaccountwithmeta_free(ptr >>> 0, 1));
|
|
1798
|
+
const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1799
|
+
? { register: () => {}, unregister: () => {} }
|
|
1800
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
|
|
1801
|
+
const JsChainConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1802
|
+
? { register: () => {}, unregister: () => {} }
|
|
1803
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jschainconfig_free(ptr >>> 0, 1));
|
|
1804
|
+
const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1805
|
+
? { register: () => {}, unregister: () => {} }
|
|
1806
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
|
|
1807
|
+
const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1808
|
+
? { register: () => {}, unregister: () => {} }
|
|
1809
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
|
|
1810
|
+
const MultiChainAccountFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1811
|
+
? { register: () => {}, unregister: () => {} }
|
|
1812
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccount_free(ptr >>> 0, 1));
|
|
1813
|
+
const MultiChainAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1814
|
+
? { register: () => {}, unregister: () => {} }
|
|
1815
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multichainaccountmeta_free(ptr >>> 0, 1));
|
|
2034
1816
|
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
1817
|
+
function addHeapObject(obj) {
|
|
1818
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
1819
|
+
const idx = heap_next;
|
|
1820
|
+
heap_next = heap[idx];
|
|
2039
1821
|
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
}
|
|
1822
|
+
heap[idx] = obj;
|
|
1823
|
+
return idx;
|
|
1824
|
+
}
|
|
2043
1825
|
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
};
|
|
1826
|
+
function _assertClass(instance, klass) {
|
|
1827
|
+
if (!(instance instanceof klass)) {
|
|
1828
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
2047
1831
|
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
1832
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1833
|
+
? { register: () => {}, unregister: () => {} }
|
|
1834
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
2051
1835
|
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
1836
|
+
function debugString(val) {
|
|
1837
|
+
// primitive types
|
|
1838
|
+
const type = typeof val;
|
|
1839
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1840
|
+
return `${val}`;
|
|
1841
|
+
}
|
|
1842
|
+
if (type == 'string') {
|
|
1843
|
+
return `"${val}"`;
|
|
1844
|
+
}
|
|
1845
|
+
if (type == 'symbol') {
|
|
1846
|
+
const description = val.description;
|
|
1847
|
+
if (description == null) {
|
|
1848
|
+
return 'Symbol';
|
|
1849
|
+
} else {
|
|
1850
|
+
return `Symbol(${description})`;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
if (type == 'function') {
|
|
1854
|
+
const name = val.name;
|
|
1855
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1856
|
+
return `Function(${name})`;
|
|
1857
|
+
} else {
|
|
1858
|
+
return 'Function';
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
// objects
|
|
1862
|
+
if (Array.isArray(val)) {
|
|
1863
|
+
const length = val.length;
|
|
1864
|
+
let debug = '[';
|
|
1865
|
+
if (length > 0) {
|
|
1866
|
+
debug += debugString(val[0]);
|
|
1867
|
+
}
|
|
1868
|
+
for(let i = 1; i < length; i++) {
|
|
1869
|
+
debug += ', ' + debugString(val[i]);
|
|
1870
|
+
}
|
|
1871
|
+
debug += ']';
|
|
1872
|
+
return debug;
|
|
1873
|
+
}
|
|
1874
|
+
// Test for built-in
|
|
1875
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1876
|
+
let className;
|
|
1877
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1878
|
+
className = builtInMatches[1];
|
|
1879
|
+
} else {
|
|
1880
|
+
// Failed to match the standard '[object ClassName]'
|
|
1881
|
+
return toString.call(val);
|
|
1882
|
+
}
|
|
1883
|
+
if (className == 'Object') {
|
|
1884
|
+
// we're a user defined class or Object
|
|
1885
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1886
|
+
// easier than looping through ownProperties of `val`.
|
|
1887
|
+
try {
|
|
1888
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
1889
|
+
} catch (_) {
|
|
1890
|
+
return 'Object';
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
// errors
|
|
1894
|
+
if (val instanceof Error) {
|
|
1895
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1896
|
+
}
|
|
1897
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1898
|
+
return className;
|
|
1899
|
+
}
|
|
2055
1900
|
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
1901
|
+
function dropObject(idx) {
|
|
1902
|
+
if (idx < 132) return;
|
|
1903
|
+
heap[idx] = heap_next;
|
|
1904
|
+
heap_next = idx;
|
|
1905
|
+
}
|
|
2060
1906
|
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
1907
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1908
|
+
ptr = ptr >>> 0;
|
|
1909
|
+
const mem = getDataViewMemory0();
|
|
1910
|
+
const result = [];
|
|
1911
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1912
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
1913
|
+
}
|
|
1914
|
+
return result;
|
|
1915
|
+
}
|
|
2064
1916
|
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
1917
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1918
|
+
ptr = ptr >>> 0;
|
|
1919
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1920
|
+
}
|
|
2068
1921
|
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
1922
|
+
let cachedDataViewMemory0 = null;
|
|
1923
|
+
function getDataViewMemory0() {
|
|
1924
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1925
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1926
|
+
}
|
|
1927
|
+
return cachedDataViewMemory0;
|
|
1928
|
+
}
|
|
2072
1929
|
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
1930
|
+
function getStringFromWasm0(ptr, len) {
|
|
1931
|
+
ptr = ptr >>> 0;
|
|
1932
|
+
return decodeText(ptr, len);
|
|
1933
|
+
}
|
|
2076
1934
|
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
let deferred1_1;
|
|
2082
|
-
try {
|
|
2083
|
-
deferred0_0 = arg0;
|
|
2084
|
-
deferred0_1 = arg1;
|
|
2085
|
-
deferred1_0 = arg2;
|
|
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);
|
|
1935
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1936
|
+
function getUint8ArrayMemory0() {
|
|
1937
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1938
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
2092
1939
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
export function __wbg_signal_3c14fbdc89694b39(arg0) {
|
|
2096
|
-
const ret = getObject(arg0).signal;
|
|
2097
|
-
return addHeapObject(ret);
|
|
2098
|
-
};
|
|
1940
|
+
return cachedUint8ArrayMemory0;
|
|
1941
|
+
}
|
|
2099
1942
|
|
|
2100
|
-
|
|
2101
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
2102
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2103
|
-
};
|
|
1943
|
+
function getObject(idx) { return heap[idx]; }
|
|
2104
1944
|
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
}
|
|
1945
|
+
function handleError(f, args) {
|
|
1946
|
+
try {
|
|
1947
|
+
return f.apply(this, args);
|
|
1948
|
+
} catch (e) {
|
|
1949
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
2109
1952
|
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2113
|
-
};
|
|
1953
|
+
let heap = new Array(128).fill(undefined);
|
|
1954
|
+
heap.push(undefined, null, true, false);
|
|
2114
1955
|
|
|
2115
|
-
|
|
2116
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
2117
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
2118
|
-
};
|
|
1956
|
+
let heap_next = heap.length;
|
|
2119
1957
|
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
};
|
|
1958
|
+
function isLikeNone(x) {
|
|
1959
|
+
return x === undefined || x === null;
|
|
1960
|
+
}
|
|
2124
1961
|
|
|
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
|
-
};
|
|
1962
|
+
function makeClosure(arg0, arg1, dtor, f) {
|
|
1963
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
1964
|
+
const real = (...args) => {
|
|
2132
1965
|
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
1966
|
+
// First up with a closure we increment the internal reference
|
|
1967
|
+
// count. This ensures that the Rust closure environment won't
|
|
1968
|
+
// be deallocated while we're invoking it.
|
|
1969
|
+
state.cnt++;
|
|
1970
|
+
try {
|
|
1971
|
+
return f(state.a, state.b, ...args);
|
|
1972
|
+
} finally {
|
|
1973
|
+
real._wbg_cb_unref();
|
|
1974
|
+
}
|
|
1975
|
+
};
|
|
1976
|
+
real._wbg_cb_unref = () => {
|
|
1977
|
+
if (--state.cnt === 0) {
|
|
1978
|
+
state.dtor(state.a, state.b);
|
|
1979
|
+
state.a = 0;
|
|
1980
|
+
CLOSURE_DTORS.unregister(state);
|
|
1981
|
+
}
|
|
1982
|
+
};
|
|
1983
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1984
|
+
return real;
|
|
1985
|
+
}
|
|
2137
1986
|
|
|
2138
|
-
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2141
|
-
};
|
|
1987
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
1988
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
1989
|
+
const real = (...args) => {
|
|
2142
1990
|
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
1991
|
+
// First up with a closure we increment the internal reference
|
|
1992
|
+
// count. This ensures that the Rust closure environment won't
|
|
1993
|
+
// be deallocated while we're invoking it.
|
|
1994
|
+
state.cnt++;
|
|
1995
|
+
const a = state.a;
|
|
1996
|
+
state.a = 0;
|
|
1997
|
+
try {
|
|
1998
|
+
return f(a, state.b, ...args);
|
|
1999
|
+
} finally {
|
|
2000
|
+
state.a = a;
|
|
2001
|
+
real._wbg_cb_unref();
|
|
2002
|
+
}
|
|
2003
|
+
};
|
|
2004
|
+
real._wbg_cb_unref = () => {
|
|
2005
|
+
if (--state.cnt === 0) {
|
|
2006
|
+
state.dtor(state.a, state.b);
|
|
2007
|
+
state.a = 0;
|
|
2008
|
+
CLOSURE_DTORS.unregister(state);
|
|
2009
|
+
}
|
|
2010
|
+
};
|
|
2011
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2012
|
+
return real;
|
|
2013
|
+
}
|
|
2147
2014
|
|
|
2148
|
-
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2151
|
-
|
|
2015
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
2016
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
2017
|
+
const mem = getDataViewMemory0();
|
|
2018
|
+
for (let i = 0; i < array.length; i++) {
|
|
2019
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
2020
|
+
}
|
|
2021
|
+
WASM_VECTOR_LEN = array.length;
|
|
2022
|
+
return ptr;
|
|
2023
|
+
}
|
|
2152
2024
|
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2025
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2026
|
+
if (realloc === undefined) {
|
|
2027
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2028
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
2029
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
2030
|
+
WASM_VECTOR_LEN = buf.length;
|
|
2031
|
+
return ptr;
|
|
2032
|
+
}
|
|
2157
2033
|
|
|
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
|
-
};
|
|
2034
|
+
let len = arg.length;
|
|
2035
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2165
2036
|
|
|
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) };
|
|
2037
|
+
const mem = getUint8ArrayMemory0();
|
|
2173
2038
|
|
|
2174
|
-
|
|
2175
|
-
const ret = getObject(arg0).value;
|
|
2176
|
-
return addHeapObject(ret);
|
|
2177
|
-
};
|
|
2039
|
+
let offset = 0;
|
|
2178
2040
|
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2041
|
+
for (; offset < len; offset++) {
|
|
2042
|
+
const code = arg.charCodeAt(offset);
|
|
2043
|
+
if (code > 0x7F) break;
|
|
2044
|
+
mem[ptr + offset] = code;
|
|
2045
|
+
}
|
|
2046
|
+
if (offset !== len) {
|
|
2047
|
+
if (offset !== 0) {
|
|
2048
|
+
arg = arg.slice(offset);
|
|
2049
|
+
}
|
|
2050
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2051
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2052
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
2183
2053
|
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
return addHeapObject(ret);
|
|
2188
|
-
};
|
|
2054
|
+
offset += ret.written;
|
|
2055
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
2056
|
+
}
|
|
2189
2057
|
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
return addHeapObject(ret);
|
|
2194
|
-
};
|
|
2058
|
+
WASM_VECTOR_LEN = offset;
|
|
2059
|
+
return ptr;
|
|
2060
|
+
}
|
|
2195
2061
|
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
return
|
|
2200
|
-
}
|
|
2062
|
+
function takeObject(idx) {
|
|
2063
|
+
const ret = getObject(idx);
|
|
2064
|
+
dropObject(idx);
|
|
2065
|
+
return ret;
|
|
2066
|
+
}
|
|
2201
2067
|
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2068
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2069
|
+
cachedTextDecoder.decode();
|
|
2070
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2071
|
+
let numBytesDecoded = 0;
|
|
2072
|
+
function decodeText(ptr, len) {
|
|
2073
|
+
numBytesDecoded += len;
|
|
2074
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2075
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2076
|
+
cachedTextDecoder.decode();
|
|
2077
|
+
numBytesDecoded = len;
|
|
2078
|
+
}
|
|
2079
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2080
|
+
}
|
|
2207
2081
|
|
|
2208
|
-
|
|
2209
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 999, function: Function { arguments: [Externref], shim_idx: 1000, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2210
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8759, __wasm_bindgen_func_elem_8774);
|
|
2211
|
-
return addHeapObject(ret);
|
|
2212
|
-
};
|
|
2082
|
+
const cachedTextEncoder = new TextEncoder();
|
|
2213
2083
|
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2084
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
2085
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
2086
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2087
|
+
view.set(buf);
|
|
2088
|
+
return {
|
|
2089
|
+
read: arg.length,
|
|
2090
|
+
written: buf.length
|
|
2091
|
+
};
|
|
2092
|
+
};
|
|
2093
|
+
}
|
|
2219
2094
|
|
|
2220
|
-
|
|
2221
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
2222
|
-
const ret = arg0;
|
|
2223
|
-
return addHeapObject(ret);
|
|
2224
|
-
};
|
|
2095
|
+
let WASM_VECTOR_LEN = 0;
|
|
2225
2096
|
|
|
2226
|
-
export function __wbindgen_object_clone_ref(arg0) {
|
|
2227
|
-
const ret = getObject(arg0);
|
|
2228
|
-
return addHeapObject(ret);
|
|
2229
|
-
};
|
|
2230
2097
|
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2098
|
+
let wasm;
|
|
2099
|
+
export function __wbg_set_wasm(val) {
|
|
2100
|
+
wasm = val;
|
|
2101
|
+
}
|