@cartridge/controller 0.7.13-alpha.2 → 0.7.13-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { WalletAccount as Pe, shortString as G, num as Ne } from "starknet";
2
- import { R as E, t as Me, K as De, P as Be, B as ze, N as y, p as Te, A as je } from "./provider-LFJfEvkl.js";
3
- import { F as fn, h as bn, n as yn, a as wn, b as vn } from "./provider-LFJfEvkl.js";
4
- import { connect as Ue } from "starknetkit";
5
- import { InjectedConnector as Oe } from "starknetkit/injected";
6
- import { MetaMaskSDK as Le } from "@metamask/sdk";
7
- import { Transaction as Fe } from "@solana/web3.js";
8
- class J extends Pe {
1
+ import { WalletAccount as Se, shortString as G, num as Pe } from "starknet";
2
+ import { R as E, t as Me, K as Ne, P as De, B as Be, N as y, p as ze, A as Te } from "./provider-M8-BWFF8.js";
3
+ import { F as fn, h as bn, n as yn, a as wn, b as vn } from "./provider-M8-BWFF8.js";
4
+ import { connect as je } from "starknetkit";
5
+ import { InjectedConnector as Ue } from "starknetkit/injected";
6
+ import { MetaMaskSDK as Oe } from "@metamask/sdk";
7
+ import { Transaction as Le } from "@solana/web3.js";
8
+ class J extends Se {
9
9
  address;
10
10
  keychain;
11
11
  modal;
@@ -98,7 +98,7 @@ var x;
98
98
  (function(n) {
99
99
  n.Message = "message";
100
100
  })(x || (x = {}));
101
- const Qe = (n, e) => {
101
+ const Fe = (n, e) => {
102
102
  const t = [];
103
103
  let r = !1;
104
104
  return {
@@ -111,27 +111,27 @@ const Qe = (n, e) => {
111
111
  r ? o() : t.push(o);
112
112
  }
113
113
  };
114
- }, We = (n) => (...e) => {
114
+ }, Qe = (n) => (...e) => {
115
115
  n && console.log("[Penpal]", ...e);
116
- }, $e = {
116
+ }, We = {
117
117
  "http:": "80",
118
118
  "https:": "443"
119
- }, He = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Ye = ["file:", "data:"], qe = (n) => {
120
- if (n && Ye.find((s) => n.startsWith(s)))
119
+ }, $e = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, He = ["file:", "data:"], Ye = (n) => {
120
+ if (n && He.find((s) => n.startsWith(s)))
121
121
  return "null";
122
- const e = document.location, t = He.exec(n);
122
+ const e = document.location, t = $e.exec(n);
123
123
  let r, o, a;
124
124
  t ? (r = t[1] ? t[1] : e.protocol, o = t[2], a = t[4]) : (r = e.protocol, o = e.hostname, a = e.port);
125
- const i = a && a !== $e[r] ? `:${a}` : "";
125
+ const i = a && a !== We[r] ? `:${a}` : "";
126
126
  return `${r}//${o}${i}`;
127
127
  }, X = ({ name: n, message: e, stack: t }) => ({
128
128
  name: n,
129
129
  message: e,
130
130
  stack: t
131
- }), Ke = (n) => {
131
+ }), qe = (n) => {
132
132
  const e = new Error();
133
133
  return Object.keys(n).forEach((t) => e[t] = n[t]), e;
134
- }, Ve = (n, e, t) => {
134
+ }, Ke = (n, e, t) => {
135
135
  const { localName: r, local: o, remote: a, originForSending: i, originForReceiving: s } = n;
136
136
  let d = !1;
137
137
  const p = (c) => {
@@ -177,25 +177,25 @@ const Qe = (n, e) => {
177
177
  d = !0, o.removeEventListener(x.Message, p);
178
178
  };
179
179
  };
180
- let Ge = 0;
181
- const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n.join(ue), Ze = (n, e) => {
182
- const t = fe(e || "");
183
- return t.push(n), Xe(t);
184
- }, et = (n, e, t) => {
185
- const r = fe(e);
180
+ let Ve = 0;
181
+ const Ge = () => ++Ve, he = ".", ue = (n) => n ? n.split(he) : [], Je = (n) => n.join(he), Xe = (n, e) => {
182
+ const t = ue(e || "");
183
+ return t.push(n), Je(t);
184
+ }, Ze = (n, e, t) => {
185
+ const r = ue(e);
186
186
  return r.reduce((o, a, i) => (typeof o[a] > "u" && (o[a] = {}), i === r.length - 1 && (o[a] = t), o[a]), n), n;
187
- }, be = (n, e) => {
187
+ }, fe = (n, e) => {
188
188
  const t = {};
189
189
  return Object.keys(n).forEach((r) => {
190
- const o = n[r], a = Ze(r, e);
191
- typeof o == "object" && Object.assign(t, be(o, a)), typeof o == "function" && (t[a] = o);
190
+ const o = n[r], a = Xe(r, e);
191
+ typeof o == "object" && Object.assign(t, fe(o, a)), typeof o == "function" && (t[a] = o);
192
192
  }), t;
193
- }, tt = (n) => {
193
+ }, et = (n) => {
194
194
  const e = {};
195
195
  for (const t in n)
196
- et(e, t, n[t]);
196
+ Ze(e, t, n[t]);
197
197
  return e;
198
- }, nt = (n, e, t, r, o) => {
198
+ }, tt = (n, e, t, r, o) => {
199
199
  const { localName: a, local: i, remote: s, originForSending: d, originForReceiving: p } = e;
200
200
  let c = !1;
201
201
  o(`${a}: Connecting call sender`);
@@ -212,7 +212,7 @@ const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n
212
212
  throw b.code = T.ConnectionDestroyed, b;
213
213
  }
214
214
  return new Promise((b, C) => {
215
- const A = Je(), u = (P) => {
215
+ const A = Ge(), u = (P) => {
216
216
  if (P.source !== s || P.data.penpal !== k.Reply || P.data.id !== A)
217
217
  return;
218
218
  if (p !== "*" && P.origin !== p) {
@@ -222,7 +222,7 @@ const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n
222
222
  const Q = P.data;
223
223
  o(`${a}: Received ${m}() reply`), i.removeEventListener(x.Message, u);
224
224
  let W = Q.returnValue;
225
- Q.returnValueIsError && (W = Ke(W)), (Q.resolution === R.Fulfilled ? b : C)(W);
225
+ Q.returnValueIsError && (W = qe(W)), (Q.resolution === R.Fulfilled ? b : C)(W);
226
226
  };
227
227
  i.addEventListener(x.Message, u);
228
228
  const S = {
@@ -234,10 +234,10 @@ const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n
234
234
  s.postMessage(S, d);
235
235
  });
236
236
  }, g = t.reduce((m, f) => (m[f] = l(f), m), {});
237
- return Object.assign(n, tt(g)), () => {
237
+ return Object.assign(n, et(g)), () => {
238
238
  c = !0;
239
239
  };
240
- }, rt = (n, e, t, r, o) => {
240
+ }, nt = (n, e, t, r, o) => {
241
241
  const { destroy: a, onDestroy: i } = r;
242
242
  let s, d;
243
243
  const p = {};
@@ -254,13 +254,13 @@ const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n
254
254
  originForSending: t,
255
255
  originForReceiving: e
256
256
  };
257
- s && s(), s = Ve(l, n, o), i(s), d && d.forEach((m) => {
257
+ s && s(), s = Ke(l, n, o), i(s), d && d.forEach((m) => {
258
258
  delete p[m];
259
259
  }), d = c.data.methodNames;
260
- const g = nt(p, l, d, a, o);
260
+ const g = tt(p, l, d, a, o);
261
261
  return i(g), p;
262
262
  };
263
- }, ot = (n, e, t, r) => (o) => {
263
+ }, rt = (n, e, t, r) => (o) => {
264
264
  if (!o.source)
265
265
  return;
266
266
  if (t !== "*" && o.origin !== t) {
@@ -273,14 +273,14 @@ const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n
273
273
  methodNames: Object.keys(e)
274
274
  };
275
275
  o.source.postMessage(a, r);
276
- }, at = 6e4, it = (n, e) => {
276
+ }, ot = 6e4, at = (n, e) => {
277
277
  const { destroy: t, onDestroy: r } = e, o = setInterval(() => {
278
278
  n.isConnected || (clearInterval(o), t());
279
- }, at);
279
+ }, ot);
280
280
  r(() => {
281
281
  clearInterval(o);
282
282
  });
283
- }, st = (n, e) => {
283
+ }, it = (n, e) => {
284
284
  let t;
285
285
  return n !== void 0 && (t = window.setTimeout(() => {
286
286
  const r = new Error(`Connection timed out after ${n}ms`);
@@ -288,19 +288,19 @@ const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n
288
288
  }, n)), () => {
289
289
  clearTimeout(t);
290
290
  };
291
- }, ct = (n) => {
291
+ }, st = (n) => {
292
292
  if (!n.src && !n.srcdoc) {
293
293
  const e = new Error("Iframe must have src or srcdoc property defined.");
294
294
  throw e.code = T.NoIframeSrc, e;
295
295
  }
296
- }, dt = (n) => {
296
+ }, ct = (n) => {
297
297
  let { iframe: e, methods: t = {}, childOrigin: r, timeout: o, debug: a = !1 } = n;
298
- const i = We(a), s = Qe("Parent", i), { onDestroy: d, destroy: p } = s;
299
- r || (ct(e), r = qe(e.src));
300
- const c = r === "null" ? "*" : r, l = be(t), g = ot(i, l, r, c), m = rt(l, r, c, s, i);
298
+ const i = Qe(a), s = Fe("Parent", i), { onDestroy: d, destroy: p } = s;
299
+ r || (st(e), r = Ye(e.src));
300
+ const c = r === "null" ? "*" : r, l = fe(t), g = rt(i, l, r, c), m = nt(l, r, c, s, i);
301
301
  return {
302
302
  promise: new Promise((I, b) => {
303
- const C = st(o, p), A = (u) => {
303
+ const C = it(o, p), A = (u) => {
304
304
  if (!(u.source !== e.contentWindow || !u.data)) {
305
305
  if (u.data.penpal === k.Syn) {
306
306
  g(u);
@@ -313,7 +313,7 @@ const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n
313
313
  }
314
314
  }
315
315
  };
316
- window.addEventListener(x.Message, A), i("Parent: Awaiting handshake"), it(e, s), d((u) => {
316
+ window.addEventListener(x.Message, A), i("Parent: Awaiting handshake"), at(e, s), d((u) => {
317
317
  window.removeEventListener(x.Message, A), u && b(u);
318
318
  });
319
319
  }),
@@ -322,7 +322,7 @@ const Je = () => ++Ge, ue = ".", fe = (n) => n ? n.split(ue) : [], Xe = (n) => n
322
322
  }
323
323
  };
324
324
  };
325
- class ye {
325
+ class be {
326
326
  url;
327
327
  iframe;
328
328
  container;
@@ -341,7 +341,7 @@ class ye {
341
341
  const s = document.createElement("iframe");
342
342
  s.src = t.toString(), s.id = e, s.style.border = "none", s.sandbox.add("allow-forms"), s.sandbox.add("allow-popups"), s.sandbox.add("allow-popups-to-escape-sandbox"), s.sandbox.add("allow-scripts"), s.sandbox.add("allow-same-origin"), s.allow = "publickey-credentials-create *; publickey-credentials-get *; clipboard-write", document.hasStorageAccess && s.sandbox.add("allow-storage-access-by-user-activation");
343
343
  const d = document.createElement("div");
344
- d.id = "controller", d.style.position = "fixed", d.style.height = "100%", d.style.width = "100%", d.style.top = "0", d.style.left = "0", d.style.zIndex = "10000", d.style.backgroundColor = "rgba(0,0,0,0.6)", d.style.display = "flex", d.style.alignItems = "center", d.style.justifyContent = "center", d.style.visibility = "hidden", d.style.opacity = "0", d.style.transition = "opacity 0.2s ease", d.style.pointerEvents = "auto", d.appendChild(s), this.iframe = s, this.container = d, dt({
344
+ d.id = "controller", d.style.position = "fixed", d.style.height = "100%", d.style.width = "100%", d.style.top = "0", d.style.left = "0", d.style.zIndex = "10000", d.style.backgroundColor = "rgba(0,0,0,0.6)", d.style.display = "flex", d.style.alignItems = "center", d.style.justifyContent = "center", d.style.visibility = "hidden", d.style.opacity = "0", d.style.transition = "opacity 0.2s ease", d.style.pointerEvents = "auto", d.appendChild(s), this.iframe = s, this.container = d, ct({
345
345
  iframe: this.iframe,
346
346
  methods: {
347
347
  close: (l) => () => this.close(),
@@ -390,7 +390,7 @@ class ye {
390
390
  }
391
391
  }
392
392
  }
393
- class pt {
393
+ class dt {
394
394
  type = "argent";
395
395
  platform = "starknet";
396
396
  wallet = void 0;
@@ -415,8 +415,8 @@ class pt {
415
415
  try {
416
416
  if (!this.isAvailable())
417
417
  throw new Error("Argent is not available");
418
- const { wallet: e, connectorData: t } = await Ue({
419
- connectors: [new Oe({ options: { id: "argentX" } })]
418
+ const { wallet: e, connectorData: t } = await je({
419
+ connectors: [new Ue({ options: { id: "argentX" } })]
420
420
  });
421
421
  if (!e)
422
422
  throw new Error("No wallet found");
@@ -476,17 +476,24 @@ class pt {
476
476
  }
477
477
  }
478
478
  }
479
- class lt {
479
+ class pt {
480
480
  type = "metamask";
481
481
  platform = "ethereum";
482
482
  MMSDK;
483
483
  account = void 0;
484
+ connectedAccounts = [];
484
485
  constructor() {
485
- this.MMSDK = new Le({
486
+ this.MMSDK = new Oe({
486
487
  dappMetadata: {
487
488
  name: "Cartridge Controller",
488
489
  url: window.location.href
489
490
  }
491
+ }), this.MMSDK.sdkInitPromise?.then(() => {
492
+ this.MMSDK.getProvider()?.request({
493
+ method: "eth_accounts"
494
+ }).then((e) => {
495
+ e && e.length > 0 && (console.log(e), this.account = e[0], this.connectedAccounts = e);
496
+ });
490
497
  });
491
498
  }
492
499
  isAvailable() {
@@ -500,7 +507,8 @@ class lt {
500
507
  version: e ? window.ethereum?.version || "Unknown" : void 0,
501
508
  chainId: e ? window.ethereum?.chainId : void 0,
502
509
  name: "MetaMask",
503
- platform: this.platform
510
+ platform: this.platform,
511
+ connectedAccounts: this.connectedAccounts
504
512
  };
505
513
  }
506
514
  async connect() {
@@ -511,7 +519,7 @@ class lt {
511
519
  throw new Error("MetaMask is not available");
512
520
  const e = await this.MMSDK.connect();
513
521
  if (e && e.length > 0)
514
- return this.account = e[0], { success: !0, wallet: this.type, account: this.account };
522
+ return this.account = e[0], this.connectedAccounts = e, { success: !0, wallet: this.type, account: this.account };
515
523
  throw new Error("No accounts found");
516
524
  } catch (e) {
517
525
  return console.error("Error connecting to MetaMask:", e), {
@@ -633,7 +641,7 @@ class lt {
633
641
  }
634
642
  }
635
643
  }
636
- class gt {
644
+ class lt {
637
645
  type = "phantom";
638
646
  platform = "solana";
639
647
  account = void 0;
@@ -697,7 +705,7 @@ class gt {
697
705
  if (!this.isAvailable() || !this.account)
698
706
  throw new Error("Phantom is not connected");
699
707
  try {
700
- const t = Fe.from(e), o = await this.getProvider().signAndSendTransaction(t);
708
+ const t = Le.from(e), o = await this.getProvider().signAndSendTransaction(t);
701
709
  return {
702
710
  success: !0,
703
711
  wallet: this.type,
@@ -732,16 +740,16 @@ class gt {
732
740
  }
733
741
  }
734
742
  }
735
- function mt(n) {
743
+ function gt(n) {
736
744
  if (typeof window > "u")
737
745
  return;
738
746
  const e = (t) => n(t.detail);
739
747
  return window.addEventListener("eip6963:announceProvider", e), window.dispatchEvent(new CustomEvent("eip6963:requestProvider")), () => window.removeEventListener("eip6963:announceProvider", e);
740
748
  }
741
- function ht() {
749
+ function mt() {
742
750
  const n = /* @__PURE__ */ new Set();
743
751
  let e = [];
744
- const t = () => mt((o) => {
752
+ const t = () => gt((o) => {
745
753
  e.some(({ info: a }) => a.uuid === o.info.uuid) || (e = [...e, o], n.forEach((a) => a(e, { added: [o] })));
746
754
  });
747
755
  let r = t();
@@ -769,19 +777,19 @@ function ht() {
769
777
  }
770
778
  };
771
779
  }
772
- const Z = "io.rabby";
780
+ const ht = "io.rabby";
773
781
  class ut {
774
782
  type = "rabby";
775
783
  platform = "ethereum";
776
784
  account = void 0;
777
- store = ht();
785
+ store = mt();
778
786
  provider;
787
+ connectedAccounts = [];
779
788
  constructor() {
780
- this.provider = this.store.getProviders().find((e) => e.info.rdns === Z), this.store.subscribe((e) => {
781
- const t = e.find(
782
- (r) => r.info.rdns === Z
783
- );
784
- t && (this.provider = t);
789
+ this.provider = this.store.getProviders().find((e) => e.info.rdns === ht), this.provider?.provider.request({
790
+ method: "eth_accounts"
791
+ }).then((e) => {
792
+ this.connectedAccounts = e;
785
793
  });
786
794
  }
787
795
  isAvailable() {
@@ -795,7 +803,8 @@ class ut {
795
803
  version: e ? window.ethereum?.version || "Unknown" : void 0,
796
804
  chainId: e ? window.ethereum?.chainId : void 0,
797
805
  name: "Rabby",
798
- platform: this.platform
806
+ platform: this.platform,
807
+ connectedAccounts: this.connectedAccounts
799
808
  };
800
809
  }
801
810
  async connect() {
@@ -808,7 +817,7 @@ class ut {
808
817
  method: "eth_requestAccounts"
809
818
  });
810
819
  if (e && e.length > 0)
811
- return this.account = e[0], { success: !0, wallet: this.type, account: this.account };
820
+ return this.account = e[0], this.connectedAccounts = e, { success: !0, wallet: this.type, account: this.account };
812
821
  throw new Error("No accounts found");
813
822
  } catch (e) {
814
823
  return console.error("Error connecting to Rabby:", e), {
@@ -935,7 +944,15 @@ class ft {
935
944
  connectedWalletsByType = /* @__PURE__ */ new Map();
936
945
  connectedWalletsByAddress = /* @__PURE__ */ new Map();
937
946
  constructor() {
938
- this.walletAdapters = /* @__PURE__ */ new Map(), this.walletAdapters.set("metamask", new lt()), this.walletAdapters.set("phantom", new gt()), this.walletAdapters.set("argent", new pt()), this.walletAdapters.set("rabby", new ut()), typeof window < "u" && (window.wallet_bridge = this);
947
+ this.walletAdapters = /* @__PURE__ */ new Map();
948
+ const e = new pt();
949
+ e.isAvailable() && this.walletAdapters.set("metamask", e);
950
+ const t = new lt();
951
+ t.isAvailable() && this.walletAdapters.set("phantom", t);
952
+ const r = new dt();
953
+ r.isAvailable() && this.walletAdapters.set("argent", r);
954
+ const o = new ut();
955
+ o.isAvailable() && this.walletAdapters.set("rabby", o), typeof window < "u" && (window.wallet_bridge = this);
939
956
  }
940
957
  getIFrameMethods() {
941
958
  return {
@@ -1063,10 +1080,10 @@ class ft {
1063
1080
  }
1064
1081
  }
1065
1082
  }
1066
- class bt extends ye {
1083
+ class bt extends be {
1067
1084
  walletBridge;
1068
1085
  constructor({ url: e, policies: t, ...r }) {
1069
- const o = new URL(e ?? De), a = new ft();
1086
+ const o = new URL(e ?? Ne), a = new ft();
1070
1087
  t && o.searchParams.set(
1071
1088
  "policies",
1072
1089
  encodeURIComponent(JSON.stringify(t))
@@ -1081,7 +1098,7 @@ class bt extends ye {
1081
1098
  return this.walletBridge;
1082
1099
  }
1083
1100
  }
1084
- class yt extends ye {
1101
+ class yt extends be {
1085
1102
  constructor({
1086
1103
  profileUrl: e,
1087
1104
  rpcUrl: t,
@@ -1093,7 +1110,7 @@ class yt extends ye {
1093
1110
  policies: d,
1094
1111
  ...p
1095
1112
  }) {
1096
- const c = (e || Be).replace(/\/$/, "");
1113
+ const c = (e || De).replace(/\/$/, "");
1097
1114
  let l = new URL(
1098
1115
  a ? `${c}/account/${o}/slot/${a}` : `${c}/account/${o}`
1099
1116
  );
@@ -1116,7 +1133,7 @@ class yt extends ye {
1116
1133
  });
1117
1134
  }
1118
1135
  }
1119
- class an extends ze {
1136
+ class an extends Be {
1120
1137
  keychain;
1121
1138
  profile;
1122
1139
  options;
@@ -1331,7 +1348,7 @@ class an extends ze {
1331
1348
  async validateChains(e) {
1332
1349
  for (const t of e)
1333
1350
  try {
1334
- const r = new URL(t.rpcUrl), o = await Te(r);
1351
+ const r = new URL(t.rpcUrl), o = await ze(r);
1335
1352
  this.chains.set(o, t);
1336
1353
  } catch (r) {
1337
1354
  console.error(`Failed to parse chainId for ${t.rpcUrl}:`, r);
@@ -1356,10 +1373,10 @@ class an extends ze {
1356
1373
  }
1357
1374
  }
1358
1375
  const D = /* @__PURE__ */ new Map();
1359
- async function we(n) {
1376
+ async function ye(n) {
1360
1377
  if (!n.addresses?.length && !n.usernames?.length)
1361
1378
  return { results: [] };
1362
- const e = await fetch(`${je}/lookup`, {
1379
+ const e = await fetch(`${Te}/lookup`, {
1363
1380
  method: "POST",
1364
1381
  headers: {
1365
1382
  "Content-Type": "application/json"
@@ -1372,16 +1389,16 @@ async function we(n) {
1372
1389
  }
1373
1390
  async function sn(n) {
1374
1391
  const e = n.filter((t) => !D.has(t));
1375
- return e.length > 0 && (await we({ usernames: e })).results.forEach((r) => {
1392
+ return e.length > 0 && (await ye({ usernames: e })).results.forEach((r) => {
1376
1393
  D.set(r.username, r.addresses[0]);
1377
1394
  }), new Map(
1378
1395
  n.map((t) => [t, D.get(t)]).filter((t) => t[1] !== void 0)
1379
1396
  );
1380
1397
  }
1381
1398
  async function cn(n) {
1382
- n = n.map(Ne.toHex);
1399
+ n = n.map(Pe.toHex);
1383
1400
  const e = n.filter((t) => !D.has(t));
1384
- return e.length > 0 && (await we({
1401
+ return e.length > 0 && (await ye({
1385
1402
  addresses: e
1386
1403
  })).results.forEach((r) => {
1387
1404
  D.set(r.addresses[0], r.username);
@@ -1390,17 +1407,17 @@ async function cn(n) {
1390
1407
  );
1391
1408
  }
1392
1409
  const wt = "6.13.7";
1393
- function ee(n, e, t) {
1410
+ function Z(n, e, t) {
1394
1411
  for (let r in e) {
1395
1412
  let o = e[r];
1396
1413
  Object.defineProperty(n, r, { enumerable: !0, value: o, writable: !1 });
1397
1414
  }
1398
1415
  }
1399
- function M(n) {
1416
+ function N(n) {
1400
1417
  if (n == null)
1401
1418
  return "null";
1402
1419
  if (Array.isArray(n))
1403
- return "[ " + n.map(M).join(", ") + " ]";
1420
+ return "[ " + n.map(N).join(", ") + " ]";
1404
1421
  if (n instanceof Uint8Array) {
1405
1422
  const e = "0123456789abcdef";
1406
1423
  let t = "0x";
@@ -1409,7 +1426,7 @@ function M(n) {
1409
1426
  return t;
1410
1427
  }
1411
1428
  if (typeof n == "object" && typeof n.toJSON == "function")
1412
- return M(n.toJSON());
1429
+ return N(n.toJSON());
1413
1430
  switch (typeof n) {
1414
1431
  case "boolean":
1415
1432
  case "symbol":
@@ -1422,7 +1439,7 @@ function M(n) {
1422
1439
  return JSON.stringify(n);
1423
1440
  case "object": {
1424
1441
  const e = Object.keys(n);
1425
- return e.sort(), "{ " + e.map((t) => `${M(t)}: ${M(n[t])}`).join(", ") + " }";
1442
+ return e.sort(), "{ " + e.map((t) => `${N(t)}: ${N(n[t])}`).join(", ") + " }";
1426
1443
  }
1427
1444
  }
1428
1445
  return "[ COULD NOT SERIALIZE ]";
@@ -1433,12 +1450,12 @@ function vt(n, e, t) {
1433
1450
  const a = [];
1434
1451
  if (t) {
1435
1452
  if ("message" in t || "code" in t || "name" in t)
1436
- throw new Error(`value will overwrite populated values: ${M(t)}`);
1453
+ throw new Error(`value will overwrite populated values: ${N(t)}`);
1437
1454
  for (const i in t) {
1438
1455
  if (i === "shortMessage")
1439
1456
  continue;
1440
1457
  const s = t[i];
1441
- a.push(i + "=" + M(s));
1458
+ a.push(i + "=" + N(s));
1442
1459
  }
1443
1460
  }
1444
1461
  a.push(`code=${e}`), a.push(`version=${wt}`), a.length && (n += " (" + a.join(", ") + ")");
@@ -1455,7 +1472,7 @@ function vt(n, e, t) {
1455
1472
  default:
1456
1473
  o = new Error(n);
1457
1474
  }
1458
- return ee(o, { code: e }), t && Object.assign(o, t), o.shortMessage == null && ee(o, { shortMessage: r }), o;
1475
+ return Z(o, { code: e }), t && Object.assign(o, t), o.shortMessage == null && Z(o, { shortMessage: r }), o;
1459
1476
  }
1460
1477
  function F(n, e, t, r) {
1461
1478
  if (!n)
@@ -1501,20 +1518,20 @@ function _(n, e) {
1501
1518
  function Y(n, e) {
1502
1519
  return !(typeof n != "string" || !n.match(/^0x[0-9A-Fa-f]*$/) || typeof e == "number" && n.length !== 2 + 2 * e || e === !0 && n.length % 2 !== 0);
1503
1520
  }
1504
- const te = "0123456789abcdef";
1521
+ const ee = "0123456789abcdef";
1505
1522
  function v(n) {
1506
1523
  const e = _(n);
1507
1524
  let t = "0x";
1508
1525
  for (let r = 0; r < e.length; r++) {
1509
1526
  const o = e[r];
1510
- t += te[(o & 240) >> 4] + te[o & 15];
1527
+ t += ee[(o & 240) >> 4] + ee[o & 15];
1511
1528
  }
1512
1529
  return t;
1513
1530
  }
1514
1531
  function q(n) {
1515
1532
  return "0x" + n.map((e) => v(e).substring(2)).join("");
1516
1533
  }
1517
- function ne(n) {
1534
+ function te(n) {
1518
1535
  return Y(n, !0) ? (n.length - 2) / 2 : _(n).length;
1519
1536
  }
1520
1537
  function At(n, e, t) {
@@ -1530,7 +1547,7 @@ function At(n, e, t) {
1530
1547
  function It(n, e) {
1531
1548
  return At(n, e);
1532
1549
  }
1533
- const ve = BigInt(0);
1550
+ const we = BigInt(0);
1534
1551
  BigInt(1);
1535
1552
  const K = 9007199254740991;
1536
1553
  function z(n, e) {
@@ -1552,7 +1569,7 @@ function z(n, e) {
1552
1569
  }
1553
1570
  function xt(n, e) {
1554
1571
  const t = z(n, e);
1555
- return F(t >= ve, "unsigned value cannot be negative", "NUMERIC_FAULT", {
1572
+ return F(t >= we, "unsigned value cannot be negative", "NUMERIC_FAULT", {
1556
1573
  fault: "overflow",
1557
1574
  operation: "getUint",
1558
1575
  value: n
@@ -1577,7 +1594,7 @@ function L(n, e) {
1577
1594
  }
1578
1595
  function Ct(n) {
1579
1596
  const e = xt(n, "value");
1580
- if (e === ve)
1597
+ if (e === we)
1581
1598
  return new Uint8Array([]);
1582
1599
  let t = e.toString(16);
1583
1600
  t.length % 2 && (t = "0" + t);
@@ -1608,24 +1625,24 @@ function $(n, e) {
1608
1625
  }
1609
1626
  return new Uint8Array(t);
1610
1627
  }
1611
- function re(n) {
1628
+ function ne(n) {
1612
1629
  if (!Number.isSafeInteger(n) || n < 0)
1613
1630
  throw new Error(`Wrong positive integer: ${n}`);
1614
1631
  }
1615
- function _e(n, ...e) {
1632
+ function ve(n, ...e) {
1616
1633
  if (!(n instanceof Uint8Array))
1617
1634
  throw new Error("Expected Uint8Array");
1618
1635
  if (e.length > 0 && !e.includes(n.length))
1619
1636
  throw new Error(`Expected Uint8Array of length ${e}, not of length=${n.length}`);
1620
1637
  }
1621
- function oe(n, e = !0) {
1638
+ function re(n, e = !0) {
1622
1639
  if (n.destroyed)
1623
1640
  throw new Error("Hash instance has been destroyed");
1624
1641
  if (e && n.finished)
1625
1642
  throw new Error("Hash#digest() has already been called");
1626
1643
  }
1627
1644
  function Et(n, e) {
1628
- _e(n);
1645
+ ve(n);
1629
1646
  const t = e.outputLen;
1630
1647
  if (n.length < t)
1631
1648
  throw new Error(`digestInto() expects output buffer of length at least ${t}`);
@@ -1634,29 +1651,29 @@ function Et(n, e) {
1634
1651
  const Rt = (n) => n instanceof Uint8Array, St = (n) => new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4)), Pt = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1635
1652
  if (!Pt)
1636
1653
  throw new Error("Non little-endian hardware is not supported");
1637
- function Nt(n) {
1654
+ function Mt(n) {
1638
1655
  if (typeof n != "string")
1639
1656
  throw new Error(`utf8ToBytes expected string, got ${typeof n}`);
1640
1657
  return new Uint8Array(new TextEncoder().encode(n));
1641
1658
  }
1642
- function ke(n) {
1643
- if (typeof n == "string" && (n = Nt(n)), !Rt(n))
1659
+ function _e(n) {
1660
+ if (typeof n == "string" && (n = Mt(n)), !Rt(n))
1644
1661
  throw new Error(`expected Uint8Array, got ${typeof n}`);
1645
1662
  return n;
1646
1663
  }
1647
- class Mt {
1664
+ class Nt {
1648
1665
  // Safe version that clones internal state
1649
1666
  clone() {
1650
1667
  return this._cloneInto();
1651
1668
  }
1652
1669
  }
1653
1670
  function Dt(n) {
1654
- const e = (r) => n().update(ke(r)).digest(), t = n();
1671
+ const e = (r) => n().update(_e(r)).digest(), t = n();
1655
1672
  return e.outputLen = t.outputLen, e.blockLen = t.blockLen, e.create = () => n(), e;
1656
1673
  }
1657
- const U = /* @__PURE__ */ BigInt(2 ** 32 - 1), ae = /* @__PURE__ */ BigInt(32);
1674
+ const U = /* @__PURE__ */ BigInt(2 ** 32 - 1), oe = /* @__PURE__ */ BigInt(32);
1658
1675
  function Bt(n, e = !1) {
1659
- return e ? { h: Number(n & U), l: Number(n >> ae & U) } : { h: Number(n >> ae & U) | 0, l: Number(n & U) | 0 };
1676
+ return e ? { h: Number(n & U), l: Number(n >> oe & U) } : { h: Number(n >> oe & U) | 0, l: Number(n & U) | 0 };
1660
1677
  }
1661
1678
  function zt(n, e = !1) {
1662
1679
  let t = new Uint32Array(n.length), r = new Uint32Array(n.length);
@@ -1666,28 +1683,28 @@ function zt(n, e = !1) {
1666
1683
  }
1667
1684
  return [t, r];
1668
1685
  }
1669
- const Tt = (n, e, t) => n << t | e >>> 32 - t, jt = (n, e, t) => e << t | n >>> 32 - t, Ut = (n, e, t) => e << t - 32 | n >>> 64 - t, Ot = (n, e, t) => n << t - 32 | e >>> 64 - t, [Ae, Ie, xe] = [[], [], []], Lt = /* @__PURE__ */ BigInt(0), B = /* @__PURE__ */ BigInt(1), Ft = /* @__PURE__ */ BigInt(2), Qt = /* @__PURE__ */ BigInt(7), Wt = /* @__PURE__ */ BigInt(256), $t = /* @__PURE__ */ BigInt(113);
1686
+ const Tt = (n, e, t) => n << t | e >>> 32 - t, jt = (n, e, t) => e << t | n >>> 32 - t, Ut = (n, e, t) => e << t - 32 | n >>> 64 - t, Ot = (n, e, t) => n << t - 32 | e >>> 64 - t, [ke, Ae, Ie] = [[], [], []], Lt = /* @__PURE__ */ BigInt(0), B = /* @__PURE__ */ BigInt(1), Ft = /* @__PURE__ */ BigInt(2), Qt = /* @__PURE__ */ BigInt(7), Wt = /* @__PURE__ */ BigInt(256), $t = /* @__PURE__ */ BigInt(113);
1670
1687
  for (let n = 0, e = B, t = 1, r = 0; n < 24; n++) {
1671
- [t, r] = [r, (2 * t + 3 * r) % 5], Ae.push(2 * (5 * r + t)), Ie.push((n + 1) * (n + 2) / 2 % 64);
1688
+ [t, r] = [r, (2 * t + 3 * r) % 5], ke.push(2 * (5 * r + t)), Ae.push((n + 1) * (n + 2) / 2 % 64);
1672
1689
  let o = Lt;
1673
1690
  for (let a = 0; a < 7; a++)
1674
1691
  e = (e << B ^ (e >> Qt) * $t) % Wt, e & Ft && (o ^= B << (B << /* @__PURE__ */ BigInt(a)) - B);
1675
- xe.push(o);
1692
+ Ie.push(o);
1676
1693
  }
1677
- const [Ht, Yt] = /* @__PURE__ */ zt(xe, !0), ie = (n, e, t) => t > 32 ? Ut(n, e, t) : Tt(n, e, t), se = (n, e, t) => t > 32 ? Ot(n, e, t) : jt(n, e, t);
1694
+ const [Ht, Yt] = /* @__PURE__ */ zt(Ie, !0), ae = (n, e, t) => t > 32 ? Ut(n, e, t) : Tt(n, e, t), ie = (n, e, t) => t > 32 ? Ot(n, e, t) : jt(n, e, t);
1678
1695
  function qt(n, e = 24) {
1679
1696
  const t = new Uint32Array(10);
1680
1697
  for (let r = 24 - e; r < 24; r++) {
1681
1698
  for (let i = 0; i < 10; i++)
1682
1699
  t[i] = n[i] ^ n[i + 10] ^ n[i + 20] ^ n[i + 30] ^ n[i + 40];
1683
1700
  for (let i = 0; i < 10; i += 2) {
1684
- const s = (i + 8) % 10, d = (i + 2) % 10, p = t[d], c = t[d + 1], l = ie(p, c, 1) ^ t[s], g = se(p, c, 1) ^ t[s + 1];
1701
+ const s = (i + 8) % 10, d = (i + 2) % 10, p = t[d], c = t[d + 1], l = ae(p, c, 1) ^ t[s], g = ie(p, c, 1) ^ t[s + 1];
1685
1702
  for (let m = 0; m < 50; m += 10)
1686
1703
  n[i + m] ^= l, n[i + m + 1] ^= g;
1687
1704
  }
1688
1705
  let o = n[2], a = n[3];
1689
1706
  for (let i = 0; i < 24; i++) {
1690
- const s = Ie[i], d = ie(o, a, s), p = se(o, a, s), c = Ae[i];
1707
+ const s = Ae[i], d = ae(o, a, s), p = ie(o, a, s), c = ke[i];
1691
1708
  o = n[c], a = n[c + 1], n[c] = d, n[c + 1] = p;
1692
1709
  }
1693
1710
  for (let i = 0; i < 50; i += 10) {
@@ -1700,10 +1717,10 @@ function qt(n, e = 24) {
1700
1717
  }
1701
1718
  t.fill(0);
1702
1719
  }
1703
- class V extends Mt {
1720
+ class V extends Nt {
1704
1721
  // NOTE: we accept arguments in bytes instead of bits here.
1705
1722
  constructor(e, t, r, o = !1, a = 24) {
1706
- if (super(), this.blockLen = e, this.suffix = t, this.outputLen = r, this.enableXOF = o, this.rounds = a, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, re(r), 0 >= this.blockLen || this.blockLen >= 200)
1723
+ if (super(), this.blockLen = e, this.suffix = t, this.outputLen = r, this.enableXOF = o, this.rounds = a, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, ne(r), 0 >= this.blockLen || this.blockLen >= 200)
1707
1724
  throw new Error("Sha3 supports only keccak-f1600 function");
1708
1725
  this.state = new Uint8Array(200), this.state32 = St(this.state);
1709
1726
  }
@@ -1711,9 +1728,9 @@ class V extends Mt {
1711
1728
  qt(this.state32, this.rounds), this.posOut = 0, this.pos = 0;
1712
1729
  }
1713
1730
  update(e) {
1714
- oe(this);
1731
+ re(this);
1715
1732
  const { blockLen: t, state: r } = this;
1716
- e = ke(e);
1733
+ e = _e(e);
1717
1734
  const o = e.length;
1718
1735
  for (let a = 0; a < o; ) {
1719
1736
  const i = Math.min(t - this.pos, o - a);
@@ -1731,7 +1748,7 @@ class V extends Mt {
1731
1748
  e[r] ^= t, (t & 128) !== 0 && r === o - 1 && this.keccak(), e[o - 1] ^= 128, this.keccak();
1732
1749
  }
1733
1750
  writeInto(e) {
1734
- oe(this, !1), _e(e), this.finish();
1751
+ re(this, !1), ve(e), this.finish();
1735
1752
  const t = this.state, { blockLen: r } = this;
1736
1753
  for (let o = 0, a = e.length; o < a; ) {
1737
1754
  this.posOut >= r && this.keccak();
@@ -1746,7 +1763,7 @@ class V extends Mt {
1746
1763
  return this.writeInto(e);
1747
1764
  }
1748
1765
  xof(e) {
1749
- return re(e), this.xofInto(new Uint8Array(e));
1766
+ return ne(e), this.xofInto(new Uint8Array(e));
1750
1767
  }
1751
1768
  digestInto(e) {
1752
1769
  if (Et(e, this), this.finished)
@@ -1765,28 +1782,28 @@ class V extends Mt {
1765
1782
  }
1766
1783
  }
1767
1784
  const Kt = (n, e, t) => Dt(() => new V(e, n, t)), Vt = /* @__PURE__ */ Kt(1, 136, 256 / 8);
1768
- let Ce = !1;
1769
- const Ee = function(n) {
1785
+ let xe = !1;
1786
+ const Ce = function(n) {
1770
1787
  return Vt(n);
1771
1788
  };
1772
- let Re = Ee;
1789
+ let Ee = Ce;
1773
1790
  function j(n) {
1774
1791
  const e = _(n, "data");
1775
- return v(Re(e));
1792
+ return v(Ee(e));
1776
1793
  }
1777
- j._ = Ee;
1794
+ j._ = Ce;
1778
1795
  j.lock = function() {
1779
- Ce = !0;
1796
+ xe = !0;
1780
1797
  };
1781
1798
  j.register = function(n) {
1782
- if (Ce)
1799
+ if (xe)
1783
1800
  throw new TypeError("keccak256 is locked");
1784
- Re = n;
1801
+ Ee = n;
1785
1802
  };
1786
1803
  Object.freeze(j);
1787
- const ce = "0x0000000000000000000000000000000000000000000000000000000000000000", Gt = `Ethereum Signed Message:
1788
- `, de = BigInt(0), pe = BigInt(1), le = BigInt(2), ge = BigInt(27), me = BigInt(28), O = BigInt(35), N = {};
1789
- function he(n) {
1804
+ const se = "0x0000000000000000000000000000000000000000000000000000000000000000", Gt = `Ethereum Signed Message:
1805
+ `, ce = BigInt(0), de = BigInt(1), pe = BigInt(2), le = BigInt(27), ge = BigInt(28), O = BigInt(35), M = {};
1806
+ function me(n) {
1790
1807
  return It(Ct(n), 32);
1791
1808
  }
1792
1809
  class w {
@@ -1804,7 +1821,7 @@ class w {
1804
1821
  return this.#t;
1805
1822
  }
1806
1823
  set r(e) {
1807
- h(ne(e) === 32, "invalid r", "value", e), this.#t = v(e);
1824
+ h(te(e) === 32, "invalid r", "value", e), this.#t = v(e);
1808
1825
  }
1809
1826
  /**
1810
1827
  * The ``s`` value for a signature.
@@ -1813,7 +1830,7 @@ class w {
1813
1830
  return this.#n;
1814
1831
  }
1815
1832
  set s(e) {
1816
- h(ne(e) === 32, "invalid s", "value", e);
1833
+ h(te(e) === 32, "invalid s", "value", e);
1817
1834
  const t = v(e);
1818
1835
  h(parseInt(t.substring(0, 3)) < 8, "non-canonical s", "value", t), this.#n = t;
1819
1836
  }
@@ -1881,7 +1898,7 @@ class w {
1881
1898
  * @private
1882
1899
  */
1883
1900
  constructor(e, t, r, o) {
1884
- _t(e, N, "Signature"), this.#t = t, this.#n = r, this.#r = o, this.#e = null;
1901
+ _t(e, M, "Signature"), this.#t = t, this.#n = r, this.#r = o, this.#e = null;
1885
1902
  }
1886
1903
  [Symbol.for("nodejs.util.inspect.custom")]() {
1887
1904
  return `Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`;
@@ -1890,7 +1907,7 @@ class w {
1890
1907
  * Returns a new identical [[Signature]].
1891
1908
  */
1892
1909
  clone() {
1893
- const e = new w(N, this.r, this.s, this.v);
1910
+ const e = new w(M, this.r, this.s, this.v);
1894
1911
  return this.networkV && (e.#e = this.networkV), e;
1895
1912
  }
1896
1913
  /**
@@ -1918,7 +1935,7 @@ class w {
1918
1935
  */
1919
1936
  static getChainId(e) {
1920
1937
  const t = z(e, "v");
1921
- return t == ge || t == me ? de : (h(t >= O, "invalid EIP-155 v", "v", e), (t - O) / le);
1938
+ return t == le || t == ge ? ce : (h(t >= O, "invalid EIP-155 v", "v", e), (t - O) / pe);
1922
1939
  }
1923
1940
  /**
1924
1941
  * Compute the ``v`` for a chain ID for a legacy EIP-155 transactions.
@@ -1935,7 +1952,7 @@ class w {
1935
1952
  *
1936
1953
  */
1937
1954
  static getChainIdV(e, t) {
1938
- return z(e) * le + BigInt(35 + t - 27);
1955
+ return z(e) * pe + BigInt(35 + t - 27);
1939
1956
  }
1940
1957
  /**
1941
1958
  * Compute the normalized legacy transaction ``v`` from a ``yParirty``,
@@ -1960,7 +1977,7 @@ class w {
1960
1977
  */
1961
1978
  static getNormalizedV(e) {
1962
1979
  const t = z(e);
1963
- return t === de || t === ge ? 27 : t === pe || t === me ? 28 : (h(t >= O, "invalid v", "v", e), t & pe ? 27 : 28);
1980
+ return t === ce || t === le ? 27 : t === de || t === ge ? 28 : (h(t >= O, "invalid v", "v", e), t & de ? 27 : 28);
1964
1981
  }
1965
1982
  /**
1966
1983
  * Creates a new [[Signature]].
@@ -1975,18 +1992,18 @@ class w {
1975
1992
  h(p, c, "signature", e);
1976
1993
  }
1977
1994
  if (e == null)
1978
- return new w(N, ce, ce, 27);
1995
+ return new w(M, se, se, 27);
1979
1996
  if (typeof e == "string") {
1980
1997
  const p = _(e, "signature");
1981
1998
  if (p.length === 64) {
1982
1999
  const c = v(p.slice(0, 32)), l = p.slice(32, 64), g = l[0] & 128 ? 28 : 27;
1983
- return l[0] &= 127, new w(N, c, v(l), g);
2000
+ return l[0] &= 127, new w(M, c, v(l), g);
1984
2001
  }
1985
2002
  if (p.length === 65) {
1986
2003
  const c = v(p.slice(0, 32)), l = p.slice(32, 64);
1987
2004
  t((l[0] & 128) === 0, "non-canonical s");
1988
2005
  const g = w.getNormalizedV(p[64]);
1989
- return new w(N, c, v(l), g);
2006
+ return new w(M, c, v(l), g);
1990
2007
  }
1991
2008
  t(!1, "invalid raw signature length");
1992
2009
  }
@@ -1994,9 +2011,9 @@ class w {
1994
2011
  return e.clone();
1995
2012
  const r = e.r;
1996
2013
  t(r != null, "missing r");
1997
- const o = he(r), a = function(p, c) {
2014
+ const o = me(r), a = function(p, c) {
1998
2015
  if (p != null)
1999
- return he(p);
2016
+ return me(p);
2000
2017
  if (c != null) {
2001
2018
  t(Y(c, 32), "invalid yParityAndS");
2002
2019
  const l = _(c);
@@ -2025,7 +2042,7 @@ class w {
2025
2042
  t(!1, "invalid yParity");
2026
2043
  }
2027
2044
  t(!1, "missing v");
2028
- }(e.v, e.yParityAndS, e.yParity), d = new w(N, o, a, s);
2045
+ }(e.v, e.yParityAndS, e.yParity), d = new w(M, o, a, s);
2029
2046
  return i && (d.#e = i), t(e.yParity == null || L(e.yParity, "sig.yParity") === d.yParity, "yParity mismatch"), t(e.yParityAndS == null || e.yParityAndS === d.yParityAndS, "yParityAndS mismatch"), d;
2030
2047
  }
2031
2048
  }
@@ -2161,8 +2178,8 @@ class dn {
2161
2178
  }
2162
2179
  }
2163
2180
  class pn {
2164
- constructor(e) {
2165
- this.provider = e;
2181
+ constructor(e, t) {
2182
+ this.provider = e, this.account = t;
2166
2183
  }
2167
2184
  type = "walletconnect";
2168
2185
  platform = "ethereum";
@@ -2301,7 +2318,7 @@ class pn {
2301
2318
  }
2302
2319
  }
2303
2320
  }
2304
- var Se = {
2321
+ var Re = {
2305
2322
  "blob-arena": {
2306
2323
  origin: ["*.blobarena.xyz", "blobarena.xyz", "development.blobarena.xyz"],
2307
2324
  theme: {
@@ -4725,7 +4742,7 @@ var Se = {
4725
4742
  SN_MAIN: {
4726
4743
  policies: {
4727
4744
  contracts: {
4728
- "0x0154d9a74e8106255d8146b250683ba939f4db3e98b586997caf9514163ca963": {
4745
+ "0x02c6a7c98a9dea8322b51018eef7be99ebedd209cebdaacb9f4c5bbf661c1cc9": {
4729
4746
  description: "Game loop contract",
4730
4747
  methods: [
4731
4748
  {
@@ -4736,21 +4753,17 @@ var Se = {
4736
4753
  entrypoint: "reveal_moves",
4737
4754
  description: "Reveal moves of a Duelist in a Duel"
4738
4755
  },
4739
- {
4740
- entrypoint: "clear_call_to_action",
4741
- description: "Clear the required action call for a duelist"
4742
- },
4743
4756
  {
4744
4757
  entrypoint: "collect_duel",
4745
4758
  description: "Close expired duels"
4746
4759
  },
4747
4760
  {
4748
- entrypoint: "collect_season",
4749
- description: "Close the current season and start the next one"
4761
+ entrypoint: "clear_call_to_action",
4762
+ description: "Clear the required action call for a duelist"
4750
4763
  }
4751
4764
  ]
4752
4765
  },
4753
- "0x0320a19527bb1e661df4e41639c755353f6a401b24a8922a1d086a9667391428": {
4766
+ "0x0426c16fe76f12586718c07e47c8e4312e9fee5e7dc849a75f3c587ad9e70b4f": {
4754
4767
  description: "Bank contract",
4755
4768
  methods: [
4756
4769
  {
@@ -4764,16 +4777,24 @@ var Se = {
4764
4777
  {
4765
4778
  entrypoint: "sponsor_tournament",
4766
4779
  description: "Sponsor a tournament with $LORDS"
4780
+ },
4781
+ {
4782
+ entrypoint: "collect_season",
4783
+ description: "Close the current season and start the next one"
4767
4784
  }
4768
4785
  ]
4769
4786
  },
4770
- "0x032fecc3b90057da30d74fa450abcdd55621cd88000fe709384f8a6b1a910c9f": {
4787
+ "0x071333ac75b7d5ba89a2d0c2b67d5b955258a4d46eb42f3428da6137bbbfdfd9": {
4771
4788
  description: "Packs ERC721 contract",
4772
4789
  methods: [
4773
4790
  {
4774
4791
  entrypoint: "claim_starter_pack",
4775
4792
  description: "Claim the starter pack, mint Duelists"
4776
4793
  },
4794
+ {
4795
+ entrypoint: "claim_gift",
4796
+ description: "Claim gift pack, if available"
4797
+ },
4777
4798
  {
4778
4799
  entrypoint: "purchase",
4779
4800
  description: "Purchase a closed pack"
@@ -4784,7 +4805,7 @@ var Se = {
4784
4805
  }
4785
4806
  ]
4786
4807
  },
4787
- "0x03e1da8b8d6208af7d90ae32d1c3a6f597223022bc0e72b5abc2ba07009c560f": {
4808
+ "0x02e9c711b1a7e2784570b1bda5082a92606044e836ba392d2b977d280fb74b3c": {
4788
4809
  description: "Duel ERC721 contract",
4789
4810
  methods: [
4790
4811
  {
@@ -4797,7 +4818,7 @@ var Se = {
4797
4818
  }
4798
4819
  ]
4799
4820
  },
4800
- "0x03d042d2022519481f424b01f1a68268f773d0220275a102e809f49dee62c1c3": {
4821
+ "0x07aaa9866750a0db82a54ba8674c38620fa2f967d2fbb31133def48e0527c87f": {
4801
4822
  description: "Duelist ERC721 contract",
4802
4823
  methods: [
4803
4824
  {
@@ -4825,6 +4846,46 @@ var Se = {
4825
4846
  }
4826
4847
  },
4827
4848
  messages: [
4849
+ {
4850
+ types: {
4851
+ StarknetDomain: [
4852
+ {
4853
+ name: "name",
4854
+ type: "shortstring"
4855
+ },
4856
+ {
4857
+ name: "version",
4858
+ type: "shortstring"
4859
+ },
4860
+ {
4861
+ name: "chainId",
4862
+ type: "shortstring"
4863
+ },
4864
+ {
4865
+ name: "revision",
4866
+ type: "shortstring"
4867
+ }
4868
+ ],
4869
+ Message: [
4870
+ {
4871
+ name: "duelId",
4872
+ type: "felt"
4873
+ },
4874
+ {
4875
+ name: "duelistId",
4876
+ type: "felt"
4877
+ }
4878
+ ]
4879
+ },
4880
+ primaryType: "Message",
4881
+ domain: {
4882
+ name: "Underware_gg",
4883
+ version: "1.0.0",
4884
+ chainId: "SN_MAIN",
4885
+ revision: "1"
4886
+ },
4887
+ description: "Verify the identity of a player in a Duel"
4888
+ },
4828
4889
  {
4829
4890
  types: {
4830
4891
  StarknetDomain: [
@@ -4864,7 +4925,7 @@ var Se = {
4864
4925
  revision: "1"
4865
4926
  },
4866
4927
  name: "PlayerOnline",
4867
- description: "Notify the server that a player is online"
4928
+ description: "Notify when a player is online"
4868
4929
  },
4869
4930
  {
4870
4931
  types: {
@@ -4913,7 +4974,7 @@ var Se = {
4913
4974
  revision: "1"
4914
4975
  },
4915
4976
  name: "PlayerBookmark",
4916
- description: "Notify the server that a player follows another player or token"
4977
+ description: "Notify when a player follows another player or token"
4917
4978
  }
4918
4979
  ]
4919
4980
  }
@@ -4921,7 +4982,7 @@ var Se = {
4921
4982
  SN_SEPOLIA: {
4922
4983
  policies: {
4923
4984
  contracts: {
4924
- "0x008e63a48288f4672d955f97dc5d3e026712f927fc4262dde1b49070c3b98397": {
4985
+ "0x02c6a7c98a9dea8322b51018eef7be99ebedd209cebdaacb9f4c5bbf661c1cc9": {
4925
4986
  description: "Game loop contract",
4926
4987
  methods: [
4927
4988
  {
@@ -4936,17 +4997,13 @@ var Se = {
4936
4997
  entrypoint: "collect_duel",
4937
4998
  description: "Close expired duels"
4938
4999
  },
4939
- {
4940
- entrypoint: "collect_season",
4941
- description: "Close the current season and start the next one"
4942
- },
4943
5000
  {
4944
5001
  entrypoint: "clear_call_to_action",
4945
5002
  description: "Clear the required action call for a duelist"
4946
5003
  }
4947
5004
  ]
4948
5005
  },
4949
- "0x05aadbdf456aa5c8be5438e8e7465c5e6b7bb48fc2e9339f30ced197315d8896": {
5006
+ "0x0426c16fe76f12586718c07e47c8e4312e9fee5e7dc849a75f3c587ad9e70b4f": {
4950
5007
  description: "Bank contract",
4951
5008
  methods: [
4952
5009
  {
@@ -4960,16 +5017,24 @@ var Se = {
4960
5017
  {
4961
5018
  entrypoint: "sponsor_tournament",
4962
5019
  description: "Sponsor a tournament with $LORDS"
5020
+ },
5021
+ {
5022
+ entrypoint: "collect_season",
5023
+ description: "Close the current season and start the next one"
4963
5024
  }
4964
5025
  ]
4965
5026
  },
4966
- "0x0578b4e302d95d233a1e5a45b648b7066a21896f288a31a98f77e8bd177b7b9b": {
5027
+ "0x071333ac75b7d5ba89a2d0c2b67d5b955258a4d46eb42f3428da6137bbbfdfd9": {
4967
5028
  description: "Packs ERC721 contract",
4968
5029
  methods: [
4969
5030
  {
4970
5031
  entrypoint: "claim_starter_pack",
4971
5032
  description: "Claim the starter pack, mint Duelists"
4972
5033
  },
5034
+ {
5035
+ entrypoint: "claim_gift",
5036
+ description: "Claim gift pack, if available"
5037
+ },
4973
5038
  {
4974
5039
  entrypoint: "purchase",
4975
5040
  description: "Purchase a closed pack"
@@ -4980,7 +5045,7 @@ var Se = {
4980
5045
  }
4981
5046
  ]
4982
5047
  },
4983
- "0x0377acc27a0ca83d1894a1ae62636ba3998197505b20b918e3e74effe395c6a7": {
5048
+ "0x02e9c711b1a7e2784570b1bda5082a92606044e836ba392d2b977d280fb74b3c": {
4984
5049
  description: "Duel ERC721 contract",
4985
5050
  methods: [
4986
5051
  {
@@ -4993,7 +5058,7 @@ var Se = {
4993
5058
  }
4994
5059
  ]
4995
5060
  },
4996
- "0x06012ef19b1a4c6d0b06f583c4d5fa13ba39e56297760073da636ab48e5ee6c8": {
5061
+ "0x07aaa9866750a0db82a54ba8674c38620fa2f967d2fbb31133def48e0527c87f": {
4997
5062
  description: "Duelist ERC721 contract",
4998
5063
  methods: [
4999
5064
  {
@@ -5021,6 +5086,46 @@ var Se = {
5021
5086
  }
5022
5087
  },
5023
5088
  messages: [
5089
+ {
5090
+ types: {
5091
+ StarknetDomain: [
5092
+ {
5093
+ name: "name",
5094
+ type: "shortstring"
5095
+ },
5096
+ {
5097
+ name: "version",
5098
+ type: "shortstring"
5099
+ },
5100
+ {
5101
+ name: "chainId",
5102
+ type: "shortstring"
5103
+ },
5104
+ {
5105
+ name: "revision",
5106
+ type: "shortstring"
5107
+ }
5108
+ ],
5109
+ Message: [
5110
+ {
5111
+ name: "duelId",
5112
+ type: "felt"
5113
+ },
5114
+ {
5115
+ name: "duelistId",
5116
+ type: "felt"
5117
+ }
5118
+ ]
5119
+ },
5120
+ primaryType: "Message",
5121
+ domain: {
5122
+ name: "Underware_gg",
5123
+ version: "1.0.0",
5124
+ chainId: "SN_SEPOLIA",
5125
+ revision: "1"
5126
+ },
5127
+ description: "Verify the identity of a player in a Duel"
5128
+ },
5024
5129
  {
5025
5130
  types: {
5026
5131
  StarknetDomain: [
@@ -5060,7 +5165,7 @@ var Se = {
5060
5165
  revision: "1"
5061
5166
  },
5062
5167
  name: "PlayerOnline",
5063
- description: "Notify the server that a player is online"
5168
+ description: "Notify when a player is online"
5064
5169
  },
5065
5170
  {
5066
5171
  types: {
@@ -5109,7 +5214,7 @@ var Se = {
5109
5214
  revision: "1"
5110
5215
  },
5111
5216
  name: "PlayerBookmark",
5112
- description: "Notify the server that a player follows another player or token"
5217
+ description: "Notify when a player follows another player or token"
5113
5218
  }
5114
5219
  ]
5115
5220
  }
@@ -6348,14 +6453,32 @@ var Se = {
6348
6453
  total_supply: null,
6349
6454
  hidden: !0,
6350
6455
  logo_url: "https://imagedelivery.net/0xPAQaDtnQhBs8IzYRIlNg/6deef27f-df40-4248-4e1b-ed1d79a3f000/logo"
6456
+ },
6457
+ {
6458
+ name: "Fools",
6459
+ symbol: "FOOLS",
6460
+ decimals: 18,
6461
+ l2_token_address: "0x068a7a07e08fc3e723a878223d00f669106780d5ea6665eb15d893476d47bf3b",
6462
+ sort_order: 1,
6463
+ total_supply: null,
6464
+ logo_url: "https://assets.underware.gg/pistols/fools.svg"
6465
+ },
6466
+ {
6467
+ name: "Fame",
6468
+ symbol: "FAME",
6469
+ decimals: 18,
6470
+ l2_token_address: "0x02549653a4ae1ff8d04a20b8820a49cbe97486c536ec0e4c8f68aa33d80067cf",
6471
+ sort_order: 1,
6472
+ total_supply: null,
6473
+ logo_url: "https://assets.underware.gg/pistols/fame.svg"
6351
6474
  }
6352
- ], ln = Se, gn = Xt, mn = Se.cartridge.theme;
6475
+ ], ln = Re, gn = Xt, mn = Re.cartridge.theme;
6353
6476
  export {
6354
- pt as ArgentWallet,
6477
+ dt as ArgentWallet,
6355
6478
  fn as FeeSource,
6356
- lt as MetaMaskWallet,
6479
+ pt as MetaMaskWallet,
6357
6480
  y as NotReadyToConnect,
6358
- gt as PhantomWallet,
6481
+ lt as PhantomWallet,
6359
6482
  ut as RabbyWallet,
6360
6483
  E as ResponseCodes,
6361
6484
  dn as TurnkeyWallet,
@@ -6369,7 +6492,7 @@ export {
6369
6492
  cn as lookupAddresses,
6370
6493
  sn as lookupUsernames,
6371
6494
  yn as normalizeCalls,
6372
- Te as parseChainId,
6495
+ ze as parseChainId,
6373
6496
  Me as toArray,
6374
6497
  wn as toSessionPolicies,
6375
6498
  vn as toWasmPolicies