@ghostlytools/cli 1.13.1 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/assets/api-DV52o7A8.js +3 -0
- package/dist/assets/{api-Dnq86JAA.js → api-O57SNJcb.js} +375 -77
- package/dist/assets/api-O57SNJcb.js.map +1 -0
- package/dist/assets/{apiKit-nLK4jeTq.js → apiKit-CPTFJHA7.js} +39 -7
- package/dist/assets/{apiKit-nLK4jeTq.js.map → apiKit-CPTFJHA7.js.map} +1 -1
- package/dist/assets/{appFetch-wqBWi3Ry.js → appFetch-Ca9DNQQ2.js} +2 -2
- package/dist/assets/{appFetch-wqBWi3Ry.js.map → appFetch-Ca9DNQQ2.js.map} +1 -1
- package/dist/assets/{apps-DBVhKpfe.js → apps-gXpGFPiv.js} +11 -9
- package/dist/assets/apps-gXpGFPiv.js.map +1 -0
- package/dist/assets/{apps-nLtyhC2f.js → apps-uZTu5FlR.js} +1 -1
- package/dist/assets/{arkade-DryM-q5n.js → arkade-B6UNf5HI.js} +2 -2
- package/dist/assets/{arkade-DryM-q5n.js.map → arkade-B6UNf5HI.js.map} +1 -1
- package/dist/assets/{backup-Bczllmzf.js → backup-CxH3auHB.js} +8 -6
- package/dist/assets/backup-CxH3auHB.js.map +1 -0
- package/dist/assets/{backup-D6s0LQdg.js → backup-Di2U6QVH.js} +1 -1
- package/dist/assets/{bitcoind-DML_-Xbv.js → bitcoind-BpZn3bRN.js} +2 -2
- package/dist/assets/{bitcoind-DML_-Xbv.js.map → bitcoind-BpZn3bRN.js.map} +1 -1
- package/dist/assets/{buttons-B3C3vdhH.js → buttons-D4udKEvT.js} +4 -4
- package/dist/assets/{buttons-B3C3vdhH.js.map → buttons-D4udKEvT.js.map} +1 -1
- package/dist/assets/buttons-YTYEqvGC.js +1 -0
- package/dist/assets/{client-B7jRrSnb.js → client-DGx7E8b3.js} +2 -2
- package/dist/assets/{client-B7jRrSnb.js.map → client-DGx7E8b3.js.map} +1 -1
- package/dist/assets/{engineErrors--9hfgKlK.js → engineErrors-wWlLy54D.js} +11 -3
- package/dist/assets/engineErrors-wWlLy54D.js.map +1 -0
- package/dist/assets/{fixedHosts-H3i6o9Iy.js → fixedHosts-CODN2pTL.js} +3 -3
- package/dist/assets/{fixedHosts-H3i6o9Iy.js.map → fixedHosts-CODN2pTL.js.map} +1 -1
- package/dist/assets/{groupMeta--fxSh792.js → groupMeta-CeZpqVVC.js} +105 -36
- package/dist/assets/groupMeta-CeZpqVVC.js.map +1 -0
- package/dist/assets/{host-CGzVFfMz.js → host-CRA7h5A2.js} +113 -40
- package/dist/assets/host-CRA7h5A2.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-Ce-gWsRY.js → hyperdhtRelay-B34Zhz4P.js} +2 -2
- package/dist/assets/{hyperdhtRelay-Ce-gWsRY.js.map → hyperdhtRelay-B34Zhz4P.js.map} +1 -1
- package/dist/assets/{hyperdhtRelay-B4_wdCtx.js → hyperdhtRelay-DDwU5b4P.js} +2 -2
- package/dist/assets/{hyperdhtRelay-B4_wdCtx.js.map → hyperdhtRelay-DDwU5b4P.js.map} +1 -1
- package/dist/assets/{identityProofs-Cksc_K7_.js → identityProofs-B8zCp5_0.js} +140 -27
- package/dist/assets/identityProofs-B8zCp5_0.js.map +1 -0
- package/dist/assets/{irohWeb-Dp1i8v6n.js → irohWeb-mnOi2Jp7.js} +10832 -4832
- package/dist/assets/irohWeb-mnOi2Jp7.js.map +1 -0
- package/dist/assets/{linkPreview-DdMf-YAc.js → linkPreview-5kHmKUTN.js} +20 -8
- package/dist/assets/linkPreview-5kHmKUTN.js.map +1 -0
- package/dist/assets/{main-C8J53SwH.js → main-Chc871HV.js} +72 -39
- package/dist/assets/main-Chc871HV.js.map +1 -0
- package/dist/assets/{mainline-DY95WbuK.js → mainline-CDUXtV-I.js} +2 -2
- package/dist/assets/{mainline-DY95WbuK.js.map → mainline-CDUXtV-I.js.map} +1 -1
- package/dist/assets/{networkReason-Be-hMghr.js → networkReason-DYlPZS5M.js} +2 -2
- package/dist/assets/{networkReason-Be-hMghr.js.map → networkReason-DYlPZS5M.js.map} +1 -1
- package/dist/assets/{ownDid-oa-T2vmZ.js → ownDid-BOuSlDv-.js} +4 -4
- package/dist/assets/{ownDid-oa-T2vmZ.js.map → ownDid-BOuSlDv-.js.map} +1 -1
- package/dist/assets/{ownStatus-Bc08eNJY.js → ownStatus-CLA1VPkL.js} +3 -3
- package/dist/assets/{ownStatus-Bc08eNJY.js.map → ownStatus-CLA1VPkL.js.map} +1 -1
- package/dist/assets/{pairedTransports-Dppn8lUN.js → pairedTransports-DAzupLYo.js} +21 -15
- package/dist/assets/pairedTransports-DAzupLYo.js.map +1 -0
- package/dist/assets/{paymentIntent-DySU3Ajm.js → paymentIntent-Cr3uZa_0.js} +2 -2
- package/dist/assets/{paymentIntent-DySU3Ajm.js.map → paymentIntent-Cr3uZa_0.js.map} +1 -1
- package/dist/assets/{profiles-B2uy04ph.js → profiles-BH1bH9aE.js} +2 -2
- package/dist/assets/{profiles-B2uy04ph.js.map → profiles-BH1bH9aE.js.map} +1 -1
- package/dist/assets/{registry-bLIfG619.js → registry-DAq16T-V.js} +1 -1
- package/dist/assets/{registry-DbTLLs3y.js → registry-DP_-RA-v.js} +5 -5
- package/dist/assets/{registry-DbTLLs3y.js.map → registry-DP_-RA-v.js.map} +1 -1
- package/dist/assets/{relay-CHWg5hpZ.js → relay-gJTOYQJZ.js} +93 -7
- package/dist/assets/relay-gJTOYQJZ.js.map +1 -0
- package/dist/assets/{resolve-DNX-eecG.js → resolve-B1eQ4dVQ.js} +3 -3
- package/dist/assets/{resolve-DNX-eecG.js.map → resolve-B1eQ4dVQ.js.map} +1 -1
- package/dist/assets/{server-DWJ4RzJn.js → server-Bd2ofxc1.js} +717 -6389
- package/dist/assets/server-Bd2ofxc1.js.map +1 -0
- package/dist/assets/{sshForges-BnvwmNj-.js → sshForges-As7dbGXM.js} +2 -2
- package/dist/assets/{sshForges-BnvwmNj-.js.map → sshForges-As7dbGXM.js.map} +1 -1
- package/dist/assets/{translate-CHj_PdLg.js → translate-DnuQMfj0.js} +10 -4
- package/dist/assets/translate-DnuQMfj0.js.map +1 -0
- package/dist/assets/{usdt-CBJ4Q5Ji.js → usdt-DLmtf8F9.js} +4 -4
- package/dist/assets/{usdt-CBJ4Q5Ji.js.map → usdt-DLmtf8F9.js.map} +1 -1
- package/dist/assets/{waitNotice-Cvz5CiKR.js → waitNotice-BHuMofaH.js} +2 -2
- package/dist/assets/{waitNotice-Cvz5CiKR.js.map → waitNotice-BHuMofaH.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/assets/api-DF36rBJK.js +0 -3
- package/dist/assets/api-Dnq86JAA.js.map +0 -1
- package/dist/assets/apps-DBVhKpfe.js.map +0 -1
- package/dist/assets/backup-Bczllmzf.js.map +0 -1
- package/dist/assets/buttons-DaY5FYlV.js +0 -1
- package/dist/assets/engineErrors--9hfgKlK.js.map +0 -1
- package/dist/assets/groupMeta--fxSh792.js.map +0 -1
- package/dist/assets/host-CGzVFfMz.js.map +0 -1
- package/dist/assets/identityProofs-Cksc_K7_.js.map +0 -1
- package/dist/assets/irohWeb-Dp1i8v6n.js.map +0 -1
- package/dist/assets/linkPreview-DdMf-YAc.js.map +0 -1
- package/dist/assets/main-C8J53SwH.js.map +0 -1
- package/dist/assets/pairedTransports-Dppn8lUN.js.map +0 -1
- package/dist/assets/relay-CHWg5hpZ.js.map +0 -1
- package/dist/assets/server-DWJ4RzJn.js.map +0 -1
- package/dist/assets/translate-CHj_PdLg.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pairedTransports-Dppn8lUN.js","names":[],"sources":["../../../core/src/crypto.ts","../../../core/src/storeForward.ts","../../../core/src/pairedTransports.ts"],"sourcesContent":["import { xsalsa20poly1305 } from \"@noble/ciphers/salsa.js\";\nimport { concatBytes, fromBase64, randomBytes, toBase64, utf8Decode, utf8Encode } from \"./bytes\";\n\nconst NONCE_LENGTH = 24;\nconst KEY_LENGTH = 32;\n\nexport function generateEncryptionKey(): Uint8Array {\n return randomBytes(KEY_LENGTH);\n}\n\n/**\n * NaCl secretbox (XSalsa20-Poly1305). Wire format matches the Rust\n * implementation in `apps/desktop/src/crypto.rs`: base64(nonce || box).\n */\nexport function encrypt(plaintext: string, key: Uint8Array): string {\n if (key.length !== KEY_LENGTH) throw new Error(\"Invalid key length: expected 32 bytes\");\n const nonce = randomBytes(NONCE_LENGTH);\n const box = xsalsa20poly1305(key, nonce).encrypt(utf8Encode(plaintext));\n return toBase64(concatBytes(nonce, box));\n}\n\n/** The length of what `encrypt` returns for a plaintext of this many UTF-8 bytes: base64 of nonce, box and 16-byte tag. */\nexport function sealedLength(plaintextBytes: number): number {\n return 4 * Math.ceil((NONCE_LENGTH + 16 + plaintextBytes) / 3);\n}\n\nexport function decrypt(encoded: string, key: Uint8Array): string {\n if (key.length !== KEY_LENGTH) throw new Error(\"Invalid key length: expected 32 bytes\");\n const combined = fromBase64(encoded);\n if (combined.length < NONCE_LENGTH + 1) throw new Error(\"Invalid ciphertext: too short\");\n const nonce = combined.subarray(0, NONCE_LENGTH);\n const box = combined.subarray(NONCE_LENGTH);\n return utf8Decode(xsalsa20poly1305(key, nonce).decrypt(box));\n}\n\nexport function tryDecrypt(encoded: string, key: Uint8Array): string | null {\n try {\n return decrypt(encoded, key);\n } catch {\n return null;\n }\n}\n","import { ed25519, x25519 } from \"@noble/curves/ed25519.js\";\nimport { xsalsa20poly1305 } from \"@noble/ciphers/salsa.js\";\nimport { hkdf } from \"@noble/hashes/hkdf.js\";\nimport { sha256 } from \"@noble/hashes/sha2.js\";\nimport { concatBytes, fromBase64Url, randomBytes, toBase64Url, utf8Decode, utf8Encode } from \"./bytes\";\nimport { encrypt, tryDecrypt } from \"./crypto\";\nimport { isPublicAddress } from \"./domainProofs\";\nimport { identityFromSeed, identityFromSeedB64, publicKeyFromZ32, sign, verify, type Identity } from \"./identity\";\nimport type { LinkParams } from \"./invite\";\nimport { measureRecords, MAX_DNS_PACKET_BYTES, type GhostRecord, type SignedPacket } from \"./pkarr\";\n\n/**\n * Store-and-forward for an away contact (WISP 404 draft, `hold/1`).\n *\n * What a person sends while the contact is away is sealed into a *bundle* (signed by the sender's\n * participation key, then encrypted to a key only the two of them can derive), put in the sender's\n * own storage (WISP 1000), and named in a *manifest* the storage also holds. A small signed, encrypted\n * *pointer* record on a per-link Pkarr key tells the contact where the manifest is (a URL that expires)\n * and which of the contact's own bundles have been received. Storage and relays see ciphertext, sizes\n * and timing only. Nothing here promises forward secrecy or retention beyond the bounds below.\n */\nexport const HOLD_CAPABILITY = \"hold/1\" as const;\nexport const HOLD_LIMITS = {\n /** One bundle, ciphertext and header included: a picture, not a video. */\n maxBundleBytes: 8 * 1024 * 1024,\n /** All bundles held for one contact at once. */\n maxMailboxBytes: 64 * 1024 * 1024,\n maxMailboxBundles: 64,\n /** A bundle not picked up by then is dropped by its sender. The longest a presigned URL lives, too. */\n ttlMs: 7 * 24 * 60 * 60_000,\n maxTextBytes: 16 * 1024,\n maxPaymentRequestBytes: 64 * 1024,\n maxManifestBytes: 64 * 1024,\n /**\n * How far past one lifetime from now an expiry may reach by the reader's clock: the sender's clock may be ahead, and\n * a day covers any clock that is merely wrong. Nothing else about a pointer or a bundle is held against this clock.\n */\n clockSkewMs: 24 * 60 * 60_000,\n} as const;\n/**\n * How far before its own clock a sender dates its pointer and its manifest, and ends the lifetimes it gives. A reader\n * refuses nothing for those dates: `rev` orders pointers and `seq` orders items, both kept by the reader. Apps up to\n * 1.0.2 refuse a pointer or a manifest dated more than a minute past their clock, and an expiry more than a minute\n * past one lifetime from now, each without a word: the items of a sender whose clock ran two minutes fast were never\n * fetched. Dated back, a sender up to about eleven minutes ahead is read by them.\n */\nexport const HOLD_DATED_BACK_MS = 10 * 60_000;\n\nexport type HoldKind = \"text\" | \"file\" | \"pay-req\" | \"manifest\";\nconst KINDS: readonly string[] = [\"text\", \"file\", \"pay-req\", \"manifest\"];\nconst WIRE_ID = /^[A-Za-z0-9_-]{8,64}$/;\nconst MAILBOX = /^[A-Za-z0-9_-]{22}$/;\nconst SIG = /^[A-Za-z0-9_-]{86}$/;\nconst MAGIC = utf8Encode(\"GHLD\");\nconst VERSION = 1;\nconst NONCE = 24;\n/** A bundle sealed by the chat's ratchet (WISP 4xx § Held items). */\nconst RATCHETED = 2;\ntype HoldItem = { mailbox: string; seq: number; id: string; ts: number; kind: HoldKind; meta?: unknown; expires: number };\n\nexport interface HoldFileMeta { name: string; size: number; mime: string }\n/** One held bundle as the manifest lists it: where to get it, and what to expect. */\nexport type HoldManifestEntry = [seq: number, id: string, kind: Exclude<HoldKind, \"manifest\">, bytes: number, url: string, expires: number];\nexport interface HoldHeader {\n v: 1;\n /** Rendezvous keys, as the sender sees the link. */\n from: string;\n to: string;\n /** Participation keys: who signed, who may open. */\n author: string;\n recipient: string;\n mailbox: string;\n seq: number;\n id: string;\n ts: number;\n kind: HoldKind;\n meta: unknown;\n /** base64url SHA-256 of the body. */\n digest: string;\n expires: number;\n}\nexport interface HoldPointer {\n rev: number;\n issued: number;\n /** When the manifest URL stops working. */\n expires: number;\n manifestUrl: string | null;\n /** Highest sequence the publisher has held for the reader. */\n top: number;\n /** Highest sequence the publisher received from the reader. */\n ack: number;\n count: number;\n bytes: number;\n /** Sequences of the reader's items this publisher refused (changed, oversized, not for it): at most the last 32. */\n refused: number[];\n}\n\n/** Why a bundle, manifest or pointer was refused. Never a reason to trust it a little. */\nexport class HoldRefusedError extends Error {\n /** The bytes the chat's ratchet opened, when it opened them before the item was refused: the caller commits them. */\n ratcheted?: Uint8Array;\n constructor(readonly reason: \"size\" | \"format\" | \"tampered\" | \"not-for-me\" | \"author\" | \"signature\" | \"digest\" | \"limits\" | \"expired\" | \"plain\", message: string) {\n super(message);\n }\n}\n\nconst bodyDigest = (body: Uint8Array) => toBase64Url(sha256(body));\nconst newMailbox = () => toBase64Url(randomBytes(16)).slice(0, 22);\nexport { newMailbox as newHoldMailbox };\n\n/**\n * Everything derived once per link for this feature: my pointer key, the contact's pointer address and\n * the key that seals bundles and pointers between the two participation keys. Needs a pinned contact.\n */\nexport class HoldKeys {\n readonly from: string;\n readonly to: string;\n readonly me: string;\n readonly peer: string;\n /** Publishes my pointer. */\n readonly identity: Identity;\n /** Where the contact publishes its pointer. */\n readonly peerAddress: string;\n private readonly seed: Uint8Array;\n private readonly sealKey: Uint8Array;\n\n constructor(params: LinkParams, participationSeedB64: string, peerKey: string) {\n this.from = identityFromSeedB64(params.seedB64).pubKeyZ32;\n this.to = params.peerPubKeyZ32;\n const mine = identityFromSeedB64(participationSeedB64);\n this.seed = mine.seed;\n this.me = mine.pubKeyZ32;\n this.peer = peerKey;\n const secret = fromBase64Url(params.encKeyB64);\n const context = JSON.stringify([\"ghostly-hold/1\", [this.from, this.to].sort()]);\n const derive = (label: string) => hkdf(sha256, secret, utf8Encode(context), utf8Encode(label), 32);\n this.identity = identityFromSeed(derive(`pointer:${this.from}`));\n this.peerAddress = identityFromSeed(derive(`pointer:${this.to}`)).pubKeyZ32;\n const shared = x25519.getSharedSecret(ed25519.utils.toMontgomerySecret(this.seed), ed25519.utils.toMontgomery(publicKeyFromZ32(peerKey)));\n this.sealKey = hkdf(sha256, shared, derive(\"envelope\"), utf8Encode(\"ghostly-hold-envelope/1\"), 32);\n }\n\n /** Seals one item for the contact: signed with my participation key, encrypted to our shared key. */\n seal(item: HoldItem, body: Uint8Array): Uint8Array {\n const nonce = randomBytes(NONCE);\n const box = xsalsa20poly1305(this.sealKey, nonce).encrypt(this.inner(item, body));\n return concatBytes(MAGIC, new Uint8Array([VERSION]), nonce, box);\n }\n /**\n * The same item as a version-2 bundle (WISP 4xx § Held items): the same plaintext, sealed by the chat's ratchet\n * (`seal`, which saves the ratchet's state before it returns), so the bundle can be uploaded once this returns.\n */\n async sealRatcheted(item: HoldItem, body: Uint8Array, seal: (plaintext: Uint8Array) => Promise<Uint8Array>): Promise<Uint8Array> {\n return concatBytes(MAGIC, new Uint8Array([RATCHETED]), await seal(this.inner(item, body)));\n }\n /** What a bundle seals: the header's length, the signed header, the body. */\n private inner(item: HoldItem, body: Uint8Array): Uint8Array {\n const fields = [VERSION, this.from, this.to, this.me, this.peer, item.mailbox, item.seq, item.id, item.ts, item.kind, item.meta ?? null, bodyDigest(body), item.expires];\n const signature = toBase64Url(sign(utf8Encode(JSON.stringify([\"ghostly-hold-bundle\", fields])), this.seed));\n const header = utf8Encode(JSON.stringify([fields, signature]));\n const length = new Uint8Array(4);\n new DataView(length.buffer).setUint32(0, header.length);\n return concatBytes(length, header, body);\n }\n\n /**\n * Opens a bundle the contact sealed for me. Everything is checked before anything is returned: the\n * authenticated encryption, the header's shape, that it names this link, this contact and me, the\n * signature, the body digest and the limits of its kind. `loopback`: see `isHoldUrl`.\n */\n /**\n * `ratchet`: opens a version-2 bundle's sealed bytes (WISP 4xx), without keeping anything; absent, one is from a newer\n * Ghostly. `refusePlain`: a ratcheted item from this contact opened here, so a version-1 item other than the manifest is\n * refused (WISP 4xx § Downgrade). `ratcheted` in the result: the bytes the ratchet opened, for the caller to commit once\n * the item is stored.\n */\n open(bytes: Uint8Array, expect: { maxBytes?: number; mailbox?: string; now?: number; loopback?: boolean; ratchet?: (sealed: Uint8Array) => Uint8Array | null; refusePlain?: boolean } = {}): { header: HoldHeader; body: Uint8Array; ratcheted?: Uint8Array } {\n const now = expect.now ?? Date.now();\n if (bytes.length > (expect.maxBytes ?? HOLD_LIMITS.maxBundleBytes)) throw new HoldRefusedError(\"size\", \"The held item is larger than allowed\");\n if (bytes.length < MAGIC.length + 1 + 16 + 4 || !MAGIC.every((b, i) => bytes[i] === b)) throw new HoldRefusedError(\"format\", \"Not a held item\");\n const version = bytes[MAGIC.length];\n if (version !== VERSION && (version !== RATCHETED || !expect.ratchet)) throw new HoldRefusedError(\"format\", \"Held item from a newer Ghostly\");\n let plain: Uint8Array | null, ratcheted: Uint8Array | undefined;\n if (version === RATCHETED) {\n ratcheted = bytes.subarray(MAGIC.length + 1);\n try { plain = expect.ratchet!(ratcheted); } catch { plain = null; }\n if (!plain) throw new HoldRefusedError(\"tampered\", \"The held item was changed, is not for this chat, or was opened already\");\n } else {\n if (bytes.length < MAGIC.length + 1 + NONCE + 16 + 4) throw new HoldRefusedError(\"format\", \"Not a held item\");\n try { plain = xsalsa20poly1305(this.sealKey, bytes.subarray(MAGIC.length + 1, MAGIC.length + 1 + NONCE)).decrypt(bytes.subarray(MAGIC.length + 1 + NONCE)); }\n catch { throw new HoldRefusedError(\"tampered\", \"The held item was changed or is not for this chat\"); }\n }\n try { return this.read(plain, ratcheted, expect, now); }\n catch (error) {\n // Opened, then refused: the ratchet's bytes go with the refusal, so the key is used up and the lane heard all the same.\n if (error instanceof HoldRefusedError && ratcheted) error.ratcheted = ratcheted;\n throw error;\n }\n }\n /** The checks of `open` once the bundle is decrypted. */\n private read(plain: Uint8Array, ratcheted: Uint8Array | undefined, expect: { mailbox?: string; loopback?: boolean; refusePlain?: boolean }, now: number): { header: HoldHeader; body: Uint8Array; ratcheted?: Uint8Array } {\n if (plain.length < 4) throw new HoldRefusedError(\"format\", \"Not a held item\");\n const headerLength = new DataView(plain.buffer, plain.byteOffset, 4).getUint32(0);\n if (headerLength > 128 * 1024 || 4 + headerLength > plain.length) throw new HoldRefusedError(\"format\", \"Not a held item\");\n let parsed: unknown;\n try { parsed = JSON.parse(utf8Decode(plain.subarray(4, 4 + headerLength))); } catch { throw new HoldRefusedError(\"format\", \"Not a held item\"); }\n if (!Array.isArray(parsed) || parsed.length !== 2 || !Array.isArray(parsed[0]) || parsed[0].length !== 13 || typeof parsed[1] !== \"string\" || !SIG.test(parsed[1])) throw new HoldRefusedError(\"format\", \"Not a held item\");\n const [fields, signature] = parsed as [unknown[], string];\n const [v, from, to, author, recipient, mailbox, seq, id, ts, kind, meta, digest, expires] = fields;\n if (v !== VERSION || typeof from !== \"string\" || typeof to !== \"string\" || typeof author !== \"string\" || typeof recipient !== \"string\" || typeof mailbox !== \"string\" || !MAILBOX.test(mailbox) ||\n !Number.isSafeInteger(seq) || (seq as number) < 0 || typeof id !== \"string\" || !WIRE_ID.test(id) || !Number.isSafeInteger(ts) || (ts as number) <= 0 ||\n typeof kind !== \"string\" || !KINDS.includes(kind) || typeof digest !== \"string\" || !Number.isSafeInteger(expires)) throw new HoldRefusedError(\"format\", \"Not a held item\");\n // Both directions of this link are sealed with the same key: the header says which one this is.\n if (from !== this.to || to !== this.from || recipient !== this.me) throw new HoldRefusedError(\"not-for-me\", \"The held item is for another chat\");\n if (author !== this.peer) throw new HoldRefusedError(\"author\", \"The held item was not signed by this contact\");\n if (expect.mailbox && mailbox !== expect.mailbox) throw new HoldRefusedError(\"not-for-me\", \"The held item is from another mailbox\");\n let valid: boolean;\n try { valid = verify(fromBase64Url(signature), utf8Encode(JSON.stringify([\"ghostly-hold-bundle\", fields])), publicKeyFromZ32(author)); } catch { valid = false; }\n if (!valid) throw new HoldRefusedError(\"signature\", \"The held item's signature does not check out\");\n const body = plain.subarray(4 + headerLength);\n if (bodyDigest(body) !== digest) throw new HoldRefusedError(\"digest\", \"The held item's content does not match its header\");\n // Its `ts` is its sender's clock, often minutes from this one: nothing is refused for it. It was, past a minute\n // ahead, and for good: the item's sequence was passed, and its sender told \"could not be verified as yours, or was\n // too large\". What stops an item from being taken twice is its sequence (the manifest's, the pointer's `rev`).\n // The item may be older than its upload (a retry, a message written offline); its expiry may not reach past one\n // lifetime from now, give or take what the sender's clock is ahead.\n if ((expires as number) <= (ts as number) || (expires as number) > now + HOLD_LIMITS.ttlMs + HOLD_LIMITS.clockSkewMs) throw new HoldRefusedError(\"limits\", \"The held item's lifetime is out of bounds\");\n const header: HoldHeader = { v: 1, from, to, author, recipient, mailbox, seq: seq as number, id, ts: ts as number, kind: kind as HoldKind, meta, digest, expires: expires as number };\n // The manifest is always sealed as before; anything else from a contact whose items come ratcheted must be ratcheted.\n if (!ratcheted && expect.refusePlain && kind !== \"manifest\") throw new HoldRefusedError(\"plain\", \"The held item was sealed without forward secrecy, which this chat no longer takes\");\n checkKind(header, body, expect.loopback);\n return { header, body, ...(ratcheted && { ratcheted }) };\n }\n\n /** My pointer, as records to publish under `identity`. Throws when it cannot fit a packet. */\n pointerRecords(pointer: HoldPointer, now = Date.now()): GhostRecord[] {\n const body = [VERSION, pointer.rev, pointer.issued, pointer.expires, pointer.manifestUrl, pointer.top, pointer.ack, pointer.count, pointer.bytes, pointer.refused.slice(-32)];\n const signature = toBase64Url(sign(utf8Encode(JSON.stringify([\"ghostly-hold-pointer\", this.from, this.to, body])), this.seed));\n const ttl = Math.min(24 * 3600, Math.max(60, Math.ceil((pointer.expires - now) / 1000)));\n const records = [{ label: \"_hold\", value: encrypt(JSON.stringify([body, signature]), this.sealKey), ttl }];\n if (measureRecords(this.identity.pubKeyZ32, records) > MAX_DNS_PACKET_BYTES) throw new Error(\"The storage address is too long for a DHT packet. Use a shorter endpoint or prefix.\");\n return records;\n }\n\n /**\n * The contact's pointer out of its packet, or null when the packet is not one of its pointers. Its `issued` is the\n * contact's clock and refuses nothing: an older pointer cannot take a newer one's place because of `rev`. The\n * manifest's address is held to what an item's is (`isHoldUrl`): it is fetched as soon as the pointer is read.\n */\n readPointer(packet: SignedPacket, loopback = false): HoldPointer | null {\n if (packet.pubKeyZ32 !== this.peerAddress || measureRecords(packet.pubKeyZ32, packet.records) > MAX_DNS_PACKET_BYTES) return null;\n const records = packet.records.filter(r => r.label === \"_hold\");\n if (records.length !== 1) return null;\n const plain = tryDecrypt(records[0].value, this.sealKey);\n if (!plain) return null;\n let parsed: unknown;\n try { parsed = JSON.parse(plain); } catch { return null; }\n if (!Array.isArray(parsed) || parsed.length !== 2 || !Array.isArray(parsed[0]) || (parsed[0].length !== 9 && parsed[0].length !== 10) || typeof parsed[1] !== \"string\" || !SIG.test(parsed[1])) return null;\n const [body, signature] = parsed as [unknown[], string];\n const [v, rev, issued, expires, manifestUrl, top, ack, count, bytes, refused = []] = body;\n if (v !== VERSION || ![rev, issued, expires, top, ack, count, bytes].every(n => Number.isSafeInteger(n) && (n as number) >= 0) ||\n (manifestUrl !== null && !isHoldUrl(manifestUrl, loopback)) ||\n !Array.isArray(refused) || refused.length > 32 || !refused.every(n => Number.isSafeInteger(n) && (n as number) > 0)) return null;\n try {\n if (!verify(fromBase64Url(signature), utf8Encode(JSON.stringify([\"ghostly-hold-pointer\", this.to, this.from, body])), publicKeyFromZ32(this.peer))) return null;\n } catch { return null; }\n return { rev: rev as number, issued: issued as number, expires: expires as number, manifestUrl: manifestUrl as string | null, top: top as number, ack: ack as number, count: count as number, bytes: bytes as number, refused: refused as number[] };\n }\n}\n\n/** Names only a local network answers (RFC 6762, RFC 8375, ICANN's .internal, and the usual router ones). */\nconst LOCAL_SUFFIXES = [\"localhost\", \"local\", \"internal\", \"lan\", \"home\", \"home.arpa\", \"localdomain\", \"intranet\", \"corp\"];\n\n/**\n * A URL a bundle or manifest may be fetched from. The contact chose it and this device fetches it on its own, so it\n * is HTTPS, without a user or password, at a public name or a public IPv4 address: never this machine or its network.\n * A name with no dot or under a local suffix is a local one. A public name may still resolve to a local address:\n * where the host can resolve, its `fetch` refuses that too (the CLI's, packages/cli/src/runtime/holdFetch.ts, and\n * Desktop's, apps/desktop/src/hold_fetch.rs).\n * `loopback` adds plain HTTP to this machine, for a test against a local server; no shipped app passes it.\n */\nexport function isHoldUrl(value: unknown, loopback = false): value is string {\n if (typeof value !== \"string\" || value.length > 2048) return false;\n let url: URL;\n try { url = new URL(value); } catch { return false; }\n if (url.username || url.password) return false;\n const host = url.hostname.toLowerCase().replace(/\\.+$/, \"\");\n if (loopback && url.protocol === \"http:\" && [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(host)) return true;\n if (url.protocol !== \"https:\" || !host.includes(\".\") || host.startsWith(\"[\") || LOCAL_SUFFIXES.some(s => host === s || host.endsWith(`.${s}`))) return false;\n // A URL's IPv4 host is always written as four decimal numbers, whatever form it was given in.\n return !/^\\d+\\.\\d+\\.\\d+\\.\\d+$/.test(host) || isPublicAddress(Uint8Array.from(host.split(\".\"), Number));\n}\n\n/** The limits of each kind, on the way in. */\nfunction checkKind(header: HoldHeader, body: Uint8Array, loopback = false): void {\n const bad = (message: string) => new HoldRefusedError(\"limits\", message);\n switch (header.kind) {\n case \"text\":\n if (body.length > HOLD_LIMITS.maxTextBytes) throw bad(\"The held text is too long\");\n try { utf8Decode(body); } catch { throw bad(\"The held text is not text\"); }\n return;\n case \"pay-req\":\n if (body.length > HOLD_LIMITS.maxPaymentRequestBytes) throw bad(\"The held payment request is too large\");\n return;\n case \"file\": {\n const meta = header.meta as Partial<HoldFileMeta> | null;\n if (!meta || typeof meta !== \"object\" || typeof meta.name !== \"string\" || meta.name.length > 255 || typeof meta.mime !== \"string\" || meta.mime.length > 255 || meta.size !== body.length) throw bad(\"The held file does not match its description\");\n return;\n }\n case \"manifest\": {\n if (body.length !== 0) throw bad(\"A manifest carries no body\");\n readManifest(header.meta, loopback);\n return;\n }\n }\n}\n\n/** The entries of a manifest, checked: strictly increasing sequences, bounded sizes, fetchable URLs. */\nexport function readManifest(meta: unknown, loopback = false): HoldManifestEntry[] {\n const bad = (message: string) => new HoldRefusedError(\"limits\", message);\n const entries = (meta as { entries?: unknown } | null)?.entries;\n if (!Array.isArray(entries) || entries.length > HOLD_LIMITS.maxMailboxBundles) throw bad(\"The manifest lists too many items\");\n let last = 0, total = 0;\n const out: HoldManifestEntry[] = [];\n for (const entry of entries) {\n if (!Array.isArray(entry) || entry.length !== 6) throw bad(\"The manifest is malformed\");\n const [seq, id, kind, bytes, url, expires] = entry;\n if (!Number.isSafeInteger(seq) || seq <= last || typeof id !== \"string\" || !WIRE_ID.test(id) || typeof kind !== \"string\" || !KINDS.includes(kind) || kind === \"manifest\" ||\n !Number.isSafeInteger(bytes) || bytes < 0 || bytes > HOLD_LIMITS.maxBundleBytes || !isHoldUrl(url, loopback) || !Number.isSafeInteger(expires)) throw bad(\"The manifest is malformed\");\n last = seq; total += bytes;\n if (total > HOLD_LIMITS.maxMailboxBytes) throw bad(\"The manifest lists more than a mailbox may hold\");\n out.push([seq, id, kind as HoldManifestEntry[2], bytes, url, expires]);\n }\n return out;\n}\n","import type { FrameChannel } from \"./frames\";\nimport { isHoldUrl } from \"./storeForward\";\n\nexport const TRANSPORTS = [\"iroh/1\", \"hyperdht/1\", \"webrtc/1\"] as const;\nexport type PairedTransport = typeof TRANSPORTS[number];\nexport type NativeTransport = Exclude<PairedTransport, \"webrtc/1\">;\n\n/** Supplied only by the local adapter after its real cryptographic handshake.\n * Iroh uses a TLS exporter; HyperDHT uses its Noise handshake hash. */\nexport interface NativeBinding {\n transport: NativeTransport;\n context: string;\n identities: [string, string];\n}\nexport interface BoundChannel { channel: FrameChannel; binding: NativeBinding }\nexport interface NativeEndpoint {\n transport: NativeTransport;\n descriptor: unknown;\n connect(descriptor: unknown): Promise<BoundChannel>;\n close(): Promise<void>;\n onConnection: ((connection: BoundChannel) => void) | null;\n onDescriptor: (() => void) | null;\n onUnavailable?: (() => void) | null;\n /** The endpoint is connected to its relay again after it lost it (the native Iroh's home relay; nothing else says it). */\n onRelayBack?: (() => void) | null;\n}\nexport type TransportDescriptors = Partial<Record<NativeTransport, unknown>>;\n\n/**\n * One spelling per Iroh relay. Iroh compares relay URLs as text, and its own relays are named with the trailing dot\n * of a fully qualified name (`https://use1-1.relay.n0.iroh.link./`): the same server written without the dot is\n * another relay to it, and an endpoint dialling a contact there opens a second connection to the server it is already\n * homed on, which the server answers by setting the first one aside.\n *\n * So every relay URL is put in one spelling before it goes into an Iroh endpoint (the relays it homes on, a contact's\n * descriptor before a dial), and which one depends on the endpoint:\n * - `\"dotted\"`, n0's relays with their trailing dot: what native Iroh homes on by default (the Desktop), and the form\n * to compare two relays in. Any other relay keeps its plain name here too: a relay behind a proxy (a Cloudflare\n * tunnel) is found by its Host header, and the proxy answers the dotted name with 404.\n * - `\"plain\"`, the name without it: the only one every browser opens. WebKit (Safari, the iPhone app) refuses a\n * host name that ends in a dot, for `fetch` and for a WebSocket alike, so nothing a browser's Iroh is given has one.\n *\n * An IP address and a single-label name (a search domain may complete it) stay as written; `localhost.` loses its dot\n * in both, the form the relay settings accept. What does not parse comes back untouched, for the caller's own check.\n */\nexport type IrohRelaySpelling = \"dotted\" | \"plain\";\nexport function irohRelayUrl(value: string, spelling: IrohRelaySpelling = \"dotted\"): string {\n let url: URL;\n try { url = new URL(value); } catch { return value; }\n const host = url.hostname, name = host.replace(/\\.$/, \"\");\n if (!name.includes(\".\") && name !== \"localhost\") return value;\n if (name.startsWith(\"[\") || /^\\d+(\\.\\d+){3}$/.test(name)) return value;\n const wanted = spelling === \"dotted\" && /(^|\\.)iroh\\.link$/.test(name) ? `${name}.` : name;\n if (wanted === host) return value;\n url.hostname = wanted;\n return url.href;\n}\n\n/** An Iroh descriptor with its relay in one spelling (`irohRelayUrl`); anything else as it is. */\nexport function irohDescriptor<T>(descriptor: T, spelling: IrohRelaySpelling = \"dotted\"): T {\n const relay = (descriptor as { relay?: unknown } | null | undefined)?.relay;\n if (typeof relay !== \"string\") return descriptor;\n const canonical = irohRelayUrl(relay, spelling);\n return canonical === relay ? descriptor : { ...descriptor, relay: canonical };\n}\n\n/**\n * A relay server's URL, short: https, or wss for a browser's relay; plain http or ws only on this machine's loopback,\n * as a test relay is (the same rule as the relay settings).\n */\nexport const RELAY_URL = /^((https|wss):\\/\\/[^\\s]{1,120}|(http|ws):\\/\\/(127\\.0\\.0\\.1|localhost|\\[::1\\])(:\\d{1,5})?(\\/[^\\s]{0,100})?)$/;\n/**\n * A relay URL with more than its server's address in it: a login, a query or a fragment, which no relay setting takes\n * (irohWeb.ts `irohRelayProblem`, hyperdhtRelay.ts `hyperdhtRelayProblem`). An older app named its HyperDHT relay as\n * set, with them; such a descriptor is not dialed or kept, and the rest of what the contact told still is.\n */\nexport const RELAY_WITH_SECRETS = /^[a-z]+:\\/\\/[^/?#]*@|[?#]/i;\n/** A relay URL a descriptor may name: `RELAY_URL`, with nothing but the server's address in it. */\nexport const relayUrl = (value: unknown): value is string => typeof value === \"string\" && RELAY_URL.test(value) && !RELAY_WITH_SECRETS.test(value);\n/** `RELAY_URL` at any length. */\nconst RELAY_URL_ANY_LENGTH = /^((https|wss):\\/\\/[^\\s]+|(http|ws):\\/\\/(127\\.0\\.0\\.1|localhost|\\[::1\\])(:\\d{1,5})?(\\/[^\\s]*)?)$/;\n/**\n * A relay URL `relayUrl` refuses for its length alone (past 120 characters, a loopback path past 100): a relay setting\n * asks for a shorter one, where \"not a relay address\" sent the person looking for a typo in it.\n */\nexport const relayUrlTooLong = (value: string): boolean => !relayUrl(value) && !RELAY_WITH_SECRETS.test(value) && RELAY_URL_ANY_LENGTH.test(value);\n/**\n * Whether an Iroh endpoint may dial a contact through the relay its descriptor names (none: a direct address alone).\n * The contact chose that relay and this device opens it on its own, again on each redial, so it is held to what a held\n * item's address is (`isHoldUrl`): https at a public name or a public address, never this machine or its network.\n * One of the endpoint's own relays (`own`: the person's settings, a private network's or a test's) is dialled as well,\n * in either spelling: this device opens it anyway.\n */\nexport function dialableIrohRelay(relay: unknown, own: readonly string[]): boolean {\n if (relay === null || relay === undefined) return true;\n if (!relayUrl(relay)) return false;\n const same = (a: string, b: string) => { try { return new URL(irohRelayUrl(a, \"plain\")).href === new URL(irohRelayUrl(b, \"plain\")).href; } catch { return false; } };\n return own.some(mine => same(mine, relay)) || isHoldUrl(relay);\n}\nconst HEX_KEY = /^[0-9a-f]{64}$/;\n/** An Iroh direct address as the adapters parse it: an IPv4 or bracketed IPv6 address and its port. */\nconst SOCKET_ADDRESS = /^(\\d{1,3}(\\.\\d{1,3}){3}|\\[[0-9A-Fa-f:.]{2,45}(%[A-Za-z0-9._-]{1,16})?\\]):\\d{1,5}$/;\nconst MAX_ADDRESSES = 8;\n\n/**\n * A contact's native descriptors as it tells them on a session (`paired-policy`, `paired-adapters`) or as this app\n * kept them: only what the adapters dial, each field in the shape its adapter makes. The keys are 64 hex characters,\n * a relay passes `relayUrl` (the rule its capability record is read by), an Iroh descriptor lists at most eight\n * socket addresses. A descriptor that is anything else is left out, as one the contact never told; a field this app\n * does not know is not kept.\n */\nexport function checkedDescriptors(value: unknown): TransportDescriptors {\n const out: TransportDescriptors = {};\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return out;\n const raw = value as Record<string, unknown>;\n const relayed = (v: unknown) => v === undefined || typeof v === \"boolean\";\n const iroh = raw[\"iroh/1\"] as { id?: unknown; relay?: unknown; addresses?: unknown; relayed?: unknown } | null | undefined;\n if (iroh && typeof iroh === \"object\" && typeof iroh.id === \"string\" && HEX_KEY.test(iroh.id) &&\n (iroh.relay === undefined || iroh.relay === null || relayUrl(iroh.relay)) && relayed(iroh.relayed) &&\n Array.isArray(iroh.addresses) && iroh.addresses.length <= MAX_ADDRESSES &&\n iroh.addresses.every(a => typeof a === \"string\" && SOCKET_ADDRESS.test(a)))\n out[\"iroh/1\"] = { id: iroh.id, relay: (iroh.relay as string | null | undefined) ?? null, addresses: [...iroh.addresses] as string[],\n ...(iroh.relayed !== undefined ? { relayed: iroh.relayed } : {}) };\n const hyper = raw[\"hyperdht/1\"] as { publicKey?: unknown; relay?: unknown; relayed?: unknown } | null | undefined;\n if (hyper && typeof hyper === \"object\" && typeof hyper.publicKey === \"string\" && HEX_KEY.test(hyper.publicKey) &&\n (hyper.relay === undefined || relayUrl(hyper.relay)) && relayed(hyper.relayed))\n out[\"hyperdht/1\"] = { publicKey: hyper.publicKey, ...(hyper.relay !== undefined ? { relay: hyper.relay } : {}),\n ...(hyper.relayed !== undefined ? { relayed: hyper.relayed } : {}) };\n return out;\n}\n\n/**\n * Relay only (WISP 100, \"Relayed\"): the transport reaches this contact only through a relay server, never\n * directly. A descriptor says so with `relayed: true`, and an Iroh descriptor with no direct address is relayed\n * too (a browser's, WISP 102). Either side being relay only makes the whole path relayed. Both sides hold both\n * descriptors after the exchange, so they agree, and the rank stays symmetric.\n */\nexport function relayedTransports(local: TransportDescriptors, remote: TransportDescriptors): NativeTransport[] {\n const relayOnly = (transport: NativeTransport, descriptor: unknown): boolean => {\n if (!descriptor || typeof descriptor !== \"object\") return false;\n const d = descriptor as { relayed?: unknown; addresses?: unknown };\n return d.relayed === true || (transport === \"iroh/1\" && Array.isArray(d.addresses) && d.addresses.length === 0);\n };\n return ([\"iroh/1\", \"hyperdht/1\"] as const).filter(t => relayOnly(t, local[t]) || relayOnly(t, remote[t]));\n}\n\n/** Symmetric rank sum; the fixed order breaks ties deterministically. Neither\n * a remote list nor a preference can add an unavailable local adapter. A\n * relayed transport ranks after every direct one: it is where a failed direct\n * path goes, never ahead of one that works. Iroh through its relay is the\n * exception (WISP 100, revision 2026-11-08): it comes back almost at once after\n * the app was away, and a browser's Iroh is never anything else. */\nexport function rankTransports(local: readonly string[], remote: readonly string[], relayed: readonly string[] = []): PairedTransport[] {\n const penalty = (t: PairedTransport) => t !== \"iroh/1\" && relayed.includes(t) ? 1 : 0;\n return TRANSPORTS.filter(t => local.includes(t) && remote.includes(t))\n .sort((a, b) => penalty(a) - penalty(b)\n || (local.indexOf(a) + remote.indexOf(a)) - (local.indexOf(b) + remote.indexOf(b))\n || TRANSPORTS.indexOf(a) - TRANSPORTS.indexOf(b));\n}\n\n/**\n * What a chat prefers when nobody chose (Automatic): Iroh where the app has it, then WebRTC, then HyperDHT (WISP 100,\n * revision 2026-11-08). Every app puts Iroh first, so the rank sum of two apps that both run it puts it first on both\n * sides. With nothing at all, WebRTC, which the offer then leaves out.\n * With Fallback off the chat may use only that one transport, and nothing moves it off a relayed Iroh then: WebRTC\n * where the app has it, else the first transport it has (a Linux Desktop: WebKitGTK has no WebRTC), as before.\n */\nexport const AUTOMATIC_ORDER: readonly PairedTransport[] = [\"iroh/1\", \"webrtc/1\", \"hyperdht/1\"];\nexport function automaticTransport(available: readonly PairedTransport[], fallback = true): PairedTransport {\n if (!fallback) return available.includes(\"webrtc/1\") ? \"webrtc/1\" : TRANSPORTS.find(t => available.includes(t)) ?? \"webrtc/1\";\n return AUTOMATIC_ORDER.find(t => available.includes(t)) ?? \"webrtc/1\";\n}\n\nexport function transportOrder(available: readonly PairedTransport[], preferred: PairedTransport,\n fallback: boolean): PairedTransport[] {\n const rest = TRANSPORTS.filter(t => available.includes(t) && t !== preferred);\n return [...(available.includes(preferred) ? [preferred] : []), ...(fallback ? rest : [])];\n}\n"],"mappings":";;;;;;;;AAGA,IAAM,eAAe;AACrB,IAAM,aAAa;AAEnB,SAAgB,wBAAoC;CAClD,OAAO,YAAY,UAAU;AAC/B;;;;;AAMA,SAAgB,QAAQ,WAAmB,KAAyB;CAClE,IAAI,IAAI,WAAW,YAAY,MAAM,IAAI,MAAM,uCAAuC;CACtF,MAAM,QAAQ,YAAY,YAAY;CACtC,MAAM,MAAM,iBAAiB,KAAK,KAAK,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC;CACtE,OAAO,SAAS,YAAY,OAAO,GAAG,CAAC;AACzC;;AAGA,SAAgB,aAAa,gBAAgC;CAC3D,OAAO,IAAI,KAAK,MAAM,KAAoB,kBAAkB,CAAC;AAC/D;AAEA,SAAgB,QAAQ,SAAiB,KAAyB;CAChE,IAAI,IAAI,WAAW,YAAY,MAAM,IAAI,MAAM,uCAAuC;CACtF,MAAM,WAAW,WAAW,OAAO;CACnC,IAAI,SAAS,SAAS,IAAkB,MAAM,IAAI,MAAM,+BAA+B;CACvF,MAAM,QAAQ,SAAS,SAAS,GAAG,YAAY;CAC/C,MAAM,MAAM,SAAS,SAAS,YAAY;CAC1C,OAAO,WAAW,iBAAiB,KAAK,KAAK,CAAC,CAAC,QAAQ,GAAG,CAAC;AAC7D;AAEA,SAAgB,WAAW,SAAiB,KAAgC;CAC1E,IAAI;EACF,OAAO,QAAQ,SAAS,GAAG;CAC7B,QAAQ;EACN,OAAO;CACT;AACF;;;;;;;;;;;;ACpBA,IAAa,kBAAkB;AAC/B,IAAa,cAAc;;CAEzB,gBAAgB;;CAEhB,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