@ghostlytools/sdk 1.13.1 → 1.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{bitcoinAddress-BbPG0DF7.js → bitcoinAddress-DifDz48H.js} +254 -34
  2. package/dist/bitcoinAddress-DifDz48H.js.map +1 -0
  3. package/dist/core.js +534 -95
  4. package/dist/core.js.map +1 -1
  5. package/dist/index.js +3 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/{pairedTransports-C0I24YFz.js → pairedTransports-D8ZSZJBi.js} +22 -16
  8. package/dist/pairedTransports-D8ZSZJBi.js.map +1 -0
  9. package/dist/testing.js +2 -2
  10. package/dist/types/browser/src/proofs/contract.d.ts +2 -1
  11. package/dist/types/core/src/appStatements.d.ts +16 -0
  12. package/dist/types/core/src/canonicalJson.d.ts +9 -0
  13. package/dist/types/core/src/chatFiles.d.ts +36 -4
  14. package/dist/types/core/src/deviceInvite.d.ts +16 -2
  15. package/dist/types/core/src/didDht.d.ts +2 -1
  16. package/dist/types/core/src/engineErrors.d.ts +6 -0
  17. package/dist/types/core/src/groupCommunity.d.ts +10 -0
  18. package/dist/types/core/src/groupSession.d.ts +40 -3
  19. package/dist/types/core/src/identityProofs.d.ts +44 -2
  20. package/dist/types/core/src/link.d.ts +1 -1
  21. package/dist/types/core/src/linkPreview.d.ts +13 -1
  22. package/dist/types/core/src/linkTrace.d.ts +2 -0
  23. package/dist/types/core/src/localNames.d.ts +7 -0
  24. package/dist/types/core/src/relay.d.ts +27 -1
  25. package/dist/types/core/src/transportSwitch.d.ts +7 -3
  26. package/dist/{verify-BoVhjvc_.js → verify-DpuVYnNs.js} +2 -2
  27. package/dist/{verify-BoVhjvc_.js.map → verify-DpuVYnNs.js.map} +1 -1
  28. package/package.json +1 -1
  29. package/dist/bitcoinAddress-BbPG0DF7.js.map +0 -1
  30. package/dist/pairedTransports-C0I24YFz.js.map +0 -1
package/dist/core.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./rolldown-runtime-DpEnGzO4.js";
2
2
  import { a as concatBytes, c as fromZ32, d as toBase64, f as toBase64Url, h as utf8Encode, i as bytesEqual, l as isZ32Key, m as utf8Decode, n as decodeBolt11, o as fromBase64, p as toZ32, r as findBolt11, s as fromBase64Url, t as BOLT11_PATTERN, u as randomBytes } from "./bolt11-CRiQrma3.js";
3
- import { $ as GROUP_BURST_ONE_LINK, $t as IDENTITY_MEMO_SIZE, A as newIdentityBinding, At as PublishFailedError, B as ANSWER_READ_SPACING_MS, Bt as createRelayPayload, C as emptyIdentityLedger, Ct as traceLink, D as identityStatement, Dt as BREAKER_THRESHOLD, E as identityRevocationValue, Et as BREAKER_MAX_MS, F as IDENTITY_TIMELINE_MAX, Ft as withRequestOptions, G as CHAT_RESERVE, Gt as readOwnRelayPayload, H as BACKGROUND_REQUESTS_PER_MINUTE, Ht as newerPacket, I as applyIdentityEvent, It as MAX_DNS_PACKET_BYTES, J as CHAT_WATCH_SHARE, Jt as decodeTxtPacket, K as CHAT_RESERVE_MOST_SHARE, Kt as signRelayPayload, L as lastSharedWithMe, Lt as PKARR_FUTURE_SKEW_MS, M as revokesIdentity, Mt as heldBackError, N as signIdentityPresentation, Nt as isDiscoveryBudgetError, O as identityStatementText, Ot as RelayBreaker, P as verifyIdentityPresentation, Pt as publishedNowhere, Q as GROUP_BURST_MS, Qt as IDENTITY_MEMO_MAX, R as ANSWER_READ_ALLOWANCE, Rt as PacketTooLargeError, S as boundVerifiedIdentity, St as setLinkTraceSink, T as identityRefusal, Tt as BREAKER_BASE_MS, U as BACKGROUND_WHILE_SIGNALING, Ut as openRelayPayload, V as AWAITED_READS, Vt as measureRecords, W as BACKGROUND_WRITES_SHARE, Wt as parseRelayPayload, X as DEPARTED_READS, Xt as readDnsName, Y as DEFAULT_RELAYS, Yt as encodeTxtPacket, Z as FRESH_READ_MS, Zt as IDENTITY_MEMO_IDLE_MS, _ as IDENTITY_STATEMENT_PREFIX, _t as WRITE_FIRST_MS, a as IDENTITY_CLOCK_SKEW, an as sign, at as PREVIOUS_DEFAULT_RELAYS, b as IdentityExchange, bt as readRelayBody, c as IDENTITY_MAX_CHECKS_PER_HOUR, cn as dropLoneJoiners, ct as RelayTransport, d as IDENTITY_MAX_RECEIVED, dn as sanitizeNick, dt as SIGNALING_WINDOW_MS, en as createIdentity, et as GROUP_OVER_PACE_MS, f as IDENTITY_MAX_VALIDITY, fn as stripHidden, ft as SLOW_DEMOTE_MS, g as IDENTITY_REVOCATION_LABEL, gt as WAY_BACK_SHARE, h as IDENTITY_REUSE_CHECK_S, ht as WATCH_SHARE, i as IDENTITY_CHECK_UNAVAILABLE, in as setPublicKeyFastPath, it as HEDGE_MS, j as receivedIdentityStatus, jt as budgetRetryMs, k as isIdentityBinding, kt as DiscoveryBudgetError, l as IDENTITY_MAX_EVIDENCE, ln as hasVisible, lt as RelaysFailedError, m as IDENTITY_PROVIDER_ID, mn as unwrapPasted, mt as TURN_SOURCE_TIMEOUT_MS, n as isBitcoinAddress, nn as identityFromSeedB64, nt as GROUP_SIGNALING_ALLOWANCE_SHARE, o as IDENTITY_FRAME_LIMIT, on as verify, ot as RELAY_REQUESTS_PER_MINUTE, p as IDENTITY_PROOF_CAPABILITY, pn as trimEndOf, pt as SLOW_MS, q as CHAT_RESERVE_PER_CHAT, qt as decodeDnsAnswers, r as IDENTITY_CHALLENGE_WINDOW, rn as publicKeyFromZ32, rt as HEDGE_MISSING_MS, s as IDENTITY_FRAME_WINDOW_MS, sn as MAX_NICK_LENGTH, st as REQUESTS_PER_MINUTE, t as BITCOIN_NETWORKS, tn as identityFromSeed, tt as GROUP_RATION_WINDOW_MS, u as IDENTITY_MAX_FRAME, un as sanitizeDisplayText, ut as SIGNALING_ALLOWANCE_SHARE, v as IDENTITY_SUBJECT, vt as currentRelays, w as identityPresentationBytes, wt as BREAKER_ALL_DOWN_PROBE_MS, x as boundIdentityDisplay, xt as relayUrlProblem, y as IdentityCheckUnavailable, yt as normalizeRelayUrl, z as ANSWER_READ_FIRST_MS, zt as RELAY_PAYLOAD_MAX_BYTES } from "./bitcoinAddress-BbPG0DF7.js";
4
- import { A as WELL_KNOWN_PATH, B as recordsFromTxt, C as DNS_LABEL, D as DOMAIN_METHODS, E as DOMAIN_MAX_RECORDS, F as encodeDnsQuery, G as wellKnownUrl, H as recordsName, I as isPublicAddress, J as generateEncryptionKey, K as decrypt, L as nip05RootKey, M as dnsProofName, N as domainTxtRecord, O as DOMAIN_TXT_MAX_BYTES, P as domainWellKnownFile, R as normalizeDomain, S as readManifest, T as DOMAIN_FILE_MAX_BYTES, U as txtValue, V as recordsFromWellKnown, W as validDomainRecord, X as tryDecrypt, Y as sealedLength, _ as HOLD_LIMITS, a as automaticTransport, b as isHoldUrl, c as irohDescriptor, d as relayUrl, f as relayUrlTooLong, g as HOLD_DATED_BACK_MS, h as HOLD_CAPABILITY, i as TRANSPORTS, j as decodeDnsResponse, k as NIP05_PATH, l as irohRelayUrl, m as transportOrder, n as RELAY_URL, o as checkedDescriptors, p as relayedTransports, q as encrypt, r as RELAY_WITH_SECRETS, s as dialableIrohRelay, t as AUTOMATIC_ORDER, u as rankTransports, v as HoldKeys, w as DNS_TYPE, x as newMailbox, y as HoldRefusedError, z as parseDomainTxt } from "./pairedTransports-C0I24YFz.js";
3
+ import { $ as DEFAULT_RELAYS, $t as decodeTxtPacket, A as identityRevocationValue, At as BREAKER_BASE_MS, B as applyIdentityEvent, Bt as withRequestOptions, C as IdentityCheckUnavailable, Ct as currentRelays, D as emptyIdentityLedger, Dt as setLinkTraceSink, E as boundVerifiedIdentity, Et as relayUrlProblem, F as receivedIdentityStatus, Ft as PublishFailedError, G as AWAITED_READS, Gt as createRelayPayload, H as ANSWER_READ_ALLOWANCE, Ht as PKARR_FUTURE_SKEW_MS, I as revokesIdentity, It as budgetRetryMs, J as BACKGROUND_WRITES_SHARE, Jt as openRelayPayload, K as BACKGROUND_REQUESTS_PER_MINUTE, Kt as measureRecords, L as signIdentityPresentation, Lt as heldBackError, M as identityStatementText, Mt as BREAKER_THRESHOLD, N as isIdentityBinding, Nt as RelayBreaker, O as identityPresentationBytes, Ot as traceLink, P as newIdentityBinding, Pt as DiscoveryBudgetError, Q as CHAT_WATCH_SHARE, Qt as decodeDnsAnswers, R as verifyIdentityPresentation, Rt as isDiscoveryBudgetError, S as IDENTITY_SUBJECT, St as WRITE_FIRST_MS, T as boundIdentityDisplay, Tt as readRelayBody, U as ANSWER_READ_FIRST_MS, Ut as PacketTooLargeError, V as lastSharedWithMe, Vt as MAX_DNS_PACKET_BYTES, W as ANSWER_READ_SPACING_MS, Wt as RELAY_PAYLOAD_MAX_BYTES, X as CHAT_RESERVE_MOST_SHARE, Xt as readOwnRelayPayload, Y as CHAT_RESERVE, Yt as parseRelayPayload, Z as CHAT_RESERVE_PER_CHAT, Zt as signRelayPayload, _ as IDENTITY_REUSE_CHECK_S, _n as stripHidden, _t as SLOW_DEMOTE_MS, a as IDENTITY_CLOCK_SKEW, an as createIdentity, at as GROUP_OVER_PACE_MS, b as IDENTITY_SEND_WINDOW_MS, bt as WATCH_SHARE, c as IDENTITY_MAX_CHECKS_PER_HOUR, cn as publicKeyFromZ32, ct as HEDGE_MISSING_MS, d as IDENTITY_MAX_RECEIVED, dn as verify, dt as RELAY_REQUESTS_PER_MINUTE, en as encodeTxtPacket, et as DEPARTED_READS, f as IDENTITY_MAX_VALIDITY, fn as MAX_NICK_LENGTH, ft as REQUESTS_PER_MINUTE, g as IDENTITY_RESEND_MS, gn as sanitizeNick, gt as SIGNALING_WINDOW_MS, h as IDENTITY_RESENDS, hn as sanitizeDisplayText, ht as SIGNALING_ALLOWANCE_SHARE, i as IDENTITY_CHECK_UNAVAILABLE, in as IDENTITY_MEMO_SIZE, it as GROUP_BURST_ONE_LINK, j as identityStatement, jt as BREAKER_MAX_MS, k as identityRefusal, kt as BREAKER_ALL_DOWN_PROBE_MS, l as IDENTITY_MAX_EVIDENCE, ln as setPublicKeyFastPath, lt as HEDGE_MS, m as IDENTITY_PROVIDER_ID, mn as hasVisible, mt as RelaysFailedError, n as isBitcoinAddress, nn as IDENTITY_MEMO_IDLE_MS, nt as FRESH_READ_MS, o as IDENTITY_FRAME_LIMIT, on as identityFromSeed, ot as GROUP_RATION_WINDOW_MS, p as IDENTITY_PROOF_CAPABILITY, pn as dropLoneJoiners, pt as RelayTransport, q as BACKGROUND_WHILE_SIGNALING, qt as newerPacket, r as IDENTITY_CHALLENGE_WINDOW, rn as IDENTITY_MEMO_MAX, rt as GROUP_BURST_MS, s as IDENTITY_FRAME_WINDOW_MS, sn as identityFromSeedB64, st as GROUP_SIGNALING_ALLOWANCE_SHARE, t as BITCOIN_NETWORKS, tn as readDnsName, tt as DOOR_FIRST_MS, u as IDENTITY_MAX_FRAME, un as sign, ut as PREVIOUS_DEFAULT_RELAYS, v as IDENTITY_REVOCATION_LABEL, vn as trimEndOf, vt as SLOW_MS, w as IdentityExchange, wt as normalizeRelayUrl, x as IDENTITY_STATEMENT_PREFIX, xt as WAY_BACK_SHARE, y as IDENTITY_SEND_LIMIT, yn as unwrapPasted, yt as TURN_SOURCE_TIMEOUT_MS, z as IDENTITY_TIMELINE_MAX, zt as publishedNowhere } from "./bitcoinAddress-DifDz48H.js";
4
+ import { A as NIP05_PATH, B as parseDomainTxt, C as underLocalSuffix, D as DOMAIN_MAX_RECORDS, E as DOMAIN_FILE_MAX_BYTES, F as domainWellKnownFile, G as validDomainRecord, H as recordsFromWellKnown, I as encodeDnsQuery, J as encrypt, K as wellKnownUrl, L as isPublicAddress, M as decodeDnsResponse, N as dnsProofName, O as DOMAIN_METHODS, P as domainTxtRecord, R as nip05RootKey, S as readManifest, T as DNS_TYPE, U as recordsName, V as recordsFromTxt, W as txtValue, X as sealedLength, Y as generateEncryptionKey, Z as tryDecrypt, _ as HOLD_LIMITS, a as automaticTransport, b as isHoldUrl, c as irohDescriptor, d as relayUrl, f as relayUrlTooLong, g as HOLD_DATED_BACK_MS, h as HOLD_CAPABILITY, i as TRANSPORTS, j as WELL_KNOWN_PATH, k as DOMAIN_TXT_MAX_BYTES, l as irohRelayUrl, m as transportOrder, n as RELAY_URL, o as checkedDescriptors, p as relayedTransports, q as decrypt, r as RELAY_WITH_SECRETS, s as dialableIrohRelay, t as AUTOMATIC_ORDER, u as rankTransports, v as HoldKeys, w as DNS_LABEL, x as newMailbox, y as HoldRefusedError, z as normalizeDomain } from "./pairedTransports-D8ZSZJBi.js";
5
5
  import { xsalsa20poly1305 } from "@noble/ciphers/salsa.js";
6
6
  import { ed25519, x25519 } from "@noble/curves/ed25519.js";
7
7
  import { sha256, sha512 } from "@noble/hashes/sha2.js";
@@ -1146,6 +1146,19 @@ var DEVICE_INVITE_BYTES = 133;
1146
1146
  var DEVICE_INVITE_OWN_DEVICE = 1;
1147
1147
  /** How long a code is good for (WISP 06: the inviter enforces the 10 minutes). */
1148
1148
  var DEVICE_INVITE_LIFETIME_S = 600;
1149
+ /**
1150
+ * How far past its expiry, by the reading device's own clock, a code is still taken: a day. The expiry is in the
1151
+ * inviter's clock, and the reader's may run ahead of it by minutes (no time sync), by hours (a wrong time zone set as
1152
+ * local time) or more; only the inviter's word counts, and the inviter refuses a code past its ten minutes. A code a
1153
+ * day past its expiry here is old by any likely clock.
1154
+ */
1155
+ var DEVICE_INVITE_READ_SLACK_S = 86400;
1156
+ /**
1157
+ * Whether the device reading a code takes it as expired: `expires` is the code's (the inviter's clock), `now` this
1158
+ * device's, both UNIX seconds. The one rule for every reader (the enrollment and the join dialogs), so none refuses a
1159
+ * fresh code from an inviter whose clock is behind this one.
1160
+ */
1161
+ var deviceInviteExpired = (expires, now) => expires + DEVICE_INVITE_READ_SLACK_S <= now;
1149
1162
  /** The `ghostly1z…` code of a device invite. */
