@cartridge/controller 0.7.9-alpha.1 → 0.7.9
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 +51 -49
- package/.turbo/turbo-build.log +47 -45
- package/dist/controller.d.ts +1 -0
- package/dist/index.js +1343 -364
- 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-CH2PlazB.js} +12 -12
- package/dist/provider-CH2PlazB.js.map +1 -0
- package/dist/session.js +2 -2
- package/dist/session.js.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/types.d.ts +1 -0
- 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/controller.ts +14 -0
- package/src/types.ts +1 -0
- 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/provider-qJi60GEX.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { WalletAccount as
|
|
2
|
-
import { R as A, t as
|
|
3
|
-
import { h as
|
|
1
|
+
import { WalletAccount as L, shortString as M, num as O } from "starknet";
|
|
2
|
+
import { R as A, t as Y, K as $, P as W, B as H, N as b, p as K, A as q } from "./provider-CH2PlazB.js";
|
|
3
|
+
import { h as Oe, n as Ye, a as $e, b as We } from "./provider-CH2PlazB.js";
|
|
4
4
|
import { MetaMaskSDK as G } from "@metamask/sdk";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { Transaction as V } from "@solana/web3.js";
|
|
6
|
+
import { connect as J } from "starknetkit";
|
|
7
|
+
import { InjectedConnector as X } from "starknetkit/injected";
|
|
8
|
+
class z extends L {
|
|
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, n, r, a, c) {
|
|
14
|
+
super({ nodeUrl: t }, e), this.address = n, this.keychain = r, this.options = a, this.modal = c;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Invoke execute function in account contract
|
|
@@ -25,34 +26,34 @@ class N extends O {
|
|
|
25
26
|
* @returns response from addTransaction
|
|
26
27
|
*/
|
|
27
28
|
async execute(e) {
|
|
28
|
-
return e =
|
|
29
|
-
const
|
|
29
|
+
return e = Y(e), new Promise(async (t, n) => {
|
|
30
|
+
const r = await this.keychain.execute(
|
|
30
31
|
e,
|
|
31
32
|
void 0,
|
|
32
33
|
void 0,
|
|
33
34
|
!1
|
|
34
35
|
);
|
|
35
|
-
if (
|
|
36
|
-
t(
|
|
36
|
+
if (r.code === A.SUCCESS) {
|
|
37
|
+
t(r);
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
|
-
if (this.options?.propagateSessionErrors &&
|
|
40
|
-
|
|
40
|
+
if (this.options?.propagateSessionErrors && r.code !== A.USER_INTERACTION_REQUIRED) {
|
|
41
|
+
n(r.error);
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
this.modal.open();
|
|
44
|
-
const
|
|
45
|
+
const a = await this.keychain.execute(
|
|
45
46
|
e,
|
|
46
47
|
void 0,
|
|
47
48
|
void 0,
|
|
48
49
|
!0,
|
|
49
|
-
|
|
50
|
+
r.error
|
|
50
51
|
);
|
|
51
|
-
if (
|
|
52
|
-
t(
|
|
52
|
+
if (a.code === A.SUCCESS) {
|
|
53
|
+
t(a), this.modal.close();
|
|
53
54
|
return;
|
|
54
55
|
}
|
|
55
|
-
a
|
|
56
|
+
n(a.error);
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
/**
|
|
@@ -64,263 +65,263 @@ 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
|
-
const
|
|
69
|
-
if (!("code" in
|
|
70
|
-
t(
|
|
68
|
+
return new Promise(async (t, n) => {
|
|
69
|
+
const r = await this.keychain.signMessage(e, "", !0);
|
|
70
|
+
if (!("code" in r)) {
|
|
71
|
+
t(r);
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
74
|
this.modal.open();
|
|
74
|
-
const
|
|
75
|
-
"code" in
|
|
75
|
+
const a = await this.keychain.signMessage(e, "", !1);
|
|
76
|
+
"code" in a ? n(a.error) : t(a), this.modal.close();
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
|
-
var
|
|
80
|
-
(function(
|
|
81
|
-
|
|
82
|
-
})(
|
|
83
|
-
var
|
|
84
|
-
(function(
|
|
85
|
-
|
|
86
|
-
})(
|
|
80
|
+
var u;
|
|
81
|
+
(function(o) {
|
|
82
|
+
o.Call = "call", o.Reply = "reply", o.Syn = "syn", o.SynAck = "synAck", o.Ack = "ack";
|
|
83
|
+
})(u || (u = {}));
|
|
84
|
+
var C;
|
|
85
|
+
(function(o) {
|
|
86
|
+
o.Fulfilled = "fulfilled", o.Rejected = "rejected";
|
|
87
|
+
})(C || (C = {}));
|
|
87
88
|
var S;
|
|
88
|
-
(function(
|
|
89
|
-
|
|
89
|
+
(function(o) {
|
|
90
|
+
o.ConnectionDestroyed = "ConnectionDestroyed", o.ConnectionTimeout = "ConnectionTimeout", o.NoIframeSrc = "NoIframeSrc";
|
|
90
91
|
})(S || (S = {}));
|
|
91
|
-
var
|
|
92
|
-
(function(
|
|
93
|
-
|
|
94
|
-
})(
|
|
95
|
-
var
|
|
96
|
-
(function(
|
|
97
|
-
|
|
98
|
-
})(
|
|
99
|
-
const
|
|
92
|
+
var D;
|
|
93
|
+
(function(o) {
|
|
94
|
+
o.DataCloneError = "DataCloneError";
|
|
95
|
+
})(D || (D = {}));
|
|
96
|
+
var _;
|
|
97
|
+
(function(o) {
|
|
98
|
+
o.Message = "message";
|
|
99
|
+
})(_ || (_ = {}));
|
|
100
|
+
const Z = (o, e) => {
|
|
100
101
|
const t = [];
|
|
101
|
-
let
|
|
102
|
+
let n = !1;
|
|
102
103
|
return {
|
|
103
|
-
destroy(
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
destroy(r) {
|
|
105
|
+
n || (n = !0, e(`${o}: Destroying connection`), t.forEach((a) => {
|
|
106
|
+
a(r);
|
|
106
107
|
}));
|
|
107
108
|
},
|
|
108
|
-
onDestroy(
|
|
109
|
-
|
|
109
|
+
onDestroy(r) {
|
|
110
|
+
n ? r() : t.push(r);
|
|
110
111
|
}
|
|
111
112
|
};
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
},
|
|
113
|
+
}, ee = (o) => (...e) => {
|
|
114
|
+
o && console.log("[Penpal]", ...e);
|
|
115
|
+
}, te = {
|
|
115
116
|
"http:": "80",
|
|
116
117
|
"https:": "443"
|
|
117
|
-
},
|
|
118
|
-
if (
|
|
118
|
+
}, ne = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, oe = ["file:", "data:"], re = (o) => {
|
|
119
|
+
if (o && oe.find((i) => o.startsWith(i)))
|
|
119
120
|
return "null";
|
|
120
|
-
const e = document.location, t =
|
|
121
|
-
let
|
|
122
|
-
t ? (
|
|
123
|
-
const c =
|
|
124
|
-
return `${
|
|
125
|
-
},
|
|
126
|
-
name:
|
|
121
|
+
const e = document.location, t = ne.exec(o);
|
|
122
|
+
let n, r, a;
|
|
123
|
+
t ? (n = t[1] ? t[1] : e.protocol, r = t[2], a = t[4]) : (n = e.protocol, r = e.hostname, a = e.port);
|
|
124
|
+
const c = a && a !== te[n] ? `:${a}` : "";
|
|
125
|
+
return `${n}//${r}${c}`;
|
|
126
|
+
}, N = ({ name: o, message: e, stack: t }) => ({
|
|
127
|
+
name: o,
|
|
127
128
|
message: e,
|
|
128
129
|
stack: t
|
|
129
|
-
}),
|
|
130
|
+
}), ae = (o) => {
|
|
130
131
|
const e = new Error();
|
|
131
|
-
return Object.keys(
|
|
132
|
-
},
|
|
133
|
-
const { localName:
|
|
134
|
-
let
|
|
135
|
-
const
|
|
136
|
-
if (d.source !==
|
|
132
|
+
return Object.keys(o).forEach((t) => e[t] = o[t]), e;
|
|
133
|
+
}, ie = (o, e, t) => {
|
|
134
|
+
const { localName: n, local: r, remote: a, originForSending: c, originForReceiving: i } = o;
|
|
135
|
+
let s = !1;
|
|
136
|
+
const l = (d) => {
|
|
137
|
+
if (d.source !== a || d.data.penpal !== u.Call)
|
|
137
138
|
return;
|
|
138
|
-
if (
|
|
139
|
-
t(`${
|
|
139
|
+
if (i !== "*" && d.origin !== i) {
|
|
140
|
+
t(`${n} received message from origin ${d.origin} which did not match expected origin ${i}`);
|
|
140
141
|
return;
|
|
141
142
|
}
|
|
142
|
-
const
|
|
143
|
-
t(`${
|
|
144
|
-
const w = (
|
|
145
|
-
if (t(`${
|
|
146
|
-
t(`${
|
|
143
|
+
const p = d.data, { methodName: h, args: m, id: v } = p;
|
|
144
|
+
t(`${n}: Received ${h}() call`);
|
|
145
|
+
const w = (f) => (k) => {
|
|
146
|
+
if (t(`${n}: Sending ${h}() reply`), s) {
|
|
147
|
+
t(`${n}: Unable to send ${h}() reply due to destroyed connection`);
|
|
147
148
|
return;
|
|
148
149
|
}
|
|
149
|
-
const
|
|
150
|
-
penpal:
|
|
151
|
-
id:
|
|
152
|
-
resolution:
|
|
150
|
+
const y = {
|
|
151
|
+
penpal: u.Reply,
|
|
152
|
+
id: v,
|
|
153
|
+
resolution: f,
|
|
153
154
|
returnValue: k
|
|
154
155
|
};
|
|
155
|
-
|
|
156
|
+
f === C.Rejected && k instanceof Error && (y.returnValue = N(k), y.returnValueIsError = !0);
|
|
156
157
|
try {
|
|
157
|
-
|
|
158
|
-
} catch (
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
penpal:
|
|
162
|
-
id:
|
|
163
|
-
resolution:
|
|
164
|
-
returnValue:
|
|
158
|
+
a.postMessage(y, c);
|
|
159
|
+
} catch (g) {
|
|
160
|
+
if (g.name === D.DataCloneError) {
|
|
161
|
+
const I = {
|
|
162
|
+
penpal: u.Reply,
|
|
163
|
+
id: v,
|
|
164
|
+
resolution: C.Rejected,
|
|
165
|
+
returnValue: N(g),
|
|
165
166
|
returnValueIsError: !0
|
|
166
167
|
};
|
|
167
|
-
|
|
168
|
+
a.postMessage(I, c);
|
|
168
169
|
}
|
|
169
|
-
throw
|
|
170
|
+
throw g;
|
|
170
171
|
}
|
|
171
172
|
};
|
|
172
|
-
new Promise((
|
|
173
|
+
new Promise((f) => f(e[h].call(e, d.origin).apply(e, m))).then(w(C.Fulfilled), w(C.Rejected));
|
|
173
174
|
};
|
|
174
|
-
return
|
|
175
|
-
|
|
175
|
+
return r.addEventListener(_.Message, l), () => {
|
|
176
|
+
s = !0, r.removeEventListener(_.Message, l);
|
|
176
177
|
};
|
|
177
178
|
};
|
|
178
179
|
let se = 0;
|
|
179
|
-
const
|
|
180
|
-
const t =
|
|
181
|
-
return t.push(
|
|
182
|
-
}, le = (
|
|
183
|
-
const
|
|
184
|
-
return
|
|
185
|
-
},
|
|
180
|
+
const ce = () => ++se, j = ".", B = (o) => o ? o.split(j) : [], de = (o) => o.join(j), pe = (o, e) => {
|
|
181
|
+
const t = B(e || "");
|
|
182
|
+
return t.push(o), de(t);
|
|
183
|
+
}, le = (o, e, t) => {
|
|
184
|
+
const n = B(e);
|
|
185
|
+
return n.reduce((r, a, c) => (typeof r[a] > "u" && (r[a] = {}), c === n.length - 1 && (r[a] = t), r[a]), o), o;
|
|
186
|
+
}, T = (o, e) => {
|
|
186
187
|
const t = {};
|
|
187
|
-
return Object.keys(
|
|
188
|
-
const
|
|
189
|
-
typeof
|
|
188
|
+
return Object.keys(o).forEach((n) => {
|
|
189
|
+
const r = o[n], a = pe(n, e);
|
|
190
|
+
typeof r == "object" && Object.assign(t, T(r, a)), typeof r == "function" && (t[a] = r);
|
|
190
191
|
}), t;
|
|
191
|
-
},
|
|
192
|
+
}, ge = (o) => {
|
|
192
193
|
const e = {};
|
|
193
|
-
for (const t in
|
|
194
|
-
le(e, t,
|
|
194
|
+
for (const t in o)
|
|
195
|
+
le(e, t, o[t]);
|
|
195
196
|
return e;
|
|
196
|
-
}, me = (
|
|
197
|
-
const { localName:
|
|
197
|
+
}, me = (o, e, t, n, r) => {
|
|
198
|
+
const { localName: a, local: c, remote: i, originForSending: s, originForReceiving: l } = e;
|
|
198
199
|
let d = !1;
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
|
|
200
|
+
r(`${a}: Connecting call sender`);
|
|
201
|
+
const p = (m) => (...v) => {
|
|
202
|
+
r(`${a}: Sending ${m}() call`);
|
|
202
203
|
let w;
|
|
203
204
|
try {
|
|
204
|
-
|
|
205
|
+
i.closed && (w = !0);
|
|
205
206
|
} catch {
|
|
206
207
|
w = !0;
|
|
207
208
|
}
|
|
208
|
-
if (w &&
|
|
209
|
-
const
|
|
210
|
-
throw
|
|
209
|
+
if (w && n(), d) {
|
|
210
|
+
const f = new Error(`Unable to send ${m}() call due to destroyed connection`);
|
|
211
|
+
throw f.code = S.ConnectionDestroyed, f;
|
|
211
212
|
}
|
|
212
|
-
return new Promise((
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
213
|
+
return new Promise((f, k) => {
|
|
214
|
+
const y = ce(), g = (x) => {
|
|
215
|
+
if (x.source !== i || x.data.penpal !== u.Reply || x.data.id !== y)
|
|
215
216
|
return;
|
|
216
|
-
if (
|
|
217
|
-
|
|
217
|
+
if (l !== "*" && x.origin !== l) {
|
|
218
|
+
r(`${a} received message from origin ${x.origin} which did not match expected origin ${l}`);
|
|
218
219
|
return;
|
|
219
220
|
}
|
|
220
|
-
const E =
|
|
221
|
-
|
|
222
|
-
let
|
|
223
|
-
E.returnValueIsError && (
|
|
221
|
+
const E = x.data;
|
|
222
|
+
r(`${a}: Received ${m}() reply`), c.removeEventListener(_.Message, g);
|
|
223
|
+
let P = E.returnValue;
|
|
224
|
+
E.returnValueIsError && (P = ae(P)), (E.resolution === C.Fulfilled ? f : k)(P);
|
|
224
225
|
};
|
|
225
|
-
c.addEventListener(
|
|
226
|
-
const
|
|
227
|
-
penpal:
|
|
228
|
-
id:
|
|
229
|
-
methodName:
|
|
230
|
-
args:
|
|
226
|
+
c.addEventListener(_.Message, g);
|
|
227
|
+
const I = {
|
|
228
|
+
penpal: u.Call,
|
|
229
|
+
id: y,
|
|
230
|
+
methodName: m,
|
|
231
|
+
args: v
|
|
231
232
|
};
|
|
232
|
-
|
|
233
|
+
i.postMessage(I, s);
|
|
233
234
|
});
|
|
234
|
-
},
|
|
235
|
-
return Object.assign(
|
|
235
|
+
}, h = t.reduce((m, v) => (m[v] = p(v), m), {});
|
|
236
|
+
return Object.assign(o, ge(h)), () => {
|
|
236
237
|
d = !0;
|
|
237
238
|
};
|
|
238
|
-
}, he = (
|
|
239
|
-
const { destroy:
|
|
240
|
-
let
|
|
241
|
-
const
|
|
239
|
+
}, he = (o, e, t, n, r) => {
|
|
240
|
+
const { destroy: a, onDestroy: c } = n;
|
|
241
|
+
let i, s;
|
|
242
|
+
const l = {};
|
|
242
243
|
return (d) => {
|
|
243
244
|
if (e !== "*" && d.origin !== e) {
|
|
244
|
-
|
|
245
|
+
r(`Parent: Handshake - Received ACK message from origin ${d.origin} which did not match expected origin ${e}`);
|
|
245
246
|
return;
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
-
const
|
|
248
|
+
r("Parent: Handshake - Received ACK");
|
|
249
|
+
const p = {
|
|
249
250
|
localName: "Parent",
|
|
250
251
|
local: window,
|
|
251
252
|
remote: d.source,
|
|
252
253
|
originForSending: t,
|
|
253
254
|
originForReceiving: e
|
|
254
255
|
};
|
|
255
|
-
|
|
256
|
-
delete
|
|
257
|
-
}),
|
|
258
|
-
const
|
|
259
|
-
return c(
|
|
256
|
+
i && i(), i = ie(p, o, r), c(i), s && s.forEach((m) => {
|
|
257
|
+
delete l[m];
|
|
258
|
+
}), s = d.data.methodNames;
|
|
259
|
+
const h = me(l, p, s, a, r);
|
|
260
|
+
return c(h), l;
|
|
260
261
|
};
|
|
261
|
-
}, fe = (
|
|
262
|
-
if (!
|
|
262
|
+
}, fe = (o, e, t, n) => (r) => {
|
|
263
|
+
if (!r.source)
|
|
263
264
|
return;
|
|
264
|
-
if (t !== "*" &&
|
|
265
|
-
|
|
265
|
+
if (t !== "*" && r.origin !== t) {
|
|
266
|
+
o(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${t}`);
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
268
|
-
|
|
269
|
-
const
|
|
270
|
-
penpal:
|
|
269
|
+
o("Parent: Handshake - Received SYN, responding with SYN-ACK");
|
|
270
|
+
const a = {
|
|
271
|
+
penpal: u.SynAck,
|
|
271
272
|
methodNames: Object.keys(e)
|
|
272
273
|
};
|
|
273
|
-
|
|
274
|
-
},
|
|
275
|
-
const { destroy: t, onDestroy:
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
clearInterval(
|
|
274
|
+
r.source.postMessage(a, n);
|
|
275
|
+
}, be = 6e4, ue = (o, e) => {
|
|
276
|
+
const { destroy: t, onDestroy: n } = e, r = setInterval(() => {
|
|
277
|
+
o.isConnected || (clearInterval(r), t());
|
|
278
|
+
}, be);
|
|
279
|
+
n(() => {
|
|
280
|
+
clearInterval(r);
|
|
280
281
|
});
|
|
281
|
-
}, ye = (
|
|
282
|
+
}, ye = (o, e) => {
|
|
282
283
|
let t;
|
|
283
|
-
return
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
},
|
|
284
|
+
return o !== void 0 && (t = window.setTimeout(() => {
|
|
285
|
+
const n = new Error(`Connection timed out after ${o}ms`);
|
|
286
|
+
n.code = S.ConnectionTimeout, e(n);
|
|
287
|
+
}, o)), () => {
|
|
287
288
|
clearTimeout(t);
|
|
288
289
|
};
|
|
289
|
-
},
|
|
290
|
-
if (!
|
|
290
|
+
}, ve = (o) => {
|
|
291
|
+
if (!o.src && !o.srcdoc) {
|
|
291
292
|
const e = new Error("Iframe must have src or srcdoc property defined.");
|
|
292
293
|
throw e.code = S.NoIframeSrc, e;
|
|
293
294
|
}
|
|
294
|
-
},
|
|
295
|
-
let { iframe: e, methods: t = {}, childOrigin:
|
|
296
|
-
const c =
|
|
297
|
-
|
|
298
|
-
const d =
|
|
295
|
+
}, we = (o) => {
|
|
296
|
+
let { iframe: e, methods: t = {}, childOrigin: n, timeout: r, debug: a = !1 } = o;
|
|
297
|
+
const c = ee(a), i = Z("Parent", c), { onDestroy: s, destroy: l } = i;
|
|
298
|
+
n || (ve(e), n = re(e.src));
|
|
299
|
+
const d = n === "null" ? "*" : n, p = T(t), h = fe(c, p, n, d), m = he(p, n, d, i, c);
|
|
299
300
|
return {
|
|
300
|
-
promise: new Promise((w,
|
|
301
|
-
const k = ye(
|
|
302
|
-
if (!(
|
|
303
|
-
if (
|
|
304
|
-
|
|
301
|
+
promise: new Promise((w, f) => {
|
|
302
|
+
const k = ye(r, l), y = (g) => {
|
|
303
|
+
if (!(g.source !== e.contentWindow || !g.data)) {
|
|
304
|
+
if (g.data.penpal === u.Syn) {
|
|
305
|
+
h(g);
|
|
305
306
|
return;
|
|
306
307
|
}
|
|
307
|
-
if (
|
|
308
|
-
const
|
|
309
|
-
|
|
308
|
+
if (g.data.penpal === u.Ack) {
|
|
309
|
+
const I = m(g);
|
|
310
|
+
I && (k(), w(I));
|
|
310
311
|
return;
|
|
311
312
|
}
|
|
312
313
|
}
|
|
313
314
|
};
|
|
314
|
-
window.addEventListener(
|
|
315
|
-
window.removeEventListener(
|
|
315
|
+
window.addEventListener(_.Message, y), c("Parent: Awaiting handshake"), ue(e, i), s((g) => {
|
|
316
|
+
window.removeEventListener(_.Message, y), g && f(g);
|
|
316
317
|
});
|
|
317
318
|
}),
|
|
318
319
|
destroy() {
|
|
319
|
-
|
|
320
|
+
l();
|
|
320
321
|
}
|
|
321
322
|
};
|
|
322
323
|
};
|
|
323
|
-
class
|
|
324
|
+
class Q {
|
|
324
325
|
url;
|
|
325
326
|
iframe;
|
|
326
327
|
container;
|
|
@@ -328,31 +329,31 @@ class F {
|
|
|
328
329
|
constructor({
|
|
329
330
|
id: e,
|
|
330
331
|
url: t,
|
|
331
|
-
preset:
|
|
332
|
-
onClose:
|
|
333
|
-
onConnect:
|
|
332
|
+
preset: n,
|
|
333
|
+
onClose: r,
|
|
334
|
+
onConnect: a,
|
|
334
335
|
methods: c = {}
|
|
335
336
|
}) {
|
|
336
337
|
if (typeof document > "u")
|
|
337
338
|
return;
|
|
338
|
-
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
const
|
|
342
|
-
|
|
339
|
+
n && t.searchParams.set("preset", n), this.url = t;
|
|
340
|
+
const i = document.createElement("iframe");
|
|
341
|
+
i.src = t.toString(), i.id = e, i.style.border = "none", i.sandbox.add("allow-forms"), i.sandbox.add("allow-popups"), i.sandbox.add("allow-scripts"), i.sandbox.add("allow-same-origin"), i.allow = "publickey-credentials-create *; publickey-credentials-get *; clipboard-write", document.hasStorageAccess && i.sandbox.add("allow-storage-access-by-user-activation");
|
|
342
|
+
const s = document.createElement("div");
|
|
343
|
+
s.id = "controller", s.style.position = "fixed", s.style.height = "100%", s.style.width = "100%", s.style.top = "0", s.style.left = "0", s.style.zIndex = "10000", s.style.backgroundColor = "rgba(0,0,0,0.6)", s.style.display = "flex", s.style.alignItems = "center", s.style.justifyContent = "center", s.style.visibility = "hidden", s.style.opacity = "0", s.style.transition = "opacity 0.2s ease", s.appendChild(i), this.iframe = i, this.container = s, we({
|
|
343
344
|
iframe: this.iframe,
|
|
344
|
-
methods: { close: (
|
|
345
|
-
}).promise.then(
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
document.body && (e === "controller-keychain" && !
|
|
345
|
+
methods: { close: (p) => () => this.close(), ...c }
|
|
346
|
+
}).promise.then(a), this.resize(), window.addEventListener("resize", () => this.resize());
|
|
347
|
+
const l = new MutationObserver(() => {
|
|
348
|
+
const p = document.getElementById("controller");
|
|
349
|
+
document.body && (e === "controller-keychain" && !p || e === "controller-profile") && (document.body.appendChild(s), l.disconnect());
|
|
349
350
|
});
|
|
350
|
-
|
|
351
|
+
l.observe(document.documentElement, {
|
|
351
352
|
childList: !0,
|
|
352
353
|
subtree: !0
|
|
353
354
|
});
|
|
354
355
|
const d = document.getElementById("controller");
|
|
355
|
-
document.body && (e === "controller-keychain" && !d || e === "controller-profile") && document.body.appendChild(
|
|
356
|
+
document.body && (e === "controller-keychain" && !d || e === "controller-profile") && document.body.appendChild(s), this.onClose = r;
|
|
356
357
|
}
|
|
357
358
|
open() {
|
|
358
359
|
this.container && (document.body.style.overflow = "hidden", this.container.style.visibility = "visible", this.container.style.opacity = "1");
|
|
@@ -376,7 +377,7 @@ class F {
|
|
|
376
377
|
}
|
|
377
378
|
}
|
|
378
379
|
}
|
|
379
|
-
class
|
|
380
|
+
class _e {
|
|
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 n = 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: n };
|
|
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 n = 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: n };
|
|
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 (n) {
|
|
501
|
+
throw n.code === 4902 && console.warn("Chain not added to MetaMask"), n;
|
|
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 n = 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: n };
|
|
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), n = await this.getProvider().signMessage(
|
|
584
|
+
t,
|
|
585
|
+
"utf8"
|
|
586
|
+
);
|
|
587
|
+
return { success: !0, wallet: this.type, result: n };
|
|
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")), r = await this.getProvider().signAndSendTransaction(t);
|
|
601
|
+
return {
|
|
602
|
+
success: !0,
|
|
603
|
+
wallet: this.type,
|
|
604
|
+
result: r
|
|
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 Ce {
|
|
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 _e()), 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, n) => this.signMessage(t, n),
|
|
732
|
+
externalSignTypedData: (e) => (t, n) => this.signTypedData(t, n),
|
|
733
|
+
externalSendTransaction: (e) => (t, n) => this.sendTransaction(t, n),
|
|
734
|
+
externalGetBalance: (e) => (t, n) => this.getBalance(t, n)
|
|
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,
|
|
719
|
-
const
|
|
720
|
-
return console.error(`Error ${
|
|
748
|
+
handleError(e, t, n) {
|
|
749
|
+
const r = t instanceof Error ? t.message : "Unknown error";
|
|
750
|
+
return console.error(`Error ${n} with ${e} wallet:`, t), { success: !1, wallet: e, error: r };
|
|
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), n = await t.connect();
|
|
755
|
+
return n.success && this.connectedWallets.set(e, t), n;
|
|
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 n = this.connectedWallets.get(e);
|
|
765
|
+
if (!n.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 n.signMessage(t);
|
|
768
|
+
} catch (n) {
|
|
769
|
+
return this.handleError(e, n, "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 n = this.connectedWallets.get(e);
|
|
777
|
+
if (!n.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 n.signTypedData(t);
|
|
780
|
+
} catch (n) {
|
|
781
|
+
return this.handleError(e, n, "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 (n) {
|
|
790
|
+
return this.handleError(e, n, "sending transaction with");
|
|
756
791
|
}
|
|
757
792
|
}
|
|
758
793
|
async getBalance(e, t) {
|
|
@@ -760,65 +795,65 @@ 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 (n) {
|
|
799
|
+
return this.handleError(e, n, "getting balance from");
|
|
765
800
|
}
|
|
766
801
|
}
|
|
767
802
|
}
|
|
768
|
-
class
|
|
803
|
+
class Ie extends Q {
|
|
769
804
|
walletBridge;
|
|
770
|
-
constructor({ url: e, policies: t, ...
|
|
771
|
-
const
|
|
772
|
-
t &&
|
|
805
|
+
constructor({ url: e, policies: t, ...n }) {
|
|
806
|
+
const r = new URL(e ?? $), a = new Ce();
|
|
807
|
+
t && r.searchParams.set(
|
|
773
808
|
"policies",
|
|
774
809
|
encodeURIComponent(JSON.stringify(t))
|
|
775
810
|
), super({
|
|
776
|
-
...
|
|
811
|
+
...n,
|
|
777
812
|
id: "controller-keychain",
|
|
778
|
-
url:
|
|
779
|
-
methods:
|
|
780
|
-
}), this.walletBridge =
|
|
813
|
+
url: r,
|
|
814
|
+
methods: a.getIFrameMethods()
|
|
815
|
+
}), this.walletBridge = a;
|
|
781
816
|
}
|
|
782
817
|
getWalletBridge() {
|
|
783
818
|
return this.walletBridge;
|
|
784
819
|
}
|
|
785
820
|
}
|
|
786
|
-
class
|
|
821
|
+
class xe extends Q {
|
|
787
822
|
constructor({
|
|
788
823
|
profileUrl: e,
|
|
789
824
|
rpcUrl: t,
|
|
790
|
-
version:
|
|
791
|
-
username:
|
|
792
|
-
slot:
|
|
825
|
+
version: n,
|
|
826
|
+
username: r,
|
|
827
|
+
slot: a,
|
|
793
828
|
namespace: c,
|
|
794
|
-
tokens:
|
|
795
|
-
policies:
|
|
796
|
-
...
|
|
829
|
+
tokens: i,
|
|
830
|
+
policies: s,
|
|
831
|
+
...l
|
|
797
832
|
}) {
|
|
798
|
-
const d = (e ||
|
|
799
|
-
let
|
|
800
|
-
|
|
833
|
+
const d = (e || W).replace(/\/$/, "");
|
|
834
|
+
let p = new URL(
|
|
835
|
+
a ? `${d}/account/${r}/slot/${a}` : `${d}/account/${r}`
|
|
801
836
|
);
|
|
802
|
-
if (
|
|
837
|
+
if (a && p.searchParams.set("ps", encodeURIComponent(a)), c && p.searchParams.set("ns", encodeURIComponent(c)), n && p.searchParams.set("v", encodeURIComponent(n)), p.searchParams.set("rpcUrl", encodeURIComponent(t)), i?.erc20 && p.searchParams.set(
|
|
803
838
|
"erc20",
|
|
804
|
-
encodeURIComponent(
|
|
805
|
-
),
|
|
806
|
-
const
|
|
807
|
-
(
|
|
839
|
+
encodeURIComponent(i.erc20.toString())
|
|
840
|
+
), s?.contracts) {
|
|
841
|
+
const h = Object.values(s.contracts).flatMap(
|
|
842
|
+
(m) => m.methods
|
|
808
843
|
);
|
|
809
|
-
|
|
844
|
+
p.searchParams.set(
|
|
810
845
|
"methods",
|
|
811
|
-
encodeURIComponent(JSON.stringify(
|
|
846
|
+
encodeURIComponent(JSON.stringify(h))
|
|
812
847
|
);
|
|
813
848
|
}
|
|
814
849
|
super({
|
|
815
|
-
...
|
|
850
|
+
...l,
|
|
816
851
|
id: "controller-profile",
|
|
817
|
-
url:
|
|
852
|
+
url: p
|
|
818
853
|
});
|
|
819
854
|
}
|
|
820
855
|
}
|
|
821
|
-
class
|
|
856
|
+
class Ne extends H {
|
|
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 Ie({
|
|
831
866
|
...e,
|
|
832
867
|
onClose: this.keychain?.reset,
|
|
833
868
|
onConnect: (t) => {
|
|
@@ -839,12 +874,12 @@ class Me extends j {
|
|
|
839
874
|
async probe() {
|
|
840
875
|
try {
|
|
841
876
|
if (await this.waitForKeychain(), !this.keychain) {
|
|
842
|
-
console.error(new
|
|
877
|
+
console.error(new b().message);
|
|
843
878
|
return;
|
|
844
879
|
}
|
|
845
880
|
const e = await this.keychain.probe(this.rpcUrl());
|
|
846
881
|
let t = e?.rpcUrl || this.rpcUrl();
|
|
847
|
-
this.account = new
|
|
882
|
+
this.account = new z(
|
|
848
883
|
this,
|
|
849
884
|
t,
|
|
850
885
|
e.address,
|
|
@@ -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 xe({
|
|
862
897
|
...this.options,
|
|
863
898
|
onConnect: (t) => {
|
|
864
899
|
this.profile = t;
|
|
@@ -879,7 +914,7 @@ class Me extends j {
|
|
|
879
914
|
if (this.account)
|
|
880
915
|
return this.account;
|
|
881
916
|
if (!this.keychain || !this.iframes.keychain) {
|
|
882
|
-
console.error(new
|
|
917
|
+
console.error(new b().message);
|
|
883
918
|
return;
|
|
884
919
|
}
|
|
885
920
|
document.hasStorageAccess && (await document.hasStorageAccess() || await document.requestStorageAccess()), this.iframes.keychain.open();
|
|
@@ -890,7 +925,7 @@ class Me extends j {
|
|
|
890
925
|
);
|
|
891
926
|
if (e.code !== A.SUCCESS)
|
|
892
927
|
throw new Error(e.message);
|
|
893
|
-
return e = e, this.account = new
|
|
928
|
+
return e = e, this.account = new z(
|
|
894
929
|
this,
|
|
895
930
|
this.rpcUrl(),
|
|
896
931
|
e.address,
|
|
@@ -906,7 +941,7 @@ class Me extends j {
|
|
|
906
941
|
}
|
|
907
942
|
async switchStarknetChain(e) {
|
|
908
943
|
if (!this.keychain || !this.iframes.keychain)
|
|
909
|
-
return console.error(new
|
|
944
|
+
return console.error(new b().message), !1;
|
|
910
945
|
try {
|
|
911
946
|
if (this.selectedChain = e, (await this.keychain.probe(this.rpcUrl())).rpcUrl === this.rpcUrl())
|
|
912
947
|
return !0;
|
|
@@ -921,7 +956,7 @@ class Me extends j {
|
|
|
921
956
|
}
|
|
922
957
|
async disconnect() {
|
|
923
958
|
if (!this.keychain) {
|
|
924
|
-
console.error(new
|
|
959
|
+
console.error(new b().message);
|
|
925
960
|
return;
|
|
926
961
|
}
|
|
927
962
|
return document.hasStorageAccess && (await document.hasStorageAccess() || await document.requestStorageAccess()), this.account = void 0, this.keychain.disconnect();
|
|
@@ -961,19 +996,19 @@ class Me extends j {
|
|
|
961
996
|
}
|
|
962
997
|
async openSettings() {
|
|
963
998
|
if (!this.keychain || !this.iframes.keychain)
|
|
964
|
-
return console.error(new
|
|
999
|
+
return console.error(new b().message), null;
|
|
965
1000
|
this.iframes.profile?.sendBackward ? this.iframes.profile?.sendBackward() : this.iframes.profile?.close(), this.iframes.keychain.open();
|
|
966
1001
|
const e = await this.keychain.openSettings();
|
|
967
1002
|
return this.iframes.keychain.close(), this.iframes.profile?.sendForward?.(), !(e && e.code === A.NOT_CONNECTED);
|
|
968
1003
|
}
|
|
969
1004
|
revoke(e, t) {
|
|
970
|
-
return this.keychain ? this.keychain.revoke(e) : (console.error(new
|
|
1005
|
+
return this.keychain ? this.keychain.revoke(e) : (console.error(new b().message), null);
|
|
971
1006
|
}
|
|
972
1007
|
rpcUrl() {
|
|
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
|
+
(n) => M.decodeShortString(n)
|
|
977
1012
|
);
|
|
978
1013
|
throw new Error(
|
|
979
1014
|
`Chain not found: ${M.decodeShortString(this.selectedChain)}. Available chains: ${t.join(", ")}`
|
|
@@ -983,14 +1018,14 @@ class Me extends j {
|
|
|
983
1018
|
}
|
|
984
1019
|
username() {
|
|
985
1020
|
if (!this.keychain) {
|
|
986
|
-
console.error(new
|
|
1021
|
+
console.error(new b().message);
|
|
987
1022
|
return;
|
|
988
1023
|
}
|
|
989
1024
|
return this.keychain.username();
|
|
990
1025
|
}
|
|
991
1026
|
openPurchaseCredits() {
|
|
992
1027
|
if (!this.keychain || !this.iframes.keychain) {
|
|
993
|
-
console.error(new
|
|
1028
|
+
console.error(new b().message);
|
|
994
1029
|
return;
|
|
995
1030
|
}
|
|
996
1031
|
if (!this.iframes.profile) {
|
|
@@ -999,30 +1034,41 @@ class Me extends j {
|
|
|
999
1034
|
}
|
|
1000
1035
|
this.iframes.profile.close(), this.iframes.keychain.open(), this.keychain.openPurchaseCredits();
|
|
1001
1036
|
}
|
|
1037
|
+
openStarterPack() {
|
|
1038
|
+
if (!this.keychain || !this.iframes.keychain) {
|
|
1039
|
+
console.error(new b().message);
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
if (!this.iframes.profile) {
|
|
1043
|
+
console.error("Profile is not ready");
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
this.iframes.profile.close(), this.iframes.keychain.open(), this.keychain.openStarterPack();
|
|
1047
|
+
}
|
|
1002
1048
|
async openExecute(e, t) {
|
|
1003
1049
|
if (!this.keychain || !this.iframes.keychain) {
|
|
1004
|
-
console.error(new
|
|
1050
|
+
console.error(new b().message);
|
|
1005
1051
|
return;
|
|
1006
1052
|
}
|
|
1007
1053
|
if (!this.iframes.profile) {
|
|
1008
1054
|
console.error("Profile is not ready");
|
|
1009
1055
|
return;
|
|
1010
1056
|
}
|
|
1011
|
-
let
|
|
1057
|
+
let n = this.selectedChain;
|
|
1012
1058
|
t && this.switchStarknetChain(t), this.iframes.profile?.sendBackward(), this.iframes.keychain.open(), this.iframes.profile?.close();
|
|
1013
|
-
const
|
|
1014
|
-
return this.iframes.profile?.open(), this.iframes.keychain.close(), this.iframes.profile?.sendForward(), t && this.switchStarknetChain(
|
|
1059
|
+
const r = await this.keychain.execute(e, void 0, void 0, !0);
|
|
1060
|
+
return this.iframes.profile?.open(), this.iframes.keychain.close(), this.iframes.profile?.sendForward(), t && this.switchStarknetChain(n), !(r && (r.code === A.NOT_CONNECTED || r.code === A.CANCELED));
|
|
1015
1061
|
}
|
|
1016
1062
|
async delegateAccount() {
|
|
1017
|
-
return this.keychain ? await this.keychain.delegateAccount() : (console.error(new
|
|
1063
|
+
return this.keychain ? await this.keychain.delegateAccount() : (console.error(new b().message), null);
|
|
1018
1064
|
}
|
|
1019
1065
|
async validateChains(e) {
|
|
1020
1066
|
for (const t of e)
|
|
1021
1067
|
try {
|
|
1022
|
-
const
|
|
1023
|
-
this.chains.set(
|
|
1024
|
-
} catch (
|
|
1025
|
-
console.error(`Failed to parse chainId for ${t.rpcUrl}:`,
|
|
1068
|
+
const n = new URL(t.rpcUrl), r = await K(n);
|
|
1069
|
+
this.chains.set(r, t);
|
|
1070
|
+
} catch (n) {
|
|
1071
|
+
console.error(`Failed to parse chainId for ${t.rpcUrl}:`, n);
|
|
1026
1072
|
}
|
|
1027
1073
|
this.chains.has(this.selectedChain) || console.warn(
|
|
1028
1074
|
`Selected chain ${this.selectedChain} not found in configured chains. Available chains: ${Array.from(this.chains.keys()).join(", ")}`
|
|
@@ -1032,61 +1078,94 @@ class Me extends j {
|
|
|
1032
1078
|
timeout: e = 5e4,
|
|
1033
1079
|
interval: t = 100
|
|
1034
1080
|
} = {}) {
|
|
1035
|
-
return new Promise((
|
|
1036
|
-
const
|
|
1037
|
-
if (Date.now() -
|
|
1038
|
-
clearInterval(c),
|
|
1081
|
+
return new Promise((n, r) => {
|
|
1082
|
+
const a = Date.now(), c = setInterval(() => {
|
|
1083
|
+
if (Date.now() - a > e) {
|
|
1084
|
+
clearInterval(c), r(new Error("Timeout waiting for keychain"));
|
|
1039
1085
|
return;
|
|
1040
1086
|
}
|
|
1041
|
-
this.keychain && (clearInterval(c),
|
|
1087
|
+
this.keychain && (clearInterval(c), n());
|
|
1042
1088
|
}, t);
|
|
1043
1089
|
});
|
|
1044
1090
|
}
|
|
1045
1091
|
}
|
|
1046
1092
|
const R = /* @__PURE__ */ new Map();
|
|
1047
|
-
async function
|
|
1048
|
-
if (!
|
|
1093
|
+
async function F(o) {
|
|
1094
|
+
if (!o.addresses?.length && !o.usernames?.length)
|
|
1049
1095
|
return { results: [] };
|
|
1050
1096
|
const e = await fetch(`${q}/lookup`, {
|
|
1051
1097
|
method: "POST",
|
|
1052
1098
|
headers: {
|
|
1053
1099
|
"Content-Type": "application/json"
|
|
1054
1100
|
},
|
|
1055
|
-
body: JSON.stringify(
|
|
1101
|
+
body: JSON.stringify(o)
|
|
1056
1102
|
});
|
|
1057
1103
|
if (!e.ok)
|
|
1058
1104
|
throw new Error(`HTTP error! status: ${e.status}`);
|
|
1059
1105
|
return e.json();
|
|
1060
1106
|
}
|
|
1061
|
-
async function
|
|
1062
|
-
const e =
|
|
1063
|
-
return e.length > 0 && (await
|
|
1064
|
-
R.set(
|
|
1107
|
+
async function je(o) {
|
|
1108
|
+
const e = o.filter((t) => !R.has(t));
|
|
1109
|
+
return e.length > 0 && (await F({ usernames: e })).results.forEach((n) => {
|
|
1110
|
+
R.set(n.username, n.addresses[0]);
|
|
1065
1111
|
}), new Map(
|
|
1066
|
-
|
|
1112
|
+
o.map((t) => [t, R.get(t)]).filter((t) => t[1] !== void 0)
|
|
1067
1113
|
);
|
|
1068
1114
|
}
|
|
1069
|
-
async function Be(
|
|
1070
|
-
|
|
1071
|
-
const e =
|
|
1072
|
-
return e.length > 0 && (await
|
|
1115
|
+
async function Be(o) {
|
|
1116
|
+
o = o.map(O.toHex);
|
|
1117
|
+
const e = o.filter((t) => !R.has(t));
|
|
1118
|
+
return e.length > 0 && (await F({
|
|
1073
1119
|
addresses: e
|
|
1074
|
-
})).results.forEach((
|
|
1075
|
-
R.set(
|
|
1120
|
+
})).results.forEach((n) => {
|
|
1121
|
+
R.set(n.addresses[0], n.username);
|
|
1076
1122
|
}), new Map(
|
|
1077
|
-
|
|
1123
|
+
o.map((t) => [t, R.get(t)]).filter((t) => t[1] !== void 0)
|
|
1078
1124
|
);
|
|
1079
1125
|
}
|
|
1080
|
-
var
|
|
1126
|
+
var U = {
|
|
1081
1127
|
"blob-arena": {
|
|
1082
|
-
origin: "blobarena.xyz",
|
|
1128
|
+
origin: ["www.blobarena.xyz", "blobarena.xyz"],
|
|
1083
1129
|
theme: {
|
|
1084
1130
|
colors: {
|
|
1085
1131
|
primary: "#980f06"
|
|
1086
1132
|
},
|
|
1087
1133
|
cover: "https://static.cartridge.gg/presets/blob-arena/cover.png",
|
|
1088
1134
|
icon: "https://static.cartridge.gg/presets/blob-arena/icon.png",
|
|
1089
|
-
name: "Blob Arena"
|
|
1135
|
+
name: "Blob Arena",
|
|
1136
|
+
optimizedCover: {
|
|
1137
|
+
webp: {
|
|
1138
|
+
768: "cover@768.webp",
|
|
1139
|
+
1024: "cover@1024.webp",
|
|
1140
|
+
1440: "cover@1440.webp"
|
|
1141
|
+
},
|
|
1142
|
+
jpg: {
|
|
1143
|
+
768: "cover@768.jpg",
|
|
1144
|
+
1024: "cover@1024.jpg",
|
|
1145
|
+
1440: "cover@1440.jpg"
|
|
1146
|
+
},
|
|
1147
|
+
png: {
|
|
1148
|
+
768: "cover@768.png",
|
|
1149
|
+
1024: "cover@1024.png",
|
|
1150
|
+
1440: "cover@1440.png"
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
optimizedIcon: {
|
|
1154
|
+
webp: {
|
|
1155
|
+
16: "icon@16.webp",
|
|
1156
|
+
32: "icon@32.webp",
|
|
1157
|
+
64: "icon@64.webp",
|
|
1158
|
+
128: "icon@128.webp",
|
|
1159
|
+
256: "icon@256.webp"
|
|
1160
|
+
},
|
|
1161
|
+
png: {
|
|
1162
|
+
16: "icon@16.png",
|
|
1163
|
+
32: "icon@32.png",
|
|
1164
|
+
64: "icon@64.png",
|
|
1165
|
+
128: "icon@128.png",
|
|
1166
|
+
256: "icon@256.png"
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1090
1169
|
},
|
|
1091
1170
|
chains: {
|
|
1092
1171
|
SN_MAIN: {
|
|
@@ -1322,14 +1401,47 @@ var L = {
|
|
|
1322
1401
|
}
|
|
1323
1402
|
},
|
|
1324
1403
|
"blob-arena-amma": {
|
|
1325
|
-
origin: "blobarena.xyz",
|
|
1404
|
+
origin: ["www.blobarena.xyz", "blobarena.xyz"],
|
|
1326
1405
|
theme: {
|
|
1327
1406
|
colors: {
|
|
1328
1407
|
primary: "#D7B000"
|
|
1329
1408
|
},
|
|
1330
1409
|
cover: "https://static.cartridge.gg/presets/blob-arena-amma/cover.png",
|
|
1331
1410
|
icon: "https://static.cartridge.gg/presets/blob-arena-amma/icon.png",
|
|
1332
|
-
name: "Blob Arena AMMA"
|
|
1411
|
+
name: "Blob Arena AMMA",
|
|
1412
|
+
optimizedCover: {
|
|
1413
|
+
webp: {
|
|
1414
|
+
768: "cover@768.webp",
|
|
1415
|
+
1024: "cover@1024.webp",
|
|
1416
|
+
1440: "cover@1440.webp"
|
|
1417
|
+
},
|
|
1418
|
+
jpg: {
|
|
1419
|
+
768: "cover@768.jpg",
|
|
1420
|
+
1024: "cover@1024.jpg",
|
|
1421
|
+
1440: "cover@1440.jpg"
|
|
1422
|
+
},
|
|
1423
|
+
png: {
|
|
1424
|
+
768: "cover@768.png",
|
|
1425
|
+
1024: "cover@1024.png",
|
|
1426
|
+
1440: "cover@1440.png"
|
|
1427
|
+
}
|
|
1428
|
+
},
|
|
1429
|
+
optimizedIcon: {
|
|
1430
|
+
webp: {
|
|
1431
|
+
16: "icon@16.webp",
|
|
1432
|
+
32: "icon@32.webp",
|
|
1433
|
+
64: "icon@64.webp",
|
|
1434
|
+
128: "icon@128.webp",
|
|
1435
|
+
256: "icon@256.webp"
|
|
1436
|
+
},
|
|
1437
|
+
png: {
|
|
1438
|
+
16: "icon@16.png",
|
|
1439
|
+
32: "icon@32.png",
|
|
1440
|
+
64: "icon@64.png",
|
|
1441
|
+
128: "icon@128.png",
|
|
1442
|
+
256: "icon@256.png"
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1333
1445
|
}
|
|
1334
1446
|
},
|
|
1335
1447
|
budokan: {
|
|
@@ -1371,7 +1483,40 @@ var L = {
|
|
|
1371
1483
|
},
|
|
1372
1484
|
cover: "https://static.cartridge.gg/presets/budokan/cover.png",
|
|
1373
1485
|
icon: "https://static.cartridge.gg/presets/budokan/icon.png",
|
|
1374
|
-
name: "Budokan"
|
|
1486
|
+
name: "Budokan",
|
|
1487
|
+
optimizedCover: {
|
|
1488
|
+
webp: {
|
|
1489
|
+
768: "cover@768.webp",
|
|
1490
|
+
1024: "cover@1024.webp",
|
|
1491
|
+
1440: "cover@1440.webp"
|
|
1492
|
+
},
|
|
1493
|
+
jpg: {
|
|
1494
|
+
768: "cover@768.jpg",
|
|
1495
|
+
1024: "cover@1024.jpg",
|
|
1496
|
+
1440: "cover@1440.jpg"
|
|
1497
|
+
},
|
|
1498
|
+
png: {
|
|
1499
|
+
768: "cover@768.png",
|
|
1500
|
+
1024: "cover@1024.png",
|
|
1501
|
+
1440: "cover@1440.png"
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
optimizedIcon: {
|
|
1505
|
+
webp: {
|
|
1506
|
+
16: "icon@16.webp",
|
|
1507
|
+
32: "icon@32.webp",
|
|
1508
|
+
64: "icon@64.webp",
|
|
1509
|
+
128: "icon@128.webp",
|
|
1510
|
+
256: "icon@256.webp"
|
|
1511
|
+
},
|
|
1512
|
+
png: {
|
|
1513
|
+
16: "icon@16.png",
|
|
1514
|
+
32: "icon@32.png",
|
|
1515
|
+
64: "icon@64.png",
|
|
1516
|
+
128: "icon@128.png",
|
|
1517
|
+
256: "icon@256.png"
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1375
1520
|
}
|
|
1376
1521
|
},
|
|
1377
1522
|
"bytebeasts-tamagotchi": {
|
|
@@ -1382,7 +1527,40 @@ var L = {
|
|
|
1382
1527
|
},
|
|
1383
1528
|
cover: "https://static.cartridge.gg/presets/bytebeasts-tamagotchi/cover.png",
|
|
1384
1529
|
icon: "https://static.cartridge.gg/presets/bytebeasts-tamagotchi/icon.png",
|
|
1385
|
-
name: "ByteBeasts-Tamagotchi"
|
|
1530
|
+
name: "ByteBeasts-Tamagotchi",
|
|
1531
|
+
optimizedCover: {
|
|
1532
|
+
webp: {
|
|
1533
|
+
768: "cover@768.webp",
|
|
1534
|
+
1024: "cover@1024.webp",
|
|
1535
|
+
1440: "cover@1440.webp"
|
|
1536
|
+
},
|
|
1537
|
+
jpg: {
|
|
1538
|
+
768: "cover@768.jpg",
|
|
1539
|
+
1024: "cover@1024.jpg",
|
|
1540
|
+
1440: "cover@1440.jpg"
|
|
1541
|
+
},
|
|
1542
|
+
png: {
|
|
1543
|
+
768: "cover@768.png",
|
|
1544
|
+
1024: "cover@1024.png",
|
|
1545
|
+
1440: "cover@1440.png"
|
|
1546
|
+
}
|
|
1547
|
+
},
|
|
1548
|
+
optimizedIcon: {
|
|
1549
|
+
webp: {
|
|
1550
|
+
16: "icon@16.webp",
|
|
1551
|
+
32: "icon@32.webp",
|
|
1552
|
+
64: "icon@64.webp",
|
|
1553
|
+
128: "icon@128.webp",
|
|
1554
|
+
256: "icon@256.webp"
|
|
1555
|
+
},
|
|
1556
|
+
png: {
|
|
1557
|
+
16: "icon@16.png",
|
|
1558
|
+
32: "icon@32.png",
|
|
1559
|
+
64: "icon@64.png",
|
|
1560
|
+
128: "icon@128.png",
|
|
1561
|
+
256: "icon@256.png"
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1386
1564
|
}
|
|
1387
1565
|
},
|
|
1388
1566
|
cartridge: {
|
|
@@ -1393,6 +1571,65 @@ var L = {
|
|
|
1393
1571
|
cover: {
|
|
1394
1572
|
light: "https://static.cartridge.gg/presets/cartridge/cover-light.png",
|
|
1395
1573
|
dark: "https://static.cartridge.gg/presets/cartridge/cover-dark.png"
|
|
1574
|
+
},
|
|
1575
|
+
optimizedCover: {
|
|
1576
|
+
light: {
|
|
1577
|
+
webp: {
|
|
1578
|
+
768: "cover-light@768.webp",
|
|
1579
|
+
1024: "cover-light@1024.webp",
|
|
1580
|
+
1440: "cover-light@1440.webp"
|
|
1581
|
+
},
|
|
1582
|
+
jpg: {
|
|
1583
|
+
768: "cover-light@768.jpg",
|
|
1584
|
+
1024: "cover-light@1024.jpg",
|
|
1585
|
+
1440: "cover-light@1440.jpg"
|
|
1586
|
+
},
|
|
1587
|
+
png: {
|
|
1588
|
+
768: "cover-light@768.png",
|
|
1589
|
+
1024: "cover-light@1024.png",
|
|
1590
|
+
1440: "cover-light@1440.png"
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
dark: {
|
|
1594
|
+
webp: {
|
|
1595
|
+
768: "cover-dark@768.webp",
|
|
1596
|
+
1024: "cover-dark@1024.webp",
|
|
1597
|
+
1440: "cover-dark@1440.webp"
|
|
1598
|
+
},
|
|
1599
|
+
jpg: {
|
|
1600
|
+
768: "cover-dark@768.jpg",
|
|
1601
|
+
1024: "cover-dark@1024.jpg",
|
|
1602
|
+
1440: "cover-dark@1440.jpg"
|
|
1603
|
+
},
|
|
1604
|
+
png: {
|
|
1605
|
+
768: "cover-dark@768.png",
|
|
1606
|
+
1024: "cover-dark@1024.png",
|
|
1607
|
+
1440: "cover-dark@1440.png"
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
},
|
|
1611
|
+
optimizedIcon: {
|
|
1612
|
+
webp: {
|
|
1613
|
+
16: "icon@16.webp",
|
|
1614
|
+
32: "icon@32.webp",
|
|
1615
|
+
64: "icon@64.webp",
|
|
1616
|
+
128: "icon@128.webp",
|
|
1617
|
+
256: "icon@256.webp"
|
|
1618
|
+
},
|
|
1619
|
+
png: {
|
|
1620
|
+
16: "icon@16.png",
|
|
1621
|
+
32: "icon@32.png",
|
|
1622
|
+
64: "icon@64.png",
|
|
1623
|
+
128: "icon@128.png",
|
|
1624
|
+
256: "icon@256.png"
|
|
1625
|
+
},
|
|
1626
|
+
svg: {
|
|
1627
|
+
16: "icon@16.svg",
|
|
1628
|
+
32: "icon@32.svg",
|
|
1629
|
+
64: "icon@64.svg",
|
|
1630
|
+
128: "icon@128.svg",
|
|
1631
|
+
256: "icon@256.svg"
|
|
1632
|
+
}
|
|
1396
1633
|
}
|
|
1397
1634
|
}
|
|
1398
1635
|
},
|
|
@@ -1499,7 +1736,40 @@ var L = {
|
|
|
1499
1736
|
},
|
|
1500
1737
|
cover: "https://static.cartridge.gg/presets/coloniz/cover.png",
|
|
1501
1738
|
icon: "https://static.cartridge.gg/presets/coloniz/icon.png",
|
|
1502
|
-
name: "Coloniz"
|
|
1739
|
+
name: "Coloniz",
|
|
1740
|
+
optimizedCover: {
|
|
1741
|
+
webp: {
|
|
1742
|
+
768: "cover@768.webp",
|
|
1743
|
+
1024: "cover@1024.webp",
|
|
1744
|
+
1440: "cover@1440.webp"
|
|
1745
|
+
},
|
|
1746
|
+
jpg: {
|
|
1747
|
+
768: "cover@768.jpg",
|
|
1748
|
+
1024: "cover@1024.jpg",
|
|
1749
|
+
1440: "cover@1440.jpg"
|
|
1750
|
+
},
|
|
1751
|
+
png: {
|
|
1752
|
+
768: "cover@768.png",
|
|
1753
|
+
1024: "cover@1024.png",
|
|
1754
|
+
1440: "cover@1440.png"
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
optimizedIcon: {
|
|
1758
|
+
webp: {
|
|
1759
|
+
16: "icon@16.webp",
|
|
1760
|
+
32: "icon@32.webp",
|
|
1761
|
+
64: "icon@64.webp",
|
|
1762
|
+
128: "icon@128.webp",
|
|
1763
|
+
256: "icon@256.webp"
|
|
1764
|
+
},
|
|
1765
|
+
png: {
|
|
1766
|
+
16: "icon@16.png",
|
|
1767
|
+
32: "icon@32.png",
|
|
1768
|
+
64: "icon@64.png",
|
|
1769
|
+
128: "icon@128.png",
|
|
1770
|
+
256: "icon@256.png"
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1503
1773
|
}
|
|
1504
1774
|
},
|
|
1505
1775
|
credit: {
|
|
@@ -1507,7 +1777,47 @@ var L = {
|
|
|
1507
1777
|
theme: {
|
|
1508
1778
|
name: "Credit",
|
|
1509
1779
|
icon: "https://static.cartridge.gg/presets/credit/icon.svg",
|
|
1510
|
-
cover: "https://static.cartridge.gg/presets/credit/cover.png"
|
|
1780
|
+
cover: "https://static.cartridge.gg/presets/credit/cover.png",
|
|
1781
|
+
optimizedCover: {
|
|
1782
|
+
webp: {
|
|
1783
|
+
768: "cover@768.webp",
|
|
1784
|
+
1024: "cover@1024.webp",
|
|
1785
|
+
1440: "cover@1440.webp"
|
|
1786
|
+
},
|
|
1787
|
+
jpg: {
|
|
1788
|
+
768: "cover@768.jpg",
|
|
1789
|
+
1024: "cover@1024.jpg",
|
|
1790
|
+
1440: "cover@1440.jpg"
|
|
1791
|
+
},
|
|
1792
|
+
png: {
|
|
1793
|
+
768: "cover@768.png",
|
|
1794
|
+
1024: "cover@1024.png",
|
|
1795
|
+
1440: "cover@1440.png"
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
optimizedIcon: {
|
|
1799
|
+
webp: {
|
|
1800
|
+
16: "icon@16.webp",
|
|
1801
|
+
32: "icon@32.webp",
|
|
1802
|
+
64: "icon@64.webp",
|
|
1803
|
+
128: "icon@128.webp",
|
|
1804
|
+
256: "icon@256.webp"
|
|
1805
|
+
},
|
|
1806
|
+
png: {
|
|
1807
|
+
16: "icon@16.png",
|
|
1808
|
+
32: "icon@32.png",
|
|
1809
|
+
64: "icon@64.png",
|
|
1810
|
+
128: "icon@128.png",
|
|
1811
|
+
256: "icon@256.png"
|
|
1812
|
+
},
|
|
1813
|
+
svg: {
|
|
1814
|
+
16: "icon@16.svg",
|
|
1815
|
+
32: "icon@32.svg",
|
|
1816
|
+
64: "icon@64.svg",
|
|
1817
|
+
128: "icon@128.svg",
|
|
1818
|
+
256: "icon@256.svg"
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1511
1821
|
}
|
|
1512
1822
|
},
|
|
1513
1823
|
"dark-shuffle": {
|
|
@@ -1518,7 +1828,47 @@ var L = {
|
|
|
1518
1828
|
},
|
|
1519
1829
|
cover: "https://static.cartridge.gg/presets/dark-shuffle/cover.png",
|
|
1520
1830
|
icon: "https://static.cartridge.gg/presets/dark-shuffle/icon.svg",
|
|
1521
|
-
name: "Dark Shuffle"
|
|
1831
|
+
name: "Dark Shuffle",
|
|
1832
|
+
optimizedCover: {
|
|
1833
|
+
webp: {
|
|
1834
|
+
768: "cover@768.webp",
|
|
1835
|
+
1024: "cover@1024.webp",
|
|
1836
|
+
1440: "cover@1440.webp"
|
|
1837
|
+
},
|
|
1838
|
+
jpg: {
|
|
1839
|
+
768: "cover@768.jpg",
|
|
1840
|
+
1024: "cover@1024.jpg",
|
|
1841
|
+
1440: "cover@1440.jpg"
|
|
1842
|
+
},
|
|
1843
|
+
png: {
|
|
1844
|
+
768: "cover@768.png",
|
|
1845
|
+
1024: "cover@1024.png",
|
|
1846
|
+
1440: "cover@1440.png"
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
optimizedIcon: {
|
|
1850
|
+
webp: {
|
|
1851
|
+
16: "icon@16.webp",
|
|
1852
|
+
32: "icon@32.webp",
|
|
1853
|
+
64: "icon@64.webp",
|
|
1854
|
+
128: "icon@128.webp",
|
|
1855
|
+
256: "icon@256.webp"
|
|
1856
|
+
},
|
|
1857
|
+
png: {
|
|
1858
|
+
16: "icon@16.png",
|
|
1859
|
+
32: "icon@32.png",
|
|
1860
|
+
64: "icon@64.png",
|
|
1861
|
+
128: "icon@128.png",
|
|
1862
|
+
256: "icon@256.png"
|
|
1863
|
+
},
|
|
1864
|
+
svg: {
|
|
1865
|
+
16: "icon@16.svg",
|
|
1866
|
+
32: "icon@32.svg",
|
|
1867
|
+
64: "icon@64.svg",
|
|
1868
|
+
128: "icon@128.svg",
|
|
1869
|
+
256: "icon@256.svg"
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1522
1872
|
},
|
|
1523
1873
|
chains: {
|
|
1524
1874
|
SN_MAIN: {
|
|
@@ -1575,7 +1925,47 @@ var L = {
|
|
|
1575
1925
|
},
|
|
1576
1926
|
cover: "https://static.cartridge.gg/presets/dominion/cover.png",
|
|
1577
1927
|
icon: "https://static.cartridge.gg/presets/dominion/icon.svg",
|
|
1578
|
-
name: "Dominion"
|
|
1928
|
+
name: "Dominion",
|
|
1929
|
+
optimizedCover: {
|
|
1930
|
+
webp: {
|
|
1931
|
+
768: "cover@768.webp",
|
|
1932
|
+
1024: "cover@1024.webp",
|
|
1933
|
+
1440: "cover@1440.webp"
|
|
1934
|
+
},
|
|
1935
|
+
jpg: {
|
|
1936
|
+
768: "cover@768.jpg",
|
|
1937
|
+
1024: "cover@1024.jpg",
|
|
1938
|
+
1440: "cover@1440.jpg"
|
|
1939
|
+
},
|
|
1940
|
+
png: {
|
|
1941
|
+
768: "cover@768.png",
|
|
1942
|
+
1024: "cover@1024.png",
|
|
1943
|
+
1440: "cover@1440.png"
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
optimizedIcon: {
|
|
1947
|
+
webp: {
|
|
1948
|
+
16: "icon@16.webp",
|
|
1949
|
+
32: "icon@32.webp",
|
|
1950
|
+
64: "icon@64.webp",
|
|
1951
|
+
128: "icon@128.webp",
|
|
1952
|
+
256: "icon@256.webp"
|
|
1953
|
+
},
|
|
1954
|
+
png: {
|
|
1955
|
+
16: "icon@16.png",
|
|
1956
|
+
32: "icon@32.png",
|
|
1957
|
+
64: "icon@64.png",
|
|
1958
|
+
128: "icon@128.png",
|
|
1959
|
+
256: "icon@256.png"
|
|
1960
|
+
},
|
|
1961
|
+
svg: {
|
|
1962
|
+
16: "icon@16.svg",
|
|
1963
|
+
32: "icon@32.svg",
|
|
1964
|
+
64: "icon@64.svg",
|
|
1965
|
+
128: "icon@128.svg",
|
|
1966
|
+
256: "icon@256.svg"
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1579
1969
|
}
|
|
1580
1970
|
},
|
|
1581
1971
|
"dope-wars": {
|
|
@@ -1663,7 +2053,40 @@ var L = {
|
|
|
1663
2053
|
},
|
|
1664
2054
|
cover: "https://static.cartridge.gg/presets/dope-wars/cover.png",
|
|
1665
2055
|
icon: "https://static.cartridge.gg/presets/dope-wars/icon.png",
|
|
1666
|
-
name: "Dope Wars"
|
|
2056
|
+
name: "Dope Wars",
|
|
2057
|
+
optimizedCover: {
|
|
2058
|
+
webp: {
|
|
2059
|
+
768: "cover@768.webp",
|
|
2060
|
+
1024: "cover@1024.webp",
|
|
2061
|
+
1440: "cover@1440.webp"
|
|
2062
|
+
},
|
|
2063
|
+
jpg: {
|
|
2064
|
+
768: "cover@768.jpg",
|
|
2065
|
+
1024: "cover@1024.jpg",
|
|
2066
|
+
1440: "cover@1440.jpg"
|
|
2067
|
+
},
|
|
2068
|
+
png: {
|
|
2069
|
+
768: "cover@768.png",
|
|
2070
|
+
1024: "cover@1024.png",
|
|
2071
|
+
1440: "cover@1440.png"
|
|
2072
|
+
}
|
|
2073
|
+
},
|
|
2074
|
+
optimizedIcon: {
|
|
2075
|
+
webp: {
|
|
2076
|
+
16: "icon@16.webp",
|
|
2077
|
+
32: "icon@32.webp",
|
|
2078
|
+
64: "icon@64.webp",
|
|
2079
|
+
128: "icon@128.webp",
|
|
2080
|
+
256: "icon@256.webp"
|
|
2081
|
+
},
|
|
2082
|
+
png: {
|
|
2083
|
+
16: "icon@16.png",
|
|
2084
|
+
32: "icon@32.png",
|
|
2085
|
+
64: "icon@64.png",
|
|
2086
|
+
128: "icon@128.png",
|
|
2087
|
+
256: "icon@256.png"
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
1667
2090
|
}
|
|
1668
2091
|
},
|
|
1669
2092
|
dragark: {
|
|
@@ -1883,7 +2306,40 @@ var L = {
|
|
|
1883
2306
|
},
|
|
1884
2307
|
cover: "https://static.cartridge.gg/presets/dragark/cover.png",
|
|
1885
2308
|
icon: "https://static.cartridge.gg/presets/dragark/icon.png",
|
|
1886
|
-
name: "Dragark"
|
|
2309
|
+
name: "Dragark",
|
|
2310
|
+
optimizedCover: {
|
|
2311
|
+
webp: {
|
|
2312
|
+
768: "cover@768.webp",
|
|
2313
|
+
1024: "cover@1024.webp",
|
|
2314
|
+
1440: "cover@1440.webp"
|
|
2315
|
+
},
|
|
2316
|
+
jpg: {
|
|
2317
|
+
768: "cover@768.jpg",
|
|
2318
|
+
1024: "cover@1024.jpg",
|
|
2319
|
+
1440: "cover@1440.jpg"
|
|
2320
|
+
},
|
|
2321
|
+
png: {
|
|
2322
|
+
768: "cover@768.png",
|
|
2323
|
+
1024: "cover@1024.png",
|
|
2324
|
+
1440: "cover@1440.png"
|
|
2325
|
+
}
|
|
2326
|
+
},
|
|
2327
|
+
optimizedIcon: {
|
|
2328
|
+
webp: {
|
|
2329
|
+
16: "icon@16.webp",
|
|
2330
|
+
32: "icon@32.webp",
|
|
2331
|
+
64: "icon@64.webp",
|
|
2332
|
+
128: "icon@128.webp",
|
|
2333
|
+
256: "icon@256.webp"
|
|
2334
|
+
},
|
|
2335
|
+
png: {
|
|
2336
|
+
16: "icon@16.png",
|
|
2337
|
+
32: "icon@32.png",
|
|
2338
|
+
64: "icon@64.png",
|
|
2339
|
+
128: "icon@128.png",
|
|
2340
|
+
256: "icon@256.png"
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
1887
2343
|
}
|
|
1888
2344
|
},
|
|
1889
2345
|
eternum: {
|
|
@@ -2344,6 +2800,46 @@ var L = {
|
|
|
2344
2800
|
cover: "https://static.cartridge.gg/presets/eternum/cover.png",
|
|
2345
2801
|
colors: {
|
|
2346
2802
|
primary: "#dc8b07"
|
|
2803
|
+
},
|
|
2804
|
+
optimizedCover: {
|
|
2805
|
+
webp: {
|
|
2806
|
+
768: "cover@768.webp",
|
|
2807
|
+
1024: "cover@1024.webp",
|
|
2808
|
+
1440: "cover@1440.webp"
|
|
2809
|
+
},
|
|
2810
|
+
jpg: {
|
|
2811
|
+
768: "cover@768.jpg",
|
|
2812
|
+
1024: "cover@1024.jpg",
|
|
2813
|
+
1440: "cover@1440.jpg"
|
|
2814
|
+
},
|
|
2815
|
+
png: {
|
|
2816
|
+
768: "cover@768.png",
|
|
2817
|
+
1024: "cover@1024.png",
|
|
2818
|
+
1440: "cover@1440.png"
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
optimizedIcon: {
|
|
2822
|
+
webp: {
|
|
2823
|
+
16: "icon@16.webp",
|
|
2824
|
+
32: "icon@32.webp",
|
|
2825
|
+
64: "icon@64.webp",
|
|
2826
|
+
128: "icon@128.webp",
|
|
2827
|
+
256: "icon@256.webp"
|
|
2828
|
+
},
|
|
2829
|
+
png: {
|
|
2830
|
+
16: "icon@16.png",
|
|
2831
|
+
32: "icon@32.png",
|
|
2832
|
+
64: "icon@64.png",
|
|
2833
|
+
128: "icon@128.png",
|
|
2834
|
+
256: "icon@256.png"
|
|
2835
|
+
},
|
|
2836
|
+
svg: {
|
|
2837
|
+
16: "icon@16.svg",
|
|
2838
|
+
32: "icon@32.svg",
|
|
2839
|
+
64: "icon@64.svg",
|
|
2840
|
+
128: "icon@128.svg",
|
|
2841
|
+
256: "icon@256.svg"
|
|
2842
|
+
}
|
|
2347
2843
|
}
|
|
2348
2844
|
}
|
|
2349
2845
|
},
|
|
@@ -2355,7 +2851,40 @@ var L = {
|
|
|
2355
2851
|
},
|
|
2356
2852
|
cover: "https://static.cartridge.gg/presets/flippyflop/cover.png",
|
|
2357
2853
|
icon: "https://static.cartridge.gg/presets/flippyflop/icon.png",
|
|
2358
|
-
name: "FlippyFlop"
|
|
2854
|
+
name: "FlippyFlop",
|
|
2855
|
+
optimizedCover: {
|
|
2856
|
+
webp: {
|
|
2857
|
+
768: "cover@768.webp",
|
|
2858
|
+
1024: "cover@1024.webp",
|
|
2859
|
+
1440: "cover@1440.webp"
|
|
2860
|
+
},
|
|
2861
|
+
jpg: {
|
|
2862
|
+
768: "cover@768.jpg",
|
|
2863
|
+
1024: "cover@1024.jpg",
|
|
2864
|
+
1440: "cover@1440.jpg"
|
|
2865
|
+
},
|
|
2866
|
+
png: {
|
|
2867
|
+
768: "cover@768.png",
|
|
2868
|
+
1024: "cover@1024.png",
|
|
2869
|
+
1440: "cover@1440.png"
|
|
2870
|
+
}
|
|
2871
|
+
},
|
|
2872
|
+
optimizedIcon: {
|
|
2873
|
+
webp: {
|
|
2874
|
+
16: "icon@16.webp",
|
|
2875
|
+
32: "icon@32.webp",
|
|
2876
|
+
64: "icon@64.webp",
|
|
2877
|
+
128: "icon@128.webp",
|
|
2878
|
+
256: "icon@256.webp"
|
|
2879
|
+
},
|
|
2880
|
+
png: {
|
|
2881
|
+
16: "icon@16.png",
|
|
2882
|
+
32: "icon@32.png",
|
|
2883
|
+
64: "icon@64.png",
|
|
2884
|
+
128: "icon@128.png",
|
|
2885
|
+
256: "icon@256.png"
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2359
2888
|
}
|
|
2360
2889
|
},
|
|
2361
2890
|
"force-prime": {
|
|
@@ -2366,7 +2895,40 @@ var L = {
|
|
|
2366
2895
|
},
|
|
2367
2896
|
cover: "https://static.cartridge.gg/presets/force-prime/cover.png",
|
|
2368
2897
|
icon: "https://static.cartridge.gg/presets/force-prime/icon.png",
|
|
2369
|
-
name: "Force Prime"
|
|
2898
|
+
name: "Force Prime",
|
|
2899
|
+
optimizedCover: {
|
|
2900
|
+
webp: {
|
|
2901
|
+
768: "cover@768.webp",
|
|
2902
|
+
1024: "cover@1024.webp",
|
|
2903
|
+
1440: "cover@1440.webp"
|
|
2904
|
+
},
|
|
2905
|
+
jpg: {
|
|
2906
|
+
768: "cover@768.jpg",
|
|
2907
|
+
1024: "cover@1024.jpg",
|
|
2908
|
+
1440: "cover@1440.jpg"
|
|
2909
|
+
},
|
|
2910
|
+
png: {
|
|
2911
|
+
768: "cover@768.png",
|
|
2912
|
+
1024: "cover@1024.png",
|
|
2913
|
+
1440: "cover@1440.png"
|
|
2914
|
+
}
|
|
2915
|
+
},
|
|
2916
|
+
optimizedIcon: {
|
|
2917
|
+
webp: {
|
|
2918
|
+
16: "icon@16.webp",
|
|
2919
|
+
32: "icon@32.webp",
|
|
2920
|
+
64: "icon@64.webp",
|
|
2921
|
+
128: "icon@128.webp",
|
|
2922
|
+
256: "icon@256.webp"
|
|
2923
|
+
},
|
|
2924
|
+
png: {
|
|
2925
|
+
16: "icon@16.png",
|
|
2926
|
+
32: "icon@32.png",
|
|
2927
|
+
64: "icon@64.png",
|
|
2928
|
+
128: "icon@128.png",
|
|
2929
|
+
256: "icon@256.png"
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2370
2932
|
}
|
|
2371
2933
|
},
|
|
2372
2934
|
"jokers-of-neon": {
|
|
@@ -2377,7 +2939,40 @@ var L = {
|
|
|
2377
2939
|
},
|
|
2378
2940
|
cover: "https://static.cartridge.gg/presets/jokers-of-neon/cover.png",
|
|
2379
2941
|
icon: "https://static.cartridge.gg/presets/jokers-of-neon/icon.png",
|
|
2380
|
-
name: "Jokers of Neon"
|
|
2942
|
+
name: "Jokers of Neon",
|
|
2943
|
+
optimizedCover: {
|
|
2944
|
+
webp: {
|
|
2945
|
+
768: "cover@768.webp",
|
|
2946
|
+
1024: "cover@1024.webp",
|
|
2947
|
+
1440: "cover@1440.webp"
|
|
2948
|
+
},
|
|
2949
|
+
jpg: {
|
|
2950
|
+
768: "cover@768.jpg",
|
|
2951
|
+
1024: "cover@1024.jpg",
|
|
2952
|
+
1440: "cover@1440.jpg"
|
|
2953
|
+
},
|
|
2954
|
+
png: {
|
|
2955
|
+
768: "cover@768.png",
|
|
2956
|
+
1024: "cover@1024.png",
|
|
2957
|
+
1440: "cover@1440.png"
|
|
2958
|
+
}
|
|
2959
|
+
},
|
|
2960
|
+
optimizedIcon: {
|
|
2961
|
+
webp: {
|
|
2962
|
+
16: "icon@16.webp",
|
|
2963
|
+
32: "icon@32.webp",
|
|
2964
|
+
64: "icon@64.webp",
|
|
2965
|
+
128: "icon@128.webp",
|
|
2966
|
+
256: "icon@256.webp"
|
|
2967
|
+
},
|
|
2968
|
+
png: {
|
|
2969
|
+
16: "icon@16.png",
|
|
2970
|
+
32: "icon@32.png",
|
|
2971
|
+
64: "icon@64.png",
|
|
2972
|
+
128: "icon@128.png",
|
|
2973
|
+
256: "icon@256.png"
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2381
2976
|
}
|
|
2382
2977
|
},
|
|
2383
2978
|
"loot-survivor": {
|
|
@@ -2434,7 +3029,40 @@ var L = {
|
|
|
2434
3029
|
},
|
|
2435
3030
|
cover: "https://static.cartridge.gg/presets/loot-survivor/cover.png",
|
|
2436
3031
|
icon: "https://static.cartridge.gg/presets/loot-survivor/icon.png",
|
|
2437
|
-
name: "Loot Survivor"
|
|
3032
|
+
name: "Loot Survivor",
|
|
3033
|
+
optimizedCover: {
|
|
3034
|
+
webp: {
|
|
3035
|
+
768: "cover@768.webp",
|
|
3036
|
+
1024: "cover@1024.webp",
|
|
3037
|
+
1440: "cover@1440.webp"
|
|
3038
|
+
},
|
|
3039
|
+
jpg: {
|
|
3040
|
+
768: "cover@768.jpg",
|
|
3041
|
+
1024: "cover@1024.jpg",
|
|
3042
|
+
1440: "cover@1440.jpg"
|
|
3043
|
+
},
|
|
3044
|
+
png: {
|
|
3045
|
+
768: "cover@768.png",
|
|
3046
|
+
1024: "cover@1024.png",
|
|
3047
|
+
1440: "cover@1440.png"
|
|
3048
|
+
}
|
|
3049
|
+
},
|
|
3050
|
+
optimizedIcon: {
|
|
3051
|
+
webp: {
|
|
3052
|
+
16: "icon@16.webp",
|
|
3053
|
+
32: "icon@32.webp",
|
|
3054
|
+
64: "icon@64.webp",
|
|
3055
|
+
128: "icon@128.webp",
|
|
3056
|
+
256: "icon@256.webp"
|
|
3057
|
+
},
|
|
3058
|
+
png: {
|
|
3059
|
+
16: "icon@16.png",
|
|
3060
|
+
32: "icon@32.png",
|
|
3061
|
+
64: "icon@64.png",
|
|
3062
|
+
128: "icon@128.png",
|
|
3063
|
+
256: "icon@256.png"
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
2438
3066
|
}
|
|
2439
3067
|
},
|
|
2440
3068
|
nums: {
|
|
@@ -2514,7 +3142,40 @@ var L = {
|
|
|
2514
3142
|
},
|
|
2515
3143
|
cover: "https://static.cartridge.gg/presets/nums/cover.png",
|
|
2516
3144
|
icon: "https://static.cartridge.gg/presets/nums/icon.png",
|
|
2517
|
-
name: "Nums"
|
|
3145
|
+
name: "Nums",
|
|
3146
|
+
optimizedCover: {
|
|
3147
|
+
webp: {
|
|
3148
|
+
768: "cover@768.webp",
|
|
3149
|
+
1024: "cover@1024.webp",
|
|
3150
|
+
1440: "cover@1440.webp"
|
|
3151
|
+
},
|
|
3152
|
+
jpg: {
|
|
3153
|
+
768: "cover@768.jpg",
|
|
3154
|
+
1024: "cover@1024.jpg",
|
|
3155
|
+
1440: "cover@1440.jpg"
|
|
3156
|
+
},
|
|
3157
|
+
png: {
|
|
3158
|
+
768: "cover@768.png",
|
|
3159
|
+
1024: "cover@1024.png",
|
|
3160
|
+
1440: "cover@1440.png"
|
|
3161
|
+
}
|
|
3162
|
+
},
|
|
3163
|
+
optimizedIcon: {
|
|
3164
|
+
webp: {
|
|
3165
|
+
16: "icon@16.webp",
|
|
3166
|
+
32: "icon@32.webp",
|
|
3167
|
+
64: "icon@64.webp",
|
|
3168
|
+
128: "icon@128.webp",
|
|
3169
|
+
256: "icon@256.webp"
|
|
3170
|
+
},
|
|
3171
|
+
png: {
|
|
3172
|
+
16: "icon@16.png",
|
|
3173
|
+
32: "icon@32.png",
|
|
3174
|
+
64: "icon@64.png",
|
|
3175
|
+
128: "icon@128.png",
|
|
3176
|
+
256: "icon@256.png"
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
2518
3179
|
}
|
|
2519
3180
|
},
|
|
2520
3181
|
paved: {
|
|
@@ -2525,7 +3186,47 @@ var L = {
|
|
|
2525
3186
|
},
|
|
2526
3187
|
cover: "https://static.cartridge.gg/presets/paved/cover.png",
|
|
2527
3188
|
icon: "https://static.cartridge.gg/presets/paved/icon.svg",
|
|
2528
|
-
name: "Paved"
|
|
3189
|
+
name: "Paved",
|
|
3190
|
+
optimizedCover: {
|
|
3191
|
+
webp: {
|
|
3192
|
+
768: "cover@768.webp",
|
|
3193
|
+
1024: "cover@1024.webp",
|
|
3194
|
+
1440: "cover@1440.webp"
|
|
3195
|
+
},
|
|
3196
|
+
jpg: {
|
|
3197
|
+
768: "cover@768.jpg",
|
|
3198
|
+
1024: "cover@1024.jpg",
|
|
3199
|
+
1440: "cover@1440.jpg"
|
|
3200
|
+
},
|
|
3201
|
+
png: {
|
|
3202
|
+
768: "cover@768.png",
|
|
3203
|
+
1024: "cover@1024.png",
|
|
3204
|
+
1440: "cover@1440.png"
|
|
3205
|
+
}
|
|
3206
|
+
},
|
|
3207
|
+
optimizedIcon: {
|
|
3208
|
+
webp: {
|
|
3209
|
+
16: "icon@16.webp",
|
|
3210
|
+
32: "icon@32.webp",
|
|
3211
|
+
64: "icon@64.webp",
|
|
3212
|
+
128: "icon@128.webp",
|
|
3213
|
+
256: "icon@256.webp"
|
|
3214
|
+
},
|
|
3215
|
+
png: {
|
|
3216
|
+
16: "icon@16.png",
|
|
3217
|
+
32: "icon@32.png",
|
|
3218
|
+
64: "icon@64.png",
|
|
3219
|
+
128: "icon@128.png",
|
|
3220
|
+
256: "icon@256.png"
|
|
3221
|
+
},
|
|
3222
|
+
svg: {
|
|
3223
|
+
16: "icon@16.svg",
|
|
3224
|
+
32: "icon@32.svg",
|
|
3225
|
+
64: "icon@64.svg",
|
|
3226
|
+
128: "icon@128.svg",
|
|
3227
|
+
256: "icon@256.svg"
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
2529
3230
|
}
|
|
2530
3231
|
},
|
|
2531
3232
|
pistols: {
|
|
@@ -2544,7 +3245,40 @@ var L = {
|
|
|
2544
3245
|
},
|
|
2545
3246
|
cover: "https://static.cartridge.gg/presets/pistols/cover.png",
|
|
2546
3247
|
icon: "https://static.cartridge.gg/presets/pistols/icon.png",
|
|
2547
|
-
name: "Pistols at Dawn"
|
|
3248
|
+
name: "Pistols at Dawn",
|
|
3249
|
+
optimizedCover: {
|
|
3250
|
+
webp: {
|
|
3251
|
+
768: "cover@768.webp",
|
|
3252
|
+
1024: "cover@1024.webp",
|
|
3253
|
+
1440: "cover@1440.webp"
|
|
3254
|
+
},
|
|
3255
|
+
jpg: {
|
|
3256
|
+
768: "cover@768.jpg",
|
|
3257
|
+
1024: "cover@1024.jpg",
|
|
3258
|
+
1440: "cover@1440.jpg"
|
|
3259
|
+
},
|
|
3260
|
+
png: {
|
|
3261
|
+
768: "cover@768.png",
|
|
3262
|
+
1024: "cover@1024.png",
|
|
3263
|
+
1440: "cover@1440.png"
|
|
3264
|
+
}
|
|
3265
|
+
},
|
|
3266
|
+
optimizedIcon: {
|
|
3267
|
+
webp: {
|
|
3268
|
+
16: "icon@16.webp",
|
|
3269
|
+
32: "icon@32.webp",
|
|
3270
|
+
64: "icon@64.webp",
|
|
3271
|
+
128: "icon@128.webp",
|
|
3272
|
+
256: "icon@256.webp"
|
|
3273
|
+
},
|
|
3274
|
+
png: {
|
|
3275
|
+
16: "icon@16.png",
|
|
3276
|
+
32: "icon@32.png",
|
|
3277
|
+
64: "icon@64.png",
|
|
3278
|
+
128: "icon@128.png",
|
|
3279
|
+
256: "icon@256.png"
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
2548
3282
|
},
|
|
2549
3283
|
chains: {
|
|
2550
3284
|
SN_MAIN: {
|
|
@@ -2754,7 +3488,47 @@ var L = {
|
|
|
2754
3488
|
},
|
|
2755
3489
|
cover: "https://static.cartridge.gg/presets/pixelaw/cover.png",
|
|
2756
3490
|
icon: "https://static.cartridge.gg/presets/pixelaw/icon.svg",
|
|
2757
|
-
name: "Pixelaw"
|
|
3491
|
+
name: "Pixelaw",
|
|
3492
|
+
optimizedCover: {
|
|
3493
|
+
webp: {
|
|
3494
|
+
768: "cover@768.webp",
|
|
3495
|
+
1024: "cover@1024.webp",
|
|
3496
|
+
1440: "cover@1440.webp"
|
|
3497
|
+
},
|
|
3498
|
+
jpg: {
|
|
3499
|
+
768: "cover@768.jpg",
|
|
3500
|
+
1024: "cover@1024.jpg",
|
|
3501
|
+
1440: "cover@1440.jpg"
|
|
3502
|
+
},
|
|
3503
|
+
png: {
|
|
3504
|
+
768: "cover@768.png",
|
|
3505
|
+
1024: "cover@1024.png",
|
|
3506
|
+
1440: "cover@1440.png"
|
|
3507
|
+
}
|
|
3508
|
+
},
|
|
3509
|
+
optimizedIcon: {
|
|
3510
|
+
webp: {
|
|
3511
|
+
16: "icon@16.webp",
|
|
3512
|
+
32: "icon@32.webp",
|
|
3513
|
+
64: "icon@64.webp",
|
|
3514
|
+
128: "icon@128.webp",
|
|
3515
|
+
256: "icon@256.webp"
|
|
3516
|
+
},
|
|
3517
|
+
png: {
|
|
3518
|
+
16: "icon@16.png",
|
|
3519
|
+
32: "icon@32.png",
|
|
3520
|
+
64: "icon@64.png",
|
|
3521
|
+
128: "icon@128.png",
|
|
3522
|
+
256: "icon@256.png"
|
|
3523
|
+
},
|
|
3524
|
+
svg: {
|
|
3525
|
+
16: "icon@16.svg",
|
|
3526
|
+
32: "icon@32.svg",
|
|
3527
|
+
64: "icon@64.svg",
|
|
3528
|
+
128: "icon@128.svg",
|
|
3529
|
+
256: "icon@256.svg"
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
2758
3532
|
}
|
|
2759
3533
|
},
|
|
2760
3534
|
"realm-of-ra": {
|
|
@@ -2765,7 +3539,40 @@ var L = {
|
|
|
2765
3539
|
},
|
|
2766
3540
|
cover: "https://static.cartridge.gg/presets/realm-of-ra/cover.png",
|
|
2767
3541
|
icon: "https://static.cartridge.gg/presets/realm-of-ra/icon.png",
|
|
2768
|
-
name: "Realm of Ra"
|
|
3542
|
+
name: "Realm of Ra",
|
|
3543
|
+
optimizedCover: {
|
|
3544
|
+
webp: {
|
|
3545
|
+
768: "cover@768.webp",
|
|
3546
|
+
1024: "cover@1024.webp",
|
|
3547
|
+
1440: "cover@1440.webp"
|
|
3548
|
+
},
|
|
3549
|
+
jpg: {
|
|
3550
|
+
768: "cover@768.jpg",
|
|
3551
|
+
1024: "cover@1024.jpg",
|
|
3552
|
+
1440: "cover@1440.jpg"
|
|
3553
|
+
},
|
|
3554
|
+
png: {
|
|
3555
|
+
768: "cover@768.png",
|
|
3556
|
+
1024: "cover@1024.png",
|
|
3557
|
+
1440: "cover@1440.png"
|
|
3558
|
+
}
|
|
3559
|
+
},
|
|
3560
|
+
optimizedIcon: {
|
|
3561
|
+
webp: {
|
|
3562
|
+
16: "icon@16.webp",
|
|
3563
|
+
32: "icon@32.webp",
|
|
3564
|
+
64: "icon@64.webp",
|
|
3565
|
+
128: "icon@128.webp",
|
|
3566
|
+
256: "icon@256.webp"
|
|
3567
|
+
},
|
|
3568
|
+
png: {
|
|
3569
|
+
16: "icon@16.png",
|
|
3570
|
+
32: "icon@32.png",
|
|
3571
|
+
64: "icon@64.png",
|
|
3572
|
+
128: "icon@128.png",
|
|
3573
|
+
256: "icon@256.png"
|
|
3574
|
+
}
|
|
3575
|
+
}
|
|
2769
3576
|
}
|
|
2770
3577
|
},
|
|
2771
3578
|
"savage-summit": {
|
|
@@ -2776,7 +3583,40 @@ var L = {
|
|
|
2776
3583
|
},
|
|
2777
3584
|
cover: "https://static.cartridge.gg/presets/savage-summit/cover.png",
|
|
2778
3585
|
icon: "https://static.cartridge.gg/presets/savage-summit/icon.png",
|
|
2779
|
-
name: "Savage Summit"
|
|
3586
|
+
name: "Savage Summit",
|
|
3587
|
+
optimizedCover: {
|
|
3588
|
+
webp: {
|
|
3589
|
+
768: "cover@768.webp",
|
|
3590
|
+
1024: "cover@1024.webp",
|
|
3591
|
+
1440: "cover@1440.webp"
|
|
3592
|
+
},
|
|
3593
|
+
jpg: {
|
|
3594
|
+
768: "cover@768.jpg",
|
|
3595
|
+
1024: "cover@1024.jpg",
|
|
3596
|
+
1440: "cover@1440.jpg"
|
|
3597
|
+
},
|
|
3598
|
+
png: {
|
|
3599
|
+
768: "cover@768.png",
|
|
3600
|
+
1024: "cover@1024.png",
|
|
3601
|
+
1440: "cover@1440.png"
|
|
3602
|
+
}
|
|
3603
|
+
},
|
|
3604
|
+
optimizedIcon: {
|
|
3605
|
+
webp: {
|
|
3606
|
+
16: "icon@16.webp",
|
|
3607
|
+
32: "icon@32.webp",
|
|
3608
|
+
64: "icon@64.webp",
|
|
3609
|
+
128: "icon@128.webp",
|
|
3610
|
+
256: "icon@256.webp"
|
|
3611
|
+
},
|
|
3612
|
+
png: {
|
|
3613
|
+
16: "icon@16.png",
|
|
3614
|
+
32: "icon@32.png",
|
|
3615
|
+
64: "icon@64.png",
|
|
3616
|
+
128: "icon@128.png",
|
|
3617
|
+
256: "icon@256.png"
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
2780
3620
|
}
|
|
2781
3621
|
},
|
|
2782
3622
|
"tale-weaver": {
|
|
@@ -2787,7 +3627,40 @@ var L = {
|
|
|
2787
3627
|
},
|
|
2788
3628
|
cover: "https://static.cartridge.gg/presets/tale-weaver/cover.png",
|
|
2789
3629
|
icon: "https://static.cartridge.gg/presets/tale-weaver/icon.png",
|
|
2790
|
-
name: "Tale Weaver"
|
|
3630
|
+
name: "Tale Weaver",
|
|
3631
|
+
optimizedCover: {
|
|
3632
|
+
webp: {
|
|
3633
|
+
768: "cover@768.webp",
|
|
3634
|
+
1024: "cover@1024.webp",
|
|
3635
|
+
1440: "cover@1440.webp"
|
|
3636
|
+
},
|
|
3637
|
+
jpg: {
|
|
3638
|
+
768: "cover@768.jpg",
|
|
3639
|
+
1024: "cover@1024.jpg",
|
|
3640
|
+
1440: "cover@1440.jpg"
|
|
3641
|
+
},
|
|
3642
|
+
png: {
|
|
3643
|
+
768: "cover@768.png",
|
|
3644
|
+
1024: "cover@1024.png",
|
|
3645
|
+
1440: "cover@1440.png"
|
|
3646
|
+
}
|
|
3647
|
+
},
|
|
3648
|
+
optimizedIcon: {
|
|
3649
|
+
webp: {
|
|
3650
|
+
16: "icon@16.webp",
|
|
3651
|
+
32: "icon@32.webp",
|
|
3652
|
+
64: "icon@64.webp",
|
|
3653
|
+
128: "icon@128.webp",
|
|
3654
|
+
256: "icon@256.webp"
|
|
3655
|
+
},
|
|
3656
|
+
png: {
|
|
3657
|
+
16: "icon@16.png",
|
|
3658
|
+
32: "icon@32.png",
|
|
3659
|
+
64: "icon@64.png",
|
|
3660
|
+
128: "icon@128.png",
|
|
3661
|
+
256: "icon@256.png"
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
2791
3664
|
}
|
|
2792
3665
|
},
|
|
2793
3666
|
zkastle: {
|
|
@@ -2798,7 +3671,47 @@ var L = {
|
|
|
2798
3671
|
},
|
|
2799
3672
|
cover: "https://static.cartridge.gg/presets/zkastle/cover.png",
|
|
2800
3673
|
icon: "https://static.cartridge.gg/presets/zkastle/icon.svg",
|
|
2801
|
-
name: "zKastle"
|
|
3674
|
+
name: "zKastle",
|
|
3675
|
+
optimizedCover: {
|
|
3676
|
+
webp: {
|
|
3677
|
+
768: "cover@768.webp",
|
|
3678
|
+
1024: "cover@1024.webp",
|
|
3679
|
+
1440: "cover@1440.webp"
|
|
3680
|
+
},
|
|
3681
|
+
jpg: {
|
|
3682
|
+
768: "cover@768.jpg",
|
|
3683
|
+
1024: "cover@1024.jpg",
|
|
3684
|
+
1440: "cover@1440.jpg"
|
|
3685
|
+
},
|
|
3686
|
+
png: {
|
|
3687
|
+
768: "cover@768.png",
|
|
3688
|
+
1024: "cover@1024.png",
|
|
3689
|
+
1440: "cover@1440.png"
|
|
3690
|
+
}
|
|
3691
|
+
},
|
|
3692
|
+
optimizedIcon: {
|
|
3693
|
+
webp: {
|
|
3694
|
+
16: "icon@16.webp",
|
|
3695
|
+
32: "icon@32.webp",
|
|
3696
|
+
64: "icon@64.webp",
|
|
3697
|
+
128: "icon@128.webp",
|
|
3698
|
+
256: "icon@256.webp"
|
|
3699
|
+
},
|
|
3700
|
+
png: {
|
|
3701
|
+
16: "icon@16.png",
|
|
3702
|
+
32: "icon@32.png",
|
|
3703
|
+
64: "icon@64.png",
|
|
3704
|
+
128: "icon@128.png",
|
|
3705
|
+
256: "icon@256.png"
|
|
3706
|
+
},
|
|
3707
|
+
svg: {
|
|
3708
|
+
16: "icon@16.svg",
|
|
3709
|
+
32: "icon@32.svg",
|
|
3710
|
+
64: "icon@64.svg",
|
|
3711
|
+
128: "icon@128.svg",
|
|
3712
|
+
256: "icon@256.svg"
|
|
3713
|
+
}
|
|
3714
|
+
}
|
|
2802
3715
|
}
|
|
2803
3716
|
},
|
|
2804
3717
|
zktt: {
|
|
@@ -2809,7 +3722,40 @@ var L = {
|
|
|
2809
3722
|
},
|
|
2810
3723
|
cover: "https://static.cartridge.gg/presets/zktt/cover.png",
|
|
2811
3724
|
icon: "https://static.cartridge.gg/presets/zktt/icon.png",
|
|
2812
|
-
name: "zKTT"
|
|
3725
|
+
name: "zKTT",
|
|
3726
|
+
optimizedCover: {
|
|
3727
|
+
webp: {
|
|
3728
|
+
768: "cover@768.webp",
|
|
3729
|
+
1024: "cover@1024.webp",
|
|
3730
|
+
1440: "cover@1440.webp"
|
|
3731
|
+
},
|
|
3732
|
+
jpg: {
|
|
3733
|
+
768: "cover@768.jpg",
|
|
3734
|
+
1024: "cover@1024.jpg",
|
|
3735
|
+
1440: "cover@1440.jpg"
|
|
3736
|
+
},
|
|
3737
|
+
png: {
|
|
3738
|
+
768: "cover@768.png",
|
|
3739
|
+
1024: "cover@1024.png",
|
|
3740
|
+
1440: "cover@1440.png"
|
|
3741
|
+
}
|
|
3742
|
+
},
|
|
3743
|
+
optimizedIcon: {
|
|
3744
|
+
webp: {
|
|
3745
|
+
16: "icon@16.webp",
|
|
3746
|
+
32: "icon@32.webp",
|
|
3747
|
+
64: "icon@64.webp",
|
|
3748
|
+
128: "icon@128.webp",
|
|
3749
|
+
256: "icon@256.webp"
|
|
3750
|
+
},
|
|
3751
|
+
png: {
|
|
3752
|
+
16: "icon@16.png",
|
|
3753
|
+
32: "icon@32.png",
|
|
3754
|
+
64: "icon@64.png",
|
|
3755
|
+
128: "icon@128.png",
|
|
3756
|
+
256: "icon@256.png"
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
2813
3759
|
}
|
|
2814
3760
|
},
|
|
2815
3761
|
zkube: {
|
|
@@ -2820,10 +3766,43 @@ var L = {
|
|
|
2820
3766
|
},
|
|
2821
3767
|
cover: "https://static.cartridge.gg/presets/zkube/cover.png",
|
|
2822
3768
|
icon: "https://static.cartridge.gg/presets/zkube/icon.png",
|
|
2823
|
-
name: "zKube"
|
|
3769
|
+
name: "zKube",
|
|
3770
|
+
optimizedCover: {
|
|
3771
|
+
webp: {
|
|
3772
|
+
768: "cover@768.webp",
|
|
3773
|
+
1024: "cover@1024.webp",
|
|
3774
|
+
1440: "cover@1440.webp"
|
|
3775
|
+
},
|
|
3776
|
+
jpg: {
|
|
3777
|
+
768: "cover@768.jpg",
|
|
3778
|
+
1024: "cover@1024.jpg",
|
|
3779
|
+
1440: "cover@1440.jpg"
|
|
3780
|
+
},
|
|
3781
|
+
png: {
|
|
3782
|
+
768: "cover@768.png",
|
|
3783
|
+
1024: "cover@1024.png",
|
|
3784
|
+
1440: "cover@1440.png"
|
|
3785
|
+
}
|
|
3786
|
+
},
|
|
3787
|
+
optimizedIcon: {
|
|
3788
|
+
webp: {
|
|
3789
|
+
16: "icon@16.webp",
|
|
3790
|
+
32: "icon@32.webp",
|
|
3791
|
+
64: "icon@64.webp",
|
|
3792
|
+
128: "icon@128.webp",
|
|
3793
|
+
256: "icon@256.webp"
|
|
3794
|
+
},
|
|
3795
|
+
png: {
|
|
3796
|
+
16: "icon@16.png",
|
|
3797
|
+
32: "icon@32.png",
|
|
3798
|
+
64: "icon@64.png",
|
|
3799
|
+
128: "icon@128.png",
|
|
3800
|
+
256: "icon@256.png"
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
2824
3803
|
}
|
|
2825
3804
|
}
|
|
2826
|
-
},
|
|
3805
|
+
}, Re = [
|
|
2827
3806
|
{
|
|
2828
3807
|
name: "Wrapped BTC",
|
|
2829
3808
|
symbol: "WBTC",
|
|
@@ -3369,25 +4348,25 @@ var L = {
|
|
|
3369
4348
|
hidden: !0,
|
|
3370
4349
|
logo_url: "https://imagedelivery.net/0xPAQaDtnQhBs8IzYRIlNg/6deef27f-df40-4248-4e1b-ed1d79a3f000/logo"
|
|
3371
4350
|
}
|
|
3372
|
-
],
|
|
4351
|
+
], Te = U, Qe = Re, Fe = U.cartridge.theme;
|
|
3373
4352
|
export {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
4353
|
+
Ae as ArgentWallet,
|
|
4354
|
+
_e as MetaMaskWallet,
|
|
4355
|
+
b as NotReadyToConnect,
|
|
4356
|
+
ke as PhantomWallet,
|
|
3378
4357
|
A as ResponseCodes,
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
4358
|
+
Ce as WalletBridge,
|
|
4359
|
+
Te as controllerConfigs,
|
|
4360
|
+
Ne as default,
|
|
4361
|
+
Fe as defaultTheme,
|
|
4362
|
+
Qe as erc20Metadata,
|
|
4363
|
+
Oe as humanizeString,
|
|
3385
4364
|
Be as lookupAddresses,
|
|
3386
|
-
|
|
3387
|
-
|
|
4365
|
+
je as lookupUsernames,
|
|
4366
|
+
Ye as normalizeCalls,
|
|
3388
4367
|
K as parseChainId,
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
4368
|
+
Y as toArray,
|
|
4369
|
+
$e as toSessionPolicies,
|
|
4370
|
+
We as toWasmPolicies
|
|
3392
4371
|
};
|
|
3393
4372
|
//# sourceMappingURL=index.js.map
|