@cartridge/controller 0.13.10 → 0.13.11-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 +20 -20
- package/dist/controller.d.ts +3 -1
- package/dist/{index-C7KGk-LM.js → index-D-vUjqmc.js} +4 -3
- package/dist/index-D-vUjqmc.js.map +1 -0
- package/dist/index.js +198 -167
- 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.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/session.js +2 -2
- package/dist/stats.html +1 -1
- package/dist/types.d.ts +38 -3
- package/package.json +4 -4
- package/src/controller.ts +53 -3
- package/src/iframe/security.ts +1 -0
- package/src/lookup.ts +4 -1
- package/src/types.ts +48 -0
- package/dist/index-C7KGk-LM.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WalletAccount as Sn, constants as ge, num as Bt, shortString as ft } from "starknet";
|
|
2
|
-
import { R, t as $n, K as Ut, A as Mt, I as Ln, B as _n, N as
|
|
3
|
-
import { c as Ni, i as Bi, E as Ui, k as Mi, j as Ri, F as Oi, b as Fi, a as zi, l as ji, m as Hi, o as Wi, q as qi, g as Vi, h as Di, r as Zi, u as Ki, n as Xi, f as Gi, d as Yi, e as Ji } from "./index-
|
|
2
|
+
import { R, t as $n, K as Ut, A as Mt, I as Ln, B as _n, N as A, H as ue, p as Pn, v as In, s as Rt } from "./index-D-vUjqmc.js";
|
|
3
|
+
import { c as Ni, i as Bi, E as Ui, k as Mi, j as Ri, F as Oi, b as Fi, a as zi, l as ji, m as Hi, o as Wi, q as qi, g as Vi, h as Di, r as Zi, u as Ki, n as Xi, f as Gi, d as Yi, e as Ji } from "./index-D-vUjqmc.js";
|
|
4
4
|
const Tn = "standard:connect", Nn = "standard:disconnect", Bn = "standard:events", Un = "0.1.1";
|
|
5
5
|
function Mn() {
|
|
6
6
|
return Un;
|
|
@@ -249,9 +249,9 @@ function dr(t, e = {}) {
|
|
|
249
249
|
if (typeof t != "string")
|
|
250
250
|
throw new bt(t);
|
|
251
251
|
if (n && !/^0x[0-9a-fA-F]*$/.test(t))
|
|
252
|
-
throw new
|
|
252
|
+
throw new kt(t);
|
|
253
253
|
if (!t.startsWith("0x"))
|
|
254
|
-
throw new
|
|
254
|
+
throw new kt(t);
|
|
255
255
|
}
|
|
256
256
|
function Vt(t, e = {}) {
|
|
257
257
|
const { strict: n = !1 } = e;
|
|
@@ -273,7 +273,7 @@ class bt extends ie {
|
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
class
|
|
276
|
+
class kt extends ie {
|
|
277
277
|
constructor(e) {
|
|
278
278
|
super(`Value \`${e}\` is an invalid hex value.`, {
|
|
279
279
|
metaMessages: [
|
|
@@ -316,7 +316,7 @@ var Qe = (t, e, n) => {
|
|
|
316
316
|
if (e.has(t))
|
|
317
317
|
throw TypeError("Cannot add the same private member more than once");
|
|
318
318
|
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
319
|
-
}, ye = (t, e, n, r) => (Qe(t, e, "write to private field"), e.set(t, n), n),
|
|
319
|
+
}, ye = (t, e, n, r) => (Qe(t, e, "write to private field"), e.set(t, n), n), P = (t, e, n) => (Qe(t, e, "access private method"), n), z, L, Oe, Fe, ze, D, J, je, Kt, oe, Ee, He, Xt, We, Gt, Ce, et, qe, Yt, tt, Jt;
|
|
320
320
|
class wr {
|
|
321
321
|
constructor(e) {
|
|
322
322
|
this.injected = e, B(this, D), B(this, je), B(this, oe), B(this, He), B(this, We), B(this, Ce), B(this, qe), B(this, tt), B(this, z, {}), B(this, L, null), B(this, Oe, async ({ silent: n }) => {
|
|
@@ -329,12 +329,12 @@ class wr {
|
|
|
329
329
|
});
|
|
330
330
|
if (r.length === 0)
|
|
331
331
|
return { accounts: [] };
|
|
332
|
-
await
|
|
332
|
+
await P(this, Ce, et).call(this, r);
|
|
333
333
|
}
|
|
334
334
|
return { accounts: this.accounts };
|
|
335
335
|
}), B(this, Fe, async () => {
|
|
336
|
-
|
|
337
|
-
}), B(this, ze, (n, r) => (E(this, z)[n] || (E(this, z)[n] = []), E(this, z)[n].push(r), () =>
|
|
336
|
+
P(this, oe, Ee).call(this);
|
|
337
|
+
}), B(this, ze, (n, r) => (E(this, z)[n] || (E(this, z)[n] = []), E(this, z)[n].push(r), () => P(this, je, Kt).call(this, n, r))), this.injected.on("accountsChanged", P(this, He, Xt).bind(this)), this.injected.on("networkChanged", P(this, We, Gt).bind(this));
|
|
338
338
|
}
|
|
339
339
|
get version() {
|
|
340
340
|
return "1.0.0";
|
|
@@ -361,7 +361,7 @@ class wr {
|
|
|
361
361
|
},
|
|
362
362
|
[pr]: {
|
|
363
363
|
version: "1.0.0",
|
|
364
|
-
request:
|
|
364
|
+
request: P(this, qe, Yt).bind(this),
|
|
365
365
|
walletVersion: this.injected.version
|
|
366
366
|
}
|
|
367
367
|
};
|
|
@@ -399,20 +399,20 @@ Kt = function(t, e) {
|
|
|
399
399
|
};
|
|
400
400
|
oe = /* @__PURE__ */ new WeakSet();
|
|
401
401
|
Ee = function() {
|
|
402
|
-
E(this, L) && (ye(this, L, null),
|
|
402
|
+
E(this, L) && (ye(this, L, null), P(this, D, J).call(this, "change", { accounts: this.accounts }));
|
|
403
403
|
};
|
|
404
404
|
He = /* @__PURE__ */ new WeakSet();
|
|
405
405
|
Xt = async function(t) {
|
|
406
406
|
if (!t || t.length === 0) {
|
|
407
|
-
|
|
407
|
+
P(this, oe, Ee).call(this);
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
410
|
-
E(this, L) && await
|
|
410
|
+
E(this, L) && await P(this, Ce, et).call(this, t);
|
|
411
411
|
};
|
|
412
412
|
We = /* @__PURE__ */ new WeakSet();
|
|
413
413
|
Gt = function(t, e) {
|
|
414
414
|
if (!t) {
|
|
415
|
-
|
|
415
|
+
P(this, oe, Ee).call(this);
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
418
418
|
if (!E(this, L))
|
|
@@ -422,9 +422,9 @@ Gt = function(t, e) {
|
|
|
422
422
|
throw new Error(`Invalid Starknet chain: ${n}`);
|
|
423
423
|
if (e?.length > 0) {
|
|
424
424
|
const [r] = e;
|
|
425
|
-
ye(this, L, { address: r, chain: n }),
|
|
425
|
+
ye(this, L, { address: r, chain: n }), P(this, D, J).call(this, "change", { accounts: this.accounts });
|
|
426
426
|
} else
|
|
427
|
-
ye(this, L, { address: E(this, L)?.address, chain: n }),
|
|
427
|
+
ye(this, L, { address: E(this, L)?.address, chain: n }), P(this, D, J).call(this, "change", { accounts: this.accounts });
|
|
428
428
|
};
|
|
429
429
|
Ce = /* @__PURE__ */ new WeakSet();
|
|
430
430
|
et = async function(t) {
|
|
@@ -432,10 +432,10 @@ et = async function(t) {
|
|
|
432
432
|
return;
|
|
433
433
|
const [e] = t;
|
|
434
434
|
if (E(this, L)?.chain)
|
|
435
|
-
E(this, L).address = e,
|
|
435
|
+
E(this, L).address = e, P(this, D, J).call(this, "change", { accounts: this.accounts });
|
|
436
436
|
else {
|
|
437
|
-
const n = await
|
|
438
|
-
ye(this, L, { address: e, chain: n }),
|
|
437
|
+
const n = await P(this, tt, Jt).call(this);
|
|
438
|
+
ye(this, L, { address: e, chain: n }), P(this, D, J).call(this, "change", { accounts: this.accounts });
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
441
|
qe = /* @__PURE__ */ new WeakSet();
|
|
@@ -590,7 +590,7 @@ const gr = (t, e) => {
|
|
|
590
590
|
}, yr = {
|
|
591
591
|
"http:": "80",
|
|
592
592
|
"https:": "443"
|
|
593
|
-
}, Cr = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, br = ["file:", "data:"],
|
|
593
|
+
}, Cr = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, br = ["file:", "data:"], kr = (t) => {
|
|
594
594
|
if (t && br.find((a) => t.startsWith(a)))
|
|
595
595
|
return "null";
|
|
596
596
|
const e = document.location, n = Cr.exec(t);
|
|
@@ -598,11 +598,11 @@ const gr = (t, e) => {
|
|
|
598
598
|
n ? (r = n[1] ? n[1] : e.protocol, s = n[2], i = n[4]) : (r = e.protocol, s = e.hostname, i = e.port);
|
|
599
599
|
const o = i && i !== yr[r] ? `:${i}` : "";
|
|
600
600
|
return `${r}//${s}${o}`;
|
|
601
|
-
},
|
|
601
|
+
}, xt = ({ name: t, message: e, stack: n }) => ({
|
|
602
602
|
name: t,
|
|
603
603
|
message: e,
|
|
604
604
|
stack: n
|
|
605
|
-
}),
|
|
605
|
+
}), xr = (t) => {
|
|
606
606
|
const e = new Error();
|
|
607
607
|
return Object.keys(t).forEach((n) => e[n] = t[n]), e;
|
|
608
608
|
}, vr = (t, e, n) => {
|
|
@@ -628,19 +628,19 @@ const gr = (t, e) => {
|
|
|
628
628
|
resolution: m,
|
|
629
629
|
returnValue: T
|
|
630
630
|
};
|
|
631
|
-
m === q.Rejected && T instanceof Error && (b.returnValue =
|
|
631
|
+
m === q.Rejected && T instanceof Error && (b.returnValue = xt(T), b.returnValueIsError = !0);
|
|
632
632
|
try {
|
|
633
633
|
i.postMessage(b, o);
|
|
634
634
|
} catch (g) {
|
|
635
635
|
if (g.name === Ve.DataCloneError) {
|
|
636
|
-
const
|
|
636
|
+
const $ = {
|
|
637
637
|
penpal: O.Reply,
|
|
638
638
|
id: w,
|
|
639
639
|
resolution: q.Rejected,
|
|
640
|
-
returnValue:
|
|
640
|
+
returnValue: xt(g),
|
|
641
641
|
returnValueIsError: !0
|
|
642
642
|
};
|
|
643
|
-
i.postMessage(
|
|
643
|
+
i.postMessage($, o);
|
|
644
644
|
}
|
|
645
645
|
throw g;
|
|
646
646
|
}
|
|
@@ -669,7 +669,7 @@ const Ar = () => ++Er, Qt = ".", en = (t) => t ? t.split(Qt) : [], Sr = (t) => t
|
|
|
669
669
|
for (const n in t)
|
|
670
670
|
Lr(e, n, t[n]);
|
|
671
671
|
return e;
|
|
672
|
-
},
|
|
672
|
+
}, Pr = (t, e, n, r, s) => {
|
|
673
673
|
const { localName: i, local: o, remote: a, originForSending: l, originForReceiving: c } = e;
|
|
674
674
|
let d = !1;
|
|
675
675
|
s(`${i}: Connecting call sender`);
|
|
@@ -693,25 +693,25 @@ const Ar = () => ++Er, Qt = ".", en = (t) => t ? t.split(Qt) : [], Sr = (t) => t
|
|
|
693
693
|
s(`${i} received message from origin ${_.origin} which did not match expected origin ${c}`);
|
|
694
694
|
return;
|
|
695
695
|
}
|
|
696
|
-
const
|
|
696
|
+
const k = _.data;
|
|
697
697
|
s(`${i}: Received ${f}() reply`), o.removeEventListener(H.Message, g);
|
|
698
|
-
let X =
|
|
699
|
-
|
|
698
|
+
let X = k.returnValue;
|
|
699
|
+
k.returnValueIsError && (X = xr(X)), (k.resolution === q.Fulfilled ? m : T)(X);
|
|
700
700
|
};
|
|
701
701
|
o.addEventListener(H.Message, g);
|
|
702
|
-
const
|
|
702
|
+
const $ = {
|
|
703
703
|
penpal: O.Call,
|
|
704
704
|
id: b,
|
|
705
705
|
methodName: f,
|
|
706
706
|
args: w
|
|
707
707
|
};
|
|
708
|
-
a.postMessage(
|
|
708
|
+
a.postMessage($, l);
|
|
709
709
|
});
|
|
710
710
|
}, u = n.reduce((f, w) => (f[w] = h(w), f), {});
|
|
711
711
|
return Object.assign(t, _r(u)), () => {
|
|
712
712
|
d = !0;
|
|
713
713
|
};
|
|
714
|
-
},
|
|
714
|
+
}, Ir = (t, e, n, r, s) => {
|
|
715
715
|
const { destroy: i, onDestroy: o } = r;
|
|
716
716
|
let a, l;
|
|
717
717
|
const c = {};
|
|
@@ -731,7 +731,7 @@ const Ar = () => ++Er, Qt = ".", en = (t) => t ? t.split(Qt) : [], Sr = (t) => t
|
|
|
731
731
|
a && a(), a = vr(h, t, s), o(a), l && l.forEach((f) => {
|
|
732
732
|
delete c[f];
|
|
733
733
|
}), l = d.data.methodNames;
|
|
734
|
-
const u =
|
|
734
|
+
const u = Pr(c, h, l, i, s);
|
|
735
735
|
return o(u), c;
|
|
736
736
|
};
|
|
737
737
|
}, Tr = (t, e, n, r) => (s) => {
|
|
@@ -770,8 +770,8 @@ const Ar = () => ++Er, Qt = ".", en = (t) => t ? t.split(Qt) : [], Sr = (t) => t
|
|
|
770
770
|
}, Rr = (t) => {
|
|
771
771
|
let { iframe: e, methods: n = {}, childOrigin: r, timeout: s, debug: i = !1 } = t;
|
|
772
772
|
const o = mr(i), a = gr("Parent", o), { onDestroy: l, destroy: c } = a;
|
|
773
|
-
r || (Mr(e), r =
|
|
774
|
-
const d = r === "null" ? "*" : r, h = tn(n), u = Tr(o, h, r, d), f =
|
|
773
|
+
r || (Mr(e), r = kr(e.src));
|
|
774
|
+
const d = r === "null" ? "*" : r, h = tn(n), u = Tr(o, h, r, d), f = Ir(h, r, d, a, o);
|
|
775
775
|
return {
|
|
776
776
|
promise: new Promise((C, m) => {
|
|
777
777
|
const T = Ur(s, c), b = (g) => {
|
|
@@ -781,8 +781,8 @@ const Ar = () => ++Er, Qt = ".", en = (t) => t ? t.split(Qt) : [], Sr = (t) => t
|
|
|
781
781
|
return;
|
|
782
782
|
}
|
|
783
783
|
if (g.data.penpal === O.Ack) {
|
|
784
|
-
const
|
|
785
|
-
|
|
784
|
+
const $ = f(g);
|
|
785
|
+
$ && (T(), C($));
|
|
786
786
|
return;
|
|
787
787
|
}
|
|
788
788
|
}
|
|
@@ -813,6 +813,7 @@ function zr(t) {
|
|
|
813
813
|
"publickey-credentials-create *",
|
|
814
814
|
"publickey-credentials-get *",
|
|
815
815
|
"clipboard-write",
|
|
816
|
+
"geolocation *",
|
|
816
817
|
"payment *"
|
|
817
818
|
];
|
|
818
819
|
return nn(t.hostname) && e.push("local-network-access *"), e.join("; ");
|
|
@@ -1291,13 +1292,13 @@ const ts = {
|
|
|
1291
1292
|
// op sepolia
|
|
1292
1293
|
[ge.StarknetChainId.SN_MAIN]: "starknet",
|
|
1293
1294
|
[ge.StarknetChainId.SN_SEPOLIA]: "starknet"
|
|
1294
|
-
},
|
|
1295
|
+
}, Pe = (t) => {
|
|
1295
1296
|
const e = Bt.toHex(t), n = ts[e];
|
|
1296
1297
|
return n || console.warn(`Unknown chain ID: ${e}`), n;
|
|
1297
1298
|
};
|
|
1298
|
-
let
|
|
1299
|
+
let Ie;
|
|
1299
1300
|
function ns() {
|
|
1300
|
-
return
|
|
1301
|
+
return Ie || (Ie = es()), Ie;
|
|
1301
1302
|
}
|
|
1302
1303
|
class Ae {
|
|
1303
1304
|
platform;
|
|
@@ -1335,9 +1336,9 @@ class Ae {
|
|
|
1335
1336
|
}).catch(console.error), e.provider.request({
|
|
1336
1337
|
method: "eth_chainId"
|
|
1337
1338
|
}).then((n) => {
|
|
1338
|
-
this.platform =
|
|
1339
|
+
this.platform = Pe(n);
|
|
1339
1340
|
}).catch(console.error), e.provider?.on("chainChanged", (n) => {
|
|
1340
|
-
this.platform =
|
|
1341
|
+
this.platform = Pe(n);
|
|
1341
1342
|
}), e.provider?.on("accountsChanged", (n) => {
|
|
1342
1343
|
n && (this.connectedAccounts = n.map((r) => F(r)), this.account = n.length > 0 ? F(n[0]) : void 0);
|
|
1343
1344
|
}));
|
|
@@ -1492,7 +1493,7 @@ class Ae {
|
|
|
1492
1493
|
return await n.request({
|
|
1493
1494
|
method: "wallet_switchEthereumChain",
|
|
1494
1495
|
params: [{ chainId: e }]
|
|
1495
|
-
}), this.platform =
|
|
1496
|
+
}), this.platform = Pe(e), !0;
|
|
1496
1497
|
} catch (r) {
|
|
1497
1498
|
throw r.code === 4902 && console.warn(`Chain not added to ${this.displayName}`), r;
|
|
1498
1499
|
}
|
|
@@ -1606,7 +1607,7 @@ function be(t) {
|
|
|
1606
1607
|
if (!Array.isArray(t))
|
|
1607
1608
|
throw new Error("array expected");
|
|
1608
1609
|
}
|
|
1609
|
-
function
|
|
1610
|
+
function ke(t, e) {
|
|
1610
1611
|
if (!cn(!0, e))
|
|
1611
1612
|
throw new Error(`${t}: array of strings expected`);
|
|
1612
1613
|
}
|
|
@@ -1622,7 +1623,7 @@ function it(...t) {
|
|
|
1622
1623
|
// @__NO_SIDE_EFFECTS__
|
|
1623
1624
|
function ot(t) {
|
|
1624
1625
|
const e = typeof t == "string" ? t.split("") : t, n = e.length;
|
|
1625
|
-
|
|
1626
|
+
ke("alphabet", e);
|
|
1626
1627
|
const r = new Map(e.map((s, i) => [s, i]));
|
|
1627
1628
|
return {
|
|
1628
1629
|
encode: (s) => (be(s), s.map((i) => {
|
|
@@ -1642,7 +1643,7 @@ function ot(t) {
|
|
|
1642
1643
|
// @__NO_SIDE_EFFECTS__
|
|
1643
1644
|
function at(t = "") {
|
|
1644
1645
|
return Q("join", t), {
|
|
1645
|
-
encode: (e) => (
|
|
1646
|
+
encode: (e) => (ke("join.decode", e), e.join(t)),
|
|
1646
1647
|
decode: (e) => (Q("join.decode", e), e.split(t))
|
|
1647
1648
|
};
|
|
1648
1649
|
}
|
|
@@ -1650,12 +1651,12 @@ function at(t = "") {
|
|
|
1650
1651
|
function os(t, e = "=") {
|
|
1651
1652
|
return le(t), Q("padding", e), {
|
|
1652
1653
|
encode(n) {
|
|
1653
|
-
for (
|
|
1654
|
+
for (ke("padding.encode", n); n.length * t % 8; )
|
|
1654
1655
|
n.push(e);
|
|
1655
1656
|
return n;
|
|
1656
1657
|
},
|
|
1657
1658
|
decode(n) {
|
|
1658
|
-
|
|
1659
|
+
ke("padding.decode", n);
|
|
1659
1660
|
let r = n.length;
|
|
1660
1661
|
if (r * t % 8)
|
|
1661
1662
|
throw new Error("padding: invalid, string should have whole number of bytes");
|
|
@@ -1705,7 +1706,7 @@ function $t(t, e, n) {
|
|
|
1705
1706
|
s.push(0);
|
|
1706
1707
|
return s.reverse();
|
|
1707
1708
|
}
|
|
1708
|
-
const dn = (t, e) => e === 0 ? t : dn(e, t % e),
|
|
1709
|
+
const dn = (t, e) => e === 0 ? t : dn(e, t % e), xe = /* @__NO_SIDE_EFFECTS__ */ (t, e) => t + (e - dn(t, e)), Te = /* @__PURE__ */ (() => {
|
|
1709
1710
|
let t = [];
|
|
1710
1711
|
for (let e = 0; e < 40; e++)
|
|
1711
1712
|
t.push(2 ** e);
|
|
@@ -1716,8 +1717,8 @@ function Lt(t, e, n, r) {
|
|
|
1716
1717
|
throw new Error(`convertRadix2: wrong from=${e}`);
|
|
1717
1718
|
if (n <= 0 || n > 32)
|
|
1718
1719
|
throw new Error(`convertRadix2: wrong to=${n}`);
|
|
1719
|
-
if (/* @__PURE__ */
|
|
1720
|
-
throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${/* @__PURE__ */
|
|
1720
|
+
if (/* @__PURE__ */ xe(e, n) > 32)
|
|
1721
|
+
throw new Error(`convertRadix2: carry overflow from=${e} to=${n} carryBits=${/* @__PURE__ */ xe(e, n)}`);
|
|
1721
1722
|
let s = 0, i = 0;
|
|
1722
1723
|
const o = Te[e], a = Te[n] - 1, l = [];
|
|
1723
1724
|
for (const c of t) {
|
|
@@ -1755,7 +1756,7 @@ function cs(t) {
|
|
|
1755
1756
|
function hn(t, e = !1) {
|
|
1756
1757
|
if (le(t), t <= 0 || t > 32)
|
|
1757
1758
|
throw new Error("radix2: bits should be in (0..32]");
|
|
1758
|
-
if (/* @__PURE__ */
|
|
1759
|
+
if (/* @__PURE__ */ xe(8, t) > 32 || /* @__PURE__ */ xe(t, 8) > 32)
|
|
1759
1760
|
throw new Error("radix2: carry overflow");
|
|
1760
1761
|
return {
|
|
1761
1762
|
encode: (n) => {
|
|
@@ -1826,17 +1827,17 @@ const fn = (t) => {
|
|
|
1826
1827
|
return n;
|
|
1827
1828
|
}
|
|
1828
1829
|
};
|
|
1829
|
-
},
|
|
1830
|
+
}, S = {
|
|
1830
1831
|
BITS: 32,
|
|
1831
1832
|
FULL_MASK: -1 >>> 0,
|
|
1832
1833
|
// 1<<32 will overflow
|
|
1833
1834
|
len: (t) => Math.ceil(t / 32),
|
|
1834
|
-
create: (t) => new Uint32Array(
|
|
1835
|
+
create: (t) => new Uint32Array(S.len(t)),
|
|
1835
1836
|
clean: (t) => t.fill(0),
|
|
1836
1837
|
debug: (t) => Array.from(t).map((e) => (e >>> 0).toString(2).padStart(32, "0")),
|
|
1837
1838
|
checkLen: (t, e) => {
|
|
1838
|
-
if (
|
|
1839
|
-
throw new Error(`wrong length=${t.length}. Expected: ${
|
|
1839
|
+
if (S.len(e) !== t.length)
|
|
1840
|
+
throw new Error(`wrong length=${t.length}. Expected: ${S.len(e)}`);
|
|
1840
1841
|
},
|
|
1841
1842
|
chunkLen: (t, e, n) => {
|
|
1842
1843
|
if (e < 0)
|
|
@@ -1850,8 +1851,8 @@ const fn = (t) => {
|
|
|
1850
1851
|
mask: 1 << 32 - (t + e) % 32 - 1
|
|
1851
1852
|
}),
|
|
1852
1853
|
indices: (t, e, n = !1) => {
|
|
1853
|
-
|
|
1854
|
-
const { FULL_MASK: r, BITS: s } =
|
|
1854
|
+
S.checkLen(t, e);
|
|
1855
|
+
const { FULL_MASK: r, BITS: s } = S, i = s - e % s, o = i ? r >>> i << i : r, a = [];
|
|
1855
1856
|
for (let l = 0; l < t.length; l++) {
|
|
1856
1857
|
let c = t[l];
|
|
1857
1858
|
if (n && (c = ~c), l === t.length - 1 && (c &= o), c !== 0)
|
|
@@ -1869,19 +1870,19 @@ const fn = (t) => {
|
|
|
1869
1870
|
n === void 0 || r !== n.pos + n.length ? e.push(n = { pos: r, length: 1 }) : n.length += 1;
|
|
1870
1871
|
return e;
|
|
1871
1872
|
},
|
|
1872
|
-
rangeDebug: (t, e, n = !1) => `[${
|
|
1873
|
+
rangeDebug: (t, e, n = !1) => `[${S.range(S.indices(t, e, n)).map((r) => `(${r.pos}/${r.length})`).join(", ")}]`,
|
|
1873
1874
|
setRange: (t, e, n, r, s = !0) => {
|
|
1874
|
-
|
|
1875
|
-
const { FULL_MASK: i, BITS: o } =
|
|
1875
|
+
S.chunkLen(e, n, r);
|
|
1876
|
+
const { FULL_MASK: i, BITS: o } = S, a = n % o ? Math.floor(n / o) : void 0, l = n + r, c = l % o ? Math.floor(l / o) : void 0;
|
|
1876
1877
|
if (a !== void 0 && a === c)
|
|
1877
|
-
return
|
|
1878
|
-
if (a !== void 0 && !
|
|
1878
|
+
return S.set(t, a, i >>> o - r << o - r - n, s);
|
|
1879
|
+
if (a !== void 0 && !S.set(t, a, i >>> n % o, s))
|
|
1879
1880
|
return !1;
|
|
1880
1881
|
const d = a !== void 0 ? a + 1 : n / o, h = c !== void 0 ? c : l / o;
|
|
1881
1882
|
for (let u = d; u < h; u++)
|
|
1882
|
-
if (!
|
|
1883
|
+
if (!S.set(t, u, i, s))
|
|
1883
1884
|
return !1;
|
|
1884
|
-
return !(c !== void 0 && a !== c && !
|
|
1885
|
+
return !(c !== void 0 && a !== c && !S.set(t, c, i << o - l % o, s));
|
|
1885
1886
|
}
|
|
1886
1887
|
}, Z = {
|
|
1887
1888
|
/**
|
|
@@ -1930,10 +1931,10 @@ class ct {
|
|
|
1930
1931
|
_enablePointers() {
|
|
1931
1932
|
if (this.parent)
|
|
1932
1933
|
return this.parent._enablePointers();
|
|
1933
|
-
this.bs || (this.bs =
|
|
1934
|
+
this.bs || (this.bs = S.create(this.data.length), S.setRange(this.bs, this.data.length, 0, this.pos, this.opts.allowMultipleReads));
|
|
1934
1935
|
}
|
|
1935
1936
|
markBytesBS(e, n) {
|
|
1936
|
-
return this.parent ? this.parent.markBytesBS(this.parentOffset + e, n) : !n || !this.bs ? !0 :
|
|
1937
|
+
return this.parent ? this.parent.markBytesBS(this.parentOffset + e, n) : !n || !this.bs ? !0 : S.setRange(this.bs, this.data.length, e, n, !1);
|
|
1937
1938
|
}
|
|
1938
1939
|
markBytes(e) {
|
|
1939
1940
|
const n = this.pos;
|
|
@@ -1965,9 +1966,9 @@ class ct {
|
|
|
1965
1966
|
if (this.bitPos)
|
|
1966
1967
|
throw this.err(`${this.bitPos} bits left after unpack: ${Ne.encode(this.data.slice(this.pos))}`);
|
|
1967
1968
|
if (this.bs && !this.parent) {
|
|
1968
|
-
const e =
|
|
1969
|
+
const e = S.indices(this.bs, this.data.length, !0);
|
|
1969
1970
|
if (e.length) {
|
|
1970
|
-
const n =
|
|
1971
|
+
const n = S.range(e).map(({ pos: r, length: s }) => `(${r}/${s})[${Ne.encode(this.data.subarray(r, r + s))}]`).join(", ");
|
|
1971
1972
|
throw this.err(`unread byte ranges: ${n} (total=${this.data.length})`);
|
|
1972
1973
|
} else
|
|
1973
1974
|
return;
|
|
@@ -2157,7 +2158,7 @@ function wn(t, e) {
|
|
|
2157
2158
|
}
|
|
2158
2159
|
});
|
|
2159
2160
|
}
|
|
2160
|
-
const
|
|
2161
|
+
const I = (t) => {
|
|
2161
2162
|
const e = pn(t);
|
|
2162
2163
|
return t.validate ? wn(e, t.validate) : e;
|
|
2163
2164
|
}, Se = (t) => K(t) && typeof t.decode == "function" && typeof t.encode == "function";
|
|
@@ -2253,7 +2254,7 @@ function bs(t, e = !1) {
|
|
|
2253
2254
|
}
|
|
2254
2255
|
};
|
|
2255
2256
|
}
|
|
2256
|
-
function
|
|
2257
|
+
function ks(t) {
|
|
2257
2258
|
if (!Array.isArray(t))
|
|
2258
2259
|
throw new Error(`expected array, got ${typeof t}`);
|
|
2259
2260
|
for (const e of t)
|
|
@@ -2278,11 +2279,11 @@ function xs(t) {
|
|
|
2278
2279
|
}
|
|
2279
2280
|
};
|
|
2280
2281
|
}
|
|
2281
|
-
const
|
|
2282
|
+
const xs = (t) => {
|
|
2282
2283
|
if (!Se(t))
|
|
2283
2284
|
throw new Error("BaseCoder expected");
|
|
2284
2285
|
return { encode: t.decode, decode: t.encode };
|
|
2285
|
-
}, ne = { dict: ms, numberBigint: ys, tsEnum: Cs, decimal: bs, match:
|
|
2286
|
+
}, ne = { dict: ms, numberBigint: ys, tsEnum: Cs, decimal: bs, match: ks, reverse: xs }, vs = (t, e = !1, n = !1, r = !0) => {
|
|
2286
2287
|
if (!M(t))
|
|
2287
2288
|
throw new Error(`bigint/size: wrong value ${t}`);
|
|
2288
2289
|
if (typeof e != "boolean")
|
|
@@ -2292,7 +2293,7 @@ const ks = (t) => {
|
|
|
2292
2293
|
if (typeof r != "boolean")
|
|
2293
2294
|
throw new Error(`bigint/sized: expected boolean, got ${typeof r}`);
|
|
2294
2295
|
const s = BigInt(t), i = 2n ** (8n * s - 1n);
|
|
2295
|
-
return
|
|
2296
|
+
return I({
|
|
2296
2297
|
size: r ? t : void 0,
|
|
2297
2298
|
encodeStream: (o, a) => {
|
|
2298
2299
|
n && a < 0 && (a = a | i);
|
|
@@ -2321,7 +2322,7 @@ const ks = (t) => {
|
|
|
2321
2322
|
return gs(o, 8n * s, !!n), o;
|
|
2322
2323
|
}
|
|
2323
2324
|
});
|
|
2324
|
-
}, v = /* @__PURE__ */ vs(8, !0), Es = (t, e) =>
|
|
2325
|
+
}, v = /* @__PURE__ */ vs(8, !0), Es = (t, e) => I({
|
|
2325
2326
|
size: t,
|
|
2326
2327
|
encodeStream: (n, r) => n.writeView(t, (s) => e.write(s, r)),
|
|
2327
2328
|
decodeStream: (n) => n.readView(t, e.read),
|
|
@@ -2353,7 +2354,7 @@ const ks = (t) => {
|
|
|
2353
2354
|
}), N = /* @__PURE__ */ gn(1, !1, {
|
|
2354
2355
|
read: (t, e) => t.getUint8(e),
|
|
2355
2356
|
write: (t, e) => t.setUint8(0, e)
|
|
2356
|
-
}), Xe = /* @__PURE__ */
|
|
2357
|
+
}), Xe = /* @__PURE__ */ I({
|
|
2357
2358
|
size: 1,
|
|
2358
2359
|
encodeStream: (t, e) => t.byte(e ? 1 : 0),
|
|
2359
2360
|
decodeStream: (t) => {
|
|
@@ -2371,7 +2372,7 @@ const ks = (t) => {
|
|
|
2371
2372
|
if (typeof e != "boolean")
|
|
2372
2373
|
throw new Error(`bytes/le: expected boolean, got ${typeof e}`);
|
|
2373
2374
|
const n = fn(t), r = j(t);
|
|
2374
|
-
return
|
|
2375
|
+
return I({
|
|
2375
2376
|
size: typeof t == "number" ? t : void 0,
|
|
2376
2377
|
encodeStream: (s, i) => {
|
|
2377
2378
|
r || n.encodeStream(s, i.length), s.bytes(e ? Ke(i) : i), r && s.bytes(t);
|
|
@@ -2403,7 +2404,7 @@ function Ss(t, e) {
|
|
|
2403
2404
|
throw new Error(`apply: invalid inner value ${t}`);
|
|
2404
2405
|
if (!Se(e))
|
|
2405
2406
|
throw new Error(`apply: invalid base value ${t}`);
|
|
2406
|
-
return
|
|
2407
|
+
return I({
|
|
2407
2408
|
size: t.size,
|
|
2408
2409
|
encodeStream: (n, r) => {
|
|
2409
2410
|
let s;
|
|
@@ -2427,7 +2428,7 @@ function Ss(t, e) {
|
|
|
2427
2428
|
function se(t, e, n) {
|
|
2428
2429
|
if (!U(t) || !U(e))
|
|
2429
2430
|
throw new Error(`optional: invalid flag or inner value flag=${t} inner=${e}`);
|
|
2430
|
-
return
|
|
2431
|
+
return I({
|
|
2431
2432
|
size: n !== void 0 && t.size && e.size ? t.size + e.size : void 0,
|
|
2432
2433
|
encodeStream: (r, s) => {
|
|
2433
2434
|
t.encodeStream(r, !!s), s ? e.encodeStream(r, s) : n !== void 0 && e.encodeStream(r, n);
|
|
@@ -2440,7 +2441,7 @@ function se(t, e, n) {
|
|
|
2440
2441
|
});
|
|
2441
2442
|
}
|
|
2442
2443
|
function $s(t) {
|
|
2443
|
-
return
|
|
2444
|
+
return I({
|
|
2444
2445
|
encodeStream: (e, n) => {
|
|
2445
2446
|
if (n !== t)
|
|
2446
2447
|
throw new Error(`constant: invalid value ${n} (exp: ${t})`);
|
|
@@ -2465,7 +2466,7 @@ function p(t) {
|
|
|
2465
2466
|
for (const e in t)
|
|
2466
2467
|
if (!U(t[e]))
|
|
2467
2468
|
throw new Error(`struct: field ${e} is not CoderType`);
|
|
2468
|
-
return
|
|
2469
|
+
return I({
|
|
2469
2470
|
size: Ls(Object.values(t)),
|
|
2470
2471
|
encodeStream: (e, n) => {
|
|
2471
2472
|
e.pushObj(n, (r) => {
|
|
@@ -2491,7 +2492,7 @@ function we(t, e) {
|
|
|
2491
2492
|
if (!U(e))
|
|
2492
2493
|
throw new Error(`array: invalid inner value ${e}`);
|
|
2493
2494
|
const n = fn(typeof t == "string" ? `../${t}` : t);
|
|
2494
|
-
return
|
|
2495
|
+
return I({
|
|
2495
2496
|
size: typeof t == "number" && e.size ? t * e.size : void 0,
|
|
2496
2497
|
encodeStream: (r, s) => {
|
|
2497
2498
|
const i = r;
|
|
@@ -2547,7 +2548,7 @@ function lt(t, e) {
|
|
|
2547
2548
|
const n = /* @__PURE__ */ new Map();
|
|
2548
2549
|
for (const r in e)
|
|
2549
2550
|
n.set(e[r], r);
|
|
2550
|
-
return
|
|
2551
|
+
return I({
|
|
2551
2552
|
size: t.size,
|
|
2552
2553
|
encodeStream: (r, s) => t.encodeStream(r, e[s]),
|
|
2553
2554
|
decodeStream: (r) => {
|
|
@@ -2573,7 +2574,7 @@ function _s(t, e) {
|
|
|
2573
2574
|
for (const n in e)
|
|
2574
2575
|
if (!U(e[n]))
|
|
2575
2576
|
throw new Error(`tag: variant ${n} is not CoderType`);
|
|
2576
|
-
return
|
|
2577
|
+
return I({
|
|
2577
2578
|
size: t.size,
|
|
2578
2579
|
encodeStream: (n, r) => {
|
|
2579
2580
|
const { TAG: s, data: i } = r, o = e[s];
|
|
@@ -2593,7 +2594,7 @@ function _s(t, e) {
|
|
|
2593
2594
|
}
|
|
2594
2595
|
});
|
|
2595
2596
|
}
|
|
2596
|
-
const
|
|
2597
|
+
const Ps = (t) => 0;
|
|
2597
2598
|
function Be(t, e) {
|
|
2598
2599
|
return e % t === 0 ? 0 : t - e % t;
|
|
2599
2600
|
}
|
|
@@ -2604,8 +2605,8 @@ function mn(t, e, n) {
|
|
|
2604
2605
|
throw new Error(`padLeft: wrong blockSize=${t}`);
|
|
2605
2606
|
if (n !== void 0 && typeof n != "function")
|
|
2606
2607
|
throw new Error(`padRight: wrong padFn=${typeof n}`);
|
|
2607
|
-
const r = n ||
|
|
2608
|
-
return
|
|
2608
|
+
const r = n || Ps;
|
|
2609
|
+
return I({
|
|
2609
2610
|
size: e.size ? e.size + Be(t, e.size) : void 0,
|
|
2610
2611
|
encodeStream: (s, i) => {
|
|
2611
2612
|
const o = s, a = o.pos;
|
|
@@ -2620,7 +2621,7 @@ function mn(t, e, n) {
|
|
|
2620
2621
|
}
|
|
2621
2622
|
});
|
|
2622
2623
|
}
|
|
2623
|
-
const
|
|
2624
|
+
const Is = 9, Ue = ne.decimal(Is), re = I({
|
|
2624
2625
|
encodeStream: (t, e) => {
|
|
2625
2626
|
if (!e)
|
|
2626
2627
|
return t.byte(0);
|
|
@@ -2638,7 +2639,7 @@ const Ps = 9, Ue = ne.decimal(Ps), re = P({
|
|
|
2638
2639
|
}
|
|
2639
2640
|
}), pe = As(mn(8, ve, void 0)), Ts = () => {
|
|
2640
2641
|
const t = $e(32);
|
|
2641
|
-
return
|
|
2642
|
+
return I({
|
|
2642
2643
|
size: t.size,
|
|
2643
2644
|
encodeStream: (e, n) => t.encodeStream(e, De.decode(n)),
|
|
2644
2645
|
decodeStream: (e) => De.encode(t.decodeStream(e))
|
|
@@ -2661,7 +2662,7 @@ const Us = (t, e, n, r, s) => ({
|
|
|
2661
2662
|
}), _t = p({
|
|
2662
2663
|
signatures: we(re, $e(64)),
|
|
2663
2664
|
msg: Ns
|
|
2664
|
-
}), Ge =
|
|
2665
|
+
}), Ge = I({
|
|
2665
2666
|
encodeStream: (t, e) => {
|
|
2666
2667
|
const { msg: n, signatures: r } = e, s = {}, i = (h, u, f) => {
|
|
2667
2668
|
let w = s[h] || (s[h] = { sign: !1, write: !1 });
|
|
@@ -2730,12 +2731,12 @@ const Us = (t, e, n, r, s) => ({
|
|
|
2730
2731
|
signatures: r
|
|
2731
2732
|
};
|
|
2732
2733
|
}
|
|
2733
|
-
}),
|
|
2734
|
+
}), Pt = {};
|
|
2734
2735
|
function dt(t, e, n) {
|
|
2735
|
-
if (
|
|
2736
|
+
if (Pt[t])
|
|
2736
2737
|
throw new Error("SOL: program for this address already defined");
|
|
2737
2738
|
const r = lt(e, Object.keys(n).reduce((a, l, c) => ({ ...a, [l]: c }), {})), s = Object.keys(n).reduce((a, l) => ({ ...a, [l]: n[l].coder }), {}), i = _s(r, s);
|
|
2738
|
-
|
|
2739
|
+
Pt[t] = (a, l) => {
|
|
2739
2740
|
if (a.program !== t)
|
|
2740
2741
|
throw new Error("SOL.parseInstruction: Wrong instruction program address");
|
|
2741
2742
|
const { TAG: c, data: d } = i.decode(a.data), h = { type: c, info: d }, u = Object.keys(n[c].keys);
|
|
@@ -2883,8 +2884,8 @@ const Ms = lt(N, {
|
|
|
2883
2884
|
FreezeAccount: 1,
|
|
2884
2885
|
AccountOwner: 2,
|
|
2885
2886
|
CloseAccount: 3
|
|
2886
|
-
}), W = (t, e) => e[t]?.symbol || t,
|
|
2887
|
-
dt(
|
|
2887
|
+
}), W = (t, e) => e[t]?.symbol || t, kn = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
2888
|
+
dt(kn, N, {
|
|
2888
2889
|
initializeMint: {
|
|
2889
2890
|
coder: p({
|
|
2890
2891
|
decimals: N,
|
|
@@ -3066,7 +3067,7 @@ dt(Rs, $s(0), {
|
|
|
3066
3067
|
wallet: { sign: !1, write: !1 },
|
|
3067
3068
|
mint: { sign: !1, write: !1 },
|
|
3068
3069
|
_sys: { address: yn, sign: !1, write: !1 },
|
|
3069
|
-
_token: { address:
|
|
3070
|
+
_token: { address: kn, sign: !1, write: !1 },
|
|
3070
3071
|
_rent: { address: V, sign: !1, write: !1 }
|
|
3071
3072
|
},
|
|
3072
3073
|
hint: (t, e) => `Initialize associated token account=${t.account} with owner=${t.wallet} for token=${W(t.mint, e)}, payed by ${t.source}`
|
|
@@ -3087,7 +3088,7 @@ p({
|
|
|
3087
3088
|
delegateAmount: v,
|
|
3088
3089
|
closeAuthority: se(Re, y, "11111111111111111111111111111111")
|
|
3089
3090
|
});
|
|
3090
|
-
function
|
|
3091
|
+
function It(t, e, n) {
|
|
3091
3092
|
if (!e.length)
|
|
3092
3093
|
throw new Error("SOLPublic: empty instructions array");
|
|
3093
3094
|
return ds.encode(Ge.encode({
|
|
@@ -3120,8 +3121,8 @@ function Os(t) {
|
|
|
3120
3121
|
const w = (f - u) * i + 1 >>> 0, C = new Uint8Array(w);
|
|
3121
3122
|
for (; u !== f; ) {
|
|
3122
3123
|
let b = c[u], g = 0;
|
|
3123
|
-
for (let
|
|
3124
|
-
b += 256 * C[
|
|
3124
|
+
for (let $ = w - 1; (b !== 0 || g < h) && $ !== -1; $--, g++)
|
|
3125
|
+
b += 256 * C[$] >>> 0, C[$] = b % n >>> 0, b = b / n >>> 0;
|
|
3125
3126
|
if (b !== 0)
|
|
3126
3127
|
throw new Error("Non-zero carry");
|
|
3127
3128
|
h = g, u++;
|
|
@@ -3150,12 +3151,12 @@ function Os(t) {
|
|
|
3150
3151
|
let g = e[b];
|
|
3151
3152
|
if (g === 255)
|
|
3152
3153
|
return;
|
|
3153
|
-
let
|
|
3154
|
-
for (let _ = f - 1; (g !== 0 ||
|
|
3154
|
+
let $ = 0;
|
|
3155
|
+
for (let _ = f - 1; (g !== 0 || $ < u) && _ !== -1; _--, $++)
|
|
3155
3156
|
g += n * w[_] >>> 0, w[_] = g % 256 >>> 0, g = g / 256 >>> 0;
|
|
3156
3157
|
if (g !== 0)
|
|
3157
3158
|
throw new Error("Non-zero carry");
|
|
3158
|
-
u =
|
|
3159
|
+
u = $, d++;
|
|
3159
3160
|
}
|
|
3160
3161
|
let C = f - u;
|
|
3161
3162
|
for (; C !== f && w[C] === 0; )
|
|
@@ -3201,7 +3202,7 @@ class ht {
|
|
|
3201
3202
|
return Buffer.from(Ge.encode(this._transaction));
|
|
3202
3203
|
if (!this.feePayer || !this.recentBlockhash)
|
|
3203
3204
|
throw new Error("Transaction requires feePayer and recentBlockhash");
|
|
3204
|
-
const n =
|
|
3205
|
+
const n = It(
|
|
3205
3206
|
this.feePayer.toString(),
|
|
3206
3207
|
this._instructions,
|
|
3207
3208
|
this.recentBlockhash
|
|
@@ -3211,7 +3212,7 @@ class ht {
|
|
|
3211
3212
|
serializeMessage() {
|
|
3212
3213
|
if (!this.feePayer || !this.recentBlockhash)
|
|
3213
3214
|
throw new Error("Transaction requires feePayer and recentBlockhash");
|
|
3214
|
-
const e =
|
|
3215
|
+
const e = It(
|
|
3215
3216
|
this.feePayer.toString(),
|
|
3216
3217
|
this._instructions,
|
|
3217
3218
|
this.recentBlockhash
|
|
@@ -3671,22 +3672,22 @@ class Ds extends jr {
|
|
|
3671
3672
|
propagateSessionErrors: T,
|
|
3672
3673
|
errorDisplayMode: b,
|
|
3673
3674
|
webauthnPopup: g,
|
|
3674
|
-
|
|
3675
|
+
...$
|
|
3675
3676
|
}) {
|
|
3676
3677
|
let _;
|
|
3677
|
-
const
|
|
3678
|
-
T &&
|
|
3678
|
+
const k = new URL(e ?? Ut), X = new qs();
|
|
3679
|
+
T && k.searchParams.set("propagate_error", "true"), b && k.searchParams.set("error_display_mode", b), r && k.searchParams.set("v", encodeURIComponent(r)), s && k.searchParams.set("ps", encodeURIComponent(s)), i && k.searchParams.set("ns", encodeURIComponent(i)), o?.erc20 && k.searchParams.set(
|
|
3679
3680
|
"erc20",
|
|
3680
3681
|
encodeURIComponent(o.erc20.toString())
|
|
3681
|
-
), c &&
|
|
3682
|
+
), c && k.searchParams.set("rpc_url", encodeURIComponent(c)), d && k.searchParams.set("ref", encodeURIComponent(d)), h && k.searchParams.set("ref_group", encodeURIComponent(h)), u && k.searchParams.set("needs_session_creation", "true"), f && k.searchParams.set("username", encodeURIComponent(f)), a && k.searchParams.set("preset", a), l && k.searchParams.set("should_override_preset_policies", "true"), g && k.searchParams.set("webauthn_popup", "true"), (!a || l) && n ? k.searchParams.set(
|
|
3682
3683
|
"policies",
|
|
3683
3684
|
encodeURIComponent(JSON.stringify(n))
|
|
3684
3685
|
) : a && n && console.warn(
|
|
3685
3686
|
"[Controller] Both `preset` and `policies` provided to ControllerProvider. Policies are ignored when preset is set. Use `shouldOverridePresetPolicies: true` to override."
|
|
3686
|
-
), m && (
|
|
3687
|
-
|
|
3687
|
+
), m && (k.hash = `kc=${encodeURIComponent(m)}`), super({
|
|
3688
|
+
...$,
|
|
3688
3689
|
id: "controller-keychain",
|
|
3689
|
-
url:
|
|
3690
|
+
url: k,
|
|
3690
3691
|
methods: {
|
|
3691
3692
|
...X.getIFrameMethods(),
|
|
3692
3693
|
// Expose callback for keychain to notify parent that session was created and storage access granted
|
|
@@ -3718,7 +3719,7 @@ class Ds extends jr {
|
|
|
3718
3719
|
}
|
|
3719
3720
|
}
|
|
3720
3721
|
const Y = /* @__PURE__ */ new Map(), Zs = `${Mt}/query`;
|
|
3721
|
-
async function
|
|
3722
|
+
async function xn(t) {
|
|
3722
3723
|
if (!t.addresses?.length && !t.usernames?.length)
|
|
3723
3724
|
return { results: [] };
|
|
3724
3725
|
const e = await fetch(`${Mt}/lookup`, {
|
|
@@ -3783,10 +3784,13 @@ const vn = [
|
|
|
3783
3784
|
"discord",
|
|
3784
3785
|
"walletconnect",
|
|
3785
3786
|
"password",
|
|
3787
|
+
"sms",
|
|
3786
3788
|
"metamask",
|
|
3787
3789
|
"rabby",
|
|
3788
3790
|
"phantom-evm"
|
|
3789
|
-
].filter(
|
|
3791
|
+
].filter(
|
|
3792
|
+
(t) => Ln.includes(t)
|
|
3793
|
+
);
|
|
3790
3794
|
function Gs(t, e) {
|
|
3791
3795
|
if (!t || t.length === 0)
|
|
3792
3796
|
return [];
|
|
@@ -3833,7 +3837,7 @@ async function Ys(t, e) {
|
|
|
3833
3837
|
}
|
|
3834
3838
|
async function Li(t) {
|
|
3835
3839
|
const e = t.filter((n) => !Y.has(n));
|
|
3836
|
-
return e.length > 0 && (await
|
|
3840
|
+
return e.length > 0 && (await xn({ usernames: e })).results.forEach((r) => {
|
|
3837
3841
|
Y.set(r.username, r.addresses[0]);
|
|
3838
3842
|
}), new Map(
|
|
3839
3843
|
t.map((n) => [n, Y.get(n)]).filter((n) => n[1] !== void 0)
|
|
@@ -3842,7 +3846,7 @@ async function Li(t) {
|
|
|
3842
3846
|
async function _i(t) {
|
|
3843
3847
|
t = t.map(Bt.toHex);
|
|
3844
3848
|
const e = t.filter((n) => !Y.has(n));
|
|
3845
|
-
return e.length > 0 && (await
|
|
3849
|
+
return e.length > 0 && (await xn({
|
|
3846
3850
|
addresses: e
|
|
3847
3851
|
})).results.forEach((r) => {
|
|
3848
3852
|
Y.set(r.addresses[0], r.username);
|
|
@@ -3882,7 +3886,7 @@ function Js(t) {
|
|
|
3882
3886
|
}
|
|
3883
3887
|
return { isValid: !0 };
|
|
3884
3888
|
}
|
|
3885
|
-
class
|
|
3889
|
+
class Pi extends _n {
|
|
3886
3890
|
keychain;
|
|
3887
3891
|
options;
|
|
3888
3892
|
iframes;
|
|
@@ -3932,7 +3936,7 @@ class Ii extends _n {
|
|
|
3932
3936
|
}
|
|
3933
3937
|
async logout() {
|
|
3934
3938
|
if (!this.keychain) {
|
|
3935
|
-
console.error(new
|
|
3939
|
+
console.error(new A().message);
|
|
3936
3940
|
return;
|
|
3937
3941
|
}
|
|
3938
3942
|
try {
|
|
@@ -3950,7 +3954,7 @@ class Ii extends _n {
|
|
|
3950
3954
|
if (this.iframes) {
|
|
3951
3955
|
try {
|
|
3952
3956
|
if (this.iframes.keychain || (this.iframes.keychain = this.createKeychainIframe()), await this.waitForKeychain(), !this.keychain) {
|
|
3953
|
-
console.error(new
|
|
3957
|
+
console.error(new A().message);
|
|
3954
3958
|
return;
|
|
3955
3959
|
}
|
|
3956
3960
|
const e = await this.keychain.probe(this.rpcUrl());
|
|
@@ -3980,7 +3984,7 @@ class Ii extends _n {
|
|
|
3980
3984
|
if (this.account)
|
|
3981
3985
|
return this.account;
|
|
3982
3986
|
if (this.iframes.keychain || (this.iframes.keychain = this.createKeychainIframe()), await this.waitForKeychain(), !this.keychain || !this.iframes.keychain) {
|
|
3983
|
-
console.error(new
|
|
3987
|
+
console.error(new A().message);
|
|
3984
3988
|
return;
|
|
3985
3989
|
}
|
|
3986
3990
|
try {
|
|
@@ -4042,7 +4046,7 @@ class Ii extends _n {
|
|
|
4042
4046
|
if (!this.iframes)
|
|
4043
4047
|
return !1;
|
|
4044
4048
|
if (!this.keychain || !this.iframes.keychain)
|
|
4045
|
-
return console.error(new
|
|
4049
|
+
return console.error(new A().message), !1;
|
|
4046
4050
|
const n = this.selectedChain;
|
|
4047
4051
|
try {
|
|
4048
4052
|
this.selectedChain = e, await this.keychain.switchChain(this.rpcUrl());
|
|
@@ -4055,7 +4059,7 @@ class Ii extends _n {
|
|
|
4055
4059
|
return Promise.resolve(!0);
|
|
4056
4060
|
}
|
|
4057
4061
|
async disconnect() {
|
|
4058
|
-
this.account = void 0
|
|
4062
|
+
this.account = void 0;
|
|
4059
4063
|
try {
|
|
4060
4064
|
if (typeof localStorage < "u") {
|
|
4061
4065
|
localStorage.removeItem("lastUsedConnector");
|
|
@@ -4067,16 +4071,16 @@ class Ii extends _n {
|
|
|
4067
4071
|
} catch {
|
|
4068
4072
|
}
|
|
4069
4073
|
if (!this.keychain) {
|
|
4070
|
-
console.error(new
|
|
4074
|
+
console.error(new A().message);
|
|
4071
4075
|
return;
|
|
4072
4076
|
}
|
|
4073
|
-
|
|
4077
|
+
await this.keychain.disconnect(), this.close(), this.emitAccountsChanged([]);
|
|
4074
4078
|
}
|
|
4075
4079
|
async openProfile(e = "inventory") {
|
|
4076
4080
|
if (!this.iframes)
|
|
4077
4081
|
return;
|
|
4078
4082
|
if (!this.keychain || !this.iframes.keychain) {
|
|
4079
|
-
console.error(new
|
|
4083
|
+
console.error(new A().message);
|
|
4080
4084
|
return;
|
|
4081
4085
|
}
|
|
4082
4086
|
if (!this.account) {
|
|
@@ -4092,7 +4096,7 @@ class Ii extends _n {
|
|
|
4092
4096
|
if (!this.iframes)
|
|
4093
4097
|
return;
|
|
4094
4098
|
if (!this.keychain || !this.iframes.keychain) {
|
|
4095
|
-
console.error(new
|
|
4099
|
+
console.error(new A().message);
|
|
4096
4100
|
return;
|
|
4097
4101
|
}
|
|
4098
4102
|
if (!this.account) {
|
|
@@ -4107,7 +4111,7 @@ class Ii extends _n {
|
|
|
4107
4111
|
async openProfileAt(e) {
|
|
4108
4112
|
if (this.iframes) {
|
|
4109
4113
|
if (!this.keychain || !this.iframes.keychain) {
|
|
4110
|
-
console.error(new
|
|
4114
|
+
console.error(new A().message);
|
|
4111
4115
|
return;
|
|
4112
4116
|
}
|
|
4113
4117
|
if (!this.account) {
|
|
@@ -4120,7 +4124,7 @@ class Ii extends _n {
|
|
|
4120
4124
|
openSettings() {
|
|
4121
4125
|
if (this.iframes) {
|
|
4122
4126
|
if (!this.keychain || !this.iframes.keychain) {
|
|
4123
|
-
console.error(new
|
|
4127
|
+
console.error(new A().message);
|
|
4124
4128
|
return;
|
|
4125
4129
|
}
|
|
4126
4130
|
this.iframes.keychain.open(), this.keychain.openSettings();
|
|
@@ -4134,7 +4138,7 @@ class Ii extends _n {
|
|
|
4134
4138
|
throw new Error("Either `policies` or `preset` must be provided");
|
|
4135
4139
|
if (this.iframes) {
|
|
4136
4140
|
if (this.iframes.keychain || (this.iframes.keychain = this.createKeychainIframe()), await this.waitForKeychain(), !this.keychain || !this.iframes.keychain) {
|
|
4137
|
-
console.error(new
|
|
4141
|
+
console.error(new A().message);
|
|
4138
4142
|
return;
|
|
4139
4143
|
}
|
|
4140
4144
|
this.iframes.keychain.open();
|
|
@@ -4154,7 +4158,7 @@ class Ii extends _n {
|
|
|
4154
4158
|
}
|
|
4155
4159
|
}
|
|
4156
4160
|
revoke(e, n) {
|
|
4157
|
-
return this.keychain ? this.keychain.revoke(e) : (console.error(new
|
|
4161
|
+
return this.keychain ? this.keychain.revoke(e) : (console.error(new A().message), null);
|
|
4158
4162
|
}
|
|
4159
4163
|
rpcUrl() {
|
|
4160
4164
|
const e = this.chains.get(this.selectedChain);
|
|
@@ -4170,11 +4174,26 @@ class Ii extends _n {
|
|
|
4170
4174
|
}
|
|
4171
4175
|
username() {
|
|
4172
4176
|
if (!this.keychain) {
|
|
4173
|
-
console.error(new
|
|
4177
|
+
console.error(new A().message);
|
|
4174
4178
|
return;
|
|
4175
4179
|
}
|
|
4176
4180
|
return this.keychain.username();
|
|
4177
4181
|
}
|
|
4182
|
+
async openLocationPrompt(e) {
|
|
4183
|
+
if (!this.iframes)
|
|
4184
|
+
return;
|
|
4185
|
+
if (!this.keychain || !this.iframes.keychain) {
|
|
4186
|
+
console.error(new A().message);
|
|
4187
|
+
return;
|
|
4188
|
+
}
|
|
4189
|
+
const n = this.keychain.openLocationPrompt(e);
|
|
4190
|
+
this.iframes.keychain.open();
|
|
4191
|
+
try {
|
|
4192
|
+
return await n;
|
|
4193
|
+
} finally {
|
|
4194
|
+
this.iframes.keychain.close();
|
|
4195
|
+
}
|
|
4196
|
+
}
|
|
4178
4197
|
async lookupUsername(e) {
|
|
4179
4198
|
const n = e.trim();
|
|
4180
4199
|
if (!n)
|
|
@@ -4184,7 +4203,7 @@ class Ii extends _n {
|
|
|
4184
4203
|
openPurchaseCredits() {
|
|
4185
4204
|
if (this.iframes) {
|
|
4186
4205
|
if (!this.keychain || !this.iframes.keychain) {
|
|
4187
|
-
console.error(new
|
|
4206
|
+
console.error(new A().message);
|
|
4188
4207
|
return;
|
|
4189
4208
|
}
|
|
4190
4209
|
this.keychain.navigate("/purchase/credits").then(() => {
|
|
@@ -4192,11 +4211,23 @@ class Ii extends _n {
|
|
|
4192
4211
|
});
|
|
4193
4212
|
}
|
|
4194
4213
|
}
|
|
4214
|
+
async openBundle(e, n, r) {
|
|
4215
|
+
if (!this.iframes)
|
|
4216
|
+
return;
|
|
4217
|
+
if (!this.keychain || !this.iframes.keychain) {
|
|
4218
|
+
console.error(new A().message);
|
|
4219
|
+
return;
|
|
4220
|
+
}
|
|
4221
|
+
const { onPurchaseComplete: s, ...i } = r ?? {};
|
|
4222
|
+
this.iframes.keychain.setOnStarterpackPlay(s);
|
|
4223
|
+
const o = Object.keys(i).length > 0 ? i : void 0;
|
|
4224
|
+
await this.keychain.openBundle(e, n, o), this.iframes.keychain?.open();
|
|
4225
|
+
}
|
|
4195
4226
|
async openStarterPack(e, n) {
|
|
4196
4227
|
if (!this.iframes)
|
|
4197
4228
|
return;
|
|
4198
4229
|
if (!this.keychain || !this.iframes.keychain) {
|
|
4199
|
-
console.error(new
|
|
4230
|
+
console.error(new A().message);
|
|
4200
4231
|
return;
|
|
4201
4232
|
}
|
|
4202
4233
|
const { onPurchaseComplete: r, ...s } = n ?? {};
|
|
@@ -4208,7 +4239,7 @@ class Ii extends _n {
|
|
|
4208
4239
|
if (!this.iframes)
|
|
4209
4240
|
return;
|
|
4210
4241
|
if (!this.keychain || !this.iframes.keychain) {
|
|
4211
|
-
console.error(new
|
|
4242
|
+
console.error(new A().message);
|
|
4212
4243
|
return;
|
|
4213
4244
|
}
|
|
4214
4245
|
let r = this.selectedChain;
|
|
@@ -4220,7 +4251,7 @@ class Ii extends _n {
|
|
|
4220
4251
|
};
|
|
4221
4252
|
}
|
|
4222
4253
|
async delegateAccount() {
|
|
4223
|
-
return this.keychain ? await this.keychain.delegateAccount() : (console.error(new
|
|
4254
|
+
return this.keychain ? await this.keychain.delegateAccount() : (console.error(new A().message), null);
|
|
4224
4255
|
}
|
|
4225
4256
|
/**
|
|
4226
4257
|
* Returns a wallet standard interface for the controller.
|
|
@@ -4285,7 +4316,7 @@ class Ii extends _n {
|
|
|
4285
4316
|
initializeChains(e) {
|
|
4286
4317
|
for (const n of e)
|
|
4287
4318
|
try {
|
|
4288
|
-
const r = new URL(n.rpcUrl), s =
|
|
4319
|
+
const r = new URL(n.rpcUrl), s = Pn(r);
|
|
4289
4320
|
this.chains.set(s, n);
|
|
4290
4321
|
} catch (r) {
|
|
4291
4322
|
throw console.error(`Failed to parse chainId for ${n.rpcUrl}:`, r), r;
|
|
@@ -4306,7 +4337,7 @@ class Ii extends _n {
|
|
|
4306
4337
|
onConnect: (o) => {
|
|
4307
4338
|
this.keychain = o;
|
|
4308
4339
|
},
|
|
4309
|
-
version:
|
|
4340
|
+
version: In,
|
|
4310
4341
|
ref: this.referral.ref,
|
|
4311
4342
|
refGroup: this.referral.refGroup,
|
|
4312
4343
|
needsSessionCreation: e,
|
|
@@ -4336,7 +4367,7 @@ class Ii extends _n {
|
|
|
4336
4367
|
});
|
|
4337
4368
|
}
|
|
4338
4369
|
}
|
|
4339
|
-
const
|
|
4370
|
+
const x = "cartridge-toast-container", Qs = 3e3, ei = "bottom-right", En = "cartridge-toast-show";
|
|
4340
4371
|
function ut() {
|
|
4341
4372
|
try {
|
|
4342
4373
|
return typeof window < "u" && window.self !== window.top;
|
|
@@ -4357,8 +4388,8 @@ function ti() {
|
|
|
4357
4388
|
return document;
|
|
4358
4389
|
}
|
|
4359
4390
|
function ni(t, e) {
|
|
4360
|
-
let n = t.getElementById(
|
|
4361
|
-
return n || (n = t.createElement("div"), n.id =
|
|
4391
|
+
let n = t.getElementById(x);
|
|
4392
|
+
return n || (n = t.createElement("div"), n.id = x, t.body && t.body.appendChild(n)), n.className = e, n;
|
|
4362
4393
|
}
|
|
4363
4394
|
function ri(t) {
|
|
4364
4395
|
t.classList.add("closing"), setTimeout(() => {
|
|
@@ -4373,7 +4404,7 @@ function si(t) {
|
|
|
4373
4404
|
}
|
|
4374
4405
|
function ii() {
|
|
4375
4406
|
return `
|
|
4376
|
-
#${
|
|
4407
|
+
#${x} {
|
|
4377
4408
|
position: fixed;
|
|
4378
4409
|
z-index: 999999;
|
|
4379
4410
|
pointer-events: none;
|
|
@@ -4383,38 +4414,38 @@ function ii() {
|
|
|
4383
4414
|
gap: 12px;
|
|
4384
4415
|
}
|
|
4385
4416
|
|
|
4386
|
-
#${
|
|
4417
|
+
#${x}.top-left {
|
|
4387
4418
|
top: 20px;
|
|
4388
4419
|
left: 20px;
|
|
4389
4420
|
align-items: flex-start;
|
|
4390
4421
|
}
|
|
4391
4422
|
|
|
4392
|
-
#${
|
|
4423
|
+
#${x}.top-right {
|
|
4393
4424
|
top: 20px;
|
|
4394
4425
|
right: 20px;
|
|
4395
4426
|
align-items: flex-end;
|
|
4396
4427
|
}
|
|
4397
4428
|
|
|
4398
|
-
#${
|
|
4429
|
+
#${x}.top-center {
|
|
4399
4430
|
top: 20px;
|
|
4400
4431
|
left: 50%;
|
|
4401
4432
|
transform: translateX(-50%);
|
|
4402
4433
|
align-items: center;
|
|
4403
4434
|
}
|
|
4404
4435
|
|
|
4405
|
-
#${
|
|
4436
|
+
#${x}.bottom-left {
|
|
4406
4437
|
bottom: 20px;
|
|
4407
4438
|
left: 20px;
|
|
4408
4439
|
align-items: flex-start;
|
|
4409
4440
|
}
|
|
4410
4441
|
|
|
4411
|
-
#${
|
|
4442
|
+
#${x}.bottom-right {
|
|
4412
4443
|
bottom: 20px;
|
|
4413
4444
|
right: 20px;
|
|
4414
4445
|
align-items: flex-end;
|
|
4415
4446
|
}
|
|
4416
4447
|
|
|
4417
|
-
#${
|
|
4448
|
+
#${x}.bottom-center {
|
|
4418
4449
|
bottom: 20px;
|
|
4419
4450
|
left: 50%;
|
|
4420
4451
|
transform: translateX(-50%);
|
|
@@ -4430,18 +4461,18 @@ function ii() {
|
|
|
4430
4461
|
pointer-events: auto;
|
|
4431
4462
|
}
|
|
4432
4463
|
|
|
4433
|
-
#${
|
|
4434
|
-
#${
|
|
4464
|
+
#${x}.top-right .cartridge-toast,
|
|
4465
|
+
#${x}.bottom-right .cartridge-toast {
|
|
4435
4466
|
align-self: flex-end;
|
|
4436
4467
|
}
|
|
4437
4468
|
|
|
4438
|
-
#${
|
|
4439
|
-
#${
|
|
4469
|
+
#${x}.top-left .cartridge-toast,
|
|
4470
|
+
#${x}.bottom-left .cartridge-toast {
|
|
4440
4471
|
align-self: flex-start;
|
|
4441
4472
|
}
|
|
4442
4473
|
|
|
4443
|
-
#${
|
|
4444
|
-
#${
|
|
4474
|
+
#${x}.top-center .cartridge-toast,
|
|
4475
|
+
#${x}.bottom-center .cartridge-toast {
|
|
4445
4476
|
align-self: center;
|
|
4446
4477
|
}
|
|
4447
4478
|
|
|
@@ -4477,9 +4508,9 @@ function ii() {
|
|
|
4477
4508
|
max-width: calc(100vw - 40px);
|
|
4478
4509
|
}
|
|
4479
4510
|
|
|
4480
|
-
#${
|
|
4481
|
-
#${
|
|
4482
|
-
#${
|
|
4511
|
+
#${x}.top-left,
|
|
4512
|
+
#${x}.top-right,
|
|
4513
|
+
#${x}.top-center {
|
|
4483
4514
|
top: 10px;
|
|
4484
4515
|
left: 20px;
|
|
4485
4516
|
right: 20px;
|
|
@@ -4487,9 +4518,9 @@ function ii() {
|
|
|
4487
4518
|
align-items: stretch;
|
|
4488
4519
|
}
|
|
4489
4520
|
|
|
4490
|
-
#${
|
|
4491
|
-
#${
|
|
4492
|
-
#${
|
|
4521
|
+
#${x}.bottom-left,
|
|
4522
|
+
#${x}.bottom-right,
|
|
4523
|
+
#${x}.bottom-center {
|
|
4493
4524
|
bottom: 10px;
|
|
4494
4525
|
left: 20px;
|
|
4495
4526
|
right: 20px;
|
|
@@ -5278,7 +5309,7 @@ function Ci(t) {
|
|
|
5278
5309
|
const bi = () => {
|
|
5279
5310
|
const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
5280
5311
|
return e.setAttribute("width", "34"), e.setAttribute("height", "34"), e.setAttribute("viewBox", "0 0 30 30"), e.style.width = "100%", e.style.height = "100%", e.innerHTML = '<path d="M3 6.5V8C3 8.55312 3.44687 9 4 9H4.5H6V6.5C6 5.67188 5.32812 5 4.5 5C3.67188 5 3 5.67188 3 6.5ZM6.5 5C6.8125 5.41875 7 5.9375 7 6.5V16C7 17.1031 7.89687 18 9 18C10.1031 18 11 17.1031 11 16V15.8344C11 14.8219 11.8219 14 12.8344 14H18V8C18 6.34375 16.6562 5 15 5H6.5ZM17.5 19C19.4344 19 21 17.4344 21 15.5C21 15.225 20.775 15 20.5 15H12.8344C12.375 15 12 15.3719 12 15.8344V16C12 17.6562 10.6562 19 9 19H14.5H17.5Z" fill="white"/>', t.appendChild(e), t;
|
|
5281
|
-
},
|
|
5312
|
+
}, ki = (t) => {
|
|
5282
5313
|
const e = t.borderRadius ?? 8, n = !isFinite(t.duration) || t.duration <= 0, r = document.createElement("div");
|
|
5283
5314
|
r.className = "cartridge-toast-progress-bar", r.style.position = "absolute", r.style.bottom = "0", r.style.left = "0", r.style.right = "0", r.style.height = "4px", r.style.overflow = "hidden", r.style.borderBottomLeftRadius = `${e}px`, r.style.borderBottomRightRadius = `${e}px`, r.style.backgroundColor = "rgba(255, 255, 255, 0.2)";
|
|
5284
5315
|
const s = document.createElement("div");
|
|
@@ -5291,14 +5322,14 @@ const bi = () => {
|
|
|
5291
5322
|
}, t.duration)), r.appendChild(s), r;
|
|
5292
5323
|
};
|
|
5293
5324
|
function Tt(t, e, n, r) {
|
|
5294
|
-
const s =
|
|
5325
|
+
const s = ki({
|
|
5295
5326
|
duration: e,
|
|
5296
5327
|
onComplete: n,
|
|
5297
5328
|
borderRadius: r
|
|
5298
5329
|
});
|
|
5299
5330
|
t.appendChild(s);
|
|
5300
5331
|
}
|
|
5301
|
-
function
|
|
5332
|
+
function xi(t) {
|
|
5302
5333
|
switch (t.variant) {
|
|
5303
5334
|
case "error":
|
|
5304
5335
|
return ai(t);
|
|
@@ -5338,7 +5369,7 @@ function vi(t, e) {
|
|
|
5338
5369
|
}
|
|
5339
5370
|
function Ye(t, e) {
|
|
5340
5371
|
si(t), vi(t, e.variant);
|
|
5341
|
-
const n = e.position || ei, r = ni(t, n), s =
|
|
5372
|
+
const n = e.position || ei, r = ni(t, n), s = xi(e), i = () => ri(s);
|
|
5342
5373
|
r.appendChild(s), e.onClick && (s.style.cursor = "pointer", s.addEventListener("click", (d) => {
|
|
5343
5374
|
!d.target.closest("#close-button") && e.onClick && e.onClick();
|
|
5344
5375
|
}));
|
|
@@ -5412,14 +5443,14 @@ export {
|
|
|
5412
5443
|
Ln as IMPLEMENTED_AUTH_OPTIONS,
|
|
5413
5444
|
zi as InvalidCredentialsError,
|
|
5414
5445
|
ss as MetaMaskWallet,
|
|
5415
|
-
|
|
5446
|
+
A as NotReadyToConnect,
|
|
5416
5447
|
js as PhantomEVMWallet,
|
|
5417
5448
|
zs as PhantomWallet,
|
|
5418
5449
|
Hs as RabbyWallet,
|
|
5419
5450
|
R as ResponseCodes,
|
|
5420
5451
|
qs as WalletBridge,
|
|
5421
|
-
|
|
5422
|
-
|
|
5452
|
+
Pe as chainIdToPlatform,
|
|
5453
|
+
Pi as default,
|
|
5423
5454
|
ji as defaultTheme,
|
|
5424
5455
|
Hi as erc20Metadata,
|
|
5425
5456
|
Wi as getAvailableConfigs,
|
|
@@ -5432,7 +5463,7 @@ export {
|
|
|
5432
5463
|
Ys as lookupUsername,
|
|
5433
5464
|
Li as lookupUsernames,
|
|
5434
5465
|
Xi as normalizeCalls,
|
|
5435
|
-
|
|
5466
|
+
Pn as parseChainId,
|
|
5436
5467
|
Gi as parsePolicies,
|
|
5437
5468
|
Rt as sanitizeImageSrc,
|
|
5438
5469
|
$n as toArray,
|