@cartridge/controller 0.7.9-alpha.1 → 0.7.9-alpha.2
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/.turbo/turbo-build$colon$deps.log +16 -16
- package/.turbo/turbo-build.log +16 -16
- package/.turbo/turbo-format.log +39 -0
- package/dist/index.js +235 -200
- package/dist/index.js.map +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +2 -0
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/{provider-qJi60GEX.js → provider-CGv2ANQX.js} +2 -2
- package/dist/{provider-qJi60GEX.js.map → provider-CGv2ANQX.js.map} +1 -1
- package/dist/session.js +2 -2
- package/dist/stats.html +1 -1
- package/dist/wallets/argent/index.d.ts +1 -0
- package/dist/wallets/bridge.d.ts +2 -0
- package/dist/wallets/metamask/index.d.ts +1 -0
- package/dist/wallets/phantom/index.d.ts +2 -1
- package/dist/wallets/types.d.ts +1 -0
- package/package.json +4 -5
- package/src/wallets/argent/index.ts +8 -2
- package/src/wallets/bridge.ts +19 -5
- package/src/wallets/metamask/index.ts +8 -0
- package/src/wallets/phantom/index.ts +66 -15
- package/src/wallets/types.ts +1 -0
- package/vite.config.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { WalletAccount as O, shortString as M, num as Y } from "starknet";
|
|
2
|
-
import { R as A, t as $, K as W, P as H, B as j, N as g, p as K, A as q } from "./provider-
|
|
3
|
-
import { h as
|
|
2
|
+
import { R as A, t as $, K as W, P as H, B as j, N as g, p as K, A as q } from "./provider-CGv2ANQX.js";
|
|
3
|
+
import { h as Ye, n as $e, a as We, b as He } from "./provider-CGv2ANQX.js";
|
|
4
4
|
import { MetaMaskSDK as G } from "@metamask/sdk";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Transaction as V } from "@solana/web3.js";
|
|
6
|
+
import { connect as J } from "starknetkit";
|
|
7
|
+
import { InjectedConnector as X } from "starknetkit/injected";
|
|
7
8
|
class N extends O {
|
|
8
9
|
address;
|
|
9
10
|
keychain;
|
|
10
11
|
modal;
|
|
11
12
|
options;
|
|
12
|
-
constructor(e, t,
|
|
13
|
-
super({ nodeUrl: t }, e), this.address =
|
|
13
|
+
constructor(e, t, r, n, o, c) {
|
|
14
|
+
super({ nodeUrl: t }, e), this.address = r, this.keychain = n, this.options = o, this.modal = c;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Invoke execute function in account contract
|
|
@@ -25,7 +26,7 @@ class N extends O {
|
|
|
25
26
|
* @returns response from addTransaction
|
|
26
27
|
*/
|
|
27
28
|
async execute(e) {
|
|
28
|
-
return e = $(e), new Promise(async (t,
|
|
29
|
+
return e = $(e), new Promise(async (t, r) => {
|
|
29
30
|
const n = await this.keychain.execute(
|
|
30
31
|
e,
|
|
31
32
|
void 0,
|
|
@@ -37,7 +38,7 @@ class N extends O {
|
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
40
|
if (this.options?.propagateSessionErrors && n.code !== A.USER_INTERACTION_REQUIRED) {
|
|
40
|
-
|
|
41
|
+
r(n.error);
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
this.modal.open();
|
|
@@ -52,7 +53,7 @@ class N extends O {
|
|
|
52
53
|
t(o), this.modal.close();
|
|
53
54
|
return;
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
+
r(o.error);
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
/**
|
|
@@ -64,7 +65,7 @@ class N extends O {
|
|
|
64
65
|
* @throws {Error} if the JSON object is not a valid JSON
|
|
65
66
|
*/
|
|
66
67
|
async signMessage(e) {
|
|
67
|
-
return new Promise(async (t,
|
|
68
|
+
return new Promise(async (t, r) => {
|
|
68
69
|
const n = await this.keychain.signMessage(e, "", !0);
|
|
69
70
|
if (!("code" in n)) {
|
|
70
71
|
t(n);
|
|
@@ -72,78 +73,78 @@ class N extends O {
|
|
|
72
73
|
}
|
|
73
74
|
this.modal.open();
|
|
74
75
|
const o = await this.keychain.signMessage(e, "", !1);
|
|
75
|
-
"code" in o ?
|
|
76
|
+
"code" in o ? r(o.error) : t(o), this.modal.close();
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
var y;
|
|
80
|
-
(function(
|
|
81
|
-
|
|
81
|
+
(function(a) {
|
|
82
|
+
a.Call = "call", a.Reply = "reply", a.Syn = "syn", a.SynAck = "synAck", a.Ack = "ack";
|
|
82
83
|
})(y || (y = {}));
|
|
83
84
|
var x;
|
|
84
|
-
(function(
|
|
85
|
-
|
|
85
|
+
(function(a) {
|
|
86
|
+
a.Fulfilled = "fulfilled", a.Rejected = "rejected";
|
|
86
87
|
})(x || (x = {}));
|
|
87
|
-
var
|
|
88
|
-
(function(
|
|
89
|
-
|
|
90
|
-
})(
|
|
91
|
-
var
|
|
92
|
-
(function(
|
|
93
|
-
|
|
94
|
-
})(
|
|
88
|
+
var E;
|
|
89
|
+
(function(a) {
|
|
90
|
+
a.ConnectionDestroyed = "ConnectionDestroyed", a.ConnectionTimeout = "ConnectionTimeout", a.NoIframeSrc = "NoIframeSrc";
|
|
91
|
+
})(E || (E = {}));
|
|
92
|
+
var D;
|
|
93
|
+
(function(a) {
|
|
94
|
+
a.DataCloneError = "DataCloneError";
|
|
95
|
+
})(D || (D = {}));
|
|
95
96
|
var v;
|
|
96
|
-
(function(
|
|
97
|
-
|
|
97
|
+
(function(a) {
|
|
98
|
+
a.Message = "message";
|
|
98
99
|
})(v || (v = {}));
|
|
99
|
-
const
|
|
100
|
+
const Z = (a, e) => {
|
|
100
101
|
const t = [];
|
|
101
|
-
let
|
|
102
|
+
let r = !1;
|
|
102
103
|
return {
|
|
103
104
|
destroy(n) {
|
|
104
|
-
|
|
105
|
+
r || (r = !0, e(`${a}: Destroying connection`), t.forEach((o) => {
|
|
105
106
|
o(n);
|
|
106
107
|
}));
|
|
107
108
|
},
|
|
108
109
|
onDestroy(n) {
|
|
109
|
-
|
|
110
|
+
r ? n() : t.push(n);
|
|
110
111
|
}
|
|
111
112
|
};
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
},
|
|
113
|
+
}, ee = (a) => (...e) => {
|
|
114
|
+
a && console.log("[Penpal]", ...e);
|
|
115
|
+
}, te = {
|
|
115
116
|
"http:": "80",
|
|
116
117
|
"https:": "443"
|
|
117
|
-
},
|
|
118
|
-
if (
|
|
118
|
+
}, re = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, ae = ["file:", "data:"], ne = (a) => {
|
|
119
|
+
if (a && ae.find((s) => a.startsWith(s)))
|
|
119
120
|
return "null";
|
|
120
|
-
const e = document.location, t =
|
|
121
|
-
let
|
|
122
|
-
t ? (
|
|
123
|
-
const c = o && o !==
|
|
124
|
-
return `${
|
|
125
|
-
}, B = ({ name:
|
|
126
|
-
name:
|
|
121
|
+
const e = document.location, t = re.exec(a);
|
|
122
|
+
let r, n, o;
|
|
123
|
+
t ? (r = t[1] ? t[1] : e.protocol, n = t[2], o = t[4]) : (r = e.protocol, n = e.hostname, o = e.port);
|
|
124
|
+
const c = o && o !== te[r] ? `:${o}` : "";
|
|
125
|
+
return `${r}//${n}${c}`;
|
|
126
|
+
}, B = ({ name: a, message: e, stack: t }) => ({
|
|
127
|
+
name: a,
|
|
127
128
|
message: e,
|
|
128
129
|
stack: t
|
|
129
|
-
}),
|
|
130
|
+
}), oe = (a) => {
|
|
130
131
|
const e = new Error();
|
|
131
|
-
return Object.keys(
|
|
132
|
-
},
|
|
133
|
-
const { localName:
|
|
132
|
+
return Object.keys(a).forEach((t) => e[t] = a[t]), e;
|
|
133
|
+
}, se = (a, e, t) => {
|
|
134
|
+
const { localName: r, local: n, remote: o, originForSending: c, originForReceiving: s } = a;
|
|
134
135
|
let i = !1;
|
|
135
136
|
const p = (d) => {
|
|
136
137
|
if (d.source !== o || d.data.penpal !== y.Call)
|
|
137
138
|
return;
|
|
138
139
|
if (s !== "*" && d.origin !== s) {
|
|
139
|
-
t(`${
|
|
140
|
+
t(`${r} received message from origin ${d.origin} which did not match expected origin ${s}`);
|
|
140
141
|
return;
|
|
141
142
|
}
|
|
142
143
|
const l = d.data, { methodName: f, args: h, id: _ } = l;
|
|
143
|
-
t(`${
|
|
144
|
+
t(`${r}: Received ${f}() call`);
|
|
144
145
|
const w = (u) => (k) => {
|
|
145
|
-
if (t(`${
|
|
146
|
-
t(`${
|
|
146
|
+
if (t(`${r}: Sending ${f}() reply`), i) {
|
|
147
|
+
t(`${r}: Unable to send ${f}() reply due to destroyed connection`);
|
|
147
148
|
return;
|
|
148
149
|
}
|
|
149
150
|
const b = {
|
|
@@ -156,7 +157,7 @@ const X = (r, e) => {
|
|
|
156
157
|
try {
|
|
157
158
|
o.postMessage(b, c);
|
|
158
159
|
} catch (m) {
|
|
159
|
-
if (m.name ===
|
|
160
|
+
if (m.name === D.DataCloneError) {
|
|
160
161
|
const C = {
|
|
161
162
|
penpal: y.Reply,
|
|
162
163
|
id: _,
|
|
@@ -175,25 +176,25 @@ const X = (r, e) => {
|
|
|
175
176
|
i = !0, n.removeEventListener(v.Message, p);
|
|
176
177
|
};
|
|
177
178
|
};
|
|
178
|
-
let
|
|
179
|
-
const
|
|
180
|
-
const t =
|
|
181
|
-
return t.push(
|
|
182
|
-
},
|
|
183
|
-
const
|
|
184
|
-
return
|
|
185
|
-
}, z = (
|
|
179
|
+
let ie = 0;
|
|
180
|
+
const ce = () => ++ie, T = ".", Q = (a) => a ? a.split(T) : [], de = (a) => a.join(T), le = (a, e) => {
|
|
181
|
+
const t = Q(e || "");
|
|
182
|
+
return t.push(a), de(t);
|
|
183
|
+
}, pe = (a, e, t) => {
|
|
184
|
+
const r = Q(e);
|
|
185
|
+
return r.reduce((n, o, c) => (typeof n[o] > "u" && (n[o] = {}), c === r.length - 1 && (n[o] = t), n[o]), a), a;
|
|
186
|
+
}, z = (a, e) => {
|
|
186
187
|
const t = {};
|
|
187
|
-
return Object.keys(
|
|
188
|
-
const n = r
|
|
188
|
+
return Object.keys(a).forEach((r) => {
|
|
189
|
+
const n = a[r], o = le(r, e);
|
|
189
190
|
typeof n == "object" && Object.assign(t, z(n, o)), typeof n == "function" && (t[o] = n);
|
|
190
191
|
}), t;
|
|
191
|
-
},
|
|
192
|
+
}, me = (a) => {
|
|
192
193
|
const e = {};
|
|
193
|
-
for (const t in
|
|
194
|
-
|
|
194
|
+
for (const t in a)
|
|
195
|
+
pe(e, t, a[t]);
|
|
195
196
|
return e;
|
|
196
|
-
},
|
|
197
|
+
}, he = (a, e, t, r, n) => {
|
|
197
198
|
const { localName: o, local: c, remote: s, originForSending: i, originForReceiving: p } = e;
|
|
198
199
|
let d = !1;
|
|
199
200
|
n(`${o}: Connecting call sender`);
|
|
@@ -205,22 +206,22 @@ const ie = () => ++se, Q = ".", T = (r) => r ? r.split(Q) : [], ce = (r) => r.jo
|
|
|
205
206
|
} catch {
|
|
206
207
|
w = !0;
|
|
207
208
|
}
|
|
208
|
-
if (w &&
|
|
209
|
+
if (w && r(), d) {
|
|
209
210
|
const u = new Error(`Unable to send ${h}() call due to destroyed connection`);
|
|
210
|
-
throw u.code =
|
|
211
|
+
throw u.code = E.ConnectionDestroyed, u;
|
|
211
212
|
}
|
|
212
213
|
return new Promise((u, k) => {
|
|
213
|
-
const b =
|
|
214
|
+
const b = ce(), m = (I) => {
|
|
214
215
|
if (I.source !== s || I.data.penpal !== y.Reply || I.data.id !== b)
|
|
215
216
|
return;
|
|
216
217
|
if (p !== "*" && I.origin !== p) {
|
|
217
218
|
n(`${o} received message from origin ${I.origin} which did not match expected origin ${p}`);
|
|
218
219
|
return;
|
|
219
220
|
}
|
|
220
|
-
const
|
|
221
|
+
const S = I.data;
|
|
221
222
|
n(`${o}: Received ${h}() reply`), c.removeEventListener(v.Message, m);
|
|
222
|
-
let
|
|
223
|
-
|
|
223
|
+
let P = S.returnValue;
|
|
224
|
+
S.returnValueIsError && (P = oe(P)), (S.resolution === x.Fulfilled ? u : k)(P);
|
|
224
225
|
};
|
|
225
226
|
c.addEventListener(v.Message, m);
|
|
226
227
|
const C = {
|
|
@@ -232,11 +233,11 @@ const ie = () => ++se, Q = ".", T = (r) => r ? r.split(Q) : [], ce = (r) => r.jo
|
|
|
232
233
|
s.postMessage(C, i);
|
|
233
234
|
});
|
|
234
235
|
}, f = t.reduce((h, _) => (h[_] = l(_), h), {});
|
|
235
|
-
return Object.assign(
|
|
236
|
+
return Object.assign(a, me(f)), () => {
|
|
236
237
|
d = !0;
|
|
237
238
|
};
|
|
238
|
-
},
|
|
239
|
-
const { destroy: o, onDestroy: c } =
|
|
239
|
+
}, fe = (a, e, t, r, n) => {
|
|
240
|
+
const { destroy: o, onDestroy: c } = r;
|
|
240
241
|
let s, i;
|
|
241
242
|
const p = {};
|
|
242
243
|
return (d) => {
|
|
@@ -252,53 +253,53 @@ const ie = () => ++se, Q = ".", T = (r) => r ? r.split(Q) : [], ce = (r) => r.jo
|
|
|
252
253
|
originForSending: t,
|
|
253
254
|
originForReceiving: e
|
|
254
255
|
};
|
|
255
|
-
s && s(), s =
|
|
256
|
+
s && s(), s = se(l, a, n), c(s), i && i.forEach((h) => {
|
|
256
257
|
delete p[h];
|
|
257
258
|
}), i = d.data.methodNames;
|
|
258
|
-
const f =
|
|
259
|
+
const f = he(p, l, i, o, n);
|
|
259
260
|
return c(f), p;
|
|
260
261
|
};
|
|
261
|
-
},
|
|
262
|
+
}, ue = (a, e, t, r) => (n) => {
|
|
262
263
|
if (!n.source)
|
|
263
264
|
return;
|
|
264
265
|
if (t !== "*" && n.origin !== t) {
|
|
265
|
-
|
|
266
|
+
a(`Parent: Handshake - Received SYN message from origin ${n.origin} which did not match expected origin ${t}`);
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
268
|
-
|
|
269
|
+
a("Parent: Handshake - Received SYN, responding with SYN-ACK");
|
|
269
270
|
const o = {
|
|
270
271
|
penpal: y.SynAck,
|
|
271
272
|
methodNames: Object.keys(e)
|
|
272
273
|
};
|
|
273
|
-
n.source.postMessage(o,
|
|
274
|
-
},
|
|
275
|
-
const { destroy: t, onDestroy:
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
|
|
274
|
+
n.source.postMessage(o, r);
|
|
275
|
+
}, ge = 6e4, ye = (a, e) => {
|
|
276
|
+
const { destroy: t, onDestroy: r } = e, n = setInterval(() => {
|
|
277
|
+
a.isConnected || (clearInterval(n), t());
|
|
278
|
+
}, ge);
|
|
279
|
+
r(() => {
|
|
279
280
|
clearInterval(n);
|
|
280
281
|
});
|
|
281
|
-
},
|
|
282
|
+
}, be = (a, e) => {
|
|
282
283
|
let t;
|
|
283
|
-
return
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
},
|
|
284
|
+
return a !== void 0 && (t = window.setTimeout(() => {
|
|
285
|
+
const r = new Error(`Connection timed out after ${a}ms`);
|
|
286
|
+
r.code = E.ConnectionTimeout, e(r);
|
|
287
|
+
}, a)), () => {
|
|
287
288
|
clearTimeout(t);
|
|
288
289
|
};
|
|
289
|
-
},
|
|
290
|
-
if (!
|
|
290
|
+
}, _e = (a) => {
|
|
291
|
+
if (!a.src && !a.srcdoc) {
|
|
291
292
|
const e = new Error("Iframe must have src or srcdoc property defined.");
|
|
292
|
-
throw e.code =
|
|
293
|
+
throw e.code = E.NoIframeSrc, e;
|
|
293
294
|
}
|
|
294
|
-
},
|
|
295
|
-
let { iframe: e, methods: t = {}, childOrigin:
|
|
296
|
-
const c =
|
|
297
|
-
|
|
298
|
-
const d =
|
|
295
|
+
}, we = (a) => {
|
|
296
|
+
let { iframe: e, methods: t = {}, childOrigin: r, timeout: n, debug: o = !1 } = a;
|
|
297
|
+
const c = ee(o), s = Z("Parent", c), { onDestroy: i, destroy: p } = s;
|
|
298
|
+
r || (_e(e), r = ne(e.src));
|
|
299
|
+
const d = r === "null" ? "*" : r, l = z(t), f = ue(c, l, r, d), h = fe(l, r, d, s, c);
|
|
299
300
|
return {
|
|
300
301
|
promise: new Promise((w, u) => {
|
|
301
|
-
const k =
|
|
302
|
+
const k = be(n, p), b = (m) => {
|
|
302
303
|
if (!(m.source !== e.contentWindow || !m.data)) {
|
|
303
304
|
if (m.data.penpal === y.Syn) {
|
|
304
305
|
f(m);
|
|
@@ -311,7 +312,7 @@ const ie = () => ++se, Q = ".", T = (r) => r ? r.split(Q) : [], ce = (r) => r.jo
|
|
|
311
312
|
}
|
|
312
313
|
}
|
|
313
314
|
};
|
|
314
|
-
window.addEventListener(v.Message, b), c("Parent: Awaiting handshake"),
|
|
315
|
+
window.addEventListener(v.Message, b), c("Parent: Awaiting handshake"), ye(e, s), i((m) => {
|
|
315
316
|
window.removeEventListener(v.Message, b), m && u(m);
|
|
316
317
|
});
|
|
317
318
|
}),
|
|
@@ -328,18 +329,18 @@ class F {
|
|
|
328
329
|
constructor({
|
|
329
330
|
id: e,
|
|
330
331
|
url: t,
|
|
331
|
-
preset:
|
|
332
|
+
preset: r,
|
|
332
333
|
onClose: n,
|
|
333
334
|
onConnect: o,
|
|
334
335
|
methods: c = {}
|
|
335
336
|
}) {
|
|
336
337
|
if (typeof document > "u")
|
|
337
338
|
return;
|
|
338
|
-
|
|
339
|
+
r && t.searchParams.set("preset", r), this.url = t;
|
|
339
340
|
const s = document.createElement("iframe");
|
|
340
341
|
s.src = t.toString(), s.id = e, s.style.border = "none", s.sandbox.add("allow-forms"), s.sandbox.add("allow-popups"), s.sandbox.add("allow-scripts"), s.sandbox.add("allow-same-origin"), s.allow = "publickey-credentials-create *; publickey-credentials-get *; clipboard-write", document.hasStorageAccess && s.sandbox.add("allow-storage-access-by-user-activation");
|
|
341
342
|
const i = document.createElement("div");
|
|
342
|
-
i.id = "controller", i.style.position = "fixed", i.style.height = "100%", i.style.width = "100%", i.style.top = "0", i.style.left = "0", i.style.zIndex = "10000", i.style.backgroundColor = "rgba(0,0,0,0.6)", i.style.display = "flex", i.style.alignItems = "center", i.style.justifyContent = "center", i.style.visibility = "hidden", i.style.opacity = "0", i.style.transition = "opacity 0.2s ease", i.appendChild(s), this.iframe = s, this.container = i,
|
|
343
|
+
i.id = "controller", i.style.position = "fixed", i.style.height = "100%", i.style.width = "100%", i.style.top = "0", i.style.left = "0", i.style.zIndex = "10000", i.style.backgroundColor = "rgba(0,0,0,0.6)", i.style.display = "flex", i.style.alignItems = "center", i.style.justifyContent = "center", i.style.visibility = "hidden", i.style.opacity = "0", i.style.transition = "opacity 0.2s ease", i.appendChild(s), this.iframe = s, this.container = i, we({
|
|
343
344
|
iframe: this.iframe,
|
|
344
345
|
methods: { close: (l) => () => this.close(), ...c }
|
|
345
346
|
}).promise.then(o), this.resize(), window.addEventListener("resize", () => this.resize());
|
|
@@ -376,7 +377,7 @@ class F {
|
|
|
376
377
|
}
|
|
377
378
|
}
|
|
378
379
|
}
|
|
379
|
-
class
|
|
380
|
+
class ve {
|
|
380
381
|
type = "metamask";
|
|
381
382
|
platform = "ethereum";
|
|
382
383
|
MMSDK;
|
|
@@ -428,11 +429,11 @@ class we {
|
|
|
428
429
|
const t = this.MMSDK.getProvider();
|
|
429
430
|
if (!t)
|
|
430
431
|
throw new Error("MetaMask is not connected");
|
|
431
|
-
const
|
|
432
|
+
const r = await t.request({
|
|
432
433
|
method: "eth_sendTransaction",
|
|
433
434
|
params: [e]
|
|
434
435
|
});
|
|
435
|
-
return { success: !0, wallet: this.type, result:
|
|
436
|
+
return { success: !0, wallet: this.type, result: r };
|
|
436
437
|
} catch (t) {
|
|
437
438
|
return console.error("Error signing transaction with MetaMask:", t), {
|
|
438
439
|
success: !1,
|
|
@@ -464,11 +465,11 @@ class we {
|
|
|
464
465
|
const t = this.MMSDK.getProvider();
|
|
465
466
|
if (!t)
|
|
466
467
|
throw new Error("MetaMask is not connected");
|
|
467
|
-
const
|
|
468
|
+
const r = await t.request({
|
|
468
469
|
method: "eth_signTypedData_v4",
|
|
469
470
|
params: [this.account, JSON.stringify(e)]
|
|
470
471
|
});
|
|
471
|
-
return { success: !0, wallet: this.type, result:
|
|
472
|
+
return { success: !0, wallet: this.type, result: r };
|
|
472
473
|
} catch (t) {
|
|
473
474
|
return console.error("Error signing typed data with MetaMask:", t), {
|
|
474
475
|
success: !1,
|
|
@@ -477,6 +478,13 @@ class we {
|
|
|
477
478
|
};
|
|
478
479
|
}
|
|
479
480
|
}
|
|
481
|
+
async sendTransaction(e) {
|
|
482
|
+
return {
|
|
483
|
+
success: !1,
|
|
484
|
+
wallet: this.type,
|
|
485
|
+
error: "Not implemented"
|
|
486
|
+
};
|
|
487
|
+
}
|
|
480
488
|
async switchChain(e) {
|
|
481
489
|
try {
|
|
482
490
|
if (!this.isAvailable())
|
|
@@ -489,8 +497,8 @@ class we {
|
|
|
489
497
|
method: "wallet_switchEthereumChain",
|
|
490
498
|
params: [{ chainId: e }]
|
|
491
499
|
}), !0;
|
|
492
|
-
} catch (
|
|
493
|
-
throw
|
|
500
|
+
} catch (r) {
|
|
501
|
+
throw r.code === 4902 && console.warn("Chain not added to MetaMask"), r;
|
|
494
502
|
}
|
|
495
503
|
} catch (t) {
|
|
496
504
|
return console.error("Error switching chain for MetaMask:", t), !1;
|
|
@@ -510,11 +518,11 @@ class we {
|
|
|
510
518
|
const t = this.MMSDK.getProvider();
|
|
511
519
|
if (!t)
|
|
512
520
|
throw new Error("MetaMask is not connected");
|
|
513
|
-
const
|
|
521
|
+
const r = await t.request({
|
|
514
522
|
method: "eth_getBalance",
|
|
515
523
|
params: [this.account, "latest"]
|
|
516
524
|
});
|
|
517
|
-
return { success: !0, wallet: this.type, result:
|
|
525
|
+
return { success: !0, wallet: this.type, result: r };
|
|
518
526
|
}
|
|
519
527
|
} catch (t) {
|
|
520
528
|
return console.error("Error getting balance from MetaMask:", t), {
|
|
@@ -525,10 +533,18 @@ class we {
|
|
|
525
533
|
}
|
|
526
534
|
}
|
|
527
535
|
}
|
|
528
|
-
class
|
|
536
|
+
class ke {
|
|
529
537
|
type = "phantom";
|
|
530
538
|
platform = "solana";
|
|
531
539
|
account = void 0;
|
|
540
|
+
getProvider() {
|
|
541
|
+
if (typeof window > "u")
|
|
542
|
+
throw new Error("Not ready");
|
|
543
|
+
const e = window.solana;
|
|
544
|
+
if (!e?.isPhantom)
|
|
545
|
+
throw new Error("Phantom is not available");
|
|
546
|
+
return e;
|
|
547
|
+
}
|
|
532
548
|
isAvailable() {
|
|
533
549
|
return typeof window < "u" && !!window.solana?.isPhantom;
|
|
534
550
|
}
|
|
@@ -548,7 +564,7 @@ class ve {
|
|
|
548
564
|
try {
|
|
549
565
|
if (!this.isAvailable())
|
|
550
566
|
throw new Error("Phantom is not available");
|
|
551
|
-
const e = await
|
|
567
|
+
const e = await this.getProvider().connect();
|
|
552
568
|
if (e.publicKey)
|
|
553
569
|
return this.account = e.publicKey.toString(), { success: !0, wallet: this.type, account: this.account };
|
|
554
570
|
throw new Error("No accounts found");
|
|
@@ -560,28 +576,35 @@ class ve {
|
|
|
560
576
|
};
|
|
561
577
|
}
|
|
562
578
|
}
|
|
563
|
-
async
|
|
579
|
+
async signMessage(e) {
|
|
564
580
|
try {
|
|
565
581
|
if (!this.isAvailable() || !this.account)
|
|
566
582
|
throw new Error("Phantom is not connected");
|
|
567
|
-
const t = await
|
|
568
|
-
|
|
583
|
+
const t = new TextEncoder().encode(e), r = await this.getProvider().signMessage(
|
|
584
|
+
t,
|
|
585
|
+
"utf8"
|
|
586
|
+
);
|
|
587
|
+
return { success: !0, wallet: this.type, result: r };
|
|
569
588
|
} catch (t) {
|
|
570
|
-
return console.error("Error signing
|
|
589
|
+
return console.error("Error signing message with Phantom:", t), {
|
|
571
590
|
success: !1,
|
|
572
591
|
wallet: this.type,
|
|
573
592
|
error: t.message || "Unknown error"
|
|
574
593
|
};
|
|
575
594
|
}
|
|
576
595
|
}
|
|
577
|
-
async
|
|
596
|
+
async sendTransaction(e) {
|
|
597
|
+
if (!this.isAvailable() || !this.account)
|
|
598
|
+
throw new Error("Phantom is not connected");
|
|
578
599
|
try {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
600
|
+
const t = V.from(Buffer.from(e, "base64")), n = await this.getProvider().signAndSendTransaction(t);
|
|
601
|
+
return {
|
|
602
|
+
success: !0,
|
|
603
|
+
wallet: this.type,
|
|
604
|
+
result: n
|
|
605
|
+
};
|
|
583
606
|
} catch (t) {
|
|
584
|
-
return console.error("Error
|
|
607
|
+
return console.error("Error sending transaction with Phantom:", t), {
|
|
585
608
|
success: !1,
|
|
586
609
|
wallet: this.type,
|
|
587
610
|
error: t.message || "Unknown error"
|
|
@@ -609,7 +632,7 @@ class ve {
|
|
|
609
632
|
}
|
|
610
633
|
}
|
|
611
634
|
}
|
|
612
|
-
class
|
|
635
|
+
class Ae {
|
|
613
636
|
type = "argent";
|
|
614
637
|
platform = "starknet";
|
|
615
638
|
wallet = void 0;
|
|
@@ -634,8 +657,8 @@ class ke {
|
|
|
634
657
|
try {
|
|
635
658
|
if (!this.isAvailable())
|
|
636
659
|
throw new Error("Argent is not available");
|
|
637
|
-
const { wallet: e, connectorData: t } = await
|
|
638
|
-
connectors: [new
|
|
660
|
+
const { wallet: e, connectorData: t } = await J({
|
|
661
|
+
connectors: [new X({ options: { id: "argentX" } })]
|
|
639
662
|
});
|
|
640
663
|
if (!e)
|
|
641
664
|
throw new Error("No wallet found");
|
|
@@ -652,7 +675,6 @@ class ke {
|
|
|
652
675
|
try {
|
|
653
676
|
if (!this.isAvailable() || !this.wallet)
|
|
654
677
|
throw new Error("Argent is not connected");
|
|
655
|
-
console.log("signTypedData", e);
|
|
656
678
|
const t = await this.wallet.request({
|
|
657
679
|
type: "wallet_signTypedData",
|
|
658
680
|
params: e
|
|
@@ -666,6 +688,13 @@ class ke {
|
|
|
666
688
|
};
|
|
667
689
|
}
|
|
668
690
|
}
|
|
691
|
+
async sendTransaction(e) {
|
|
692
|
+
return {
|
|
693
|
+
success: !1,
|
|
694
|
+
wallet: this.type,
|
|
695
|
+
error: "Not implemented"
|
|
696
|
+
};
|
|
697
|
+
}
|
|
669
698
|
async switchChain(e) {
|
|
670
699
|
return console.warn(
|
|
671
700
|
"Chain switching for Argent may require custom implementation"
|
|
@@ -689,19 +718,20 @@ class ke {
|
|
|
689
718
|
}
|
|
690
719
|
}
|
|
691
720
|
}
|
|
692
|
-
class
|
|
721
|
+
class xe {
|
|
693
722
|
walletAdapters;
|
|
694
723
|
connectedWallets = /* @__PURE__ */ new Map();
|
|
695
724
|
constructor() {
|
|
696
|
-
this.walletAdapters = /* @__PURE__ */ new Map(), this.walletAdapters.set("metamask", new
|
|
725
|
+
this.walletAdapters = /* @__PURE__ */ new Map(), this.walletAdapters.set("metamask", new ve()), this.walletAdapters.set("phantom", new ke()), this.walletAdapters.set("argent", new Ae()), typeof window < "u" && (window.wallet_bridge = this);
|
|
697
726
|
}
|
|
698
727
|
getIFrameMethods() {
|
|
699
728
|
return {
|
|
700
729
|
externalDetectWallets: (e) => () => this.detectWallets(),
|
|
701
730
|
externalConnectWallet: (e) => (t) => this.connectWallet(t),
|
|
702
|
-
externalSignMessage: (e) => (t,
|
|
703
|
-
externalSignTypedData: (e) => (t,
|
|
704
|
-
|
|
731
|
+
externalSignMessage: (e) => (t, r) => this.signMessage(t, r),
|
|
732
|
+
externalSignTypedData: (e) => (t, r) => this.signTypedData(t, r),
|
|
733
|
+
externalSendTransaction: (e) => (t, r) => this.sendTransaction(t, r),
|
|
734
|
+
externalGetBalance: (e) => (t, r) => this.getBalance(t, r)
|
|
705
735
|
};
|
|
706
736
|
}
|
|
707
737
|
async detectWallets() {
|
|
@@ -715,18 +745,14 @@ class Ae {
|
|
|
715
745
|
throw new Error(`Unsupported wallet type: ${e}`);
|
|
716
746
|
return t;
|
|
717
747
|
}
|
|
718
|
-
handleError(e, t,
|
|
748
|
+
handleError(e, t, r) {
|
|
719
749
|
const n = t instanceof Error ? t.message : "Unknown error";
|
|
720
|
-
return console.error(`Error ${
|
|
750
|
+
return console.error(`Error ${r} with ${e} wallet:`, t), { success: !1, wallet: e, error: n };
|
|
721
751
|
}
|
|
722
752
|
async connectWallet(e) {
|
|
723
753
|
try {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
return { success: !0, wallet: e, account: n.type };
|
|
727
|
-
}
|
|
728
|
-
const t = this.getWalletAdapter(e), a = await t.connect();
|
|
729
|
-
return a.success && this.connectedWallets.set(e, t), a;
|
|
754
|
+
const t = this.getWalletAdapter(e), r = await t.connect();
|
|
755
|
+
return r.success && this.connectedWallets.set(e, t), r;
|
|
730
756
|
} catch (t) {
|
|
731
757
|
return this.handleError(e, t, "connecting to");
|
|
732
758
|
}
|
|
@@ -735,24 +761,33 @@ class Ae {
|
|
|
735
761
|
try {
|
|
736
762
|
if (!this.connectedWallets.has(e))
|
|
737
763
|
throw new Error(`Wallet ${e} is not connected`);
|
|
738
|
-
const
|
|
739
|
-
if (!
|
|
764
|
+
const r = this.connectedWallets.get(e);
|
|
765
|
+
if (!r.signMessage)
|
|
740
766
|
throw new Error(`Wallet ${e} does not support signing messages`);
|
|
741
|
-
return await
|
|
742
|
-
} catch (
|
|
743
|
-
return this.handleError(e,
|
|
767
|
+
return await r.signMessage(t);
|
|
768
|
+
} catch (r) {
|
|
769
|
+
return this.handleError(e, r, "signing message with");
|
|
744
770
|
}
|
|
745
771
|
}
|
|
746
772
|
async signTypedData(e, t) {
|
|
747
773
|
try {
|
|
748
774
|
if (!this.connectedWallets.has(e))
|
|
749
775
|
throw new Error(`Wallet ${e} is not connected`);
|
|
750
|
-
const
|
|
751
|
-
if (!
|
|
776
|
+
const r = this.connectedWallets.get(e);
|
|
777
|
+
if (!r.signTypedData)
|
|
752
778
|
throw new Error(`Wallet ${e} does not support signing typed data`);
|
|
753
|
-
return await
|
|
754
|
-
} catch (
|
|
755
|
-
return this.handleError(e,
|
|
779
|
+
return await r.signTypedData(t);
|
|
780
|
+
} catch (r) {
|
|
781
|
+
return this.handleError(e, r, "signing typed data with");
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
async sendTransaction(e, t) {
|
|
785
|
+
try {
|
|
786
|
+
if (!this.connectedWallets.has(e))
|
|
787
|
+
throw new Error(`Wallet ${e} is not connected`);
|
|
788
|
+
return await this.connectedWallets.get(e).sendTransaction(t);
|
|
789
|
+
} catch (r) {
|
|
790
|
+
return this.handleError(e, r, "sending transaction with");
|
|
756
791
|
}
|
|
757
792
|
}
|
|
758
793
|
async getBalance(e, t) {
|
|
@@ -760,20 +795,20 @@ class Ae {
|
|
|
760
795
|
if (!this.connectedWallets.has(e))
|
|
761
796
|
throw new Error(`Wallet ${e} is not connected`);
|
|
762
797
|
return await this.connectedWallets.get(e).getBalance(t);
|
|
763
|
-
} catch (
|
|
764
|
-
return this.handleError(e,
|
|
798
|
+
} catch (r) {
|
|
799
|
+
return this.handleError(e, r, "getting balance from");
|
|
765
800
|
}
|
|
766
801
|
}
|
|
767
802
|
}
|
|
768
|
-
class
|
|
803
|
+
class Ce extends F {
|
|
769
804
|
walletBridge;
|
|
770
|
-
constructor({ url: e, policies: t, ...
|
|
771
|
-
const n = new URL(e ?? W), o = new
|
|
805
|
+
constructor({ url: e, policies: t, ...r }) {
|
|
806
|
+
const n = new URL(e ?? W), o = new xe();
|
|
772
807
|
t && n.searchParams.set(
|
|
773
808
|
"policies",
|
|
774
809
|
encodeURIComponent(JSON.stringify(t))
|
|
775
810
|
), super({
|
|
776
|
-
...
|
|
811
|
+
...r,
|
|
777
812
|
id: "controller-keychain",
|
|
778
813
|
url: n,
|
|
779
814
|
methods: o.getIFrameMethods()
|
|
@@ -783,11 +818,11 @@ class xe extends F {
|
|
|
783
818
|
return this.walletBridge;
|
|
784
819
|
}
|
|
785
820
|
}
|
|
786
|
-
class
|
|
821
|
+
class Ie extends F {
|
|
787
822
|
constructor({
|
|
788
823
|
profileUrl: e,
|
|
789
824
|
rpcUrl: t,
|
|
790
|
-
version:
|
|
825
|
+
version: r,
|
|
791
826
|
username: n,
|
|
792
827
|
slot: o,
|
|
793
828
|
namespace: c,
|
|
@@ -799,7 +834,7 @@ class Ce extends F {
|
|
|
799
834
|
let l = new URL(
|
|
800
835
|
o ? `${d}/account/${n}/slot/${o}` : `${d}/account/${n}`
|
|
801
836
|
);
|
|
802
|
-
if (o && l.searchParams.set("ps", encodeURIComponent(o)), c && l.searchParams.set("ns", encodeURIComponent(c)),
|
|
837
|
+
if (o && l.searchParams.set("ps", encodeURIComponent(o)), c && l.searchParams.set("ns", encodeURIComponent(c)), r && l.searchParams.set("v", encodeURIComponent(r)), l.searchParams.set("rpcUrl", encodeURIComponent(t)), s?.erc20 && l.searchParams.set(
|
|
803
838
|
"erc20",
|
|
804
839
|
encodeURIComponent(s.erc20.toString())
|
|
805
840
|
), i?.contracts) {
|
|
@@ -818,7 +853,7 @@ class Ce extends F {
|
|
|
818
853
|
});
|
|
819
854
|
}
|
|
820
855
|
}
|
|
821
|
-
class
|
|
856
|
+
class Be extends j {
|
|
822
857
|
keychain;
|
|
823
858
|
profile;
|
|
824
859
|
options;
|
|
@@ -827,7 +862,7 @@ class Me extends j {
|
|
|
827
862
|
chains;
|
|
828
863
|
constructor(e) {
|
|
829
864
|
super(), this.selectedChain = e.defaultChainId, this.chains = /* @__PURE__ */ new Map(), this.iframes = {
|
|
830
|
-
keychain: new
|
|
865
|
+
keychain: new Ce({
|
|
831
866
|
...e,
|
|
832
867
|
onClose: this.keychain?.reset,
|
|
833
868
|
onConnect: (t) => {
|
|
@@ -858,7 +893,7 @@ class Me extends j {
|
|
|
858
893
|
}
|
|
859
894
|
if (!this.iframes.profile) {
|
|
860
895
|
const e = await this.keychain.username();
|
|
861
|
-
this.iframes.profile = new
|
|
896
|
+
this.iframes.profile = new Ie({
|
|
862
897
|
...this.options,
|
|
863
898
|
onConnect: (t) => {
|
|
864
899
|
this.profile = t;
|
|
@@ -973,7 +1008,7 @@ class Me extends j {
|
|
|
973
1008
|
const e = this.chains.get(this.selectedChain);
|
|
974
1009
|
if (!e) {
|
|
975
1010
|
const t = Array.from(this.chains.keys()).map(
|
|
976
|
-
(
|
|
1011
|
+
(r) => M.decodeShortString(r)
|
|
977
1012
|
);
|
|
978
1013
|
throw new Error(
|
|
979
1014
|
`Chain not found: ${M.decodeShortString(this.selectedChain)}. Available chains: ${t.join(", ")}`
|
|
@@ -1008,10 +1043,10 @@ class Me extends j {
|
|
|
1008
1043
|
console.error("Profile is not ready");
|
|
1009
1044
|
return;
|
|
1010
1045
|
}
|
|
1011
|
-
let
|
|
1046
|
+
let r = this.selectedChain;
|
|
1012
1047
|
t && this.switchStarknetChain(t), this.iframes.profile?.sendBackward(), this.iframes.keychain.open(), this.iframes.profile?.close();
|
|
1013
1048
|
const n = await this.keychain.execute(e, void 0, void 0, !0);
|
|
1014
|
-
return this.iframes.profile?.open(), this.iframes.keychain.close(), this.iframes.profile?.sendForward(), t && this.switchStarknetChain(
|
|
1049
|
+
return this.iframes.profile?.open(), this.iframes.keychain.close(), this.iframes.profile?.sendForward(), t && this.switchStarknetChain(r), !(n && (n.code === A.NOT_CONNECTED || n.code === A.CANCELED));
|
|
1015
1050
|
}
|
|
1016
1051
|
async delegateAccount() {
|
|
1017
1052
|
return this.keychain ? await this.keychain.delegateAccount() : (console.error(new g().message), null);
|
|
@@ -1019,10 +1054,10 @@ class Me extends j {
|
|
|
1019
1054
|
async validateChains(e) {
|
|
1020
1055
|
for (const t of e)
|
|
1021
1056
|
try {
|
|
1022
|
-
const
|
|
1057
|
+
const r = new URL(t.rpcUrl), n = await K(r);
|
|
1023
1058
|
this.chains.set(n, t);
|
|
1024
|
-
} catch (
|
|
1025
|
-
console.error(`Failed to parse chainId for ${t.rpcUrl}:`,
|
|
1059
|
+
} catch (r) {
|
|
1060
|
+
console.error(`Failed to parse chainId for ${t.rpcUrl}:`, r);
|
|
1026
1061
|
}
|
|
1027
1062
|
this.chains.has(this.selectedChain) || console.warn(
|
|
1028
1063
|
`Selected chain ${this.selectedChain} not found in configured chains. Available chains: ${Array.from(this.chains.keys()).join(", ")}`
|
|
@@ -1032,49 +1067,49 @@ class Me extends j {
|
|
|
1032
1067
|
timeout: e = 5e4,
|
|
1033
1068
|
interval: t = 100
|
|
1034
1069
|
} = {}) {
|
|
1035
|
-
return new Promise((
|
|
1070
|
+
return new Promise((r, n) => {
|
|
1036
1071
|
const o = Date.now(), c = setInterval(() => {
|
|
1037
1072
|
if (Date.now() - o > e) {
|
|
1038
1073
|
clearInterval(c), n(new Error("Timeout waiting for keychain"));
|
|
1039
1074
|
return;
|
|
1040
1075
|
}
|
|
1041
|
-
this.keychain && (clearInterval(c),
|
|
1076
|
+
this.keychain && (clearInterval(c), r());
|
|
1042
1077
|
}, t);
|
|
1043
1078
|
});
|
|
1044
1079
|
}
|
|
1045
1080
|
}
|
|
1046
1081
|
const R = /* @__PURE__ */ new Map();
|
|
1047
|
-
async function U(
|
|
1048
|
-
if (!
|
|
1082
|
+
async function U(a) {
|
|
1083
|
+
if (!a.addresses?.length && !a.usernames?.length)
|
|
1049
1084
|
return { results: [] };
|
|
1050
1085
|
const e = await fetch(`${q}/lookup`, {
|
|
1051
1086
|
method: "POST",
|
|
1052
1087
|
headers: {
|
|
1053
1088
|
"Content-Type": "application/json"
|
|
1054
1089
|
},
|
|
1055
|
-
body: JSON.stringify(
|
|
1090
|
+
body: JSON.stringify(a)
|
|
1056
1091
|
});
|
|
1057
1092
|
if (!e.ok)
|
|
1058
1093
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
1059
1094
|
return e.json();
|
|
1060
1095
|
}
|
|
1061
|
-
async function
|
|
1062
|
-
const e =
|
|
1063
|
-
return e.length > 0 && (await U({ usernames: e })).results.forEach((
|
|
1064
|
-
R.set(
|
|
1096
|
+
async function Te(a) {
|
|
1097
|
+
const e = a.filter((t) => !R.has(t));
|
|
1098
|
+
return e.length > 0 && (await U({ usernames: e })).results.forEach((r) => {
|
|
1099
|
+
R.set(r.username, r.addresses[0]);
|
|
1065
1100
|
}), new Map(
|
|
1066
|
-
|
|
1101
|
+
a.map((t) => [t, R.get(t)]).filter((t) => t[1] !== void 0)
|
|
1067
1102
|
);
|
|
1068
1103
|
}
|
|
1069
|
-
async function
|
|
1070
|
-
|
|
1071
|
-
const e =
|
|
1104
|
+
async function Qe(a) {
|
|
1105
|
+
a = a.map(Y.toHex);
|
|
1106
|
+
const e = a.filter((t) => !R.has(t));
|
|
1072
1107
|
return e.length > 0 && (await U({
|
|
1073
1108
|
addresses: e
|
|
1074
|
-
})).results.forEach((
|
|
1075
|
-
R.set(
|
|
1109
|
+
})).results.forEach((r) => {
|
|
1110
|
+
R.set(r.addresses[0], r.username);
|
|
1076
1111
|
}), new Map(
|
|
1077
|
-
|
|
1112
|
+
a.map((t) => [t, R.get(t)]).filter((t) => t[1] !== void 0)
|
|
1078
1113
|
);
|
|
1079
1114
|
}
|
|
1080
1115
|
var L = {
|
|
@@ -2823,7 +2858,7 @@ var L = {
|
|
|
2823
2858
|
name: "zKube"
|
|
2824
2859
|
}
|
|
2825
2860
|
}
|
|
2826
|
-
},
|
|
2861
|
+
}, Re = [
|
|
2827
2862
|
{
|
|
2828
2863
|
name: "Wrapped BTC",
|
|
2829
2864
|
symbol: "WBTC",
|
|
@@ -3369,25 +3404,25 @@ var L = {
|
|
|
3369
3404
|
hidden: !0,
|
|
3370
3405
|
logo_url: "https://imagedelivery.net/0xPAQaDtnQhBs8IzYRIlNg/6deef27f-df40-4248-4e1b-ed1d79a3f000/logo"
|
|
3371
3406
|
}
|
|
3372
|
-
],
|
|
3407
|
+
], ze = L, Fe = Re, Ue = L.cartridge.theme;
|
|
3373
3408
|
export {
|
|
3374
|
-
|
|
3375
|
-
|
|
3409
|
+
Ae as ArgentWallet,
|
|
3410
|
+
ve as MetaMaskWallet,
|
|
3376
3411
|
g as NotReadyToConnect,
|
|
3377
|
-
|
|
3412
|
+
ke as PhantomWallet,
|
|
3378
3413
|
A as ResponseCodes,
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3414
|
+
xe as WalletBridge,
|
|
3415
|
+
ze as controllerConfigs,
|
|
3416
|
+
Be as default,
|
|
3417
|
+
Ue as defaultTheme,
|
|
3418
|
+
Fe as erc20Metadata,
|
|
3419
|
+
Ye as humanizeString,
|
|
3420
|
+
Qe as lookupAddresses,
|
|
3421
|
+
Te as lookupUsernames,
|
|
3422
|
+
$e as normalizeCalls,
|
|
3388
3423
|
K as parseChainId,
|
|
3389
3424
|
$ as toArray,
|
|
3390
|
-
|
|
3391
|
-
|
|
3425
|
+
We as toSessionPolicies,
|
|
3426
|
+
He as toWasmPolicies
|
|
3392
3427
|
};
|
|
3393
3428
|
//# sourceMappingURL=index.js.map
|