1150
1163
  function encodeDeviceInvite(invite) {
1151
1164
  const fields = [
@@ -1169,7 +1182,8 @@ function encodeDeviceInvite(invite) {
1169
1182
  var body$1 = (input) => unwrapPasted(input).replace(/^.*#/, "");
1170
1183
  /**
1171
1184
  * Reads a device code, pasted or scanned (bare, in capitals from a QR code, or after a `#`). `now` is in UNIX
1172
- * seconds: a code past its expiry is refused here already, though only the inviter's word counts.
1185
+ * seconds, this device's clock: only a code a day past its expiry by it is refused here (`deviceInviteExpired`), since
1186
+ * only the inviter's word counts.
1173
1187
  */
1174
1188
  function readDeviceInvite(input, now = Math.floor(Date.now() / 1e3)) {
1175
1189
  const code = body$1(input).toLowerCase();
@@ -1231,7 +1245,7 @@ function readDeviceInvite(input, now = Math.floor(Date.now() / 1e3)) {
1231
1245
  detail: `Flags ${flags}`
1232
1246
  };
1233
1247
  const expires = new DataView(payload.buffer, payload.byteOffset, payload.byteLength).getUint32(129);
1234
- if (expires <= now) return {
1248
+ if (deviceInviteExpired(expires, now)) return {
1235
1249
  ok: false,
1236
1250
  reason: "expired"
1237
1251
  };
@@ -1455,6 +1469,42 @@ function readCanonicalJson(bytes) {
1455
1469
  value
1456
1470
  };
1457
1471
  }
1472
+ /**
1473
+ * The entries of bytes that must be a canonical JSON list, each as its own bytes, one at a time: a scan that builds no
1474
+ * value and goes no further than the entry it yields, so a caller reads (and may refuse) each before the next is
1475
+ * found. It ends with null at the closing `]`; `not-list` past `maxEntries` entries, at an entry over `maxEntryBytes`,
1476
+ * or when the bytes are not within `[` and `]`; `not-json` when brackets or quotes do not close. A canonical list is
1477
+ * `[`, its entries' canonical texts joined by `,`, then `]`, so the bytes are canonical exactly when the scan ends with
1478
+ * null and each entry read alone with `readCanonicalJson` is.
1479
+ */
1480
+ function* canonicalJsonListEntries(bytes, maxEntries, maxEntryBytes) {
1481
+ const end = bytes.length - 1;
1482
+ if (end < 1 || bytes[0] !== 91 || bytes[end] !== 93) return "not-list";
1483
+ if (end === 1) return null;
1484
+ let depth = 0;
1485
+ let inString = false;
1486
+ let start = 1;
1487
+ let count = 0;
1488
+ for (let i = 1; i <= end; i++) {
1489
+ const b = bytes[i];
1490
+ if (i === end || b === 44 && depth === 0 && !inString) {
1491
+ if (i === end && (depth !== 0 || inString)) return "not-json";
1492
+ if (count === maxEntries || i - start > maxEntryBytes) return "not-list";
1493
+ count++;
1494
+ yield bytes.subarray(start, i);
1495
+ start = i + 1;
1496
+ continue;
1497
+ }
1498
+ if (i - start >= maxEntryBytes) return "not-list";
1499
+ if (inString) {
1500
+ if (b === 92) i++;
1501
+ else if (b === 34) inString = false;
1502
+ } else if (b === 34) inString = true;
1503
+ else if (b === 91 || b === 123) depth++;
1504
+ else if ((b === 93 || b === 125) && --depth < 0) return "not-json";
1505
+ }
1506
+ return start === end + 1 ? null : "not-json";
1507
+ }
1458
1508
  // ../core/src/image.ts
1459
1509
  var IMAGE_LIMITS = {
1460
1510
  /** Pixels on either side: the most a JPEG can say, well past what anyone sends as a picture. */
@@ -1641,7 +1691,12 @@ var APP_STATEMENT_LIMITS = {
1641
1691
  /** A revocation's reason, in characters. */
1642
1692
  reason: 200,
1643
1693
  /** Revocations in one `ghostly-revoke.json`. */
1644
- revocations: 4096
1694
+ revocations: 4096,
1695
+ /**
1696
+ * One signed revocation's canonical bytes: twice the largest a valid one can be (64 digests, a 32-character name and
1697
+ * a 200-character reason of 4-byte characters: about 4.1 KB), so a reader refuses a larger entry before parsing it.
1698
+ */
1699
+ revocationBytes: 8192
1645
1700
  };
1646
1701
  /** A z-base32 Ed25519 public key: 52 characters that decode to 32 bytes and encode back to the same text. */
1647
1702
  function isAppKey(value) {
@@ -1933,24 +1988,39 @@ function verifyAppRevocation(revocation, checked) {
1933
1988
  * file, as a store index's `revoked` does. With `checked`, a revocation it holds is not checked again.
1934
1989
  */
1935
1990
  function readAppRevocations(bytes, checked) {
1936
- const read = readCanonicalJson(bytes);
1937
- if (!read.ok) return read;
1938
- if (!Array.isArray(read.value) || read.value.length > APP_STATEMENT_LIMITS.revocations) return {
1939
- ok: false,
1940
- reason: "bad-revocation",
1941
- detail: "Not a list of at most 4096 revocations"
1942
- };
1943
1991
  const revocations = [];
1944
- for (const entry of read.value) {
1945
- const one = readAppRevocation(entry, checked);
1992
+ const entries = appRevocationsFileEntries(bytes);
1993
+ let next = entries.next();
1994
+ for (; !next.done; next = entries.next()) {
1995
+ const read = readCanonicalJson(next.value);
1996
+ if (!read.ok) return read;
1997
+ const one = readAppRevocation(read.value, checked);
1946
1998
  if (!one.ok) return one;
1947
1999
  revocations.push(one.revocation);
1948
2000
  }
1949
- return {
2001
+ return next.value ?? {
1950
2002
  ok: true,
1951
2003
  revocations
1952
2004
  };
1953
2005
  }
2006
+ /**
2007
+ * The entries of a `ghostly-revoke.json`, each as its own bytes, one at a time and with nothing parsed: a file past
2008
+ * 4096 entries, or with one larger than any revocation can be, is refused there, however large it is. It ends with null
2009
+ * when the list closed. Each entry read alone (`readCanonicalJson`, then `readAppRevocation`) refuses exactly the files
2010
+ * reading the file whole refuses.
2011
+ */
2012
+ function* appRevocationsFileEntries(bytes) {
2013
+ const end = yield* canonicalJsonListEntries(bytes, APP_STATEMENT_LIMITS.revocations, APP_STATEMENT_LIMITS.revocationBytes);
2014
+ if (end === "not-list") return {
2015
+ ok: false,
2016
+ reason: "bad-revocation",
2017
+ detail: "Not a list of at most 4096 revocations"
2018
+ };
2019
+ return end && {
2020
+ ok: false,
2021
+ reason: end
2022
+ };
2023
+ }
1954
2024
  // ../core/src/appBundle.ts
1955
2025
  var APP_BUNDLE_MAGIC = "GHOSTLYAPP1";
1956
2026
  var MAGIC$1 = utf8Encode(APP_BUNDLE_MAGIC);
@@ -5412,6 +5482,20 @@ function sanitizeRequestHeaders(headers) {
5412
5482
  return !DROPPED_REQUEST_HEADER_PREFIXES.some((prefix) => lower.startsWith(prefix));
5413
5483
  });
5414
5484
  }
5485
+ /**
5486
+ * A cookie's `Path` as the client sees the app: without the target's base path, which the client never sees (as
5487
+ * `relativizeLocation` takes it off), so a cookie the app keeps on `/notes` is sent back to its `/home` at `/`. One
5488
+ * outside the base path would never be sent at all and goes on `/`; one that does not start with `/` the browser
5489
+ * ignores, so it stays.
5490
+ */
5491
+ function cookieOnClient(cookie, target) {
5492
+ if (!target.basePath) return cookie;
5493
+ return cookie.replace(/;\s*path\s*=\s*([^;]*)/gi, (attribute, value) => {
5494
+ const path = value.trim();
5495
+ if (!path.startsWith("/")) return attribute;
5496
+ return `; Path=${path === target.basePath || path.startsWith(`${target.basePath}/`) ? path.slice(target.basePath.length) || "/" : "/"}`;
5497
+ });
5498
+ }
5415
5499
  /** `from`: the local URL of the request answered, the one a relative `Location` is read against. */
5416
5500
  function sanitizeResponseHeaders(headers, target, from) {
5417
5501
  const out = [];
@@ -5422,7 +5506,7 @@ function sanitizeResponseHeaders(headers, target, from) {
5422
5506
  if (lower === "location" || lower === "content-location") {
5423
5507
  const location = relativizeLocation(value, target, from);
5424
5508
  if (location !== null) out.push([name, location]);
5425
- } else if (lower === "set-cookie") out.push([name, value.replace(/;\s*domain\s*=[^;]*/gi, "")]);
5509
+ } else if (lower === "set-cookie") out.push([name, cookieOnClient(value.replace(/;\s*domain\s*=[^;]*/gi, ""), target)]);
5426
5510
  else out.push([name, value]);
5427
5511
  }
5428
5512
  return out;
@@ -7157,9 +7241,9 @@ var LinkSession = class {
7157
7241
  if (publish) this.publish().catch(() => {});
7158
7242
  if (read) this.pollNow();
7159
7243
  }
7160
- /** This side's packet goes out now, unless one already did. */
7244
+ /** This side's packet goes out now, unless one already did (in this run, once it left DHT only: `presenceDue`). */
7161
7245
  ensureAdvertised() {
7162
- if (!this.running || this.lastPublishedAt > 0 || this.publishing) return;
7246
+ if (!this.running || this.lastPublishedAt > 0 && !this.presenceDueOut || this.publishing) return;
7163
7247
  this.publish().catch(() => {});
7164
7248
  }
7165
7249
  /** This side's packet goes out again as it is: another writer of its key (a second device on a device code) may have replaced it. */
@@ -10244,20 +10328,27 @@ var LINK_CLOSERS = {
10244
10328
  * and full stop, the full-width ! , : ; ? and brackets, the corner quotes, the Arabic comma, semicolon and question
10245
10329
  * mark, the Urdu full stop. No address holds one as typed, so a link stops at the first.
10246
10330
  */
10247
- var LINK_STOP = /[、。〈-】!(),:;?،؛؟۔]/;
10331
+ var LINK_STOP_CHARS = "、。〈-】!(),:;?،؛؟۔";
10332
+ var LINK_STOP = new RegExp(`[${LINK_STOP_CHARS}]`);
10248
10333
  /** What a link leaves out at its end: a sentence's punctuation ("…", "»", "”" too), never a path's "/". */
10249
10334
  var LINK_TRAILING = /[.,;:!?'"*_>…»’”]/;
10250
10335
  /**
10251
10336
  * What a chat puts right after a link with no space and no address ends with: an emoji ("https://x.example/a🔥", with
10252
- * its skin tone, presentation selector, joiners and flag tags) and characters that draw as nothing. Read one code point
10253
- * at a time from the end, so an emoji inside an address stays in it.
10337
+ * its skin tone, presentation selector, joiners and flag tags) and characters that draw as nothing, the direction marks
10338
+ * and isolates a right-to-left sentence puts around a link among them. Read one code point at a time from the end, so
10339
+ * an emoji inside an address stays in it.
10254
10340
  */
10255
- var LINK_TAIL = /^(?:\p{Extended_Pictographic}|\p{Emoji_Modifier}|\p{Regional_Indicator}|[\u200b\u200c\u2060\ufeff\u{e0020}-\u{e007f}]|\u200d|\ufe0e|\ufe0f)$/u;
10341
+ var LINK_TAIL = /^(?:\p{Extended_Pictographic}|\p{Emoji_Modifier}|\p{Regional_Indicator}|[\u200b\u200c\u2060\ufeff\u{e0020}-\u{e007f}]|[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]|\u200d|\ufe0e|\ufe0f)$/u;
10342
+ /** The direction marks and isolates alone: a payment link, which keeps an emoji at its end, still ends before these. */
10343
+ var DIRECTION_TAIL = /^[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]$/;
10256
10344
  /** How many UTF-16 units of `url` before `end` are an emoji's or an invisible character's last code point (0: none). */
10257
10345
  function linkTail(url, end) {
10258
10346
  const units = end > 1 && /[\udc00-\udfff]/.test(url[end - 1]) && /[\ud800-\udbff]/.test(url[end - 2]) ? 2 : 1;
10259
10347
  return end > 0 && LINK_TAIL.test(url.slice(end - units, end)) ? units : 0;
10260
10348
  }
10349
+ function directionTail(url, end) {
10350
+ return end > 0 && DIRECTION_TAIL.test(url[end - 1]) ? 1 : 0;
10351
+ }
10261
10352
  /** A link up to the first `LINK_STOP`: "https://x.example/a。" opens /a, not /a%E3%80%82. */
10262
10353
  function linkStop(url) {
10263
10354
  const at = url.search(LINK_STOP);
@@ -10273,7 +10364,8 @@ function linkEnd(whole) {
10273
10364
  }
10274
10365
  /**
10275
10366
  * A payment link (`bitcoin:`, `monero:`…) ends as a web link does, but keeps an emoji at its end: its label or message
10276
- * is text written as it is ("…&label=Pizza 🍕"), cut at 140 characters wherever that falls.
10367
+ * is text written as it is ("…&label=Pizza 🍕"), cut at 140 characters wherever that falls. A direction mark or
10368
+ * isolate typed after it is still left out, so "bitcoin:bc1q…\u200f." pays bc1q….
10277
10369
  */
10278
10370
  function uriEnd(whole) {
10279
10371
  return trimEnd(whole, false);
@@ -10293,7 +10385,7 @@ function trimEnd(whole, tails) {
10293
10385
  while (end > 0) {
10294
10386
  const last = url[end - 1];
10295
10387
  const opener = LINK_CLOSERS[last];
10296
- const tail = tails ? linkTail(url, end) : 0;
10388
+ const tail = tails ? linkTail(url, end) : directionTail(url, end);
10297
10389
  if (tail) {
10298
10390
  end -= tail;
10299
10391
  continue;
@@ -10306,9 +10398,14 @@ function trimEnd(whole, tails) {
10306
10398
  }
10307
10399
  /** Characters of a link worth reading: a longer one is no address anyone shares, and is left as text. */
10308
10400
  var LINK_MAX_CHARS = 4096;
10401
+ /**
10402
+ * An http(s) link's run in a text, as a `RegExp` source: up to a space or a `LINK_STOP_CHARS` character, as the bubble
10403
+ * reads it. A link written right after another one's "。" or "،", with no space, is a run of its own.
10404
+ */
10405
+ var LINK_RUN = String.raw`https?:\/\/[^\s${LINK_STOP_CHARS}]+`;
10309
10406
  /** The http(s) links of a text, in order, each ending as the bubble ends it. */
10310
10407
  function linksIn(text) {
10311
- return [...text.matchAll(/https?:\/\/\S+/gi)].filter((match) => match[0].length <= LINK_MAX_CHARS).map((match) => linkEnd(match[0])).filter((url) => url.length > 8);
10408
+ return [...text.matchAll(new RegExp(LINK_RUN, "gi"))].filter((match) => match[0].length <= LINK_MAX_CHARS).map((match) => linkEnd(match[0])).filter((url) => url.length > 8);
10312
10409
  }
10313
10410
  /**
10314
10411
  * The link as a preview names it: parsed, http(s) only, without tracking parameters (`utm_*`, `fbclid`, …). The
@@ -12963,7 +13060,7 @@ var TransportSwitch = class {
12963
13060
  remoteReplaces = false;
12964
13061
  /** This side chose while no session was open: the next one begins with it as a choice. */
12965
13062
  apart = false;
12966
- policiesRead = new RateWindow(10, POLICY_RECEIVE_WINDOW_MS);
13063
+ policiesRead = new RateWindow(30, POLICY_RECEIVE_WINDOW_MS);
12967
13064
  /** The session on which the contact's policy, the one read already, was said again and read for free (`handle`). */
12968
13065
  repeatRead = "";
12969
13066
  policyHeld = null;
@@ -16748,8 +16845,13 @@ var FILE_LIMITS = {
16748
16845
  maxUnfinishedIncoming: 256,
16749
16846
  /** Files one contact sends at once; accepted ones beyond wait their turn. */
16750
16847
  maxActiveIncoming: 3,
16751
- /** An offer nobody answered ends after this long. */
16848
+ /**
16849
+ * An offer nobody answered ends after this long. So does a file taken here and arriving (`active`, not paused) of which
16850
+ * no byte came for this long while a session was open (`ChatFiles.sweep`).
16851
+ */
16752
16852
  offerTtlMs: 6048e5,
16853
+ /** While a session is open, its files are swept (`ChatFiles.sweep`) this often. */
16854
+ sweepEveryMs: 36e5,
16753
16855
  /**
16754
16856
  * No answer while something is outstanding: the sender offers again, which puts both sides back in step. Nothing
16755
16857
  * arriving for a file under way: the receiver says again where it stands.
@@ -17077,6 +17179,19 @@ function storeFailure(error) {
17077
17179
  const message = (error instanceof Error ? error.message : String(error)).trim();
17078
17180
  return `Could not store the file: ${error?.name === "QuotaExceededError" && !message.startsWith("QuotaExceededError") ? `QuotaExceededError${message ? `: ${message}` : ""}` : message}`;
17079
17181
  }
17182
+ /**
17183
+ * The room this device tells a contact (`pf-room`, a `no-room` refusal): its free space rounded down to a power of two or
17184
+ * one and a half of one. The exact bytes would be the same from every profile on the device, and move with whatever it
17185
+ * stores, so a contact could tell one device from another, or watch it, by asking. Never more than the room itself.
17186
+ */
17187
+ function coarseRoom(room) {
17188
+ if (!Number.isSafeInteger(room)) return null;
17189
+ if (room <= 0) return 0;
17190
+ let step = 2 ** Math.floor(Math.log2(room));
17191
+ while (step > room) step /= 2;
17192
+ while (step * 2 <= room) step *= 2;
17193
+ return room >= step * 1.5 ? step * 1.5 : step;
17194
+ }
17080
17195
  /** What a refusal means to the sender's person. */
17081
17196
  function refusalText(why, room) {
17082
17197
  switch (why) {
@@ -17139,6 +17254,8 @@ var ChatFiles = class {
17139
17254
  * every trial of a larger one (a fifth of the rate on a wavering path). Confirmed chunk by chunk, it is what each sends with.
17140
17255
  */
17141
17256
  refill = 0;
17257
+ /** Sweeps while a session is open (`FILE_LIMITS.sweepEveryMs`). */
17258
+ sweeper;
17142
17259
  constructor(host) {
17143
17260
  this.host = host;
17144
17261
  }
@@ -17172,7 +17289,8 @@ var ChatFiles = class {
17172
17289
  stored: record.confirmed,
17173
17290
  acked: record.confirmed,
17174
17291
  checkpointed: record.confirmed,
17175
- writing: Promise.resolve()
17292
+ writing: Promise.resolve(),
17293
+ quietState: record.state
17176
17294
  };
17177
17295
  const replaced = this.entries.get(key(record.direction, record.id));
17178
17296
  if (replaced) this.unended.delete(replaced);
@@ -17224,9 +17342,32 @@ var ChatFiles = class {
17224
17342
  return entry.in && !transferEnded(entry.record) ? Math.max(entry.in.stored, entry.record.confirmed) : entry.record.confirmed;
17225
17343
  }
17226
17344
  changed(entry, progress = false) {
17345
+ if (entry.in && (progress || entry.in.quietState !== entry.record.state)) this.stirred(entry);
17227
17346
  this.track(entry);
17228
17347
  this.host.changed({ ...entry.record }, this.moved(entry), progress);
17229
17348
  }
17349
+ /** An incoming file's idle count starts again: from now while a session is open, from the next one otherwise. */
17350
+ stirred(entry) {
17351
+ const incoming = entry.in;
17352
+ entry.record.idleMs = void 0;
17353
+ incoming.quietState = entry.record.state;
17354
+ incoming.quietFrom = this.attached ? this.now() : void 0;
17355
+ }
17356
+ /**
17357
+ * How long an incoming file went with no byte and no change of state while a session was open: what its record kept,
17358
+ * and this session's stretch. Time with no session (closed, the app gone, either side away) does not count.
17359
+ */
17360
+ idleFor(entry, now) {
17361
+ const from = entry.in.quietFrom;
17362
+ return (entry.record.idleMs ?? 0) + (from === void 0 ? 0 : Math.max(0, now - from));
17363
+ }
17364
+ /** The idle time so far goes into the record, kept with it from now on; the stretch counted here starts again. */
17365
+ foldIdle(entry, now) {
17366
+ const idle = this.idleFor(entry, now);
17367
+ entry.record.idleMs = idle || void 0;
17368
+ entry.in.quietFrom = this.attached ? now : void 0;
17369
+ return idle;
17370
+ }
17230
17371
  /**
17231
17372
  * Keeps `unended` to the entries of this chat not ended. Each change of a record's state is reported (`changed`),
17232
17373
  * so that is where a file that ended leaves it, and one taken or sent again comes back.
@@ -17259,6 +17400,15 @@ var ChatFiles = class {
17259
17400
  t: "pf-abort",
17260
17401
  id
17261
17402
  })) this.unsaid.delete(id);
17403
+ const now = this.now();
17404
+ for (const entry of this.unended) if (entry.in) {
17405
+ entry.record.idleMs = this.idleFor(entry, now) || void 0;
17406
+ entry.in.quietFrom = now;
17407
+ entry.in.quietState = entry.record.state;
17408
+ }
17409
+ clearInterval(this.sweeper);
17410
+ this.sweeper = setInterval(() => this.sweep(), FILE_LIMITS.sweepEveryMs);
17411
+ this.sweeper.unref?.();
17262
17412
  this.sweep();
17263
17413
  for (const entry of this.entries.values()) {
17264
17414
  if (transferEnded(entry.record)) continue;
@@ -17285,6 +17435,9 @@ var ChatFiles = class {
17285
17435
  this.moving.clear();
17286
17436
  this.held.clear();
17287
17437
  this.host.uplink?.leave(this);
17438
+ clearInterval(this.sweeper);
17439
+ this.sweeper = void 0;
17440
+ const now = this.now();
17288
17441
  for (const entry of this.entries.values()) {
17289
17442
  if (entry.out) {
17290
17443
  entry.out.generation++;
@@ -17298,18 +17451,49 @@ var ChatFiles = class {
17298
17451
  clearTimeout(entry.in.ackTimer);
17299
17452
  entry.in.ackTimer = void 0;
17300
17453
  }
17301
- if (entry.in && !transferEnded(entry.record)) this.checkpoint(entry);
17454
+ if (entry.in && !transferEnded(entry.record)) {
17455
+ if (entry.in.quietFrom !== void 0 && this.foldIdle(entry, now) >= FILE_LIMITS.stallMs && entry.record.state === "active") this.changed(entry);
17456
+ this.checkpoint(entry);
17457
+ }
17302
17458
  }
17303
17459
  }
17460
+ /** The app stops: no more sweeps. */
17461
+ stop() {
17462
+ clearInterval(this.sweeper);
17463
+ this.sweeper = void 0;
17464
+ }
17304
17465
  /**
17305
- * Offers ended by their time to live. The host calls it now and then; `attach` does too. A file taken here and waiting
17306
- * its turn ends too once nothing of it arrived in that time: its sender never sent it. Offered again, it is taken
17307
- * again (`retakeAgreed`).
17466
+ * Offers ended by their time to live. The host calls it now and then; `attach` does too, and it runs every
17467
+ * `FILE_LIMITS.sweepEveryMs` while a session is open. A file taken here and waiting its turn ends too once nothing of
17468
+ * it arrived in that time: its sender never sent it. Offered again, it is taken again (`retakeAgreed`). So does one
17469
+ * arriving (`active`) that had no byte and no change of state for that long while a session was open (`idleFor`):
17470
+ * paused there or here, or with no session, it waits as long as it takes (WISP 501 § Consent).
17308
17471
  */
17309
17472
  sweep() {
17310
17473
  const now = this.now();
17474
+ let freed = false;
17311
17475
  for (const entry of this.entries.values()) {
17312
17476
  const { record } = entry;
17477
+ if (record.direction === "in" && record.state === "active") {
17478
+ const incoming = entry.in;
17479
+ if (!this.attached || incoming.verifying || incoming.starting) continue;
17480
+ if (this.idleFor(entry, now) < FILE_LIMITS.offerTtlMs) {
17481
+ if (incoming.quietFrom !== void 0 && now - incoming.quietFrom >= FILE_LIMITS.stallMs) {
17482
+ this.foldIdle(entry, now);
17483
+ this.changed(entry);
17484
+ }
17485
+ continue;
17486
+ }
17487
+ this.discardStored(entry);
17488
+ this.end(entry, "failed", "The offer expired");
17489
+ this.send({
17490
+ t: "pf-refuse",
17491
+ id: record.id,
17492
+ why: "expired"
17493
+ });
17494
+ freed = true;
17495
+ continue;
17496
+ }
17313
17497
  if (![
17314
17498
  "queued",
17315
17499
  "offered",
@@ -17327,12 +17511,23 @@ var ChatFiles = class {
17327
17511
  id: record.id
17328
17512
  });
17329
17513
  }
17514
+ if (freed) this.startNext();
17330
17515
  }
17331
17516
  async sayRoom() {
17332
17517
  const room = await this.host.room?.().catch(() => null);
17333
- if (typeof room === "number" && Number.isSafeInteger(room)) this.send({
17518
+ const max = typeof room === "number" ? coarseRoom(room) : null;
17519
+ if (max !== null) this.send({
17334
17520
  t: "pf-room",
17335
- max: room
17521
+ max
17522
+ });
17523
+ }
17524
+ refuseOffer(id, decision) {
17525
+ const room = decision.room !== void 0 ? coarseRoom(decision.room) : null;
17526
+ this.send({
17527
+ t: "pf-refuse",
17528
+ id,
17529
+ why: decision.refuse,
17530
+ ...room !== null && { room }
17336
17531
  });
17337
17532
  }
17338
17533
  /** A new file to send: offered now if a session is open, or on the next one. */
@@ -17756,12 +17951,7 @@ var ChatFiles = class {
17756
17951
  }
17757
17952
  if (this.entries.has(key("in", id))) return;
17758
17953
  if (typeof decision === "object") {
17759
- this.send({
17760
- t: "pf-refuse",
17761
- id,
17762
- why: decision.refuse,
17763
- ...decision.room !== void 0 && { room: decision.room }
17764
- });
17954
+ this.refuseOffer(id, decision);
17765
17955
  return;
17766
17956
  }
17767
17957
  const entry = {
@@ -17815,12 +18005,7 @@ var ChatFiles = class {
17815
18005
  decision = { refuse: "invalid" };
17816
18006
  }
17817
18007
  if (typeof decision === "object") {
17818
- this.send({
17819
- t: "pf-refuse",
17820
- id: record.id,
17821
- why: decision.refuse,
17822
- ...decision.room !== void 0 && { room: decision.room }
17823
- });
18008
+ this.refuseOffer(record.id, decision);
17824
18009
  return false;
17825
18010
  }
17826
18011
  if (decision === "ask") {
@@ -19619,6 +19804,7 @@ var ENGINE_ERRORS = {
19619
19804
  ecashBeingReceived: "This ecash is already being received",
19620
19805
  ecashFeeTakesAll: "The mint keeps all {amount} sats of this ecash as its fee to take it in: nothing was redeemed, and its sender can still take it back",
19621
19806
  ecashOtherUnit: "This ecash is in {unit}: only sat ecash can be redeemed here",
19807
+ ecashUnnamedUnit: "This ecash is in another unit: only sat ecash can be redeemed here",
19622
19808
  reviewedEcashSpent: "The ecash for this payment was already spent somewhere else. Nothing was sent, and your balance now shows what the mint still holds.",
19623
19809
  reviewedSatsGone: "The sats this payment was reviewed with went to another payment. Nothing was sent: review it again.",
19624
19810
  mintFailedQuote: "{host} could not take this payment right now, and no sats left your wallet: try again later. The mint said: {reason}",
@@ -19694,12 +19880,19 @@ function engineText(code, values = {}) {
19694
19880
  return ENGINE_ERRORS[code].replace(/\{(\w+)\}/g, (_, name) => name in values ? String(values[name]) : `{${name}}`);
19695
19881
  }
19696
19882
  var engineError = (code, values) => new EngineError(code, values);
19883
+ /** A unit as the app names it: a unit's shape (`frames.ts` `isUnit`, in any case), never a token sender's other text. */
19884
+ var NAMED_UNIT = "[A-Za-z0-9]{1,12}";
19885
+ /**
19886
+ * Why ecash of `unit` is not redeemed here. The unit is named only when it looks like one: a token's unit is whatever
19887
+ * its sender wrote, and the line is the app's own (a contact's payment's refusal row, the CLI's answer).
19888
+ */
19889
+ var ecashUnitError = (unit) => new RegExp(`^${NAMED_UNIT}$`).test(unit) ? engineError("ecashOtherUnit", { unit }) : engineError("ecashUnnamedUnit");
19697
19890
  /** What each kind of value looks like in a text: never a space in a host, a network by its name, an amount as digits. */
19698
19891
  var VALUE = {
19699
19892
  host: "(\\S+)",
19700
19893
  domain: "(\\S+)",
19701
19894
  chain: "(\\S+)",
19702
- unit: "(\\S+)",
19895
+ unit: `(${NAMED_UNIT})`,
19703
19896
  network: "(Mainnet|Testnet)",
19704
19897
  amount: "(\\d[\\d.,\\u00a0\\u202f' ]*?)",
19705
19898
  fee: "(\\d[\\d.,\\u00a0\\u202f' ]*?)",
@@ -21226,11 +21419,11 @@ var GhostLink = class {
21226
21419
  if (this.myPubKeyZ32 > this.options.params.peerPubKeyZ32) this.session.presenceDue();
21227
21420
  this.session.start();
21228
21421
  }
21229
- await this.dht.setMode(mode);
21230
21422
  if (mode === "dht") {
21231
21423
  await this.session.stop(false);
21232
21424
  await Promise.allSettled([...this.endpoints.keys()].map((t) => this.releaseEndpoint(t)));
21233
21425
  }
21426
+ await this.dht.setMode(mode);
21234
21427
  this.streamBlockChanged();
21235
21428
  this.emitDeliveryState();
21236
21429
  }
@@ -28077,14 +28270,14 @@ var REDIRECTS = [
28077
28270
  308
28078
28271
  ];
28079
28272
  /**
28080
- * A host that is not on the public internet, as far as its name tells: this machine, a single label, `.local` and its
28081
- * kin, private and reserved IP addresses. (What a public name resolves to is checked where the client resolves names
28082
- * itself, as Ghostly Desktop and the CLI do.)
28273
+ * A host that is not on the public internet, as far as its name tells: this machine, a single label, a name under a
28274
+ * local suffix (`localNames.ts`), private and reserved IP addresses. (What a public name resolves to is checked where
28275
+ * the client resolves names itself, as Ghostly Desktop and the CLI do, for every request.)
28083
28276
  */
28084
28277
  function isLocalHost(hostname) {
28085
28278
  const host = hostname.toLowerCase().replace(/\.+$/, "").replace(/^\[|\]$/g, "");
28086
28279
  if (!host.includes(".") && !host.includes(":")) return true;
28087
- if (/(^|\.)(localhost|local|internal|lan|home\.arpa)$/.test(host)) return true;
28280
+ if (underLocalSuffix(host)) return true;
28088
28281
  const v4 = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(host);
28089
28282
  if (v4) {
28090
28283
  const [a, b] = [Number(v4[1]), Number(v4[2])];
@@ -28112,9 +28305,18 @@ function acceptUrl(text) {
28112
28305
  if (url.username || url.password) throw new Error("That LNURL carries credentials, which is not allowed");
28113
28306
  return url;
28114
28307
  }
28308
+ /**
28309
+ * Text without what a link leaves out at its end (`linkTail`): a direction mark a right-to-left sentence puts after it,
28310
+ * another character that draws as nothing, an emoji. Taken off one by one: linear however many there are.
28311
+ */
28312
+ function withoutTail(text) {
28313
+ let end = text.length;
28314
+ for (let tail = linkTail(text, end); tail; tail = linkTail(text, end)) end -= tail;
28315
+ return text.slice(0, end);
28316
+ }
28115
28317
  /** Reads what was pasted as a Lightning address or an LNURL; null when it is neither. Throws when it is one, but a bad one. */
28116
28318
  function parseLightningDestination(input) {
28117
- const text = input.trim().replace(/^(lightning:|⚡\s*)/i, "").trim();
28319
+ const text = withoutTail(input.trim()).replace(/^(lightning:|⚡\s*)/i, "").trim();
28118
28320
  if (!text) return null;
28119
28321
  if (LNURL_BECH32.test(text)) {
28120
28322
  let decoded;
@@ -28160,10 +28362,8 @@ function parseLightningDestination(input) {
28160
28362
  function findLightningDestination(text) {
28161
28363
  const match = LIGHTNING_DESTINATION_PATTERN.exec(text);
28162
28364
  if (!match) return null;
28163
- const start = match.index;
28164
- let stop = start + text.slice(start).search(/\s|$/);
28165
- while (stop > start && "),.;:!?".includes(text[stop - 1])) stop--;
28166
- const token = text.slice(start, stop);
28365
+ const start = match.index, end = text.slice(start).search(/\s|$/);
28366
+ const token = linkEnd(text.slice(start, start + end));
28167
28367
  let destination;
28168
28368
  try {
28169
28369
  destination = parseLightningDestination(token);
@@ -28210,6 +28410,7 @@ async function readBounded(response, maxBytes) {
28210
28410
  /** One GET to an LNURL service (and to each checked redirect of it): bounded in time and size, no credentials, no referrer, and the answer must be JSON. */
28211
28411
  async function fetchLnurlJson(url, options = {}) {
28212
28412
  const target = acceptUrl(url);
28413
+ if (!isLoopback(target.hostname) && isLocalHost(target.hostname)) throw new Error(`${target.host} is a local address`);
28213
28414
  const doFetch = options.fetch ?? globalThis.fetch;
28214
28415
  if (!doFetch) throw new Error("No way to reach the network here");
28215
28416
  const controller = new AbortController();
@@ -29275,7 +29476,8 @@ function seqDate(seq) {
29275
29476
  /**
29276
29477
  * Resolves a did:dht through Pkarr relays: one GET to each, all at once, and the newest packet that
29277
29478
  * checks out wins (the highest sequence number; on a tie, the relay listed first), so a relay holding
29278
- * an older version cannot bring back a removed key or undo a deactivation. Each answer is bounded to
29479
+ * an older version cannot bring back a removed key or undo a deactivation. It waits for every relay
29480
+ * that answers within the fetch's timeout, not only the first. Each answer is bounded to
29279
29481
  * a BEP44 item, its signature checked against the DID's key and its records parsed strictly; a relay
29280
29482
  * that has nothing, fails or serves a packet that does not check out does not count. A deactivated DID
29281
29483
  * resolves (`metadata.deactivated`); everything else that goes wrong throws a `DidDhtError`.
@@ -31993,6 +32195,12 @@ var GROUP_LIMITS = {
31993
32195
  /** Own messages kept for catch-up: count and total ciphertext bytes. */
31994
32196
  outlog: 32,
31995
32197
  outlogBytes: 131072,
32198
+ /**
32199
+ * Own messages past that log that members may not have taken (`GroupState.owed`): count and total ciphertext bytes.
32200
+ * With the log, the 256 a member takes in one answer.
32201
+ */
32202
+ owed: 224,
32203
+ owedBytes: 524288,
31996
32204
  /** Frames waiting for an epoch (or its secret) that has not arrived yet. */
31997
32205
  waiting: 64,
31998
32206
  waitingBytes: 1048576,
@@ -32080,6 +32288,7 @@ var GROUP_TAKEOVER_META_MS = 6e5;
32080
32288
  * hears it, with what the member says live beside it, and the edits its app says again), then
32081
32289
  * `GROUP_LIMITS.messagesPerAuthor` and `messageBytesPerAuthor` per `messageWindowMs`, as a community's `MessagePace`.
32082
32290
  * One not taken is neither seen nor kept nor passed on, so a sync still names it (`miss`) and a catch-up hands it again.
32291
+ * Every member refuses the same live frames, so only the author holds them: past its log, it keeps them (`owed`).
32083
32292
  * What another member hands on in its answer to my sync (or what waited for a secret) is counted too, and may run the
32084
32293
  * author's allowance below nothing by one answer's worth (`AUTHOR_OWED`): a catch-up holds more than a burst, and lands
32085
32294
  * at once; the author's next frames wait until the pace pays it back. Not counted, a member at the other end of my sync
@@ -32100,25 +32309,47 @@ var AUTHOR_OWED = {
32100
32309
  bytes: GROUP_LIMITS.relayEditBytes
32101
32310
  }
32102
32311
  };
32312
+ /**
32313
+ * The pace my own frames go at, as members count it, with half their burst and the room left spent on a frame it does
32314
+ * not take (one a member may take still): an edge opening hands my log again, and frames arrive closer together than I
32315
+ * said them, so a frame members refuse is never one this takes.
32316
+ */
32317
+ var OWN_BURST = {
32318
+ frames: GROUP_LIMITS.outlog,
32319
+ bytes: GROUP_LIMITS.outlogBytes
32320
+ };
32103
32321
  var AuthorPace = class {
32104
32322
  owed;
32105
- frames = AUTHOR_BURST.frames;
32106
- bytes = AUTHOR_BURST.bytes;
32323
+ burst;
32324
+ frames;
32325
+ bytes;
32107
32326
  at;
32108
- constructor(owed) {
32327
+ constructor(owed, burst = AUTHOR_BURST) {
32109
32328
  this.owed = owed;
32329
+ this.burst = burst;
32330
+ this.frames = burst.frames;
32331
+ this.bytes = burst.bytes;
32110
32332
  }
32111
- /** `answer`: handed on in an answer to my sync, or waited, so it may run the allowance below nothing (`owed`). */
32112
- take(bytes, now, answer = false) {
32333
+ /**
32334
+ * `answer`: handed on in an answer to my sync, or waited, so it may run the allowance below nothing (`owed`).
32335
+ * `spend`: one not taken still spends what is left of the allowance.
32336
+ */
32337
+ take(bytes, now, answer = false, spend = false) {
32113
32338
  const elapsed = Math.max(0, now - (this.at ?? now)) / GROUP_LIMITS.messageWindowMs;
32114
32339
  this.at = now;
32115
- this.frames = Math.min(AUTHOR_BURST.frames, this.frames + elapsed * GROUP_LIMITS.messagesPerAuthor);
32116
- this.bytes = Math.min(AUTHOR_BURST.bytes, this.bytes + elapsed * GROUP_LIMITS.messageBytesPerAuthor);
32340
+ this.frames = Math.min(this.burst.frames, this.frames + elapsed * GROUP_LIMITS.messagesPerAuthor);
32341
+ this.bytes = Math.min(this.burst.bytes, this.bytes + elapsed * GROUP_LIMITS.messageBytesPerAuthor);
32117
32342
  const floor = answer ? this.owed : {
32118
32343
  frames: 0,
32119
32344
  bytes: 0
32120
32345
  };
32121
- if (this.frames + floor.frames < 1 || this.bytes + floor.bytes < bytes) return false;
32346
+ if (this.frames + floor.frames < 1 || this.bytes + floor.bytes < bytes) {
32347
+ if (spend) {
32348
+ this.frames = Math.max(0, this.frames - 1);
32349
+ this.bytes = Math.max(0, this.bytes - bytes);
32350
+ }
32351
+ return false;
32352
+ }
32122
32353
  this.frames -= 1;
32123
32354
  this.bytes -= bytes;
32124
32355
  return true;
@@ -32431,6 +32662,21 @@ function missingIn(frame, from) {
32431
32662
  };
32432
32663
  }
32433
32664
  /**
32665
+ * Whether a member's sync shows it holds my frame `f`: it has seen up to it, and does not name it missing among all its
32666
+ * gaps, or among the newest it names when they are more than a sync holds (`GROUP_LIMITS.miss`).
32667
+ */
32668
+ function heldIn(frame) {
32669
+ const have = frame.have && typeof frame.have === "object" ? frame.have : {};
32670
+ const miss = frame.miss && typeof frame.miss === "object" ? frame.miss : {};
32671
+ return (f) => {
32672
+ const high = have[f.s]?.[f.e];
32673
+ if (!Number.isSafeInteger(high) || high < f.n) return false;
32674
+ const gaps = miss[f.s]?.[f.e];
32675
+ if (!Array.isArray(gaps)) return true;
32676
+ return !gaps.includes(f.n) && (gaps.length < GROUP_LIMITS.miss || gaps.some((n) => typeof n === "number" && n < f.n));
32677
+ };
32678
+ }
32679
+ /**
32434
32680
  * My own messages and the ones I kept of other members, as one list for a member catching up: each log keeps its own
32435
32681
  * order (mine as I sent them, the others' as they reached me, which no member's clock can change), and the two are
32436
32682
  * merged by the time each frame says, mine first when they say the same. A member whose clock is off moves only
@@ -32521,6 +32767,17 @@ var GroupSession = class {
32521
32767
  namesTaken = /* @__PURE__ */ new Map();
32522
32768
  /** Messages, and apart from them edits, taken per author (`AuthorPace`). In memory only. */
32523
32769
  messagePace = /* @__PURE__ */ new Map();
32770
+ /**
32771
+ * My own frames as members pace them (`OWN_BURST`), and those of mine in `sent` it did not take: one of them that falls
32772
+ * out of `sent` goes to `owed`. Then, per frame of `owed`, the members whose sync showed they hold it. In memory only:
32773
+ * after a start, each owed frame waits for a sync of every member.
32774
+ */
32775
+ ownPace = new AuthorPace({
32776
+ frames: 0,
32777
+ bytes: 0
32778
+ }, OWN_BURST);
32779
+ overPace = /* @__PURE__ */ new Set();
32780
+ owedHeld = /* @__PURE__ */ new Map();
32524
32781
  editPace = /* @__PURE__ */ new Map();
32525
32782
  queue = Promise.resolve();
32526
32783
  /** Metadata frames that name a commit or an epoch I do not have yet, one signed by the admin and one by anyone else (`waitMeta`): tried again when the chain moves. */
@@ -32559,6 +32816,12 @@ var GroupSession = class {
32559
32816
  */
32560
32817
  heard = /* @__PURE__ */ new Map();
32561
32818
  /**
32819
+ * Per author and epoch, the highest number of its own signed frames I did not take at its pace (`AuthorPace`): what
32820
+ * `lacking` names, so the author is asked for it again (it keeps it, `GroupState.owed`). Every member refuses the
32821
+ * same frames of a burst, all past the last one it took, so nothing else shows they are missing. In memory only.
32822
+ */
32823
+ refused = /* @__PURE__ */ new Map();
32824
+ /**
32562
32825
  * Per member: until when what comes over its edge may be its answer to my sync (`syncFrame`), a catch-up and not a
32563
32826
  * message written just now. Each frame of the answer keeps it open: it goes a slice at a time. In memory only.
32564
32827
  */
@@ -32836,7 +33099,11 @@ var GroupSession = class {
32836
33099
  */
32837
33100
  lacking() {
32838
33101
  const out = /* @__PURE__ */ new Map();
32839
- for (const sender of /* @__PURE__ */ new Set([...Object.keys(this.state.seen), ...this.heard.keys()])) {
33102
+ for (const sender of /* @__PURE__ */ new Set([
33103
+ ...Object.keys(this.state.seen),
33104
+ ...this.heard.keys(),
33105
+ ...this.refused.keys()
33106
+ ])) {
32840
33107
  if (sender === this.myKey || !rosterHas(this.roster, sender)) continue;
32841
33108
  const marks = Object.entries(this.missOf(sender)).map(([e, gaps]) => `${e}:${gaps.join(".")}`);
32842
33109
  if (marks.length) out.set(sender, marks.join(","));
@@ -32847,16 +33114,24 @@ var GroupSession = class {
32847
33114
  * What a sync names in `miss` for one sender now: per epoch, the newest `GROUP_LIMITS.miss` numbers that never arrived.
32848
33115
  * And, for an epoch of which none arrived, the newest numbers another member said it has (`heard`): a member back
32849
33116
  * after someone joined, whose author wrote 32 since (all its own answer holds), had nothing below them to ask for.
33117
+ * And, first, the oldest of those past the highest seen up to the highest of its frames I refused at its pace
33118
+ * (`refused`): its answer brings them oldest first, so what is named changes as they come.
32850
33119
  */
32851
33120
  missOf(sender) {
32852
33121
  const out = {};
32853
- const seen = this.state.seen[sender] ?? {};
32854
- for (const [e, entry] of Object.entries(seen)) {
32855
- const gaps = this.gaps(entry);
33122
+ const seen = this.state.seen[sender] ?? {}, refused = this.refused.get(sender);
33123
+ for (const e of /* @__PURE__ */ new Set([...Object.keys(seen), ...[...refused?.keys() ?? []].map(String)])) {
33124
+ const entry = seen[e] ?? {
33125
+ high: -1,
33126
+ window: []
33127
+ }, top = refused?.get(Number(e)) ?? -1;
33128
+ const gaps = [];
33129
+ for (let n = entry.high + 1; n <= top && gaps.length < GROUP_LIMITS.miss; n++) gaps.push(n);
33130
+ if (entry.high >= 0) gaps.push(...this.gaps(entry).slice(0, GROUP_LIMITS.miss - gaps.length));
32856
33131
  if (gaps.length) out[e] = gaps;
32857
33132
  }
32858
33133
  for (const [e, high] of this.heard.get(sender) ?? []) {
32859
- if (seen[e]) continue;
33134
+ if (seen[e] || out[e]) continue;
32860
33135
  const numbers = [];
32861
33136
  for (let n = high; n >= 0 && numbers.length < GROUP_LIMITS.miss; n--) numbers.push(n);
32862
33137
  out[e] = numbers;
@@ -33244,6 +33519,7 @@ var GroupSession = class {
33244
33519
  this.state.statusReason = reason;
33245
33520
  this.state.secrets = {};
33246
33521
  this.state.sent = [];
33522
+ delete this.state.owed;
33247
33523
  delete this.state.unsaid;
33248
33524
  this.state.relay = [];
33249
33525
  if (this.onRows) this.onRows = [];
@@ -33299,6 +33575,7 @@ var GroupSession = class {
33299
33575
  this.state.unsaid = [...this.state.unsaid ?? [], ownKey(frame)];
33300
33576
  const unsend = async (free) => {
33301
33577
  this.state.sent = this.state.sent.filter((f) => f !== frame);
33578
+ this.overPace.delete(ownKey(frame));
33302
33579
  this.state.unsaid = (this.state.unsaid ?? []).filter((key) => key !== ownKey(frame));
33303
33580
  if (free && this.state.seqEpoch === epoch && this.state.seq === n + 1) this.state.seq = n;
33304
33581
  await this.persist().catch(() => {});
@@ -33446,21 +33723,57 @@ var GroupSession = class {
33446
33723
  } : {}
33447
33724
  };
33448
33725
  }
33449
- /** Into my bounded log, for members who missed it. */
33726
+ /** Into my bounded log, for members who missed it; one said past the pace members apply goes on to `owed` when it falls out. */
33450
33727
  logOwn(frame) {
33728
+ if (!this.ownPace.take(frameBytes(frame), this.now(), false, true)) this.overPace.add(ownKey(frame));
33451
33729
  this.state.sent.push(frame);
33452
33730
  let bytes = this.state.sent.reduce((sum, f) => sum + f.c.length, 0);
33453
- while (this.state.sent.length > GROUP_LIMITS.outlog || bytes > GROUP_LIMITS.outlogBytes) bytes -= this.state.sent.shift().c.length;
33731
+ while (this.state.sent.length > GROUP_LIMITS.outlog || bytes > GROUP_LIMITS.outlogBytes) {
33732
+ const out = this.state.sent.shift();
33733
+ bytes -= out.c.length;
33734
+ if (this.overPace.delete(ownKey(out))) this.owe(out);
33735
+ }
33736
+ }
33737
+ owe(frame) {
33738
+ const owed = [...this.state.owed ?? [], frame];
33739
+ let bytes = owed.reduce((sum, f) => sum + f.c.length, 0);
33740
+ while (owed.length > GROUP_LIMITS.owed || bytes > GROUP_LIMITS.owedBytes) {
33741
+ const gone = owed.shift();
33742
+ bytes -= gone.c.length;
33743
+ this.owedHeld.delete(ownKey(gone));
33744
+ }
33745
+ this.state.owed = owed;
33746
+ }
33747
+ /** Drops from `owed` each frame every other member of its epoch has shown, in a sync, that it holds. */
33748
+ owedTaken(from, frame) {
33749
+ if (!this.state.owed?.length) return;
33750
+ const holds = heldIn(frame);
33751
+ const owed = this.state.owed.filter((f) => {
33752
+ const key = ownKey(f);
33753
+ let held = this.owedHeld.get(key);
33754
+ if (holds(f)) {
33755
+ if (!held) this.owedHeld.set(key, held = /* @__PURE__ */ new Set());
33756
+ held.add(from);
33757
+ }
33758
+ const readers = this.state.chain[f.e]?.m;
33759
+ const waits = !!readers && this.others.some((k) => rosterHas(readers, k) && !held?.has(k));
33760
+ if (!waits) this.owedHeld.delete(key);
33761
+ return waits;
33762
+ });
33763
+ if (owed.length === this.state.owed.length) return;
33764
+ this.state.owed = owed;
33765
+ this.persistSoon();
33454
33766
  }
33455
33767
  /**
33456
33768
  * My message `id` was deleted for everyone: its frame, and each copy said again, keep their place in my log (`nextSeq`,
33457
33769
  * `couldRead`, the removal's copies) and lose what they said. The log is in the saved state beside the epochs' secrets,
33458
33770
  * so the text stayed readable from the profile until 32 later sends pushed it out (`message delete --purge` promises
33459
- * it leaves the folder). Saved soon, as a community's `forget`; `flush` writes it now.
33771
+ * it leaves the folder). A reply of mine that quotes it keeps its place and its reply, its line sealed again empty
33772
+ * and signed whole again (`sig` does not cover the box). A member's frame of it, or quoting it, I kept to hand on goes:
33773
+ * I cannot sign theirs, and its author hands it on. Saved soon, as a community's `forget`; `flush` writes it now.
33460
33774
  */
33461
33775
  forget(id) {
33462
- if (!this.state.sent.some((f) => f.c && this.messageIdOf(f) === id)) return;
33463
- this.state.sent = this.state.sent.map((f) => !f.c || this.messageIdOf(f) !== id ? f : {
33776
+ const emptied = (f) => !f.c ? f : this.messageIdOf(f) === id ? {
33464
33777
  t: f.t,
33465
33778
  g: f.g,
33466
33779
  e: f.e,
@@ -33471,9 +33784,39 @@ var GroupSession = class {
33471
33784
  c: "",
33472
33785
  sig: "",
33473
33786
  ...f.o ? { o: f.o } : {}
33474
- });
33787
+ } : this.unquoted(f, id);
33788
+ const sent = this.state.sent.map(emptied), owed = this.state.owed?.map(emptied);
33789
+ const gone = (f) => this.messageIdOf(f) === id || !!this.quoting(f, id);
33790
+ const relay = this.state.relay?.filter((f) => !gone(f)), rows = this.onRows?.filter((f) => !gone(f));
33791
+ if (sent.every((f, i) => f === this.state.sent[i]) && (owed ?? []).every((f, i) => f === this.state.owed[i]) && relay?.length === this.state.relay?.length && rows?.length === this.onRows?.length) return;
33792
+ this.state.sent = sent;
33793
+ if (owed) this.state.owed = owed;
33794
+ if (relay) this.state.relay = relay;
33795
+ if (rows) this.onRows = rows;
33475
33796
  this.persistSoon();
33476
33797
  }
33798
+ /** The reply a frame's box holds, when it quotes `id` with a line of it. */
33799
+ quoting(f, id) {
33800
+ const secret = f.r && this.secret(f.e), reply = secret ? this.openReply(epochKeys(secret, this.id, f.e).message, f) : void 0;
33801
+ return reply?.i === id && reply.s ? reply : void 0;
33802
+ }
33803
+ /** My frame `f` without the line of `id` it quotes (`forget`); `f` itself when it quotes none. */
33804
+ unquoted(f, id) {
33805
+ const reply = this.quoting(f, id);
33806
+ if (!reply) return f;
33807
+ const r = encryptText(epochKeys(this.secret(f.e), this.id, f.e).message, replyAad(f), JSON.stringify({
33808
+ ...reply,
33809
+ s: ""
33810
+ }));
33811
+ return {
33812
+ ...f,
33813
+ r,
33814
+ xs: toBase64Url(sign(messageSignedWhole({
33815
+ ...f,
33816
+ r
33817
+ }), this.identity.seed))
33818
+ };
33819
+ }
33477
33820
  /**
33478
33821
  * Saves, then sends my frame to every other member of its epoch still in the group (`saved`: the caller saved it). One no edge took (none was up:
33479
33822
  * my app just opened) is remembered (`alone`): I may be behind on the chain without knowing, and members let in
@@ -34060,7 +34403,12 @@ var GroupSession = class {
34060
34403
  delete raw.o;
34061
34404
  delete raw.xs;
34062
34405
  }
34063
- if (!this.paced(this.messagePace, raw.s, frameBytes(raw), relayed && (answer || waited))) return;
34406
+ if (!this.paced(this.messagePace, raw.s, frameBytes(raw), relayed && (answer || waited))) {
34407
+ let byEpoch = this.refused.get(raw.s);
34408
+ if (!byEpoch) this.refused.set(raw.s, byEpoch = /* @__PURE__ */ new Map());
34409
+ byEpoch.set(raw.e, Math.max(byEpoch.get(raw.e) ?? -1, raw.n));
34410
+ return;
34411
+ }
34064
34412
  const first = raw.o === void 0 ? null : readFirstPlace(raw.o, raw.e);
34065
34413
  if (raw.o !== void 0 && !first) return;
34066
34414
  const secret = this.secret(raw.e);
@@ -34315,6 +34663,10 @@ var GroupSession = class {
34315
34663
  for (const e of Object.keys(bySender)) if (Number(e) < this.epoch - GROUP_LIMITS.secrets) delete bySender[e];
34316
34664
  if (!Object.keys(bySender).length) delete this.state.seen[sender];
34317
34665
  }
34666
+ for (const [sender, byEpoch] of this.refused) {
34667
+ for (const e of byEpoch.keys()) if (e < this.epoch - GROUP_LIMITS.secrets) byEpoch.delete(e);
34668
+ if (!byEpoch.size) this.refused.delete(sender);
34669
+ }
34318
34670
  }
34319
34671
  park(from, frame) {
34320
34672
  if (frame.e > this.epoch + GROUP_LIMITS.secrets) return;
@@ -34487,6 +34839,7 @@ var GroupSession = class {
34487
34839
  if (!answered) this.syncsAnswered.set(from, answered = new RateWindow(GROUP_LIMITS.syncAnswers, GROUP_LIMITS.syncWindowMs, () => this.hooks.clock?.() ?? Date.now()));
34488
34840
  if (!answered.take()) return;
34489
34841
  this.hear(frame);
34842
+ this.owedTaken(from, frame);
34490
34843
  await this.vouch(from, frame.mt);
34491
34844
  if (frame.e > this.epoch) {
34492
34845
  this.syncedEpoch.set(from, frame.e);
@@ -34563,13 +34916,13 @@ var GroupSession = class {
34563
34916
  handOut(to, frames) {
34564
34917
  this.answers.handOut(to, frames);
34565
34918
  }
34566
- /** My own messages a member's sync says it lacks, from my bounded log, for the epochs it was a member of. */
34919
+ /** My own messages a member's sync says it lacks, from my bounded log (and `owed`), for the epochs it was a member of. */
34567
34920
  handOwn(to, frame) {
34568
34921
  for (const sent of this.ownLacked(to, frame)) this.hooks.send(to, sent);
34569
34922
  }
34570
34923
  ownLacked(to, frame) {
34571
34924
  const lacks = missingIn(frame, to);
34572
- return this.state.sent.filter((sent) => this.state.chain[sent.e] && rosterHas(this.state.chain[sent.e].m, to) && lacks(sent) && !this.isRemoved(sent));
34925
+ return [...this.state.owed ?? [], ...this.state.sent].filter((sent) => this.state.chain[sent.e] && rosterHas(this.state.chain[sent.e].m, to) && lacks(sent) && !this.isRemoved(sent));
34573
34926
  }
34574
34927
  /** A frame of a message deleted for everyone (`hooks.removed`, or one of mine `forget` emptied): handed to nobody, its removal is what they get. */
34575
34928
  isRemoved(f) {
@@ -35647,6 +36000,23 @@ function isMessageFrame(v) {
35647
36000
  const f = v;
35648
36001
  return f.t === "group-msg" && f.v === 2 && typeof f.g === "string" && GROUP_ID.test(f.g) && Number.isSafeInteger(f.e) && f.e >= 0 && typeof f.h === "string" && /^[a-f0-9]{16}$/.test(f.h) && typeof f.s === "string" && MEMBER_KEY.test(f.s) && Number.isSafeInteger(f.n) && f.n >= 0 && Number.isSafeInteger(f.ts) && f.ts > 0 && typeof f.nn === "string" && f.nn.length === 32 && B64.test(f.nn) && typeof f.c === "string" && f.c.length <= MAX_TEXT_BOX && B64.test(f.c) && typeof f.sig === "string" && f.sig.length === 86 && B64.test(f.sig);
35649
36002
  }
36003
+ /** A message frame's own fields alone: whatever else came beside them is outside its author's signature, so no member's word, and is neither kept nor handed on. */
36004
+ function messageFields(f) {
36005
+ const { t, v, g, e, h, s, n, ts, nn, c, sig } = f;
36006
+ return {
36007
+ t,
36008
+ v,
36009
+ g,
36010
+ e,
36011
+ h,
36012
+ s,
36013
+ n,
36014
+ ts,
36015
+ nn,
36016
+ c,
36017
+ sig
36018
+ };
36019
+ }
35650
36020
  /**
35651
36021
  * One member's view of a community group: the branch it follows and the ones it knows, the
35652
36022
  * secrets it holds, what it has seen, and the recent frames it keeps for others.
@@ -35734,6 +36104,7 @@ var CommunitySession = class CommunitySession {
35734
36104
  });
35735
36105
  this.rebuild();
35736
36106
  this.pruneSeen();
36107
+ if (hooks.removed && this.unquote((id) => hooks.removed(id))) this.persistSoon();
35737
36108
  this.adminSeen = this.admin;
35738
36109
  if ((state.status === "active" || state.status === "lost") && this.bestBranch().tip !== this.topHash) this.serialize(() => this.chooseBranch());
35739
36110
  }
@@ -37395,11 +37766,74 @@ var CommunitySession = class CommunitySession {
37395
37766
  forget(id) {
37396
37767
  const author = id.slice(0, id.indexOf(":"));
37397
37768
  const kept = this.state.store.filter((f) => f.s !== author || this.storedId(f) !== id);
37398
- if (kept.length === this.state.store.length) return;
37399
- const left = new Set(kept.map(storeKey));
37400
- for (const f of this.state.store) if (!left.has(storeKey(f))) this.onRows.delete(storeKey(f));
37401
- this.state.store = kept;
37402
- this.persistSoon();
37769
+ const dropped = kept.length !== this.state.store.length;
37770
+ if (dropped) {
37771
+ const left = new Set(kept.map(storeKey));
37772
+ for (const f of this.state.store) if (!left.has(storeKey(f))) this.onRows.delete(storeKey(f));
37773
+ this.state.store = kept;
37774
+ }
37775
+ if (this.unquote((quoted) => quoted === id) || dropped) this.persistSoon();
37776
+ }
37777
+ /**
37778
+ * The frames whose reply quotes a message deleted for everyone (`gone`): the line of it (`r.s`) is sealed with them,
37779
+ * and opens with the epoch secret this profile keeps. Mine is sealed again with an empty line, in its place, time and
37780
+ * reply, and signed again: a member who holds the first drops it as seen, one who missed it gets the reply without
37781
+ * the line. A member's I cannot sign again: it goes, and its author hands it on. Either way the row that held the
37782
+ * first gives it up; mine is saved with the state from then on.
37783
+ */
37784
+ unquote(gone) {
37785
+ let changed = false;
37786
+ const store = [];
37787
+ for (const f of this.state.store) {
37788
+ const key = this.messageKey(f);
37789
+ const plain = key ? decryptText(key, messageAad(f), f.nn, f.c) : null;
37790
+ let parsed = null;
37791
+ try {
37792
+ parsed = plain === null ? null : JSON.parse(plain);
37793
+ } catch {}
37794
+ const r = isObject$5(parsed) ? parsed.r : void 0;
37795
+ if (!isObject$5(r) || typeof r.i !== "string" || r.s === "" || !gone(r.i)) {
37796
+ store.push(f);
37797
+ continue;
37798
+ }
37799
+ changed = true;
37800
+ const row = this.onRows.get(storeKey(f));
37801
+ if (row !== void 0) {
37802
+ this.onRows.delete(storeKey(f));
37803
+ this.hooks.forgetFrame?.(row);
37804
+ }
37805
+ if (f.s !== this.myKey) continue;
37806
+ const { n: nn, c } = encryptText(key, messageAad(f), JSON.stringify({
37807
+ ...parsed,
37808
+ r: {
37809
+ ...r,
37810
+ s: ""
37811
+ }
37812
+ }));
37813
+ const unsigned = {
37814
+ g: f.g,
37815
+ e: f.e,
37816
+ h: f.h,
37817
+ s: f.s,
37818
+ n: f.n,
37819
+ ts: f.ts,
37820
+ nn,
37821
+ c
37822
+ };
37823
+ store.push({
37824
+ t: "group-msg",
37825
+ v: 2,
37826
+ ...unsigned,
37827
+ sig: toBase64Url(sign(messageSigned(unsigned), this.identity.seed))
37828
+ });
37829
+ }
37830
+ if (changed) this.state.store = store;
37831
+ return changed;
37832
+ }
37833
+ /** The key a stored frame is sealed with, when I hold its epoch's secret. */
37834
+ messageKey(f) {
37835
+ const found = this.commitByShort(f.e, f.h), secret = found && this.state.secrets[found.hash];
37836
+ return secret ? epochKeys(fromBase64Url(secret), this.id, f.e).message : void 0;
37403
37837
  }
37404
37838
  /** The id of the message a stored frame is, by its first place when it was said again (and I can open it). */
37405
37839
  storedId(f) {
@@ -37431,11 +37865,16 @@ var CommunitySession = class CommunitySession {
37431
37865
  /** The frames the app's rows hold, into the store: oldest first by when they were written, with what the record kept from before. */
37432
37866
  takeRows(rows) {
37433
37867
  if (!rows.length) return;
37434
- const inRecord = new Set(this.state.store.map(storeKey));
37868
+ const inRecord = new Map(this.state.store.map((f) => [storeKey(f), f]));
37435
37869
  for (const { id, frame } of rows) {
37436
- this.onRows.set(storeKey(frame), id);
37437
- if (!inRecord.has(storeKey(frame))) this.state.store.push(frame);
37438
37870
  if (frame.s === this.myKey && frame.h === shortHash(this.state.seqH) && frame.n >= this.state.seq && frame.n < OWN_FRAME_LIMIT) this.state.seq = frame.n + 1;
37871
+ const recorded = inRecord.get(storeKey(frame));
37872
+ if (recorded && frame.s === this.myKey && recorded.sig !== frame.sig) {
37873
+ this.hooks.forgetFrame?.(id);
37874
+ continue;
37875
+ }
37876
+ this.onRows.set(storeKey(frame), id);
37877
+ if (!recorded) this.state.store.push(messageFields(frame));
37439
37878
  }
37440
37879
  this.state.store.sort((a, b) => a.ts - b.ts);
37441
37880
  this.trimStore();
@@ -37732,18 +38171,18 @@ var CommunitySession = class CommunitySession {
37732
38171
  * once: the mark says it is passed on as it came.
37733
38172
  */
37734
38173
  passOn(frame) {
37735
- if (frame.t !== "group-msg") return frame;
37736
- const { lv: _mark, ...rest } = frame;
38174
+ if (!isMessageFrame(frame)) return frame;
38175
+ const fields = messageFields(frame);
37737
38176
  return this.cameLive.has(frame) ? {
37738
- ...rest,
38177
+ ...fields,
37739
38178
  lv: this.myKey
37740
- } : rest;
38179
+ } : fields;
37741
38180
  }
37742
38181
  /** `waited`: it waited for a commit or a secret (`replayWaiting`), so it is not live. */
37743
38182
  async receiveMessage(from, input, waited = false) {
37744
38183
  if (!isMessageFrame(input)) return false;
37745
- const { lv: mark, ...unmarked } = input;
37746
- const raw = unmarked;
38184
+ const mark = input.lv;
38185
+ const raw = messageFields(input);
37747
38186
  if (raw.s === this.myKey) {
37748
38187
  this.ownFrame(raw);
37749
38188
  return false;
@@ -40106,6 +40545,6 @@ function x401ApprovalDigest(subject) {
40106
40545
  ]);
40107
40546
  return toBase64Url(sha256(utf8Encode(canonical)));
40108
40547
  }
40109
- export { ACTIVE_DHT_POLL_MS, ACTIVE_TASK_STATUSES, ANSWERS_REFUSED_PAUSES, ANSWERS_REFUSED_PAUSE_MS, ANSWER_READ_ALLOWANCE, ANSWER_READ_FIRST_MS, ANSWER_READ_SPACING_MS, ANSWER_REFUSED_REDIALS, APPS_CAPABILITY, APP_BUNDLE_LIMITS, APP_BUNDLE_MAGIC, APP_CLIENTS, APP_CLIENT_NAME, APP_DATA_MAX_BYTES, APP_FORBIDDEN_KEYS, APP_FRAME, APP_ICON_PATH, APP_NAME, APP_PEER_OPEN_MAX, APP_PERMISSIONS, APP_PREFIXES, APP_RANGES_CAPABILITY, APP_RANGE_DATA_KIND, APP_RANGE_ERRORS, APP_RANGE_FRAMES, APP_RANGE_LIMITS, APP_RATE_LIMIT, APP_RATE_WINDOW_MS, APP_RESUME_GRACE_MS, APP_SCREENSHOTS_DIR, APP_SEND_LIMIT, APP_STATEMENT_LIMITS, APP_STORE_KINDS, APP_STORE_LIMITS, APP_VERSION_MAX, APP_VIEWS, ATPROTO_DECLARED_SCOPE, ATPROTO_FULL_SCOPE, ATPROTO_PROOF_COLLECTION, ATPROTO_PROOF_SCOPE, AUDIO_METADATA_LIMITS, AUTOMATIC_ORDER, AWAITED_READS, AWAITING_PEER_MS, AppRanges, AppSessions, AtprotoCid, AtprotoProofError, BACKGROUND_REQUESTS_PER_MINUTE, BACKGROUND_WHILE_SIGNALING, BACKGROUND_WRITES_SHARE, BIP322_REVISION, BITCOIN_NETWORKS, BLOCKED_DIAL_WAIT_MS, BOLT11_PATTERN, BREAKER_ALL_DOWN_PROBE_MS, BREAKER_BASE_MS, BREAKER_MAX_MS, BREAKER_THRESHOLD, BURST_RING_MS, BUTTONS_CAPABILITY, BUTTON_ID, BUTTON_STYLES, BitcoinAddressError, ByteReader, CALLS_CAPABILITY, CALL_RATE_WINDOW_MS, CALL_RECEIVE_LIMIT, CALL_SIGNAL_FUTURE_MS, CALL_SIGNAL_MAX_AGE_MS, CAPS_ISSUED_BACK_MS, CAPS_LABEL, CAPS_LIMITS, CAPS_PUBLISH_SPACING_MS, CAPS_REFRESH_MS, CARRIED_DEFER_MS, CATCH_UP_PAUSE_MS, CATCH_UP_SLICE, CHAT_RESERVE, CHAT_RESERVE_MOST_SHARE, CHAT_RESERVE_PER_CHAT, CHAT_WATCH_SHARE, CHUNK_FLAG_END, CHUNK_KIND, CLIPBOARD_GUARD_HASH, CLIPBOARD_GUARD_SCRIPT, CLOCK_EVIDENCE_MS, CLOCK_OFF_MS, CLOCK_PEERS, CLOCK_PEER_READ_GAP_MS, CLOCK_SERVERS, COMMUNITY_EDIT_FRAME, COMMUNITY_LIMITS, COMMUNITY_PIN_FRAME, COMMUNITY_PROFILE, COMMUNITY_REACTION_FRAME, COMMUNITY_TAKEOVER_META_MS, COMMUNITY_TOPOLOGY, CONNECT_TIMEOUT_MS, CONTACT_ASKER_FRAME, CONTACT_LINK_BYTES, CONTACT_LINK_VERSION, CONTACT_RECORD_TTL, CRON_LINE, CROSSED_FRESH_MS, CROSSED_PROBE_MS, CROSSED_WAIT_MS, CapsExchange, CapsKeys, CapsRefusedError, CarriedTransport, CatchUpAnswers, ChatFiles, ClockWatch, CommunitySession, ContactRequestError, DAEMON_WATCH_PEER_IDLE_MS, DATA_CHANNEL_ID, DATA_CHANNEL_LABEL, DATA_SETTLE_MS, DEFAULT_RELAYS, DEMOTE_AFTER_FAILURES, DEMOTE_MS, DEPARTED_READS, DEPARTED_READ_MS, DEVICES_CAPABILITY, DEVICE_CAPABILITIES, DEVICE_ECHO_FRAME, DEVICE_INVITE_BYTES, DEVICE_INVITE_LIFETIME_S, DEVICE_INVITE_OWN_DEVICE, DEVICE_INVITE_VERSION, DEVICE_KINDS, DEVICE_PING_FRAME, DEVICE_WAKE_TTL_SECONDS, DHT_FILE_CAPABILITY, DHT_FILE_REFUSED, DHT_FILE_TOO_LARGE, DHT_MESSAGE_TTL, DHT_PACKET_BUDGET, DHT_PIN_GRACE_MS, DHT_POLL_INTERVALS, DHT_TEXT_BYTES, DHT_TEXT_CAPABILITY, DHT_TEXT_REFUSED, DIALED_IN_CONTENDERS, DID_DHT_MAX_PAYLOAD, DID_DHT_PREFIX, DID_DHT_TTL, DID_DHT_VERSION, DID_DOCUMENT_MAX_BYTES, DID_FILE_MAX_BYTES, DID_GHOSTLY_SERVICE, DID_JWS_ALGS, DID_JWS_MAX_LENGTH, DID_MAX_LENGTH, DID_METHODS, DIRECT_EVIDENCE_MS, DIRECT_OWN_ATTEMPTS, DIRECT_PEERS, DNS_LABEL, DNS_TYPE, DOMAIN_FILE_MAX_BYTES, DOMAIN_MAX_RECORDS, DOMAIN_METHODS, DOMAIN_TXT_MAX_BYTES, DataLink, DhtDelivery, DidDhtError, DidError, DirectPathWatch, DiscoveryBudgetError, EARLY_DIAL_JOIN_MS, EDITED_FRAME, EDIT_BUFFER_MAX, EDIT_BUFFER_MS, EDIT_CAPABILITY, EDIT_FRAME, EDIT_RATE_WINDOW_MS, EDIT_RECEIVE_LIMIT, EDIT_SEND_LIMIT, ENDPOINT, ENGINE_ERRORS, ENROLL_CANCEL, ENROLL_CANCEL_REASONS, ENROLL_CAPABILITY, ENROLL_DONE, ENROLL_GRANT, ENROLL_HELLO, ENROLL_PROOF, ETHEREUM_USDT, EVM_TEST_CHAINS, EXPECT_PEER_MS, EngineError, FILES_BINARY_CAPABILITY, FILES_CAPABILITY, FILE_DATA_KIND, FILE_FRAMES, FILE_LIMITS, FIRST_PAIRING_PACE_MS, FIRST_PUBLISH_MAX_MS, FLOOD_PER_DAY, FOLLOW_MS, FORWARD_LIMITS, FRESH_READ_MS, FileTransfers, FileUplink, GATHER_ATTEMPTS, GATHER_STALL_MS, GROUP_ADMIN_OFF_ERROR, GROUP_BURST_MS, GROUP_BURST_ONE_LINK, GROUP_CALL_MODERATION_ACTS, GROUP_CALL_NONCE_S, GROUP_CALL_SKEW_S, GROUP_CALL_SOURCES, GROUP_CALL_VERSION, GROUP_EDIT_FRAME, GROUP_EDIT_TEXT_BYTES, GROUP_ENTRY_PROFILE, GROUP_FILE_LIMITS, GROUP_HAVE_FRAME, GROUP_ID, GROUP_LIMITS, GROUP_MEMBER_CAP, GROUP_META_PAST, GROUP_META_PAST_CHARS, GROUP_OVER_PACE_MS, GROUP_PIN_FRAME, GROUP_PROFILE, GROUP_RATION_WINDOW_MS, GROUP_REACTED_FRAME, GROUP_REACTION_FRAME, GROUP_READ_NOTE, GROUP_READ_NOTE_COMMUNITY, GROUP_SIGNALING_ALLOWANCE_SHARE, GROUP_SIGNAL_FRAME, GROUP_TAKEOVER_META_MS, GROUP_TYPING_FRAME, GROUP_VERSION_FILES, GROUP_VERSION_HUBS, GROUP_VERSION_LARGE, GROUP_VERSION_SIGNALS, GROUP_WAKE_FRAME, GROUP_WAKE_GROUP_LIMIT, GROUP_WAKE_GROUP_WINDOW_MS, GROUP_WAKE_MEMBER_INTERVAL_MS, GROUP_WAKE_RECEIVE_LIMIT, GROUP_WANT_FRAME, GROUP_WANT_NO_FRAME, GhostLink, GhostlyHttpError, GroupSession, GroupTypingBoard, GroupWakeLimiter, HANDLED_WAIT_MS, HANDOFF_ACK, HANDOFF_ATTEMPTS, HANDOFF_BUSY, HANDOFF_BUSY_REASONS, HANDOFF_CANCEL, HANDOFF_CANCEL_REASONS, HANDOFF_CAPABILITY, HANDOFF_DATA, HANDOFF_DONE, HANDOFF_FILE_MISSING, HANDOFF_FILE_REQUEST, HANDOFF_HAVE, HANDOFF_HELLO, HANDOFF_LATER_BYTES, HANDOFF_LIST_PER_FRAME, HANDOFF_MANIFEST, HANDOFF_OFFER, HANDOFF_PAKE, HANDOFF_PIECE_BYTES, HANDOFF_PIECE_OVERHEAD, HANDOFF_RELEASE, HANDOFF_REQUEST, HANDOFF_TIMINGS, HANDOFF_VERIFIED, HANDOFF_VERSION, HANDOFF_WINDOW, HEDGE_MISSING_MS, HEDGE_MS, HOLD_CAPABILITY, HOLD_DATED_BACK_MS, HOLD_LIMITS, HTTP_SERVICE_PROTO, HoldKeys, HoldRefusedError, HttpClient, HttpHost, IDENTITY_CHALLENGE_WINDOW, IDENTITY_CHECK_UNAVAILABLE, IDENTITY_CLOCK_SKEW, IDENTITY_FRAME_LIMIT, IDENTITY_FRAME_WINDOW_MS, IDENTITY_MAX_CHECKS_PER_HOUR, IDENTITY_MAX_EVIDENCE, IDENTITY_MAX_FRAME, IDENTITY_MAX_RECEIVED, IDENTITY_MAX_VALIDITY, IDENTITY_MEMO_IDLE_MS, IDENTITY_MEMO_MAX, IDENTITY_MEMO_SIZE, IDENTITY_PROOF_CAPABILITY, IDENTITY_PROVIDER_ID, IDENTITY_REUSE_CHECK_S, IDENTITY_REVOCATION_LABEL, IDENTITY_STATEMENT_PREFIX, IDENTITY_SUBJECT, IDENTITY_TIMELINE_MAX, IDLE_THRESHOLD, IMAGE_LIMITS, INVITER_DIAL_GRACE_MS, INVITE_HRP, INVITE_LINK_ORIGIN, INVITE_MAX_LENGTH, INVITE_TAKEN, INVITE_VERSION, ITEM_STATES, IdentityCheckUnavailable, IdentityExchange, KNOCK_SLOTS, KNOCK_SLOT_LABEL, KNOCK_TTL_MS, KNOWN_SESSION_CAPABILITIES, LABEL, LATE_ANSWER_MS, LEGACY_GROUP_MEMBERS, LEGACY_SERVICES, LIGHTNING_DESTINATION_PATTERN, LIMITS, LINK_MAX_CHARS, LINK_PREVIEW_LIMITS, LINK_RECORD_LABEL, LINK_TRAILING, LIVENESS_MISSED_PINGS, LIVENESS_PING_MS, LIVE_POLL_MS, LNURL_LIMITS, LinkSession, MAX_AVATAR_LENGTH, MAX_AVATAR_SIDE, MAX_CHUNK_PAYLOAD_BYTES, MAX_DHT_TEXT_BYTES, MAX_DNS_PACKET_BYTES, MAX_DONE, MAX_EDITS_PER_MESSAGE, MAX_GROUP_CALL_NAME, MAX_GROUP_CALL_SFU, MAX_GROUP_CHAIN, MAX_GROUP_MEMBERS, MAX_GROUP_META_BODY, MAX_GROUP_NAME_BYTES, MAX_GROUP_NAME_LENGTH, MAX_GROUP_PICTURE_LENGTH, MAX_KNOCKS, MAX_MISSED, MAX_MSGS_PAYLOAD_B64, MAX_NICK_LENGTH, MAX_PAIRED_CALL_SIGNAL, MAX_PAIRED_MESSAGE_FRAME, MAX_REMOVAL_NUMBER, MAX_SEEN, MAX_SERVICES, MAX_SHARED_APPS, MAX_SKIP, MAX_SKIPPED_KEYS, MAX_SLOT_KNOCKS, MAX_WAITING, MEMBER_KEY, MENTION_EVERYONE, MENTION_LIMITS, MESH_HUBS, MESSAGE_CLOCK_SKEW_MS, MESSAGE_PACED, MESSAGE_RECEIVE_LIMITS, MessagePace, MessageRefusal, NEW_PER_HOUR, NIP05_PATH, NO_ATTEMPTS, NO_AUDIO_METADATA, NO_HUB_POLICY, NO_PICTURE_METADATA, NO_VIDEO_METADATA, OFFER_FAST_MS, OFFER_HOST_GATHER_MS, OFFER_LOOK_MS, OFFER_STEP_MAX, ONCHAIN_PROVIDER, OWN_FRAME_LIMIT, OwnInviteError, PAIRED_CALL_CANDIDATES, PAIRED_CALL_FRAME, PAIRED_FRAME_TOO_LARGE, PAIRED_PROFILE, PAIRED_REPLY_AUTHORS, PAIRING_ATTEMPT_MS, PAIRING_RETRY_MS, PICTURE_METADATA_LIMITS, PINNED_FRAME, PIN_CAPABILITY, PIN_CLOCK_SKEW_MS, PIN_FRAME, PIN_LIMITS, PKARR_FUTURE_SKEW_MS, PLAYABLE_AUDIO, PLAYABLE_VIDEO, PONG_WAIT_MS, PRESENCES, PRESENCE_HEARTBEAT, PRESENCE_WINDOW, PREVIEWABLE_IMAGE, PREVIOUS_DEFAULT_RELAYS, PROOF_ADAPTERS, PROOF_CAPABILITY, PROTOCOL_VERSION, PR_CHECKS, PR_STATES, PUBKY_PROOF_MAX_BYTES, PUBKY_PROOF_ROOT, PUSH_PAD_BYTES, PUSH_SERVICE_HOSTS, PacketTooLargeError, PairedCalls, PairedSession, PairingTracker, PaymentPreflightError, PeerProofs, PublishFailedError, QUICK_REACTIONS, QUICK_REDIAL_MS, RACE_ANSWERED_MS, RACE_DIRECT_MS, RACE_RELAYED_MS, RATCHET_CAPABILITY, RATCHET_HEADER_BYTES, RATCHET_KEEP_MS, RATCHET_OVERHEAD, REACTED_FRAME, REACTIONS_CAPABILITY, REACTION_FRAME, REACTION_LIMITS, REANSWERS, RECORDING_TYPES, RECORD_TTL, REDESCRIBED_GRACE_MS, RELAYED_FIRST_MS, RELAY_PAYLOAD_MAX_BYTES, RELAY_POLL_INTERVALS, RELAY_REQUESTS_PER_MINUTE, RELAY_URL, RELAY_WITH_SECRETS, REMOVABLE_KINDS, REMOVED_TEXT, REOPEN_BELOW, REPLY_ID, REPLY_LIMITS, REQUESTS_PER_MINUTE, REQUEST_CLOCK_SKEW_MS, REQUEST_LABEL, REQUEST_LIFETIME_MS, REQUEST_NAME_UNITS, REQUEST_PACKET_BYTES, REQUEST_TEXT_BYTES, RESUME_WAIT_MS, RING_LIFETIME, ROUTINE_STATES, RTC_CONFIG, RTC_SIGNAL_FUTURE_MS, RTC_SIGNAL_MAX_AGE_MS, RTC_SIGNAL_RATE_WINDOW_MS, RTC_SIGNAL_RECEIVE_LIMIT, RTC_UNSTARTED_MS, RUN_RESULTS, RatchetBox, RateWindow, ReactionWindow, RelayBreaker, RelayTransport, RelaysFailedError, SAID_AGAIN, SEPOLIA_TEST_USDT, SEPOLIA_TEST_USDT_FAUCET, SERVICES_CAPABILITY, SERVICES_VERSION, SESSION_CAPABILITIES_FRAME, SESSION_FRAME_MAX, SESSION_RECEIVE_PENDING, SET_ACK, SET_UPDATE, SIGNALING_ALLOWANCE_SHARE, SIGNALING_WINDOW_MS, SIGNALS_PER_MINUTE, SIGNAL_CARRIERS, SIGNAL_DUE_READS, SIGNAL_FRESH_MS, SIGNAL_HOLD_MS, SIGNAL_OUT_READS, SIGNAL_PROVEN_MS, SIGNAL_REPLY_MS, SLOW_DEMOTE_MS, SLOW_MS, SPARK_NETWORKS, SPARK_PROVIDER, SSHSIG_MAX_ARMOR, SSHSIG_NAMESPACE, SSH_KEY_TYPES, SSH_PUBLIC_KEY_MAX, STALLED_EVIDENCE_MS, STALLED_LOOK_MS, STAMP_BITS_DEFAULT, STAMP_BITS_MAX, STAMP_BITS_MIN, STATUS_AVAILABILITIES, STATUS_CAPABILITY, STATUS_CARD_CAPABILITY, STATUS_CARD_LIMITS, STATUS_FRAME, STATUS_IDLE_AFTER_MS, STATUS_RATE_LIMIT, STATUS_RATE_WINDOW_MS, STATUS_SEND_INTERVAL_MS, STATUS_TEXT_MAX, STORAGE_LIFETIME, STORAGE_ROOT, SWITCH_RETIRE_MS, SessionCapabilities, SshSigError, StatusReceiver, StatusSender, TASK_STATUSES, TEST_USDT_FAUCET_AMOUNT, TOMBSTONE_SEQUENCE, TOMBSTONE_TURN, TRANSPORTS, TRANSPORTS_GONE_MS, TURN_BODY_BYTES, TURN_LABEL, TURN_LAST_SEQUENCE, TURN_MAX, TURN_NAME_BYTES, TURN_NO_ACTIVE, TURN_PUT_WINDOW_MS, TURN_RAISE_READ_TIMEOUT_MS, TURN_REV_LIMIT, TURN_SEALED_BYTES, TURN_SETTLE_MS, TURN_SIGNED_BYTES, TURN_SLOTS, TURN_SOURCE_TIMEOUT_MS, TURN_TTL, TURN_VERSION, TURN_VISIBLE_MS, TYPING_CAPABILITY, TYPING_FRAME, TYPING_KINDS, TYPING_RATE_LIMIT, TYPING_RATE_WINDOW_MS, TYPING_REFRESH_MS, TYPING_SEND_LIMIT, TYPING_STATUS_MAX, TYPING_TIMEOUT_MS, TurnRecordError, TypingReceiver, TypingSender, UNPROVEN_AUTH_MS, UNUSED_INVITE_READS_PER_MINUTE, UNUSED_INVITE_UPKEEP_MS, UNUSED_INVITE_WAIT_MAX_MS, UPGRADE_CAPABILITY, USDT_PUBLIC_RPC, VIDEO_LIMITS, VIDEO_METADATA_LIMITS, VIEWER_DROPPED_DIRECTIVES, VIEWER_DROPPED_HEADERS, VIEWER_GUARD_CSP, VIEWER_GUARD_HASH, VIEWER_GUARD_SCRIPT, VIEWER_PERMISSIONS_POLICY, VIEWER_SERVICE_CSP, VIEWER_SERVICE_CSP_RELAY_ONLY, VIEWER_WORKER_GUARD_CSP, VOICE_LIMITS, VOICE_METER, WAKE_ANSWER_GRACE_MS, WAKE_CALL_INTERVAL_MS, WAKE_CALL_TTL_SECONDS, WAKE_CALL_WAIT_MS, WAKE_SESSION_CAPABILITY as WAKE_CAPABILITY, WAKE_SESSION_CAPABILITY, WAKE_FRAME, WAKE_INTERVAL_MS, WAKE_LOST_MS, WAKE_ONLINE_BATCH, WAKE_ONLINE_BATCH_MS, WAKE_ONLINE_DELAY_MS, WAKE_ONLINE_INTERVAL_MS, WAKE_ONLINE_TTL_SECONDS, WAKE_RETRY_MS, WAKE_SUBJECT, WAKE_TTL_SECONDS, WALLET_NETWORKS, WATCH_PEER_MS, WATCH_SHARE, WAY_BACK_SHARE, WEBRTC_GUARD, WELL_KNOWN_PATH, WRITE_FIRST_MS, WakeLimiter, WebPushError, X401_CREDENTIAL_LIMITS, X401_DCQL_LIMITS, X401_HEADERS, X401_LIMITS, X401_PROTOCOLS, X401_REQUEST_LIMITS, X401_RESPONSE_MODES, X401_SCHEME, X401_VERSION, addedAppPermissions, allowingViewerGuard, answersOffer, appCardId, appCardUrl, appCloseFrame, appDataBytes, appDataFrame, appDigest, appFingerprint, appOpenFrame, appRangeCancelFrame, appRangeChunk, appRangeDataFrame, appRangeEndFrame, appRangeErrorFrame, appRangeGetFrame, appRef, appRefPublisher, appRevocationFor, appRevocationId, appSignedBytes, appStoreDecision, appUpdateDecision, appViewOf, applyIdentityEvent, arkAddressPrefix, arrivalKey, asWritten, assembleAppBundle, assertTokenUnits, assertWholeSats, atprotoCidFor, atprotoDidMethod, atprotoProofRecord, atprotoProofRkey, audioMetadataPatches, automaticTransport, baseMime, beaconKeys, beaconRecords, bip322MessageHash, bip322ToSign, bip322ToSpend, boundIdentityDisplay, boundVerifiedIdentity, budgetRetryMs, buildAppBundle, buildDataSdp, buildLinkRecords, buildSdpFromSignal, buildX401ProofRequest, buildX401ProofResult, buildX401ResultArtifact, buildX401TokenObject, buttonLabelClash, bytesEqual, callRtcConfig, callSignalHeardAt, canonicalJson, canonicalJsonBytes, canonicalUrl, capsDescriptors, cardEditNumber, cardLine, cardLinkHost, cardTimeUtc, cardUrl, carryMentions, cashuRequestPayload, chainPieces, chatAppId, checkAppBeforeRun, checkAppListing, checkAppManifest, checkAppRevokeStatement, checkAppStoreIndex, checkAtprotoProofRecord, checkDidJws, checkDidSignature, checkPushEndpoint, checkStatusCard, checkedDescriptors, claimedTime, classifyTurnRead, clearMissed, clockOffset, commitHash, commitUntaggedHash, communityCommitHash, communityEditFrame, communityGroupId, communityHasFrame, communityMessageAuthor, communityMessageId, communityRoster, communityUntaggedHash, compactSize, compareVersions, compressSdp, concatBytes, confirmationMatches, confirmationTag, contactAskerFrame, contactAskerHolds, contactDay, contactRtcConfig, countUnusedInvite, createChatInvite, createContactLink, createDeviceInvite, createIdentity, createLink, createRelayPayload, currentRelays, decodeAnyBitcoinAddress, decodeAppRangeData, decodeAtprotoCommit, decodeBase64, decodeBitcoinAddress, decodeBolt11, decodeChunk, decodeCommunityLink, decodeControl, decodeDagCbor, decodeDidDhtPacket, decodeDnsAnswers, decodeDnsResponse, decodeFileData, decodeGroupEntryLink, decodeInviteCode, decodeServices, decodeSvcbRecords, decodeTx, decodeTxtPacket, decodeWitness, decodeX401Header, decompressSdp, decrypt, decryptPushPayload, decryptText, derivedSecret, deviceEchoFrame, deviceEchoNonce, deviceFrameCapability, deviceInviteJoinerKeyZ32, deviceInviteJoinerParams, deviceKeyZ32, deviceLinkPairing, deviceLinkParams, deviceLinkRendezvousSeed, deviceLinkSealKey, deviceLinkSecret, devicePingFrame, deviceWakeRequest, dhtEditId, dhtFileElements, dhtFileId, dialDescriptors, dialableIrohRelay, didDhtDocument, didDhtFromPublicKey, didDhtKey, didDhtRecords, didGhostlyServiceEntry, didJwsAlg, didSignedMessages, didWebDocumentUrl, didWebFile, didWebFileNames, didWebFileUrl, didWebHost, directBlocked, dnsProofName, domainTxtRecord, domainWellKnownFile, doorHubs, downsamplePeaks, dropLoneJoiners, edgeParams, editFrame, editedFrame, emptyCapsState, emptyDhtDeliveryState, emptyIdentityLedger, emptyLinkRecords, emptyProofLedger, emptyRatchetState, encodeAppRangeData, encodeChunk, encodeCommunityLink, encodeContactLink, encodeControl, encodeDagCbor, encodeDeviceInvite, encodeDidDhtDeactivated, encodeDidDhtPacket, encodeDnsQuery, encodeFileData, encodeGhostlyInvite, encodeGroupEntryLink, encodeGroupMetaBody, encodeInviteCode, encodePacketTransports, encodeServices, encodeSetSlots, encodeSvcbPacket, encodeTurnFields, encodeTx, encodeTxtPacket, encodeWitness, encodeX401Header, encrypt, encryptPushPayload, encryptText, endedRequests, engineError, engineText, enrollCancelFrame, enrollCancelReason, enrollDigits, enrollDoneFrame, enrollGrantFrame, enrollHelloFrame, enrollMessage, enrollProofFrame, entryParams, epochKeys, exifOrientation, expectedRoster, extractParamsFromSdp, extractRtcParams, fedimintRequestPayload, fetchLnurlJson, fetchesByItself, fileMessageText, filePartDigest, filePartName, findAppForbiddenKey, findBolt11, findEndpoint, findInMst, findLightningDestination, firstDeviceSetSecret, formatEnrollDigits, formatFileSize, formatLocalTarget, formatPaymentAmount, formatVideoDuration, formatVoiceDuration, forwardedAgain, forwardedMany, frameBytes, freshHubs, fromBase64, fromBase64Url, fromZ32, generateEncryptionKey, generateVapidKeys, groupCallE2ee, groupCallKey, groupCallModerationBytes, groupCallRequestBytes, groupCallRoom, groupCallSfu, groupDisplayName, groupEntryUrl, groupFileFallback, groupMessageId, groupMetaBody, groupMetaChange, groupMetaNewer, groupMetaPicture, groupMetaTag, groupMetaToHand, groupName, groupReplyAuthor, groupSignalFrame, groupTypingEpoch, groupWakeFrame, groupWakes, guardViewerAnswer, handoffAckFrame, handoffAttemptAllowed, handoffAttemptFailed, handoffAttemptSucceeded, handoffBusyFrame, handoffCancelFrame, handoffContext, handoffContextProof, handoffDataFrame, handoffDigest, handoffDoneFrame, handoffEphemeral, handoffFileMissingFrame, handoffFileRequestFrame, handoffHaveFrames, handoffHelloFrame, handoffManifestFrames, handoffOfferFrame, handoffPakeFrame, handoffReleaseFrame, handoffRequestFrame, handoffRetryAfter, handoffStreamKey, handoffVerifiedFrame, handoffVerifiedMessage, handoffVersions, hasVisible, hash160, heardCallSignal, heardTime, heldBackError, homeserverWebEndpoint, hubRank, identityFromSeed, identityFromSeedB64, identityPresentationBytes, identityRefusal, identityRevocationValue, identityStatement, identityStatementText, imageSize, importedProof, inboxRecord, inviteLink, inviteOwnership, inviteQrSegments, inviteQrText, invoiceCallbackUrl, irohDescriptor, irohRelayUrl, isAppHash, isAppKey, isAppLicense, isAppLine, isAppPath, isAppRef, isAppSignature, isAppUrl, isAppVersion, isAsf, isAtprotoDid, isBitcoinAddress, isCandidateAddress, isChatAppId, isDiscoveryBudgetError, isEmptyLinkPacket, isFederationId, isGlobalIpv4Host, isGroupMessageId, isHandoffPartName, isHoldUrl, isIdentityBinding, isImageMime, isLegacySignature, isNewerVersion, isPlayableAudioType, isPlayableVideoType, isProofAdapter, isPubkyKey, isPubkyProofFolder, isPublicAddress, isRatcheted, isServeId, isSparkAddress, isStrippedPicture, isValidServiceId, isVideoMime, isViewerTag, isWalletNetwork, isX401Protocol, isZ32Key, jpegSize, jwkThumbprint, keepPastGroupMeta, keepsToRelays, keptAtEqualSequence, knockHolds, knockIdentity, knockRecords, knockSlotIdentity, knockSlotOf, knockSlotRecords, lastSharedWithMe, leaveStands, leaveStatement, leaveStatement3, leftStatement, legacyMessageHash, linkEnd, linkRecords, linkStop, linkTail, linksIn, liveStatus, lobbyKeys, lobbyRecords, makeStamp, makeStampPaced, matchX401Dcql, mayBeHub, mayPin, measureRecords, memberAdmissions, mentionedMembers, mentionsBytes, mentionsMember, mergeBeacon, mergeContactKnocks, mergeKnocks, mergeLobby, meshHubs, meshMessageRef, meshRendezvous, newDeviceSetSecret, newEpochSecret, newHandoffId, newMailbox as newHoldMailbox, newIdentityBinding, newInbox, newPubkyProofFolder, newWakeToken, newX401HolderKey, newerHead, newerPacket, nextGroupMetaRevision, nextPinNumber, nextReactionNumber, nextTurnPosition, nip05RootKey, normalizeAtprotoHandle, normalizeDid, normalizeDomain, normalizePubkyKey, normalizeRelayUrl, nostrProofTemplate, offerIsFresh, openDidDhtPayload, openGroupMeta, openGroupTyping, openHandoffPiece, openPair, openRelayPayload, openRequest, openSecret, openTurnValue, ownInviteRefusal, pacer, pairedEditFits, pairedMessageFits, pairedMessageFrame, pairedReplyAuthor, parseAppFrame, parseAppRangeFrame, parseAtprotoCar, parseAtprotoDidDocument, parseAtprotoDidKey, parseAtprotoVerificationKey, parseCallSignal, parseCashuRequestPayload, parseCommunityEdit, parseDid, parseDidDocument, parseDidJws, parseDidSignaturePaste, parseDomainTxt, parseEditFrame, parseEditedFrame, parseEngineError, parseFedimintRequestPayload, parseGroupCommit, parseGroupMetaBody, parseGroupMetaFrame, parseGroupMetaStatement, parseGroupMetaTag, parseGroupWakeFrame, parseHubPolicy, parseImageMeta, parseInvoiceCallback, parseLightningDestination, parseLinkPreview, parseLinkRecords, parseLocalTarget, parsePacketTransports, parsePairedCallFrame, parsePayParams, parsePaymentAmount, parsePaymentNetworks, parsePinFrame, parsePinnedFrame, parseReactedFrame, parseReactionFrame, parseRelayPayload, parseRtcSignal, parseSessionCapabilities, parseSshPublicKey, parseSshSignature, parseStatusFrame, parseTypingActivity, parseTypingFrame, parseVideoMeta, parseVoiceMeta, parseWakeFrame, pastedAgain, paymentUri, peekDhtMailbox, personStatus, pickCallCandidates, pickHubs, pickMeshHubs, pinFrame, pinIsNewer, pinNumberHolds, pinnedFrame, plainStatusLine, planAppUpdate, planKnocks, presenceSeenAt, presentX401SdJwtVc, previewImageSize, previewable, proofCapability, proofHash, proofStatement, pubkyHomeserverOf, pubkyProofCapability, pubkyProofFile, pubkyProofPath, publicKeyFromZ32, publishFailure, publishedNowhere, pushRequest, qrText, queueReaction, randomBytes, rankHubs, rankTransports, ratchetHeard, ratchetOn, ratchetOpen, ratchetRoot, ratchetSeal, ratchetSessionOf, ratchetUnknownSession, reactedFrame, reactionEmoji, reactionFrame, reactionIsNewer, readAppBundle, readAppBundleAsync, readAppFrame, readAppListing, readAppRangeFrame, readAppRevocation, readAppRevocationShape, readAppRevocations, readAppSignature, readAppStore, readAppStoreSteps, readAtprotoCid, readBeacon, readBeaconHead, readCanonicalJson, readContactLink, readDeviceInvite, readDhtFile, readDhtReactions, readDnsName, readEnrollGrant, readEnrollHello, readForwarded, readGroupFileMeta, readGroupHave, readGroupSignal, readGroupWant, readGroupWantNo, readHandoffAck, readHandoffBusy, readHandoffCancel, readHandoffData, readHandoffDone, readHandoffFileFrame, readHandoffHave, readHandoffHello, readHandoffManifest, readHandoffPake, readHandoffRelease, readHandoffTurnFrame, readHandoffVerified, readImageMeta, readInviteCode, readKnockSlot, readKnocks, readLinkRecord, readLobby, readManifest, readOwnRelayPayload, readPin, readReaction, readRelayBody, readReply, readSetUpdate, readStatusCard, readTurnBody, readTurnPacket, readWake, readWakePayload, readX401DcqlQuery, readX401OpenId4VpRequest, readX401ProofRequest, readX401ProofRequestHeader, readX401ProofResponse, readX401ProofResponseHeader, readX401ProofResult, readX401ProofResultHeader, readX401SdJwtVc, readingAhead, receivedIdentityStatus, receivedTimestamp, recordingMime, recordsFromTxt, recordsFromWellKnown, recordsName, refusalText, relativizeLocation, relayRequest, relayUrl, relayUrlProblem, relayUrlTooLong, relayedTransports, rememberAlone, removedCardText, repeatedJsonKey, replySnippet, requestLnurlInvoice, requestPlaintextBytes, requestRecords, resolveDidDht, resolveLightningDestination, resolveTargetUrl, revokesIdentity, ringAuthorization, ringClaims, ringEvidence, rosterAdmin, rosterHas, rosterHash, routedCommunityFrame, safeBlobType, sameButtonText, sameSshKey, sameStatusState, sameX401HolderJwk, sanitizeAvatar, sanitizeDisplayText, sanitizeFileName, sanitizeMime, sanitizeNick, sanitizePreviewImage, sanitizeRequestHeaders, sanitizeResponseHeaders, sanitizeStatusText, sanitizeTypingStatus, satsToBtc, sdpHasCandidates, sealGroupTyping, sealHandoffPiece, sealPair, sealSecret, sealTurnBody, sealedLength, seedSigner, seenEntry, sendBody, sentWhole, serviceIdFromName, servicesFromWire, servicesToWire, sessionCapabilitiesFrame, setAckFrame, setAppSignatureFastPath, setLinkTraceSink, setPublicKeyFastPath, setUpdateFrame, setUpdateMessage, settleRequest, sha256Hex, sha256Paced, sha256d, shortAtprotoDid, shortHash, shouldBeHub, shownTime, sign, signAppObject, signAppRevocation, signAppStore, signCommit, signCommunity, signDeviceTransports, signDidDhtPacket, signGroupCallModeration, signGroupCallRequest, signGroupMeta, signIdentityPresentation, signRelayPayload, signTombstone, signTurnBody, signTurnPacket, signTurnRelease, signalHasVideo, signingKeys, sortParts, sortRoster, sparkAddressKind, sparkInvoiceDetails, sparkNetworkOf, sshFingerprint, sshKeyDigestHex, sshSignCommand, stampHolds, staticDidDocument, statusCardBytes, statusCardText, statusFrame, statusState, storageProof, storageProofBody, storageProofPath, strictBase64Url, stripHidden, stripPictureMetadata, symmetricNat, takeRequest, taskProgress, toBase64, toBase64Url, toZ32, traceLink, transferEnded, transferStalled, transportOrder, trimEndOf, tryDecrypt, turnInstance, turnKeys, turnName, turnOff, turnPacket, turnPayloadSequence, turnPutSummary, turnReleaseMessage, turnSequence, turnSignedMessage, turnStatedVerifier, turnVerifierMark, txHash, txtValue, typingActivity, typingFrame, typingKindOf, u32, u64, unsignedCommitBytes, unsignedDeviceTransports, unusedInviteWait, unwrapPasted, uriEnd, usageLeft, utf8Decode, utf8Encode, validDomainRecord, validEditMessage, validEditNumber, validEditText, validExternalKey, validHead, validMentions, validReactionNumber, validRemovalNumber, validRingKey, validatePaymentTarget, vapidAuthorization, vapidKeysMatch, varBytes, verify, verifyAppRevocation, verifyAppSignature, verifyAppStatementBytes, verifyAtprotoRecordProof, verifyAtprotoSignature, verifyBip322, verifyBitcoinMessage, verifyChain, verifyCommit, verifyCommitSignature, verifyCommunityChain, verifyCommunityChainPaced, verifyCommunityCommit, verifyDeviceTransports, verifyEnrollProof, verifyGroupCallModeration, verifyGroupCallRequest, verifyGroupMetaSignature, verifyIdentityPresentation, verifyNostrProof, verifyPeerProof, verifyRingAuthorization, verifyRingEvidence, verifySetUpdate, verifySshSignature, videoMetadataPatches, viewerGuardOffset, viewerResponseHeaders, viewerServicePolicy, viewerTag, voiceDownloadName, voiceFileName, voiceLevel, voiceLevelsOf, voicePeaksOf, waitForIceGathering, wakeFrame, wakePayload, wakeRequest, walletNetworkOf, webCryptoSigner, webLocalFetch, wellKnownUrl, wireHubPolicy, wireMentions, wireReaction, wireReply, withRequestOptions, withViewerPolicy, withoutAppLink, withoutAudioMetadata, withoutPictureMetadata, withoutVideoMetadata, wrapDataChannel, wrapGroupMeta, x401AnswerableRequests, x401ApprovalDigest, x401HolderJwk, x401VpToken, yieldThread };
40548
+ export { ACTIVE_DHT_POLL_MS, ACTIVE_TASK_STATUSES, ANSWERS_REFUSED_PAUSES, ANSWERS_REFUSED_PAUSE_MS, ANSWER_READ_ALLOWANCE, ANSWER_READ_FIRST_MS, ANSWER_READ_SPACING_MS, ANSWER_REFUSED_REDIALS, APPS_CAPABILITY, APP_BUNDLE_LIMITS, APP_BUNDLE_MAGIC, APP_CLIENTS, APP_CLIENT_NAME, APP_DATA_MAX_BYTES, APP_FORBIDDEN_KEYS, APP_FRAME, APP_ICON_PATH, APP_NAME, APP_PEER_OPEN_MAX, APP_PERMISSIONS, APP_PREFIXES, APP_RANGES_CAPABILITY, APP_RANGE_DATA_KIND, APP_RANGE_ERRORS, APP_RANGE_FRAMES, APP_RANGE_LIMITS, APP_RATE_LIMIT, APP_RATE_WINDOW_MS, APP_RESUME_GRACE_MS, APP_SCREENSHOTS_DIR, APP_SEND_LIMIT, APP_STATEMENT_LIMITS, APP_STORE_KINDS, APP_STORE_LIMITS, APP_VERSION_MAX, APP_VIEWS, ATPROTO_DECLARED_SCOPE, ATPROTO_FULL_SCOPE, ATPROTO_PROOF_COLLECTION, ATPROTO_PROOF_SCOPE, AUDIO_METADATA_LIMITS, AUTOMATIC_ORDER, AWAITED_READS, AWAITING_PEER_MS, AppRanges, AppSessions, AtprotoCid, AtprotoProofError, BACKGROUND_REQUESTS_PER_MINUTE, BACKGROUND_WHILE_SIGNALING, BACKGROUND_WRITES_SHARE, BIP322_REVISION, BITCOIN_NETWORKS, BLOCKED_DIAL_WAIT_MS, BOLT11_PATTERN, BREAKER_ALL_DOWN_PROBE_MS, BREAKER_BASE_MS, BREAKER_MAX_MS, BREAKER_THRESHOLD, BURST_RING_MS, BUTTONS_CAPABILITY, BUTTON_ID, BUTTON_STYLES, BitcoinAddressError, ByteReader, CALLS_CAPABILITY, CALL_RATE_WINDOW_MS, CALL_RECEIVE_LIMIT, CALL_SIGNAL_FUTURE_MS, CALL_SIGNAL_MAX_AGE_MS, CAPS_ISSUED_BACK_MS, CAPS_LABEL, CAPS_LIMITS, CAPS_PUBLISH_SPACING_MS, CAPS_REFRESH_MS, CARRIED_DEFER_MS, CATCH_UP_PAUSE_MS, CATCH_UP_SLICE, CHAT_RESERVE, CHAT_RESERVE_MOST_SHARE, CHAT_RESERVE_PER_CHAT, CHAT_WATCH_SHARE, CHUNK_FLAG_END, CHUNK_KIND, CLIPBOARD_GUARD_HASH, CLIPBOARD_GUARD_SCRIPT, CLOCK_EVIDENCE_MS, CLOCK_OFF_MS, CLOCK_PEERS, CLOCK_PEER_READ_GAP_MS, CLOCK_SERVERS, COMMUNITY_EDIT_FRAME, COMMUNITY_LIMITS, COMMUNITY_PIN_FRAME, COMMUNITY_PROFILE, COMMUNITY_REACTION_FRAME, COMMUNITY_TAKEOVER_META_MS, COMMUNITY_TOPOLOGY, CONNECT_TIMEOUT_MS, CONTACT_ASKER_FRAME, CONTACT_LINK_BYTES, CONTACT_LINK_VERSION, CONTACT_RECORD_TTL, CRON_LINE, CROSSED_FRESH_MS, CROSSED_PROBE_MS, CROSSED_WAIT_MS, CapsExchange, CapsKeys, CapsRefusedError, CarriedTransport, CatchUpAnswers, ChatFiles, ClockWatch, CommunitySession, ContactRequestError, DAEMON_WATCH_PEER_IDLE_MS, DATA_CHANNEL_ID, DATA_CHANNEL_LABEL, DATA_SETTLE_MS, DEFAULT_RELAYS, DEMOTE_AFTER_FAILURES, DEMOTE_MS, DEPARTED_READS, DEPARTED_READ_MS, DEVICES_CAPABILITY, DEVICE_CAPABILITIES, DEVICE_ECHO_FRAME, DEVICE_INVITE_BYTES, DEVICE_INVITE_LIFETIME_S, DEVICE_INVITE_OWN_DEVICE, DEVICE_INVITE_READ_SLACK_S, DEVICE_INVITE_VERSION, DEVICE_KINDS, DEVICE_PING_FRAME, DEVICE_WAKE_TTL_SECONDS, DHT_FILE_CAPABILITY, DHT_FILE_REFUSED, DHT_FILE_TOO_LARGE, DHT_MESSAGE_TTL, DHT_PACKET_BUDGET, DHT_PIN_GRACE_MS, DHT_POLL_INTERVALS, DHT_TEXT_BYTES, DHT_TEXT_CAPABILITY, DHT_TEXT_REFUSED, DIALED_IN_CONTENDERS, DID_DHT_MAX_PAYLOAD, DID_DHT_PREFIX, DID_DHT_TTL, DID_DHT_VERSION, DID_DOCUMENT_MAX_BYTES, DID_FILE_MAX_BYTES, DID_GHOSTLY_SERVICE, DID_JWS_ALGS, DID_JWS_MAX_LENGTH, DID_MAX_LENGTH, DID_METHODS, DIRECT_EVIDENCE_MS, DIRECT_OWN_ATTEMPTS, DIRECT_PEERS, DNS_LABEL, DNS_TYPE, DOMAIN_FILE_MAX_BYTES, DOMAIN_MAX_RECORDS, DOMAIN_METHODS, DOMAIN_TXT_MAX_BYTES, DOOR_FIRST_MS, DataLink, DhtDelivery, DidDhtError, DidError, DirectPathWatch, DiscoveryBudgetError, EARLY_DIAL_JOIN_MS, EDITED_FRAME, EDIT_BUFFER_MAX, EDIT_BUFFER_MS, EDIT_CAPABILITY, EDIT_FRAME, EDIT_RATE_WINDOW_MS, EDIT_RECEIVE_LIMIT, EDIT_SEND_LIMIT, ENDPOINT, ENGINE_ERRORS, ENROLL_CANCEL, ENROLL_CANCEL_REASONS, ENROLL_CAPABILITY, ENROLL_DONE, ENROLL_GRANT, ENROLL_HELLO, ENROLL_PROOF, ETHEREUM_USDT, EVM_TEST_CHAINS, EXPECT_PEER_MS, EngineError, FILES_BINARY_CAPABILITY, FILES_CAPABILITY, FILE_DATA_KIND, FILE_FRAMES, FILE_LIMITS, FIRST_PAIRING_PACE_MS, FIRST_PUBLISH_MAX_MS, FLOOD_PER_DAY, FOLLOW_MS, FORWARD_LIMITS, FRESH_READ_MS, FileTransfers, FileUplink, GATHER_ATTEMPTS, GATHER_STALL_MS, GROUP_ADMIN_OFF_ERROR, GROUP_BURST_MS, GROUP_BURST_ONE_LINK, GROUP_CALL_MODERATION_ACTS, GROUP_CALL_NONCE_S, GROUP_CALL_SKEW_S, GROUP_CALL_SOURCES, GROUP_CALL_VERSION, GROUP_EDIT_FRAME, GROUP_EDIT_TEXT_BYTES, GROUP_ENTRY_PROFILE, GROUP_FILE_LIMITS, GROUP_HAVE_FRAME, GROUP_ID, GROUP_LIMITS, GROUP_MEMBER_CAP, GROUP_META_PAST, GROUP_META_PAST_CHARS, GROUP_OVER_PACE_MS, GROUP_PIN_FRAME, GROUP_PROFILE, GROUP_RATION_WINDOW_MS, GROUP_REACTED_FRAME, GROUP_REACTION_FRAME, GROUP_READ_NOTE, GROUP_READ_NOTE_COMMUNITY, GROUP_SIGNALING_ALLOWANCE_SHARE, GROUP_SIGNAL_FRAME, GROUP_TAKEOVER_META_MS, GROUP_TYPING_FRAME, GROUP_VERSION_FILES, GROUP_VERSION_HUBS, GROUP_VERSION_LARGE, GROUP_VERSION_SIGNALS, GROUP_WAKE_FRAME, GROUP_WAKE_GROUP_LIMIT, GROUP_WAKE_GROUP_WINDOW_MS, GROUP_WAKE_MEMBER_INTERVAL_MS, GROUP_WAKE_RECEIVE_LIMIT, GROUP_WANT_FRAME, GROUP_WANT_NO_FRAME, GhostLink, GhostlyHttpError, GroupSession, GroupTypingBoard, GroupWakeLimiter, HANDLED_WAIT_MS, HANDOFF_ACK, HANDOFF_ATTEMPTS, HANDOFF_BUSY, HANDOFF_BUSY_REASONS, HANDOFF_CANCEL, HANDOFF_CANCEL_REASONS, HANDOFF_CAPABILITY, HANDOFF_DATA, HANDOFF_DONE, HANDOFF_FILE_MISSING, HANDOFF_FILE_REQUEST, HANDOFF_HAVE, HANDOFF_HELLO, HANDOFF_LATER_BYTES, HANDOFF_LIST_PER_FRAME, HANDOFF_MANIFEST, HANDOFF_OFFER, HANDOFF_PAKE, HANDOFF_PIECE_BYTES, HANDOFF_PIECE_OVERHEAD, HANDOFF_RELEASE, HANDOFF_REQUEST, HANDOFF_TIMINGS, HANDOFF_VERIFIED, HANDOFF_VERSION, HANDOFF_WINDOW, HEDGE_MISSING_MS, HEDGE_MS, HOLD_CAPABILITY, HOLD_DATED_BACK_MS, HOLD_LIMITS, HTTP_SERVICE_PROTO, HoldKeys, HoldRefusedError, HttpClient, HttpHost, IDENTITY_CHALLENGE_WINDOW, IDENTITY_CHECK_UNAVAILABLE, IDENTITY_CLOCK_SKEW, IDENTITY_FRAME_LIMIT, IDENTITY_FRAME_WINDOW_MS, IDENTITY_MAX_CHECKS_PER_HOUR, IDENTITY_MAX_EVIDENCE, IDENTITY_MAX_FRAME, IDENTITY_MAX_RECEIVED, IDENTITY_MAX_VALIDITY, IDENTITY_MEMO_IDLE_MS, IDENTITY_MEMO_MAX, IDENTITY_MEMO_SIZE, IDENTITY_PROOF_CAPABILITY, IDENTITY_PROVIDER_ID, IDENTITY_RESENDS, IDENTITY_RESEND_MS, IDENTITY_REUSE_CHECK_S, IDENTITY_REVOCATION_LABEL, IDENTITY_SEND_LIMIT, IDENTITY_SEND_WINDOW_MS, IDENTITY_STATEMENT_PREFIX, IDENTITY_SUBJECT, IDENTITY_TIMELINE_MAX, IDLE_THRESHOLD, IMAGE_LIMITS, INVITER_DIAL_GRACE_MS, INVITE_HRP, INVITE_LINK_ORIGIN, INVITE_MAX_LENGTH, INVITE_TAKEN, INVITE_VERSION, ITEM_STATES, IdentityCheckUnavailable, IdentityExchange, KNOCK_SLOTS, KNOCK_SLOT_LABEL, KNOCK_TTL_MS, KNOWN_SESSION_CAPABILITIES, LABEL, LATE_ANSWER_MS, LEGACY_GROUP_MEMBERS, LEGACY_SERVICES, LIGHTNING_DESTINATION_PATTERN, LIMITS, LINK_MAX_CHARS, LINK_PREVIEW_LIMITS, LINK_RECORD_LABEL, LINK_RUN, LINK_STOP_CHARS, LINK_TRAILING, LIVENESS_MISSED_PINGS, LIVENESS_PING_MS, LIVE_POLL_MS, LNURL_LIMITS, LinkSession, MAX_AVATAR_LENGTH, MAX_AVATAR_SIDE, MAX_CHUNK_PAYLOAD_BYTES, MAX_DHT_TEXT_BYTES, MAX_DNS_PACKET_BYTES, MAX_DONE, MAX_EDITS_PER_MESSAGE, MAX_GROUP_CALL_NAME, MAX_GROUP_CALL_SFU, MAX_GROUP_CHAIN, MAX_GROUP_MEMBERS, MAX_GROUP_META_BODY, MAX_GROUP_NAME_BYTES, MAX_GROUP_NAME_LENGTH, MAX_GROUP_PICTURE_LENGTH, MAX_KNOCKS, MAX_MISSED, MAX_MSGS_PAYLOAD_B64, MAX_NICK_LENGTH, MAX_PAIRED_CALL_SIGNAL, MAX_PAIRED_MESSAGE_FRAME, MAX_REMOVAL_NUMBER, MAX_SEEN, MAX_SERVICES, MAX_SHARED_APPS, MAX_SKIP, MAX_SKIPPED_KEYS, MAX_SLOT_KNOCKS, MAX_WAITING, MEMBER_KEY, MENTION_EVERYONE, MENTION_LIMITS, MESH_HUBS, MESSAGE_CLOCK_SKEW_MS, MESSAGE_PACED, MESSAGE_RECEIVE_LIMITS, MessagePace, MessageRefusal, NEW_PER_HOUR, NIP05_PATH, NO_ATTEMPTS, NO_AUDIO_METADATA, NO_HUB_POLICY, NO_PICTURE_METADATA, NO_VIDEO_METADATA, OFFER_FAST_MS, OFFER_HOST_GATHER_MS, OFFER_LOOK_MS, OFFER_STEP_MAX, ONCHAIN_PROVIDER, OWN_FRAME_LIMIT, OwnInviteError, PAIRED_CALL_CANDIDATES, PAIRED_CALL_FRAME, PAIRED_FRAME_TOO_LARGE, PAIRED_PROFILE, PAIRED_REPLY_AUTHORS, PAIRING_ATTEMPT_MS, PAIRING_RETRY_MS, PICTURE_METADATA_LIMITS, PINNED_FRAME, PIN_CAPABILITY, PIN_CLOCK_SKEW_MS, PIN_FRAME, PIN_LIMITS, PKARR_FUTURE_SKEW_MS, PLAYABLE_AUDIO, PLAYABLE_VIDEO, PONG_WAIT_MS, PRESENCES, PRESENCE_HEARTBEAT, PRESENCE_WINDOW, PREVIEWABLE_IMAGE, PREVIOUS_DEFAULT_RELAYS, PROOF_ADAPTERS, PROOF_CAPABILITY, PROTOCOL_VERSION, PR_CHECKS, PR_STATES, PUBKY_PROOF_MAX_BYTES, PUBKY_PROOF_ROOT, PUSH_PAD_BYTES, PUSH_SERVICE_HOSTS, PacketTooLargeError, PairedCalls, PairedSession, PairingTracker, PaymentPreflightError, PeerProofs, PublishFailedError, QUICK_REACTIONS, QUICK_REDIAL_MS, RACE_ANSWERED_MS, RACE_DIRECT_MS, RACE_RELAYED_MS, RATCHET_CAPABILITY, RATCHET_HEADER_BYTES, RATCHET_KEEP_MS, RATCHET_OVERHEAD, REACTED_FRAME, REACTIONS_CAPABILITY, REACTION_FRAME, REACTION_LIMITS, REANSWERS, RECORDING_TYPES, RECORD_TTL, REDESCRIBED_GRACE_MS, RELAYED_FIRST_MS, RELAY_PAYLOAD_MAX_BYTES, RELAY_POLL_INTERVALS, RELAY_REQUESTS_PER_MINUTE, RELAY_URL, RELAY_WITH_SECRETS, REMOVABLE_KINDS, REMOVED_TEXT, REOPEN_BELOW, REPLY_ID, REPLY_LIMITS, REQUESTS_PER_MINUTE, REQUEST_CLOCK_SKEW_MS, REQUEST_LABEL, REQUEST_LIFETIME_MS, REQUEST_NAME_UNITS, REQUEST_PACKET_BYTES, REQUEST_TEXT_BYTES, RESUME_WAIT_MS, RING_LIFETIME, ROUTINE_STATES, RTC_CONFIG, RTC_SIGNAL_FUTURE_MS, RTC_SIGNAL_MAX_AGE_MS, RTC_SIGNAL_RATE_WINDOW_MS, RTC_SIGNAL_RECEIVE_LIMIT, RTC_UNSTARTED_MS, RUN_RESULTS, RatchetBox, RateWindow, ReactionWindow, RelayBreaker, RelayTransport, RelaysFailedError, SAID_AGAIN, SEPOLIA_TEST_USDT, SEPOLIA_TEST_USDT_FAUCET, SERVICES_CAPABILITY, SERVICES_VERSION, SESSION_CAPABILITIES_FRAME, SESSION_FRAME_MAX, SESSION_RECEIVE_PENDING, SET_ACK, SET_UPDATE, SIGNALING_ALLOWANCE_SHARE, SIGNALING_WINDOW_MS, SIGNALS_PER_MINUTE, SIGNAL_CARRIERS, SIGNAL_DUE_READS, SIGNAL_FRESH_MS, SIGNAL_HOLD_MS, SIGNAL_OUT_READS, SIGNAL_PROVEN_MS, SIGNAL_REPLY_MS, SLOW_DEMOTE_MS, SLOW_MS, SPARK_NETWORKS, SPARK_PROVIDER, SSHSIG_MAX_ARMOR, SSHSIG_NAMESPACE, SSH_KEY_TYPES, SSH_PUBLIC_KEY_MAX, STALLED_EVIDENCE_MS, STALLED_LOOK_MS, STAMP_BITS_DEFAULT, STAMP_BITS_MAX, STAMP_BITS_MIN, STATUS_AVAILABILITIES, STATUS_CAPABILITY, STATUS_CARD_CAPABILITY, STATUS_CARD_LIMITS, STATUS_FRAME, STATUS_IDLE_AFTER_MS, STATUS_RATE_LIMIT, STATUS_RATE_WINDOW_MS, STATUS_SEND_INTERVAL_MS, STATUS_TEXT_MAX, STORAGE_LIFETIME, STORAGE_ROOT, SWITCH_RETIRE_MS, SessionCapabilities, SshSigError, StatusReceiver, StatusSender, TASK_STATUSES, TEST_USDT_FAUCET_AMOUNT, TOMBSTONE_SEQUENCE, TOMBSTONE_TURN, TRANSPORTS, TRANSPORTS_GONE_MS, TURN_BODY_BYTES, TURN_LABEL, TURN_LAST_SEQUENCE, TURN_MAX, TURN_NAME_BYTES, TURN_NO_ACTIVE, TURN_PUT_WINDOW_MS, TURN_RAISE_READ_TIMEOUT_MS, TURN_REV_LIMIT, TURN_SEALED_BYTES, TURN_SETTLE_MS, TURN_SIGNED_BYTES, TURN_SLOTS, TURN_SOURCE_TIMEOUT_MS, TURN_TTL, TURN_VERSION, TURN_VISIBLE_MS, TYPING_CAPABILITY, TYPING_FRAME, TYPING_KINDS, TYPING_RATE_LIMIT, TYPING_RATE_WINDOW_MS, TYPING_REFRESH_MS, TYPING_SEND_LIMIT, TYPING_STATUS_MAX, TYPING_TIMEOUT_MS, TurnRecordError, TypingReceiver, TypingSender, UNPROVEN_AUTH_MS, UNUSED_INVITE_READS_PER_MINUTE, UNUSED_INVITE_UPKEEP_MS, UNUSED_INVITE_WAIT_MAX_MS, UPGRADE_CAPABILITY, USDT_PUBLIC_RPC, VIDEO_LIMITS, VIDEO_METADATA_LIMITS, VIEWER_DROPPED_DIRECTIVES, VIEWER_DROPPED_HEADERS, VIEWER_GUARD_CSP, VIEWER_GUARD_HASH, VIEWER_GUARD_SCRIPT, VIEWER_PERMISSIONS_POLICY, VIEWER_SERVICE_CSP, VIEWER_SERVICE_CSP_RELAY_ONLY, VIEWER_WORKER_GUARD_CSP, VOICE_LIMITS, VOICE_METER, WAKE_ANSWER_GRACE_MS, WAKE_CALL_INTERVAL_MS, WAKE_CALL_TTL_SECONDS, WAKE_CALL_WAIT_MS, WAKE_SESSION_CAPABILITY as WAKE_CAPABILITY, WAKE_SESSION_CAPABILITY, WAKE_FRAME, WAKE_INTERVAL_MS, WAKE_LOST_MS, WAKE_ONLINE_BATCH, WAKE_ONLINE_BATCH_MS, WAKE_ONLINE_DELAY_MS, WAKE_ONLINE_INTERVAL_MS, WAKE_ONLINE_TTL_SECONDS, WAKE_RETRY_MS, WAKE_SUBJECT, WAKE_TTL_SECONDS, WALLET_NETWORKS, WATCH_PEER_MS, WATCH_SHARE, WAY_BACK_SHARE, WEBRTC_GUARD, WELL_KNOWN_PATH, WRITE_FIRST_MS, WakeLimiter, WebPushError, X401_CREDENTIAL_LIMITS, X401_DCQL_LIMITS, X401_HEADERS, X401_LIMITS, X401_PROTOCOLS, X401_REQUEST_LIMITS, X401_RESPONSE_MODES, X401_SCHEME, X401_VERSION, addedAppPermissions, allowingViewerGuard, answersOffer, appCardId, appCardUrl, appCloseFrame, appDataBytes, appDataFrame, appDigest, appFingerprint, appOpenFrame, appRangeCancelFrame, appRangeChunk, appRangeDataFrame, appRangeEndFrame, appRangeErrorFrame, appRangeGetFrame, appRef, appRefPublisher, appRevocationFor, appRevocationId, appRevocationsFileEntries, appSignedBytes, appStoreDecision, appUpdateDecision, appViewOf, applyIdentityEvent, arkAddressPrefix, arrivalKey, asWritten, assembleAppBundle, assertTokenUnits, assertWholeSats, atprotoCidFor, atprotoDidMethod, atprotoProofRecord, atprotoProofRkey, audioMetadataPatches, automaticTransport, baseMime, beaconKeys, beaconRecords, bip322MessageHash, bip322ToSign, bip322ToSpend, boundIdentityDisplay, boundVerifiedIdentity, budgetRetryMs, buildAppBundle, buildDataSdp, buildLinkRecords, buildSdpFromSignal, buildX401ProofRequest, buildX401ProofResult, buildX401ResultArtifact, buildX401TokenObject, buttonLabelClash, bytesEqual, callRtcConfig, callSignalHeardAt, canonicalJson, canonicalJsonBytes, canonicalJsonListEntries, canonicalUrl, capsDescriptors, cardEditNumber, cardLine, cardLinkHost, cardTimeUtc, cardUrl, carryMentions, cashuRequestPayload, chainPieces, chatAppId, checkAppBeforeRun, checkAppListing, checkAppManifest, checkAppRevokeStatement, checkAppStoreIndex, checkAtprotoProofRecord, checkDidJws, checkDidSignature, checkPushEndpoint, checkStatusCard, checkedDescriptors, claimedTime, classifyTurnRead, clearMissed, clockOffset, coarseRoom, commitHash, commitUntaggedHash, communityCommitHash, communityEditFrame, communityGroupId, communityHasFrame, communityMessageAuthor, communityMessageId, communityRoster, communityUntaggedHash, compactSize, compareVersions, compressSdp, concatBytes, confirmationMatches, confirmationTag, contactAskerFrame, contactAskerHolds, contactDay, contactRtcConfig, countUnusedInvite, createChatInvite, createContactLink, createDeviceInvite, createIdentity, createLink, createRelayPayload, currentRelays, decodeAnyBitcoinAddress, decodeAppRangeData, decodeAtprotoCommit, decodeBase64, decodeBitcoinAddress, decodeBolt11, decodeChunk, decodeCommunityLink, decodeControl, decodeDagCbor, decodeDidDhtPacket, decodeDnsAnswers, decodeDnsResponse, decodeFileData, decodeGroupEntryLink, decodeInviteCode, decodeServices, decodeSvcbRecords, decodeTx, decodeTxtPacket, decodeWitness, decodeX401Header, decompressSdp, decrypt, decryptPushPayload, decryptText, derivedSecret, deviceEchoFrame, deviceEchoNonce, deviceFrameCapability, deviceInviteExpired, deviceInviteJoinerKeyZ32, deviceInviteJoinerParams, deviceKeyZ32, deviceLinkPairing, deviceLinkParams, deviceLinkRendezvousSeed, deviceLinkSealKey, deviceLinkSecret, devicePingFrame, deviceWakeRequest, dhtEditId, dhtFileElements, dhtFileId, dialDescriptors, dialableIrohRelay, didDhtDocument, didDhtFromPublicKey, didDhtKey, didDhtRecords, didGhostlyServiceEntry, didJwsAlg, didSignedMessages, didWebDocumentUrl, didWebFile, didWebFileNames, didWebFileUrl, didWebHost, directBlocked, dnsProofName, domainTxtRecord, domainWellKnownFile, doorHubs, downsamplePeaks, dropLoneJoiners, ecashUnitError, edgeParams, editFrame, editedFrame, emptyCapsState, emptyDhtDeliveryState, emptyIdentityLedger, emptyLinkRecords, emptyProofLedger, emptyRatchetState, encodeAppRangeData, encodeChunk, encodeCommunityLink, encodeContactLink, encodeControl, encodeDagCbor, encodeDeviceInvite, encodeDidDhtDeactivated, encodeDidDhtPacket, encodeDnsQuery, encodeFileData, encodeGhostlyInvite, encodeGroupEntryLink, encodeGroupMetaBody, encodeInviteCode, encodePacketTransports, encodeServices, encodeSetSlots, encodeSvcbPacket, encodeTurnFields, encodeTx, encodeTxtPacket, encodeWitness, encodeX401Header, encrypt, encryptPushPayload, encryptText, endedRequests, engineError, engineText, enrollCancelFrame, enrollCancelReason, enrollDigits, enrollDoneFrame, enrollGrantFrame, enrollHelloFrame, enrollMessage, enrollProofFrame, entryParams, epochKeys, exifOrientation, expectedRoster, extractParamsFromSdp, extractRtcParams, fedimintRequestPayload, fetchLnurlJson, fetchesByItself, fileMessageText, filePartDigest, filePartName, findAppForbiddenKey, findBolt11, findEndpoint, findInMst, findLightningDestination, firstDeviceSetSecret, formatEnrollDigits, formatFileSize, formatLocalTarget, formatPaymentAmount, formatVideoDuration, formatVoiceDuration, forwardedAgain, forwardedMany, frameBytes, freshHubs, fromBase64, fromBase64Url, fromZ32, generateEncryptionKey, generateVapidKeys, groupCallE2ee, groupCallKey, groupCallModerationBytes, groupCallRequestBytes, groupCallRoom, groupCallSfu, groupDisplayName, groupEntryUrl, groupFileFallback, groupMessageId, groupMetaBody, groupMetaChange, groupMetaNewer, groupMetaPicture, groupMetaTag, groupMetaToHand, groupName, groupReplyAuthor, groupSignalFrame, groupTypingEpoch, groupWakeFrame, groupWakes, guardViewerAnswer, handoffAckFrame, handoffAttemptAllowed, handoffAttemptFailed, handoffAttemptSucceeded, handoffBusyFrame, handoffCancelFrame, handoffContext, handoffContextProof, handoffDataFrame, handoffDigest, handoffDoneFrame, handoffEphemeral, handoffFileMissingFrame, handoffFileRequestFrame, handoffHaveFrames, handoffHelloFrame, handoffManifestFrames, handoffOfferFrame, handoffPakeFrame, handoffReleaseFrame, handoffRequestFrame, handoffRetryAfter, handoffStreamKey, handoffVerifiedFrame, handoffVerifiedMessage, handoffVersions, hasVisible, hash160, heardCallSignal, heardTime, heldBackError, homeserverWebEndpoint, hubRank, identityFromSeed, identityFromSeedB64, identityPresentationBytes, identityRefusal, identityRevocationValue, identityStatement, identityStatementText, imageSize, importedProof, inboxRecord, inviteLink, inviteOwnership, inviteQrSegments, inviteQrText, invoiceCallbackUrl, irohDescriptor, irohRelayUrl, isAppHash, isAppKey, isAppLicense, isAppLine, isAppPath, isAppRef, isAppSignature, isAppUrl, isAppVersion, isAsf, isAtprotoDid, isBitcoinAddress, isCandidateAddress, isChatAppId, isDiscoveryBudgetError, isEmptyLinkPacket, isFederationId, isGlobalIpv4Host, isGroupMessageId, isHandoffPartName, isHoldUrl, isIdentityBinding, isImageMime, isLegacySignature, isNewerVersion, isPlayableAudioType, isPlayableVideoType, isProofAdapter, isPubkyKey, isPubkyProofFolder, isPublicAddress, isRatcheted, isServeId, isSparkAddress, isStrippedPicture, isValidServiceId, isVideoMime, isViewerTag, isWalletNetwork, isX401Protocol, isZ32Key, jpegSize, jwkThumbprint, keepPastGroupMeta, keepsToRelays, keptAtEqualSequence, knockHolds, knockIdentity, knockRecords, knockSlotIdentity, knockSlotOf, knockSlotRecords, lastSharedWithMe, leaveStands, leaveStatement, leaveStatement3, leftStatement, legacyMessageHash, linkEnd, linkRecords, linkStop, linkTail, linksIn, liveStatus, lobbyKeys, lobbyRecords, makeStamp, makeStampPaced, matchX401Dcql, mayBeHub, mayPin, measureRecords, memberAdmissions, mentionedMembers, mentionsBytes, mentionsMember, mergeBeacon, mergeContactKnocks, mergeKnocks, mergeLobby, meshHubs, meshMessageRef, meshRendezvous, newDeviceSetSecret, newEpochSecret, newHandoffId, newMailbox as newHoldMailbox, newIdentityBinding, newInbox, newPubkyProofFolder, newWakeToken, newX401HolderKey, newerHead, newerPacket, nextGroupMetaRevision, nextPinNumber, nextReactionNumber, nextTurnPosition, nip05RootKey, normalizeAtprotoHandle, normalizeDid, normalizeDomain, normalizePubkyKey, normalizeRelayUrl, nostrProofTemplate, offerIsFresh, openDidDhtPayload, openGroupMeta, openGroupTyping, openHandoffPiece, openPair, openRelayPayload, openRequest, openSecret, openTurnValue, ownInviteRefusal, pacer, pairedEditFits, pairedMessageFits, pairedMessageFrame, pairedReplyAuthor, parseAppFrame, parseAppRangeFrame, parseAtprotoCar, parseAtprotoDidDocument, parseAtprotoDidKey, parseAtprotoVerificationKey, parseCallSignal, parseCashuRequestPayload, parseCommunityEdit, parseDid, parseDidDocument, parseDidJws, parseDidSignaturePaste, parseDomainTxt, parseEditFrame, parseEditedFrame, parseEngineError, parseFedimintRequestPayload, parseGroupCommit, parseGroupMetaBody, parseGroupMetaFrame, parseGroupMetaStatement, parseGroupMetaTag, parseGroupWakeFrame, parseHubPolicy, parseImageMeta, parseInvoiceCallback, parseLightningDestination, parseLinkPreview, parseLinkRecords, parseLocalTarget, parsePacketTransports, parsePairedCallFrame, parsePayParams, parsePaymentAmount, parsePaymentNetworks, parsePinFrame, parsePinnedFrame, parseReactedFrame, parseReactionFrame, parseRelayPayload, parseRtcSignal, parseSessionCapabilities, parseSshPublicKey, parseSshSignature, parseStatusFrame, parseTypingActivity, parseTypingFrame, parseVideoMeta, parseVoiceMeta, parseWakeFrame, pastedAgain, paymentUri, peekDhtMailbox, personStatus, pickCallCandidates, pickHubs, pickMeshHubs, pinFrame, pinIsNewer, pinNumberHolds, pinnedFrame, plainStatusLine, planAppUpdate, planKnocks, presenceSeenAt, presentX401SdJwtVc, previewImageSize, previewable, proofCapability, proofHash, proofStatement, pubkyHomeserverOf, pubkyProofCapability, pubkyProofFile, pubkyProofPath, publicKeyFromZ32, publishFailure, publishedNowhere, pushRequest, qrText, queueReaction, randomBytes, rankHubs, rankTransports, ratchetHeard, ratchetOn, ratchetOpen, ratchetRoot, ratchetSeal, ratchetSessionOf, ratchetUnknownSession, reactedFrame, reactionEmoji, reactionFrame, reactionIsNewer, readAppBundle, readAppBundleAsync, readAppFrame, readAppListing, readAppRangeFrame, readAppRevocation, readAppRevocationShape, readAppRevocations, readAppSignature, readAppStore, readAppStoreSteps, readAtprotoCid, readBeacon, readBeaconHead, readCanonicalJson, readContactLink, readDeviceInvite, readDhtFile, readDhtReactions, readDnsName, readEnrollGrant, readEnrollHello, readForwarded, readGroupFileMeta, readGroupHave, readGroupSignal, readGroupWant, readGroupWantNo, readHandoffAck, readHandoffBusy, readHandoffCancel, readHandoffData, readHandoffDone, readHandoffFileFrame, readHandoffHave, readHandoffHello, readHandoffManifest, readHandoffPake, readHandoffRelease, readHandoffTurnFrame, readHandoffVerified, readImageMeta, readInviteCode, readKnockSlot, readKnocks, readLinkRecord, readLobby, readManifest, readOwnRelayPayload, readPin, readReaction, readRelayBody, readReply, readSetUpdate, readStatusCard, readTurnBody, readTurnPacket, readWake, readWakePayload, readX401DcqlQuery, readX401OpenId4VpRequest, readX401ProofRequest, readX401ProofRequestHeader, readX401ProofResponse, readX401ProofResponseHeader, readX401ProofResult, readX401ProofResultHeader, readX401SdJwtVc, readingAhead, receivedIdentityStatus, receivedTimestamp, recordingMime, recordsFromTxt, recordsFromWellKnown, recordsName, refusalText, relativizeLocation, relayRequest, relayUrl, relayUrlProblem, relayUrlTooLong, relayedTransports, rememberAlone, removedCardText, repeatedJsonKey, replySnippet, requestLnurlInvoice, requestPlaintextBytes, requestRecords, resolveDidDht, resolveLightningDestination, resolveTargetUrl, revokesIdentity, ringAuthorization, ringClaims, ringEvidence, rosterAdmin, rosterHas, rosterHash, routedCommunityFrame, safeBlobType, sameButtonText, sameSshKey, sameStatusState, sameX401HolderJwk, sanitizeAvatar, sanitizeDisplayText, sanitizeFileName, sanitizeMime, sanitizeNick, sanitizePreviewImage, sanitizeRequestHeaders, sanitizeResponseHeaders, sanitizeStatusText, sanitizeTypingStatus, satsToBtc, sdpHasCandidates, sealGroupTyping, sealHandoffPiece, sealPair, sealSecret, sealTurnBody, sealedLength, seedSigner, seenEntry, sendBody, sentWhole, serviceIdFromName, servicesFromWire, servicesToWire, sessionCapabilitiesFrame, setAckFrame, setAppSignatureFastPath, setLinkTraceSink, setPublicKeyFastPath, setUpdateFrame, setUpdateMessage, settleRequest, sha256Hex, sha256Paced, sha256d, shortAtprotoDid, shortHash, shouldBeHub, shownTime, sign, signAppObject, signAppRevocation, signAppStore, signCommit, signCommunity, signDeviceTransports, signDidDhtPacket, signGroupCallModeration, signGroupCallRequest, signGroupMeta, signIdentityPresentation, signRelayPayload, signTombstone, signTurnBody, signTurnPacket, signTurnRelease, signalHasVideo, signingKeys, sortParts, sortRoster, sparkAddressKind, sparkInvoiceDetails, sparkNetworkOf, sshFingerprint, sshKeyDigestHex, sshSignCommand, stampHolds, staticDidDocument, statusCardBytes, statusCardText, statusFrame, statusState, storageProof, storageProofBody, storageProofPath, strictBase64Url, stripHidden, stripPictureMetadata, symmetricNat, takeRequest, taskProgress, toBase64, toBase64Url, toZ32, traceLink, transferEnded, transferStalled, transportOrder, trimEndOf, tryDecrypt, turnInstance, turnKeys, turnName, turnOff, turnPacket, turnPayloadSequence, turnPutSummary, turnReleaseMessage, turnSequence, turnSignedMessage, turnStatedVerifier, turnVerifierMark, txHash, txtValue, typingActivity, typingFrame, typingKindOf, u32, u64, unsignedCommitBytes, unsignedDeviceTransports, unusedInviteWait, unwrapPasted, uriEnd, usageLeft, utf8Decode, utf8Encode, validDomainRecord, validEditMessage, validEditNumber, validEditText, validExternalKey, validHead, validMentions, validReactionNumber, validRemovalNumber, validRingKey, validatePaymentTarget, vapidAuthorization, vapidKeysMatch, varBytes, verify, verifyAppRevocation, verifyAppSignature, verifyAppStatementBytes, verifyAtprotoRecordProof, verifyAtprotoSignature, verifyBip322, verifyBitcoinMessage, verifyChain, verifyCommit, verifyCommitSignature, verifyCommunityChain, verifyCommunityChainPaced, verifyCommunityCommit, verifyDeviceTransports, verifyEnrollProof, verifyGroupCallModeration, verifyGroupCallRequest, verifyGroupMetaSignature, verifyIdentityPresentation, verifyNostrProof, verifyPeerProof, verifyRingAuthorization, verifyRingEvidence, verifySetUpdate, verifySshSignature, videoMetadataPatches, viewerGuardOffset, viewerResponseHeaders, viewerServicePolicy, viewerTag, voiceDownloadName, voiceFileName, voiceLevel, voiceLevelsOf, voicePeaksOf, waitForIceGathering, wakeFrame, wakePayload, wakeRequest, walletNetworkOf, webCryptoSigner, webLocalFetch, wellKnownUrl, wireHubPolicy, wireMentions, wireReaction, wireReply, withRequestOptions, withViewerPolicy, withoutAppLink, withoutAudioMetadata, withoutPictureMetadata, withoutVideoMetadata, wrapDataChannel, wrapGroupMeta, x401AnswerableRequests, x401ApprovalDigest, x401HolderJwk, x401VpToken, yieldThread };
40110
40549
 
40111
40550
  //# sourceMappingURL=core.js.map