hd-wallet-ui 2.0.32 → 2.1.0

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.
@@ -1,4 +1,4 @@
1
- const Ac = new URL("./wallet-origin.6e082cab719b53635316cf29e89c381b9c51190babe172c190e66dfc6d5a34d4.wasm", import.meta.url).href, qn = {
1
+ const Ic = new URL("./wallet-origin.4fdb6a88dea547579404b0b71649cf83d62065e0bce47a55608eddd08bb8bd68.wasm", import.meta.url).href, qn = {
2
2
  SECP256K1: 0
3
3
  }, xe = {
4
4
  OK: 0,
@@ -23,7 +23,7 @@ const Ac = new URL("./wallet-origin.6e082cab719b53635316cf29e89c381b9c51190babe1
23
23
  INVALID_SIGNATURE: 402,
24
24
  VERIFICATION_FAILED: 403,
25
25
  KEY_DERIVATION_FAILED: 404
26
- }, an = 116;
26
+ }, sn = 116;
27
27
  class Pr {
28
28
  constructor(r, t = 0) {
29
29
  this.view = new DataView(r, t, 116);
@@ -134,7 +134,7 @@ class Pr {
134
134
  return new Uint8Array(this.view.buffer, this.view.byteOffset, 116);
135
135
  }
136
136
  }
137
- const To = 132;
137
+ const Lo = 132;
138
138
  class Rr {
139
139
  constructor(r, t = 0) {
140
140
  this.view = new DataView(r, t, 132);
@@ -357,7 +357,7 @@ class fn {
357
357
  yield this.at(r);
358
358
  }
359
359
  }
360
- const mc = 40;
360
+ const wc = 40;
361
361
  class Lr {
362
362
  constructor(r, t = 0) {
363
363
  this.view = new DataView(r, t, 40);
@@ -416,7 +416,7 @@ class Lr {
416
416
  return new Uint8Array(this.view.buffer, this.view.byteOffset, 40);
417
417
  }
418
418
  }
419
- const Ic = 36;
419
+ const Sc = 36;
420
420
  class Tr {
421
421
  constructor(r, t = 0) {
422
422
  this.view = new DataView(r, t, 36);
@@ -476,7 +476,7 @@ class di {
476
476
  yield this.at(r);
477
477
  }
478
478
  }
479
- const wc = 76;
479
+ const kc = 76;
480
480
  class xr {
481
481
  constructor(r, t = 0) {
482
482
  this.view = new DataView(r, t, 76);
@@ -558,7 +558,7 @@ class _i {
558
558
  yield this.at(r);
559
559
  }
560
560
  }
561
- const Sc = 44;
561
+ const Oc = 44;
562
562
  class Dr {
563
563
  constructor(r, t = 0) {
564
564
  this.view = new DataView(r, t, 44);
@@ -625,7 +625,7 @@ class Dr {
625
625
  return new Uint8Array(this.view.buffer, this.view.byteOffset, 44);
626
626
  }
627
627
  }
628
- const kc = 100;
628
+ const Pc = 100;
629
629
  class Cr {
630
630
  constructor(r, t = 0) {
631
631
  this.view = new DataView(r, t, 100);
@@ -693,7 +693,7 @@ class hi {
693
693
  yield this.at(r);
694
694
  }
695
695
  }
696
- const Oc = 8;
696
+ const Rc = 8;
697
697
  class Ur {
698
698
  constructor(r, t = 0) {
699
699
  this.view = new DataView(r, t, 8);
@@ -753,7 +753,7 @@ class ui {
753
753
  yield this.at(r);
754
754
  }
755
755
  }
756
- const Pc = 132;
756
+ const Nc = 132;
757
757
  class Fr {
758
758
  constructor(r, t = 0) {
759
759
  this.view = new DataView(r, t, 132);
@@ -893,7 +893,7 @@ class Fr {
893
893
  return new Uint8Array(this.view.buffer, this.view.byteOffset, 132);
894
894
  }
895
895
  }
896
- const Rc = {
896
+ const Lc = {
897
897
  [xe.OK]: "Success",
898
898
  [xe.UNKNOWN]: "Unknown error",
899
899
  [xe.INVALID_ARGUMENT]: "Invalid argument",
@@ -911,10 +911,10 @@ const Rc = {
911
911
  };
912
912
  class Ye extends Error {
913
913
  constructor(r, t) {
914
- super(t || Rc[r] || `Error code: ${r}`), this.name = "AlignedError", this.code = r;
914
+ super(t || Lc[r] || `Error code: ${r}`), this.name = "AlignedError", this.code = r;
915
915
  }
916
916
  }
917
- class Nc {
917
+ class Tc {
918
918
  #r;
919
919
  /**
920
920
  * @param {Object} wasm - WASM module instance
@@ -934,7 +934,7 @@ class Nc {
934
934
  deriveBatch(r, t, s, a = !1) {
935
935
  if (s === 0)
936
936
  return [];
937
- const d = this.#r, b = d._hd_alloc(To);
937
+ const d = this.#r, b = d._hd_alloc(Lo);
938
938
  if (!b)
939
939
  throw new Ye(xe.OUT_OF_MEMORY);
940
940
  try {
@@ -983,7 +983,7 @@ class Nc {
983
983
  * @yields {Array<DerivedKey>} Batches of derived keys
984
984
  */
985
985
  *streamKeys(r, t = 0, s = 100, a = !1) {
986
- const d = this.#r, b = d._hd_alloc(Pc);
986
+ const d = this.#r, b = d._hd_alloc(Nc);
987
987
  if (!b)
988
988
  throw new Ye(xe.OUT_OF_MEMORY);
989
989
  const E = Fr.fromMemory(d.wasmMemory, b);
@@ -1029,7 +1029,7 @@ class Nc {
1029
1029
  */
1030
1030
  #c(r, t) {
1031
1031
  if (t._handle) {
1032
- const s = this.#r._hd_alloc(an);
1032
+ const s = this.#r._hd_alloc(sn);
1033
1033
  try {
1034
1034
  this.#r._hd_aligned_from_extended_key(t._handle, s);
1035
1035
  const a = Pr.fromMemory(
@@ -1049,7 +1049,7 @@ class Nc {
1049
1049
  );
1050
1050
  }
1051
1051
  }
1052
- class Lc {
1052
+ class xc {
1053
1053
  #r;
1054
1054
  /**
1055
1055
  * @param {Object} wasm - WASM module instance
@@ -1066,13 +1066,13 @@ class Lc {
1066
1066
  * @returns {Array<SignatureResult>} Array of signature results
1067
1067
  */
1068
1068
  signBatch(r, t, s = qn.SECP256K1) {
1069
- const a = this.#r, d = t.length, b = a._hd_alloc(mc);
1069
+ const a = this.#r, d = t.length, b = a._hd_alloc(wc);
1070
1070
  if (!b)
1071
1071
  throw new Ye(xe.OUT_OF_MEMORY);
1072
1072
  try {
1073
1073
  const E = Lr.fromMemory(a.wasmMemory, b);
1074
1074
  E.private_key_data.set(r), E.curve = s, E.count = d;
1075
- const I = a._hd_alloc(d * Ic);
1075
+ const I = a._hd_alloc(d * Sc);
1076
1076
  if (!I)
1077
1077
  throw new Ye(xe.OUT_OF_MEMORY);
1078
1078
  try {
@@ -1081,7 +1081,7 @@ class Lc {
1081
1081
  const N = P.at(m);
1082
1082
  N.index = m, N.hash_data.set(t[m]);
1083
1083
  }
1084
- const w = a._hd_alloc(d * wc);
1084
+ const w = a._hd_alloc(d * kc);
1085
1085
  if (!w)
1086
1086
  throw new Ye(xe.OUT_OF_MEMORY);
1087
1087
  try {
@@ -1128,13 +1128,13 @@ class Lc {
1128
1128
  * @returns {Array<VerifyResult>} Array of verification results
1129
1129
  */
1130
1130
  verifyBatch(r, t, s = qn.SECP256K1) {
1131
- const a = this.#r, d = t.length, b = a._hd_alloc(Sc);
1131
+ const a = this.#r, d = t.length, b = a._hd_alloc(Oc);
1132
1132
  if (!b)
1133
1133
  throw new Ye(xe.OUT_OF_MEMORY);
1134
1134
  try {
1135
1135
  const E = Dr.fromMemory(a.wasmMemory, b);
1136
1136
  E.public_key_data.set(r), E.curve = s, E.count = d;
1137
- const I = a._hd_alloc(d * kc);
1137
+ const I = a._hd_alloc(d * Pc);
1138
1138
  if (!I)
1139
1139
  throw new Ye(xe.OUT_OF_MEMORY);
1140
1140
  try {
@@ -1143,7 +1143,7 @@ class Lc {
1143
1143
  const N = P.at(m);
1144
1144
  N.index = m, N.hash_data.set(t[m].hash), N.signature_data.set(t[m].signature);
1145
1145
  }
1146
- const w = a._hd_alloc(d * Oc);
1146
+ const w = a._hd_alloc(d * Rc);
1147
1147
  if (!w)
1148
1148
  throw new Ye(xe.OUT_OF_MEMORY);
1149
1149
  try {
@@ -1181,7 +1181,7 @@ class Lc {
1181
1181
  }
1182
1182
  }
1183
1183
  }
1184
- class Tc {
1184
+ class Dc {
1185
1185
  #r;
1186
1186
  #c;
1187
1187
  #_;
@@ -1196,14 +1196,14 @@ class Tc {
1196
1196
  * @returns {AlignedKeyDeriver}
1197
1197
  */
1198
1198
  get keyDeriver() {
1199
- return this.#c || (this.#c = new Nc(this.#r)), this.#c;
1199
+ return this.#c || (this.#c = new Tc(this.#r)), this.#c;
1200
1200
  }
1201
1201
  /**
1202
1202
  * Get signer instance
1203
1203
  * @returns {AlignedSigner}
1204
1204
  */
1205
1205
  get signer() {
1206
- return this.#_ || (this.#_ = new Lc(this.#r)), this.#_;
1206
+ return this.#_ || (this.#_ = new xc(this.#r)), this.#_;
1207
1207
  }
1208
1208
  /**
1209
1209
  * Convert HDKey to ExtendedKeyData bytes
@@ -1211,14 +1211,14 @@ class Tc {
1211
1211
  * @returns {Uint8Array} Extended key data bytes
1212
1212
  */
1213
1213
  keyToBytes(r) {
1214
- const t = this.#r, s = t._hd_alloc(an);
1214
+ const t = this.#r, s = t._hd_alloc(sn);
1215
1215
  if (!s)
1216
1216
  throw new Ye(xe.OUT_OF_MEMORY);
1217
1217
  try {
1218
1218
  const a = t._hd_aligned_from_extended_key(r._handle, s);
1219
1219
  if (a !== 0)
1220
1220
  throw new Ye(a);
1221
- return new Uint8Array(t.HEAPU8.buffer, s, an).slice();
1221
+ return new Uint8Array(t.HEAPU8.buffer, s, sn).slice();
1222
1222
  } finally {
1223
1223
  t._hd_dealloc(s);
1224
1224
  }
@@ -1235,18 +1235,18 @@ class Tc {
1235
1235
  * @returns {number}
1236
1236
  */
1237
1237
  get extendedKeyDataSize() {
1238
- return an;
1238
+ return sn;
1239
1239
  }
1240
1240
  /**
1241
1241
  * Get size of BatchDeriveRequest struct
1242
1242
  * @returns {number}
1243
1243
  */
1244
1244
  get batchDeriveRequestSize() {
1245
- return To;
1245
+ return Lo;
1246
1246
  }
1247
1247
  }
1248
- const xc = "com.digitalarsenal.infrastructure.hd-wallet-wasm", xo = Object.freeze({
1249
- pluginId: xc,
1248
+ const Cc = "com.digitalarsenal.infrastructure.hd-wallet-wasm", To = Object.freeze({
1249
+ pluginId: Cc,
1250
1250
  name: "HD Wallet Crypto",
1251
1251
  version: "2.0.1",
1252
1252
  pluginFamily: "infrastructure",
@@ -1536,12 +1536,12 @@ const xc = "com.digitalarsenal.infrastructure.hd-wallet-wasm", xo = Object.freez
1536
1536
  abiVersion: 1
1537
1537
  });
1538
1538
  function Ki() {
1539
- return JSON.parse(JSON.stringify(xo));
1539
+ return JSON.parse(JSON.stringify(To));
1540
1540
  }
1541
- const Dc = Object.freeze({
1541
+ const Uc = Object.freeze({
1542
1542
  bytesSymbol: "plugin_get_manifest_flatbuffer",
1543
1543
  sizeSymbol: "plugin_get_manifest_flatbuffer_size"
1544
- }), Do = new TextEncoder();
1544
+ }), xo = new TextEncoder();
1545
1545
  function Ge(e, r) {
1546
1546
  if (e instanceof Uint8Array)
1547
1547
  return new Uint8Array(e);
@@ -1554,7 +1554,7 @@ function Ge(e, r) {
1554
1554
  function Nt(e, r) {
1555
1555
  return e == null ? null : Ge(e, r);
1556
1556
  }
1557
- function Cc(e, r) {
1557
+ function Fc(e, r) {
1558
1558
  return {
1559
1559
  portId: e.portId,
1560
1560
  typeRef: e.typeRef ? { ...e.typeRef } : null,
@@ -1570,8 +1570,8 @@ function Cc(e, r) {
1570
1570
  payload: r
1571
1571
  };
1572
1572
  }
1573
- function en(e, r, t, s, a) {
1574
- return Cc(
1573
+ function Zr(e, r, t, s, a) {
1574
+ return Fc(
1575
1575
  {
1576
1576
  portId: r,
1577
1577
  typeRef: {
@@ -1586,14 +1586,14 @@ function en(e, r, t, s, a) {
1586
1586
  ownership: "shared",
1587
1587
  generation: 0,
1588
1588
  mutability: "immutable",
1589
- traceId: e?.traceId ?? `${xo.pluginId}:${r}`,
1589
+ traceId: e?.traceId ?? `${To.pluginId}:${r}`,
1590
1590
  streamId: e?.streamId ?? 1,
1591
1591
  sequence: e?.sequence ?? 1
1592
1592
  },
1593
1593
  a
1594
1594
  );
1595
1595
  }
1596
- function Uc(e) {
1596
+ function Mc(e) {
1597
1597
  if (!Array.isArray(e?.inputs) || e.inputs.length === 0)
1598
1598
  throw new Error("Plugin invocation requires at least one input frame.");
1599
1599
  return e.inputs[e.inputs.length - 1];
@@ -1608,25 +1608,38 @@ function Yn(e, r, t) {
1608
1608
  throw new Error(`randomBytes capability must return exactly ${r} bytes.`);
1609
1609
  return s;
1610
1610
  }
1611
- function Co(e) {
1611
+ function Do(e) {
1612
1612
  const r = String(e.curve ?? "").trim();
1613
1613
  return r || (String(e.algorithm ?? "").trim().startsWith("ed25519") ? "ed25519" : "secp256k1");
1614
1614
  }
1615
- function Uo(e, r, t) {
1615
+ function Bc(e, r) {
1616
+ if (e.length !== r.length)
1617
+ return !1;
1618
+ let t = 0;
1619
+ for (let s = 0; s < e.length; s += 1)
1620
+ t |= e[s] ^ r[s];
1621
+ return t === 0;
1622
+ }
1623
+ function Co(e, r, t) {
1616
1624
  const s = Ge(
1617
1625
  r.messageBytes ?? r.message ?? r.protectedRecordBytes,
1618
1626
  "message"
1619
1627
  );
1620
- return t === "secp256k1" ? {
1621
- messageBytes: s,
1622
- digest: Nt(r.digest, "digest") ?? e.utils.sha256(s)
1623
- } : {
1628
+ if (t === "secp256k1") {
1629
+ const a = e.utils.sha256(s), d = Nt(r.digest, "digest");
1630
+ if (d && !Bc(d, a))
1631
+ throw new Error(
1632
+ "secp256k1-sha256 signs the message bytes; digest must be omitted or equal SHA-256(message)."
1633
+ );
1634
+ return { messageBytes: s, digest: a };
1635
+ }
1636
+ return {
1624
1637
  messageBytes: s,
1625
1638
  digest: Nt(r.digest, "digest")
1626
1639
  };
1627
1640
  }
1628
- function Fc(e, r, t) {
1629
- const s = Co(r), { messageBytes: a, digest: d } = Uo(e, r, s);
1641
+ function Vc(e, r, t) {
1642
+ const s = Do(r), { messageBytes: a, digest: d } = Co(e, r, s);
1630
1643
  if (!r.signerPrivateKey && typeof t != "function")
1631
1644
  throw new Error(
1632
1645
  "sign_detached requires signerPrivateKey bytes or a walletSign capability callback."
@@ -1636,7 +1649,7 @@ function Fc(e, r, t) {
1636
1649
  curve: s,
1637
1650
  payload: r,
1638
1651
  messageBytes: a,
1639
- digest: d
1652
+ digest: s === "secp256k1" ? null : d
1640
1653
  });
1641
1654
  if (!E || typeof E != "object")
1642
1655
  throw new Error("walletSign capability must return a signature envelope.");
@@ -1666,12 +1679,12 @@ function Fc(e, r, t) {
1666
1679
  algorithm: r.algorithm ?? "secp256k1-sha256",
1667
1680
  messageBytes: a,
1668
1681
  digest: d,
1669
- signature: e.curves.secp256k1.sign(d, b),
1682
+ signature: e.curves.secp256k1.sign(a, b),
1670
1683
  publicKey: Nt(r.publicKey, "publicKey") ?? e.curves.publicKeyFromPrivate(b, 0)
1671
1684
  };
1672
1685
  }
1673
- function Mc(e, r) {
1674
- const t = Co(r), s = Ge(r.signature, "signature"), a = Ge(r.publicKey, "publicKey"), { messageBytes: d, digest: b } = Uo(e, r, t), E = t === "secp256k1" ? b : b ?? d, I = t === "ed25519" ? e.curves.ed25519.verify(E, s, a) : e.curves.secp256k1.verify(E, s, a);
1686
+ function Hc(e, r) {
1687
+ const t = Do(r), s = Ge(r.signature, "signature"), a = Ge(r.publicKey, "publicKey"), { messageBytes: d, digest: b } = Co(e, r, t), E = t === "secp256k1" ? d : b ?? d, I = t === "ed25519" ? e.curves.ed25519.verify(E, s, a) : e.curves.secp256k1.verify(E, s, a);
1675
1688
  return {
1676
1689
  curve: t,
1677
1690
  algorithm: r.algorithm ?? (t === "ed25519" ? b ? "ed25519-prehash-sha256" : "ed25519" : "secp256k1-sha256"),
@@ -1682,27 +1695,27 @@ function Mc(e, r) {
1682
1695
  valid: I
1683
1696
  };
1684
1697
  }
1685
- function Fo(e, r) {
1698
+ function Uo(e, r) {
1686
1699
  return String(r?.curve ?? e.curve ?? "x25519").trim() || "x25519";
1687
1700
  }
1688
- function Mo(e, r, t, s) {
1701
+ function Fo(e, r, t, s) {
1689
1702
  if (r === "secp256k1")
1690
1703
  return e.curves.secp256k1.ecdh(t, s);
1691
1704
  if (r === "x25519")
1692
1705
  return e.curves.x25519.ecdh(t, s);
1693
1706
  throw new Error(`encrypt_fields does not support curve "${r}".`);
1694
1707
  }
1695
- function Bc(e, r, t) {
1708
+ function zc(e, r, t) {
1696
1709
  if (r === "secp256k1")
1697
1710
  return e.curves.publicKeyFromPrivate(t, 0);
1698
1711
  if (r === "x25519")
1699
1712
  return e.curves.x25519.publicKey(t);
1700
1713
  throw new Error(`encrypt_fields does not support curve "${r}".`);
1701
1714
  }
1702
- function Bo(e) {
1715
+ function Mo(e) {
1703
1716
  return e === "secp256k1" ? "secp256k1-hkdf-aes-256-gcm" : "x25519-hkdf-aes-256-gcm";
1704
1717
  }
1705
- function Vc(e, r, t) {
1718
+ function $c(e, r, t) {
1706
1719
  if (r.senderPrivateKey)
1707
1720
  return Ge(r.senderPrivateKey, "senderPrivateKey");
1708
1721
  if (t === "x25519")
@@ -1714,19 +1727,19 @@ function Vc(e, r, t) {
1714
1727
  "encrypt_fields requires senderPrivateKey when using secp256k1 field encryption."
1715
1728
  );
1716
1729
  }
1717
- function Vo(e, r) {
1730
+ function Bo(e, r) {
1718
1731
  return Nt(e?.aad, "aad") ?? Nt(r?.aad, "aad") ?? new Uint8Array();
1719
1732
  }
1720
- function Hc(e, r, t) {
1733
+ function Wc(e, r, t) {
1721
1734
  const s = Array.isArray(r.fields) ? r.fields : [];
1722
1735
  if (s.length === 0)
1723
1736
  throw new Error("encrypt_fields requires at least one field entry.");
1724
1737
  const a = [];
1725
1738
  for (const d of s) {
1726
- const b = Fo(r, d), E = Ge(
1739
+ const b = Uo(r, d), E = Ge(
1727
1740
  r.recipientPublicKey ?? d.recipientPublicKey,
1728
1741
  "recipientPublicKey"
1729
- ), I = Vc(t, r, b), P = Nt(d.senderPublicKey, "senderPublicKey") ?? Bc(e, b, I), w = Nt(d.salt, "salt") ?? Yn(t, 32, {
1742
+ ), I = $c(t, r, b), P = Nt(d.senderPublicKey, "senderPublicKey") ?? zc(e, b, I), w = Nt(d.salt, "salt") ?? Yn(t, 32, {
1730
1743
  methodId: "encrypt_fields",
1731
1744
  fieldPath: d.fieldPath,
1732
1745
  purpose: "salt"
@@ -1734,7 +1747,7 @@ function Hc(e, r, t) {
1734
1747
  methodId: "encrypt_fields",
1735
1748
  fieldPath: d.fieldPath,
1736
1749
  purpose: "iv"
1737
- }), N = Ge(d.plaintext, "plaintext"), L = Vo(d, r), D = Mo(e, b, I, E), U = Do.encode(`field:${d.fieldPath}`), M = e.utils.hkdf(D, w, U, 32), { ciphertext: C, tag: B } = e.utils.aesGcm.encrypt(
1750
+ }), N = Ge(d.plaintext, "plaintext"), L = Bo(d, r), D = Fo(e, b, I, E), U = xo.encode(`field:${d.fieldPath}`), M = e.utils.hkdf(D, w, U, 32), { ciphertext: C, tag: B } = e.utils.aesGcm.encrypt(
1738
1751
  M,
1739
1752
  N,
1740
1753
  m,
@@ -1743,7 +1756,7 @@ function Hc(e, r, t) {
1743
1756
  a.push({
1744
1757
  fieldPath: String(d.fieldPath ?? ""),
1745
1758
  curve: b,
1746
- algorithm: Bo(b),
1759
+ algorithm: Mo(b),
1747
1760
  salt: w,
1748
1761
  iv: m,
1749
1762
  tag: B,
@@ -1754,7 +1767,7 @@ function Hc(e, r, t) {
1754
1767
  }
1755
1768
  return { fields: a };
1756
1769
  }
1757
- function zc(e, r) {
1770
+ function jc(e, r) {
1758
1771
  const t = Array.isArray(r.fields) ? r.fields : [];
1759
1772
  if (t.length === 0)
1760
1773
  throw new Error("decrypt_fields requires at least one encrypted field entry.");
@@ -1763,18 +1776,18 @@ function zc(e, r) {
1763
1776
  "recipientPrivateKey"
1764
1777
  ), a = [];
1765
1778
  for (const d of t) {
1766
- const b = Fo(r, d), E = Ge(d.senderPublicKey, "senderPublicKey"), I = Ge(d.salt, "salt"), P = Ge(d.iv, "iv"), w = Ge(d.tag, "tag"), m = Ge(d.ciphertext, "ciphertext"), N = Vo(d, r), L = Mo(e, b, s, E), D = Do.encode(`field:${d.fieldPath}`), U = e.utils.hkdf(L, I, D, 32), M = e.utils.aesGcm.decrypt(U, m, w, P, N);
1779
+ const b = Uo(r, d), E = Ge(d.senderPublicKey, "senderPublicKey"), I = Ge(d.salt, "salt"), P = Ge(d.iv, "iv"), w = Ge(d.tag, "tag"), m = Ge(d.ciphertext, "ciphertext"), N = Bo(d, r), L = Fo(e, b, s, E), D = xo.encode(`field:${d.fieldPath}`), U = e.utils.hkdf(L, I, D, 32), M = e.utils.aesGcm.decrypt(U, m, w, P, N);
1767
1780
  a.push({
1768
1781
  fieldPath: String(d.fieldPath ?? ""),
1769
1782
  curve: b,
1770
- algorithm: d.algorithm ?? Bo(b),
1783
+ algorithm: d.algorithm ?? Mo(b),
1771
1784
  plaintext: M,
1772
1785
  aad: N
1773
1786
  });
1774
1787
  }
1775
1788
  return { fields: a };
1776
1789
  }
1777
- function $c(e) {
1790
+ function qc(e) {
1778
1791
  const r = e._plugin_get_manifest_flatbuffer, t = e._plugin_get_manifest_flatbuffer_size;
1779
1792
  if (typeof r != "function" || typeof t != "function")
1780
1793
  throw new Error("Embedded plugin manifest exports are not available in this build.");
@@ -1783,55 +1796,55 @@ function $c(e) {
1783
1796
  throw new Error("Embedded plugin manifest exports returned invalid values.");
1784
1797
  return e.HEAPU8.slice(s, s + a);
1785
1798
  }
1786
- function tn(e) {
1799
+ function en(e) {
1787
1800
  return {
1788
1801
  outputs: e,
1789
1802
  backlogRemaining: 0,
1790
1803
  yielded: !1
1791
1804
  };
1792
1805
  }
1793
- function Ho({ wallet: e, wasm: r, randomBytes: t = null, walletSign: s = null }) {
1806
+ function Vo({ wallet: e, wasm: r, randomBytes: t = null, walletSign: s = null }) {
1794
1807
  function a(d, b = {}) {
1795
- const E = Uc(b), I = E.payload ?? {};
1808
+ const E = Mc(b), I = E.payload ?? {};
1796
1809
  switch (d) {
1797
1810
  case "encrypt_fields":
1798
- return tn([
1799
- en(
1811
+ return en([
1812
+ Zr(
1800
1813
  E,
1801
1814
  "encrypted_fields",
1802
1815
  "EncryptedFieldSet.fbs",
1803
1816
  "EFLD",
1804
- Hc(e, I, t)
1817
+ Wc(e, I, t)
1805
1818
  )
1806
1819
  ]);
1807
1820
  case "decrypt_fields":
1808
- return tn([
1809
- en(
1821
+ return en([
1822
+ Zr(
1810
1823
  E,
1811
1824
  "field_set",
1812
1825
  "FieldSelectionBundle.fbs",
1813
1826
  "FSLB",
1814
- zc(e, I)
1827
+ jc(e, I)
1815
1828
  )
1816
1829
  ]);
1817
1830
  case "sign_detached":
1818
- return tn([
1819
- en(
1831
+ return en([
1832
+ Zr(
1820
1833
  E,
1821
1834
  "signature",
1822
1835
  "DetachedSignature.fbs",
1823
1836
  "SIGD",
1824
- Fc(e, I, s)
1837
+ Vc(e, I, s)
1825
1838
  )
1826
1839
  ]);
1827
1840
  case "verify_detached":
1828
- return tn([
1829
- en(
1841
+ return en([
1842
+ Zr(
1830
1843
  E,
1831
1844
  "verification",
1832
1845
  "DetachedVerificationResult.fbs",
1833
1846
  "SIGV",
1834
- Mc(e, I)
1847
+ Hc(e, I)
1835
1848
  )
1836
1849
  ]);
1837
1850
  default:
@@ -1840,15 +1853,15 @@ function Ho({ wallet: e, wasm: r, randomBytes: t = null, walletSign: s = null })
1840
1853
  }
1841
1854
  return {
1842
1855
  manifest: Ki(),
1843
- manifestExports: Dc,
1856
+ manifestExports: Uc,
1844
1857
  getManifest() {
1845
1858
  return Ki();
1846
1859
  },
1847
1860
  getManifestBytes() {
1848
- return $c(r);
1861
+ return qc(r);
1849
1862
  },
1850
1863
  withCapabilities(d = {}) {
1851
- return Ho({
1864
+ return Vo({
1852
1865
  wallet: e,
1853
1866
  wasm: r,
1854
1867
  randomBytes: d.randomBytes !== void 0 ? d.randomBytes : t,
@@ -1870,7 +1883,7 @@ function Ho({ wallet: e, wasm: r, randomBytes: t = null, walletSign: s = null })
1870
1883
  }
1871
1884
  };
1872
1885
  }
1873
- const et = 131072, zo = 131072, Yi = 4096, rn = 256, Gi = 4096, Wc = 1024, jc = 16, Xi = 1024, qc = 16n, Kc = (1n << 64n) - 1n, Ji = Object.freeze([
1886
+ const et = 131072, Ho = 131072, Yi = 4096, tn = 256, Gi = 4096, Kc = 1024, Yc = 16, Xi = 1024, Gc = 16n, Xc = (1n << 64n) - 1n, Ji = Object.freeze([
1874
1887
  "INVALID_USERNAME",
1875
1888
  "INVALID_PASSWORD",
1876
1889
  "COMMON_PASSWORD",
@@ -1885,7 +1898,7 @@ const et = 131072, zo = 131072, Yi = 4096, rn = 256, Gi = 4096, Wc = 1024, jc =
1885
1898
  "CRYPTO_FAILURE",
1886
1899
  "OUT_OF_MEMORY",
1887
1900
  "FIPS_NOT_ALLOWED"
1888
- ]), Yc = Object.freeze([
1901
+ ]), Jc = Object.freeze([
1889
1902
  "_hd_sdn_derive_password_identity",
1890
1903
  "_hd_sdn_derive_legacy_password_identity",
1891
1904
  "_hd_sdn_import_legacy_mnemonic_identity",
@@ -1898,14 +1911,14 @@ const et = 131072, zo = 131072, Yi = 4096, rn = 256, Gi = 4096, Wc = 1024, jc =
1898
1911
  "_hd_sdn_sign_asset_review_decision",
1899
1912
  "_hd_sdn_seal_remembered_identity",
1900
1913
  "_hd_sdn_destroy_identity"
1901
- ]), Gc = new TextEncoder(), $o = new TextDecoder("utf-8", { fatal: !0 }), On = Uint8Array, Wo = Object.getPrototypeOf(On.prototype), jo = Object.getOwnPropertyDescriptor(
1902
- Wo,
1914
+ ]), Qc = new TextEncoder(), zo = new TextDecoder("utf-8", { fatal: !0 }), On = Uint8Array, $o = Object.getPrototypeOf(On.prototype), Wo = Object.getOwnPropertyDescriptor(
1915
+ $o,
1903
1916
  Symbol.toStringTag
1904
- ).get, Xc = Object.getOwnPropertyDescriptor(
1905
- Wo,
1917
+ ).get, Zc = Object.getOwnPropertyDescriptor(
1918
+ $o,
1906
1919
  "byteLength"
1907
- ).get, qo = On.prototype.fill, Jc = On.prototype.set;
1908
- class Qc extends Error {
1920
+ ).get, jo = On.prototype.fill, el = On.prototype.set;
1921
+ class tl extends Error {
1909
1922
  constructor(r) {
1910
1923
  super(r), this.name = "SdnWalletError", this.code = r;
1911
1924
  }
@@ -1914,13 +1927,13 @@ class Qc extends Error {
1914
1927
  }
1915
1928
  }
1916
1929
  function re(e) {
1917
- throw new Qc(e);
1930
+ throw new tl(e);
1918
1931
  }
1919
- function Zc(e) {
1932
+ function rl(e) {
1920
1933
  return Number.isInteger(e) && e >= 1 && e <= Ji.length ? Ji[e - 1] : "CRYPTO_FAILURE";
1921
1934
  }
1922
1935
  function Dn(e) {
1923
- re(Zc(e));
1936
+ re(rl(e));
1924
1937
  }
1925
1938
  function ht(e) {
1926
1939
  return e !== null && typeof e == "object";
@@ -1933,20 +1946,20 @@ function or(e, r) {
1933
1946
  function yr(e, r) {
1934
1947
  return or(e, r) || re("INVALID_REQUEST"), e;
1935
1948
  }
1936
- function Ko(e, r = "INVALID_REQUEST") {
1949
+ function qo(e, r = "INVALID_REQUEST") {
1937
1950
  let t;
1938
1951
  try {
1939
- t = jo.call(e);
1952
+ t = Wo.call(e);
1940
1953
  } catch {
1941
1954
  re(r);
1942
1955
  }
1943
1956
  return t !== "Uint8Array" && re(r), e;
1944
1957
  }
1945
1958
  function gt(e, r = "INVALID_REQUEST") {
1946
- const t = Ko(e, r);
1959
+ const t = qo(e, r);
1947
1960
  let s;
1948
1961
  try {
1949
- s = Xc.call(t);
1962
+ s = Zc.call(t);
1950
1963
  } catch {
1951
1964
  re(r);
1952
1965
  }
@@ -1957,19 +1970,19 @@ function gt(e, r = "INVALID_REQUEST") {
1957
1970
  re("OUT_OF_MEMORY");
1958
1971
  }
1959
1972
  try {
1960
- Jc.call(a, t);
1973
+ el.call(a, t);
1961
1974
  } catch {
1962
- qo.call(a, 0), re(r);
1975
+ jo.call(a, 0), re(r);
1963
1976
  }
1964
1977
  return a;
1965
1978
  }
1966
1979
  function tr(e, r) {
1967
- const t = Ko(e, r), s = gt(t, r);
1980
+ const t = qo(e, r), s = gt(t, r);
1968
1981
  return pn([t]) && (pn([s]), re("CRYPTO_FAILURE")), s;
1969
1982
  }
1970
1983
  function Gn(e) {
1971
1984
  try {
1972
- return jo.call(e) === "Uint8Array";
1985
+ return Wo.call(e) === "Uint8Array";
1973
1986
  } catch {
1974
1987
  return !1;
1975
1988
  }
@@ -1979,17 +1992,17 @@ function pn(e) {
1979
1992
  for (const t of e)
1980
1993
  if (Gn(t))
1981
1994
  try {
1982
- qo.call(t, 0);
1995
+ jo.call(t, 0);
1983
1996
  } catch {
1984
1997
  r = !0;
1985
1998
  }
1986
1999
  return r;
1987
2000
  }
1988
- function nn(e) {
2001
+ function rn(e) {
1989
2002
  let r = !1, t = !1;
1990
2003
  return () => (r || (r = !0, t = pn(e())), t);
1991
2004
  }
1992
- function el(e) {
2005
+ function nl(e) {
1993
2006
  if (typeof e != "string") return !1;
1994
2007
  for (let r = 0; r < e.length; r += 1) {
1995
2008
  const t = e.charCodeAt(r);
@@ -2003,9 +2016,9 @@ function el(e) {
2003
2016
  }
2004
2017
  return !0;
2005
2018
  }
2006
- function Xn(e, r = zo) {
2007
- el(e) || re("INVALID_REQUEST");
2008
- const t = Gc.encode(e);
2019
+ function Xn(e, r = Ho) {
2020
+ nl(e) || re("INVALID_REQUEST");
2021
+ const t = Qc.encode(e);
2009
2022
  return t.length > r && re("INVALID_REQUEST"), t;
2010
2023
  }
2011
2024
  function gr(e) {
@@ -2015,15 +2028,15 @@ function gr(e) {
2015
2028
  } catch {
2016
2029
  re("INVALID_REQUEST");
2017
2030
  }
2018
- return typeof r != "string" && re("INVALID_REQUEST"), Xn(r, zo);
2031
+ return typeof r != "string" && re("INVALID_REQUEST"), Xn(r, Ho);
2019
2032
  }
2020
2033
  function Cn(e) {
2021
2034
  return e !== 0 && e !== 1 && re("INVALID_ACCOUNT"), e;
2022
2035
  }
2023
- function tl(e) {
2024
- if (typeof e != "bigint" || e <= 0n || e > Kc) return !1;
2036
+ function il(e) {
2037
+ if (typeof e != "bigint" || e <= 0n || e > Xc) return !1;
2025
2038
  const r = e & 0xffffffffn;
2026
- return e >> 32n !== 0n && r !== 0n && r <= qc;
2039
+ return e >> 32n !== 0n && r !== 0n && r <= Gc;
2027
2040
  }
2028
2041
  function Mt(e, r) {
2029
2042
  return typeof e == "string" && e.length === r && /^[0-9a-f]+$/.test(e);
@@ -2031,7 +2044,7 @@ function Mt(e, r) {
2031
2044
  function Jn(e) {
2032
2045
  return typeof e == "string" && /^sha256:[0-9a-f]{64}$/.test(e);
2033
2046
  }
2034
- function rl(e, r, t, s) {
2047
+ function ol(e, r, t, s) {
2035
2048
  return (!or(e, [
2036
2049
  "purpose",
2037
2050
  "identityScheme",
@@ -2058,7 +2071,7 @@ function rl(e, r, t, s) {
2058
2071
  keyId: e.keyId
2059
2072
  });
2060
2073
  }
2061
- function nl(e) {
2074
+ function sl(e) {
2062
2075
  (!or(e, [
2063
2076
  "schemaVersion",
2064
2077
  "identityScheme",
@@ -2101,7 +2114,7 @@ function nl(e) {
2101
2114
  derivation: "bip32-scalar-as-ed25519-seed",
2102
2115
  path: `${t}0/0`
2103
2116
  }] : re("CRYPTO_FAILURE"), e.keys.length !== s.length && re("CRYPTO_FAILURE");
2104
- const a = e.keys.map((d, b) => rl(d, e.identityScheme, e.seedProfile, s[b]));
2117
+ const a = e.keys.map((d, b) => ol(d, e.identityScheme, e.seedProfile, s[b]));
2105
2118
  return Object.freeze({
2106
2119
  schemaVersion: 1,
2107
2120
  identityScheme: e.identityScheme,
@@ -2114,16 +2127,16 @@ function nl(e) {
2114
2127
  keys: Object.freeze(a)
2115
2128
  });
2116
2129
  }
2117
- function il(e) {
2130
+ function al(e) {
2118
2131
  let r;
2119
2132
  try {
2120
- r = JSON.parse($o.decode(e));
2133
+ r = JSON.parse(zo.decode(e));
2121
2134
  } catch {
2122
2135
  re("CRYPTO_FAILURE");
2123
2136
  }
2124
- return nl(r);
2137
+ return sl(r);
2125
2138
  }
2126
- function ol(e, r) {
2139
+ function cl(e, r) {
2127
2140
  if (r === "module-delivery-key")
2128
2141
  return (!or(e, [
2129
2142
  "schemaVersion",
@@ -2167,14 +2180,14 @@ function ol(e, r) {
2167
2180
  };
2168
2181
  return r && (d.canonicalEnvelope = e.canonicalEnvelope, d.signedDigestSha256 = e.signedDigestSha256), d.signatureHex = e.signatureHex, Object.freeze(d);
2169
2182
  }
2170
- function sl(e, r) {
2183
+ function ll(e, r) {
2171
2184
  let t;
2172
2185
  try {
2173
- t = JSON.parse($o.decode(e));
2186
+ t = JSON.parse(zo.decode(e));
2174
2187
  } catch {
2175
2188
  re("CRYPTO_FAILURE");
2176
2189
  }
2177
- return ol(t, r);
2190
+ return cl(t, r);
2178
2191
  }
2179
2192
  function Un(e) {
2180
2193
  let r;
@@ -2237,7 +2250,7 @@ function Fn(e) {
2237
2250
  }
2238
2251
  };
2239
2252
  }
2240
- function al(e, r) {
2253
+ function dl(e, r) {
2241
2254
  try {
2242
2255
  return e.view().getBigUint64(r, !0);
2243
2256
  } catch {
@@ -2251,8 +2264,8 @@ function Mn(e, r) {
2251
2264
  re("CRYPTO_FAILURE");
2252
2265
  }
2253
2266
  }
2254
- function cl(e) {
2255
- (!ht(e) || typeof e._malloc != "function" || typeof e._free != "function" || Yc.some((w) => typeof e[w] != "function")) && re("CRYPTO_FAILURE");
2267
+ function _l(e) {
2268
+ (!ht(e) || typeof e._malloc != "function" || typeof e._free != "function" || Jc.some((w) => typeof e[w] != "function")) && re("CRYPTO_FAILURE");
2256
2269
  const r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new Set();
2257
2270
  function s(w) {
2258
2271
  if (!(typeof w != "bigint" || w === 0n)) {
@@ -2299,10 +2312,10 @@ function cl(e) {
2299
2312
  } catch {
2300
2313
  v = !0;
2301
2314
  }
2302
- B = al(C, f), v && re("CRYPTO_FAILURE"), g !== 0 && Dn(g), tl(B) || re("CRYPTO_FAILURE");
2315
+ B = dl(C, f), v && re("CRYPTO_FAILURE"), g !== 0 && Dn(g), il(B) || re("CRYPTO_FAILURE");
2303
2316
  const k = Mn(C, h);
2304
2317
  (k <= 0 || k > et) && re("CRYPTO_FAILURE");
2305
- const R = il(C.bytes(u, k));
2318
+ const R = al(C.bytes(u, k));
2306
2319
  (R.identityScheme !== L || R.seedProfile !== D || R.accountIndex !== U) && re("CRYPTO_FAILURE"), C.cleanup() && re("CRYPTO_FAILURE"), M() && re("CRYPTO_FAILURE");
2307
2320
  const F = Object.freeze(/* @__PURE__ */ Object.create(null)), V = { nativeValue: B, state: "active" };
2308
2321
  r.set(F, V);
@@ -2330,7 +2343,7 @@ function cl(e) {
2330
2343
  }
2331
2344
  Y !== 0 && Dn(Y);
2332
2345
  const _ = Mn(U, C);
2333
- return (_ <= 0 || _ > et) && re("CRYPTO_FAILURE"), sl(U.bytes(B, _), D);
2346
+ return (_ <= 0 || _ > et) && re("CRYPTO_FAILURE"), ll(U.bytes(B, _), D);
2334
2347
  } finally {
2335
2348
  U.cleanup() && re("CRYPTO_FAILURE");
2336
2349
  }
@@ -2338,11 +2351,11 @@ function cl(e) {
2338
2351
  return Object.freeze({
2339
2352
  async derivePasswordIdentity(w) {
2340
2353
  let m, N;
2341
- const L = nn(() => [N, m]);
2354
+ const L = rn(() => [N, m]);
2342
2355
  try {
2343
2356
  ht(w) && (m = w.passwordUtf8), yr(w, ["usernameUtf8", "passwordUtf8", "accountIndex"]);
2344
2357
  const D = gt(w.usernameUtf8, "INVALID_USERNAME");
2345
- N = tr(m, "INVALID_PASSWORD"), D.length > rn && re("INVALID_USERNAME"), N.length > rn && re("INVALID_PASSWORD");
2358
+ N = tr(m, "INVALID_PASSWORD"), D.length > tn && re("INVALID_USERNAME"), N.length > tn && re("INVALID_PASSWORD");
2346
2359
  const U = Cn(w.accountIndex);
2347
2360
  return E(
2348
2361
  "_hd_sdn_derive_password_identity",
@@ -2365,7 +2378,7 @@ function cl(e) {
2365
2378
  },
2366
2379
  async deriveLegacyPasswordIdentity(w) {
2367
2380
  let m, N;
2368
- const L = nn(() => [N, m]);
2381
+ const L = rn(() => [N, m]);
2369
2382
  try {
2370
2383
  ht(w) && (m = w.passwordUtf8), yr(w, ["usernameUtf8", "passwordUtf8", "accountIndex"]);
2371
2384
  const D = gt(w.usernameUtf8, "INVALID_USERNAME");
@@ -2392,9 +2405,9 @@ function cl(e) {
2392
2405
  },
2393
2406
  async importLegacyMnemonicIdentity(w) {
2394
2407
  let m, N;
2395
- const L = nn(() => [N, m]);
2408
+ const L = rn(() => [N, m]);
2396
2409
  try {
2397
- ht(w) && (m = w.mnemonicUtf8), yr(w, ["mnemonicUtf8", "accountIndex"]), N = tr(m, "INVALID_MNEMONIC"), N.length > Wc && re("INVALID_MNEMONIC");
2410
+ ht(w) && (m = w.mnemonicUtf8), yr(w, ["mnemonicUtf8", "accountIndex"]), N = tr(m, "INVALID_MNEMONIC"), N.length > Kc && re("INVALID_MNEMONIC");
2398
2411
  const D = Cn(w.accountIndex);
2399
2412
  return E(
2400
2413
  "_hd_sdn_import_legacy_mnemonic_identity",
@@ -2411,7 +2424,7 @@ function cl(e) {
2411
2424
  },
2412
2425
  importRememberedIdentity(w) {
2413
2426
  let m, N;
2414
- const L = nn(() => [N, m]);
2427
+ const L = rn(() => [N, m]);
2415
2428
  try {
2416
2429
  ht(w) && (m = w.prfOutput), yr(w, [
2417
2430
  "ciphertextAndTag",
@@ -2422,7 +2435,7 @@ function cl(e) {
2422
2435
  "canonicalAad"
2423
2436
  ]);
2424
2437
  const D = gt(w.ciphertextAndTag), U = gt(w.hkdfSalt), M = gt(w.nonce), C = gt(w.canonicalUsernameUtf8, "INVALID_USERNAME"), B = Xn(w.canonicalAad, Yi);
2425
- return N = tr(m, "INVALID_REQUEST"), (N.length !== 32 || U.length !== 32 || M.length !== 12 || D.length < jc || D.length > Xi || C.length > rn) && re("INVALID_REQUEST"), E(
2438
+ return N = tr(m, "INVALID_REQUEST"), (N.length !== 32 || U.length !== 32 || M.length !== 12 || D.length < Yc || D.length > Xi || C.length > tn) && re("INVALID_REQUEST"), E(
2426
2439
  "_hd_sdn_import_remembered_identity",
2427
2440
  (Y) => [
2428
2441
  Y[0],
@@ -2589,7 +2602,7 @@ function cl(e) {
2589
2602
  "canonicalAad"
2590
2603
  ]);
2591
2604
  const _ = gt(m.hkdfSalt), f = gt(m.nonce), h = Xn(m.canonicalAad, Yi);
2592
- D = tr(N, "INVALID_PASSWORD"), U = tr(L, "INVALID_REQUEST"), (D.length > rn || U.length !== 32 || _.length !== 32 || f.length !== 12) && re("INVALID_REQUEST");
2605
+ D = tr(N, "INVALID_PASSWORD"), U = tr(L, "INVALID_REQUEST"), (D.length > tn || U.length !== 32 || _.length !== 32 || f.length !== 12) && re("INVALID_REQUEST");
2593
2606
  const u = B.allocate(D, !0), g = B.allocate(U, !0), v = B.allocate(_), k = B.allocate(f), R = B.allocate(h), F = B.allocate(4), V = B.allocate(et);
2594
2607
  let Z;
2595
2608
  try {
@@ -2653,8 +2666,8 @@ function cl(e) {
2653
2666
  }
2654
2667
  });
2655
2668
  }
2656
- const Yo = /* @__PURE__ */ new WeakMap();
2657
- function ll(e) {
2669
+ const Ko = /* @__PURE__ */ new WeakMap();
2670
+ function hl(e) {
2658
2671
  const r = e.sdn, s = e.utils.sha256;
2659
2672
  return Object.freeze({
2660
2673
  sdn: r,
@@ -2663,19 +2676,19 @@ function ll(e) {
2663
2676
  }
2664
2677
  });
2665
2678
  }
2666
- function dl(e) {
2667
- const r = ll(e);
2679
+ function ul(e) {
2680
+ const r = hl(e);
2668
2681
  Object.defineProperty(e, "walletOriginCapabilities", {
2669
2682
  value: r,
2670
2683
  enumerable: !1,
2671
2684
  writable: !1,
2672
2685
  configurable: !1
2673
- }), Yo.set(e, r);
2686
+ }), Ko.set(e, r);
2674
2687
  }
2675
- function Go(e) {
2688
+ function Yo(e) {
2676
2689
  if (e === null || typeof e != "object")
2677
2690
  throw new TypeError("Invalid HD wallet module");
2678
- const r = Yo.get(e);
2691
+ const r = Ko.get(e);
2679
2692
  if (!r) throw new TypeError("Invalid HD wallet module");
2680
2693
  const t = Object.getOwnPropertyDescriptor(
2681
2694
  e,
@@ -2702,14 +2715,14 @@ const ot = Object.freeze({
2702
2715
  ITALIAN: 7,
2703
2716
  CZECH: 8,
2704
2717
  PORTUGUESE: 9
2705
- }), _l = Object.freeze({
2718
+ }), fl = Object.freeze({
2706
2719
  RANDOM: 0,
2707
2720
  FILESYSTEM: 1,
2708
2721
  NETWORK: 2,
2709
2722
  USB_HID: 3,
2710
2723
  CLOCK: 4,
2711
2724
  ENVIRONMENT: 5
2712
- }), hl = Object.freeze({
2725
+ }), pl = Object.freeze({
2713
2726
  NONE: 0,
2714
2727
  NEEDS_ENTROPY: 1,
2715
2728
  NEEDS_BRIDGE: 2,
@@ -2764,7 +2777,7 @@ const ot = Object.freeze({
2764
2777
  BRIDGE_FAILED: 701,
2765
2778
  NEEDS_BRIDGE: 702,
2766
2779
  FIPS_NOT_ALLOWED: 800
2767
- }), ul = {
2780
+ }), yl = {
2768
2781
  [W.OK]: "Success",
2769
2782
  [W.UNKNOWN]: "Unknown error",
2770
2783
  [W.INVALID_ARGUMENT]: "Invalid argument",
@@ -2807,7 +2820,7 @@ class $ extends Error {
2807
2820
  */
2808
2821
  constructor(r, t) {
2809
2822
  const s = r < 0 ? -r : r;
2810
- super(t || ul[s] || `Error code: ${r}`), this.name = "HDWalletError", this.code = s;
2823
+ super(t || yl[s] || `Error code: ${r}`), this.name = "HDWalletError", this.code = s;
2811
2824
  }
2812
2825
  }
2813
2826
  function te(e) {
@@ -2824,10 +2837,10 @@ function j(e, r, t = W.NOT_SUPPORTED, s) {
2824
2837
  throw new $(t, s || `Function ${r} is not available in this build`);
2825
2838
  return a;
2826
2839
  }
2827
- const Xo = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", fl = Object.freeze(Object.fromEntries(
2840
+ const Go = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", gl = Object.freeze(Object.fromEntries(
2841
+ Array.from(Go).map((e, r) => [e, r])
2842
+ )), Xo = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", vl = Object.freeze(Object.fromEntries(
2828
2843
  Array.from(Xo).map((e, r) => [e, r])
2829
- )), Jo = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", pl = Object.freeze(Object.fromEntries(
2830
- Array.from(Jo).map((e, r) => [e, r])
2831
2844
  ));
2832
2845
  function Qi(e) {
2833
2846
  let r = 0;
@@ -2842,7 +2855,7 @@ function Qi(e) {
2842
2855
  for (; a < s.length && s[a] === 0; ) a++;
2843
2856
  let d = "1".repeat(r);
2844
2857
  for (; a < s.length; )
2845
- d += Xo[s[a++]];
2858
+ d += Go[s[a++]];
2846
2859
  return d;
2847
2860
  }
2848
2861
  function Zi(e) {
@@ -2850,7 +2863,7 @@ function Zi(e) {
2850
2863
  for (; r < e.length && e[r] === "1"; ) r++;
2851
2864
  const t = Math.floor((e.length - r) * 733 / 1e3) + 1, s = new Uint8Array(t);
2852
2865
  for (let b = r; b < e.length; b++) {
2853
- const E = fl[e[b]];
2866
+ const E = gl[e[b]];
2854
2867
  if (E === void 0)
2855
2868
  throw new $(W.INVALID_ARGUMENT, `Invalid Base58 character: ${e[b]}`);
2856
2869
  let I = E;
@@ -2896,20 +2909,20 @@ function to(e) {
2896
2909
  throw new $(W.INVALID_ARGUMENT, "Invalid base64 string");
2897
2910
  }
2898
2911
  }
2899
- const Qo = new TextEncoder(), yl = new TextDecoder();
2900
- function gl(e, r) {
2912
+ const Jo = new TextEncoder(), bl = new TextDecoder();
2913
+ function El(e, r) {
2901
2914
  let t = `${e}1`;
2902
2915
  for (let s = 0; s < r.length; s++)
2903
- t += Jo[r[s] & 31];
2916
+ t += Xo[r[s] & 31];
2904
2917
  return t;
2905
2918
  }
2906
- function vl(e) {
2919
+ function Al(e) {
2907
2920
  const r = e.lastIndexOf("1");
2908
2921
  if (r <= 0)
2909
2922
  throw new $(W.INVALID_ARGUMENT, "Invalid bech32 string");
2910
2923
  const t = e.slice(0, r), s = e.slice(r + 1), a = new Uint8Array(s.length);
2911
2924
  for (let d = 0; d < s.length; d++) {
2912
- const b = pl[s[d].toLowerCase()];
2925
+ const b = vl[s[d].toLowerCase()];
2913
2926
  if (b === void 0)
2914
2927
  throw new $(W.INVALID_ARGUMENT, `Invalid bech32 character: ${s[d]}`);
2915
2928
  a[d] = b;
@@ -2935,7 +2948,7 @@ function ke(e, r) {
2935
2948
  function yn(e, r) {
2936
2949
  return e.getValue(r, "i32") >>> 0;
2937
2950
  }
2938
- function Zo(e, r, t) {
2951
+ function Qo(e, r, t) {
2939
2952
  return e === -W.OUT_OF_MEMORY && t > r;
2940
2953
  }
2941
2954
  function rr(e, r, t = {}) {
@@ -2952,7 +2965,7 @@ function rr(e, r, t = {}) {
2952
2965
  const w = r(P, d), m = yn(e, d);
2953
2966
  if (w === 0)
2954
2967
  return J(e, P, m);
2955
- if (Zo(w, I, m)) {
2968
+ if (Qo(w, I, m)) {
2956
2969
  b = Math.max(m, I * 2);
2957
2970
  continue;
2958
2971
  }
@@ -2983,7 +2996,7 @@ function Bn(e, r, t = {}) {
2983
2996
  const w = r(P, d), m = yn(e, d);
2984
2997
  if (w === 0)
2985
2998
  return ke(e, P);
2986
- if (Zo(w, I, m)) {
2999
+ if (Qo(w, I, m)) {
2987
3000
  b = Math.max(m, I * 2);
2988
3001
  continue;
2989
3002
  }
@@ -3009,7 +3022,7 @@ function bt(e, r = "data") {
3009
3022
  return new Uint8Array(e.slice(0));
3010
3023
  throw new $(W.INVALID_ARGUMENT, `${r} must be binary data`);
3011
3024
  }
3012
- function bl(e) {
3025
+ function ml(e) {
3013
3026
  switch (e) {
3014
3027
  case ot.SECP256K1:
3015
3028
  return "secp256k1";
@@ -3025,7 +3038,7 @@ function bl(e) {
3025
3038
  throw new $(W.INVALID_ARGUMENT, `Unsupported curve: ${e}`);
3026
3039
  }
3027
3040
  }
3028
- function El(e) {
3041
+ function Il(e) {
3029
3042
  return String(e).replace(/\\/g, "\\\\").replace(/,/g, "\\,");
3030
3043
  }
3031
3044
  function Kt(e, r) {
@@ -3036,15 +3049,15 @@ function Kt(e, r) {
3036
3049
  );
3037
3050
  }
3038
3051
  function Er(e, r, t = "certificate") {
3039
- return Kt(r, "encoding"), r === Yt.PEM && typeof e == "string" ? Qo.encode(e) : bt(e, t);
3052
+ return Kt(r, "encoding"), r === Yt.PEM && typeof e == "string" ? Jo.encode(e) : bt(e, t);
3040
3053
  }
3041
- function Al(e, r) {
3042
- return typeof e == "string" ? Qo.encode(e) : bt(e, r);
3054
+ function wl(e, r) {
3055
+ return typeof e == "string" ? Jo.encode(e) : bt(e, r);
3043
3056
  }
3044
3057
  function Vn(e, r) {
3045
- return r === Yt.PEM ? yl.decode(e) : e;
3058
+ return r === Yt.PEM ? bl.decode(e) : e;
3046
3059
  }
3047
- function ml(e) {
3060
+ function Sl(e) {
3048
3061
  return {
3049
3062
  subjectDn: e.subject_dn ?? "",
3050
3063
  issuerDn: e.issuer_dn ?? "",
@@ -3060,7 +3073,7 @@ function ml(e) {
3060
3073
  walletAttestationValid: e.wallet_attestation_valid === !0
3061
3074
  };
3062
3075
  }
3063
- function Il(e) {
3076
+ function kl(e) {
3064
3077
  return {
3065
3078
  certificatePem: e.certificate_pem ?? "",
3066
3079
  privateKeyPem: e.private_key_pem ?? "",
@@ -3073,11 +3086,11 @@ function ro(e) {
3073
3086
  const r = [], t = (a, d) => {
3074
3087
  d == null || d === "" || r.push(`${a}=${d}`);
3075
3088
  }, s = (a, d) => {
3076
- !Array.isArray(d) || d.length === 0 || r.push(`${a}=${d.map(El).join(",")}`);
3089
+ !Array.isArray(d) || d.length === 0 || r.push(`${a}=${d.map(Il).join(",")}`);
3077
3090
  };
3078
3091
  if (t("subject_dn", e.subjectDn), t("serial_hex", e.serialHex), t("not_before_unix", e.notBeforeUnix), t("not_after_unix", e.notAfterUnix), e.isCa !== void 0 && t("is_ca", e.isCa ? "true" : "false"), e.pathLen !== void 0 && e.pathLen !== null && t("path_len", e.pathLen), s("dns", e.dnsNames), s("ips", e.ipAddresses), s("emails", e.emailAddresses), s("uris", e.uriNames), s("key_usage", e.keyUsage), s("extended_key_usage", e.extendedKeyUsage), t("friendly_name", e.friendlyName), e.walletAttestation) {
3079
3092
  const a = e.walletAttestation;
3080
- t("wallet_curve", bl(a.curve)), t("wallet_private_key_hex", kr(bt(a.privateKey, "walletAttestation.privateKey"))), t("wallet_key_label", a.keyLabel), t("wallet_comment_prefix", a.commentPrefix);
3093
+ t("wallet_curve", ml(a.curve)), t("wallet_private_key_hex", kr(bt(a.privateKey, "walletAttestation.privateKey"))), t("wallet_key_label", a.keyLabel), t("wallet_comment_prefix", a.commentPrefix);
3081
3094
  }
3082
3095
  return r.join(`
3083
3096
  `);
@@ -3361,13 +3374,13 @@ try {
3361
3374
  }));
3362
3375
  } catch {
3363
3376
  }
3364
- async function wl() {
3365
- const r = (await Promise.resolve().then(() => Nh))?.default;
3377
+ async function Ol() {
3378
+ const r = (await Promise.resolve().then(() => xh))?.default;
3366
3379
  if (typeof r != "function") throw new Error("Wallet WASM loader is invalid");
3367
- const t = new URL(Ac, import.meta.url).href, s = await fetch(t, {
3380
+ const t = new URL(Ic, import.meta.url).href, s = await fetch(t, {
3368
3381
  cache: "no-store",
3369
3382
  credentials: "omit",
3370
- integrity: "sha384-jL2ELgPv92rTFkleFdObXfmASgsQoaPmy/ew5u0E0ZZ52Sf48BPUWfNkZkU9sRH4",
3383
+ integrity: "sha384-ZAn/mcoWpv7gIG0tIB9YR5H6anhvoM3ioplvzjCRHfP8nMB7VXjsPlt9/J/pnFeI",
3371
3384
  mode: "same-origin",
3372
3385
  redirect: "error",
3373
3386
  referrerPolicy: "no-referrer"
@@ -3405,7 +3418,7 @@ async function wl() {
3405
3418
  I.set(w, P), P += w.byteLength;
3406
3419
  return r({ wasmBinary: I });
3407
3420
  }
3408
- function Sl(e) {
3421
+ function Pl(e) {
3409
3422
  const r = {
3410
3423
  /**
3411
3424
  * Generate a random mnemonic phrase
@@ -3715,10 +3728,13 @@ function Sl(e) {
3715
3728
  */
3716
3729
  secp256k1: {
3717
3730
  /**
3718
- * Sign message with secp256k1
3719
- * @param {Uint8Array} message - Message to sign (typically 32-byte hash)
3731
+ * Sign a message with secp256k1 ECDSA. Hashes the message with SHA-256
3732
+ * internally and signs that hash (RFC 6979, low-S): pass the message, never
3733
+ * a hash of it, or the signature covers SHA-256(SHA-256(message)) and no
3734
+ * standard verifier accepts it.
3735
+ * @param {Uint8Array} message - Message bytes (hashed once with SHA-256 here)
3720
3736
  * @param {Uint8Array} privateKey - 32-byte private key
3721
- * @returns {Uint8Array} Signature
3737
+ * @returns {Uint8Array} 64-byte compact signature r||s
3722
3738
  */
3723
3739
  sign(_, f) {
3724
3740
  const h = T(e, _), u = T(e, f), g = e._hd_alloc(72);
@@ -3731,10 +3747,12 @@ function Sl(e) {
3731
3747
  }
3732
3748
  },
3733
3749
  /**
3734
- * Sign message with recovery ID
3735
- * @param {Uint8Array} message - Message to sign
3736
- * @param {Uint8Array} privateKey - Private key
3737
- * @returns {Object} { signature: Uint8Array, recoveryId: number }
3750
+ * Sign a 32-byte hash with recovery ID. Unlike sign(), the input is NOT
3751
+ * hashed: pass the protocol digest you computed (e.g. Keccak-256 for
3752
+ * Ethereum, the Bitcoin signed-message hash).
3753
+ * @param {Uint8Array} message - 32-byte hash, signed as given
3754
+ * @param {Uint8Array} privateKey - 32-byte private key
3755
+ * @returns {Object} { signature: Uint8Array (64-byte r||s), recoveryId: number }
3738
3756
  */
3739
3757
  signRecoverable(_, f) {
3740
3758
  const h = j(e, "_hd_secp256k1_sign_recoverable"), u = T(e, _), g = T(e, f), v = e._hd_alloc(65);
@@ -3748,10 +3766,11 @@ function Sl(e) {
3748
3766
  }
3749
3767
  },
3750
3768
  /**
3751
- * Verify secp256k1 signature
3752
- * @param {Uint8Array} message - Original message
3753
- * @param {Uint8Array} signature - Signature to verify
3754
- * @param {Uint8Array} publicKey - Public key
3769
+ * Verify a secp256k1 ECDSA signature over SHA-256(message). Hashes the
3770
+ * message with SHA-256 internally: pass the message, not a hash of it.
3771
+ * @param {Uint8Array} message - Original message bytes (hashed once with SHA-256 here)
3772
+ * @param {Uint8Array} signature - 64-byte compact r||s or DER signature
3773
+ * @param {Uint8Array} publicKey - 33- or 65-byte public key
3755
3774
  * @returns {boolean} True if valid
3756
3775
  */
3757
3776
  verify(_, f, h) {
@@ -3763,11 +3782,12 @@ function Sl(e) {
3763
3782
  }
3764
3783
  },
3765
3784
  /**
3766
- * Recover public key from signature
3767
- * @param {Uint8Array} message - Original message
3768
- * @param {Uint8Array} signature - Signature
3785
+ * Recover the public key from a recoverable signature. Like
3786
+ * signRecoverable(), the input is the 32-byte hash, used as given.
3787
+ * @param {Uint8Array} message - 32-byte hash that was signed
3788
+ * @param {Uint8Array} signature - 64-byte r||s
3769
3789
  * @param {number} recoveryId - Recovery ID (0-3)
3770
- * @returns {Uint8Array} Recovered public key
3790
+ * @returns {Uint8Array} Recovered 33-byte compressed public key
3771
3791
  */
3772
3792
  recover(_, f, h) {
3773
3793
  const u = j(e, "_hd_secp256k1_recover"), g = T(e, _), v = new Uint8Array(65);
@@ -3853,6 +3873,13 @@ function Sl(e) {
3853
3873
  * P-256 (secp256r1) ECDSA operations
3854
3874
  */
3855
3875
  p256: {
3876
+ /**
3877
+ * Sign a message with P-256 ECDSA. Hashes the message with SHA-256
3878
+ * internally: pass the message, never a hash of it.
3879
+ * @param {Uint8Array} message - Message bytes (hashed once with SHA-256 here)
3880
+ * @param {Uint8Array} privateKey - 32-byte private key
3881
+ * @returns {Uint8Array} 64-byte compact signature r||s
3882
+ */
3856
3883
  sign(_, f) {
3857
3884
  const h = T(e, _), u = T(e, f), g = e._hd_alloc(72);
3858
3885
  try {
@@ -3863,6 +3890,13 @@ function Sl(e) {
3863
3890
  e._hd_secure_wipe(u, 32), e._hd_dealloc(h), e._hd_dealloc(u), e._hd_dealloc(g);
3864
3891
  }
3865
3892
  },
3893
+ /**
3894
+ * Verify a P-256 ECDSA signature over SHA-256(message).
3895
+ * @param {Uint8Array} message - Original message bytes (hashed once with SHA-256 here)
3896
+ * @param {Uint8Array} signature - 64-byte compact signature r||s
3897
+ * @param {Uint8Array} publicKey - 33- or 65-byte public key
3898
+ * @returns {boolean} True if valid
3899
+ */
3866
3900
  verify(_, f, h) {
3867
3901
  const u = j(e, "_hd_p256_verify"), g = T(e, _), v = T(e, f), k = T(e, h);
3868
3902
  try {
@@ -3886,6 +3920,13 @@ function Sl(e) {
3886
3920
  * P-384 (secp384r1) ECDSA operations
3887
3921
  */
3888
3922
  p384: {
3923
+ /**
3924
+ * Sign a message with P-384 ECDSA. Hashes the message with SHA-384
3925
+ * internally: pass the message, never a hash of it.
3926
+ * @param {Uint8Array} message - Message bytes (hashed once with SHA-384 here)
3927
+ * @param {Uint8Array} privateKey - 48-byte private key
3928
+ * @returns {Uint8Array} 96-byte compact signature r||s
3929
+ */
3889
3930
  sign(_, f) {
3890
3931
  const h = T(e, _), u = T(e, f), g = e._hd_alloc(104);
3891
3932
  try {
@@ -3896,6 +3937,13 @@ function Sl(e) {
3896
3937
  e._hd_secure_wipe(u, 48), e._hd_dealloc(h), e._hd_dealloc(u), e._hd_dealloc(g);
3897
3938
  }
3898
3939
  },
3940
+ /**
3941
+ * Verify a P-384 ECDSA signature over SHA-384(message).
3942
+ * @param {Uint8Array} message - Original message bytes (hashed once with SHA-384 here)
3943
+ * @param {Uint8Array} signature - 96-byte compact signature r||s
3944
+ * @param {Uint8Array} publicKey - 49- or 97-byte public key
3945
+ * @returns {boolean} True if valid
3946
+ */
3899
3947
  verify(_, f, h) {
3900
3948
  const u = j(e, "_hd_p384_verify"), g = T(e, _), v = T(e, f), k = T(e, h);
3901
3949
  try {
@@ -4753,7 +4801,7 @@ function Sl(e) {
4753
4801
  */
4754
4802
  isAvailable() {
4755
4803
  const _ = He(e, "_hd_wasi_has_feature");
4756
- return _ ? _(_l.USB_HID) !== 0 : !1;
4804
+ return _ ? _(fl.USB_HID) !== 0 : !1;
4757
4805
  },
4758
4806
  /**
4759
4807
  * Enumerate connected hardware wallets
@@ -5171,7 +5219,7 @@ function Sl(e) {
5171
5219
  encodeBech32(_, f) {
5172
5220
  const h = He(e, "_hd_encode_bech32");
5173
5221
  if (!h)
5174
- return gl(_, f);
5222
+ return El(_, f);
5175
5223
  const u = le(e, _), g = T(e, f);
5176
5224
  try {
5177
5225
  const v = h(u, g, f.length);
@@ -5183,7 +5231,7 @@ function Sl(e) {
5183
5231
  decodeBech32(_) {
5184
5232
  const f = He(e, "_hd_decode_bech32");
5185
5233
  if (!f)
5186
- return vl(_);
5234
+ return Al(_);
5187
5235
  const h = le(e, _), u = e._hd_alloc(128), g = e._hd_alloc(256), v = e._hd_alloc(4);
5188
5236
  try {
5189
5237
  e.setValue(v, 256, "i32");
@@ -5327,7 +5375,7 @@ function Sl(e) {
5327
5375
  Kt(f, "inputEncoding");
5328
5376
  const h = j(e, "_hd_x509_parse_certificate_json"), u = Er(_, f), g = T(e, u);
5329
5377
  try {
5330
- return ml(JSON.parse(
5378
+ return Sl(JSON.parse(
5331
5379
  Bn(
5332
5380
  e,
5333
5381
  (v, k) => h(g, u.length, f, v, k)
@@ -5351,7 +5399,7 @@ function Sl(e) {
5351
5399
  },
5352
5400
  exportPkcs12(_, f, h, u, g, v = "", k = "") {
5353
5401
  Kt(f, "certificateEncoding");
5354
- const R = j(e, "_hd_x509_export_pkcs12"), F = Er(_, f), V = T(e, F), Z = bt(u, "privateKey"), ee = T(e, Z), ae = le(e, g), oe = e.lengthBytesUTF8(g) + 1, pe = le(e, v), ce = Al(k, "chainPem"), Q = ce.length > 0 ? T(e, ce) : 0;
5402
+ const R = j(e, "_hd_x509_export_pkcs12"), F = Er(_, f), V = T(e, F), Z = bt(u, "privateKey"), ee = T(e, Z), ae = le(e, g), oe = e.lengthBytesUTF8(g) + 1, pe = le(e, v), ce = wl(k, "chainPem"), Q = ce.length > 0 ? T(e, ce) : 0;
5355
5403
  try {
5356
5404
  return rr(
5357
5405
  e,
@@ -5378,7 +5426,7 @@ function Sl(e) {
5378
5426
  importPkcs12(_, f) {
5379
5427
  const h = j(e, "_hd_x509_import_pkcs12_json"), u = bt(_, "pkcs12Bundle"), g = T(e, u), v = le(e, f), k = e.lengthBytesUTF8(f) + 1;
5380
5428
  try {
5381
- return Il(JSON.parse(
5429
+ return kl(JSON.parse(
5382
5430
  Bn(
5383
5431
  e,
5384
5432
  (R, F) => h(g, u.length, v, R, F),
@@ -5430,7 +5478,7 @@ function Sl(e) {
5430
5478
  },
5431
5479
  wasiGetWarning(_) {
5432
5480
  const f = He(e, "_hd_wasi_get_warning");
5433
- return f ? f(_) : hl.NOT_AVAILABLE_WASI;
5481
+ return f ? f(_) : pl.NOT_AVAILABLE_WASI;
5434
5482
  },
5435
5483
  wasiGetWarningMessage(_) {
5436
5484
  return "WASI warning API unavailable in this build";
@@ -5639,36 +5687,36 @@ function Sl(e) {
5639
5687
  }
5640
5688
  },
5641
5689
  // Key derivation helpers (convenience wrappers)
5642
- buildSigningPath: es,
5643
- buildEncryptionPath: ts,
5644
- getSigningKey: kl,
5645
- getEncryptionKey: Ol,
5690
+ buildSigningPath: Zo,
5691
+ buildEncryptionPath: es,
5692
+ getSigningKey: Rl,
5693
+ getEncryptionKey: Nl,
5646
5694
  // Aligned binary API for efficient batch operations
5647
5695
  get aligned() {
5648
5696
  if (!this._aligned) {
5649
5697
  const _ = Object.create(e);
5650
5698
  Object.defineProperty(_, "wasmMemory", {
5651
5699
  get: () => ({ buffer: e.HEAPU8.buffer })
5652
- }), this._aligned = new Tc(_);
5700
+ }), this._aligned = new Dc(_);
5653
5701
  }
5654
5702
  return this._aligned;
5655
5703
  }
5656
5704
  };
5657
5705
  return Object.defineProperty(Y, "sdn", {
5658
- value: cl(e),
5706
+ value: _l(e),
5659
5707
  enumerable: !0,
5660
5708
  writable: !1,
5661
5709
  configurable: !1
5662
- }), dl(Y), Y.plugin = Ho({ wallet: Y, wasm: e }), Y;
5710
+ }), ul(Y), Y.plugin = Vo({ wallet: Y, wasm: e }), Y;
5663
5711
  }
5664
- function es(e, r = "0", t = "0") {
5712
+ function Zo(e, r = "0", t = "0") {
5665
5713
  return `m/44'/${e}'/${r}'/0/${t}`;
5666
5714
  }
5667
- function ts(e, r = "0", t = "0") {
5715
+ function es(e, r = "0", t = "0") {
5668
5716
  return `m/44'/${e}'/${r}'/1/${t}`;
5669
5717
  }
5670
- function kl(e, r, t = "0", s = "0") {
5671
- const a = es(r, t, s), d = e.derivePath(a);
5718
+ function Rl(e, r, t = "0", s = "0") {
5719
+ const a = Zo(r, t, s), d = e.derivePath(a);
5672
5720
  try {
5673
5721
  return {
5674
5722
  privateKey: d.privateKey(),
@@ -5679,8 +5727,8 @@ function kl(e, r, t = "0", s = "0") {
5679
5727
  d.wipe();
5680
5728
  }
5681
5729
  }
5682
- function Ol(e, r, t = "0", s = "0") {
5683
- const a = ts(r, t, s), d = e.derivePath(a);
5730
+ function Nl(e, r, t = "0", s = "0") {
5731
+ const a = es(r, t, s), d = e.derivePath(a);
5684
5732
  try {
5685
5733
  return {
5686
5734
  privateKey: d.privateKey(),
@@ -5691,23 +5739,23 @@ function Ol(e, r, t = "0", s = "0") {
5691
5739
  d.wipe();
5692
5740
  }
5693
5741
  }
5694
- async function Pl() {
5695
- const e = await wl();
5696
- return Sl(e);
5742
+ async function Ll() {
5743
+ const e = await Ol();
5744
+ return Pl(e);
5697
5745
  }
5698
- const Rl = Object.freeze({
5746
+ const Tl = Object.freeze({
5699
5747
  cm: 0.01,
5700
5748
  km: 1e3,
5701
5749
  m: 1,
5702
5750
  mm: 1e-3
5703
- }), Nl = Object.freeze({
5704
- metersPerSourceUnit: Rl,
5751
+ }), xl = Object.freeze({
5752
+ metersPerSourceUnit: Tl,
5705
5753
  quaternionNormTolerance: 1e-6,
5706
5754
  scaleComponentExclusiveMin: 0,
5707
5755
  scaleComponentInclusiveMax: 1e6,
5708
5756
  translationComponentAbsMax: 1e6,
5709
5757
  upAxes: Object.freeze(["X_UP", "Y_UP", "Z_UP"])
5710
- }), Ll = Object.freeze({ reviewedTransform: Nl, schemaVersion: 1 }), Lt = new TextEncoder(), rs = Object.getPrototypeOf(Uint8Array.prototype), Tl = Object.getOwnPropertyDescriptor(rs, "buffer").get, xl = Object.getOwnPropertyDescriptor(rs, "length").get, Dl = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get, no = typeof SharedArrayBuffer > "u" ? null : Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, "byteLength").get, At = "sdn-bip32-slip10-purpose-v1", gn = "password-scrypt-v2", Xt = "ed25519-over-sha256-jcs-v1", io = "ed25519-raw-32-v1", Cl = "ed25519-sdn-signed-request-v2", oo = ["protocolVersion", "providerOrigin", "method", "requestUri", "bodySha256", "bodyBytes", "schema", "entityId", "entityName", "documentCount"], so = ["schemaVersion", "keyId", "identityScheme", "algorithm", "encoding", "signatureProfile", "publicKeyHex", "signatureHex", "requestDigestSha256", "challengeId", "challengeBase64url"], ns = "https://review.spacedatanetwork.org", is = "sdn-asset-review-v1", Ul = "asset-review:assets.ipfs.01", Fl = "asset-review-authority:assets.ipfs.01", Qn = "sdn-login:sdn.spaceaware.io", Ml = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Je = /^[0-9a-f]{64}$/u, fi = /^[0-9a-f]{128}$/u, Qt = /^sha256:[0-9a-f]{64}$/u, Bl = /^[1-9A-HJ-NP-Za-km-z]+$/u, Vl = /^b[a-z2-7]{58}$/u, Zn = "abcdefghijklmnopqrstuvwxyz234567", os = 131072, Hl = [
5758
+ }), Dl = Object.freeze({ reviewedTransform: xl, schemaVersion: 1 }), Lt = new TextEncoder(), ts = Object.getPrototypeOf(Uint8Array.prototype), Cl = Object.getOwnPropertyDescriptor(ts, "buffer").get, Ul = Object.getOwnPropertyDescriptor(ts, "length").get, Fl = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get, no = typeof SharedArrayBuffer > "u" ? null : Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, "byteLength").get, At = "sdn-bip32-slip10-purpose-v1", gn = "password-scrypt-v2", Xt = "ed25519-over-sha256-jcs-v1", io = "ed25519-raw-32-v1", Ml = "ed25519-sdn-signed-request-v2", oo = ["protocolVersion", "providerOrigin", "method", "requestUri", "bodySha256", "bodyBytes", "schema", "entityId", "entityName", "documentCount"], so = ["schemaVersion", "keyId", "identityScheme", "algorithm", "encoding", "signatureProfile", "publicKeyHex", "signatureHex", "requestDigestSha256", "challengeId", "challengeBase64url"], rs = "https://review.spacedatanetwork.org", ns = "sdn-asset-review-v1", Bl = "asset-review:assets.ipfs.01", Vl = "asset-review-authority:assets.ipfs.01", Qn = "sdn-login:sdn.spaceaware.io", Hl = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Je = /^[0-9a-f]{64}$/u, fi = /^[0-9a-f]{128}$/u, Qt = /^sha256:[0-9a-f]{64}$/u, zl = /^[1-9A-HJ-NP-Za-km-z]+$/u, $l = /^b[a-z2-7]{58}$/u, Zn = "abcdefghijklmnopqrstuvwxyz234567", is = 131072, Wl = [
5711
5759
  "accountFingerprint",
5712
5760
  "accountIndex",
5713
5761
  "accountLabel",
@@ -5717,7 +5765,7 @@ const Rl = Object.freeze({
5717
5765
  "keys",
5718
5766
  "schemaVersion",
5719
5767
  "seedProfile"
5720
- ], zl = [
5768
+ ], jl = [
5721
5769
  "bip32Fingerprint",
5722
5770
  "curve",
5723
5771
  "derivation",
@@ -5729,12 +5777,12 @@ const Rl = Object.freeze({
5729
5777
  "purpose",
5730
5778
  "seedProfile",
5731
5779
  "signatureProfile"
5732
- ], $l = [
5780
+ ], ql = [
5733
5781
  "connectionExpiresAt",
5734
5782
  "event",
5735
5783
  "identity",
5736
5784
  "schemaVersion"
5737
- ], Wl = [
5785
+ ], Kl = [
5738
5786
  "algorithm",
5739
5787
  "encoding",
5740
5788
  "identityScheme",
@@ -5742,7 +5790,7 @@ const Rl = Object.freeze({
5742
5790
  "schemaVersion",
5743
5791
  "signatureHex",
5744
5792
  "signatureProfile"
5745
- ], jl = [
5793
+ ], Yl = [
5746
5794
  "algorithm",
5747
5795
  "canonicalEnvelope",
5748
5796
  "encoding",
@@ -5782,7 +5830,7 @@ const Rl = Object.freeze({
5782
5830
  "previousDecisionHead",
5783
5831
  "protocolVersion",
5784
5832
  "requestOrigin"
5785
- ], ql = [
5833
+ ], Gl = [
5786
5834
  "metersPerSourceUnit",
5787
5835
  "rotation",
5788
5836
  "scale",
@@ -5811,8 +5859,8 @@ function tt(e, r) {
5811
5859
  }
5812
5860
  return e;
5813
5861
  }
5814
- function ss(e) {
5815
- typeof e != "string" && K("wire JSON must be a string"), Lt.encode(e).byteLength > os && K("wire JSON is too large"), e.charCodeAt(0) === 65279 && K("wire JSON must not contain a BOM");
5862
+ function os(e) {
5863
+ typeof e != "string" && K("wire JSON must be a string"), Lt.encode(e).byteLength > is && K("wire JSON is too large"), e.charCodeAt(0) === 65279 && K("wire JSON must not contain a BOM");
5816
5864
  let r = 0, t = 0;
5817
5865
  const s = () => {
5818
5866
  for (; r < e.length && /[\u0009\u000a\u000d\u0020]/u.test(e[r]); ) r += 1;
@@ -5876,33 +5924,33 @@ function ss(e) {
5876
5924
  const b = d();
5877
5925
  return s(), r !== e.length && K("wire JSON contains trailing bytes"), b;
5878
5926
  }
5879
- function as(e) {
5880
- return typeof e == "string" ? ss(e) : e;
5927
+ function ss(e) {
5928
+ return typeof e == "string" ? os(e) : e;
5881
5929
  }
5882
- function Kl(e, r) {
5930
+ function Xl(e, r) {
5883
5931
  if (e.byteLength !== r.byteLength) return !1;
5884
5932
  let t = 0;
5885
5933
  for (let s = 0; s < e.byteLength; s += 1) t |= e[s] ^ r[s];
5886
5934
  return t === 0;
5887
5935
  }
5888
5936
  function qe(e, r, t) {
5889
- const s = as(e);
5937
+ const s = ss(e);
5890
5938
  Pn(s) || K(`${t} must be a JSON object`), Object.getOwnPropertySymbols(s).length !== 0 && K(`${t} has an unknown symbol field`);
5891
5939
  const a = Object.getOwnPropertyNames(s).sort(), d = [...r].sort(), b = Lt.encode(a.join("\0")), E = Lt.encode(d.join("\0"));
5892
- Kl(b, E) || K(`${t} has missing or unknown fields`);
5940
+ Xl(b, E) || K(`${t} has missing or unknown fields`);
5893
5941
  for (const I of a) {
5894
5942
  const P = Object.getOwnPropertyDescriptor(s, I);
5895
5943
  (!P || !P.enumerable || !("value" in P)) && K(`${t}.${I} must be an enumerable data field`), P.value === void 0 && K(`${t}.${I} must not be undefined`);
5896
5944
  }
5897
5945
  return s;
5898
5946
  }
5899
- function Wr(e) {
5947
+ function $r(e) {
5900
5948
  if (!e || typeof e != "object" || Object.isFrozen(e)) return e;
5901
- for (const r of Object.values(e)) Wr(r);
5949
+ for (const r of Object.values(e)) $r(r);
5902
5950
  return Object.freeze(e);
5903
5951
  }
5904
5952
  function rt(e) {
5905
- return Wr(Object.fromEntries([...e].sort(([r], [t]) => r < t ? -1 : r > t ? 1 : 0)));
5953
+ return $r(Object.fromEntries([...e].sort(([r], [t]) => r < t ? -1 : r > t ? 1 : 0)));
5906
5954
  }
5907
5955
  function pi(e, r, t) {
5908
5956
  (!Array.isArray(e) || Object.getPrototypeOf(e) !== Array.prototype || e.length !== r) && K(`${t} must be a plain array with exactly ${r} values`);
@@ -5913,7 +5961,7 @@ function pi(e, r, t) {
5913
5961
  (!b || !b.enumerable || !("value" in b) || b.value === void 0) && K(`${t} must contain enumerable data values`);
5914
5962
  }
5915
5963
  }
5916
- function Yl(e) {
5964
+ function Jl(e) {
5917
5965
  const r = qe(
5918
5966
  e,
5919
5967
  ["reviewedTransform", "schemaVersion"],
@@ -5950,28 +5998,28 @@ function Yl(e) {
5950
5998
  ["upAxes", Object.freeze(Array.from({ length: 3 }, (a, d) => t.upAxes[d]))]
5951
5999
  ]);
5952
6000
  }
5953
- const qt = Yl(Ll);
6001
+ const qt = Jl(Dl);
5954
6002
  function de(e, r, t) {
5955
6003
  return e !== r && K(`${t} must equal ${JSON.stringify(r)}`), e;
5956
6004
  }
5957
- function $r(e, r, t) {
6005
+ function zr(e, r, t) {
5958
6006
  return r.includes(e) || K(`${t} is not an allowed value`), e;
5959
6007
  }
5960
6008
  function Be(e, r, t) {
5961
6009
  return tt(e, t), r.test(e) || K(`${t} has an invalid encoding`), e;
5962
6010
  }
5963
6011
  function Tt(e, r) {
5964
- return tt(e, r), (!Ml.test(e) || new Date(e).toISOString() !== e) && K(`${r} must be exact RFC3339 milliseconds UTC`), e;
6012
+ return tt(e, r), (!Hl.test(e) || new Date(e).toISOString() !== e) && K(`${r} must be exact RFC3339 milliseconds UTC`), e;
5965
6013
  }
5966
6014
  function Rn(e, r) {
5967
6015
  const t = Date.parse(e), s = Date.parse(r);
5968
6016
  s > t && s - t <= 3e5 || K("request lifetime must be in (0, 300] seconds");
5969
6017
  }
5970
- function Gl(e, r) {
5971
- (!ArrayBuffer.isView(e) || !(e instanceof Uint8Array) || Object.getPrototypeOf(e) !== Uint8Array.prototype) && K(`${r} must be a plain Uint8Array`), xl.call(e) !== 32 && K(`${r} must be exactly 32 bytes`);
6018
+ function Ql(e, r) {
6019
+ (!ArrayBuffer.isView(e) || !(e instanceof Uint8Array) || Object.getPrototypeOf(e) !== Uint8Array.prototype) && K(`${r} must be a plain Uint8Array`), Ul.call(e) !== 32 && K(`${r} must be exactly 32 bytes`);
5972
6020
  const s = Array.from({ length: 32 }, (w, m) => String(m)), a = Reflect.ownKeys(e);
5973
6021
  (a.length !== s.length || a.some((w, m) => w !== s[m])) && K(`${r} Uint8Array must contain only 32 indexed bytes`);
5974
- const d = Tl.call(e);
6022
+ const d = Cl.call(e);
5975
6023
  let b = !1;
5976
6024
  if (no)
5977
6025
  try {
@@ -5981,7 +6029,7 @@ function Gl(e, r) {
5981
6029
  }
5982
6030
  b && K(`${r} must not use SharedArrayBuffer storage`);
5983
6031
  try {
5984
- Dl.call(d);
6032
+ Fl.call(d);
5985
6033
  } catch {
5986
6034
  K(`${r} must use ArrayBuffer storage`);
5987
6035
  }
@@ -6004,17 +6052,17 @@ function yi(e, r) {
6004
6052
  K(`${r} must be valid base64url`);
6005
6053
  }
6006
6054
  const s = Uint8Array.from(t, (a) => a.charCodeAt(0));
6007
- return (s.byteLength !== 32 || Gl(s, r) !== e) && K(`${r} must canonically encode exactly 32 bytes`), e;
6055
+ return (s.byteLength !== 32 || Ql(s, r) !== e) && K(`${r} must canonically encode exactly 32 bytes`), e;
6008
6056
  }
6009
- function Xl(e) {
6057
+ function Zl(e) {
6010
6058
  let r = 0, t = 0, s = "";
6011
6059
  for (const a of e)
6012
6060
  for (r = r << 8 | a, t += 8; t >= 5; )
6013
6061
  t -= 5, s += Zn[r >>> t & 31], r &= (1 << t) - 1;
6014
6062
  return t !== 0 && (s += Zn[r << 5 - t & 31]), s;
6015
6063
  }
6016
- function Jl(e, r) {
6017
- tt(e, "modelCid"), Vl.test(e) || K("modelCid must be canonical CIDv1 raw sha2-256 base32");
6064
+ function ed(e, r) {
6065
+ tt(e, "modelCid"), $l.test(e) || K("modelCid must be canonical CIDv1 raw sha2-256 base32");
6018
6066
  let t = 0, s = 0;
6019
6067
  const a = [];
6020
6068
  for (const E of e.slice(1)) {
@@ -6023,7 +6071,7 @@ function Jl(e, r) {
6023
6071
  }
6024
6072
  (s !== 0 && t !== 0 || a.length !== 36) && K("modelCid has noncanonical base32 tail bits or length");
6025
6073
  const d = Uint8Array.from(a);
6026
- (d[0] !== 1 || d[1] !== 85 || d[2] !== 18 || d[3] !== 32) && K("modelCid must encode CIDv1 raw sha2-256 with a 32-byte digest"), `b${Xl(d)}` !== e && K("modelCid base32 is not canonical");
6074
+ (d[0] !== 1 || d[1] !== 85 || d[2] !== 18 || d[3] !== 32) && K("modelCid must encode CIDv1 raw sha2-256 with a 32-byte digest"), `b${Zl(d)}` !== e && K("modelCid base32 is not canonical");
6027
6075
  let b = 0;
6028
6076
  for (let E = 0; E < 32; E += 1) {
6029
6077
  const I = Number.parseInt(r.slice(E * 2, E * 2 + 2), 16);
@@ -6038,7 +6086,7 @@ function gi(e, r) {
6038
6086
  for (const t of ["identityScheme", "keyId", "signatureProfile"])
6039
6087
  e[t] !== r[t] && K(`canonicalEnvelope ${t} must match the signature result`);
6040
6088
  }
6041
- function Ql(e, r) {
6089
+ function td(e, r) {
6042
6090
  const s = qe(e, [
6043
6091
  "audience",
6044
6092
  "challengeSha256",
@@ -6055,15 +6103,15 @@ function Ql(e, r) {
6055
6103
  ], "SDN login canonicalEnvelope");
6056
6104
  gi(s, r), de(s.audience, Qn, "SDN login envelope audience"), Be(s.challengeSha256, Je, "SDN login envelope challengeSha256"), de(s.clientId, "sdn-node-console-v1", "SDN login envelope clientId"), Tt(s.issuedAt, "SDN login envelope issuedAt"), Tt(s.expiresAt, "SDN login envelope expiresAt"), Rn(s.issuedAt, s.expiresAt), de(s.identityScheme, At, "SDN login envelope identityScheme"), Be(s.keyId, Qt, "SDN login envelope keyId"), de(s.kind, "sdn-login", "SDN login envelope kind"), Be(s.nonce, Je, "SDN login envelope nonce"), de(s.protocolVersion, 2, "SDN login envelope protocolVersion"), de(s.requestOrigin, "https://sdn.spaceaware.io", "SDN login envelope requestOrigin"), de(s.signatureProfile, Xt, "SDN login envelope signatureProfile");
6057
6105
  }
6058
- function Zl(e, r) {
6106
+ function rd(e, r) {
6059
6107
  const t = qe(
6060
6108
  e,
6061
6109
  [...vn, "kind"],
6062
6110
  "authority activation canonicalEnvelope"
6063
6111
  );
6064
- gi(t, r), de(t.kind, "asset-review-authority-activation", "activation envelope kind"), ls(Object.fromEntries(vn.map((s) => [s, t[s]])));
6112
+ gi(t, r), de(t.kind, "asset-review-authority-activation", "activation envelope kind"), cs(Object.fromEntries(vn.map((s) => [s, t[s]])));
6065
6113
  }
6066
- function ed(e, r) {
6114
+ function nd(e, r) {
6067
6115
  const t = e?.decision === "approve" ? ["note", "reviewedTransform"] : e?.decision === "disapprove" ? ["reason"] : [], s = [...ei, ...t], a = qe(e, [
6068
6116
  ...s,
6069
6117
  "identityScheme",
@@ -6072,15 +6120,15 @@ function ed(e, r) {
6072
6120
  "purpose",
6073
6121
  "signatureProfile"
6074
6122
  ], "asset review decision canonicalEnvelope");
6075
- gi(a, r), de(a.identityScheme, At, "decision envelope identityScheme"), Be(a.keyId, Qt, "decision envelope keyId"), de(a.kind, "asset-review-attestation", "decision envelope kind"), de(a.purpose, "asset-review-approval", "decision envelope purpose"), de(a.signatureProfile, Xt, "decision envelope signatureProfile"), ds(Object.fromEntries(s.map((d) => [d, a[d]])));
6123
+ gi(a, r), de(a.identityScheme, At, "decision envelope identityScheme"), Be(a.keyId, Qt, "decision envelope keyId"), de(a.kind, "asset-review-attestation", "decision envelope kind"), de(a.purpose, "asset-review-approval", "decision envelope purpose"), de(a.signatureProfile, Xt, "decision envelope signatureProfile"), ls(Object.fromEntries(s.map((d) => [d, a[d]])));
6076
6124
  }
6077
- function td(e, r, t) {
6078
- tt(e, "canonicalEnvelope"), Lt.encode(e).byteLength > os && K("canonicalEnvelope is too large");
6079
- const s = ss(e);
6080
- return (!Pn(s) || s.kind !== r) && K("canonicalEnvelope kind does not match the operation"), ti(s) !== e && K("canonicalEnvelope must be exact JCS"), r === "sdn-login" ? Ql(s, t) : r === "asset-review-authority-activation" ? Zl(s, t) : r === "asset-review-attestation" ? ed(s, t) : K("canonicalEnvelope operation is not registered"), e;
6125
+ function id(e, r, t) {
6126
+ tt(e, "canonicalEnvelope"), Lt.encode(e).byteLength > is && K("canonicalEnvelope is too large");
6127
+ const s = os(e);
6128
+ return (!Pn(s) || s.kind !== r) && K("canonicalEnvelope kind does not match the operation"), ti(s) !== e && K("canonicalEnvelope must be exact JCS"), r === "sdn-login" ? td(s, t) : r === "asset-review-authority-activation" ? rd(s, t) : r === "asset-review-attestation" ? nd(s, t) : K("canonicalEnvelope operation is not registered"), e;
6081
6129
  }
6082
- function rd(e, r) {
6083
- const t = qe(e, zl, `identity key ${r.purpose}`);
6130
+ function od(e, r) {
6131
+ const t = qe(e, jl, `identity key ${r.purpose}`);
6084
6132
  return de(t.purpose, r.purpose, "key purpose"), de(t.identityScheme, At, "key identityScheme"), de(t.seedProfile, gn, "key seedProfile"), de(t.signatureProfile, r.signatureProfile, "key signatureProfile"), de(t.curve, r.curve, "key curve"), de(t.derivation, "slip10", "key derivation"), de(t.path, r.path, "key path"), de(t.encoding, "raw", "key encoding"), Be(t.publicKeyHex, Je, "key publicKeyHex"), de(t.bip32Fingerprint, null, "key bip32Fingerprint"), Be(t.keyId, Qt, "key keyId"), rt([
6085
6133
  ["bip32Fingerprint", null],
6086
6134
  ["curve", t.curve],
@@ -6095,9 +6143,9 @@ function rd(e, r) {
6095
6143
  ["signatureProfile", t.signatureProfile]
6096
6144
  ]);
6097
6145
  }
6098
- function nd(e) {
6099
- const r = qe(e, Hl, "WalletPublicIdentity");
6100
- de(r.schemaVersion, 1, "identity schemaVersion"), de(r.identityScheme, At, "identity identityScheme"), de(r.seedProfile, gn, "identity seedProfile"), r.accountIndex !== 0 && K("public wallet identity must use account 0"), de(r.accountLabel, null, "identity accountLabel"), tt(r.accountXpub, "identity accountXpub"), /^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(r.accountXpub) || K("identity accountXpub is invalid"), tt(r.accountPeerId, "identity accountPeerId"), (!r.accountPeerId.startsWith("16Uiu2H") || r.accountPeerId.length < 40 || r.accountPeerId.length > 64 || !Bl.test(r.accountPeerId)) && K("identity accountPeerId is invalid"), Be(r.accountFingerprint, /^[0-9a-f]{8}$/u, "identity accountFingerprint"), pi(r.keys, 3, "public identity keys array");
6146
+ function sd(e) {
6147
+ const r = qe(e, Wl, "WalletPublicIdentity");
6148
+ de(r.schemaVersion, 1, "identity schemaVersion"), de(r.identityScheme, At, "identity identityScheme"), de(r.seedProfile, gn, "identity seedProfile"), r.accountIndex !== 0 && K("public wallet identity must use account 0"), de(r.accountLabel, null, "identity accountLabel"), tt(r.accountXpub, "identity accountXpub"), /^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(r.accountXpub) || K("identity accountXpub is invalid"), tt(r.accountPeerId, "identity accountPeerId"), (!r.accountPeerId.startsWith("16Uiu2H") || r.accountPeerId.length < 40 || r.accountPeerId.length > 64 || !zl.test(r.accountPeerId)) && K("identity accountPeerId is invalid"), Be(r.accountFingerprint, /^[0-9a-f]{8}$/u, "identity accountFingerprint"), pi(r.keys, 3, "public identity keys array");
6101
6149
  const t = [
6102
6150
  {
6103
6151
  purpose: "asset-review-approval",
@@ -6119,7 +6167,7 @@ function nd(e) {
6119
6167
  }
6120
6168
  ], s = Array.from(
6121
6169
  { length: 3 },
6122
- (a, d) => rd(r.keys[d], t[d])
6170
+ (a, d) => od(r.keys[d], t[d])
6123
6171
  );
6124
6172
  return rt([
6125
6173
  ["accountFingerprint", r.accountFingerprint],
@@ -6128,25 +6176,25 @@ function nd(e) {
6128
6176
  ["accountPeerId", r.accountPeerId],
6129
6177
  ["accountXpub", r.accountXpub],
6130
6178
  ["identityScheme", At],
6131
- ["keys", Wr(s)],
6179
+ ["keys", $r(s)],
6132
6180
  ["schemaVersion", 1],
6133
6181
  ["seedProfile", gn]
6134
6182
  ]);
6135
6183
  }
6136
- function cs(e, r) {
6137
- const t = qe(e, $l, `${r} result`);
6138
- de(t.schemaVersion, 1, "connection result schemaVersion"), $r(t.event, ["connected", "disconnected"], "connection event"), r === "connect" && t.event !== "connected" && K("connect result must be connected");
6184
+ function as(e, r) {
6185
+ const t = qe(e, ql, `${r} result`);
6186
+ de(t.schemaVersion, 1, "connection result schemaVersion"), zr(t.event, ["connected", "disconnected"], "connection event"), r === "connect" && t.event !== "connected" && K("connect result must be connected");
6139
6187
  let s = null, a = null;
6140
- return t.event === "connected" ? (s = nd(t.identity), a = Tt(t.connectionExpiresAt, "connectionExpiresAt")) : (t.identity !== null || t.connectionExpiresAt !== null) && K("disconnected result must clear identity and expiry"), rt([
6188
+ return t.event === "connected" ? (s = sd(t.identity), a = Tt(t.connectionExpiresAt, "connectionExpiresAt")) : (t.identity !== null || t.connectionExpiresAt !== null) && K("disconnected result must clear identity and expiry"), rt([
6141
6189
  ["connectionExpiresAt", a],
6142
6190
  ["event", t.event],
6143
6191
  ["identity", s],
6144
6192
  ["schemaVersion", 1]
6145
6193
  ]);
6146
6194
  }
6147
- function id(e) {
6148
- const r = qe(e, Wl, "raw signature");
6149
- return de(r.schemaVersion, 1, "signature schemaVersion"), Be(r.keyId, Qt, "signature keyId"), $r(r.identityScheme, [
6195
+ function ad(e) {
6196
+ const r = qe(e, Kl, "raw signature");
6197
+ return de(r.schemaVersion, 1, "signature schemaVersion"), Be(r.keyId, Qt, "signature keyId"), zr(r.identityScheme, [
6150
6198
  "sdn-fast-password-auth-v1-legacy",
6151
6199
  "sdn-bip39-auth-v1-legacy"
6152
6200
  ], "raw signature identityScheme"), de(r.algorithm, "ed25519", "signature algorithm"), de(r.encoding, "raw", "signature encoding"), de(r.signatureProfile, io, "signature profile"), Be(r.signatureHex, fi, "signatureHex"), rt([
@@ -6160,8 +6208,8 @@ function id(e) {
6160
6208
  ]);
6161
6209
  }
6162
6210
  function vi(e, r) {
6163
- const t = qe(e, jl, "canonical signature");
6164
- return de(t.schemaVersion, 1, "signature schemaVersion"), Be(t.keyId, Qt, "signature keyId"), de(t.identityScheme, At, "signature identityScheme"), de(t.algorithm, "ed25519", "signature algorithm"), de(t.encoding, "raw", "signature encoding"), de(t.signatureProfile, Xt, "signature profile"), td(t.canonicalEnvelope, r, t), Be(t.signedDigestSha256, Je, "signedDigestSha256"), Be(t.signatureHex, fi, "signatureHex"), rt([
6211
+ const t = qe(e, Yl, "canonical signature");
6212
+ return de(t.schemaVersion, 1, "signature schemaVersion"), Be(t.keyId, Qt, "signature keyId"), de(t.identityScheme, At, "signature identityScheme"), de(t.algorithm, "ed25519", "signature algorithm"), de(t.encoding, "raw", "signature encoding"), de(t.signatureProfile, Xt, "signature profile"), id(t.canonicalEnvelope, r, t), Be(t.signedDigestSha256, Je, "signedDigestSha256"), Be(t.signatureHex, fi, "signatureHex"), rt([
6165
6213
  ["algorithm", "ed25519"],
6166
6214
  ["canonicalEnvelope", t.canonicalEnvelope],
6167
6215
  ["encoding", "raw"],
@@ -6173,16 +6221,16 @@ function vi(e, r) {
6173
6221
  ["signedDigestSha256", t.signedDigestSha256]
6174
6222
  ]);
6175
6223
  }
6176
- function od(e) {
6224
+ function cd(e) {
6177
6225
  const r = qe(e, ["challengeBase64url", "protocolVersion"], "SDN login v1 request");
6178
6226
  return de(r.protocolVersion, 1, "SDN login v1 protocolVersion"), yi(r.challengeBase64url, "challengeBase64url"), rt([
6179
6227
  ["challengeBase64url", r.challengeBase64url],
6180
6228
  ["protocolVersion", 1]
6181
6229
  ]);
6182
6230
  }
6183
- function sd(e) {
6231
+ function ld(e) {
6184
6232
  const r = qe(e, oo, "SDN publication request");
6185
- de(r.protocolVersion, 1, "publication protocolVersion"), de(r.method, "POST", "publication method"), $r(r.schema, ["CZM", "ETM"], "publication schema"), tt(r.providerOrigin, "providerOrigin");
6233
+ de(r.protocolVersion, 1, "publication protocolVersion"), de(r.method, "POST", "publication method"), zr(r.schema, ["CZM", "ETM"], "publication schema"), tt(r.providerOrigin, "providerOrigin");
6186
6234
  let t;
6187
6235
  try {
6188
6236
  t = new URL(r.providerOrigin);
@@ -6191,7 +6239,7 @@ function sd(e) {
6191
6239
  }
6192
6240
  (t.protocol !== "https:" || r.providerOrigin !== t.origin || t.username || t.password || t.port === "0" || t.pathname !== "/" || t.search || t.hash || t.hostname.length > 253 || t.hostname.split(".").some((d) => !/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/u.test(d))) && K("providerOrigin must be a canonical HTTPS DNS or IPv4 origin");
6193
6241
  const s = `/api/v1/data/publish/${r.schema}`, a = `/api/v1/data/publish/batch/${r.schema}`;
6194
- $r(r.requestUri, [s, `${s}.fbs`, a, `${a}.fbs`], "publication requestUri"), Be(r.bodySha256, Je, "publication bodySha256");
6242
+ zr(r.requestUri, [s, `${s}.fbs`, a, `${a}.fbs`], "publication requestUri"), Be(r.bodySha256, Je, "publication bodySha256");
6195
6243
  for (const [d, b] of [["bodyBytes", 1048576], ["documentCount", 1e5]])
6196
6244
  (!Number.isInteger(r[d]) || r[d] < 1 || r[d] > b) && K(`publication ${d} is outside its bounds`);
6197
6245
  for (const d of ["entityId", "entityName"]) {
@@ -6201,11 +6249,11 @@ function sd(e) {
6201
6249
  }
6202
6250
  return rt(oo.map((d) => [d, r[d]]));
6203
6251
  }
6204
- function ad(e) {
6252
+ function dd(e) {
6205
6253
  const r = qe(e, so, "SDN publication signature");
6206
- return de(r.schemaVersion, 1, "publication signature schemaVersion"), de(r.identityScheme, At, "publication identityScheme"), de(r.algorithm, "ed25519", "publication algorithm"), de(r.encoding, "raw", "publication encoding"), de(r.signatureProfile, Cl, "publication signatureProfile"), Be(r.keyId, Qt, "publication keyId"), Be(r.publicKeyHex, Je, "publication publicKeyHex"), Be(r.signatureHex, fi, "publication signatureHex"), Be(r.requestDigestSha256, Je, "publication requestDigestSha256"), Be(r.challengeId, /^[0-9a-f]{32}$/u, "publication challengeId"), yi(r.challengeBase64url, "publication challengeBase64url"), rt(so.map((t) => [t, r[t]]));
6254
+ return de(r.schemaVersion, 1, "publication signature schemaVersion"), de(r.identityScheme, At, "publication identityScheme"), de(r.algorithm, "ed25519", "publication algorithm"), de(r.encoding, "raw", "publication encoding"), de(r.signatureProfile, Ml, "publication signatureProfile"), Be(r.keyId, Qt, "publication keyId"), Be(r.publicKeyHex, Je, "publication publicKeyHex"), Be(r.signatureHex, fi, "publication signatureHex"), Be(r.requestDigestSha256, Je, "publication requestDigestSha256"), Be(r.challengeId, /^[0-9a-f]{32}$/u, "publication challengeId"), yi(r.challengeBase64url, "publication challengeBase64url"), rt(so.map((t) => [t, r[t]]));
6207
6255
  }
6208
- function cd(e) {
6256
+ function _d(e) {
6209
6257
  const r = qe(e, [
6210
6258
  "audience",
6211
6259
  "challengeBase64url",
@@ -6223,9 +6271,9 @@ function cd(e) {
6223
6271
  ["protocolVersion", 2]
6224
6272
  ]);
6225
6273
  }
6226
- function ls(e) {
6274
+ function cs(e) {
6227
6275
  const r = qe(e, vn, "authority activation request");
6228
- return de(r.protocolVersion, 1, "activation protocolVersion"), de(r.audience, Fl, "activation audience"), de(r.requestOrigin, ns, "activation requestOrigin"), de(r.clientId, is, "activation clientId"), de(r.serviceInstance, "assets.ipfs.01/asset-review-attestation", "activation serviceInstance"), de(r.purpose, "asset-review-authority-activation", "activation purpose"), Be(r.nonce, Je, "activation nonce"), Tt(r.issuedAt, "activation issuedAt"), Tt(r.expiresAt, "activation expiresAt"), Rn(r.issuedAt, r.expiresAt), Be(r.publicKeyHex, Je, "activation publicKeyHex"), Be(r.keyId, Qt, "activation keyId"), de(r.identityScheme, At, "activation identityScheme"), de(r.signatureProfile, Xt, "activation signatureProfile"), rt(vn.map((t) => [t, r[t]]));
6276
+ return de(r.protocolVersion, 1, "activation protocolVersion"), de(r.audience, Vl, "activation audience"), de(r.requestOrigin, rs, "activation requestOrigin"), de(r.clientId, ns, "activation clientId"), de(r.serviceInstance, "assets.ipfs.01/asset-review-attestation", "activation serviceInstance"), de(r.purpose, "asset-review-authority-activation", "activation purpose"), Be(r.nonce, Je, "activation nonce"), Tt(r.issuedAt, "activation issuedAt"), Tt(r.expiresAt, "activation expiresAt"), Rn(r.issuedAt, r.expiresAt), Be(r.publicKeyHex, Je, "activation publicKeyHex"), Be(r.keyId, Qt, "activation keyId"), de(r.identityScheme, At, "activation identityScheme"), de(r.signatureProfile, Xt, "activation signatureProfile"), rt(vn.map((t) => [t, r[t]]));
6229
6277
  }
6230
6278
  function Hn(e, r, t) {
6231
6279
  pi(e, r, `${t} array`);
@@ -6233,13 +6281,13 @@ function Hn(e, r, t) {
6233
6281
  const b = e[d];
6234
6282
  return (typeof b != "number" || !Number.isFinite(b)) && K(`${t} values must be finite numbers`), b;
6235
6283
  });
6236
- return Wr(s);
6284
+ return $r(s);
6237
6285
  }
6238
- function ld(e) {
6239
- const r = qe(e, ql, "reviewedTransform"), t = Hn(r.translation, 3, "translation"), s = Hn(r.rotation, 4, "rotation"), a = Hn(r.scale, 3, "scale");
6286
+ function hd(e) {
6287
+ const r = qe(e, Gl, "reviewedTransform"), t = Hn(r.translation, 3, "translation"), s = Hn(r.rotation, 4, "rotation"), a = Hn(r.scale, 3, "scale");
6240
6288
  t.some((b) => Math.abs(b) > qt.translationComponentAbsMax) && K("translation values exceed the reviewed transform policy"), a.some((b) => b <= qt.scaleComponentExclusiveMin || b > qt.scaleComponentInclusiveMax) && K("scale values exceed the reviewed transform policy");
6241
6289
  const d = Math.hypot(...s);
6242
- return Math.abs(d - 1) > qt.quaternionNormTolerance && K("rotation must be a unit quaternion within the reviewed tolerance"), $r(r.upAxis, qt.upAxes, "upAxis"), tt(r.sourceUnits, "sourceUnits"), Object.hasOwn(qt.metersPerSourceUnit, r.sourceUnits) || K("sourceUnits is not allowed by the reviewed transform policy"), (typeof r.metersPerSourceUnit != "number" || !Number.isFinite(r.metersPerSourceUnit) || r.metersPerSourceUnit !== qt.metersPerSourceUnit[r.sourceUnits]) && K("metersPerSourceUnit must exactly match sourceUnits"), rt([
6290
+ return Math.abs(d - 1) > qt.quaternionNormTolerance && K("rotation must be a unit quaternion within the reviewed tolerance"), zr(r.upAxis, qt.upAxes, "upAxis"), tt(r.sourceUnits, "sourceUnits"), Object.hasOwn(qt.metersPerSourceUnit, r.sourceUnits) || K("sourceUnits is not allowed by the reviewed transform policy"), (typeof r.metersPerSourceUnit != "number" || !Number.isFinite(r.metersPerSourceUnit) || r.metersPerSourceUnit !== qt.metersPerSourceUnit[r.sourceUnits]) && K("metersPerSourceUnit must exactly match sourceUnits"), rt([
6243
6291
  ["metersPerSourceUnit", r.metersPerSourceUnit],
6244
6292
  ["rotation", s],
6245
6293
  ["scale", a],
@@ -6257,66 +6305,66 @@ function co(e, r, t) {
6257
6305
  const s = Array.from(e, (a) => a.codePointAt(0));
6258
6306
  return (ao(s[0]) || ao(s[s.length - 1])) && K(`${r} must already be trimmed`), e;
6259
6307
  }
6260
- function ds(e) {
6261
- const r = as(e);
6308
+ function ls(e) {
6309
+ const r = ss(e);
6262
6310
  Pn(r) || K("asset review decision request must be a JSON object");
6263
6311
  const t = Object.getOwnPropertyDescriptor(r, "decision");
6264
6312
  (!t || !t.enumerable || !("value" in t) || t.value === void 0) && K("asset review decision request has an invalid decision field");
6265
6313
  const s = t.value, a = s === "approve" ? ["note", "reviewedTransform"] : s === "disapprove" ? ["reason"] : [], d = qe(r, [...ei, ...a], "asset review decision request");
6266
- de(d.protocolVersion, 1, "decision protocolVersion"), de(d.audience, Ul, "decision audience"), de(d.requestOrigin, ns, "decision requestOrigin"), de(d.clientId, is, "decision clientId"), Be(d.challengeId, Je, "challengeId"), Be(d.nonce, Je, "decision nonce"), Tt(d.issuedAt, "decision issuedAt"), Tt(d.expiresAt, "decision expiresAt"), Rn(d.issuedAt, d.expiresAt), Be(d.modelSha256, Je, "modelSha256"), Be(d.metadataSha256, Je, "metadataSha256"), d.previousDecisionHead !== null && Be(d.previousDecisionHead, Je, "previousDecisionHead"), Jl(d.modelCid, d.modelSha256), (!Number.isSafeInteger(d.modelBytes) || d.modelBytes <= 0) && K("modelBytes must be a positive safe integer"), tt(d.candidateKey, "candidateKey");
6314
+ de(d.protocolVersion, 1, "decision protocolVersion"), de(d.audience, Bl, "decision audience"), de(d.requestOrigin, rs, "decision requestOrigin"), de(d.clientId, ns, "decision clientId"), Be(d.challengeId, Je, "challengeId"), Be(d.nonce, Je, "decision nonce"), Tt(d.issuedAt, "decision issuedAt"), Tt(d.expiresAt, "decision expiresAt"), Rn(d.issuedAt, d.expiresAt), Be(d.modelSha256, Je, "modelSha256"), Be(d.metadataSha256, Je, "metadataSha256"), d.previousDecisionHead !== null && Be(d.previousDecisionHead, Je, "previousDecisionHead"), ed(d.modelCid, d.modelSha256), (!Number.isSafeInteger(d.modelBytes) || d.modelBytes <= 0) && K("modelBytes must be a positive safe integer"), tt(d.candidateKey, "candidateKey");
6267
6315
  const b = "asset-review:", E = `:${d.modelSha256}`;
6268
6316
  (!d.candidateKey.startsWith(b) || !d.candidateKey.endsWith(E) || Lt.encode(d.candidateKey).byteLength > 206) && K("candidateKey does not bind the model digest");
6269
6317
  const I = d.candidateKey.slice(b.length, -E.length);
6270
6318
  (!/^[a-z0-9-]+\/[a-z0-9][a-z0-9-]*$/u.test(I) || Lt.encode(I).byteLength > 128) && K("candidateKey entityId is invalid");
6271
6319
  const P = ei.map((m) => [m, d[m]]);
6272
- return s === "approve" ? (P.push(["note", co(d.note, "note", !0)]), P.push(["reviewedTransform", ld(d.reviewedTransform)])) : P.push(["reason", co(d.reason, "reason", !1)]), Object.values(d).filter((m) => typeof m == "string").reduce((m, N) => m + Lt.encode(N).byteLength, 0) > 16384 && K("decision request strings exceed 16 KiB"), rt(P);
6273
- }
6274
- function _s(e, r) {
6275
- return qe(e, [], r), Wr({});
6320
+ return s === "approve" ? (P.push(["note", co(d.note, "note", !0)]), P.push(["reviewedTransform", hd(d.reviewedTransform)])) : P.push(["reason", co(d.reason, "reason", !1)]), Object.values(d).filter((m) => typeof m == "string").reduce((m, N) => m + Lt.encode(N).byteLength, 0) > 16384 && K("decision request strings exceed 16 KiB"), rt(P);
6276
6321
  }
6277
- function dd(e) {
6278
- return _s(e, "wallet connect request");
6279
- }
6280
- function _d(e) {
6281
- return cs(e, "connect");
6282
- }
6283
- function hd(e) {
6284
- return _s(e, "wallet account request");
6285
- }
6286
- function hs(e) {
6287
- return cs(e, "account");
6322
+ function ds(e, r) {
6323
+ return qe(e, [], r), $r({});
6288
6324
  }
6289
6325
  function ud(e) {
6290
- return od(e);
6326
+ return ds(e, "wallet connect request");
6291
6327
  }
6292
6328
  function fd(e) {
6293
- return id(e);
6329
+ return as(e, "connect");
6294
6330
  }
6295
6331
  function pd(e) {
6296
- return cd(e);
6297
- }
6298
- function yd(e) {
6299
- return vi(e, "sdn-login");
6332
+ return ds(e, "wallet account request");
6300
6333
  }
6301
- function us(e) {
6302
- return sd(e);
6334
+ function _s(e) {
6335
+ return as(e, "account");
6303
6336
  }
6304
- function fs(e) {
6305
- return ad(e);
6337
+ function yd(e) {
6338
+ return cd(e);
6306
6339
  }
6307
6340
  function gd(e) {
6308
- return ls(e);
6341
+ return ad(e);
6309
6342
  }
6310
6343
  function vd(e) {
6311
- return vi(e, "asset-review-authority-activation");
6344
+ return _d(e);
6312
6345
  }
6313
6346
  function bd(e) {
6314
- return ds(e);
6347
+ return vi(e, "sdn-login");
6348
+ }
6349
+ function hs(e) {
6350
+ return ld(e);
6351
+ }
6352
+ function us(e) {
6353
+ return dd(e);
6315
6354
  }
6316
6355
  function Ed(e) {
6356
+ return cs(e);
6357
+ }
6358
+ function Ad(e) {
6359
+ return vi(e, "asset-review-authority-activation");
6360
+ }
6361
+ function md(e) {
6362
+ return ls(e);
6363
+ }
6364
+ function Id(e) {
6317
6365
  return vi(e, "asset-review-attestation");
6318
6366
  }
6319
- const Ad = Object.freeze([
6367
+ const wd = Object.freeze([
6320
6368
  "callbackUri",
6321
6369
  "clientDisplayName",
6322
6370
  "clientId",
@@ -6330,48 +6378,48 @@ const Ad = Object.freeze([
6330
6378
  "schemaVersion",
6331
6379
  "state",
6332
6380
  "transactionId"
6333
- ]), cn = /^[0-9a-f]{64}$/u, ps = /^[A-Za-z0-9_-]{43}$/u, md = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Id = new TextEncoder(), ys = Object.freeze({
6381
+ ]), an = /^[0-9a-f]{64}$/u, fs = /^[A-Za-z0-9_-]{43}$/u, Sd = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, kd = new TextEncoder(), ps = Object.freeze({
6334
6382
  "sdn.auth.publish-request.v1": Object.freeze({
6335
- parseRequest: us,
6336
- buildResult: fs,
6383
+ parseRequest: hs,
6384
+ buildResult: us,
6337
6385
  publish: !0
6338
6386
  }),
6339
6387
  "sdn.auth.jcs-envelope.v2": Object.freeze({
6340
- parseRequest: pd,
6341
- buildResult: yd,
6388
+ parseRequest: vd,
6389
+ buildResult: bd,
6342
6390
  sign(e, r, t, s) {
6343
6391
  return e.signSdnLoginV2(r, t, s.registryRow);
6344
6392
  }
6345
6393
  }),
6346
6394
  "sdn.auth.raw-challenge.v1": Object.freeze({
6347
- parseRequest: ud,
6348
- buildResult: fd,
6395
+ parseRequest: yd,
6396
+ buildResult: gd,
6349
6397
  sign(e, r, t) {
6350
- return e.signSdnLoginV1(r, Od(t.challengeBase64url));
6398
+ return e.signSdnLoginV1(r, Nd(t.challengeBase64url));
6351
6399
  }
6352
6400
  }),
6353
6401
  "sdn.asset-review.authority-activation.v1": Object.freeze({
6354
- parseRequest: gd,
6355
- buildResult: vd,
6402
+ parseRequest: Ed,
6403
+ buildResult: Ad,
6356
6404
  sign(e, r, t, s) {
6357
6405
  return e.signAssetReviewAuthorityActivation(r, t, s.registryRow);
6358
6406
  }
6359
6407
  }),
6360
6408
  "sdn.asset-review.decision.v1": Object.freeze({
6361
- parseRequest: bd,
6362
- buildResult: Ed,
6409
+ parseRequest: md,
6410
+ buildResult: Id,
6363
6411
  sign(e, r, t, s) {
6364
6412
  return e.signAssetReviewDecision(r, t, s.registryRow);
6365
6413
  }
6366
6414
  }),
6367
6415
  "sdn.wallet.account.v1": Object.freeze({
6368
- parseRequest: hd,
6369
- buildResult: hs,
6416
+ parseRequest: pd,
6417
+ buildResult: _s,
6370
6418
  connect: !0
6371
6419
  }),
6372
6420
  "sdn.wallet.connect.v1": Object.freeze({
6373
- parseRequest: dd,
6374
- buildResult: _d,
6421
+ parseRequest: ud,
6422
+ buildResult: fd,
6375
6423
  connect: !0
6376
6424
  })
6377
6425
  });
@@ -6411,8 +6459,8 @@ function ri(e, r, t = "INVALID_TRANSACTION") {
6411
6459
  }
6412
6460
  return b;
6413
6461
  }
6414
- function ln(e, r = "INVALID_TRANSACTION") {
6415
- (typeof e != "string" || !md.test(e)) && Se(r);
6462
+ function cn(e, r = "INVALID_TRANSACTION") {
6463
+ (typeof e != "string" || !Sd.test(e)) && Se(r);
6416
6464
  const t = Date.parse(e);
6417
6465
  return (!Number.isFinite(t) || new Date(t).toISOString() !== e) && Se(r), t;
6418
6466
  }
@@ -6426,17 +6474,17 @@ function Mr(e) {
6426
6474
  function ni(e) {
6427
6475
  return e === null || typeof e == "boolean" || typeof e == "string" ? JSON.stringify(e) : typeof e == "number" ? (Number.isFinite(e) || Se("INVALID_TRANSACTION"), JSON.stringify(e)) : Array.isArray(e) ? `[${e.map(ni).join(",")}]` : (bi(e) || Se("INVALID_TRANSACTION"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${ni(e[r])}`).join(",")}}`);
6428
6476
  }
6429
- async function wd(e, r) {
6477
+ async function Od(e, r) {
6430
6478
  typeof r != "function" && Se("CRYPTO_UNAVAILABLE");
6431
6479
  let t;
6432
6480
  try {
6433
- t = await r(Id.encode(ni(e)));
6481
+ t = await r(kd.encode(ni(e)));
6434
6482
  } catch {
6435
6483
  Se("CRYPTO_UNAVAILABLE");
6436
6484
  }
6437
6485
  return (!(t instanceof Uint8Array) || t.byteLength !== 32) && Se("CRYPTO_UNAVAILABLE"), Array.from(t, (s) => s.toString(16).padStart(2, "0")).join("");
6438
6486
  }
6439
- function Sd(e, r) {
6487
+ function Pd(e, r) {
6440
6488
  if (typeof e != "string" || typeof r != "string") return !1;
6441
6489
  const t = Math.max(e.length, r.length);
6442
6490
  let s = e.length ^ r.length;
@@ -6444,7 +6492,7 @@ function Sd(e, r) {
6444
6492
  s |= (e.charCodeAt(a) || 0) ^ (r.charCodeAt(a) || 0);
6445
6493
  return s === 0;
6446
6494
  }
6447
- function kd(e, r) {
6495
+ function Rd(e, r) {
6448
6496
  try {
6449
6497
  if (typeof e?.resolveRegistryBinding == "function")
6450
6498
  return e.resolveRegistryBinding(r);
@@ -6473,17 +6521,17 @@ async function zn(e, {
6473
6521
  now: d = () => Date.now(),
6474
6522
  expectedTransactionId: b = null
6475
6523
  }) {
6476
- const E = ri(e, Ad);
6477
- (E.schemaVersion !== 1 || typeof E.clientDisplayName != "string" || E.clientDisplayName.length < 1 || E.clientDisplayName.length > 80 || !cn.test(E.transactionId) || !cn.test(E.state) || !cn.test(E.requestSha256) || !ps.test(E.resultToken)) && Se("INVALID_TRANSACTION"), b !== null && E.transactionId !== b && Se("INVALID_TRANSACTION");
6478
- const I = ys[E.operation];
6524
+ const E = ri(e, wd);
6525
+ (E.schemaVersion !== 1 || typeof E.clientDisplayName != "string" || E.clientDisplayName.length < 1 || E.clientDisplayName.length > 80 || !an.test(E.transactionId) || !an.test(E.state) || !an.test(E.requestSha256) || !fs.test(E.resultToken)) && Se("INVALID_TRANSACTION"), b !== null && E.transactionId !== b && Se("INVALID_TRANSACTION");
6526
+ const I = ps[E.operation];
6479
6527
  I || Se("UNREGISTERED_TRANSACTION");
6480
- const P = kd(r, {
6528
+ const P = Rd(r, {
6481
6529
  clientId: E.clientId,
6482
6530
  operation: E.operation,
6483
6531
  requestOrigin: E.requestOrigin
6484
6532
  });
6485
6533
  (P.registryReleaseSha256 !== E.registryVersion || P.callbackUri !== E.callbackUri || P.clientDisplayName !== E.clientDisplayName || P.clientId !== E.clientId || P.operation !== E.operation || P.requestOrigin !== E.requestOrigin) && Se("REGISTRY_BINDING_MISMATCH");
6486
- const w = d(), m = ln(E.expiresAt);
6534
+ const w = d(), m = cn(E.expiresAt);
6487
6535
  (!Number.isFinite(w) || m <= w || m - w > P.maxLifetimeSeconds * 1e3) && Se("TRANSACTION_EXPIRED");
6488
6536
  let N;
6489
6537
  try {
@@ -6493,12 +6541,12 @@ async function zn(e, {
6493
6541
  }
6494
6542
  let L;
6495
6543
  try {
6496
- L = await wd(N, s);
6544
+ L = await Od(N, s);
6497
6545
  } catch (U) {
6498
6546
  if (U instanceof xt) throw U;
6499
6547
  Se("CRYPTO_UNAVAILABLE");
6500
6548
  }
6501
- Sd(L, E.requestSha256) || Se("REQUEST_HASH_MISMATCH");
6549
+ Pd(L, E.requestSha256) || Se("REQUEST_HASH_MISMATCH");
6502
6550
  const D = { ...E, request: N };
6503
6551
  return Object.freeze({
6504
6552
  binding: Mr(P),
@@ -6507,8 +6555,8 @@ async function zn(e, {
6507
6555
  transaction: Mr(D)
6508
6556
  });
6509
6557
  }
6510
- function Od(e) {
6511
- ps.test(e) || Se("INVALID_TRANSACTION");
6558
+ function Nd(e) {
6559
+ fs.test(e) || Se("INVALID_TRANSACTION");
6512
6560
  let r;
6513
6561
  try {
6514
6562
  r = globalThis.atob(`${e.replace(/-/gu, "+").replace(/_/gu, "/")}=`);
@@ -6518,7 +6566,7 @@ function Od(e) {
6518
6566
  const t = Uint8Array.from(r, (s) => s.charCodeAt(0));
6519
6567
  return t.byteLength !== 32 && Se("INVALID_TRANSACTION"), t;
6520
6568
  }
6521
- function Pd(e, r, t, s) {
6569
+ function Ld(e, r, t, s) {
6522
6570
  const a = e.createElement("div");
6523
6571
  a.className = "wallet-confirmation-row";
6524
6572
  const d = e.createElement("strong");
@@ -6534,7 +6582,7 @@ function lo(e) {
6534
6582
  }
6535
6583
  }
6536
6584
  const _o = "The site sees your public key and address. It cannot spend or sign anything without asking you.";
6537
- function gs(e, r = {}) {
6585
+ function ys(e, r = {}) {
6538
6586
  const t = lo(e.requestOrigin), s = String(e.clientDisplayName ?? "").trim(), a = s || t, d = s && t && s !== t ? [["Site", t]] : [], b = (E, I, P, w = []) => ({
6539
6587
  title: E,
6540
6588
  detail: I,
@@ -6569,26 +6617,26 @@ function gs(e, r = {}) {
6569
6617
  return b(`Confirm a request from ${a}`, "", "Confirm");
6570
6618
  }
6571
6619
  }
6572
- function Rd(e, { binding: r, document: t, request: s }) {
6573
- const a = gs(r, s ?? {});
6620
+ function Td(e, { binding: r, document: t, request: s }) {
6621
+ const a = ys(r, s ?? {});
6574
6622
  e.replaceChildren();
6575
6623
  const d = t.createElement("h1");
6576
6624
  if (d.id = "wallet-confirmation-heading", d.textContent = a.title, e.append(d), a.detail) {
6577
6625
  const b = t.createElement("p");
6578
6626
  b.className = "wallet-confirmation-detail", b.textContent = a.detail, e.append(b);
6579
6627
  }
6580
- for (const [b, E] of a.facts) Pd(t, e, b, String(E));
6628
+ for (const [b, E] of a.facts) Ld(t, e, b, String(E));
6581
6629
  return e;
6582
6630
  }
6583
- async function Nd({ assertCurrent: e, binding: r, capabilities: t, handle: s, identity: a, transaction: d }) {
6584
- const b = us(d.request);
6631
+ async function xd({ assertCurrent: e, binding: r, capabilities: t, handle: s, identity: a, transaction: d }) {
6632
+ const b = hs(d.request);
6585
6633
  (r.clientId !== "spaceaware-web-v1" || r.requestOrigin !== "https://spaceaware.io" || r.registryRow !== "spaceaware-publish-request-v1" || typeof t.signSdnPublishRequest != "function" || a?.identityScheme !== "sdn-bip32-slip10-purpose-v1" || a?.seedProfile !== "password-scrypt-v2") && Se("OPERATION_NOT_ALLOWED");
6586
6634
  const E = a.keys?.filter((C) => C?.purpose === "sdn-authentication") ?? [];
6587
- (E.length !== 1 || E[0].identityScheme !== a.identityScheme || E[0].seedProfile !== a.seedProfile || E[0].curve !== "ed25519" || !cn.test(E[0].publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(E[0].keyId)) && Se("OPERATION_NOT_ALLOWED");
6635
+ (E.length !== 1 || E[0].identityScheme !== a.identityScheme || E[0].seedProfile !== a.seedProfile || E[0].curve !== "ed25519" || !an.test(E[0].publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(E[0].keyId)) && Se("OPERATION_NOT_ALLOWED");
6588
6636
  const { publicKeyHex: I, keyId: P } = E[0], w = `${b.providerOrigin}/api/auth/challenge`, m = new AbortController(), N = setTimeout(() => m.abort(), 1e4);
6589
6637
  let L;
6590
6638
  try {
6591
- e(), Date.now() >= ln(d.expiresAt) && Se("TRANSACTION_EXPIRED");
6639
+ e(), Date.now() >= cn(d.expiresAt) && Se("TRANSACTION_EXPIRED");
6592
6640
  const C = await globalThis.fetch(w, {
6593
6641
  method: "POST",
6594
6642
  credentials: "omit",
@@ -6628,23 +6676,23 @@ async function Nd({ assertCurrent: e, binding: r, capabilities: t, handle: s, id
6628
6676
  clearTimeout(N);
6629
6677
  }
6630
6678
  const D = L.challenge.replace(/\+/gu, "-").replace(/\//gu, "_").replace(/=+$/u, "");
6631
- e(), (Date.now() >= ln(d.expiresAt) || L.expires_at * 1e3 <= Date.now()) && Se("TRANSACTION_EXPIRED");
6679
+ e(), (Date.now() >= cn(d.expiresAt) || L.expires_at * 1e3 <= Date.now()) && Se("TRANSACTION_EXPIRED");
6632
6680
  const U = await t.signSdnPublishRequest(s, {
6633
6681
  ...b,
6634
6682
  challengeId: L.challenge_id,
6635
6683
  challengeBase64url: D
6636
6684
  }, r.registryRow);
6637
- e(), (Date.now() >= ln(d.expiresAt) || L.expires_at * 1e3 <= Date.now()) && Se("TRANSACTION_EXPIRED");
6685
+ e(), (Date.now() >= cn(d.expiresAt) || L.expires_at * 1e3 <= Date.now()) && Se("TRANSACTION_EXPIRED");
6638
6686
  const M = ri(U, ["schemaVersion", "keyId", "identityScheme", "algorithm", "encoding", "signatureProfile", "publicKeyHex", "signatureHex", "requestDigestSha256"], "INVALID_WALLET_RESULT");
6639
- return (M.keyId !== P || M.publicKeyHex !== I) && Se("INVALID_WALLET_RESULT"), fs({ ...M, challengeId: L.challenge_id, challengeBase64url: D });
6687
+ return (M.keyId !== P || M.publicKeyHex !== I) && Se("INVALID_WALLET_RESULT"), us({ ...M, challengeId: L.challenge_id, challengeBase64url: D });
6640
6688
  }
6641
- function Ld({ binding: e, document: r, request: t }) {
6689
+ function Dd({ binding: e, document: r, request: t }) {
6642
6690
  const s = r.activeElement ?? null, a = r.createElement("section");
6643
- a.className = "wallet-confirmation", a.setAttribute?.("role", "dialog"), a.setAttribute?.("aria-modal", "true"), a.setAttribute?.("aria-labelledby", "wallet-confirmation-heading"), a.tabIndex = -1, Rd(a, { binding: e, document: r, request: t });
6691
+ a.className = "wallet-confirmation", a.setAttribute?.("role", "dialog"), a.setAttribute?.("aria-modal", "true"), a.setAttribute?.("aria-labelledby", "wallet-confirmation-heading"), a.tabIndex = -1, Td(a, { binding: e, document: r, request: t });
6644
6692
  const d = r.createElement("div");
6645
6693
  d.className = "wallet-confirmation-actions";
6646
6694
  const b = r.createElement("button");
6647
- b.type = "button", b.dataset.walletAction = "confirm", b.textContent = gs(e, t ?? {}).action;
6695
+ b.type = "button", b.dataset.walletAction = "confirm", b.textContent = ys(e, t ?? {}).action;
6648
6696
  const E = r.createElement("button");
6649
6697
  E.type = "button", E.dataset.walletAction = "cancel", E.textContent = "Cancel", d.append(b, E), a.append(d), r.body.append(a);
6650
6698
  let I = !1, P, w;
@@ -6690,7 +6738,7 @@ function Ld({ binding: e, document: r, request: t }) {
6690
6738
  }
6691
6739
  });
6692
6740
  }
6693
- async function Td({
6741
+ async function Cd({
6694
6742
  assertCurrent: e = () => {
6695
6743
  },
6696
6744
  binding: r,
@@ -6699,8 +6747,8 @@ async function Td({
6699
6747
  transaction: a,
6700
6748
  wasm: d
6701
6749
  }) {
6702
- const b = d?.sdn ?? d, E = ys[a.operation];
6703
- if ((!E || !b) && Se("OPERATION_NOT_ALLOWED"), E.publish) return Nd({ assertCurrent: e, binding: r, capabilities: b, handle: t, identity: s, transaction: a });
6750
+ const b = d?.sdn ?? d, E = ps[a.operation];
6751
+ if ((!E || !b) && Se("OPERATION_NOT_ALLOWED"), E.publish) return xd({ assertCurrent: e, binding: r, capabilities: b, handle: t, identity: s, transaction: a });
6704
6752
  if (E.connect)
6705
6753
  return E.buildResult({
6706
6754
  connectionExpiresAt: a.expiresAt,
@@ -6721,15 +6769,15 @@ async function Td({
6721
6769
  Se("INVALID_WALLET_RESULT");
6722
6770
  }
6723
6771
  }
6724
- function xd() {
6725
- return hs({
6772
+ function Ud() {
6773
+ return _s({
6726
6774
  connectionExpiresAt: null,
6727
6775
  event: "disconnected",
6728
6776
  identity: null,
6729
6777
  schemaVersion: 1
6730
6778
  });
6731
6779
  }
6732
- const ho = "webauthn-prf-hkdf-sha256-aes256gcm-v2", Dd = "sdn-bip32-slip10-purpose-v1", Cd = "password-scrypt-v2", Ud = Object.freeze([
6780
+ const ho = "webauthn-prf-hkdf-sha256-aes256gcm-v2", Fd = "sdn-bip32-slip10-purpose-v1", Md = "password-scrypt-v2", Bd = Object.freeze([
6733
6781
  "aad",
6734
6782
  "canonicalUsername",
6735
6783
  "ciphertextBase64url",
@@ -6740,40 +6788,40 @@ const ho = "webauthn-prf-hkdf-sha256-aes256gcm-v2", Dd = "sdn-bip32-slip10-purpo
6740
6788
  "prfInputBase64url",
6741
6789
  "schemaVersion",
6742
6790
  "storageProfile"
6743
- ]), Fd = Object.freeze([
6791
+ ]), Vd = Object.freeze([
6744
6792
  "credentialIdBase64url",
6745
6793
  "identityScheme",
6746
6794
  "schemaVersion",
6747
6795
  "seedProfile",
6748
6796
  "storageProfile",
6749
6797
  "usernameSha256"
6750
- ]), Md = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, Bd = /^[0-9a-f]{64}$/u, Vd = /^[A-Za-z0-9_-]+$/u, Hd = new TextEncoder(), st = "sdn.wallet.remembered.v2", Bt = `${st}.pending`, dn = 16 * 1024, vs = Object.freeze([
6798
+ ]), Hd = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/u, zd = /^[0-9a-f]{64}$/u, $d = /^[A-Za-z0-9_-]+$/u, Wd = new TextEncoder(), st = "sdn.wallet.remembered.v2", Bt = `${st}.pending`, ln = 16 * 1024, gs = Object.freeze([
6751
6799
  "wallet_storage_metadata",
6752
6800
  "wallet_storage_encrypted",
6753
6801
  "wallet_storage_passkey_credential",
6754
6802
  "encrypted_wallet",
6755
6803
  "passkey_credential",
6756
6804
  "passkey_wallet"
6757
- ]), bs = /* @__PURE__ */ new Set([
6805
+ ]), vs = /* @__PURE__ */ new Set([
6758
6806
  st,
6759
6807
  Bt,
6760
- ...vs
6808
+ ...gs
6761
6809
  ]), ii = /* @__PURE__ */ new WeakSet();
6762
- class jr extends Error {
6810
+ class Wr extends Error {
6763
6811
  constructor(r) {
6764
6812
  super(r), this.name = "WalletStorageError", this.code = r;
6765
6813
  }
6766
6814
  }
6767
6815
  function me(e) {
6768
- throw new jr(e);
6816
+ throw new Wr(e);
6769
6817
  }
6770
- function Es(e) {
6818
+ function bs(e) {
6771
6819
  if (!e || typeof e != "object" || Array.isArray(e)) return !1;
6772
6820
  const r = Object.getPrototypeOf(e);
6773
6821
  return r === Object.prototype || r === null;
6774
6822
  }
6775
6823
  function uo(e, r) {
6776
- Es(e) || me("INVALID_REMEMBERED_WALLET");
6824
+ bs(e) || me("INVALID_REMEMBERED_WALLET");
6777
6825
  let t;
6778
6826
  try {
6779
6827
  t = Reflect.ownKeys(e);
@@ -6795,7 +6843,7 @@ function uo(e, r) {
6795
6843
  }
6796
6844
  return d;
6797
6845
  }
6798
- function fo(e) {
6846
+ function Es(e) {
6799
6847
  if (typeof e != "string") return !1;
6800
6848
  for (let r = 0; r < e.length; r += 1) {
6801
6849
  const t = e.charCodeAt(r);
@@ -6807,14 +6855,19 @@ function fo(e) {
6807
6855
  }
6808
6856
  return !0;
6809
6857
  }
6810
- function zd(e) {
6858
+ function As(e) {
6859
+ if (!Es(e)) return !1;
6860
+ const r = Wd.encode(e).length;
6861
+ return r >= 3 && r <= 64 && !/[\u0000-\u001f\u007f-\u009f]/u.test(e) && !/^ | $/u.test(e) && !/[A-Z]/u.test(e);
6862
+ }
6863
+ function jd(e) {
6811
6864
  let r = "";
6812
6865
  for (let t = 0; t < e.length; t += 32768)
6813
6866
  r += String.fromCharCode(...e.subarray(t, t + 32768));
6814
6867
  return btoa(r).replace(/\+/gu, "-").replace(/\//gu, "_").replace(/=+$/u, "");
6815
6868
  }
6816
6869
  function Et(e, { minimum: r = 0, maximum: t = 65536, exact: s = null } = {}) {
6817
- (typeof e != "string" || e.length === 0 || !Vd.test(e)) && me("INVALID_REMEMBERED_WALLET");
6870
+ (typeof e != "string" || e.length === 0 || !$d.test(e)) && me("INVALID_REMEMBERED_WALLET");
6818
6871
  const a = e.length % 4;
6819
6872
  a === 1 && me("INVALID_REMEMBERED_WALLET");
6820
6873
  const d = e.replace(/-/gu, "+").replace(/_/gu, "/") + "=".repeat((4 - a) % 4);
@@ -6826,12 +6879,12 @@ function Et(e, { minimum: r = 0, maximum: t = 65536, exact: s = null } = {}) {
6826
6879
  }
6827
6880
  const E = new Uint8Array(b.length);
6828
6881
  for (let I = 0; I < b.length; I += 1) E[I] = b.charCodeAt(I);
6829
- return (zd(E) !== e || E.length < r || E.length > t || s !== null && E.length !== s) && me("INVALID_REMEMBERED_WALLET"), E;
6882
+ return (jd(E) !== e || E.length < r || E.length > t || s !== null && E.length !== s) && me("INVALID_REMEMBERED_WALLET"), E;
6830
6883
  }
6831
6884
  function Ei(e) {
6832
- return e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e) ? JSON.stringify(e) : (Es(e) || me("INVALID_REMEMBERED_WALLET"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${Ei(e[r])}`).join(",")}}`);
6885
+ return e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e) ? JSON.stringify(e) : (bs(e) || me("INVALID_REMEMBERED_WALLET"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${Ei(e[r])}`).join(",")}}`);
6833
6886
  }
6834
- function $d(e) {
6887
+ function qd(e) {
6835
6888
  return Object.freeze({
6836
6889
  aad: Object.freeze({ ...e.aad }),
6837
6890
  canonicalUsername: e.canonicalUsername,
@@ -6845,12 +6898,12 @@ function $d(e) {
6845
6898
  storageProfile: e.storageProfile
6846
6899
  });
6847
6900
  }
6848
- function As(e) {
6849
- const r = uo(e, Ud), t = uo(r.aad, Fd), s = fo(r.canonicalUsername) ? Hd.encode(r.canonicalUsername) : null;
6850
- return (r.schemaVersion !== 2 || r.storageProfile !== ho || t.schemaVersion !== 2 || t.storageProfile !== ho || t.identityScheme !== Dd || t.seedProfile !== Cd || !s || s.length < 3 || s.length > 64 || !/^[a-z0-9][a-z0-9._-]*$/u.test(r.canonicalUsername) || !Bd.test(t.usernameSha256) || r.credentialIdBase64url !== t.credentialIdBase64url || !fo(r.createdAt) || !Md.test(r.createdAt) || new Date(r.createdAt).toISOString() !== r.createdAt) && me("INVALID_REMEMBERED_WALLET"), Et(r.credentialIdBase64url, { minimum: 1, maximum: 1024 }), Et(r.ciphertextBase64url, { minimum: 17, maximum: 1024 }), Et(r.hkdfSaltBase64url, { exact: 32 }), Et(r.nonceBase64url, { exact: 12 }), Et(r.prfInputBase64url, { exact: 32 }), $d({ ...r, aad: t });
6901
+ function ms(e) {
6902
+ const r = uo(e, Bd), t = uo(r.aad, Vd);
6903
+ return (r.schemaVersion !== 2 || r.storageProfile !== ho || t.schemaVersion !== 2 || t.storageProfile !== ho || t.identityScheme !== Fd || t.seedProfile !== Md || !As(r.canonicalUsername) || !zd.test(t.usernameSha256) || r.credentialIdBase64url !== t.credentialIdBase64url || !Es(r.createdAt) || !Hd.test(r.createdAt) || new Date(r.createdAt).toISOString() !== r.createdAt) && me("INVALID_REMEMBERED_WALLET"), Et(r.credentialIdBase64url, { minimum: 1, maximum: 1024 }), Et(r.ciphertextBase64url, { minimum: 17, maximum: 1024 }), Et(r.hkdfSaltBase64url, { exact: 32 }), Et(r.nonceBase64url, { exact: 12 }), Et(r.prfInputBase64url, { exact: 32 }), qd({ ...r, aad: t });
6851
6904
  }
6852
- function Wd(e) {
6853
- return Ei(As(e));
6905
+ function Kd(e) {
6906
+ return Ei(ms(e));
6854
6907
  }
6855
6908
  function Ai(e) {
6856
6909
  (typeof e != "string" || e.length === 0 || e.length > 131072) && me("INVALID_REMEMBERED_WALLET");
@@ -6860,7 +6913,7 @@ function Ai(e) {
6860
6913
  } catch {
6861
6914
  me("INVALID_REMEMBERED_WALLET");
6862
6915
  }
6863
- const t = As(r);
6916
+ const t = ms(r);
6864
6917
  return Ei(t) !== e && me("INVALID_REMEMBERED_WALLET"), t;
6865
6918
  }
6866
6919
  function oi(e, r, { pending: t = !1 } = {}) {
@@ -6873,7 +6926,7 @@ function oi(e, r, { pending: t = !1 } = {}) {
6873
6926
  }
6874
6927
  if (s === null) return Object.freeze({ raw: null, record: null, status: "empty" });
6875
6928
  typeof s != "string" && me("STORAGE_UNAVAILABLE");
6876
- const a = s.length > dn;
6929
+ const a = s.length > ln;
6877
6930
  if (t || a)
6878
6931
  return Object.freeze({
6879
6932
  exportable: !a,
@@ -6901,7 +6954,7 @@ function oi(e, r, { pending: t = !1 } = {}) {
6901
6954
  });
6902
6955
  }
6903
6956
  }
6904
- function ms(e) {
6957
+ function Is(e) {
6905
6958
  const r = oi(e, Bt, { pending: !0 }), t = oi(e, st), s = r.status === "empty", a = t.status === "empty" || t.status === "valid";
6906
6959
  return Object.freeze({
6907
6960
  active: t,
@@ -6910,10 +6963,10 @@ function ms(e) {
6910
6963
  pending: r
6911
6964
  });
6912
6965
  }
6913
- function jd(e, r) {
6914
- const t = ms(e);
6966
+ function Yd(e, r) {
6967
+ const t = Is(e);
6915
6968
  t.canSetup || me("STORAGE_QUARANTINED");
6916
- const s = Wd(r);
6969
+ const s = Kd(r);
6917
6970
  try {
6918
6971
  e.setItem(Bt, s);
6919
6972
  } catch (b) {
@@ -6933,7 +6986,7 @@ function jd(e, r) {
6933
6986
  });
6934
6987
  return ii.add(d), d;
6935
6988
  }
6936
- function qd(e, r) {
6989
+ function Gd(e, r) {
6937
6990
  (!ii.has(r) || r.storage !== e) && me("INVALID_STORAGE_TRANSACTION"), ii.delete(r);
6938
6991
  let t, s;
6939
6992
  try {
@@ -6944,7 +6997,7 @@ function qd(e, r) {
6944
6997
  (t !== r.serialized || s !== r.previousActiveRaw) && me("STORAGE_COLLISION"), e.removeItem(Bt), e.getItem(Bt) !== null && me("STORAGE_WRITE_FAILED"), e.setItem(st, r.serialized);
6945
6998
  }
6946
6999
  function mi(e, r) {
6947
- bs.has(r) || me("INVALID_STORAGE_KEY"), (!e || typeof e.getItem != "function") && me("STORAGE_UNAVAILABLE");
7000
+ vs.has(r) || me("INVALID_STORAGE_KEY"), (!e || typeof e.getItem != "function") && me("STORAGE_UNAVAILABLE");
6948
7001
  let t;
6949
7002
  try {
6950
7003
  t = e.getItem(r);
@@ -6952,21 +7005,21 @@ function mi(e, r) {
6952
7005
  me("STORAGE_UNAVAILABLE");
6953
7006
  }
6954
7007
  if (t === null) return null;
6955
- if (typeof t != "string" && me("STORAGE_UNAVAILABLE"), r === st && t.length <= dn)
7008
+ if (typeof t != "string" && me("STORAGE_UNAVAILABLE"), r === st && t.length <= ln)
6956
7009
  try {
6957
7010
  Ai(t), me("NOT_QUARANTINED");
6958
7011
  } catch (s) {
6959
- if (s instanceof jr && s.code === "NOT_QUARANTINED") throw s;
7012
+ if (s instanceof Wr && s.code === "NOT_QUARANTINED") throw s;
6960
7013
  }
6961
7014
  return Object.freeze({
6962
- exportable: t.length <= dn,
7015
+ exportable: t.length <= ln,
6963
7016
  key: r,
6964
- oversized: t.length > dn,
7017
+ oversized: t.length > ln,
6965
7018
  raw: t,
6966
7019
  rawLength: t.length
6967
7020
  });
6968
7021
  }
6969
- function Kd(e) {
7022
+ function Xd(e) {
6970
7023
  return Object.freeze({
6971
7024
  exportable: e.exportable,
6972
7025
  key: e.key,
@@ -6974,52 +7027,52 @@ function Kd(e) {
6974
7027
  rawLength: e.rawLength
6975
7028
  });
6976
7029
  }
6977
- function Yd(e) {
7030
+ function Jd(e) {
6978
7031
  const r = [];
6979
7032
  for (const t of [
6980
7033
  st,
6981
7034
  Bt,
6982
- ...vs
7035
+ ...gs
6983
7036
  ]) {
6984
7037
  let s;
6985
7038
  try {
6986
7039
  s = mi(e, t);
6987
7040
  } catch (a) {
6988
- if (a instanceof jr && a.code === "NOT_QUARANTINED") continue;
7041
+ if (a instanceof Wr && a.code === "NOT_QUARANTINED") continue;
6989
7042
  throw a;
6990
7043
  }
6991
- s && r.push(Kd(s));
7044
+ s && r.push(Xd(s));
6992
7045
  }
6993
7046
  return Object.freeze(r);
6994
7047
  }
6995
- function Gd(e, r) {
7048
+ function Qd(e, r) {
6996
7049
  const t = mi(e, r);
6997
7050
  return t || me("QUARANTINE_NOT_FOUND"), t.exportable || me("QUARANTINE_EXPORT_TOO_LARGE"), t.raw;
6998
7051
  }
6999
- function Xd(e, r, t) {
7000
- bs.has(r) || me("INVALID_STORAGE_KEY"), t !== r && me("CONFIRMATION_REQUIRED"), mi(e, r) || me("QUARANTINE_NOT_FOUND");
7052
+ function Zd(e, r, t) {
7053
+ vs.has(r) || me("INVALID_STORAGE_KEY"), t !== r && me("CONFIRMATION_REQUIRED"), mi(e, r) || me("QUARANTINE_NOT_FOUND");
7001
7054
  try {
7002
7055
  e.removeItem(r), e.getItem(r) !== null && me("STORAGE_WRITE_FAILED");
7003
7056
  } catch (a) {
7004
- if (a instanceof jr) throw a;
7057
+ if (a instanceof Wr) throw a;
7005
7058
  me("STORAGE_UNAVAILABLE");
7006
7059
  }
7007
7060
  }
7008
- function Jd(e, r) {
7061
+ function e_(e, r) {
7009
7062
  r !== st && me("CONFIRMATION_REQUIRED");
7010
7063
  const t = oi(e, st);
7011
7064
  t.status === "empty" && me("REMEMBER_UNAVAILABLE"), t.status !== "valid" && me("STORAGE_QUARANTINED");
7012
7065
  try {
7013
7066
  e.removeItem(st), e.getItem(st) !== null && me("STORAGE_WRITE_FAILED");
7014
7067
  } catch (s) {
7015
- if (s instanceof jr) throw s;
7068
+ if (s instanceof Wr) throw s;
7016
7069
  me("STORAGE_UNAVAILABLE");
7017
7070
  }
7018
7071
  }
7019
- const bn = "sdn-bip32-slip10-purpose-v1", En = "password-scrypt-v2", si = "m/44'/0'/0'/2'/0'", Ii = "Approval unavailable — migrate to the new wallet profile", po = Object.freeze({
7072
+ const bn = "sdn-bip32-slip10-purpose-v1", En = "password-scrypt-v2", si = "m/44'/0'/0'/2'/0'", Ii = "Approval unavailable — migrate to the new wallet profile", fo = Object.freeze({
7020
7073
  "bip39-mnemonic-v1-legacy": "sdn-bip39-auth-v1-legacy",
7021
7074
  "password-fast-v1-legacy": "sdn-fast-password-auth-v1-legacy"
7022
- }), yo = new TextEncoder(), Qd = Uint8Array.prototype.fill, wi = Object.freeze([
7075
+ }), po = new TextEncoder(), t_ = Uint8Array.prototype.fill, wi = Object.freeze([
7023
7076
  "accountFingerprint",
7024
7077
  "accountIndex",
7025
7078
  "accountLabel",
@@ -7061,18 +7114,18 @@ const bn = "sdn-bip32-slip10-purpose-v1", En = "password-scrypt-v2", si = "m/44'
7061
7114
  signatureProfile: "ed25519-over-sha256-jcs-v1"
7062
7115
  })
7063
7116
  ]);
7064
- class Is extends Error {
7117
+ class ws extends Error {
7065
7118
  constructor(r) {
7066
7119
  super(r === "APPROVAL_UNAVAILABLE" ? Ii : r), this.name = "WalletAccountError", this.code = r;
7067
7120
  }
7068
7121
  }
7069
7122
  function Fe(e) {
7070
- throw new Is(e);
7123
+ throw new ws(e);
7071
7124
  }
7072
- function go(e) {
7125
+ function yo(e) {
7073
7126
  if (e instanceof Uint8Array)
7074
7127
  try {
7075
- Qd.call(e, 0);
7128
+ t_.call(e, 0);
7076
7129
  } catch {
7077
7130
  }
7078
7131
  }
@@ -7083,13 +7136,13 @@ function Jt(e) {
7083
7136
  for (const t of Object.keys(e).sort()) r[t] = Jt(e[t]);
7084
7137
  return Object.freeze(r);
7085
7138
  }
7086
- function Zd(e) {
7139
+ function r_(e) {
7087
7140
  if (!e || typeof e != "object" || Array.isArray(e)) return !1;
7088
7141
  const r = Object.getPrototypeOf(e);
7089
7142
  return r === Object.prototype || r === null;
7090
7143
  }
7091
7144
  function mn(e, r) {
7092
- Zd(e) || Fe("INVALID_PUBLIC_IDENTITY");
7145
+ r_(e) || Fe("INVALID_PUBLIC_IDENTITY");
7093
7146
  let t;
7094
7147
  try {
7095
7148
  t = Reflect.ownKeys(e);
@@ -7122,7 +7175,7 @@ function sr(e) {
7122
7175
  }
7123
7176
  return !0;
7124
7177
  }
7125
- function e_(e) {
7178
+ function n_(e) {
7126
7179
  if (!Array.isArray(e) || Object.getPrototypeOf(e) !== Array.prototype || e.length !== An.length) return !1;
7127
7180
  let r;
7128
7181
  try {
@@ -7138,7 +7191,7 @@ function e_(e) {
7138
7191
  }
7139
7192
  return !0;
7140
7193
  }
7141
- function t_(e) {
7194
+ function i_(e) {
7142
7195
  if (!Array.isArray(e) || Object.getPrototypeOf(e) !== Array.prototype || e.length !== 1) return !1;
7143
7196
  let r;
7144
7197
  try {
@@ -7152,22 +7205,22 @@ function t_(e) {
7152
7205
  }
7153
7206
  function ft(e) {
7154
7207
  const r = mn(e, wi);
7155
- (r.schemaVersion !== 1 || r.identityScheme !== bn || r.seedProfile !== En || r.accountIndex !== 0 || r.accountLabel !== null || !/^[0-9a-f]{8}$/u.test(r.accountFingerprint) || !sr(r.accountXpub) || !/^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(r.accountXpub) || !sr(r.accountPeerId) || !/^16Uiu2H[1-9A-HJ-NP-Za-km-z]{33,57}$/u.test(r.accountPeerId) || !e_(r.keys)) && Fe("INVALID_PUBLIC_IDENTITY");
7208
+ (r.schemaVersion !== 1 || r.identityScheme !== bn || r.seedProfile !== En || r.accountIndex !== 0 || r.accountLabel !== null || !/^[0-9a-f]{8}$/u.test(r.accountFingerprint) || !sr(r.accountXpub) || !/^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(r.accountXpub) || !sr(r.accountPeerId) || !/^16Uiu2H[1-9A-HJ-NP-Za-km-z]{33,57}$/u.test(r.accountPeerId) || !n_(r.keys)) && Fe("INVALID_PUBLIC_IDENTITY");
7156
7209
  const t = An.map((s, a) => {
7157
7210
  const d = mn(r.keys[a], Si);
7158
7211
  return (d.bip32Fingerprint !== null || d.curve !== s.curve || d.derivation !== "slip10" || d.encoding !== "raw" || d.identityScheme !== bn || d.path !== s.path || d.purpose !== s.purpose || d.seedProfile !== En || d.signatureProfile !== s.signatureProfile || !/^[0-9a-f]{64}$/u.test(d.publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(d.keyId)) && Fe("INVALID_PUBLIC_IDENTITY"), Jt(d);
7159
7212
  });
7160
7213
  return Jt({ ...r, keys: t });
7161
7214
  }
7162
- function r_(e, { accountIndex: r = 0, profile: t } = {}) {
7163
- const s = Object.hasOwn(po, t) ? po[t] : null;
7215
+ function o_(e, { accountIndex: r = 0, profile: t } = {}) {
7216
+ const s = Object.hasOwn(fo, t) ? fo[t] : null;
7164
7217
  (!s || r !== 0) && Fe("INVALID_LEGACY_PROFILE");
7165
7218
  const a = mn(e, wi);
7166
- (a.schemaVersion !== 1 || a.identityScheme !== s || a.seedProfile !== t || a.accountIndex !== r || a.accountLabel !== null || !/^[0-9a-f]{8}$/u.test(a.accountFingerprint) || !sr(a.accountXpub) || !/^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(a.accountXpub) || !sr(a.accountPeerId) || !/^16Uiu2H[1-9A-HJ-NP-Za-km-z]{33,57}$/u.test(a.accountPeerId) || !t_(a.keys)) && Fe("INVALID_PUBLIC_IDENTITY");
7219
+ (a.schemaVersion !== 1 || a.identityScheme !== s || a.seedProfile !== t || a.accountIndex !== r || a.accountLabel !== null || !/^[0-9a-f]{8}$/u.test(a.accountFingerprint) || !sr(a.accountXpub) || !/^xpub[1-9A-HJ-NP-Za-km-z]{107}$/u.test(a.accountXpub) || !sr(a.accountPeerId) || !/^16Uiu2H[1-9A-HJ-NP-Za-km-z]{33,57}$/u.test(a.accountPeerId) || !i_(a.keys)) && Fe("INVALID_PUBLIC_IDENTITY");
7167
7220
  const d = mn(a.keys[0], Si);
7168
7221
  return (d.bip32Fingerprint !== null || d.curve !== "ed25519" || d.derivation !== "bip32-scalar-as-ed25519-seed" || d.encoding !== "raw" || d.identityScheme !== s || d.path !== `m/44'/0'/${r}'/0/0` || d.purpose !== "sdn-authentication" || d.seedProfile !== t || d.signatureProfile !== "ed25519-raw-32-v1" || !/^[0-9a-f]{64}$/u.test(d.publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(d.keyId)) && Fe("INVALID_PUBLIC_IDENTITY"), Jt({ ...a, keys: [d] });
7169
7222
  }
7170
- function vo(e) {
7223
+ function go(e) {
7171
7224
  if (!(!e || typeof e != "object")) {
7172
7225
  try {
7173
7226
  e.value = "";
@@ -7203,7 +7256,7 @@ function vo(e) {
7203
7256
  }
7204
7257
  }
7205
7258
  }
7206
- function bo(e, r) {
7259
+ function vo(e, r) {
7207
7260
  if (typeof e != "string" || typeof r != "string") return !1;
7208
7261
  const t = Math.max(e.length, r.length);
7209
7262
  let s = e.length ^ r.length;
@@ -7213,7 +7266,7 @@ function bo(e, r) {
7213
7266
  }
7214
7267
  return s === 0;
7215
7268
  }
7216
- function n_(e) {
7269
+ function s_(e) {
7217
7270
  return !e || typeof e != "object" || !Array.isArray(e.keys) ? null : e.keys.find((r) => r?.purpose === "asset-review-approval") ?? null;
7218
7271
  }
7219
7272
  function $n(e, r) {
@@ -7229,7 +7282,7 @@ function $n(e, r) {
7229
7282
  const a = e.keys[s], d = r.keys[s];
7230
7283
  for (const b of Si.filter((E) => E !== "publicKeyHex" && E !== "keyId"))
7231
7284
  t = a[b] === d[b] && t;
7232
- t = bo(a.publicKeyHex, d.publicKeyHex) && t, t = bo(a.keyId.slice(7), d.keyId.slice(7)) && t;
7285
+ t = vo(a.publicKeyHex, d.publicKeyHex) && t, t = vo(a.keyId.slice(7), d.keyId.slice(7)) && t;
7233
7286
  }
7234
7287
  return t;
7235
7288
  }
@@ -7241,9 +7294,9 @@ function nr(e, r, t, s) {
7241
7294
  const b = e.createElement("span");
7242
7295
  b.textContent = s == null ? "" : String(s), a.append(d, b), r.append(a);
7243
7296
  }
7244
- function ws(e) {
7297
+ function Ss(e) {
7245
7298
  (e?.identityScheme !== bn || e?.seedProfile !== En || e?.accountIndex !== 0) && Fe("APPROVAL_UNAVAILABLE");
7246
- const r = n_(e);
7299
+ const r = s_(e);
7247
7300
  return (!r || r.identityScheme !== e.identityScheme || r.seedProfile !== e.seedProfile || r.signatureProfile !== "ed25519-over-sha256-jcs-v1" || r.curve !== "ed25519" || r.derivation !== "slip10" || r.path !== si || r.encoding !== "raw" || !/^[0-9a-f]{64}$/u.test(r.publicKeyHex) || !/^sha256:[0-9a-f]{64}$/u.test(r.keyId)) && Fe("APPROVAL_UNAVAILABLE"), Jt({
7248
7301
  algorithm: "Ed25519",
7249
7302
  derivationPath: si,
@@ -7257,20 +7310,20 @@ function ws(e) {
7257
7310
  signatureProfile: "ed25519-over-sha256-jcs-v1"
7258
7311
  });
7259
7312
  }
7260
- function i_(e) {
7313
+ function a_(e) {
7261
7314
  return JSON.stringify(e, null, 2);
7262
7315
  }
7263
- function o_(e, r, { document: t = e.ownerDocument } = {}) {
7316
+ function c_(e, r, { document: t = e.ownerDocument } = {}) {
7264
7317
  e.replaceChildren();
7265
7318
  const s = t.createElement("h1");
7266
7319
  if (s.textContent = "Account", e.append(s), nr(t, e, "Username / account", r?.accountLabel ?? "account 0"), nr(t, e, "Account xpub", r?.accountXpub), nr(t, e, "Peer ID", r?.accountPeerId), nr(t, e, "Fingerprint", r?.accountFingerprint), r?.identityScheme !== bn || r?.seedProfile !== En) {
7267
7320
  const d = t.createElement("p");
7268
7321
  return d.textContent = Ii, e.append(d), Object.freeze({ approvalAvailable: !1 });
7269
7322
  }
7270
- const a = ws(r);
7323
+ const a = Ss(r);
7271
7324
  return nr(t, e, "Asset approval public key", a.publicKeyHex), nr(t, e, "Asset approval key ID", a.keyId), Object.freeze({ approvalAvailable: !0, configuration: a });
7272
7325
  }
7273
- function s_(e, { document: r = e.ownerDocument } = {}) {
7326
+ function l_(e, { document: r = e.ownerDocument } = {}) {
7274
7327
  e.replaceChildren();
7275
7328
  const t = r.createElement("h2");
7276
7329
  t.textContent = "Stored wallet";
@@ -7299,7 +7352,7 @@ function s_(e, { document: r = e.ownerDocument } = {}) {
7299
7352
  status: w
7300
7353
  });
7301
7354
  }
7302
- function a_(e, r, { document: t = e.ownerDocument } = {}) {
7355
+ function d_(e, r, { document: t = e.ownerDocument } = {}) {
7303
7356
  e.replaceChildren();
7304
7357
  const s = t.createElement("h2");
7305
7358
  s.textContent = "Quarantined wallet storage";
@@ -7340,14 +7393,14 @@ function a_(e, r, { document: t = e.ownerDocument } = {}) {
7340
7393
  }
7341
7394
  return e.append(s, a, d, b), Object.freeze({ rows: Object.freeze(E), status: b });
7342
7395
  }
7343
- async function c_(e, {
7396
+ async function __(e, {
7344
7397
  assertCurrent: r = () => {
7345
7398
  },
7346
7399
  clipboard: t = globalThis.navigator?.clipboard,
7347
7400
  container: s,
7348
7401
  document: a = s?.ownerDocument
7349
7402
  }) {
7350
- const d = i_(e);
7403
+ const d = a_(e);
7351
7404
  let b = !1;
7352
7405
  try {
7353
7406
  if (!t?.writeText) throw new Error("clipboard unavailable");
@@ -7364,7 +7417,7 @@ async function c_(e, {
7364
7417
  }
7365
7418
  return b;
7366
7419
  }
7367
- async function Eo(e, r, t, {
7420
+ async function bo(e, r, t, {
7368
7421
  assertCurrent: s,
7369
7422
  ownBuffer: a,
7370
7423
  ownHandle: d,
@@ -7375,9 +7428,9 @@ async function Eo(e, r, t, {
7375
7428
  try {
7376
7429
  s();
7377
7430
  const L = I?.value, D = P?.value;
7378
- (typeof L != "string" || typeof D != "string") && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), (!sr(L) || !sr(D)) && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), w = yo.encode(L), a(w), m = yo.encode(D), a(m);
7431
+ (typeof L != "string" || typeof D != "string") && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), (!sr(L) || !sr(D)) && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), w = po.encode(L), a(w), m = po.encode(D), a(m);
7379
7432
  } finally {
7380
- vo(I), vo(P);
7433
+ go(I), go(P);
7381
7434
  const L = I?.form, D = P?.form;
7382
7435
  try {
7383
7436
  (L?.parentNode ?? L)?.remove?.();
@@ -7407,7 +7460,7 @@ async function Eo(e, r, t, {
7407
7460
  b(w), b(m);
7408
7461
  }
7409
7462
  }
7410
- class l_ {
7463
+ class h_ {
7411
7464
  #r = null;
7412
7465
  #c;
7413
7466
  #_ = !1;
@@ -7448,12 +7501,12 @@ class l_ {
7448
7501
  ownBuffer: (b) => this.#o.add(b),
7449
7502
  ownHandle: (b) => this.#n.add(b),
7450
7503
  releaseBuffer: (b) => {
7451
- go(b), this.#o.delete(b);
7504
+ yo(b), this.#o.delete(b);
7452
7505
  }
7453
7506
  };
7454
- return t = await Eo(this.#t, this.#c, 1, d), this.#w(t.handle) || Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), t.handle = null, this.#p(r), s = await Eo(this.#t, this.#c, 2, d), this.#w(s.handle) || Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), s.handle = null, this.#p(r), (!$n(t.identity, s.identity) || this.#f !== null && (!$n(t.identity, this.#f) || !$n(s.identity, this.#f))) && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), this.#n.size !== 0 && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), this.#r = ws(s.identity), this.#r;
7507
+ return t = await bo(this.#t, this.#c, 1, d), this.#w(t.handle) || Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), t.handle = null, this.#p(r), s = await bo(this.#t, this.#c, 2, d), this.#w(s.handle) || Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), s.handle = null, this.#p(r), (!$n(t.identity, s.identity) || this.#f !== null && (!$n(t.identity, this.#f) || !$n(s.identity, this.#f))) && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), this.#n.size !== 0 && Fe("CREDENTIAL_CONFIRMATION_MISMATCH"), this.#r = Ss(s.identity), this.#r;
7455
7508
  } catch (a) {
7456
- if (this.#r = null, a instanceof Is && a.code === "CREDENTIAL_CONFIRMATION_MISMATCH") throw a;
7509
+ if (this.#r = null, a instanceof ws && a.code === "CREDENTIAL_CONFIRMATION_MISMATCH") throw a;
7457
7510
  Fe("CREDENTIAL_CONFIRMATION_MISMATCH");
7458
7511
  } finally {
7459
7512
  this.#a(), this.#S(), this.#e -= 1;
@@ -7480,10 +7533,10 @@ class l_ {
7480
7533
  #a() {
7481
7534
  const r = [...this.#o];
7482
7535
  this.#o.clear();
7483
- for (const t of r) go(t);
7536
+ for (const t of r) yo(t);
7484
7537
  }
7485
7538
  }
7486
- async function d_({
7539
+ async function u_({
7487
7540
  wasm: e,
7488
7541
  profile: r,
7489
7542
  operation: t,
@@ -7503,7 +7556,7 @@ async function d_({
7503
7556
  legacy: !0
7504
7557
  });
7505
7558
  }
7506
- function __(e, { document: r = e.ownerDocument } = {}) {
7559
+ function f_(e, { document: r = e.ownerDocument } = {}) {
7507
7560
  e.replaceChildren();
7508
7561
  const t = r.createElement("h2");
7509
7562
  t.textContent = "Migrate legacy wallet";
@@ -7523,37 +7576,37 @@ function __(e, { document: r = e.ownerDocument } = {}) {
7523
7576
  const b = r.createElement("div");
7524
7577
  return b.className = "wallet-legacy-comparison", e.append(t, s, a, d, b), Object.freeze({ launch: d, result: b, select: a });
7525
7578
  }
7526
- const In = Uint8Array, Ss = ArrayBuffer, ki = Object.getPrototypeOf(In.prototype), h_ = Object.getOwnPropertyDescriptor(ki, "buffer").get, u_ = Object.getOwnPropertyDescriptor(ki, "byteLength").get, f_ = Object.getOwnPropertyDescriptor(ki, "byteOffset").get, p_ = Object.getOwnPropertyDescriptor(Ss.prototype, "byteLength").get;
7527
- class y_ extends Error {
7579
+ const In = Uint8Array, ks = ArrayBuffer, ki = Object.getPrototypeOf(In.prototype), p_ = Object.getOwnPropertyDescriptor(ki, "buffer").get, y_ = Object.getOwnPropertyDescriptor(ki, "byteLength").get, g_ = Object.getOwnPropertyDescriptor(ki, "byteOffset").get, v_ = Object.getOwnPropertyDescriptor(ks.prototype, "byteLength").get;
7580
+ class b_ extends Error {
7528
7581
  constructor(r = "RNG_FAILURE") {
7529
7582
  super(r), this.name = "WalletRandomError", this.code = r;
7530
7583
  }
7531
7584
  }
7532
7585
  function Ft() {
7533
- throw new y_();
7586
+ throw new b_();
7534
7587
  }
7535
- function g_(e) {
7588
+ function E_(e) {
7536
7589
  if (!(e instanceof In) || Object.getPrototypeOf(e) !== In.prototype) return null;
7537
7590
  let r, t, s;
7538
7591
  try {
7539
- r = Reflect.apply(h_, e, []), t = Reflect.apply(u_, e, []), s = Reflect.apply(f_, e, []);
7592
+ r = Reflect.apply(p_, e, []), t = Reflect.apply(y_, e, []), s = Reflect.apply(g_, e, []);
7540
7593
  } catch {
7541
7594
  return null;
7542
7595
  }
7543
7596
  let a;
7544
7597
  try {
7545
- a = Reflect.apply(p_, r, []);
7598
+ a = Reflect.apply(v_, r, []);
7546
7599
  } catch {
7547
7600
  return null;
7548
7601
  }
7549
- return Object.getPrototypeOf(r) !== Ss.prototype || s !== 0 || t !== a || t !== 12 && t !== 32 ? null : r;
7602
+ return Object.getPrototypeOf(r) !== ks.prototype || s !== 0 || t !== a || t !== 12 && t !== 32 ? null : r;
7550
7603
  }
7551
- function v_({ getRandomValues: e, observedWrite: r } = {}) {
7604
+ function A_({ getRandomValues: e, observedWrite: r } = {}) {
7552
7605
  if (typeof e != "function")
7553
7606
  return () => Ft();
7554
7607
  const t = /* @__PURE__ */ new WeakSet(), s = /* @__PURE__ */ new WeakSet();
7555
7608
  return function(d) {
7556
- const b = g_(d);
7609
+ const b = E_(d);
7557
7610
  (!b || t.has(d) || s.has(b)) && Ft(), t.add(d), s.add(b);
7558
7611
  let E;
7559
7612
  try {
@@ -7579,32 +7632,32 @@ function ir(e, r) {
7579
7632
  const t = new In(r);
7580
7633
  return e(t);
7581
7634
  }
7582
- const Br = new TextEncoder(), b_ = new TextDecoder("utf-8", { fatal: !0 }), E_ = Uint8Array.prototype.fill, A_ = Uint8Array.prototype.slice, m_ = Uint8Array.prototype.subarray, Oi = Object.getPrototypeOf(Uint8Array.prototype), I_ = Object.getOwnPropertyDescriptor(Oi, "buffer").get, ks = Object.getOwnPropertyDescriptor(Oi, "byteLength").get, w_ = Object.getOwnPropertyDescriptor(Oi, "byteOffset").get, Os = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get, S_ = ArrayBuffer.prototype.slice, Ao = "webauthn-prf-hkdf-sha256-aes256gcm-v2", k_ = "sdn-bip32-slip10-purpose-v1", O_ = "password-scrypt-v2", P_ = "Space Data Network Wallet", Ps = 12e4;
7583
- class R_ extends Error {
7635
+ const dn = new TextEncoder(), m_ = new TextDecoder("utf-8", { fatal: !0 }), I_ = Uint8Array.prototype.fill, w_ = Uint8Array.prototype.slice, S_ = Uint8Array.prototype.subarray, Oi = Object.getPrototypeOf(Uint8Array.prototype), k_ = Object.getOwnPropertyDescriptor(Oi, "buffer").get, Os = Object.getOwnPropertyDescriptor(Oi, "byteLength").get, O_ = Object.getOwnPropertyDescriptor(Oi, "byteOffset").get, Ps = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get, P_ = ArrayBuffer.prototype.slice, Eo = "webauthn-prf-hkdf-sha256-aes256gcm-v2", R_ = "sdn-bip32-slip10-purpose-v1", N_ = "password-scrypt-v2", L_ = "Space Data Network Wallet", Rs = 12e4;
7636
+ class T_ extends Error {
7584
7637
  constructor(r) {
7585
7638
  super(r), this.name = "RememberedWalletError", this.code = r;
7586
7639
  }
7587
7640
  }
7588
7641
  function we(e) {
7589
- throw new R_(e);
7642
+ throw new T_(e);
7590
7643
  }
7591
- function mo(e) {
7644
+ function Ao(e) {
7592
7645
  if (typeof e != "string") return "";
7593
7646
  const r = e.trim().toLowerCase();
7594
7647
  return r.endsWith(".") ? r.slice(0, -1) : r;
7595
7648
  }
7596
- function N_(e, r) {
7649
+ function x_(e, r) {
7597
7650
  if (e == null || e === "") return;
7598
- const t = mo(e);
7651
+ const t = Ao(e);
7599
7652
  t === "" && we("INVALID_RP_ID");
7600
- const s = mo(r);
7653
+ const s = Ao(r);
7601
7654
  if (s === "" || t === s || s.endsWith(`.${t}`)) return t;
7602
7655
  we("INVALID_RP_ID");
7603
7656
  }
7604
7657
  function Ne(e) {
7605
7658
  if (e instanceof Uint8Array)
7606
7659
  try {
7607
- E_.call(e, 0);
7660
+ I_.call(e, 0);
7608
7661
  } catch {
7609
7662
  }
7610
7663
  }
@@ -7613,7 +7666,7 @@ function wn(e) {
7613
7666
  const r = Object.getPrototypeOf(e);
7614
7667
  return r === Object.prototype || r === null;
7615
7668
  }
7616
- function Rs(e, r) {
7669
+ function Ns(e, r) {
7617
7670
  if (!wn(e)) return !1;
7618
7671
  let t;
7619
7672
  try {
@@ -7625,8 +7678,8 @@ function Rs(e, r) {
7625
7678
  const s = [...t].sort(), a = [...r].sort();
7626
7679
  return s.length === a.length && s.every((d, b) => d === a[b]);
7627
7680
  }
7628
- function Vr(e, r) {
7629
- if (!Rs(e, r)) return null;
7681
+ function Br(e, r) {
7682
+ if (!Ns(e, r)) return null;
7630
7683
  const t = {};
7631
7684
  for (const s of r) {
7632
7685
  let a;
@@ -7646,18 +7699,18 @@ function _n(e, r = null) {
7646
7699
  return !1;
7647
7700
  let t, s, a, d;
7648
7701
  try {
7649
- t = Reflect.apply(I_, e, []), s = Reflect.apply(ks, e, []), a = Reflect.apply(w_, e, []), d = Reflect.apply(Os, t, []);
7702
+ t = Reflect.apply(k_, e, []), s = Reflect.apply(Os, e, []), a = Reflect.apply(O_, e, []), d = Reflect.apply(Ps, t, []);
7650
7703
  } catch {
7651
7704
  return !1;
7652
7705
  }
7653
7706
  return Object.getPrototypeOf(t) === ArrayBuffer.prototype && a === 0 && s === d && (r === null || s === r);
7654
7707
  }
7655
- function Ns(e, r, t) {
7708
+ function Ls(e, r, t) {
7656
7709
  if (!(e instanceof ArrayBuffer) || Object.getPrototypeOf(e) !== ArrayBuffer.prototype)
7657
7710
  return !1;
7658
7711
  let s;
7659
7712
  try {
7660
- s = Reflect.apply(Os, e, []);
7713
+ s = Reflect.apply(Ps, e, []);
7661
7714
  } catch {
7662
7715
  return !1;
7663
7716
  }
@@ -7665,7 +7718,7 @@ function Ns(e, r, t) {
7665
7718
  }
7666
7719
  function Gt(e) {
7667
7720
  try {
7668
- return Reflect.apply(ks, e, []);
7721
+ return Reflect.apply(Os, e, []);
7669
7722
  } catch {
7670
7723
  return -1;
7671
7724
  }
@@ -7676,13 +7729,13 @@ function Ar(e) {
7676
7729
  t < 0 && we("INVALID_REMEMBERED_WALLET");
7677
7730
  for (let s = 0; s < t; s += 32768)
7678
7731
  r += String.fromCharCode(...Reflect.apply(
7679
- m_,
7732
+ S_,
7680
7733
  e,
7681
7734
  [s, s + 32768]
7682
7735
  ));
7683
7736
  return btoa(r).replace(/\+/gu, "-").replace(/\//gu, "_").replace(/=+$/u, "");
7684
7737
  }
7685
- function L_(e) {
7738
+ function D_(e) {
7686
7739
  let r = "";
7687
7740
  for (const t of e) r += t.toString(16).padStart(2, "0");
7688
7741
  return r;
@@ -7690,7 +7743,7 @@ function L_(e) {
7690
7743
  function ar(e) {
7691
7744
  return e === null || typeof e == "boolean" || typeof e == "string" || typeof e == "number" && Number.isFinite(e) ? JSON.stringify(e) : Array.isArray(e) ? `[${e.map(ar).join(",")}]` : (wn(e) || we("INVALID_REMEMBERED_WALLET"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${ar(e[r])}`).join(",")}}`);
7692
7745
  }
7693
- function T_(e, r) {
7746
+ function C_(e, r) {
7694
7747
  if (!(e instanceof Uint8Array) || !(r instanceof Uint8Array)) return !1;
7695
7748
  const t = Gt(e), s = Gt(r);
7696
7749
  if (t < 0 || s < 0) return !1;
@@ -7700,10 +7753,10 @@ function T_(e, r) {
7700
7753
  d |= (e[b] ?? 0) ^ (r[b] ?? 0);
7701
7754
  return d === 0;
7702
7755
  }
7703
- function x_(e, r) {
7756
+ function U_(e, r) {
7704
7757
  return ar(e) === ar(r);
7705
7758
  }
7706
- function Ls(e) {
7759
+ function Ts(e) {
7707
7760
  (!e || typeof e != "object" && typeof e != "function") && we("WEBAUTHN_INVALID_RESPONSE");
7708
7761
  let r, t, s;
7709
7762
  try {
@@ -7711,8 +7764,8 @@ function Ls(e) {
7711
7764
  } catch {
7712
7765
  we("WEBAUTHN_INVALID_RESPONSE");
7713
7766
  }
7714
- return (r !== "public-key" || !Ns(t, 1, 1024) || typeof s != "function") && we("WEBAUTHN_INVALID_RESPONSE"), Object.freeze({
7715
- rawId: new Uint8Array(Reflect.apply(S_, t, [0])),
7767
+ return (r !== "public-key" || !Ls(t, 1, 1024) || typeof s != "function") && we("WEBAUTHN_INVALID_RESPONSE"), Object.freeze({
7768
+ rawId: new Uint8Array(Reflect.apply(P_, t, [0])),
7716
7769
  readExtensionResults() {
7717
7770
  try {
7718
7771
  return Reflect.apply(s, e, []);
@@ -7722,19 +7775,19 @@ function Ls(e) {
7722
7775
  }
7723
7776
  });
7724
7777
  }
7725
- function D_(e) {
7726
- const r = Vr(e.readExtensionResults(), ["prf"]), t = r ? Vr(r.prf, ["enabled"]) : null;
7778
+ function F_(e) {
7779
+ const r = Br(e.readExtensionResults(), ["prf"]), t = r ? Br(r.prf, ["enabled"]) : null;
7727
7780
  (!t || t.enabled !== !0) && we("WEBAUTHN_PRF_REQUIRED");
7728
7781
  }
7729
- function C_(e, r) {
7730
- const t = Ls(e), s = t.rawId;
7731
- T_(s, r) || (Ne(s), we("WEBAUTHN_CREDENTIAL_MISMATCH")), Ne(s);
7732
- const a = Vr(t.readExtensionResults(), ["prf"]), d = a ? Vr(a.prf, ["results"]) : null, E = (d ? Vr(d.results, ["first"]) : null)?.first;
7733
- Ns(E, 32, 32) || we("WEBAUTHN_PRF_REQUIRED");
7734
- const I = new Uint8Array(E), P = Reflect.apply(A_, I, []);
7782
+ function M_(e, r) {
7783
+ const t = Ts(e), s = t.rawId;
7784
+ C_(s, r) || (Ne(s), we("WEBAUTHN_CREDENTIAL_MISMATCH")), Ne(s);
7785
+ const a = Br(t.readExtensionResults(), ["prf"]), d = a ? Br(a.prf, ["results"]) : null, E = (d ? Br(d.results, ["first"]) : null)?.first;
7786
+ Ls(E, 32, 32) || we("WEBAUTHN_PRF_REQUIRED");
7787
+ const I = new Uint8Array(E), P = Reflect.apply(w_, I, []);
7735
7788
  return Ne(I), P;
7736
7789
  }
7737
- function U_({ challenge: e, credentialId: r, prfInput: t, rpId: s, signal: a }) {
7790
+ function B_({ challenge: e, credentialId: r, prfInput: t, rpId: s, signal: a }) {
7738
7791
  return {
7739
7792
  publicKey: {
7740
7793
  allowCredentials: [{
@@ -7744,17 +7797,17 @@ function U_({ challenge: e, credentialId: r, prfInput: t, rpId: s, signal: a })
7744
7797
  challenge: e,
7745
7798
  extensions: { prf: { eval: { first: t } } },
7746
7799
  ...s === void 0 ? {} : { rpId: s },
7747
- timeout: Ps,
7800
+ timeout: Rs,
7748
7801
  userVerification: "required"
7749
7802
  },
7750
7803
  signal: a
7751
7804
  };
7752
7805
  }
7753
- async function Io({ assertCurrent: e, credentials: r, credentialId: t, fillRandom: s, prfInput: a, rpId: d, signal: b }) {
7806
+ async function mo({ assertCurrent: e, credentials: r, credentialId: t, fillRandom: s, prfInput: a, rpId: d, signal: b }) {
7754
7807
  const E = ir(s, 32);
7755
7808
  let I;
7756
7809
  try {
7757
- I = await r.get(U_({
7810
+ I = await r.get(B_({
7758
7811
  challenge: E,
7759
7812
  credentialId: t,
7760
7813
  prfInput: a,
@@ -7766,9 +7819,9 @@ async function Io({ assertCurrent: e, credentials: r, credentialId: t, fillRando
7766
7819
  } finally {
7767
7820
  Ne(E);
7768
7821
  }
7769
- return e(), C_(I, t);
7822
+ return e(), M_(I, t);
7770
7823
  }
7771
- function F_(e) {
7824
+ function V_(e) {
7772
7825
  if (typeof e != "string") return !1;
7773
7826
  for (let r = 0; r < e.length; r += 1) {
7774
7827
  const t = e.charCodeAt(r);
@@ -7780,38 +7833,38 @@ function F_(e) {
7780
7833
  }
7781
7834
  return !0;
7782
7835
  }
7783
- function M_(e) {
7836
+ function H_(e) {
7784
7837
  if (typeof e == "string")
7785
- return F_(e) || we("INVALID_USERNAME"), Br.encode(e).length > 256 && we("INVALID_USERNAME"), e;
7838
+ return V_(e) || we("INVALID_USERNAME"), dn.encode(e).length > 256 && we("INVALID_USERNAME"), e;
7786
7839
  (!_n(e) || Gt(e) > 256) && we("INVALID_USERNAME");
7787
7840
  try {
7788
- return b_.decode(e);
7841
+ return m_.decode(e);
7789
7842
  } catch {
7790
7843
  we("INVALID_USERNAME");
7791
7844
  }
7792
7845
  }
7793
7846
  function ai(e) {
7794
- const t = M_(e).replace(/^ +/u, "").replace(/ +$/u, "").replace(/[A-Z]/gu, (a) => a.toLowerCase()), s = Br.encode(t);
7795
- return (s.length < 3 || s.length > 64 || !/^[a-z0-9][a-z0-9._-]*$/u.test(t)) && we("INVALID_USERNAME"), t;
7847
+ const r = H_(e).replace(/^ +/u, "").replace(/ +$/u, "").replace(/[A-Z]/gu, (t) => t.toLowerCase());
7848
+ return As(r) || we("INVALID_USERNAME"), r;
7796
7849
  }
7797
- function B_(e) {
7850
+ function z_(e) {
7798
7851
  let r;
7799
7852
  try {
7800
- r = Go(e?.module);
7853
+ r = Yo(e?.module);
7801
7854
  } catch {
7802
7855
  we("WASM_UNAVAILABLE");
7803
7856
  }
7804
- return (!Rs(r, ["sdn", "sha256"]) || typeof r.sha256 != "function" || !r.sdn || typeof r.sdn != "object") && we("WASM_UNAVAILABLE"), r;
7857
+ return (!Ns(r, ["sdn", "sha256"]) || typeof r.sha256 != "function" || !r.sdn || typeof r.sdn != "object") && we("WASM_UNAVAILABLE"), r;
7805
7858
  }
7806
- function V_(e) {
7807
- const r = B_(e), t = r.sdn, s = e?.storage, a = e?.credentials, d = v_(e?.rng), b = e?.createRequestController, E = e?.releaseRequestController, I = e?.ownHandle, P = e?.destroyHandle, w = e?.ownedHandlesClean, m = e?.now ?? (() => /* @__PURE__ */ new Date()), N = e?.rpHostname ?? e?.window?.location?.hostname ?? globalThis?.location?.hostname, L = N_(e?.rpId, N), D = typeof e?.rpName == "string" && e.rpName !== "" ? e.rpName : P_, U = () => typeof a?.create == "function" && typeof a?.get == "function", M = () => ms(s), C = () => Yd(s), B = (v) => Gd(s, v), Y = (v, k) => (Xd(s, v, k), C().some((R) => R.key === v) && we("STORAGE_WRITE_FAILED"), !0), _ = () => M().active.status === "valid", f = ({ confirmation: v } = {}) => (_() || we("REMEMBER_UNAVAILABLE"), Jd(s, v), M().active.status !== "empty" && we("STORAGE_WRITE_FAILED"), !0), h = async (v) => {
7859
+ function $_(e) {
7860
+ const r = z_(e), t = r.sdn, s = e?.storage, a = e?.credentials, d = A_(e?.rng), b = e?.createRequestController, E = e?.releaseRequestController, I = e?.ownHandle, P = e?.destroyHandle, w = e?.ownedHandlesClean, m = e?.now ?? (() => /* @__PURE__ */ new Date()), N = e?.rpHostname ?? e?.window?.location?.hostname ?? globalThis?.location?.hostname, L = x_(e?.rpId, N), D = typeof e?.rpName == "string" && e.rpName !== "" ? e.rpName : L_, U = () => typeof a?.create == "function" && typeof a?.get == "function", M = () => Is(s), C = () => Jd(s), B = (v) => Qd(s, v), Y = (v, k) => (Zd(s, v, k), C().some((R) => R.key === v) && we("STORAGE_WRITE_FAILED"), !0), _ = () => M().active.status === "valid", f = ({ confirmation: v } = {}) => (_() || we("REMEMBER_UNAVAILABLE"), e_(s, v), M().active.status !== "empty" && we("STORAGE_WRITE_FAILED"), !0), h = async (v) => {
7808
7861
  let k;
7809
7862
  try {
7810
- k = await r.sha256(Br.encode(v));
7863
+ k = await r.sha256(dn.encode(v));
7811
7864
  } catch {
7812
7865
  we("WASM_FAILURE");
7813
7866
  }
7814
- return _n(k, 32) || we("WASM_FAILURE"), L_(k);
7867
+ return _n(k, 32) || we("WASM_FAILURE"), D_(k);
7815
7868
  };
7816
7869
  return Object.freeze({
7817
7870
  canForget: _,
@@ -7832,11 +7885,11 @@ function V_(e) {
7832
7885
  }), Z = Et(R.prfInputBase64url, { exact: 32 }), ee = Et(R.ciphertextBase64url, {
7833
7886
  minimum: 17,
7834
7887
  maximum: 1024
7835
- }), ae = Et(R.hkdfSaltBase64url, { exact: 32 }), oe = Et(R.nonceBase64url, { exact: 12 }), pe = Br.encode(R.canonicalUsername), ce = ar(R.aad), Q = typeof b == "function" ? b() : null;
7888
+ }), ae = Et(R.hkdfSaltBase64url, { exact: 32 }), oe = Et(R.nonceBase64url, { exact: 12 }), pe = dn.encode(R.canonicalUsername), ce = ar(R.aad), Q = typeof b == "function" ? b() : null;
7836
7889
  (!Q?.signal || typeof Q.abort != "function") && (Ne(V), Ne(Z), Ne(ee), Ne(ae), Ne(oe), Ne(pe), we("WEBAUTHN_UNAVAILABLE"));
7837
7890
  let ie, ue = null, Ee = !1;
7838
7891
  try {
7839
- ie = await Io({
7892
+ ie = await mo({
7840
7893
  assertCurrent: v,
7841
7894
  credentialId: V,
7842
7895
  credentials: a,
@@ -7892,7 +7945,7 @@ function V_(e) {
7892
7945
  { alg: -257, type: "public-key" }
7893
7946
  ],
7894
7947
  rp: L === void 0 ? { name: D } : { id: L, name: D },
7895
- timeout: Ps,
7948
+ timeout: Rs,
7896
7949
  user: {
7897
7950
  displayName: k,
7898
7951
  id: pe,
@@ -7905,8 +7958,8 @@ function V_(e) {
7905
7958
  throw v(), ct;
7906
7959
  }
7907
7960
  v();
7908
- const Vt = Ls(It);
7909
- ue = Vt.rawId, D_(Vt), Ee = await Io({
7961
+ const Vt = Ts(It);
7962
+ ue = Vt.rawId, F_(Vt), Ee = await mo({
7910
7963
  assertCurrent: v,
7911
7964
  credentialId: ue,
7912
7965
  credentials: a,
@@ -7919,10 +7972,10 @@ function V_(e) {
7919
7972
  v();
7920
7973
  const Dt = Ar(ue), Ht = Object.freeze({
7921
7974
  credentialIdBase64url: Dt,
7922
- identityScheme: k_,
7975
+ identityScheme: R_,
7923
7976
  schemaVersion: 2,
7924
- seedProfile: O_,
7925
- storageProfile: Ao,
7977
+ seedProfile: N_,
7978
+ storageProfile: Eo,
7926
7979
  usernameSha256: at
7927
7980
  }), wt = ar(Ht);
7928
7981
  let pt;
@@ -7957,15 +8010,15 @@ function V_(e) {
7957
8010
  nonceBase64url: Ar(ie),
7958
8011
  prfInputBase64url: Ar(ce),
7959
8012
  schemaVersion: 2,
7960
- storageProfile: Ao
8013
+ storageProfile: Eo
7961
8014
  });
7962
- v(), mt = jd(s, kt);
8015
+ v(), mt = Yd(s, kt);
7963
8016
  let Ot;
7964
8017
  const Xe = Ce;
7965
8018
  try {
7966
8019
  Ot = t.importRememberedIdentity({
7967
8020
  canonicalAad: wt,
7968
- canonicalUsernameUtf8: Br.encode(k),
8021
+ canonicalUsernameUtf8: dn.encode(k),
7969
8022
  ciphertextAndTag: pt.slice(),
7970
8023
  hkdfSalt: Q.slice(),
7971
8024
  nonce: ie.slice(),
@@ -7976,7 +8029,7 @@ function V_(e) {
7976
8029
  }
7977
8030
  wn(Ot) || we("WASM_FAILURE"), Pe = Ot.handle, (Pe == null || typeof I != "function") && we("WASM_FAILURE"), I(Pe);
7978
8031
  const Zt = ft(Ot.identity);
7979
- return x_(Z, Zt) || we("IDENTITY_MISMATCH"), v(), (typeof P != "function" || !P(Pe)) && we("DESTRUCTION_FAILED"), Pe = null, (typeof w != "function" || !w(R)) && we("DESTRUCTION_FAILED"), v(), qd(s, mt), mt = null, Object.freeze({ remembered: !0 });
8032
+ return U_(Z, Zt) || we("IDENTITY_MISMATCH"), v(), (typeof P != "function" || !P(Pe)) && we("DESTRUCTION_FAILED"), Pe = null, (typeof w != "function" || !w(R)) && we("DESTRUCTION_FAILED"), v(), Gd(s, mt), mt = null, Object.freeze({ remembered: !0 });
7980
8033
  } finally {
7981
8034
  Pe !== null && typeof P == "function" && P(Pe), Ne(V), Ne(oe), Ne(pe), Ne(Ee), Ne(Re), Ne(Ce), Ne(Q), Ne(ie), Ne(ue), typeof E == "function" && E(ae);
7982
8035
  }
@@ -7987,7 +8040,7 @@ function V_(e) {
7987
8040
  supported: U
7988
8041
  });
7989
8042
  }
7990
- const Hr = /^[0-9a-f]{64}$/u, H_ = /^[A-Za-z0-9_-]{43}$/u, z_ = Object.freeze([
8043
+ const Vr = /^[0-9a-f]{64}$/u, W_ = /^[A-Za-z0-9_-]{43}$/u, j_ = Object.freeze([
7991
8044
  "callbackUri",
7992
8045
  "clientDisplayName",
7993
8046
  "clientId",
@@ -8001,7 +8054,7 @@ const Hr = /^[0-9a-f]{64}$/u, H_ = /^[A-Za-z0-9_-]{43}$/u, z_ = Object.freeze([
8001
8054
  "schemaVersion",
8002
8055
  "state",
8003
8056
  "transactionId"
8004
- ]), $_ = Object.freeze(["redirectUri", "schemaVersion", "transactionId"]), W_ = 64 * 1024, j_ = 4 * 1024, q_ = new TextEncoder(), K_ = new TextDecoder("utf-8", { fatal: !0 });
8057
+ ]), q_ = Object.freeze(["redirectUri", "schemaVersion", "transactionId"]), K_ = 64 * 1024, Y_ = 4 * 1024, G_ = new TextEncoder(), X_ = new TextDecoder("utf-8", { fatal: !0 });
8005
8058
  class Sn extends Error {
8006
8059
  constructor() {
8007
8060
  super("RELAY_FAILURE"), this.name = "WalletRelayError", this.code = "RELAY_FAILURE";
@@ -8010,13 +8063,13 @@ class Sn extends Error {
8010
8063
  function Oe() {
8011
8064
  throw new Sn();
8012
8065
  }
8013
- function Ts(e) {
8066
+ function xs(e) {
8014
8067
  if (e === null || typeof e != "object" || Array.isArray(e)) return !1;
8015
8068
  const r = Object.getPrototypeOf(e);
8016
8069
  return r === Object.prototype || r === null;
8017
8070
  }
8018
- function xs(e, r) {
8019
- Ts(e) || Oe();
8071
+ function Ds(e, r) {
8072
+ xs(e) || Oe();
8020
8073
  let t;
8021
8074
  try {
8022
8075
  t = Reflect.ownKeys(e);
@@ -8039,13 +8092,13 @@ function xs(e, r) {
8039
8092
  }
8040
8093
  function ci(e) {
8041
8094
  if (Array.isArray(e)) return Object.freeze(e.map(ci));
8042
- if (!Ts(e)) return e;
8095
+ if (!xs(e)) return e;
8043
8096
  const r = {};
8044
8097
  for (const t of Object.keys(e).sort()) r[t] = ci(e[t]);
8045
8098
  return Object.freeze(r);
8046
8099
  }
8047
- function Y_(e, r) {
8048
- (typeof e != "string" || q_.encode(e).byteLength > r || e.charCodeAt(0) === 65279) && Oe();
8100
+ function J_(e, r) {
8101
+ (typeof e != "string" || G_.encode(e).byteLength > r || e.charCodeAt(0) === 65279) && Oe();
8049
8102
  let t = 0, s = 0;
8050
8103
  const a = () => {
8051
8104
  for (; t < e.length && /[\u0009\u000a\u000d\u0020]/u.test(e[t]); ) t += 1;
@@ -8116,27 +8169,27 @@ function Y_(e, r) {
8116
8169
  const E = b();
8117
8170
  return a(), t !== e.length && Oe(), E;
8118
8171
  }
8119
- function wo(e) {
8172
+ function Io(e) {
8120
8173
  try {
8121
8174
  Promise.resolve(e).catch(() => {
8122
8175
  });
8123
8176
  } catch {
8124
8177
  }
8125
8178
  }
8126
- function Ds(e, r = null) {
8179
+ function Cs(e, r = null) {
8127
8180
  try {
8128
8181
  const t = r?.cancel;
8129
- typeof t == "function" && wo(Reflect.apply(t, r, []));
8182
+ typeof t == "function" && Io(Reflect.apply(t, r, []));
8130
8183
  } catch {
8131
8184
  }
8132
8185
  if (!r)
8133
8186
  try {
8134
8187
  const t = e?.body, s = t?.cancel;
8135
- typeof s == "function" && wo(Reflect.apply(s, t, []));
8188
+ typeof s == "function" && Io(Reflect.apply(s, t, []));
8136
8189
  } catch {
8137
8190
  }
8138
8191
  }
8139
- function Cs(e, r, t = null) {
8192
+ function Us(e, r, t = null) {
8140
8193
  let s;
8141
8194
  try {
8142
8195
  s = Promise.resolve(e);
@@ -8170,7 +8223,7 @@ function Cs(e, r, t = null) {
8170
8223
  );
8171
8224
  }) : s;
8172
8225
  }
8173
- async function G_(e, r, t, s) {
8226
+ async function Q_(e, r, t, s) {
8174
8227
  let a = null;
8175
8228
  try {
8176
8229
  (!e || e.status !== r || e.redirected === !0 || e.headers?.get?.("cache-control")?.trim().toLowerCase() !== "no-store" || e.headers?.get?.("content-type")?.trim().toLowerCase() !== "application/json; charset=utf-8" || typeof e.body?.getReader != "function") && Oe(), a = e.body.getReader(), (!a || typeof a.read != "function" || s?.aborted === !0) && Oe();
@@ -8178,7 +8231,7 @@ async function G_(e, r, t, s) {
8178
8231
  let b = 0;
8179
8232
  for (; ; ) {
8180
8233
  s?.aborted === !0 && Oe();
8181
- const { done: P, value: w } = await Cs(a.read(), s);
8234
+ const { done: P, value: w } = await Us(a.read(), s);
8182
8235
  if (s?.aborted === !0 && Oe(), P) break;
8183
8236
  w instanceof Uint8Array || Oe(), b += w.byteLength, b > t && Oe(), d.push(w);
8184
8237
  }
@@ -8186,9 +8239,9 @@ async function G_(e, r, t, s) {
8186
8239
  let I = 0;
8187
8240
  for (const P of d)
8188
8241
  E.set(P, I), I += P.byteLength;
8189
- return Y_(K_.decode(E), t);
8242
+ return J_(X_.decode(E), t);
8190
8243
  } catch (d) {
8191
- if (Ds(e, a), d instanceof Sn) throw d;
8244
+ if (Cs(e, a), d instanceof Sn) throw d;
8192
8245
  Oe();
8193
8246
  } finally {
8194
8247
  try {
@@ -8197,21 +8250,21 @@ async function G_(e, r, t, s) {
8197
8250
  }
8198
8251
  }
8199
8252
  }
8200
- function So(e, r) {
8201
- return xs(e, z_), (e.schemaVersion !== 1 || e.transactionId !== r || !Hr.test(e.transactionId) || !Hr.test(e.state) || !Hr.test(e.requestSha256) || !H_.test(e.resultToken) || typeof e.callbackUri != "string" || typeof e.clientDisplayName != "string" || typeof e.clientId != "string" || typeof e.expiresAt != "string" || typeof e.operation != "string" || typeof e.registryVersion != "string" || typeof e.requestOrigin != "string") && Oe(), ci(e);
8253
+ function wo(e, r) {
8254
+ return Ds(e, j_), (e.schemaVersion !== 1 || e.transactionId !== r || !Vr.test(e.transactionId) || !Vr.test(e.state) || !Vr.test(e.requestSha256) || !W_.test(e.resultToken) || typeof e.callbackUri != "string" || typeof e.clientDisplayName != "string" || typeof e.clientId != "string" || typeof e.expiresAt != "string" || typeof e.operation != "string" || typeof e.registryVersion != "string" || typeof e.requestOrigin != "string") && Oe(), ci(e);
8202
8255
  }
8203
8256
  function li(e, r) {
8204
- xs(r, $_), (r.schemaVersion !== 1 || r.transactionId !== e.transactionId || typeof r.redirectUri != "string") && Oe();
8257
+ Ds(r, q_), (r.schemaVersion !== 1 || r.transactionId !== e.transactionId || typeof r.redirectUri != "string") && Oe();
8205
8258
  const t = `${e.callbackUri}#code=`, s = `&state=${e.state}`;
8206
8259
  (!r.redirectUri.startsWith(t) || !r.redirectUri.endsWith(s)) && Oe();
8207
8260
  const a = r.redirectUri.slice(t.length, r.redirectUri.length - s.length);
8208
- return (!Hr.test(a) || r.redirectUri !== `${t}${a}${s}`) && Oe(), Object.freeze({
8261
+ return (!Vr.test(a) || r.redirectUri !== `${t}${a}${s}`) && Oe(), Object.freeze({
8209
8262
  redirectUri: r.redirectUri,
8210
8263
  schemaVersion: 1,
8211
8264
  transactionId: r.transactionId
8212
8265
  });
8213
8266
  }
8214
- function ko(e, r, t = void 0) {
8267
+ function So(e, r, t = void 0) {
8215
8268
  const s = {
8216
8269
  cache: "no-store",
8217
8270
  credentials: "omit",
@@ -8224,39 +8277,39 @@ function ko(e, r, t = void 0) {
8224
8277
  };
8225
8278
  return t !== void 0 && (s.body = JSON.stringify(t)), s;
8226
8279
  }
8227
- function X_({ fetch: e, location: r }) {
8280
+ function Z_({ fetch: e, location: r }) {
8228
8281
  (typeof e != "function" || typeof r?.replace != "function") && Oe();
8229
8282
  const t = /* @__PURE__ */ new Set(), s = async (a, d, b, E) => {
8230
8283
  let I;
8231
8284
  try {
8232
- I = await Cs(e(a, d), d.signal, (P) => Ds(P));
8285
+ I = await Us(e(a, d), d.signal, (P) => Cs(P));
8233
8286
  } catch {
8234
8287
  Oe();
8235
8288
  }
8236
- return G_(I, b, E, d.signal);
8289
+ return Q_(I, b, E, d.signal);
8237
8290
  };
8238
8291
  return Object.freeze({
8239
8292
  async fetchTransaction(a, { signal: d } = {}) {
8240
- (typeof a != "string" || !Hr.test(a)) && Oe();
8293
+ (typeof a != "string" || !Vr.test(a)) && Oe();
8241
8294
  const b = await s(
8242
8295
  `/relay/v1/transactions/${a}`,
8243
- ko("GET", d),
8296
+ So("GET", d),
8244
8297
  200,
8245
- W_
8298
+ K_
8246
8299
  );
8247
- return So(b, a);
8300
+ return wo(b, a);
8248
8301
  },
8249
8302
  async publishResult(a, d, { signal: b } = {}) {
8250
- const E = So(a, a?.transactionId), I = await s(
8303
+ const E = wo(a, a?.transactionId), I = await s(
8251
8304
  `/relay/v1/transactions/${E.transactionId}/result`,
8252
- ko("POST", b, {
8305
+ So("POST", b, {
8253
8306
  result: d,
8254
8307
  resultToken: E.resultToken,
8255
8308
  schemaVersion: 1,
8256
8309
  transactionId: E.transactionId
8257
8310
  }),
8258
8311
  201,
8259
- j_
8312
+ Y_
8260
8313
  ), P = li(E, I);
8261
8314
  return t.clear(), t.add(P.redirectUri), P;
8262
8315
  },
@@ -8276,7 +8329,7 @@ function X_({ fetch: e, location: r }) {
8276
8329
  }
8277
8330
  });
8278
8331
  }
8279
- const Us = Uint8Array, J_ = Us.prototype.fill, mr = new TextEncoder();
8332
+ const Fs = Uint8Array, eh = Fs.prototype.fill, mr = new TextEncoder();
8280
8333
  class Ue extends Error {
8281
8334
  constructor(r) {
8282
8335
  super(r), this.name = "WalletOriginError", this.code = r;
@@ -8289,9 +8342,9 @@ function Ir(e) {
8289
8342
  throw e instanceof xt ? new Ue(e.code) : e;
8290
8343
  }
8291
8344
  function _t(e) {
8292
- if (e instanceof Us)
8345
+ if (e instanceof Fs)
8293
8346
  try {
8294
- J_.call(e, 0);
8347
+ eh.call(e, 0);
8295
8348
  } catch {
8296
8349
  }
8297
8350
  }
@@ -8306,7 +8359,7 @@ function wr(e) {
8306
8359
  }
8307
8360
  return !0;
8308
8361
  }
8309
- function Oo(e) {
8362
+ function ko(e) {
8310
8363
  if (!(!e || typeof e != "object")) {
8311
8364
  try {
8312
8365
  e.type === "checkbox" && (e.checked = !1);
@@ -8358,7 +8411,7 @@ function Sr(e, r) {
8358
8411
  } catch {
8359
8412
  a = null;
8360
8413
  }
8361
- a && t.add(a), Oo(s);
8414
+ a && t.add(a), ko(s);
8362
8415
  }
8363
8416
  for (const s of t) {
8364
8417
  let a = [];
@@ -8367,7 +8420,7 @@ function Sr(e, r) {
8367
8420
  } catch {
8368
8421
  a = [];
8369
8422
  }
8370
- for (const d of a) Oo(d);
8423
+ for (const d of a) ko(d);
8371
8424
  try {
8372
8425
  s.inert = !0, s.setAttribute?.("aria-hidden", "true");
8373
8426
  const d = e.createElement("div");
@@ -8380,21 +8433,21 @@ function Sr(e, r) {
8380
8433
  }
8381
8434
  }
8382
8435
  }
8383
- function Q_(e) {
8436
+ function th(e) {
8384
8437
  let r;
8385
8438
  try {
8386
- r = Go(e);
8439
+ r = Yo(e);
8387
8440
  } catch {
8388
8441
  ne("WASM_UNAVAILABLE");
8389
8442
  }
8390
8443
  const t = r?.sdn, s = r?.sha256;
8391
8444
  return (!t || typeof t.derivePasswordIdentity != "function" || typeof t.destroySdnIdentity != "function" || typeof s != "function") && ne("WASM_UNAVAILABLE"), Object.freeze({ capabilities: t, sha256: s });
8392
8445
  }
8393
- function on(e) {
8446
+ function nn(e) {
8394
8447
  const r = e?.AbortController ?? globalThis.AbortController;
8395
8448
  return typeof r == "function" ? new r() : null;
8396
8449
  }
8397
- class Z_ {
8450
+ class rh {
8398
8451
  #r = !1;
8399
8452
  #c;
8400
8453
  #_ = null;
@@ -8438,10 +8491,10 @@ class Z_ {
8438
8491
  wasm: w,
8439
8492
  window: m
8440
8493
  }) {
8441
- const N = Q_(w);
8442
- this.#c = N.capabilities, this.#T = N.sha256, this.#L = a, this.#d = d, this.#n = t, this.#s = m, this.#y = V_({
8494
+ const N = th(w);
8495
+ this.#c = N.capabilities, this.#T = N.sha256, this.#L = a, this.#d = d, this.#n = t, this.#s = m, this.#y = $_({
8443
8496
  createRequestController: () => {
8444
- const L = on(this.#s);
8497
+ const L = nn(this.#s);
8445
8498
  return L && (this.#l.add(L), this.#O.add(L)), L;
8446
8499
  },
8447
8500
  credentials: r ?? m?.navigator?.credentials ?? globalThis.navigator?.credentials,
@@ -8598,11 +8651,11 @@ class Z_ {
8598
8651
  s = b, a = E;
8599
8652
  });
8600
8653
  return this.#N = d, (async () => {
8601
- const b = on(this.#s);
8654
+ const b = nn(this.#s);
8602
8655
  b && this.#l.add(b);
8603
8656
  try {
8604
8657
  this.#m(t.epoch, t.permit), it({ document: this.#n, window: this.#s }), typeof this.#d?.publishResult != "function" && ne("RELAY_UNAVAILABLE");
8605
- const E = r === "connected" ? t.connectedResult : xd();
8658
+ const E = r === "connected" ? t.connectedResult : Ud();
8606
8659
  let I;
8607
8660
  try {
8608
8661
  I = await this.#d.publishResult(t.transaction, E, {
@@ -8891,7 +8944,7 @@ class Z_ {
8891
8944
  U == null && ne("WASM_FAILURE"), this.#a.add(U);
8892
8945
  let M;
8893
8946
  try {
8894
- M = r_(D.identity, { accountIndex: r, profile: d });
8947
+ M = o_(D.identity, { accountIndex: r, profile: d });
8895
8948
  } catch {
8896
8949
  const C = this.#b(U);
8897
8950
  D = null, C || (this.revokeNow("native-destruction-failed"), ne("DESTRUCTION_FAILED")), ne("WASM_FAILURE");
@@ -8905,7 +8958,7 @@ class Z_ {
8905
8958
  }
8906
8959
  async prepare(r) {
8907
8960
  (this.#e || this.#i) && ne("STALE_CONTROLLER"), this.#r && ne("TRANSACTION_IN_PROGRESS"), this.#r = !0;
8908
- const t = this.#o, s = typeof r == "string" ? r : r?.transactionId ?? null, a = on(this.#s);
8961
+ const t = this.#o, s = typeof r == "string" ? r : r?.transactionId ?? null, a = nn(this.#s);
8909
8962
  a && this.#l.add(a);
8910
8963
  try {
8911
8964
  const d = typeof this.#d?.fetchTransaction == "function" ? await this.#d.fetchTransaction(r, { signal: a?.signal }) : r;
@@ -8938,7 +8991,7 @@ class Z_ {
8938
8991
  sha256: this.#T,
8939
8992
  window: this.#s
8940
8993
  });
8941
- this.#A(s, d), it({ document: this.#n, window: this.#s }), this.#_ = Ld({
8994
+ this.#A(s, d), it({ document: this.#n, window: this.#s }), this.#_ = Dd({
8942
8995
  binding: E.binding,
8943
8996
  document: this.#n,
8944
8997
  identity: a,
@@ -8951,7 +9004,7 @@ class Z_ {
8951
9004
  sha256: this.#T,
8952
9005
  window: this.#s
8953
9006
  }), this.#A(s, d), it({ document: this.#n, window: this.#s });
8954
- const I = await Td({
9007
+ const I = await Cd({
8955
9008
  assertCurrent: () => this.#A(s, d),
8956
9009
  binding: E.binding,
8957
9010
  handle: s,
@@ -8977,7 +9030,7 @@ class Z_ {
8977
9030
  }), Object.freeze({ accountReady: !0 });
8978
9031
  try {
8979
9032
  this.#m(m, N), typeof this.#d?.publishResult != "function" && ne("RELAY_UNAVAILABLE");
8980
- const L = on(this.#s);
9033
+ const L = nn(this.#s);
8981
9034
  L && this.#l.add(L);
8982
9035
  let D;
8983
9036
  try {
@@ -9068,7 +9121,7 @@ class Z_ {
9068
9121
  })(), s;
9069
9122
  }
9070
9123
  }
9071
- const eh = [
9124
+ const nh = [
9072
9125
  {
9073
9126
  allowedOperations: [
9074
9127
  "sdn.wallet.account.v1",
@@ -9409,11 +9462,11 @@ const eh = [
9409
9462
  ],
9410
9463
  requestOrigin: "https://review.spacedatanetwork.org"
9411
9464
  }
9412
- ], th = "7674bfb019753eee8387f064467c0f6f2ff6babd1ecabbd70dc585afc31fbc1a", rh = 1, Fs = {
9413
- clients: eh,
9414
- registryReleaseSha256: th,
9415
- schemaVersion: rh
9416
- }, nh = new TextEncoder(), ih = /^[0-9a-f]{64}$/u, oh = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u, sh = Object.freeze({
9465
+ ], ih = "7674bfb019753eee8387f064467c0f6f2ff6babd1ecabbd70dc585afc31fbc1a", oh = 1, Ms = {
9466
+ clients: nh,
9467
+ registryReleaseSha256: ih,
9468
+ schemaVersion: oh
9469
+ }, sh = new TextEncoder(), ah = /^[0-9a-f]{64}$/u, ch = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u, lh = Object.freeze({
9417
9470
  "sdn.auth.publish-request.v1": Object.freeze({
9418
9471
  audience: null,
9419
9472
  registryRow: "spaceaware-publish-request-v1",
@@ -9459,26 +9512,26 @@ const eh = [
9459
9512
  }), vt = Object.freeze([
9460
9513
  "sdn.wallet.account.v1",
9461
9514
  "sdn.wallet.connect.v1"
9462
- ]), ah = Object.freeze([
9515
+ ]), dh = Object.freeze([
9463
9516
  "sdn.auth.jcs-envelope.v2",
9464
9517
  "sdn.auth.raw-challenge.v1",
9465
9518
  ...vt
9466
- ]), ch = Object.freeze(["sdn.auth.publish-request.v1", ...vt]), lh = Object.freeze([
9519
+ ]), _h = Object.freeze(["sdn.auth.publish-request.v1", ...vt]), hh = Object.freeze([
9467
9520
  "sdn.asset-review.authority-activation.v1",
9468
9521
  "sdn.asset-review.decision.v1",
9469
9522
  ...vt
9470
- ]), Po = Object.freeze([
9523
+ ]), Oo = Object.freeze([
9471
9524
  Object.freeze(["sdn-landing-web-v1", "Space Data Network", "https://spacedatanetwork.org", "https://spacedatanetwork.org/wallet-callback.html", vt]),
9472
9525
  Object.freeze(["sdn-standards-web-v1", "Space Data Standards", "https://spacedatastandards.org", "https://spacedatastandards.org/wallet-callback.html", vt]),
9473
9526
  Object.freeze(["sdn-flatbuffers-pages-v1", "FlatBuffers Documentation", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/flatbuffers/wallet-callback.html", vt]),
9474
9527
  Object.freeze(["sdn-flatsql-pages-v1", "FlatSQL Documentation", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/flatsql/wallet-callback.html", vt]),
9475
9528
  Object.freeze(["sdn-module-sdk-pages-v1", "Space Data Module SDK", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/space-data-module-sdk/wallet-callback.html", vt]),
9476
- Object.freeze(["spaceaware-web-v1", "SpaceAware", "https://spaceaware.io", "https://spaceaware.io/wallet/callback", ch]),
9477
- Object.freeze(["sdn-node-console-v1", "SDN Node Console", "https://sdn.spaceaware.io", "https://sdn.spaceaware.io/wallet/callback", ah]),
9529
+ Object.freeze(["spaceaware-web-v1", "SpaceAware", "https://spaceaware.io", "https://spaceaware.io/wallet/callback", _h]),
9530
+ Object.freeze(["sdn-node-console-v1", "SDN Node Console", "https://sdn.spaceaware.io", "https://sdn.spaceaware.io/wallet/callback", dh]),
9478
9531
  Object.freeze(["orbpro-pages-v1", "OrbPro", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/OrbPro/wallet-callback.html", vt]),
9479
9532
  Object.freeze(["sdn-asset-models-pages-v1", "SDN Asset Models", "https://digitalarsenal.github.io", "https://digitalarsenal.github.io/asset-models/wallet-callback.html", vt]),
9480
- Object.freeze(["sdn-asset-review-v1", "SDN Asset Review", "https://review.spacedatanetwork.org", "https://review.spacedatanetwork.org/wallet/callback", lh])
9481
- ]), dh = Object.freeze([
9533
+ Object.freeze(["sdn-asset-review-v1", "SDN Asset Review", "https://review.spacedatanetwork.org", "https://review.spacedatanetwork.org/wallet/callback", hh])
9534
+ ]), uh = Object.freeze([
9482
9535
  Object.freeze({
9483
9536
  audience: null,
9484
9537
  clientId: "spaceaware-web-v1",
@@ -9543,10 +9596,10 @@ function hn(e, r, t) {
9543
9596
  function ut(e) {
9544
9597
  return e === null || typeof e == "boolean" || typeof e == "string" ? JSON.stringify(e) : typeof e == "number" ? (Number.isFinite(e) || De("registry contains a non-finite number"), JSON.stringify(e)) : Array.isArray(e) ? `[${e.map(ut).join(",")}]` : (Pi(e) || De("registry contains an unsupported value"), `{${Object.keys(e).sort().map((r) => `${JSON.stringify(r)}:${ut(e[r])}`).join(",")}}`);
9545
9598
  }
9546
- async function _h(e) {
9599
+ async function fh(e) {
9547
9600
  const r = globalThis.crypto?.subtle;
9548
9601
  r || De("Web Crypto SHA-256 is unavailable");
9549
- const t = new Uint8Array(await r.digest("SHA-256", nh.encode(e)));
9602
+ const t = new Uint8Array(await r.digest("SHA-256", sh.encode(e)));
9550
9603
  return Array.from(t, (s) => s.toString(16).padStart(2, "0")).join("");
9551
9604
  }
9552
9605
  function kn(e) {
@@ -9556,7 +9609,7 @@ function kn(e) {
9556
9609
  for (const t of Object.keys(e).sort()) r[t] = kn(e[t]);
9557
9610
  return Object.freeze(r);
9558
9611
  }
9559
- function hh(e, r) {
9612
+ function ph(e, r) {
9560
9613
  (typeof e != "string" || !e.startsWith("https://") || e.includes("*")) && De(`${r} must be exact HTTPS`);
9561
9614
  let t;
9562
9615
  try {
@@ -9566,7 +9619,7 @@ function hh(e, r) {
9566
9619
  }
9567
9620
  (t.protocol !== "https:" || t.username || t.password || t.port || t.origin !== e || t.pathname !== "/" || t.search || t.hash) && De(`${r} must be an exact HTTPS origin`);
9568
9621
  }
9569
- function uh(e, r) {
9622
+ function yh(e, r) {
9570
9623
  (typeof e != "string" || !e.startsWith("https://") || e.includes("*")) && De("callbackUri must be exact HTTPS");
9571
9624
  let t;
9572
9625
  try {
@@ -9576,8 +9629,8 @@ function uh(e, r) {
9576
9629
  }
9577
9630
  (t.protocol !== "https:" || t.username || t.password || t.port || t.origin !== r || t.search || t.hash || t.href !== e) && De("callbackUri must be exact and same-origin");
9578
9631
  }
9579
- function fh(e) {
9580
- hn(e, ["clients", "registryReleaseSha256", "schemaVersion"], "registry"), e.schemaVersion !== 1 && De("registry schemaVersion must be 1"), (typeof e.registryReleaseSha256 != "string" || !ih.test(e.registryReleaseSha256)) && De("registryReleaseSha256 must be lowercase SHA-256"), (!Array.isArray(e.clients) || e.clients.length !== Po.length) && De("registry must contain exactly the reviewed clients");
9632
+ function gh(e) {
9633
+ hn(e, ["clients", "registryReleaseSha256", "schemaVersion"], "registry"), e.schemaVersion !== 1 && De("registry schemaVersion must be 1"), (typeof e.registryReleaseSha256 != "string" || !ah.test(e.registryReleaseSha256)) && De("registryReleaseSha256 must be lowercase SHA-256"), (!Array.isArray(e.clients) || e.clients.length !== Oo.length) && De("registry must contain exactly the reviewed clients");
9581
9634
  const r = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
9582
9635
  e.clients.forEach((s, a) => {
9583
9636
  hn(s, [
@@ -9589,8 +9642,8 @@ function fh(e) {
9589
9642
  "operationBindings",
9590
9643
  "requestOrigin"
9591
9644
  ], `client ${a}`);
9592
- const [d, b, E, I, P] = Po[a];
9593
- (s.clientId !== d || s.clientDisplayName !== b || s.requestOrigin !== E || s.callbackUri !== I) && De(`client ${a} differs from the reviewed row`), (!oh.test(s.clientId) || r.has(s.clientId)) && De("clientId must be unique and canonical"), r.add(s.clientId), (typeof s.clientDisplayName != "string" || s.clientDisplayName.length < 1 || s.clientDisplayName.length > 80) && De("clientDisplayName is invalid"), hh(s.requestOrigin, "requestOrigin"), uh(s.callbackUri, s.requestOrigin), (!Array.isArray(s.allowedOperations) || ut(s.allowedOperations) !== ut(P)) && De(`${s.clientId} allowedOperations differ from the reviewed allowlist`), (!Array.isArray(s.operationBindings) || s.operationBindings.length !== P.length) && De(`${s.clientId} operationBindings differ from the reviewed allowlist`), s.operationBindings.forEach((m, N) => {
9645
+ const [d, b, E, I, P] = Oo[a];
9646
+ (s.clientId !== d || s.clientDisplayName !== b || s.requestOrigin !== E || s.callbackUri !== I) && De(`client ${a} differs from the reviewed row`), (!ch.test(s.clientId) || r.has(s.clientId)) && De("clientId must be unique and canonical"), r.add(s.clientId), (typeof s.clientDisplayName != "string" || s.clientDisplayName.length < 1 || s.clientDisplayName.length > 80) && De("clientDisplayName is invalid"), ph(s.requestOrigin, "requestOrigin"), yh(s.callbackUri, s.requestOrigin), (!Array.isArray(s.allowedOperations) || ut(s.allowedOperations) !== ut(P)) && De(`${s.clientId} allowedOperations differ from the reviewed allowlist`), (!Array.isArray(s.operationBindings) || s.operationBindings.length !== P.length) && De(`${s.clientId} operationBindings differ from the reviewed allowlist`), s.operationBindings.forEach((m, N) => {
9594
9647
  hn(m, [
9595
9648
  "audience",
9596
9649
  "maxLifetimeSeconds",
@@ -9601,7 +9654,7 @@ function fh(e) {
9601
9654
  ], `${s.clientId} operation ${N}`);
9602
9655
  const L = P[N];
9603
9656
  m.operation !== L && De(`${s.clientId} operation allowlist order or value changed`);
9604
- const D = sh[m.operation];
9657
+ const D = lh[m.operation];
9605
9658
  D || De("unknown registry operation"), (m.maxLifetimeSeconds !== 300 || m.audience !== D.audience || m.registryRow !== D.registryRow || m.serviceActivationState !== D.serviceActivationState || m.serviceInstance !== D.serviceInstance) && De(`${s.clientId} operation policy differs from the reviewed binding`);
9606
9659
  const U = `${s.clientId}\0${s.requestOrigin}\0${m.operation}`;
9607
9660
  t.has(U) && De("duplicate registry binding"), t.add(U);
@@ -9609,7 +9662,7 @@ function fh(e) {
9609
9662
  const w = [...new Set(s.operationBindings.map(({ audience: m }) => m).filter((m) => m !== null))].sort();
9610
9663
  (!Array.isArray(s.audiences) || ut(s.audiences) !== ut(w)) && De(`${s.clientId} audiences differ from operationBindings`), ut(s.allowedOperations) !== ut(s.operationBindings.map(({ operation: m }) => m)) && De(`${s.clientId} allowedOperations differ from operationBindings`);
9611
9664
  });
9612
- for (const s of dh) {
9665
+ for (const s of uh) {
9613
9666
  const a = e.clients.find((E) => E.clientId === s.clientId && E.requestOrigin === s.requestOrigin), d = a?.operationBindings.find((E) => E.operation === s.operation), b = d && {
9614
9667
  audience: d.audience,
9615
9668
  clientId: a.clientId,
@@ -9624,13 +9677,13 @@ function fh(e) {
9624
9677
  }
9625
9678
  return kn(e);
9626
9679
  }
9627
- const { registryReleaseSha256: ph, ...yh } = Fs, gh = await _h(ut(yh));
9628
- gh !== ph && De("registry release SHA-256 mismatch");
9629
- const Ro = fh(Fs);
9630
- function vh(e) {
9680
+ const { registryReleaseSha256: vh, ...bh } = Ms, Eh = await fh(ut(bh));
9681
+ Eh !== vh && De("registry release SHA-256 mismatch");
9682
+ const Po = gh(Ms);
9683
+ function Ah(e) {
9631
9684
  const r = hn(e, ["clientId", "operation", "requestOrigin"], "registry lookup");
9632
9685
  (typeof r.clientId != "string" || typeof r.requestOrigin != "string" || typeof r.operation != "string") && De("registry lookup fields must be strings");
9633
- const t = Ro.clients.find((a) => a.clientId === r.clientId && a.requestOrigin === r.requestOrigin), s = t?.operationBindings.find((a) => a.operation === r.operation);
9686
+ const t = Po.clients.find((a) => a.clientId === r.clientId && a.requestOrigin === r.requestOrigin), s = t?.operationBindings.find((a) => a.operation === r.operation);
9634
9687
  return (!t || !s) && De("no exact registry binding exists"), kn({
9635
9688
  audience: s.audience,
9636
9689
  callbackUri: t.callbackUri,
@@ -9639,17 +9692,17 @@ function vh(e) {
9639
9692
  maxLifetimeSeconds: s.maxLifetimeSeconds,
9640
9693
  operation: s.operation,
9641
9694
  requestOrigin: t.requestOrigin,
9642
- registryReleaseSha256: Ro.registryReleaseSha256,
9695
+ registryReleaseSha256: Po.registryReleaseSha256,
9643
9696
  registryRow: s.registryRow,
9644
9697
  serviceActivationState: s.serviceActivationState,
9645
9698
  serviceInstance: s.serviceInstance
9646
9699
  });
9647
9700
  }
9648
- const bh = /^\/transaction\/([0-9a-f]{64})$/u, Wn = new TextEncoder(), Eh = Uint8Array.prototype.fill, Ah = Object.freeze({ resolveRegistryBinding: vh });
9649
- function No(e) {
9701
+ const mh = /^\/transaction\/([0-9a-f]{64})$/u, Wn = new TextEncoder(), Ih = Uint8Array.prototype.fill, wh = Object.freeze({ resolveRegistryBinding: Ah });
9702
+ function Ro(e) {
9650
9703
  if (e instanceof Uint8Array)
9651
9704
  try {
9652
- Eh.call(e, 0);
9705
+ Ih.call(e, 0);
9653
9706
  } catch {
9654
9707
  }
9655
9708
  }
@@ -9664,10 +9717,10 @@ function jn(e) {
9664
9717
  }
9665
9718
  return !0;
9666
9719
  }
9667
- function Lo() {
9720
+ function No() {
9668
9721
  return new Ue("INVALID_TRANSACTION");
9669
9722
  }
9670
- function zr(e, r, t, s) {
9723
+ function Hr(e, r, t, s) {
9671
9724
  const a = e.createElement("label"), d = e.createElement("span");
9672
9725
  d.textContent = t, a.append(d, s), r.append(a);
9673
9726
  }
@@ -9711,7 +9764,7 @@ function cr(e, r) {
9711
9764
  } catch {
9712
9765
  }
9713
9766
  }
9714
- function Ms({
9767
+ function Bs({
9715
9768
  clipboard: e,
9716
9769
  controller: r,
9717
9770
  document: t,
@@ -9761,7 +9814,7 @@ function Ms({
9761
9814
  }
9762
9815
  if (!Array.isArray(M) || M.length === 0)
9763
9816
  return a.replaceChildren(), a.hidden = !0, !1;
9764
- a.hidden = !1, P = a_(a, M, { document: t });
9817
+ a.hidden = !1, P = d_(a, M, { document: t });
9765
9818
  const C = E;
9766
9819
  for (const B of P.rows) {
9767
9820
  const { entry: Y } = B, _ = async (g) => {
@@ -9843,7 +9896,7 @@ function Ms({
9843
9896
  refresh: D
9844
9897
  });
9845
9898
  }
9846
- function mh({
9899
+ function Sh({
9847
9900
  clipboard: e = globalThis.navigator?.clipboard,
9848
9901
  controller: r = null,
9849
9902
  document: t,
@@ -9864,7 +9917,7 @@ function mh({
9864
9917
  const m = t.createElement("input");
9865
9918
  m.type = "text", m.name = "username", m.autocomplete = "username", m.required = !0;
9866
9919
  const N = t.createElement("input");
9867
- N.type = "password", N.name = "password", N.autocomplete = "current-password", N.required = !0, zr(t, w, "Username", m), zr(t, w, "Password", N);
9920
+ N.type = "password", N.name = "password", N.autocomplete = "current-password", N.required = !0, Hr(t, w, "Username", m), Hr(t, w, "Password", N);
9868
9921
  let L = null;
9869
9922
  if (r && typeof r == "object") {
9870
9923
  L = t.createElement("input"), L.type = "checkbox", L.dataset.walletRemember = "prf-only", L.checked = !1, L.defaultChecked = !1;
@@ -9874,13 +9927,13 @@ function mh({
9874
9927
  } catch {
9875
9928
  oe = !1;
9876
9929
  }
9877
- L.disabled = !oe, zr(t, w, "Remember on this device", L);
9930
+ L.disabled = !oe, Hr(t, w, "Remember on this device", L);
9878
9931
  }
9879
9932
  const D = t.createElement("p");
9880
9933
  D.dataset.walletRememberStatus = "true";
9881
9934
  let U = () => {
9882
9935
  };
9883
- const M = Ms({
9936
+ const M = Bs({
9884
9937
  clipboard: e,
9885
9938
  controller: r,
9886
9939
  document: t,
@@ -9961,7 +10014,7 @@ function mh({
9961
10014
  remove: F
9962
10015
  });
9963
10016
  }
9964
- function Bs({
10017
+ function Vs({
9965
10018
  document: e,
9966
10019
  mount: r = null,
9967
10020
  submitLabel: t = "Compare legacy account",
@@ -9976,7 +10029,7 @@ function Bs({
9976
10029
  const E = e.createElement("form");
9977
10030
  E.noValidate = !0;
9978
10031
  const I = e.createElement("textarea");
9979
- I.name = "mnemonic", I.autocomplete = "off", I.required = !0, zr(e, E, "Mnemonic", I);
10032
+ I.name = "mnemonic", I.autocomplete = "off", I.required = !0, Hr(e, E, "Mnemonic", I);
9980
10033
  const P = e.createElement("button");
9981
10034
  P.type = "submit", P.dataset.walletAction = "confirm-legacy-mnemonic", P.textContent = t;
9982
10035
  const w = e.createElement("button");
@@ -10008,7 +10061,7 @@ function Bs({
10008
10061
  remove: M
10009
10062
  });
10010
10063
  }
10011
- function Ih({ document: e, mount: r = null, title: t = "Choose legacy wallet profile" }) {
10064
+ function kh({ document: e, mount: r = null, title: t = "Choose legacy wallet profile" }) {
10012
10065
  const s = r ?? e?.body;
10013
10066
  if (!e?.createElement || !s?.append) throw new Ue("DOM_UNAVAILABLE");
10014
10067
  const a = e.createElement("section");
@@ -10029,7 +10082,7 @@ function Ih({ document: e, mount: r = null, title: t = "Choose legacy wallet pro
10029
10082
  const h = e.createElement("option");
10030
10083
  h.value = _, h.textContent = f, _ === "" && (h.disabled = !0, h.selected = !0), I.append(h);
10031
10084
  }
10032
- zr(e, E, "Legacy profile", I);
10085
+ Hr(e, E, "Legacy profile", I);
10033
10086
  const P = e.createElement("button");
10034
10087
  P.type = "submit", P.dataset.walletAction = "continue-legacy-login", P.textContent = "Continue";
10035
10088
  const w = e.createElement("button");
@@ -10061,13 +10114,13 @@ function Ih({ document: e, mount: r = null, title: t = "Choose legacy wallet pro
10061
10114
  }
10062
10115
  return Object.freeze({ cancel: C, promise: D });
10063
10116
  }
10064
- function sn(e, r, t, s) {
10117
+ function on(e, r, t, s) {
10065
10118
  const a = e.createElement("div"), d = e.createElement("strong");
10066
10119
  d.textContent = `${t}: `;
10067
10120
  const b = e.createElement("span");
10068
10121
  b.textContent = String(s ?? ""), a.append(d, b), r.append(a);
10069
10122
  }
10070
- function Vs(e, r, t, s = null) {
10123
+ function Hs(e, r, t, s = null) {
10071
10124
  const a = s ?? e?.body, d = e.createElement("section");
10072
10125
  d.className = "wallet-complete";
10073
10126
  const b = e.createElement("h1");
@@ -10083,7 +10136,7 @@ function Vs(e, r, t, s = null) {
10083
10136
  }
10084
10137
  }), d.append(b, E, I), a?.replaceChildren?.(d);
10085
10138
  }
10086
- function Hs(e, r = "The wallet request could not be completed. Close this window.", t = null) {
10139
+ function zs(e, r = "The wallet request could not be completed. Close this window.", t = null) {
10087
10140
  const s = t ?? e?.body;
10088
10141
  if (!e?.createElement || !s?.replaceChildren) return;
10089
10142
  const a = e.createElement("section");
@@ -10093,7 +10146,7 @@ function Hs(e, r = "The wallet request could not be completed. Close this window
10093
10146
  const b = e.createElement("p");
10094
10147
  b.textContent = r, a.append(d, b), s.replaceChildren(a);
10095
10148
  }
10096
- function wh({
10149
+ function Oh({
10097
10150
  clipboard: e,
10098
10151
  controller: r,
10099
10152
  document: t,
@@ -10106,7 +10159,7 @@ function wh({
10106
10159
  }) {
10107
10160
  const P = t.createElement("section");
10108
10161
  P.className = "wallet-account";
10109
- const w = t.createElement("div"), m = o_(w, s, { document: t }), N = t.createElement("section");
10162
+ const w = t.createElement("div"), m = c_(w, s, { document: t }), N = t.createElement("section");
10110
10163
  N.className = "wallet-approval-card";
10111
10164
  const L = t.createElement("h2");
10112
10165
  L.textContent = "Asset review approval";
@@ -10118,22 +10171,22 @@ function wh({
10118
10171
  B.type = "button", B.dataset.walletAction = "return-to-site", B.textContent = "Return to site";
10119
10172
  const Y = t.createElement("section");
10120
10173
  Y.className = "wallet-legacy-migration";
10121
- const _ = __(Y, { document: t });
10174
+ const _ = f_(Y, { document: t });
10122
10175
  let f = !1;
10123
10176
  try {
10124
10177
  f = r.canForgetRememberedWallet?.() === !0;
10125
10178
  } catch {
10126
10179
  f = !1;
10127
10180
  }
10128
- const h = f ? t.createElement("section") : null, u = h ? s_(h, { document: t }) : null;
10181
+ const h = f ? t.createElement("section") : null, u = h ? l_(h, { document: t }) : null;
10129
10182
  u && (u.launch.dataset.walletAction = "forget-stored-wallet");
10130
- const g = Ms({
10183
+ const g = Bs({
10131
10184
  clipboard: e,
10132
10185
  controller: r,
10133
10186
  document: t
10134
10187
  }), v = t.createElement("p");
10135
10188
  v.className = "wallet-account-exit-status", P.append(w, N), h && P.append(h), g?.hasEntries && P.append(g.container), P.append(B, C, Y), b.replaceChildren(P);
10136
- const k = new l_({
10189
+ const k = new h_({
10137
10190
  credentialRound: async (fe) => {
10138
10191
  const Te = d({
10139
10192
  controller: null,
@@ -10155,11 +10208,11 @@ function wh({
10155
10208
  const Ce = (fe) => !ae && Re === fe, Pe = (fe) => {
10156
10209
  if (!Ce(fe)) throw new Error("account surface closed");
10157
10210
  }, mt = (fe) => (fe instanceof Uint8Array && Z.add(fe), fe), It = (fe) => {
10158
- No(fe), Z.delete(fe);
10211
+ Ro(fe), Z.delete(fe);
10159
10212
  }, Vt = () => {
10160
10213
  const fe = [...Z];
10161
10214
  Z.clear();
10162
- for (const Te of fe) No(Te);
10215
+ for (const Te of fe) Ro(Te);
10163
10216
  }, at = () => {
10164
10217
  const fe = ee || ie || ce;
10165
10218
  B.disabled = oe, C.disabled = oe, ae || (M.disabled = fe || !m.approvalAvailable, _.launch.disabled = fe, u && (u.launch.disabled = fe || Q, u.confirm.disabled = fe, u.cancel.disabled = fe));
@@ -10184,7 +10237,7 @@ function wh({
10184
10237
  try {
10185
10238
  const nt = await k.confirm();
10186
10239
  Pe(Te);
10187
- const $e = await c_(nt, {
10240
+ const $e = await __(nt, {
10188
10241
  assertCurrent: () => Pe(Te),
10189
10242
  clipboard: e,
10190
10243
  container: U,
@@ -10223,14 +10276,14 @@ function wh({
10223
10276
  const $t = ze?.usernameControl?.form ?? ze?.passwordControl?.form ?? $e?.form, Nn = $t?.parentNode;
10224
10277
  cr($t, [ze?.usernameControl, ze?.passwordControl]), Nn?.remove?.(), hr = { passwordUtf8: dr, usernameUtf8: Pt };
10225
10278
  } else {
10226
- $e = Bs({ document: t, mount: b }), R.add($e);
10279
+ $e = Vs({ document: t, mount: b }), R.add($e);
10227
10280
  const ze = await $e.promise;
10228
10281
  Pe(nt);
10229
10282
  const lt = ze?.mnemonicControl?.value;
10230
10283
  if (!jn(lt)) throw new Error("invalid legacy credentials");
10231
10284
  _r = mt(Wn.encode(lt)), cr(ze.form, [ze.mnemonicControl]), ze.section?.remove?.(), hr = { mnemonicUtf8: _r };
10232
10285
  }
10233
- if ($e?.promise && R.delete($e), Ae = await d_({
10286
+ if ($e?.promise && R.delete($e), Ae = await u_({
10234
10287
  accountIndex: 0,
10235
10288
  credentials: hr,
10236
10289
  operation: "sdn.auth.raw-challenge.v1",
@@ -10239,14 +10292,14 @@ function wh({
10239
10292
  assertCurrent: () => Pe(nt),
10240
10293
  ownHandle: (ze) => F.add(ze)
10241
10294
  }), Pe(nt), !Ae?.handle) throw new Error("legacy derivation failed");
10242
- const Kr = Te === "password-fast-v1-legacy" ? "sdn-fast-password-auth-v1-legacy" : "sdn-bip39-auth-v1-legacy", Qe = Array.isArray(Ae.identity?.keys) ? Ae.identity.keys.find((ze) => ze?.purpose === "sdn-authentication") : null;
10243
- if (Ae.identity?.identityScheme !== Kr || Ae.identity?.seedProfile !== Te || typeof Ae.identity?.accountXpub != "string" || !Qe || typeof Qe.publicKeyHex != "string" || !/^[0-9a-f]{64}$/u.test(Qe.publicKeyHex))
10295
+ const qr = Te === "password-fast-v1-legacy" ? "sdn-fast-password-auth-v1-legacy" : "sdn-bip39-auth-v1-legacy", Qe = Array.isArray(Ae.identity?.keys) ? Ae.identity.keys.find((ze) => ze?.purpose === "sdn-authentication") : null;
10296
+ if (Ae.identity?.identityScheme !== qr || Ae.identity?.seedProfile !== Te || typeof Ae.identity?.accountXpub != "string" || !Qe || typeof Qe.publicKeyHex != "string" || !/^[0-9a-f]{64}$/u.test(Qe.publicKeyHex))
10244
10297
  throw new Error("legacy identity invalid");
10245
- const Yr = Ae.identity;
10298
+ const Kr = Ae.identity;
10246
10299
  if (!Dt(Ae.handle)) throw new Error("legacy destruction failed");
10247
10300
  Ae = null, Pe(nt);
10248
10301
  const Ct = s.keys.find((ze) => ze.purpose === "sdn-authentication");
10249
- _.result.replaceChildren(), sn(t, _.result, "Current account xpub", s.accountXpub), sn(t, _.result, "Legacy account xpub", Yr.accountXpub), sn(t, _.result, "Current authentication key", Ct?.publicKeyHex), sn(t, _.result, "Legacy authentication key", Qe.publicKeyHex);
10302
+ _.result.replaceChildren(), on(t, _.result, "Current account xpub", s.accountXpub), on(t, _.result, "Legacy account xpub", Kr.accountXpub), on(t, _.result, "Current authentication key", Ct?.publicKeyHex), on(t, _.result, "Legacy authentication key", Qe.publicKeyHex);
10250
10303
  } catch {
10251
10304
  Ce(nt) && (_.result.textContent = "Legacy account comparison could not be completed.");
10252
10305
  } finally {
@@ -10300,14 +10353,14 @@ function wh({
10300
10353
  }, Zt = () => {
10301
10354
  const fe = k.destroy(), Te = Ht();
10302
10355
  return fe && Te && ue === 0 && !ie && !ee;
10303
- }, ct = () => (Xe(!1), Ee || (Ee = !0, B.disabled = !0, C.disabled = !0, B.removeEventListener?.("click", zt), C.removeEventListener?.("click", qr), P.remove?.()), Zt()), lr = (fe, Te, nt, { requireTrustedEvent: $e = !0 } = {}) => $e && fe?.isTrusted !== !0 ? Promise.resolve() : pe || (oe || Ee ? Promise.reject(new Ue("STALE_CONTROLLER")) : (Xe(!0), Zt() ? (oe = !0, B.disabled = !0, C.disabled = !0, pe = (async () => {
10304
- E(), Vs(t, null, nt, b);
10356
+ }, ct = () => (Xe(!1), Ee || (Ee = !0, B.disabled = !0, C.disabled = !0, B.removeEventListener?.("click", zt), C.removeEventListener?.("click", jr), P.remove?.()), Zt()), lr = (fe, Te, nt, { requireTrustedEvent: $e = !0 } = {}) => $e && fe?.isTrusted !== !0 ? Promise.resolve() : pe || (oe || Ee ? Promise.reject(new Ue("STALE_CONTROLLER")) : (Xe(!0), Zt() ? (oe = !0, B.disabled = !0, C.disabled = !0, pe = (async () => {
10357
+ E(), Hs(t, null, nt, b);
10305
10358
  try {
10306
10359
  const Pt = await Te();
10307
10360
  if (!a()) throw new Ue("STALE_CONTROLLER");
10308
10361
  return Pt;
10309
10362
  } catch (Pt) {
10310
- throw a() && Hs(t, void 0, b), Pt;
10363
+ throw a() && zs(t, void 0, b), Pt;
10311
10364
  }
10312
10365
  })(), pe) : (v.textContent = "Secure cleanup is still pending. Retry Return or Logout.", B.disabled = !1, C.disabled = !1, Promise.reject(new Ue("DESTRUCTION_FAILED"))))), zt = (fe) => {
10313
10366
  lr(
@@ -10316,7 +10369,7 @@ function wh({
10316
10369
  "Returning to the requesting site."
10317
10370
  ).catch(() => {
10318
10371
  });
10319
- }, qr = (fe) => {
10372
+ }, jr = (fe) => {
10320
10373
  lr(
10321
10374
  fe,
10322
10375
  () => r.logout(),
@@ -10324,7 +10377,7 @@ function wh({
10324
10377
  ).catch(() => {
10325
10378
  });
10326
10379
  };
10327
- return M.addEventListener("click", wt), _.launch.addEventListener("click", pt), u?.launch.addEventListener?.("click", yt), u?.confirm.addEventListener?.("click", Ot), u?.cancel.addEventListener?.("click", kt), B.addEventListener("click", zt), C.addEventListener("click", qr), Object.freeze({
10380
+ return M.addEventListener("click", wt), _.launch.addEventListener("click", pt), u?.launch.addEventListener?.("click", yt), u?.confirm.addEventListener?.("click", Ot), u?.cancel.addEventListener?.("click", kt), B.addEventListener("click", zt), C.addEventListener("click", jr), Object.freeze({
10328
10381
  destroy: ct,
10329
10382
  logout: () => lr(
10330
10383
  null,
@@ -10334,24 +10387,24 @@ function wh({
10334
10387
  )
10335
10388
  });
10336
10389
  }
10337
- function Sh(e) {
10390
+ function Ph(e) {
10338
10391
  const r = e?.pathname, t = e?.search ?? "", s = e?.hash ?? "";
10339
- if (typeof r != "string" || t !== "" || s !== "") throw Lo();
10340
- const a = bh.exec(r);
10341
- if (!a) throw Lo();
10392
+ if (typeof r != "string" || t !== "" || s !== "") throw No();
10393
+ const a = mh.exec(r);
10394
+ if (!a) throw No();
10342
10395
  return a[1];
10343
10396
  }
10344
- function kh(e) {
10345
- const r = e?.window ?? globalThis.window, t = e?.document ?? r?.document ?? globalThis.document, s = e?.mount ?? t?.body, a = typeof r?.fetch == "function" ? r.fetch.bind(r) : typeof globalThis.fetch == "function" ? globalThis.fetch.bind(globalThis) : null, d = e?.relay ?? (e?.controller ? null : X_({
10397
+ function Rh(e) {
10398
+ const r = e?.window ?? globalThis.window, t = e?.document ?? r?.document ?? globalThis.document, s = e?.mount ?? t?.body, a = typeof r?.fetch == "function" ? r.fetch.bind(r) : typeof globalThis.fetch == "function" ? globalThis.fetch.bind(globalThis) : null, d = e?.relay ?? (e?.controller ? null : Z_({
10346
10399
  fetch: e?.fetch ?? a,
10347
10400
  location: e?.location ?? r?.location
10348
- })), b = e?.registry ?? Ah, E = e?.controller ?? new Z_({
10401
+ })), b = e?.registry ?? wh, E = e?.controller ?? new rh({
10349
10402
  ...e,
10350
10403
  document: t,
10351
10404
  registry: b,
10352
10405
  relay: d,
10353
10406
  window: r
10354
- }), I = e?.credentialPrompt ?? ((R) => mh(R));
10407
+ }), I = e?.credentialPrompt ?? ((R) => Sh(R));
10355
10408
  let P = null, w = null, m = null, N = null, L = null, D = [], U = 0, M = !1;
10356
10409
  const C = () => {
10357
10410
  (P?.destroy?.() ?? !0) && (P = null), w = null;
@@ -10394,14 +10447,14 @@ function kh(e) {
10394
10447
  const R = U;
10395
10448
  return M ? (N = Promise.reject(new Ue("STALE_CONTROLLER")), N) : (N = (async () => {
10396
10449
  try {
10397
- const F = Sh(r?.location);
10450
+ const F = Ph(r?.location);
10398
10451
  if (typeof E.prepare != "function" || typeof E.executePrepared != "function" || typeof E.unlockPassword != "function") {
10399
10452
  const ae = await E.execute(F);
10400
10453
  return h(R), ae;
10401
10454
  }
10402
10455
  const V = await E.prepare(F);
10403
10456
  if (h(R), V.transaction.operation === "sdn.auth.raw-challenge.v1") {
10404
- const ae = Ih({
10457
+ const ae = kh({
10405
10458
  document: t,
10406
10459
  mount: s,
10407
10460
  title: `Choose the legacy profile for ${V.binding.clientDisplayName}`
@@ -10415,7 +10468,7 @@ function kh(e) {
10415
10468
  mount: s,
10416
10469
  title: `Sign in to ${V.binding.clientDisplayName}`,
10417
10470
  transaction: V
10418
- }) : Bs({
10471
+ }) : Vs({
10419
10472
  document: t,
10420
10473
  mount: s,
10421
10474
  submitLabel: "Continue",
@@ -10460,7 +10513,7 @@ function kh(e) {
10460
10513
  }
10461
10514
  }
10462
10515
  const ee = await E.executePrepared(V);
10463
- return h(R), u(m), V.transaction.operation === "sdn.wallet.account.v1" ? (w = E.copyPublicIdentity(), P = wh({
10516
+ return h(R), u(m), V.transaction.operation === "sdn.wallet.account.v1" ? (w = E.copyPublicIdentity(), P = Oh({
10464
10517
  clipboard: e?.clipboard ?? globalThis.navigator?.clipboard,
10465
10518
  controller: E,
10466
10519
  document: t,
@@ -10470,7 +10523,7 @@ function kh(e) {
10470
10523
  mount: s,
10471
10524
  onClear: C,
10472
10525
  wasm: e?.wasm
10473
- })) : (w = null, t?.createElement && s?.replaceChildren && Vs(
10526
+ })) : (w = null, t?.createElement && s?.replaceChildren && Hs(
10474
10527
  t,
10475
10528
  r,
10476
10529
  "The wallet request completed successfully.",
@@ -10478,7 +10531,7 @@ function kh(e) {
10478
10531
  )), ee;
10479
10532
  } catch (F) {
10480
10533
  const V = !f(R);
10481
- throw m?.cancel?.(), m = null, C(), k(), V || Hs(t, F?.code === "USER_CANCELLED" ? "Cancelled. You may close this window." : void 0, s), await (L ?? E.destroy(V ? "stale-startup" : "startup-failure")), V && F?.code !== "DESTRUCTION_FAILED" ? new Ue("STALE_CONTROLLER") : F;
10534
+ throw m?.cancel?.(), m = null, C(), k(), V || zs(t, F?.code === "USER_CANCELLED" ? "Cancelled. You may close this window." : void 0, s), await (L ?? E.destroy(V ? "stale-startup" : "startup-failure")), V && F?.code !== "DESTRUCTION_FAILED" ? new Ue("STALE_CONTROLLER") : F;
10482
10535
  }
10483
10536
  })(), N);
10484
10537
  },
@@ -10489,24 +10542,24 @@ function kh(e) {
10489
10542
  }
10490
10543
  });
10491
10544
  }
10492
- async function Oh(e) {
10493
- const r = kh(e);
10545
+ async function Nh(e) {
10546
+ const r = Rh(e);
10494
10547
  return await r.start(), r;
10495
10548
  }
10496
10549
  const un = document.querySelector("[data-wallet-origin-root]") ?? document.body;
10497
- async function Ph() {
10550
+ async function Lh() {
10498
10551
  if (window.top !== window) throw new Error("Wallet origin cannot run in a frame");
10499
- if (getComputedStyle(document.documentElement).getPropertyValue("--sdn-wallet-origin-style-ready").trim() !== '"2.0.32"') throw new Error("Wallet origin style integrity failed");
10500
- const r = await Pl();
10501
- await Oh({ document, mount: un, wasm: r, window });
10552
+ if (getComputedStyle(document.documentElement).getPropertyValue("--sdn-wallet-origin-style-ready").trim() !== '"2.1.0"') throw new Error("Wallet origin style integrity failed");
10553
+ const r = await Ll();
10554
+ await Nh({ document, mount: un, wasm: r, window });
10502
10555
  }
10503
- Ph().catch(() => {
10556
+ Lh().catch(() => {
10504
10557
  if (un.childElementCount === 1 && un.firstElementChild?.classList?.contains("wallet-terminal-error") === !0)
10505
10558
  return;
10506
10559
  const e = document.createElement("p");
10507
10560
  e.className = "wallet-error", e.textContent = "The wallet could not start. Close this window and try again.", un.replaceChildren(e);
10508
10561
  });
10509
- var Rh = (() => {
10562
+ var Th = (() => {
10510
10563
  var e = import.meta.url;
10511
10564
  return function(r = {}) {
10512
10565
  if (!(r.wasmBinary instanceof Uint8Array)) throw new Error("Verified WASM bytes are required");
@@ -10618,9 +10671,9 @@ var Rh = (() => {
10618
10671
  }) : at(i, o, c);
10619
10672
  }
10620
10673
  function Ht() {
10621
- var n = { a: Na };
10674
+ var n = { a: La };
10622
10675
  function i(c, l) {
10623
- return S = c.exports, M = S.xa, R(), Ui = S.za, ce(S.ya), Ce(), S;
10676
+ return S = c.exports, M = S.ya, R(), Ui = S.Aa, ce(S.za), Ce(), S;
10624
10677
  }
10625
10678
  Re();
10626
10679
  function o(c) {
@@ -10750,7 +10803,7 @@ var Rh = (() => {
10750
10803
  return pr(y), i;
10751
10804
  }
10752
10805
  return pr(c), i;
10753
- }, qr = () => zt([]), fe = (n) => zt([n]), Te = (n, i) => zt([n, i]), nt = (n, i, o) => zt([n, i, o]), $e = () => {
10806
+ }, jr = () => zt([]), fe = (n) => zt([n]), Te = (n, i) => zt([n, i]), nt = (n, i, o) => zt([n, i, o]), $e = () => {
10754
10807
  var n = yt.pop();
10755
10808
  n || Pe("no exception to throw");
10756
10809
  var i = n.excPtr;
@@ -10788,7 +10841,7 @@ var Rh = (() => {
10788
10841
  if (typeof crypto == "object" && typeof crypto.getRandomValues == "function")
10789
10842
  return (n) => crypto.getRandomValues(n);
10790
10843
  Pe("initRandomDevice");
10791
- }, Kr = (n) => (Kr = hr())(n), Qe = { resolve: function() {
10844
+ }, qr = (n) => (qr = hr())(n), Qe = { resolve: function() {
10792
10845
  for (var n = "", i = !1, o = arguments.length - 1; o >= -1 && !i; o--) {
10793
10846
  var c = o >= 0 ? arguments[o] : p.cwd();
10794
10847
  if (typeof c != "string")
@@ -10815,10 +10868,10 @@ var Rh = (() => {
10815
10868
  for (var x = [], O = A; O < c.length; O++)
10816
10869
  x.push("..");
10817
10870
  return x = x.concat(l.slice(A)), x.join("/");
10818
- } }, Yr = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, Ct = (n, i, o) => {
10871
+ } }, Kr = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0, Ct = (n, i, o) => {
10819
10872
  for (var c = i + o, l = i; n[l] && !(l >= c); ) ++l;
10820
- if (l - i > 16 && n.buffer && Yr)
10821
- return Yr.decode(n.subarray(i, l));
10873
+ if (l - i > 16 && n.buffer && Kr)
10874
+ return Kr.decode(n.subarray(i, l));
10822
10875
  for (var y = ""; i < l; ) {
10823
10876
  var A = n[i++];
10824
10877
  if (!(A & 128)) {
@@ -11053,7 +11106,7 @@ var Rh = (() => {
11053
11106
  return { ptr: y, allocated: A };
11054
11107
  }, msync(n, i, o, c, l) {
11055
11108
  return Ie.stream_ops.write(n, i, 0, c, o, !1), 0;
11056
- } } }, zs = (n, i, o, c) => {
11109
+ } } }, $s = (n, i, o, c) => {
11057
11110
  var l = `al ${n}`;
11058
11111
  m(n, (y) => {
11059
11112
  B(y, `Loading data file "${n}" failed (no arrayBuffer).`), i(new Uint8Array(y)), l && Ce();
@@ -11063,26 +11116,26 @@ var Rh = (() => {
11063
11116
  else
11064
11117
  throw `Loading data file "${n}" failed.`;
11065
11118
  }), l && Re();
11066
- }, $s = (n, i, o, c, l, y) => {
11119
+ }, Ws = (n, i, o, c, l, y) => {
11067
11120
  p.createDataFile(n, i, o, c, l, y);
11068
- }, Ws = t.preloadPlugins || [], js = (n, i, o, c) => {
11121
+ }, js = t.preloadPlugins || [], qs = (n, i, o, c) => {
11069
11122
  typeof Browser < "u" && Browser.init();
11070
11123
  var l = !1;
11071
- return Ws.forEach((y) => {
11124
+ return js.forEach((y) => {
11072
11125
  l || y.canHandle(i) && (y.handle(n, i, o, c), l = !0);
11073
11126
  }), l;
11074
- }, qs = (n, i, o, c, l, y, A, O, x, H) => {
11127
+ }, Ks = (n, i, o, c, l, y, A, O, x, H) => {
11075
11128
  var G = i ? Qe.resolve(Ae.join2(n, i)) : n;
11076
11129
  function se(q) {
11077
11130
  function X(he) {
11078
- H?.(), O || $s(n, i, he, c, l, x), y?.(), Ce();
11131
+ H?.(), O || Ws(n, i, he, c, l, x), y?.(), Ce();
11079
11132
  }
11080
- js(q, G, X, () => {
11133
+ qs(q, G, X, () => {
11081
11134
  A?.(), Ce();
11082
11135
  }) || X(q);
11083
11136
  }
11084
- Re(), typeof o == "string" ? zs(o, (q) => se(q), A) : se(o);
11085
- }, Ks = (n) => {
11137
+ Re(), typeof o == "string" ? $s(o, (q) => se(q), A) : se(o);
11138
+ }, Ys = (n) => {
11086
11139
  var i = { r: 0, "r+": 2, w: 577, "w+": 578, a: 1089, "a+": 1090 }, o = i[n];
11087
11140
  if (typeof o > "u")
11088
11141
  throw new Error(`Unknown file open mode: ${n}`);
@@ -11471,7 +11524,7 @@ var Rh = (() => {
11471
11524
  }, open(n, i, o) {
11472
11525
  if (n === "")
11473
11526
  throw new p.ErrnoError(44);
11474
- i = typeof i == "string" ? Ks(i) : i, o = typeof o > "u" ? 438 : o, i & 64 ? o = o & 4095 | 32768 : o = 0;
11527
+ i = typeof i == "string" ? Ys(i) : i, o = typeof o > "u" ? 438 : o, i & 64 ? o = o & 4095 | 32768 : o = 0;
11475
11528
  var c;
11476
11529
  if (typeof n == "object")
11477
11530
  c = n;
@@ -11617,7 +11670,7 @@ var Rh = (() => {
11617
11670
  p.mkdir("/tmp"), p.mkdir("/home"), p.mkdir("/home/web_user");
11618
11671
  }, createDefaultDevices() {
11619
11672
  p.mkdir("/dev"), p.registerDevice(p.makedev(1, 3), { read: () => 0, write: (c, l, y, A, O) => A }), p.mkdev("/dev/null", p.makedev(1, 3)), Wt.register(p.makedev(5, 0), Wt.default_tty_ops), Wt.register(p.makedev(6, 0), Wt.default_tty1_ops), p.mkdev("/dev/tty", p.makedev(5, 0)), p.mkdev("/dev/tty1", p.makedev(6, 0));
11620
- var n = new Uint8Array(1024), i = 0, o = () => (i === 0 && (i = Kr(n).byteLength), n[--i]);
11673
+ var n = new Uint8Array(1024), i = 0, o = () => (i === 0 && (i = qr(n).byteLength), n[--i]);
11621
11674
  p.createDevice("/dev", "random", o), p.createDevice("/dev", "urandom", o), p.mkdir("/dev/shm"), p.mkdir("/dev/shm/tmp");
11622
11675
  }, createSpecialDirectories() {
11623
11676
  p.mkdir("/proc");
@@ -11854,7 +11907,7 @@ var Rh = (() => {
11854
11907
  var i = p.getStreamChecked(n);
11855
11908
  return i;
11856
11909
  } };
11857
- function Ys(n, i, o) {
11910
+ function Gs(n, i, o) {
11858
11911
  Le.varargs = o;
11859
11912
  try {
11860
11913
  var c = Le.getStreamFromFD(n);
@@ -11897,7 +11950,7 @@ var Rh = (() => {
11897
11950
  return -O.errno;
11898
11951
  }
11899
11952
  }
11900
- function Gs(n, i) {
11953
+ function Xs(n, i) {
11901
11954
  try {
11902
11955
  var o = Le.getStreamFromFD(n);
11903
11956
  return Le.doStat(p.stat, o.path, i);
@@ -11906,8 +11959,8 @@ var Rh = (() => {
11906
11959
  return -c.errno;
11907
11960
  }
11908
11961
  }
11909
- var Gr = (n, i, o) => er(n, _, i, o);
11910
- function Xs(n, i, o) {
11962
+ var Yr = (n, i, o) => er(n, _, i, o);
11963
+ function Js(n, i, o) {
11911
11964
  try {
11912
11965
  var c = Le.getStreamFromFD(n);
11913
11966
  c.getdents ||= p.readdir(c.path);
@@ -11922,7 +11975,7 @@ var Rh = (() => {
11922
11975
  var q = p.lookupNode(c.node, G);
11923
11976
  x = q.id, H = p.isChrdev(q.mode) ? 2 : p.isDir(q.mode) ? 4 : p.isLink(q.mode) ? 10 : 8;
11924
11977
  }
11925
- v[i + y >> 3] = BigInt(x), v[i + y + 8 >> 3] = BigInt((O + 1) * l), f[i + y + 16 >> 1] = 280, Y[i + y + 18 >> 0] = H, Gr(G, i + y + 19, 256), y += l, O += 1;
11978
+ v[i + y >> 3] = BigInt(x), v[i + y + 8 >> 3] = BigInt((O + 1) * l), f[i + y + 16 >> 1] = 280, Y[i + y + 18 >> 0] = H, Yr(G, i + y + 19, 256), y += l, O += 1;
11926
11979
  }
11927
11980
  return p.llseek(c, O * l, 0), y;
11928
11981
  } catch (X) {
@@ -11930,7 +11983,7 @@ var Rh = (() => {
11930
11983
  return -X.errno;
11931
11984
  }
11932
11985
  }
11933
- function Js(n, i, o) {
11986
+ function Qs(n, i, o) {
11934
11987
  Le.varargs = o;
11935
11988
  try {
11936
11989
  var c = Le.getStreamFromFD(n);
@@ -11994,7 +12047,7 @@ var Rh = (() => {
11994
12047
  return -X.errno;
11995
12048
  }
11996
12049
  }
11997
- function Qs(n, i) {
12050
+ function Zs(n, i) {
11998
12051
  try {
11999
12052
  return n = Le.getStr(n), Le.doStat(p.lstat, n, i);
12000
12053
  } catch (o) {
@@ -12002,7 +12055,7 @@ var Rh = (() => {
12002
12055
  return -o.errno;
12003
12056
  }
12004
12057
  }
12005
- function Zs(n, i, o, c) {
12058
+ function ea(n, i, o, c) {
12006
12059
  try {
12007
12060
  i = Le.getStr(i);
12008
12061
  var l = c & 256, y = c & 4096;
@@ -12012,7 +12065,7 @@ var Rh = (() => {
12012
12065
  return -A.errno;
12013
12066
  }
12014
12067
  }
12015
- function ea(n, i, o, c) {
12068
+ function ta(n, i, o, c) {
12016
12069
  Le.varargs = c;
12017
12070
  try {
12018
12071
  i = Le.getStr(i), i = Le.calculateAt(n, i);
@@ -12023,7 +12076,7 @@ var Rh = (() => {
12023
12076
  return -y.errno;
12024
12077
  }
12025
12078
  }
12026
- function ta(n, i) {
12079
+ function ra(n, i) {
12027
12080
  try {
12028
12081
  return n = Le.getStr(n), Le.doStat(p.stat, n, i);
12029
12082
  } catch (o) {
@@ -12031,8 +12084,8 @@ var Rh = (() => {
12031
12084
  return -o.errno;
12032
12085
  }
12033
12086
  }
12034
- var ra = 1, na = () => ra, ia = 9007199254740992, oa = -9007199254740992, Ni = (n) => n < oa || n > ia ? NaN : Number(n);
12035
- function sa(n, i) {
12087
+ var na = 1, ia = () => na, oa = 9007199254740992, sa = -9007199254740992, Ni = (n) => n < sa || n > oa ? NaN : Number(n);
12088
+ function aa(n, i) {
12036
12089
  n = Ni(n);
12037
12090
  var o = new Date(n * 1e3);
12038
12091
  h[i >> 2] = o.getUTCSeconds(), h[i + 4 >> 2] = o.getUTCMinutes(), h[i + 8 >> 2] = o.getUTCHours(), h[i + 12 >> 2] = o.getUTCDate(), h[i + 16 >> 2] = o.getUTCMonth(), h[i + 20 >> 2] = o.getUTCFullYear() - 1900, h[i + 24 >> 2] = o.getUTCDay();
@@ -12041,8 +12094,8 @@ var Rh = (() => {
12041
12094
  }
12042
12095
  var Li = (n) => {
12043
12096
  var i = lt(n) + 1, o = Vi(i);
12044
- return o && Gr(n, o, i), o;
12045
- }, aa = (n, i, o) => {
12097
+ return o && Yr(n, o, i), o;
12098
+ }, ca = (n, i, o) => {
12046
12099
  var c = (/* @__PURE__ */ new Date()).getFullYear(), l = new Date(c, 0, 1), y = new Date(c, 6, 1), A = l.getTimezoneOffset(), O = y.getTimezoneOffset(), x = Math.max(A, O);
12047
12100
  u[n >> 2] = x * 60, h[i >> 2] = +(A != O);
12048
12101
  function H(he) {
@@ -12051,33 +12104,33 @@ var Rh = (() => {
12051
12104
  }
12052
12105
  var G = H(l), se = H(y), q = Li(G), X = Li(se);
12053
12106
  O < A ? (u[o >> 2] = q, u[o + 4 >> 2] = X) : (u[o >> 2] = X, u[o + 4 >> 2] = q);
12054
- }, ca = () => {
12107
+ }, la = () => {
12055
12108
  Pe("");
12056
- }, la = () => Date.now(), Ti;
12109
+ }, da = () => Date.now(), Ti;
12057
12110
  Ti = () => performance.now();
12058
- var da = () => 536870912, _a = (n) => {
12111
+ var _a = () => 536870912, ha = (n) => {
12059
12112
  var i = M.buffer, o = (n - i.byteLength + 65535) / 65536;
12060
12113
  try {
12061
12114
  return M.grow(o), R(), 1;
12062
12115
  } catch {
12063
12116
  }
12064
- }, ha = (n) => {
12117
+ }, ua = (n) => {
12065
12118
  var i = _.length;
12066
12119
  n >>>= 0;
12067
- var o = da();
12120
+ var o = _a();
12068
12121
  if (n > o)
12069
12122
  return !1;
12070
12123
  for (var c = (x, H) => x + (H - x % H) % H, l = 1; l <= 4; l *= 2) {
12071
12124
  var y = i * (1 + 0.2 / l);
12072
12125
  y = Math.min(y, n + 100663296);
12073
- var A = Math.min(o, c(Math.max(n, y), 65536)), O = _a(A);
12126
+ var A = Math.min(o, c(Math.max(n, y), 65536)), O = ha(A);
12074
12127
  if (O)
12075
12128
  return !0;
12076
12129
  }
12077
12130
  return !1;
12078
- }, Tn = {}, ua = () => b || "./this.program", fr = () => {
12131
+ }, Tn = {}, fa = () => b || "./this.program", fr = () => {
12079
12132
  if (!fr.strings) {
12080
- var n = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", i = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: n, _: ua() };
12133
+ var n = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", i = { USER: "web_user", LOGNAME: "web_user", PATH: "/", PWD: "/", HOME: "/home/web_user", LANG: n, _: fa() };
12081
12134
  for (var o in Tn)
12082
12135
  Tn[o] === void 0 ? delete i[o] : i[o] = Tn[o];
12083
12136
  var c = [];
@@ -12086,23 +12139,23 @@ var Rh = (() => {
12086
12139
  fr.strings = c;
12087
12140
  }
12088
12141
  return fr.strings;
12089
- }, fa = (n, i) => {
12142
+ }, pa = (n, i) => {
12090
12143
  for (var o = 0; o < n.length; ++o)
12091
12144
  Y[i++ >> 0] = n.charCodeAt(o);
12092
12145
  Y[i >> 0] = 0;
12093
- }, pa = (n, i) => {
12146
+ }, ya = (n, i) => {
12094
12147
  var o = 0;
12095
12148
  return fr().forEach((c, l) => {
12096
12149
  var y = i + o;
12097
- u[n + l * 4 >> 2] = y, fa(c, y), o += c.length + 1;
12150
+ u[n + l * 4 >> 2] = y, pa(c, y), o += c.length + 1;
12098
12151
  }), 0;
12099
- }, ya = (n, i) => {
12152
+ }, ga = (n, i) => {
12100
12153
  var o = fr();
12101
12154
  u[n >> 2] = o.length;
12102
12155
  var c = 0;
12103
12156
  return o.forEach((l) => c += l.length + 1), u[i >> 2] = c, 0;
12104
12157
  };
12105
- function ga(n) {
12158
+ function va(n) {
12106
12159
  try {
12107
12160
  var i = Le.getStreamFromFD(n);
12108
12161
  return p.close(i), 0;
@@ -12111,7 +12164,7 @@ var Rh = (() => {
12111
12164
  return o.errno;
12112
12165
  }
12113
12166
  }
12114
- var va = (n, i, o, c) => {
12167
+ var ba = (n, i, o, c) => {
12115
12168
  for (var l = 0, y = 0; y < o; y++) {
12116
12169
  var A = u[i >> 2], O = u[i + 4 >> 2];
12117
12170
  i += 8;
@@ -12121,16 +12174,16 @@ var Rh = (() => {
12121
12174
  }
12122
12175
  return l;
12123
12176
  };
12124
- function ba(n, i, o, c) {
12177
+ function Ea(n, i, o, c) {
12125
12178
  try {
12126
- var l = Le.getStreamFromFD(n), y = va(l, i, o);
12179
+ var l = Le.getStreamFromFD(n), y = ba(l, i, o);
12127
12180
  return u[c >> 2] = y, 0;
12128
12181
  } catch (A) {
12129
12182
  if (typeof p > "u" || A.name !== "ErrnoError") throw A;
12130
12183
  return A.errno;
12131
12184
  }
12132
12185
  }
12133
- function Ea(n, i, o, c) {
12186
+ function Aa(n, i, o, c) {
12134
12187
  i = Ni(i);
12135
12188
  try {
12136
12189
  if (isNaN(i)) return 61;
@@ -12141,7 +12194,7 @@ var Rh = (() => {
12141
12194
  return y.errno;
12142
12195
  }
12143
12196
  }
12144
- var Aa = (n, i, o, c) => {
12197
+ var ma = (n, i, o, c) => {
12145
12198
  for (var l = 0, y = 0; y < o; y++) {
12146
12199
  var A = u[i >> 2], O = u[i + 4 >> 2];
12147
12200
  i += 8;
@@ -12151,22 +12204,22 @@ var Rh = (() => {
12151
12204
  }
12152
12205
  return l;
12153
12206
  };
12154
- function ma(n, i, o, c) {
12207
+ function Ia(n, i, o, c) {
12155
12208
  try {
12156
- var l = Le.getStreamFromFD(n), y = Aa(l, i, o);
12209
+ var l = Le.getStreamFromFD(n), y = ma(l, i, o);
12157
12210
  return u[c >> 2] = y, 0;
12158
12211
  } catch (A) {
12159
12212
  if (typeof p > "u" || A.name !== "ErrnoError") throw A;
12160
12213
  return A.errno;
12161
12214
  }
12162
12215
  }
12163
- var Ia = (n) => n, Xr = (n) => n % 4 === 0 && (n % 100 !== 0 || n % 400 === 0), wa = (n, i) => {
12216
+ var wa = (n) => n, Gr = (n) => n % 4 === 0 && (n % 100 !== 0 || n % 400 === 0), Sa = (n, i) => {
12164
12217
  for (var o = 0, c = 0; c <= i; o += n[c++])
12165
12218
  ;
12166
12219
  return o;
12167
- }, xi = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Di = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Sa = (n, i) => {
12220
+ }, xi = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Di = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ka = (n, i) => {
12168
12221
  for (var o = new Date(n.getTime()); i > 0; ) {
12169
- var c = Xr(o.getFullYear()), l = o.getMonth(), y = (c ? xi : Di)[l];
12222
+ var c = Gr(o.getFullYear()), l = o.getMonth(), y = (c ? xi : Di)[l];
12170
12223
  if (i > y - o.getDate())
12171
12224
  i -= y - o.getDate() + 1, o.setDate(1), l < 11 ? o.setMonth(l + 1) : (o.setMonth(0), o.setFullYear(o.getFullYear() + 1));
12172
12225
  else
@@ -12175,7 +12228,7 @@ var Rh = (() => {
12175
12228
  return o;
12176
12229
  }, Ci = (n, i) => {
12177
12230
  Y.set(n, i);
12178
- }, ka = (n, i, o, c) => {
12231
+ }, Oa = (n, i, o, c) => {
12179
12232
  var l = u[c + 40 >> 2], y = { tm_sec: h[c >> 2], tm_min: h[c + 4 >> 2], tm_hour: h[c + 8 >> 2], tm_mday: h[c + 12 >> 2], tm_mon: h[c + 16 >> 2], tm_year: h[c + 20 >> 2], tm_wday: h[c + 24 >> 2], tm_yday: h[c + 28 >> 2], tm_isdst: h[c + 32 >> 2], tm_gmtoff: h[c + 36 >> 2], tm_zone: l ? ur(l) : "" }, A = ur(o), O = { "%c": "%a %b %d %H:%M:%S %Y", "%D": "%m/%d/%y", "%F": "%Y-%m-%d", "%h": "%b", "%r": "%I:%M:%S %p", "%R": "%H:%M", "%T": "%H:%M:%S", "%x": "%m/%d/%y", "%X": "%H:%M:%S", "%Ec": "%c", "%EC": "%C", "%Ex": "%m/%d/%y", "%EX": "%H:%M:%S", "%Ey": "%y", "%EY": "%Y", "%Od": "%d", "%Oe": "%e", "%OH": "%H", "%OI": "%I", "%Om": "%m", "%OM": "%M", "%OS": "%S", "%Ou": "%u", "%OU": "%U", "%OV": "%V", "%Ow": "%w", "%OW": "%W", "%Oy": "%y" };
12180
12233
  for (var x in O)
12181
12234
  A = A.replace(new RegExp(x, "g"), O[x]);
@@ -12214,7 +12267,7 @@ var Rh = (() => {
12214
12267
  }
12215
12268
  }
12216
12269
  function Me(z) {
12217
- var _e = Sa(new Date(z.tm_year + 1900, 0, 1), z.tm_yday), Ke = new Date(_e.getFullYear(), 0, 4), Ve = new Date(_e.getFullYear() + 1, 0, 4), dt = he(Ke), je = he(Ve);
12270
+ var _e = ka(new Date(z.tm_year + 1900, 0, 1), z.tm_yday), Ke = new Date(_e.getFullYear(), 0, 4), Ve = new Date(_e.getFullYear() + 1, 0, 4), dt = he(Ke), je = he(Ve);
12218
12271
  return X(dt, _e) <= 0 ? X(je, _e) <= 0 ? _e.getFullYear() + 1 : _e.getFullYear() : _e.getFullYear() - 1;
12219
12272
  }
12220
12273
  var Ze = { "%a": (z) => H[z.tm_wday].substring(0, 3), "%A": (z) => H[z.tm_wday], "%b": (z) => G[z.tm_mon].substring(0, 3), "%B": (z) => G[z.tm_mon], "%C": (z) => {
@@ -12223,7 +12276,7 @@ var Rh = (() => {
12223
12276
  }, "%d": (z) => q(z.tm_mday, 2), "%e": (z) => se(z.tm_mday, 2, " "), "%g": (z) => Me(z).toString().substring(2), "%G": (z) => Me(z), "%H": (z) => q(z.tm_hour, 2), "%I": (z) => {
12224
12277
  var _e = z.tm_hour;
12225
12278
  return _e == 0 ? _e = 12 : _e > 12 && (_e -= 12), q(_e, 2);
12226
- }, "%j": (z) => q(z.tm_mday + wa(Xr(z.tm_year + 1900) ? xi : Di, z.tm_mon - 1), 3), "%m": (z) => q(z.tm_mon + 1, 2), "%M": (z) => q(z.tm_min, 2), "%n": () => `
12279
+ }, "%j": (z) => q(z.tm_mday + Sa(Gr(z.tm_year + 1900) ? xi : Di, z.tm_mon - 1), 3), "%m": (z) => q(z.tm_mon + 1, 2), "%M": (z) => q(z.tm_min, 2), "%n": () => `
12227
12280
  `, "%p": (z) => z.tm_hour >= 0 && z.tm_hour < 12 ? "AM" : "PM", "%S": (z) => q(z.tm_sec, 2), "%t": () => " ", "%u": (z) => z.tm_wday || 7, "%U": (z) => {
12228
12281
  var _e = z.tm_yday + 7 - z.tm_wday;
12229
12282
  return q(Math.floor(_e / 7), 2);
@@ -12232,12 +12285,12 @@ var Rh = (() => {
12232
12285
  if ((z.tm_wday + 371 - z.tm_yday - 2) % 7 <= 2 && _e++, _e) {
12233
12286
  if (_e == 53) {
12234
12287
  var Ve = (z.tm_wday + 371 - z.tm_yday) % 7;
12235
- Ve != 4 && (Ve != 3 || !Xr(z.tm_year)) && (_e = 1);
12288
+ Ve != 4 && (Ve != 3 || !Gr(z.tm_year)) && (_e = 1);
12236
12289
  }
12237
12290
  } else {
12238
12291
  _e = 52;
12239
12292
  var Ke = (z.tm_wday + 7 - z.tm_yday - 1) % 7;
12240
- (Ke == 4 || Ke == 5 && Xr(z.tm_year % 400 - 1)) && _e++;
12293
+ (Ke == 4 || Ke == 5 && Gr(z.tm_year % 400 - 1)) && _e++;
12241
12294
  }
12242
12295
  return q(_e, 2);
12243
12296
  }, "%w": (z) => z.tm_wday, "%W": (z) => {
@@ -12253,16 +12306,16 @@ var Rh = (() => {
12253
12306
  A = A.replace(/\0\0/g, "%");
12254
12307
  var We = $t(A, !1);
12255
12308
  return We.length > i ? 0 : (Ci(We, n), We.length - 1);
12256
- }, Oa = (n, i, o, c, l) => ka(n, i, o, c), Ui, be = (n) => Ui.get(n), Fi = (n) => {
12309
+ }, Pa = (n, i, o, c, l) => Oa(n, i, o, c), Ui, be = (n) => Ui.get(n), Fi = (n) => {
12257
12310
  var i = t["_" + n];
12258
12311
  return i;
12259
- }, Pa = (n) => {
12312
+ }, Ra = (n) => {
12260
12313
  var i = lt(n) + 1, o = xn(i);
12261
- return Gr(n, o, i), o;
12314
+ return Yr(n, o, i), o;
12262
12315
  }, Mi = (n, i, o, c, l) => {
12263
12316
  var y = { string: (he) => {
12264
12317
  var Me = 0;
12265
- return he != null && he !== 0 && (Me = Pa(he)), Me;
12318
+ return he != null && he !== 0 && (Me = Ra(he)), Me;
12266
12319
  }, array: (he) => {
12267
12320
  var Me = xn(he.length);
12268
12321
  return Ci(he, Me), Me;
@@ -12281,31 +12334,31 @@ var Rh = (() => {
12281
12334
  return H !== 0 && ve(H), A(he);
12282
12335
  }
12283
12336
  return q = X(q), q;
12284
- }, Ra = (n, i, o, c) => {
12337
+ }, Na = (n, i, o, c) => {
12285
12338
  var l = !o || o.every((A) => A === "number" || A === "boolean"), y = i !== "string";
12286
12339
  return y && l && !c ? Fi(n) : function() {
12287
12340
  return Mi(n, i, o, arguments);
12288
12341
  };
12289
12342
  }, Bi = function(n, i, o, c) {
12290
12343
  n || (n = this), this.parent = n, this.mount = n.mount, this.mounted = null, this.id = p.nextInode++, this.name = i, this.mode = o, this.node_ops = {}, this.stream_ops = {}, this.rdev = c;
12291
- }, Jr = 365, Qr = 146;
12344
+ }, Xr = 365, Jr = 146;
12292
12345
  Object.defineProperties(Bi.prototype, { read: { get: function() {
12293
- return (this.mode & Jr) === Jr;
12346
+ return (this.mode & Xr) === Xr;
12294
12347
  }, set: function(n) {
12295
- n ? this.mode |= Jr : this.mode &= ~Jr;
12348
+ n ? this.mode |= Xr : this.mode &= ~Xr;
12296
12349
  } }, write: { get: function() {
12297
- return (this.mode & Qr) === Qr;
12350
+ return (this.mode & Jr) === Jr;
12298
12351
  }, set: function(n) {
12299
- n ? this.mode |= Qr : this.mode &= ~Qr;
12352
+ n ? this.mode |= Jr : this.mode &= ~Jr;
12300
12353
  } }, isFolder: { get: function() {
12301
12354
  return p.isDir(this.mode);
12302
12355
  } }, isDevice: { get: function() {
12303
12356
  return p.isChrdev(this.mode);
12304
- } } }), p.FSNode = Bi, p.createPreloadedFile = qs, p.staticInit();
12305
- var Na = { p: Ot, r: Zt, a: qr, g: fe, n: Te, k: nt, ca: $e, o: Pt, S: dr, d: lr, U: Ys, qa: Gs, ia: Xs, sa: Js, oa: Qs, na: Zs, V: ea, pa: ta, ta: na, ja: sa, ha: aa, A: ca, M: la, W: Ti, ga: ha, la: pa, ma: ya, I: ga, T: ba, ka: Ea, ra: ma, Q: Ka, N: fc, R: vc, v: Ha, c: Da, e: Ba, i: Ta, q: Ca, j: Ua, y: ja, B: Ga, P: Xa, E: Wa, K: qa, wa: Qa, H: bc, $: nc, da: yc, Z: dc, D: rc, s: oc, ea: pc, ba: Za, L: gc, m: za, f: xa, b: La, h: Fa, l: Ma, w: $a, F: Va, x: Ya, va: tc, aa: ec, z: Ja, J: _c, G: Ec, _: lc, u: cc, O: ic, C: sc, Y: hc, ua: ac, X: uc, t: Ia, fa: Oa }, S = Ht(), Vi = t._malloc = (n) => (Vi = t._malloc = S.Aa)(n);
12306
- t._free = (n) => (t._free = S.Ba)(n), t._hd_secure_wipe = (n, i) => (t._hd_secure_wipe = S.Ca)(n, i), t._hd_alloc = (n) => (t._hd_alloc = S.Da)(n), t._hd_dealloc = (n) => (t._hd_dealloc = S.Ea)(n), t._hd_mnemonic_generate = (n, i, o, c) => (t._hd_mnemonic_generate = S.Fa)(n, i, o, c), t._hd_mnemonic_validate = (n, i) => (t._hd_mnemonic_validate = S.Ga)(n, i), t._hd_mnemonic_to_seed = (n, i, o, c) => (t._hd_mnemonic_to_seed = S.Ha)(n, i, o, c), t._hd_mnemonic_to_entropy = (n, i, o, c) => (t._hd_mnemonic_to_entropy = S.Ia)(n, i, o, c), t._hd_entropy_to_mnemonic = (n, i, o, c, l) => (t._hd_entropy_to_mnemonic = S.Ja)(n, i, o, c, l), t._hd_mnemonic_get_wordlist = (n) => (t._hd_mnemonic_get_wordlist = S.Ka)(n), t._hd_mnemonic_suggest_word = (n, i, o, c, l) => (t._hd_mnemonic_suggest_word = S.La)(n, i, o, c, l), t._hd_mnemonic_check_word = (n, i) => (t._hd_mnemonic_check_word = S.Ma)(n, i), t._hd_key_from_seed = (n, i, o) => (t._hd_key_from_seed = S.Na)(n, i, o), t._hd_key_from_xprv = (n) => (t._hd_key_from_xprv = S.Oa)(n), t._hd_key_from_xpub = (n) => (t._hd_key_from_xpub = S.Pa)(n), t._hd_key_derive_path = (n, i) => (t._hd_key_derive_path = S.Qa)(n, i), t._hd_key_derive_child = (n, i) => (t._hd_key_derive_child = S.Ra)(n, i), t._hd_key_derive_hardened = (n, i) => (t._hd_key_derive_hardened = S.Sa)(n, i), t._hd_key_get_private = (n, i, o) => (t._hd_key_get_private = S.Ta)(n, i, o), t._hd_key_get_public = (n, i, o) => (t._hd_key_get_public = S.Ua)(n, i, o), t._hd_key_get_chain_code = (n, i, o) => (t._hd_key_get_chain_code = S.Va)(n, i, o), t._hd_key_get_fingerprint = (n) => (t._hd_key_get_fingerprint = S.Wa)(n), t._hd_key_get_parent_fingerprint = (n) => (t._hd_key_get_parent_fingerprint = S.Xa)(n), t._hd_key_get_depth = (n) => (t._hd_key_get_depth = S.Ya)(n), t._hd_key_get_child_index = (n) => (t._hd_key_get_child_index = S.Za)(n), t._hd_key_serialize_xprv = (n, i, o) => (t._hd_key_serialize_xprv = S._a)(n, i, o), t._hd_key_serialize_xpub = (n, i, o) => (t._hd_key_serialize_xpub = S.$a)(n, i, o), t._hd_key_neutered = (n) => (t._hd_key_neutered = S.ab)(n), t._hd_key_is_neutered = (n) => (t._hd_key_is_neutered = S.bb)(n), t._hd_key_wipe = (n) => (t._hd_key_wipe = S.cb)(n), t._hd_key_clone = (n) => (t._hd_key_clone = S.db)(n), t._hd_key_destroy = (n) => (t._hd_key_destroy = S.eb)(n), t._hd_path_build = (n, i, o, c, l, y, A) => (t._hd_path_build = S.fb)(n, i, o, c, l, y, A), t._hd_path_parse = (n, i, o, c, l, y) => (t._hd_path_parse = S.gb)(n, i, o, c, l, y), t._hd_ed25519_sign = (n, i, o, c, l) => (t._hd_ed25519_sign = S.hb)(n, i, o, c, l), t._hd_ed25519_verify = (n, i, o, c, l, y) => (t._hd_ed25519_verify = S.ib)(n, i, o, c, l, y), t._hd_ed25519_pubkey_from_seed = (n, i, o) => (t._hd_ed25519_pubkey_from_seed = S.jb)(n, i, o), t._hd_slip10_ed25519_derive_path = (n, i, o, c, l) => (t._hd_slip10_ed25519_derive_path = S.kb)(n, i, o, c, l), t._hd_x25519_pubkey = (n, i, o) => (t._hd_x25519_pubkey = S.lb)(n, i, o), t._hd_ecdh_x25519 = (n, i, o, c) => (t._hd_ecdh_x25519 = S.mb)(n, i, o, c), t._hd_ecdh = (n, i, o, c, l, y, A) => (t._hd_ecdh = S.nb)(n, i, o, c, l, y, A), t._hd_ossl_hkdf_sha256 = (n, i, o, c, l, y, A, O) => (t._hd_ossl_hkdf_sha256 = S.ob)(n, i, o, c, l, y, A, O), t._hd_ossl_aes_gcm_encrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_ossl_aes_gcm_encrypt = S.pb)(n, i, o, c, l, y, A, O, x, H), t._hd_ossl_aes_gcm_decrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_ossl_aes_gcm_decrypt = S.qb)(n, i, o, c, l, y, A, O, x, H), t._hd_ossl_aes_ctr_encrypt = (n, i, o, c, l, y, A) => (t._hd_ossl_aes_ctr_encrypt = S.rb)(n, i, o, c, l, y, A), t._hd_ossl_aes_ctr_decrypt = (n, i, o, c, l, y, A) => (t._hd_ossl_aes_ctr_decrypt = S.sb)(n, i, o, c, l, y, A), t._hd_ecies_encrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_ecies_encrypt = S.tb)(n, i, o, c, l, y, A, O, x), t._hd_ecies_decrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_ecies_decrypt = S.ub)(n, i, o, c, l, y, A, O, x), t._hd_ecies_overhead = (n) => (t._hd_ecies_overhead = S.vb)(n), t._hd_aes_ctr_encrypt = (n, i, o, c, l, y, A, O) => (t._hd_aes_ctr_encrypt = S.wb)(n, i, o, c, l, y, A, O), t._hd_aes_ctr_decrypt = (n, i, o, c, l, y, A, O) => (t._hd_aes_ctr_decrypt = S.xb)(n, i, o, c, l, y, A, O), t._hd_x509_generate_private_key = (n, i, o) => (t._hd_x509_generate_private_key = S.yb)(n, i, o), t._hd_x509_export_private_key_pem = (n, i, o, c, l) => (t._hd_x509_export_private_key_pem = S.zb)(n, i, o, c, l), t._hd_x509_import_private_key_pem = (n, i, o, c) => (t._hd_x509_import_private_key_pem = S.Ab)(n, i, o, c), t._hd_x509_create_self_signed = (n, i, o, c, l, y, A) => (t._hd_x509_create_self_signed = S.Bb)(n, i, o, c, l, y, A), t._hd_x509_issue_certificate = (n, i, o, c, l, y, A, O, x, H, G, se, q) => (t._hd_x509_issue_certificate = S.Cb)(n, i, o, c, l, y, A, O, x, H, G, se, q), t._hd_x509_convert_certificate = (n, i, o, c, l, y) => (t._hd_x509_convert_certificate = S.Db)(n, i, o, c, l, y), t._hd_x509_parse_certificate_json = (n, i, o, c, l) => (t._hd_x509_parse_certificate_json = S.Eb)(n, i, o, c, l), t._hd_x509_verify_wallet_attestation = (n, i, o) => (t._hd_x509_verify_wallet_attestation = S.Fb)(n, i, o), t._hd_x509_export_pkcs12 = (n, i, o, c, l, y, A, O, x, H, G, se) => (t._hd_x509_export_pkcs12 = S.Gb)(n, i, o, c, l, y, A, O, x, H, G, se), t._hd_x509_import_pkcs12_json = (n, i, o, c, l) => (t._hd_x509_import_pkcs12_json = S.Hb)(n, i, o, c, l), t._hd_wasi_has_feature = (n) => (t._hd_wasi_has_feature = S.Ib)(n), t._hd_wasi_get_warning = (n) => (t._hd_wasi_get_warning = S.Jb)(n), t._hd_inject_entropy = (n, i) => (t._hd_inject_entropy = S.Kb)(n, i), t._hd_get_entropy_status = () => (t._hd_get_entropy_status = S.Lb)(), t._hd_get_version = () => (t._hd_get_version = S.Mb)(), t._hd_is_fips_mode = () => (t._hd_is_fips_mode = S.Nb)(), t._hd_get_version_string = () => (t._hd_get_version_string = S.Ob)(), t._hd_has_cryptopp = () => (t._hd_has_cryptopp = S.Pb)(), t._hd_aligned_derive_batch = (n, i, o) => (t._hd_aligned_derive_batch = S.Qb)(n, i, o), t._hd_aligned_sign_batch = (n, i, o, c, l) => (t._hd_aligned_sign_batch = S.Rb)(n, i, o, c, l), t._hd_aligned_verify_batch = (n, i, o, c, l) => (t._hd_aligned_verify_batch = S.Sb)(n, i, o, c, l), t._hd_aligned_stream_create = (n) => (t._hd_aligned_stream_create = S.Tb)(n), t._hd_aligned_stream_next = (n, i, o) => (t._hd_aligned_stream_next = S.Ub)(n, i, o), t._hd_aligned_stream_status = (n, i) => (t._hd_aligned_stream_status = S.Vb)(n, i), t._hd_aligned_stream_destroy = (n) => (t._hd_aligned_stream_destroy = S.Wb)(n), t._hd_aligned_from_extended_key = (n, i) => (t._hd_aligned_from_extended_key = S.Xb)(n, i), t._hd_aligned_to_extended_key = (n) => (t._hd_aligned_to_extended_key = S.Yb)(n), t._hd_aligned_derived_key_entry_size = () => (t._hd_aligned_derived_key_entry_size = S.Zb)(), t._hd_aligned_signature_entry_size = () => (t._hd_aligned_signature_entry_size = S._b)(), t._hd_aligned_extended_key_data_size = () => (t._hd_aligned_extended_key_data_size = S.$b)(), t._hd_aligned_batch_derive_request_size = () => (t._hd_aligned_batch_derive_request_size = S.ac)(), t._hd_hash_sha256 = (n, i, o, c) => (t._hd_hash_sha256 = S.bc)(n, i, o, c), t._hd_hash_sha512 = (n, i, o, c) => (t._hd_hash_sha512 = S.cc)(n, i, o, c), t._hd_hash_keccak256 = (n, i, o, c) => (t._hd_hash_keccak256 = S.dc)(n, i, o, c), t._hd_hash_ripemd160 = (n, i, o, c) => (t._hd_hash_ripemd160 = S.ec)(n, i, o, c), t._hd_hash_hash160 = (n, i, o, c) => (t._hd_hash_hash160 = S.fc)(n, i, o, c), t._hd_hash_blake2b = (n, i, o, c, l) => (t._hd_hash_blake2b = S.gc)(n, i, o, c, l), t._hd_hash_blake2s = (n, i, o, c, l) => (t._hd_hash_blake2s = S.hc)(n, i, o, c, l), t._hd_kdf_hkdf = (n, i, o, c, l, y, A, O) => (t._hd_kdf_hkdf = S.ic)(n, i, o, c, l, y, A, O), t._hd_kdf_pbkdf2 = (n, i, o, c, l, y, A) => (t._hd_kdf_pbkdf2 = S.jc)(n, i, o, c, l, y, A), t._hd_kdf_scrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_kdf_scrypt = S.kc)(n, i, o, c, l, y, A, O, x), t._hd_curve_pubkey_from_privkey = (n, i, o, c) => (t._hd_curve_pubkey_from_privkey = S.lc)(n, i, o, c), t._hd_secp256k1_sign = (n, i, o, c, l) => (t._hd_secp256k1_sign = S.mc)(n, i, o, c, l), t._hd_secp256k1_verify = (n, i, o, c, l, y) => (t._hd_secp256k1_verify = S.nc)(n, i, o, c, l, y), t._hd_secp256k1_sign_recoverable = (n, i, o, c) => (t._hd_secp256k1_sign_recoverable = S.oc)(n, i, o, c), t._hd_secp256k1_recover = (n, i, o, c) => (t._hd_secp256k1_recover = S.pc)(n, i, o, c), t._hd_curve_decompress_pubkey = (n, i, o, c) => (t._hd_curve_decompress_pubkey = S.qc)(n, i, o, c), t._hd_ecdh_secp256k1 = (n, i, o, c, l) => (t._hd_ecdh_secp256k1 = S.rc)(n, i, o, c, l), t._hd_p256_sign = (n, i, o, c, l) => (t._hd_p256_sign = S.sc)(n, i, o, c, l), t._hd_p256_verify = (n, i, o, c, l) => (t._hd_p256_verify = S.tc)(n, i, o, c, l), t._hd_ecdh_p256 = (n, i, o, c, l) => (t._hd_ecdh_p256 = S.uc)(n, i, o, c, l), t._hd_p384_sign = (n, i, o, c, l) => (t._hd_p384_sign = S.vc)(n, i, o, c, l), t._hd_p384_verify = (n, i, o, c, l) => (t._hd_p384_verify = S.wc)(n, i, o, c, l), t._hd_ecdh_p384 = (n, i, o, c, l) => (t._hd_ecdh_p384 = S.xc)(n, i, o, c, l), t._hd_aes_gcm_encrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_aes_gcm_encrypt = S.yc)(n, i, o, c, l, y, A, O, x, H), t._hd_aes_gcm_decrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_aes_gcm_decrypt = S.zc)(n, i, o, c, l, y, A, O, x, H), t._hd_sdn_derive_password_identity = (n, i, o, c, l, y, A, O, x) => (t._hd_sdn_derive_password_identity = S.Ac)(n, i, o, c, l, y, A, O, x), t._hd_sdn_derive_legacy_password_identity = (n, i, o, c, l, y, A, O, x) => (t._hd_sdn_derive_legacy_password_identity = S.Bc)(n, i, o, c, l, y, A, O, x), t._hd_sdn_import_legacy_mnemonic_identity = (n, i, o, c, l, y, A) => (t._hd_sdn_import_legacy_mnemonic_identity = S.Cc)(n, i, o, c, l, y, A), t._hd_sdn_import_remembered_identity = (n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me) => (t._hd_sdn_import_remembered_identity = S.Dc)(n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me), t._hd_sdn_sign_login_v1 = (n, i, o, c, l, y) => (t._hd_sdn_sign_login_v1 = S.Ec)(n, i, o, c, l, y), t._hd_sdn_sign_login_v2 = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_login_v2 = S.Fc)(n, i, o, c, l, y, A), t._hd_sdn_sign_publish_request = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_publish_request = S.Gc)(n, i, o, c, l, y, A), t._hd_sdn_sign_module_delivery_key = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_module_delivery_key = S.Hc)(n, i, o, c, l, y, A), t._hd_sdn_sign_asset_review_authority_activation = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_asset_review_authority_activation = S.Ic)(n, i, o, c, l, y, A), t._hd_sdn_sign_asset_review_decision = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_asset_review_decision = S.Jc)(n, i, o, c, l, y, A), t._hd_sdn_seal_remembered_identity = (n, i, o, c, l, y, A, O, x, H, G, se, q, X) => (t._hd_sdn_seal_remembered_identity = S.Kc)(n, i, o, c, l, y, A, O, x, H, G, se, q, X), t._hd_sdn_destroy_identity = (n) => (t._hd_sdn_destroy_identity = S.Lc)(n), t._plugin_get_manifest_flatbuffer = () => (t._plugin_get_manifest_flatbuffer = S.Mc)(), t._plugin_get_manifest_flatbuffer_size = () => (t._plugin_get_manifest_flatbuffer_size = S.Nc)(), t._hd_btc_tx_create = () => (t._hd_btc_tx_create = S.Oc)(), t._hd_btc_tx_create_v = (n) => (t._hd_btc_tx_create_v = S.Pc)(n), t._hd_btc_tx_add_input = (n, i, o, c, l, y, A) => (t._hd_btc_tx_add_input = S.Qc)(n, i, o, c, l, y, A), t._hd_btc_tx_add_output = (n, i, o, c) => (t._hd_btc_tx_add_output = S.Rc)(n, i, o, c), t._hd_btc_tx_add_p2pkh_output = (n, i, o) => (t._hd_btc_tx_add_p2pkh_output = S.Sc)(n, i, o), t._hd_btc_tx_add_p2wpkh_output = (n, i, o) => (t._hd_btc_tx_add_p2wpkh_output = S.Tc)(n, i, o), t._hd_btc_tx_sign = (n, i, o) => (t._hd_btc_tx_sign = S.Uc)(n, i, o), t._hd_btc_tx_sign_input = (n, i, o, c) => (t._hd_btc_tx_sign_input = S.Vc)(n, i, o, c), t._hd_btc_tx_serialize = (n, i, o, c) => (t._hd_btc_tx_serialize = S.Wc)(n, i, o, c), t._hd_btc_tx_get_txid = (n, i) => (t._hd_btc_tx_get_txid = S.Xc)(n, i), t._hd_btc_tx_get_txid_hex = (n, i, o) => (t._hd_btc_tx_get_txid_hex = S.Yc)(n, i, o), t._hd_btc_tx_get_size = (n) => (t._hd_btc_tx_get_size = S.Zc)(n), t._hd_btc_tx_get_vsize = (n) => (t._hd_btc_tx_get_vsize = S._c)(n), t._hd_btc_tx_get_weight = (n) => (t._hd_btc_tx_get_weight = S.$c)(n), t._hd_btc_tx_get_fee = (n) => (t._hd_btc_tx_get_fee = S.ad)(n), t._hd_btc_tx_validate = (n) => (t._hd_btc_tx_validate = S.bd)(n), t._hd_btc_tx_destroy = (n) => (t._hd_btc_tx_destroy = S.cd)(n), t._hd_btc_tx_parse = (n, i) => (t._hd_btc_tx_parse = S.dd)(n, i), t._hd_btc_tx_parse_hex = (n) => (t._hd_btc_tx_parse_hex = S.ed)(n), t._hd_eth_tx_create = (n) => (t._hd_eth_tx_create = S.fd)(n), t._hd_eth_tx_create_eip1559 = (n, i, o) => (t._hd_eth_tx_create_eip1559 = S.gd)(n, i, o), t._hd_eth_tx_set_nonce = (n, i) => (t._hd_eth_tx_set_nonce = S.hd)(n, i), t._hd_eth_tx_set_gas_price = (n, i) => (t._hd_eth_tx_set_gas_price = S.id)(n, i), t._hd_eth_tx_set_gas_limit = (n, i) => (t._hd_eth_tx_set_gas_limit = S.jd)(n, i), t._hd_eth_tx_set_to = (n, i) => (t._hd_eth_tx_set_to = S.kd)(n, i), t._hd_eth_tx_set_to_hex = (n, i) => (t._hd_eth_tx_set_to_hex = S.ld)(n, i), t._hd_eth_tx_set_value = (n, i) => (t._hd_eth_tx_set_value = S.md)(n, i), t._hd_eth_tx_set_value_256 = (n, i) => (t._hd_eth_tx_set_value_256 = S.nd)(n, i), t._hd_eth_tx_set_data = (n, i, o) => (t._hd_eth_tx_set_data = S.od)(n, i, o), t._hd_eth_tx_sign = (n, i) => (t._hd_eth_tx_sign = S.pd)(n, i), t._hd_eth_tx_serialize = (n, i, o, c) => (t._hd_eth_tx_serialize = S.qd)(n, i, o, c), t._hd_eth_tx_get_hash = (n, i) => (t._hd_eth_tx_get_hash = S.rd)(n, i), t._hd_eth_tx_get_hash_hex = (n, i, o) => (t._hd_eth_tx_get_hash_hex = S.sd)(n, i, o), t._hd_eth_tx_get_sender = (n, i) => (t._hd_eth_tx_get_sender = S.td)(n, i), t._hd_eth_tx_get_size = (n) => (t._hd_eth_tx_get_size = S.ud)(n), t._hd_eth_tx_get_max_fee = (n) => (t._hd_eth_tx_get_max_fee = S.vd)(n), t._hd_eth_tx_validate = (n) => (t._hd_eth_tx_validate = S.wd)(n), t._hd_eth_tx_destroy = (n) => (t._hd_eth_tx_destroy = S.xd)(n), t._hd_eth_tx_parse = (n, i) => (t._hd_eth_tx_parse = S.yd)(n, i), t._hd_eth_tx_parse_hex = (n) => (t._hd_eth_tx_parse_hex = S.zd)(n), t._hd_coin_address_from_pubkey = (n, i, o, c, l, y) => (t._hd_coin_address_from_pubkey = S.Ad)(n, i, o, c, l, y), t._hd_coin_validate_address = (n, i, o) => (t._hd_coin_validate_address = S.Bd)(n, i, o), t._hd_coin_sign_message = (n, i, o, c, l, y) => (t._hd_coin_sign_message = S.Cd)(n, i, o, c, l, y), t._hd_coin_verify_message = (n, i, o, c, l, y, A) => (t._hd_coin_verify_message = S.Dd)(n, i, o, c, l, y, A), t._hd_base58_encode = (n, i, o, c) => (t._hd_base58_encode = S.Ed)(n, i, o, c), t._hd_base58_decode = (n, i, o) => (t._hd_base58_decode = S.Fd)(n, i, o), t._hd_base58check_encode = (n, i, o, c) => (t._hd_base58check_encode = S.Gd)(n, i, o, c), t._hd_base58check_decode = (n, i, o) => (t._hd_base58check_decode = S.Hd)(n, i, o), t._hd_bech32_encode = (n, i, o, c, l, y) => (t._hd_bech32_encode = S.Id)(n, i, o, c, l, y), t._hd_bech32_decode = (n, i, o, c, l) => (t._hd_bech32_decode = S.Jd)(n, i, o, c, l), t._hd_btc_p2pkh_address = (n, i, o, c, l) => (t._hd_btc_p2pkh_address = S.Kd)(n, i, o, c, l), t._hd_btc_p2sh_address = (n, i, o, c, l) => (t._hd_btc_p2sh_address = S.Ld)(n, i, o, c, l), t._hd_btc_p2wpkh_address = (n, i, o, c, l) => (t._hd_btc_p2wpkh_address = S.Md)(n, i, o, c, l), t._hd_btc_p2wsh_address = (n, i, o, c, l) => (t._hd_btc_p2wsh_address = S.Nd)(n, i, o, c, l), t._hd_btc_p2tr_address = (n, i, o, c, l) => (t._hd_btc_p2tr_address = S.Od)(n, i, o, c, l), t._hd_btc_validate_address = (n, i) => (t._hd_btc_validate_address = S.Pd)(n, i), t._hd_btc_detect_address_type = (n, i) => (t._hd_btc_detect_address_type = S.Qd)(n, i), t._hd_btc_decode_address = (n, i, o, c, l) => (t._hd_btc_decode_address = S.Rd)(n, i, o, c, l), t._hd_btc_sign_message = (n, i, o, c, l) => (t._hd_btc_sign_message = S.Sd)(n, i, o, c, l), t._hd_btc_verify_message = (n, i, o, c, l) => (t._hd_btc_verify_message = S.Td)(n, i, o, c, l), t._hd_btc_to_wif = (n, i, o, c, l) => (t._hd_btc_to_wif = S.Ud)(n, i, o, c, l), t._hd_btc_from_wif = (n, i, o) => (t._hd_btc_from_wif = S.Vd)(n, i, o), t._hd_eth_address = (n, i, o, c) => (t._hd_eth_address = S.Wd)(n, i, o, c), t._hd_eth_validate_address = (n) => (t._hd_eth_validate_address = S.Xd)(n), t._hd_eth_checksum_address = (n, i, o) => (t._hd_eth_checksum_address = S.Yd)(n, i, o), t._hd_eth_verify_checksum = (n) => (t._hd_eth_verify_checksum = S.Zd)(n), t._hd_eth_sign_message = (n, i, o, c, l) => (t._hd_eth_sign_message = S._d)(n, i, o, c, l), t._hd_eth_verify_message = (n, i, o, c, l) => (t._hd_eth_verify_message = S.$d)(n, i, o, c, l), t._hd_eth_recover_address = (n, i, o, c, l, y) => (t._hd_eth_recover_address = S.ae)(n, i, o, c, l, y), t._hd_eth_hash_message = (n, i, o) => (t._hd_eth_hash_message = S.be)(n, i, o), t._hd_eth_sign_typed_data = (n, i, o, c, l, y, A, O) => (t._hd_eth_sign_typed_data = S.ce)(n, i, o, c, l, y, A, O), t._hd_sol_address = (n, i, o, c) => (t._hd_sol_address = S.de)(n, i, o, c), t._hd_sol_validate_address = (n) => (t._hd_sol_validate_address = S.ee)(n), t._hd_sol_address_to_pubkey = (n, i, o) => (t._hd_sol_address_to_pubkey = S.fe)(n, i, o), t._hd_sol_sign_message = (n, i, o, c, l) => (t._hd_sol_sign_message = S.ge)(n, i, o, c, l), t._hd_sol_verify_message = (n, i, o, c, l, y) => (t._hd_sol_verify_message = S.he)(n, i, o, c, l, y), t._hd_sol_derive_pubkey = (n, i, o) => (t._hd_sol_derive_pubkey = S.ie)(n, i, o), t._hd_sol_find_pda = (n, i, o, c, l, y, A, O) => (t._hd_sol_find_pda = S.je)(n, i, o, c, l, y, A, O), t._hd_sol_get_associated_token_address = (n, i, o, c) => (t._hd_sol_get_associated_token_address = S.ke)(n, i, o, c), t._hd_cosmos_address = (n, i, o, c, l) => (t._hd_cosmos_address = S.le)(n, i, o, c, l), t._hd_cosmos_validate_address = (n, i) => (t._hd_cosmos_validate_address = S.me)(n, i), t._hd_cosmos_convert_prefix = (n, i, o, c) => (t._hd_cosmos_convert_prefix = S.ne)(n, i, o, c), t._hd_cosmos_sign_amino = (n, i, o, c, l) => (t._hd_cosmos_sign_amino = S.oe)(n, i, o, c, l), t._hd_cosmos_sign_direct = (n, i, o, c, l) => (t._hd_cosmos_sign_direct = S.pe)(n, i, o, c, l), t._hd_cosmos_verify_signature = (n, i, o, c, l, y) => (t._hd_cosmos_verify_signature = S.qe)(n, i, o, c, l, y), t._hd_cosmos_sign_arbitrary = (n, i, o, c, l, y) => (t._hd_cosmos_sign_arbitrary = S.re)(n, i, o, c, l, y), t._hd_dot_address = (n, i, o, c, l) => (t._hd_dot_address = S.se)(n, i, o, c, l), t._hd_dot_validate_address = (n, i) => (t._hd_dot_validate_address = S.te)(n, i), t._hd_dot_decode_address = (n, i, o, c) => (t._hd_dot_decode_address = S.ue)(n, i, o, c), t._hd_dot_convert_prefix = (n, i, o, c) => (t._hd_dot_convert_prefix = S.ve)(n, i, o, c), t._hd_dot_sign_message = (n, i, o, c, l) => (t._hd_dot_sign_message = S.we)(n, i, o, c, l), t._hd_dot_verify_message = (n, i, o, c, l, y) => (t._hd_dot_verify_message = S.xe)(n, i, o, c, l, y), t._hd_dot_sign_extrinsic = (n, i, o, c, l) => (t._hd_dot_sign_extrinsic = S.ye)(n, i, o, c, l), t._hd_dot_derive_pubkey = (n, i, o) => (t._hd_dot_derive_pubkey = S.ze)(n, i, o), t._hd_libp2p_peer_id = (n, i, o, c, l) => (t._hd_libp2p_peer_id = S.Ae)(n, i, o, c, l), t._hd_libp2p_peer_id_string = (n, i, o, c, l) => (t._hd_libp2p_peer_id_string = S.Be)(n, i, o, c, l), t._hd_libp2p_ipns_hash = (n, i, o, c, l) => (t._hd_libp2p_ipns_hash = S.Ce)(n, i, o, c, l), t._hd_libp2p_ipns_hash_base32 = (n, i, o, c, l) => (t._hd_libp2p_ipns_hash_base32 = S.De)(n, i, o, c, l), t._hd_encode_base32lower = (n, i, o, c) => (t._hd_encode_base32lower = S.Ee)(n, i, o, c), t._hd_encode_base36lower = (n, i, o, c) => (t._hd_encode_base36lower = S.Fe)(n, i, o, c), t._hd_openssl_get_error = () => (t._hd_openssl_get_error = S.Ge)(), t._hd_openssl_init_fips = () => (t._hd_openssl_init_fips = S.He)(), t._hd_openssl_init_default = () => (t._hd_openssl_init_default = S.Ie)(), t._hd_openssl_cleanup = () => (t._hd_openssl_cleanup = S.Je)(), t._hd_openssl_is_fips = () => (t._hd_openssl_is_fips = S.Ke)(), t._hd_ossl_sha256 = (n, i, o) => (t._hd_ossl_sha256 = S.Le)(n, i, o), t._hd_ossl_sha384 = (n, i, o) => (t._hd_ossl_sha384 = S.Me)(n, i, o), t._hd_ossl_sha512 = (n, i, o) => (t._hd_ossl_sha512 = S.Ne)(n, i, o), t._hd_ossl_hmac_sha256 = (n, i, o, c, l) => (t._hd_ossl_hmac_sha256 = S.Oe)(n, i, o, c, l), t._hd_ossl_hmac_sha512 = (n, i, o, c, l) => (t._hd_ossl_hmac_sha512 = S.Pe)(n, i, o, c, l), t._hd_ossl_hkdf_sha384 = (n, i, o, c, l, y, A, O) => (t._hd_ossl_hkdf_sha384 = S.Qe)(n, i, o, c, l, y, A, O), t._hd_ossl_pbkdf2_sha512 = (n, i, o, c, l, y, A) => (t._hd_ossl_pbkdf2_sha512 = S.Re)(n, i, o, c, l, y, A), t._hd_ossl_ecdsa_sign = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdsa_sign = S.Se)(n, i, o, c, l, y, A), t._hd_ossl_ecdsa_verify = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdsa_verify = S.Te)(n, i, o, c, l, y, A), t._hd_ossl_ec_pubkey_from_privkey = (n, i, o, c, l) => (t._hd_ossl_ec_pubkey_from_privkey = S.Ue)(n, i, o, c, l), t._hd_ossl_ecdh_keygen = (n, i, o) => (t._hd_ossl_ecdh_keygen = S.Ve)(n, i, o), t._hd_ossl_ecdh_compute = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdh_compute = S.We)(n, i, o, c, l, y, A);
12307
- var Hi = () => (Hi = S.Xe)(), ye = (n, i) => (ye = S.Ye)(n, i), pr = (n) => (pr = S.Ze)(n), ge = () => (ge = S._e)(), ve = (n) => (ve = S.$e)(n), xn = (n) => (xn = S.af)(n), zi = (n) => (zi = S.bf)(n), $i = (n) => ($i = S.cf)(n), Wi = (n, i, o) => (Wi = S.df)(n, i, o), ji = (n) => (ji = S.ef)(n);
12308
- function La(n, i, o) {
12357
+ } } }), p.FSNode = Bi, p.createPreloadedFile = Ks, p.staticInit();
12358
+ var La = { p: Ot, r: Zt, a: jr, g: fe, n: Te, k: nt, ca: $e, o: Pt, R: dr, d: lr, T: Gs, qa: Xs, ia: Js, sa: Qs, oa: Zs, na: ea, U: ta, pa: ra, ta: ia, ja: aa, ha: ca, A: la, M: da, V: Ti, ga: ua, la: ya, ma: ga, I: va, S: Ea, ka: Aa, ra: Ia, P: Ya, N: yc, Q: Ec, v: za, c: Ca, e: Va, i: xa, q: Ua, j: Fa, y: qa, B: Xa, O: Ja, E: ja, K: Ka, xa: Za, H: Ac, $: ic, da: vc, Y: _c, D: nc, s: sc, ea: gc, ba: ec, L: bc, m: $a, f: Da, b: Ta, h: Ma, l: Ba, w: Wa, F: Ha, x: Ga, wa: rc, aa: tc, z: Qa, J: uc, G: mc, Z: dc, u: lc, _: oc, C: ac, X: fc, va: cc, ua: hc, W: pc, t: wa, fa: Pa }, S = Ht(), Vi = t._malloc = (n) => (Vi = t._malloc = S.Ba)(n);
12359
+ t._free = (n) => (t._free = S.Ca)(n), t._hd_secure_wipe = (n, i) => (t._hd_secure_wipe = S.Da)(n, i), t._hd_alloc = (n) => (t._hd_alloc = S.Ea)(n), t._hd_dealloc = (n) => (t._hd_dealloc = S.Fa)(n), t._hd_mnemonic_generate = (n, i, o, c) => (t._hd_mnemonic_generate = S.Ga)(n, i, o, c), t._hd_mnemonic_validate = (n, i) => (t._hd_mnemonic_validate = S.Ha)(n, i), t._hd_mnemonic_to_seed = (n, i, o, c) => (t._hd_mnemonic_to_seed = S.Ia)(n, i, o, c), t._hd_mnemonic_to_entropy = (n, i, o, c) => (t._hd_mnemonic_to_entropy = S.Ja)(n, i, o, c), t._hd_entropy_to_mnemonic = (n, i, o, c, l) => (t._hd_entropy_to_mnemonic = S.Ka)(n, i, o, c, l), t._hd_mnemonic_get_wordlist = (n) => (t._hd_mnemonic_get_wordlist = S.La)(n), t._hd_mnemonic_suggest_word = (n, i, o, c, l) => (t._hd_mnemonic_suggest_word = S.Ma)(n, i, o, c, l), t._hd_mnemonic_check_word = (n, i) => (t._hd_mnemonic_check_word = S.Na)(n, i), t._hd_key_from_seed = (n, i, o) => (t._hd_key_from_seed = S.Oa)(n, i, o), t._hd_key_from_xprv = (n) => (t._hd_key_from_xprv = S.Pa)(n), t._hd_key_from_xpub = (n) => (t._hd_key_from_xpub = S.Qa)(n), t._hd_key_derive_path = (n, i) => (t._hd_key_derive_path = S.Ra)(n, i), t._hd_key_derive_child = (n, i) => (t._hd_key_derive_child = S.Sa)(n, i), t._hd_key_derive_hardened = (n, i) => (t._hd_key_derive_hardened = S.Ta)(n, i), t._hd_key_get_private = (n, i, o) => (t._hd_key_get_private = S.Ua)(n, i, o), t._hd_key_get_public = (n, i, o) => (t._hd_key_get_public = S.Va)(n, i, o), t._hd_key_get_chain_code = (n, i, o) => (t._hd_key_get_chain_code = S.Wa)(n, i, o), t._hd_key_get_fingerprint = (n) => (t._hd_key_get_fingerprint = S.Xa)(n), t._hd_key_get_parent_fingerprint = (n) => (t._hd_key_get_parent_fingerprint = S.Ya)(n), t._hd_key_get_depth = (n) => (t._hd_key_get_depth = S.Za)(n), t._hd_key_get_child_index = (n) => (t._hd_key_get_child_index = S._a)(n), t._hd_key_serialize_xprv = (n, i, o) => (t._hd_key_serialize_xprv = S.$a)(n, i, o), t._hd_key_serialize_xpub = (n, i, o) => (t._hd_key_serialize_xpub = S.ab)(n, i, o), t._hd_key_neutered = (n) => (t._hd_key_neutered = S.bb)(n), t._hd_key_is_neutered = (n) => (t._hd_key_is_neutered = S.cb)(n), t._hd_key_wipe = (n) => (t._hd_key_wipe = S.db)(n), t._hd_key_clone = (n) => (t._hd_key_clone = S.eb)(n), t._hd_key_destroy = (n) => (t._hd_key_destroy = S.fb)(n), t._hd_path_build = (n, i, o, c, l, y, A) => (t._hd_path_build = S.gb)(n, i, o, c, l, y, A), t._hd_path_parse = (n, i, o, c, l, y) => (t._hd_path_parse = S.hb)(n, i, o, c, l, y), t._hd_ed25519_sign = (n, i, o, c, l) => (t._hd_ed25519_sign = S.ib)(n, i, o, c, l), t._hd_ed25519_verify = (n, i, o, c, l, y) => (t._hd_ed25519_verify = S.jb)(n, i, o, c, l, y), t._hd_ed25519_pubkey_from_seed = (n, i, o) => (t._hd_ed25519_pubkey_from_seed = S.kb)(n, i, o), t._hd_slip10_ed25519_derive_path = (n, i, o, c, l) => (t._hd_slip10_ed25519_derive_path = S.lb)(n, i, o, c, l), t._hd_x25519_pubkey = (n, i, o) => (t._hd_x25519_pubkey = S.mb)(n, i, o), t._hd_ecdh_x25519 = (n, i, o, c) => (t._hd_ecdh_x25519 = S.nb)(n, i, o, c), t._hd_ecdh = (n, i, o, c, l, y, A) => (t._hd_ecdh = S.ob)(n, i, o, c, l, y, A), t._hd_ossl_hkdf_sha256 = (n, i, o, c, l, y, A, O) => (t._hd_ossl_hkdf_sha256 = S.pb)(n, i, o, c, l, y, A, O), t._hd_ossl_aes_gcm_encrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_ossl_aes_gcm_encrypt = S.qb)(n, i, o, c, l, y, A, O, x, H), t._hd_ossl_aes_gcm_decrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_ossl_aes_gcm_decrypt = S.rb)(n, i, o, c, l, y, A, O, x, H), t._hd_ossl_aes_ctr_encrypt = (n, i, o, c, l, y, A) => (t._hd_ossl_aes_ctr_encrypt = S.sb)(n, i, o, c, l, y, A), t._hd_ossl_aes_ctr_decrypt = (n, i, o, c, l, y, A) => (t._hd_ossl_aes_ctr_decrypt = S.tb)(n, i, o, c, l, y, A), t._hd_ecies_encrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_ecies_encrypt = S.ub)(n, i, o, c, l, y, A, O, x), t._hd_ecies_decrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_ecies_decrypt = S.vb)(n, i, o, c, l, y, A, O, x), t._hd_ecies_overhead = (n) => (t._hd_ecies_overhead = S.wb)(n), t._hd_aes_ctr_encrypt = (n, i, o, c, l, y, A, O) => (t._hd_aes_ctr_encrypt = S.xb)(n, i, o, c, l, y, A, O), t._hd_aes_ctr_decrypt = (n, i, o, c, l, y, A, O) => (t._hd_aes_ctr_decrypt = S.yb)(n, i, o, c, l, y, A, O), t._hd_x509_generate_private_key = (n, i, o) => (t._hd_x509_generate_private_key = S.zb)(n, i, o), t._hd_x509_export_private_key_pem = (n, i, o, c, l) => (t._hd_x509_export_private_key_pem = S.Ab)(n, i, o, c, l), t._hd_x509_import_private_key_pem = (n, i, o, c) => (t._hd_x509_import_private_key_pem = S.Bb)(n, i, o, c), t._hd_x509_create_self_signed = (n, i, o, c, l, y, A) => (t._hd_x509_create_self_signed = S.Cb)(n, i, o, c, l, y, A), t._hd_x509_issue_certificate = (n, i, o, c, l, y, A, O, x, H, G, se, q) => (t._hd_x509_issue_certificate = S.Db)(n, i, o, c, l, y, A, O, x, H, G, se, q), t._hd_x509_convert_certificate = (n, i, o, c, l, y) => (t._hd_x509_convert_certificate = S.Eb)(n, i, o, c, l, y), t._hd_x509_parse_certificate_json = (n, i, o, c, l) => (t._hd_x509_parse_certificate_json = S.Fb)(n, i, o, c, l), t._hd_x509_verify_wallet_attestation = (n, i, o) => (t._hd_x509_verify_wallet_attestation = S.Gb)(n, i, o), t._hd_x509_export_pkcs12 = (n, i, o, c, l, y, A, O, x, H, G, se) => (t._hd_x509_export_pkcs12 = S.Hb)(n, i, o, c, l, y, A, O, x, H, G, se), t._hd_x509_import_pkcs12_json = (n, i, o, c, l) => (t._hd_x509_import_pkcs12_json = S.Ib)(n, i, o, c, l), t._hd_wasi_has_feature = (n) => (t._hd_wasi_has_feature = S.Jb)(n), t._hd_wasi_get_warning = (n) => (t._hd_wasi_get_warning = S.Kb)(n), t._hd_inject_entropy = (n, i) => (t._hd_inject_entropy = S.Lb)(n, i), t._hd_get_entropy_status = () => (t._hd_get_entropy_status = S.Mb)(), t._hd_get_version = () => (t._hd_get_version = S.Nb)(), t._hd_is_fips_mode = () => (t._hd_is_fips_mode = S.Ob)(), t._hd_get_version_string = () => (t._hd_get_version_string = S.Pb)(), t._hd_has_cryptopp = () => (t._hd_has_cryptopp = S.Qb)(), t._hd_aligned_derive_batch = (n, i, o) => (t._hd_aligned_derive_batch = S.Rb)(n, i, o), t._hd_aligned_sign_batch = (n, i, o, c, l) => (t._hd_aligned_sign_batch = S.Sb)(n, i, o, c, l), t._hd_aligned_verify_batch = (n, i, o, c, l) => (t._hd_aligned_verify_batch = S.Tb)(n, i, o, c, l), t._hd_aligned_stream_create = (n) => (t._hd_aligned_stream_create = S.Ub)(n), t._hd_aligned_stream_next = (n, i, o) => (t._hd_aligned_stream_next = S.Vb)(n, i, o), t._hd_aligned_stream_status = (n, i) => (t._hd_aligned_stream_status = S.Wb)(n, i), t._hd_aligned_stream_destroy = (n) => (t._hd_aligned_stream_destroy = S.Xb)(n), t._hd_aligned_from_extended_key = (n, i) => (t._hd_aligned_from_extended_key = S.Yb)(n, i), t._hd_aligned_to_extended_key = (n) => (t._hd_aligned_to_extended_key = S.Zb)(n), t._hd_aligned_derived_key_entry_size = () => (t._hd_aligned_derived_key_entry_size = S._b)(), t._hd_aligned_signature_entry_size = () => (t._hd_aligned_signature_entry_size = S.$b)(), t._hd_aligned_extended_key_data_size = () => (t._hd_aligned_extended_key_data_size = S.ac)(), t._hd_aligned_batch_derive_request_size = () => (t._hd_aligned_batch_derive_request_size = S.bc)(), t._hd_hash_sha256 = (n, i, o, c) => (t._hd_hash_sha256 = S.cc)(n, i, o, c), t._hd_hash_sha512 = (n, i, o, c) => (t._hd_hash_sha512 = S.dc)(n, i, o, c), t._hd_hash_keccak256 = (n, i, o, c) => (t._hd_hash_keccak256 = S.ec)(n, i, o, c), t._hd_hash_ripemd160 = (n, i, o, c) => (t._hd_hash_ripemd160 = S.fc)(n, i, o, c), t._hd_hash_hash160 = (n, i, o, c) => (t._hd_hash_hash160 = S.gc)(n, i, o, c), t._hd_hash_blake2b = (n, i, o, c, l) => (t._hd_hash_blake2b = S.hc)(n, i, o, c, l), t._hd_hash_blake2s = (n, i, o, c, l) => (t._hd_hash_blake2s = S.ic)(n, i, o, c, l), t._hd_kdf_hkdf = (n, i, o, c, l, y, A, O) => (t._hd_kdf_hkdf = S.jc)(n, i, o, c, l, y, A, O), t._hd_kdf_pbkdf2 = (n, i, o, c, l, y, A) => (t._hd_kdf_pbkdf2 = S.kc)(n, i, o, c, l, y, A), t._hd_kdf_scrypt = (n, i, o, c, l, y, A, O, x) => (t._hd_kdf_scrypt = S.lc)(n, i, o, c, l, y, A, O, x), t._hd_curve_pubkey_from_privkey = (n, i, o, c) => (t._hd_curve_pubkey_from_privkey = S.mc)(n, i, o, c), t._hd_secp256k1_sign = (n, i, o, c, l) => (t._hd_secp256k1_sign = S.nc)(n, i, o, c, l), t._hd_secp256k1_verify = (n, i, o, c, l, y) => (t._hd_secp256k1_verify = S.oc)(n, i, o, c, l, y), t._hd_secp256k1_sign_recoverable = (n, i, o, c) => (t._hd_secp256k1_sign_recoverable = S.pc)(n, i, o, c), t._hd_secp256k1_recover = (n, i, o, c) => (t._hd_secp256k1_recover = S.qc)(n, i, o, c), t._hd_curve_decompress_pubkey = (n, i, o, c) => (t._hd_curve_decompress_pubkey = S.rc)(n, i, o, c), t._hd_ecdh_secp256k1 = (n, i, o, c, l) => (t._hd_ecdh_secp256k1 = S.sc)(n, i, o, c, l), t._hd_p256_sign = (n, i, o, c, l) => (t._hd_p256_sign = S.tc)(n, i, o, c, l), t._hd_p256_verify = (n, i, o, c, l) => (t._hd_p256_verify = S.uc)(n, i, o, c, l), t._hd_ecdh_p256 = (n, i, o, c, l) => (t._hd_ecdh_p256 = S.vc)(n, i, o, c, l), t._hd_p384_sign = (n, i, o, c, l) => (t._hd_p384_sign = S.wc)(n, i, o, c, l), t._hd_p384_verify = (n, i, o, c, l) => (t._hd_p384_verify = S.xc)(n, i, o, c, l), t._hd_ecdh_p384 = (n, i, o, c, l) => (t._hd_ecdh_p384 = S.yc)(n, i, o, c, l), t._hd_aes_gcm_encrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_aes_gcm_encrypt = S.zc)(n, i, o, c, l, y, A, O, x, H), t._hd_aes_gcm_decrypt = (n, i, o, c, l, y, A, O, x, H) => (t._hd_aes_gcm_decrypt = S.Ac)(n, i, o, c, l, y, A, O, x, H), t._hd_sdn_derive_password_identity = (n, i, o, c, l, y, A, O, x) => (t._hd_sdn_derive_password_identity = S.Bc)(n, i, o, c, l, y, A, O, x), t._hd_sdn_derive_legacy_password_identity = (n, i, o, c, l, y, A, O, x) => (t._hd_sdn_derive_legacy_password_identity = S.Cc)(n, i, o, c, l, y, A, O, x), t._hd_sdn_import_legacy_mnemonic_identity = (n, i, o, c, l, y, A) => (t._hd_sdn_import_legacy_mnemonic_identity = S.Dc)(n, i, o, c, l, y, A), t._hd_sdn_import_remembered_identity = (n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me) => (t._hd_sdn_import_remembered_identity = S.Ec)(n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me), t._hd_sdn_sign_login_v1 = (n, i, o, c, l, y) => (t._hd_sdn_sign_login_v1 = S.Fc)(n, i, o, c, l, y), t._hd_sdn_sign_login_v2 = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_login_v2 = S.Gc)(n, i, o, c, l, y, A), t._hd_sdn_sign_publish_request = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_publish_request = S.Hc)(n, i, o, c, l, y, A), t._hd_sdn_sign_module_delivery_key = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_module_delivery_key = S.Ic)(n, i, o, c, l, y, A), t._hd_sdn_sign_asset_review_authority_activation = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_asset_review_authority_activation = S.Jc)(n, i, o, c, l, y, A), t._hd_sdn_sign_asset_review_decision = (n, i, o, c, l, y, A) => (t._hd_sdn_sign_asset_review_decision = S.Kc)(n, i, o, c, l, y, A), t._hd_sdn_seal_remembered_identity = (n, i, o, c, l, y, A, O, x, H, G, se, q, X) => (t._hd_sdn_seal_remembered_identity = S.Lc)(n, i, o, c, l, y, A, O, x, H, G, se, q, X), t._hd_sdn_destroy_identity = (n) => (t._hd_sdn_destroy_identity = S.Mc)(n), t._plugin_get_manifest_flatbuffer = () => (t._plugin_get_manifest_flatbuffer = S.Nc)(), t._plugin_get_manifest_flatbuffer_size = () => (t._plugin_get_manifest_flatbuffer_size = S.Oc)(), t._hd_btc_tx_create = () => (t._hd_btc_tx_create = S.Pc)(), t._hd_btc_tx_create_v = (n) => (t._hd_btc_tx_create_v = S.Qc)(n), t._hd_btc_tx_add_input = (n, i, o, c, l, y, A) => (t._hd_btc_tx_add_input = S.Rc)(n, i, o, c, l, y, A), t._hd_btc_tx_add_output = (n, i, o, c) => (t._hd_btc_tx_add_output = S.Sc)(n, i, o, c), t._hd_btc_tx_add_p2pkh_output = (n, i, o) => (t._hd_btc_tx_add_p2pkh_output = S.Tc)(n, i, o), t._hd_btc_tx_add_p2wpkh_output = (n, i, o) => (t._hd_btc_tx_add_p2wpkh_output = S.Uc)(n, i, o), t._hd_btc_tx_sign = (n, i, o) => (t._hd_btc_tx_sign = S.Vc)(n, i, o), t._hd_btc_tx_sign_input = (n, i, o, c) => (t._hd_btc_tx_sign_input = S.Wc)(n, i, o, c), t._hd_btc_tx_serialize = (n, i, o, c) => (t._hd_btc_tx_serialize = S.Xc)(n, i, o, c), t._hd_btc_tx_get_txid = (n, i) => (t._hd_btc_tx_get_txid = S.Yc)(n, i), t._hd_btc_tx_get_txid_hex = (n, i, o) => (t._hd_btc_tx_get_txid_hex = S.Zc)(n, i, o), t._hd_btc_tx_get_size = (n) => (t._hd_btc_tx_get_size = S._c)(n), t._hd_btc_tx_get_vsize = (n) => (t._hd_btc_tx_get_vsize = S.$c)(n), t._hd_btc_tx_get_weight = (n) => (t._hd_btc_tx_get_weight = S.ad)(n), t._hd_btc_tx_get_fee = (n) => (t._hd_btc_tx_get_fee = S.bd)(n), t._hd_btc_tx_validate = (n) => (t._hd_btc_tx_validate = S.cd)(n), t._hd_btc_tx_destroy = (n) => (t._hd_btc_tx_destroy = S.dd)(n), t._hd_btc_tx_parse = (n, i) => (t._hd_btc_tx_parse = S.ed)(n, i), t._hd_btc_tx_parse_hex = (n) => (t._hd_btc_tx_parse_hex = S.fd)(n), t._hd_eth_tx_create = (n) => (t._hd_eth_tx_create = S.gd)(n), t._hd_eth_tx_create_eip1559 = (n, i, o) => (t._hd_eth_tx_create_eip1559 = S.hd)(n, i, o), t._hd_eth_tx_set_nonce = (n, i) => (t._hd_eth_tx_set_nonce = S.id)(n, i), t._hd_eth_tx_set_gas_price = (n, i) => (t._hd_eth_tx_set_gas_price = S.jd)(n, i), t._hd_eth_tx_set_gas_limit = (n, i) => (t._hd_eth_tx_set_gas_limit = S.kd)(n, i), t._hd_eth_tx_set_to = (n, i) => (t._hd_eth_tx_set_to = S.ld)(n, i), t._hd_eth_tx_set_to_hex = (n, i) => (t._hd_eth_tx_set_to_hex = S.md)(n, i), t._hd_eth_tx_set_value = (n, i) => (t._hd_eth_tx_set_value = S.nd)(n, i), t._hd_eth_tx_set_value_256 = (n, i) => (t._hd_eth_tx_set_value_256 = S.od)(n, i), t._hd_eth_tx_set_data = (n, i, o) => (t._hd_eth_tx_set_data = S.pd)(n, i, o), t._hd_eth_tx_sign = (n, i) => (t._hd_eth_tx_sign = S.qd)(n, i), t._hd_eth_tx_serialize = (n, i, o, c) => (t._hd_eth_tx_serialize = S.rd)(n, i, o, c), t._hd_eth_tx_get_hash = (n, i) => (t._hd_eth_tx_get_hash = S.sd)(n, i), t._hd_eth_tx_get_hash_hex = (n, i, o) => (t._hd_eth_tx_get_hash_hex = S.td)(n, i, o), t._hd_eth_tx_get_sender = (n, i) => (t._hd_eth_tx_get_sender = S.ud)(n, i), t._hd_eth_tx_get_size = (n) => (t._hd_eth_tx_get_size = S.vd)(n), t._hd_eth_tx_get_max_fee = (n) => (t._hd_eth_tx_get_max_fee = S.wd)(n), t._hd_eth_tx_validate = (n) => (t._hd_eth_tx_validate = S.xd)(n), t._hd_eth_tx_destroy = (n) => (t._hd_eth_tx_destroy = S.yd)(n), t._hd_eth_tx_parse = (n, i) => (t._hd_eth_tx_parse = S.zd)(n, i), t._hd_eth_tx_parse_hex = (n) => (t._hd_eth_tx_parse_hex = S.Ad)(n), t._hd_coin_address_from_pubkey = (n, i, o, c, l, y) => (t._hd_coin_address_from_pubkey = S.Bd)(n, i, o, c, l, y), t._hd_coin_validate_address = (n, i, o) => (t._hd_coin_validate_address = S.Cd)(n, i, o), t._hd_coin_sign_message = (n, i, o, c, l, y) => (t._hd_coin_sign_message = S.Dd)(n, i, o, c, l, y), t._hd_coin_verify_message = (n, i, o, c, l, y, A) => (t._hd_coin_verify_message = S.Ed)(n, i, o, c, l, y, A), t._hd_base58_encode = (n, i, o, c) => (t._hd_base58_encode = S.Fd)(n, i, o, c), t._hd_base58_decode = (n, i, o) => (t._hd_base58_decode = S.Gd)(n, i, o), t._hd_base58check_encode = (n, i, o, c) => (t._hd_base58check_encode = S.Hd)(n, i, o, c), t._hd_base58check_decode = (n, i, o) => (t._hd_base58check_decode = S.Id)(n, i, o), t._hd_bech32_encode = (n, i, o, c, l, y) => (t._hd_bech32_encode = S.Jd)(n, i, o, c, l, y), t._hd_bech32_decode = (n, i, o, c, l) => (t._hd_bech32_decode = S.Kd)(n, i, o, c, l), t._hd_btc_p2pkh_address = (n, i, o, c, l) => (t._hd_btc_p2pkh_address = S.Ld)(n, i, o, c, l), t._hd_btc_p2sh_address = (n, i, o, c, l) => (t._hd_btc_p2sh_address = S.Md)(n, i, o, c, l), t._hd_btc_p2wpkh_address = (n, i, o, c, l) => (t._hd_btc_p2wpkh_address = S.Nd)(n, i, o, c, l), t._hd_btc_p2wsh_address = (n, i, o, c, l) => (t._hd_btc_p2wsh_address = S.Od)(n, i, o, c, l), t._hd_btc_p2tr_address = (n, i, o, c, l) => (t._hd_btc_p2tr_address = S.Pd)(n, i, o, c, l), t._hd_btc_validate_address = (n, i) => (t._hd_btc_validate_address = S.Qd)(n, i), t._hd_btc_detect_address_type = (n, i) => (t._hd_btc_detect_address_type = S.Rd)(n, i), t._hd_btc_decode_address = (n, i, o, c, l) => (t._hd_btc_decode_address = S.Sd)(n, i, o, c, l), t._hd_btc_sign_message = (n, i, o, c, l) => (t._hd_btc_sign_message = S.Td)(n, i, o, c, l), t._hd_btc_verify_message = (n, i, o, c, l) => (t._hd_btc_verify_message = S.Ud)(n, i, o, c, l), t._hd_btc_to_wif = (n, i, o, c, l) => (t._hd_btc_to_wif = S.Vd)(n, i, o, c, l), t._hd_btc_from_wif = (n, i, o) => (t._hd_btc_from_wif = S.Wd)(n, i, o), t._hd_eth_address = (n, i, o, c) => (t._hd_eth_address = S.Xd)(n, i, o, c), t._hd_eth_validate_address = (n) => (t._hd_eth_validate_address = S.Yd)(n), t._hd_eth_checksum_address = (n, i, o) => (t._hd_eth_checksum_address = S.Zd)(n, i, o), t._hd_eth_verify_checksum = (n) => (t._hd_eth_verify_checksum = S._d)(n), t._hd_eth_sign_message = (n, i, o, c, l) => (t._hd_eth_sign_message = S.$d)(n, i, o, c, l), t._hd_eth_verify_message = (n, i, o, c, l) => (t._hd_eth_verify_message = S.ae)(n, i, o, c, l), t._hd_eth_recover_address = (n, i, o, c, l, y) => (t._hd_eth_recover_address = S.be)(n, i, o, c, l, y), t._hd_eth_hash_message = (n, i, o) => (t._hd_eth_hash_message = S.ce)(n, i, o), t._hd_eth_sign_typed_data = (n, i, o, c, l, y, A, O) => (t._hd_eth_sign_typed_data = S.de)(n, i, o, c, l, y, A, O), t._hd_sol_address = (n, i, o, c) => (t._hd_sol_address = S.ee)(n, i, o, c), t._hd_sol_validate_address = (n) => (t._hd_sol_validate_address = S.fe)(n), t._hd_sol_address_to_pubkey = (n, i, o) => (t._hd_sol_address_to_pubkey = S.ge)(n, i, o), t._hd_sol_sign_message = (n, i, o, c, l) => (t._hd_sol_sign_message = S.he)(n, i, o, c, l), t._hd_sol_verify_message = (n, i, o, c, l, y) => (t._hd_sol_verify_message = S.ie)(n, i, o, c, l, y), t._hd_sol_derive_pubkey = (n, i, o) => (t._hd_sol_derive_pubkey = S.je)(n, i, o), t._hd_sol_find_pda = (n, i, o, c, l, y, A, O) => (t._hd_sol_find_pda = S.ke)(n, i, o, c, l, y, A, O), t._hd_sol_get_associated_token_address = (n, i, o, c) => (t._hd_sol_get_associated_token_address = S.le)(n, i, o, c), t._hd_cosmos_address = (n, i, o, c, l) => (t._hd_cosmos_address = S.me)(n, i, o, c, l), t._hd_cosmos_validate_address = (n, i) => (t._hd_cosmos_validate_address = S.ne)(n, i), t._hd_cosmos_convert_prefix = (n, i, o, c) => (t._hd_cosmos_convert_prefix = S.oe)(n, i, o, c), t._hd_cosmos_sign_amino = (n, i, o, c, l) => (t._hd_cosmos_sign_amino = S.pe)(n, i, o, c, l), t._hd_cosmos_sign_direct = (n, i, o, c, l) => (t._hd_cosmos_sign_direct = S.qe)(n, i, o, c, l), t._hd_cosmos_verify_signature = (n, i, o, c, l, y) => (t._hd_cosmos_verify_signature = S.re)(n, i, o, c, l, y), t._hd_cosmos_sign_arbitrary = (n, i, o, c, l, y) => (t._hd_cosmos_sign_arbitrary = S.se)(n, i, o, c, l, y), t._hd_dot_address = (n, i, o, c, l) => (t._hd_dot_address = S.te)(n, i, o, c, l), t._hd_dot_validate_address = (n, i) => (t._hd_dot_validate_address = S.ue)(n, i), t._hd_dot_decode_address = (n, i, o, c) => (t._hd_dot_decode_address = S.ve)(n, i, o, c), t._hd_dot_convert_prefix = (n, i, o, c) => (t._hd_dot_convert_prefix = S.we)(n, i, o, c), t._hd_dot_sign_message = (n, i, o, c, l) => (t._hd_dot_sign_message = S.xe)(n, i, o, c, l), t._hd_dot_verify_message = (n, i, o, c, l, y) => (t._hd_dot_verify_message = S.ye)(n, i, o, c, l, y), t._hd_dot_sign_extrinsic = (n, i, o, c, l) => (t._hd_dot_sign_extrinsic = S.ze)(n, i, o, c, l), t._hd_dot_derive_pubkey = (n, i, o) => (t._hd_dot_derive_pubkey = S.Ae)(n, i, o), t._hd_libp2p_peer_id = (n, i, o, c, l) => (t._hd_libp2p_peer_id = S.Be)(n, i, o, c, l), t._hd_libp2p_peer_id_string = (n, i, o, c, l) => (t._hd_libp2p_peer_id_string = S.Ce)(n, i, o, c, l), t._hd_libp2p_ipns_hash = (n, i, o, c, l) => (t._hd_libp2p_ipns_hash = S.De)(n, i, o, c, l), t._hd_libp2p_ipns_hash_base32 = (n, i, o, c, l) => (t._hd_libp2p_ipns_hash_base32 = S.Ee)(n, i, o, c, l), t._hd_encode_base32lower = (n, i, o, c) => (t._hd_encode_base32lower = S.Fe)(n, i, o, c), t._hd_encode_base36lower = (n, i, o, c) => (t._hd_encode_base36lower = S.Ge)(n, i, o, c), t._hd_openssl_get_error = () => (t._hd_openssl_get_error = S.He)(), t._hd_openssl_init_fips = () => (t._hd_openssl_init_fips = S.Ie)(), t._hd_openssl_init_default = () => (t._hd_openssl_init_default = S.Je)(), t._hd_openssl_cleanup = () => (t._hd_openssl_cleanup = S.Ke)(), t._hd_openssl_is_fips = () => (t._hd_openssl_is_fips = S.Le)(), t._hd_ossl_sha256 = (n, i, o) => (t._hd_ossl_sha256 = S.Me)(n, i, o), t._hd_ossl_sha384 = (n, i, o) => (t._hd_ossl_sha384 = S.Ne)(n, i, o), t._hd_ossl_sha512 = (n, i, o) => (t._hd_ossl_sha512 = S.Oe)(n, i, o), t._hd_ossl_hmac_sha256 = (n, i, o, c, l) => (t._hd_ossl_hmac_sha256 = S.Pe)(n, i, o, c, l), t._hd_ossl_hmac_sha512 = (n, i, o, c, l) => (t._hd_ossl_hmac_sha512 = S.Qe)(n, i, o, c, l), t._hd_ossl_hkdf_sha384 = (n, i, o, c, l, y, A, O) => (t._hd_ossl_hkdf_sha384 = S.Re)(n, i, o, c, l, y, A, O), t._hd_ossl_pbkdf2_sha512 = (n, i, o, c, l, y, A) => (t._hd_ossl_pbkdf2_sha512 = S.Se)(n, i, o, c, l, y, A), t._hd_ossl_ecdsa_sign = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdsa_sign = S.Te)(n, i, o, c, l, y, A), t._hd_ossl_ecdsa_verify = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdsa_verify = S.Ue)(n, i, o, c, l, y, A), t._hd_ossl_ec_pubkey_from_privkey = (n, i, o, c, l) => (t._hd_ossl_ec_pubkey_from_privkey = S.Ve)(n, i, o, c, l), t._hd_ossl_ecdh_keygen = (n, i, o) => (t._hd_ossl_ecdh_keygen = S.We)(n, i, o), t._hd_ossl_ecdh_compute = (n, i, o, c, l, y, A) => (t._hd_ossl_ecdh_compute = S.Xe)(n, i, o, c, l, y, A);
12360
+ var Hi = () => (Hi = S.Ye)(), ye = (n, i) => (ye = S.Ze)(n, i), pr = (n) => (pr = S._e)(n), ge = () => (ge = S.$e)(), ve = (n) => (ve = S.af)(n), xn = (n) => (xn = S.bf)(n), zi = (n) => (zi = S.cf)(n), $i = (n) => ($i = S.df)(n), Wi = (n, i, o) => (Wi = S.ef)(n, i, o), ji = (n) => (ji = S.ff)(n);
12361
+ function Ta(n, i, o) {
12309
12362
  var c = ge();
12310
12363
  try {
12311
12364
  be(n)(i, o);
@@ -12314,7 +12367,7 @@ var Rh = (() => {
12314
12367
  ye(1, 0);
12315
12368
  }
12316
12369
  }
12317
- function Ta(n, i, o, c) {
12370
+ function xa(n, i, o, c) {
12318
12371
  var l = ge();
12319
12372
  try {
12320
12373
  return be(n)(i, o, c);
@@ -12323,7 +12376,7 @@ var Rh = (() => {
12323
12376
  ye(1, 0);
12324
12377
  }
12325
12378
  }
12326
- function xa(n, i) {
12379
+ function Da(n, i) {
12327
12380
  var o = ge();
12328
12381
  try {
12329
12382
  be(n)(i);
@@ -12332,7 +12385,7 @@ var Rh = (() => {
12332
12385
  ye(1, 0);
12333
12386
  }
12334
12387
  }
12335
- function Da(n, i) {
12388
+ function Ca(n, i) {
12336
12389
  var o = ge();
12337
12390
  try {
12338
12391
  return be(n)(i);
@@ -12341,7 +12394,7 @@ var Rh = (() => {
12341
12394
  ye(1, 0);
12342
12395
  }
12343
12396
  }
12344
- function Ca(n, i, o, c, l) {
12397
+ function Ua(n, i, o, c, l) {
12345
12398
  var y = ge();
12346
12399
  try {
12347
12400
  return be(n)(i, o, c, l);
@@ -12350,7 +12403,7 @@ var Rh = (() => {
12350
12403
  ye(1, 0);
12351
12404
  }
12352
12405
  }
12353
- function Ua(n, i, o, c, l, y) {
12406
+ function Fa(n, i, o, c, l, y) {
12354
12407
  var A = ge();
12355
12408
  try {
12356
12409
  return be(n)(i, o, c, l, y);
@@ -12359,7 +12412,7 @@ var Rh = (() => {
12359
12412
  ye(1, 0);
12360
12413
  }
12361
12414
  }
12362
- function Fa(n, i, o, c) {
12415
+ function Ma(n, i, o, c) {
12363
12416
  var l = ge();
12364
12417
  try {
12365
12418
  be(n)(i, o, c);
@@ -12368,7 +12421,7 @@ var Rh = (() => {
12368
12421
  ye(1, 0);
12369
12422
  }
12370
12423
  }
12371
- function Ma(n, i, o, c, l) {
12424
+ function Ba(n, i, o, c, l) {
12372
12425
  var y = ge();
12373
12426
  try {
12374
12427
  be(n)(i, o, c, l);
@@ -12377,7 +12430,7 @@ var Rh = (() => {
12377
12430
  ye(1, 0);
12378
12431
  }
12379
12432
  }
12380
- function Ba(n, i, o) {
12433
+ function Va(n, i, o) {
12381
12434
  var c = ge();
12382
12435
  try {
12383
12436
  return be(n)(i, o);
@@ -12386,7 +12439,7 @@ var Rh = (() => {
12386
12439
  ye(1, 0);
12387
12440
  }
12388
12441
  }
12389
- function Va(n, i, o, c, l, y, A) {
12442
+ function Ha(n, i, o, c, l, y, A) {
12390
12443
  var O = ge();
12391
12444
  try {
12392
12445
  be(n)(i, o, c, l, y, A);
@@ -12395,7 +12448,7 @@ var Rh = (() => {
12395
12448
  ye(1, 0);
12396
12449
  }
12397
12450
  }
12398
- function Ha(n) {
12451
+ function za(n) {
12399
12452
  var i = ge();
12400
12453
  try {
12401
12454
  return be(n)();
@@ -12404,7 +12457,7 @@ var Rh = (() => {
12404
12457
  ye(1, 0);
12405
12458
  }
12406
12459
  }
12407
- function za(n) {
12460
+ function $a(n) {
12408
12461
  var i = ge();
12409
12462
  try {
12410
12463
  be(n)();
@@ -12413,7 +12466,7 @@ var Rh = (() => {
12413
12466
  ye(1, 0);
12414
12467
  }
12415
12468
  }
12416
- function $a(n, i, o, c, l, y) {
12469
+ function Wa(n, i, o, c, l, y) {
12417
12470
  var A = ge();
12418
12471
  try {
12419
12472
  be(n)(i, o, c, l, y);
@@ -12422,7 +12475,7 @@ var Rh = (() => {
12422
12475
  ye(1, 0);
12423
12476
  }
12424
12477
  }
12425
- function Wa(n, i, o, c, l, y, A, O, x, H) {
12478
+ function ja(n, i, o, c, l, y, A, O, x, H) {
12426
12479
  var G = ge();
12427
12480
  try {
12428
12481
  return be(n)(i, o, c, l, y, A, O, x, H);
@@ -12431,7 +12484,7 @@ var Rh = (() => {
12431
12484
  ye(1, 0);
12432
12485
  }
12433
12486
  }
12434
- function ja(n, i, o, c, l, y, A) {
12487
+ function qa(n, i, o, c, l, y, A) {
12435
12488
  var O = ge();
12436
12489
  try {
12437
12490
  return be(n)(i, o, c, l, y, A);
@@ -12440,7 +12493,7 @@ var Rh = (() => {
12440
12493
  ye(1, 0);
12441
12494
  }
12442
12495
  }
12443
- function qa(n, i, o, c, l, y, A, O, x, H, G) {
12496
+ function Ka(n, i, o, c, l, y, A, O, x, H, G) {
12444
12497
  var se = ge();
12445
12498
  try {
12446
12499
  return be(n)(i, o, c, l, y, A, O, x, H, G);
@@ -12449,7 +12502,7 @@ var Rh = (() => {
12449
12502
  ye(1, 0);
12450
12503
  }
12451
12504
  }
12452
- function Ka(n, i) {
12505
+ function Ya(n, i) {
12453
12506
  var o = ge();
12454
12507
  try {
12455
12508
  return be(n)(i);
@@ -12458,7 +12511,7 @@ var Rh = (() => {
12458
12511
  ye(1, 0);
12459
12512
  }
12460
12513
  }
12461
- function Ya(n, i, o, c, l, y, A, O) {
12514
+ function Ga(n, i, o, c, l, y, A, O) {
12462
12515
  var x = ge();
12463
12516
  try {
12464
12517
  be(n)(i, o, c, l, y, A, O);
@@ -12467,7 +12520,7 @@ var Rh = (() => {
12467
12520
  ye(1, 0);
12468
12521
  }
12469
12522
  }
12470
- function Ga(n, i, o, c, l, y, A, O) {
12523
+ function Xa(n, i, o, c, l, y, A, O) {
12471
12524
  var x = ge();
12472
12525
  try {
12473
12526
  return be(n)(i, o, c, l, y, A, O);
@@ -12476,7 +12529,7 @@ var Rh = (() => {
12476
12529
  ye(1, 0);
12477
12530
  }
12478
12531
  }
12479
- function Xa(n, i, o, c, l, y, A, O, x) {
12532
+ function Ja(n, i, o, c, l, y, A, O, x) {
12480
12533
  var H = ge();
12481
12534
  try {
12482
12535
  return be(n)(i, o, c, l, y, A, O, x);
@@ -12485,7 +12538,7 @@ var Rh = (() => {
12485
12538
  ye(1, 0);
12486
12539
  }
12487
12540
  }
12488
- function Ja(n, i, o, c, l, y, A, O, x, H, G) {
12541
+ function Qa(n, i, o, c, l, y, A, O, x, H, G) {
12489
12542
  var se = ge();
12490
12543
  try {
12491
12544
  be(n)(i, o, c, l, y, A, O, x, H, G);
@@ -12494,7 +12547,7 @@ var Rh = (() => {
12494
12547
  ye(1, 0);
12495
12548
  }
12496
12549
  }
12497
- function Qa(n, i, o, c, l, y, A, O, x, H, G) {
12550
+ function Za(n, i, o, c, l, y, A, O, x, H, G) {
12498
12551
  var se = ge();
12499
12552
  try {
12500
12553
  return be(n)(i, o, c, l, y, A, O, x, H, G);
@@ -12503,7 +12556,7 @@ var Rh = (() => {
12503
12556
  ye(1, 0);
12504
12557
  }
12505
12558
  }
12506
- function Za(n, i, o, c) {
12559
+ function ec(n, i, o, c) {
12507
12560
  var l = ge();
12508
12561
  try {
12509
12562
  return be(n)(i, o, c);
@@ -12512,7 +12565,7 @@ var Rh = (() => {
12512
12565
  return ye(1, 0), 0n;
12513
12566
  }
12514
12567
  }
12515
- function ec(n, i, o, c, l, y, A, O, x, H) {
12568
+ function tc(n, i, o, c, l, y, A, O, x, H) {
12516
12569
  var G = ge();
12517
12570
  try {
12518
12571
  be(n)(i, o, c, l, y, A, O, x, H);
@@ -12521,7 +12574,7 @@ var Rh = (() => {
12521
12574
  ye(1, 0);
12522
12575
  }
12523
12576
  }
12524
- function tc(n, i, o, c, l, y, A, O, x) {
12577
+ function rc(n, i, o, c, l, y, A, O, x) {
12525
12578
  var H = ge();
12526
12579
  try {
12527
12580
  be(n)(i, o, c, l, y, A, O, x);
@@ -12530,7 +12583,7 @@ var Rh = (() => {
12530
12583
  ye(1, 0);
12531
12584
  }
12532
12585
  }
12533
- function rc(n, i, o) {
12586
+ function nc(n, i, o) {
12534
12587
  var c = ge();
12535
12588
  try {
12536
12589
  return be(n)(i, o);
@@ -12539,7 +12592,7 @@ var Rh = (() => {
12539
12592
  ye(1, 0);
12540
12593
  }
12541
12594
  }
12542
- function nc(n, i, o, c, l, y, A, O, x, H, G) {
12595
+ function ic(n, i, o, c, l, y, A, O, x, H, G) {
12543
12596
  var se = ge();
12544
12597
  try {
12545
12598
  return be(n)(i, o, c, l, y, A, O, x, H, G);
@@ -12548,7 +12601,7 @@ var Rh = (() => {
12548
12601
  ye(1, 0);
12549
12602
  }
12550
12603
  }
12551
- function ic(n, i, o, c) {
12604
+ function oc(n, i, o, c) {
12552
12605
  var l = ge();
12553
12606
  try {
12554
12607
  be(n)(i, o, c);
@@ -12557,7 +12610,7 @@ var Rh = (() => {
12557
12610
  ye(1, 0);
12558
12611
  }
12559
12612
  }
12560
- function oc(n, i, o, c) {
12613
+ function sc(n, i, o, c) {
12561
12614
  var l = ge();
12562
12615
  try {
12563
12616
  return be(n)(i, o, c);
@@ -12566,7 +12619,7 @@ var Rh = (() => {
12566
12619
  ye(1, 0);
12567
12620
  }
12568
12621
  }
12569
- function sc(n, i, o, c, l) {
12622
+ function ac(n, i, o, c, l) {
12570
12623
  var y = ge();
12571
12624
  try {
12572
12625
  be(n)(i, o, c, l);
@@ -12575,7 +12628,7 @@ var Rh = (() => {
12575
12628
  ye(1, 0);
12576
12629
  }
12577
12630
  }
12578
- function ac(n, i, o, c, l, y, A, O) {
12631
+ function cc(n, i, o, c, l, y, A, O) {
12579
12632
  var x = ge();
12580
12633
  try {
12581
12634
  be(n)(i, o, c, l, y, A, O);
@@ -12584,7 +12637,7 @@ var Rh = (() => {
12584
12637
  ye(1, 0);
12585
12638
  }
12586
12639
  }
12587
- function cc(n, i, o) {
12640
+ function lc(n, i, o) {
12588
12641
  var c = ge();
12589
12642
  try {
12590
12643
  be(n)(i, o);
@@ -12593,7 +12646,7 @@ var Rh = (() => {
12593
12646
  ye(1, 0);
12594
12647
  }
12595
12648
  }
12596
- function lc(n, i, o, c, l, y, A) {
12649
+ function dc(n, i, o, c, l, y, A) {
12597
12650
  var O = ge();
12598
12651
  try {
12599
12652
  be(n)(i, o, c, l, y, A);
@@ -12602,7 +12655,7 @@ var Rh = (() => {
12602
12655
  ye(1, 0);
12603
12656
  }
12604
12657
  }
12605
- function dc(n, i, o, c) {
12658
+ function _c(n, i, o, c) {
12606
12659
  var l = ge();
12607
12660
  try {
12608
12661
  return be(n)(i, o, c);
@@ -12611,7 +12664,16 @@ var Rh = (() => {
12611
12664
  ye(1, 0);
12612
12665
  }
12613
12666
  }
12614
- function _c(n, i, o, c, l, y, A, O, x, H, G, se) {
12667
+ function hc(n, i, o, c) {
12668
+ var l = ge();
12669
+ try {
12670
+ be(n)(i, o, c);
12671
+ } catch (y) {
12672
+ if (ve(l), y !== y + 0) throw y;
12673
+ ye(1, 0);
12674
+ }
12675
+ }
12676
+ function uc(n, i, o, c, l, y, A, O, x, H, G, se) {
12615
12677
  var q = ge();
12616
12678
  try {
12617
12679
  be(n)(i, o, c, l, y, A, O, x, H, G, se);
@@ -12620,7 +12682,7 @@ var Rh = (() => {
12620
12682
  ye(1, 0);
12621
12683
  }
12622
12684
  }
12623
- function hc(n, i, o, c, l, y) {
12685
+ function fc(n, i, o, c, l, y) {
12624
12686
  var A = ge();
12625
12687
  try {
12626
12688
  be(n)(i, o, c, l, y);
@@ -12629,7 +12691,7 @@ var Rh = (() => {
12629
12691
  ye(1, 0);
12630
12692
  }
12631
12693
  }
12632
- function uc(n, i, o, c, l) {
12694
+ function pc(n, i, o, c, l) {
12633
12695
  var y = ge();
12634
12696
  try {
12635
12697
  be(n)(i, o, c, l);
@@ -12638,7 +12700,7 @@ var Rh = (() => {
12638
12700
  ye(1, 0);
12639
12701
  }
12640
12702
  }
12641
- function fc(n, i, o, c) {
12703
+ function yc(n, i, o, c) {
12642
12704
  var l = ge();
12643
12705
  try {
12644
12706
  return be(n)(i, o, c);
@@ -12647,7 +12709,7 @@ var Rh = (() => {
12647
12709
  ye(1, 0);
12648
12710
  }
12649
12711
  }
12650
- function pc(n) {
12712
+ function gc(n) {
12651
12713
  var i = ge();
12652
12714
  try {
12653
12715
  return be(n)();
@@ -12656,7 +12718,7 @@ var Rh = (() => {
12656
12718
  return ye(1, 0), 0n;
12657
12719
  }
12658
12720
  }
12659
- function yc(n, i, o, c, l, y) {
12721
+ function vc(n, i, o, c, l, y) {
12660
12722
  var A = ge();
12661
12723
  try {
12662
12724
  return be(n)(i, o, c, l, y);
@@ -12665,7 +12727,7 @@ var Rh = (() => {
12665
12727
  ye(1, 0);
12666
12728
  }
12667
12729
  }
12668
- function gc(n, i, o, c, l) {
12730
+ function bc(n, i, o, c, l) {
12669
12731
  var y = ge();
12670
12732
  try {
12671
12733
  return be(n)(i, o, c, l);
@@ -12674,7 +12736,7 @@ var Rh = (() => {
12674
12736
  return ye(1, 0), 0n;
12675
12737
  }
12676
12738
  }
12677
- function vc(n, i, o, c) {
12739
+ function Ec(n, i, o, c) {
12678
12740
  var l = ge();
12679
12741
  try {
12680
12742
  return be(n)(i, o, c);
@@ -12683,7 +12745,7 @@ var Rh = (() => {
12683
12745
  ye(1, 0);
12684
12746
  }
12685
12747
  }
12686
- function bc(n, i, o, c, l, y, A, O, x, H, G, se) {
12748
+ function Ac(n, i, o, c, l, y, A, O, x, H, G, se) {
12687
12749
  var q = ge();
12688
12750
  try {
12689
12751
  return be(n)(i, o, c, l, y, A, O, x, H, G, se);
@@ -12692,7 +12754,7 @@ var Rh = (() => {
12692
12754
  ye(1, 0);
12693
12755
  }
12694
12756
  }
12695
- function Ec(n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me) {
12757
+ function mc(n, i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me) {
12696
12758
  var Ze = ge();
12697
12759
  try {
12698
12760
  be(n)(i, o, c, l, y, A, O, x, H, G, se, q, X, he, Me);
@@ -12701,16 +12763,16 @@ var Rh = (() => {
12701
12763
  ye(1, 0);
12702
12764
  }
12703
12765
  }
12704
- t.ccall = Mi, t.cwrap = Ra, t.setValue = St, t.getValue = pt, t.UTF8ToString = ur, t.stringToUTF8 = Gr, t.lengthBytesUTF8 = lt;
12705
- var Zr;
12766
+ t.ccall = Mi, t.cwrap = Na, t.setValue = St, t.getValue = pt, t.UTF8ToString = ur, t.stringToUTF8 = Yr, t.lengthBytesUTF8 = lt;
12767
+ var Qr;
12706
12768
  ue = function n() {
12707
- Zr || qi(), Zr || (ue = n);
12769
+ Qr || qi(), Qr || (ue = n);
12708
12770
  };
12709
12771
  function qi() {
12710
12772
  if (ie > 0 || (ee(), ie > 0))
12711
12773
  return;
12712
12774
  function n() {
12713
- Zr || (Zr = !0, t.calledRun = !0, !C && (ae(), s(t), t.onRuntimeInitialized && t.onRuntimeInitialized(), oe()));
12775
+ Qr || (Qr = !0, t.calledRun = !0, !C && (ae(), s(t), t.onRuntimeInitialized && t.onRuntimeInitialized(), oe()));
12714
12776
  }
12715
12777
  t.setStatus ? (t.setStatus("Running..."), setTimeout(function() {
12716
12778
  setTimeout(function() {
@@ -12724,7 +12786,7 @@ var Rh = (() => {
12724
12786
  return qi(), r.ready;
12725
12787
  };
12726
12788
  })();
12727
- const Nh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12789
+ const xh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12728
12790
  __proto__: null,
12729
- default: Rh
12791
+ default: Th
12730
12792
  }, Symbol.toStringTag, { value: "Module" }));