@ghostlytools/cli 1.13.0 → 1.13.1
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 +7 -6
- package/dist/assets/{api-CVtg7MpI.js → api-DF36rBJK.js} +2 -2
- package/dist/assets/{api-CjOaoG-v.js → api-Dnq86JAA.js} +135 -37
- package/dist/assets/api-Dnq86JAA.js.map +1 -0
- package/dist/assets/{apiKit-BAGvlQtm.js → apiKit-nLK4jeTq.js} +3 -3
- package/dist/assets/{apiKit-BAGvlQtm.js.map → apiKit-nLK4jeTq.js.map} +1 -1
- package/dist/assets/{appFetch-BwJd-kNq.js → appFetch-wqBWi3Ry.js} +2 -2
- package/dist/assets/{appFetch-BwJd-kNq.js.map → appFetch-wqBWi3Ry.js.map} +1 -1
- package/dist/assets/{apps-Cuk45sz5.js → apps-DBVhKpfe.js} +10 -10
- package/dist/assets/apps-DBVhKpfe.js.map +1 -0
- package/dist/assets/{apps-DjY095Af.js → apps-nLtyhC2f.js} +1 -1
- package/dist/assets/{backup-DekVCDWv.js → backup-Bczllmzf.js} +4 -4
- package/dist/assets/{backup-DekVCDWv.js.map → backup-Bczllmzf.js.map} +1 -1
- package/dist/assets/{backup-B56sQqoQ.js → backup-D6s0LQdg.js} +1 -1
- package/dist/assets/bark_ffi_wasm_bg-CcafsJla.js.map +1 -1
- package/dist/assets/{bitcoind-B2bbVSzh.js → bitcoind-DML_-Xbv.js} +2 -2
- package/dist/assets/{bitcoind-B2bbVSzh.js.map → bitcoind-DML_-Xbv.js.map} +1 -1
- package/dist/assets/bitcoindevkit_bg-BWQHx7vd.js.map +1 -1
- package/dist/assets/{buttons-BGxzOtrq.js → buttons-B3C3vdhH.js} +8 -8
- package/dist/assets/buttons-B3C3vdhH.js.map +1 -0
- package/dist/assets/buttons-DaY5FYlV.js +1 -0
- package/dist/assets/{client-DcQAfc3h.js → client-B7jRrSnb.js} +3 -3
- package/dist/assets/{client-DcQAfc3h.js.map → client-B7jRrSnb.js.map} +1 -1
- package/dist/assets/{domainProofs-BDNP1dIy.js → domainProofs-b3Y1Gj9g.js} +6 -2
- package/dist/assets/{domainProofs-BDNP1dIy.js.map → domainProofs-b3Y1Gj9g.js.map} +1 -1
- package/dist/assets/{errors-DDLFO4Gf.js → errors-JVJsO8Iu.js} +18 -2
- package/dist/assets/errors-JVJsO8Iu.js.map +1 -0
- package/dist/assets/{fixedHosts-C3hBliM9.js → fixedHosts-H3i6o9Iy.js} +2 -2
- package/dist/assets/{fixedHosts-C3hBliM9.js.map → fixedHosts-H3i6o9Iy.js.map} +1 -1
- package/dist/assets/{ghostly_iroh_web-DIj5xGmR.js → ghostly_iroh_web-9VOwZcJQ.js} +30 -35
- package/dist/assets/ghostly_iroh_web-9VOwZcJQ.js.map +1 -0
- package/dist/assets/ghostly_iroh_web_bg.wasm +0 -0
- package/dist/assets/{groupMeta-goASqzOt.js → groupMeta--fxSh792.js} +72 -4
- package/dist/assets/groupMeta--fxSh792.js.map +1 -0
- package/dist/assets/{host-C2WRKj3g.js → host-CGzVFfMz.js} +169 -36
- package/dist/assets/host-CGzVFfMz.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-bjNGacf5.js → hyperdhtRelay-B4_wdCtx.js} +2 -2
- package/dist/assets/{hyperdhtRelay-bjNGacf5.js.map → hyperdhtRelay-B4_wdCtx.js.map} +1 -1
- package/dist/assets/{hyperdhtRelay-DLUiwfnt.js → hyperdhtRelay-Ce-gWsRY.js} +2 -2
- package/dist/assets/{hyperdhtRelay-DLUiwfnt.js.map → hyperdhtRelay-Ce-gWsRY.js.map} +1 -1
- package/dist/assets/{irohWeb-NfthOL98.js → irohWeb-Dp1i8v6n.js} +12 -11
- package/dist/assets/irohWeb-Dp1i8v6n.js.map +1 -0
- package/dist/assets/{main-Dh7fePd8.js → main-C8J53SwH.js} +67 -62
- package/dist/assets/main-C8J53SwH.js.map +1 -0
- package/dist/assets/{ownDid-BErplN7N.js → ownDid-oa-T2vmZ.js} +8 -4
- package/dist/assets/ownDid-oa-T2vmZ.js.map +1 -0
- package/dist/assets/{ownStatus-ClrFjd7h.js → ownStatus-Bc08eNJY.js} +6 -6
- package/dist/assets/{ownStatus-ClrFjd7h.js.map → ownStatus-Bc08eNJY.js.map} +1 -1
- package/dist/assets/{pairedTransports-BKmvlKz1.js → pairedTransports-Dppn8lUN.js} +3 -3
- package/dist/assets/pairedTransports-Dppn8lUN.js.map +1 -0
- package/dist/assets/{profiles-B8xO8-oj.js → profiles-B2uy04ph.js} +3 -3
- package/dist/assets/{profiles-B8xO8-oj.js.map → profiles-B2uy04ph.js.map} +1 -1
- package/dist/assets/{registry-CU8PevhI.js → registry-DbTLLs3y.js} +9 -5
- package/dist/assets/registry-DbTLLs3y.js.map +1 -0
- package/dist/assets/{registry--Rg2YvOH.js → registry-bLIfG619.js} +1 -1
- package/dist/assets/{resolve-B1upovPM.js → resolve-DNX-eecG.js} +9 -4
- package/dist/assets/resolve-DNX-eecG.js.map +1 -0
- package/dist/assets/secretGuard-Bh11MPdI.js +1 -0
- package/dist/assets/{secretGuard-BrATm_gl.js → secretGuard-oz_3hBfW.js} +19 -2
- package/dist/assets/{secretGuard-BrATm_gl.js.map → secretGuard-oz_3hBfW.js.map} +1 -1
- package/dist/assets/{server-Dgxx_DaN.js → server-DWJ4RzJn.js} +536 -209
- package/dist/assets/server-DWJ4RzJn.js.map +1 -0
- package/dist/assets/{translate-BcbSWkuq.js → translate-CHj_PdLg.js} +13 -8
- package/dist/assets/translate-CHj_PdLg.js.map +1 -0
- package/dist/assets/{waitNotice-ylU3XwjO.js → waitNotice-Cvz5CiKR.js} +57 -3
- package/dist/assets/waitNotice-Cvz5CiKR.js.map +1 -0
- package/dist/ghostly.mjs +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/assets/api-CjOaoG-v.js.map +0 -1
- package/dist/assets/apps-Cuk45sz5.js.map +0 -1
- package/dist/assets/buttons-BGxzOtrq.js.map +0 -1
- package/dist/assets/buttons-CsN2WJOf.js +0 -1
- package/dist/assets/errors-DDLFO4Gf.js.map +0 -1
- package/dist/assets/ghostly_iroh_web-DIj5xGmR.js.map +0 -1
- package/dist/assets/groupMeta-goASqzOt.js.map +0 -1
- package/dist/assets/host-C2WRKj3g.js.map +0 -1
- package/dist/assets/irohWeb-NfthOL98.js.map +0 -1
- package/dist/assets/main-Dh7fePd8.js.map +0 -1
- package/dist/assets/ownDid-BErplN7N.js.map +0 -1
- package/dist/assets/pairedTransports-BKmvlKz1.js.map +0 -1
- package/dist/assets/registry-CU8PevhI.js.map +0 -1
- package/dist/assets/resolve-B1upovPM.js.map +0 -1
- package/dist/assets/secretGuard-Bm6nci0I.js +0 -1
- package/dist/assets/server-Dgxx_DaN.js.map +0 -1
- package/dist/assets/translate-BcbSWkuq.js.map +0 -1
- package/dist/assets/waitNotice-ylU3XwjO.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domainProofs-BDNP1dIy.js","names":[],"sources":["../../../core/src/domainProofs.ts"],"sourcesContent":["import { concatBytes, fromZ32, toZ32, utf8Decode, utf8Encode } from './bytes';\n\n/**\n * Domain identity proofs (draft WISP 304, docs/wisps/304-domain.md), the pure half.\n *\n * Under WISP 300 a proof authorizes a fresh Ed25519 *proof key* that only this\n * profile holds, through a statement the external identity vouches for. A\n * domain vouches by publishing: a DNS TXT record at `_ghostly.<domain>` or a\n * `/.well-known/ghostly.json` file names the proof key **and the statement id**\n * (SHA-256 of the statement), so the record commits to the exact binding —\n * subject, key, dates and nonce — not just to a key. Sharing with a contact is\n * then the contract's per-contact presentation, signed by the proof key.\n *\n * People who already run NIP-05 can use `/.well-known/nostr.json` instead: its\n * root name `_` must be the very Nostr key that signed the statement.\n *\n * The record names no participation key and no contact. Fetching, DNS over\n * HTTPS and caching live in `@ghostly/browser/proofs/domain`.\n */\n\nexport type DomainMethod = 'dns' | 'https' | 'nip05';\n/** What a record says: this Ghostly proof key, for this statement. */\nexport interface DomainRecord { key: string; proof: string }\n\nexport const DOMAIN_METHODS: readonly DomainMethod[] = ['dns', 'https', 'nip05'];\nexport const DNS_LABEL = '_ghostly';\nexport const WELL_KNOWN_PATH = '/.well-known/ghostly.json';\nexport const NIP05_PATH = '/.well-known/nostr.json?name=_';\n/** Everything read from a domain is bounded; these match the fetch limits. */\nexport const DOMAIN_FILE_MAX_BYTES = 16 * 1024;\nexport const DOMAIN_TXT_MAX_BYTES = 1024;\nexport const DOMAIN_MAX_RECORDS = 8;\n\nconst z32 = /^[ybndrfg8ejkmcpqxot1uwisza345h769]{52}$/;\nconst hex64 = /^[a-f0-9]{64}$/;\n\n// ---------------------------------------------------------------------------\n// Domain names\n\n/** Names that never resolve publicly (RFC 6761, 6762, 7686, 8375, 9476) or that\n * only ever mean a private network. A proof for them could only point inward. */\nconst SPECIAL_USE = ['localhost', 'local', 'internal', 'lan', 'home', 'corp', 'intranet', 'private',\n 'test', 'example', 'invalid', 'onion', 'alt', 'arpa'];\n\n/**\n * Normalizes what a person typed (\"Example.COM.\", \"https://example.com/\") into\n * a lowercase ASCII host name, or throws with a message fit for the UI.\n * Internationalized names become punycode (xn--), the form DNS carries.\n */\nexport function normalizeDomain(input: string): string {\n if (typeof input !== 'string') throw new Error('Enter a domain name, like example.com');\n let value = input.trim();\n if (!value || value.length > 300) throw new Error('Enter a domain name, like example.com');\n if (/^[a-z][a-z0-9+.-]*:\\/\\//i.test(value)) {\n let url: URL;\n try { url = new URL(value); } catch { throw new Error('Enter a domain name, like example.com'); }\n if (url.protocol !== 'https:' || url.username || url.password || url.port || (url.pathname !== '/' && url.pathname !== '') || url.search || url.hash)\n throw new Error('Enter only the domain name, without a path or port');\n value = url.hostname;\n } else {\n if (/[/:@?#\\s\\\\]/.test(value)) throw new Error('Enter only the domain name, without a path or port');\n try { value = new URL(`https://${value}`).hostname; } catch { throw new Error('That is not a valid domain name'); }\n }\n value = value.toLowerCase().replace(/\\.$/, '');\n if (value.length > 253 - DNS_LABEL.length - 1) throw new Error('That domain name is too long');\n const labels = value.split('.');\n if (labels.length < 2) throw new Error('Use a full domain name, like example.com');\n for (const label of labels) {\n if (!/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/.test(label)) throw new Error('That is not a valid domain name');\n }\n const tld = labels[labels.length - 1];\n if (/^[0-9]+$/.test(tld) || /^\\[/.test(value)) throw new Error('Use a domain name, not an IP address');\n if (SPECIAL_USE.includes(tld) || (labels.length >= 2 && labels.slice(-2).join('.') === 'home.arpa'))\n throw new Error('That name only works on private networks');\n return value;\n}\n\nexport const dnsProofName = (domain: string) => `${DNS_LABEL}.${normalizeDomain(domain)}`;\nexport const wellKnownUrl = (domain: string, method: 'https' | 'nip05' = 'https') =>\n `https://${normalizeDomain(domain)}${method === 'nip05' ? NIP05_PATH : WELL_KNOWN_PATH}`;\n\n// ---------------------------------------------------------------------------\n// Records\n\nexport function validDomainRecord(r: DomainRecord): boolean {\n if (!r || typeof r.key !== 'string' || typeof r.proof !== 'string' || !z32.test(r.key) || !hex64.test(r.proof)) return false;\n try { return toZ32(fromZ32(r.key)) === r.key; } catch { return false; }\n}\n\n/** The TXT record value, in the `tag=value; …` style people know from DKIM. */\nexport function domainTxtRecord(r: DomainRecord): string {\n if (!validDomainRecord(r)) throw new Error('Invalid domain record');\n return `v=ghostly1; key=${r.key}; proof=${r.proof}`;\n}\n\n/** Parses one TXT string. Undefined for anything that is not ours or not exactly\n * well-formed; unknown extra tags are ignored for forward compatibility. */\nexport function parseDomainTxt(value: string): DomainRecord | undefined {\n if (typeof value !== 'string' || utf8Encode(value).length > DOMAIN_TXT_MAX_BYTES) return;\n const tags = new Map<string, string>();\n const parts = value.split(';').map(p => p.trim()).filter(Boolean);\n for (const part of parts) {\n const eq = part.indexOf('=');\n if (eq < 1) return;\n const name = part.slice(0, eq).trim().toLowerCase();\n if (tags.has(name)) return;\n tags.set(name, part.slice(eq + 1).trim());\n }\n if (!parts[0]?.toLowerCase().startsWith('v=') || tags.get('v') !== 'ghostly1') return;\n const r = { key: tags.get('key'), proof: tags.get('proof') } as DomainRecord;\n return validDomainRecord(r) ? r : undefined;\n}\n\nconst addRecord = (list: DomainRecord[], r: DomainRecord) => {\n if (!list.some(x => x.key === r.key && x.proof === r.proof)) list.push(r);\n};\n\n/** All records among the first 32 TXT strings of `_ghostly.<domain>`; other strings are skipped. A TXT set has\n * no order, so every record is kept: the one a proof needs may come in any position. */\nexport function recordsFromTxt(values: string[]): DomainRecord[] {\n const out: DomainRecord[] = [];\n for (const value of values.slice(0, 32)) { const r = parseDomainTxt(value); if (r) addRecord(out, r); }\n return out;\n}\n\n/** The body of `/.well-known/ghostly.json`. */\nexport function domainWellKnownFile(records: DomainRecord[]): string {\n if (!records.length || records.length > DOMAIN_MAX_RECORDS || !records.every(validDomainRecord)) throw new Error('Invalid domain records');\n return JSON.stringify({ ghostly: 1, proofs: records.map(r => ({ key: r.key, proof: r.proof })) }, null, 2) + '\\n';\n}\n\nfunction parseJson(text: string): unknown {\n if (typeof text !== 'string' || utf8Encode(text).length > DOMAIN_FILE_MAX_BYTES) throw new Error('File too large');\n return JSON.parse(text);\n}\n\n/** Records from the first 32 entries of `ghostly.json`. Throws on a malformed file; [] when it names none. */\nexport function recordsFromWellKnown(text: string): DomainRecord[] {\n const body = parseJson(text) as { ghostly?: unknown; proofs?: unknown };\n if (!body || typeof body !== 'object' || Array.isArray(body) || body.ghostly !== 1 || !Array.isArray(body.proofs))\n throw new Error('Not a Ghostly domain file');\n const out: DomainRecord[] = [];\n for (const entry of body.proofs.slice(0, 32) as { key?: unknown; proof?: unknown }[]) {\n if (!entry || typeof entry !== 'object') continue;\n const r = { key: entry.key, proof: entry.proof } as DomainRecord;\n if (validDomainRecord(r)) addRecord(out, r);\n }\n return out;\n}\n\n/** NIP-05: only the root name `_` speaks for the domain itself. Undefined when absent. */\nexport function nip05RootKey(text: string): string | undefined {\n const body = parseJson(text) as { names?: unknown };\n if (!body || typeof body !== 'object' || !body.names || typeof body.names !== 'object' || Array.isArray(body.names))\n throw new Error('Not a NIP-05 file');\n const root = (body.names as Record<string, unknown>)['_'];\n return typeof root === 'string' && hex64.test(root) ? root : undefined;\n}\n\nexport const recordsName = (records: DomainRecord[], r: DomainRecord) => records.some(x => x.key === r.key && x.proof === r.proof);\n\n// ---------------------------------------------------------------------------\n// DNS over HTTPS (RFC 8484) wire messages\n\nexport const DNS_TYPE = { A: 1, CNAME: 5, TXT: 16, AAAA: 28 } as const;\nexport type DnsType = keyof typeof DNS_TYPE;\nexport interface DnsAnswer { name: string; type: number; ttl: number; data: Uint8Array }\nexport interface DnsResponse {\n /** 0 = NOERROR, 3 = NXDOMAIN; anything else is a failed lookup. */\n rcode: number;\n /** The resolver reports it validated the answer with DNSSEC. */\n authenticated: boolean;\n answers: DnsAnswer[];\n}\n\n/**\n * EDNS0 OPT record (RFC 6891) with one Client Subnet option of source prefix 0 (RFC 7871 §7.1.2): a resolver must\n * not add this device's subnet to its queries to the name's servers, as Google Public DNS otherwise does.\n */\nconst NO_CLIENT_SUBNET = Uint8Array.of(0, 0, 41, 1232 >> 8, 1232 & 0xff, 0, 0, 0, 0, 0, 8, 0, 8, 0, 4, 0, 1, 0, 0);\n\n/** A recursive query for one name and type. ID 0, as RFC 8484 recommends for caching;\n * the AD bit asks the resolver to report DNSSEC validation (RFC 6840 §5.7). */\nexport function encodeDnsQuery(name: string, type: DnsType): Uint8Array {\n const labels = name.replace(/\\.$/, '').split('.');\n const parts: Uint8Array[] = [Uint8Array.of(0, 0, 0x01, 0x20, 0, 1, 0, 0, 0, 0, 0, 1)];\n for (const label of labels) {\n const bytes = utf8Encode(label);\n if (!bytes.length || bytes.length > 63) throw new Error('Invalid DNS name');\n parts.push(Uint8Array.of(bytes.length), bytes);\n }\n const code = DNS_TYPE[type];\n parts.push(Uint8Array.of(0, code >> 8, code & 0xff, 0, 1), NO_CLIENT_SUBNET);\n return concatBytes(...parts);\n}\n\nfunction readName(data: Uint8Array, start: number): { name: string; next: number } {\n const labels: string[] = [];\n let pos = start, next = -1, jumps = 0, length = 0;\n for (;;) {\n if (pos >= data.length) throw new Error('DNS name out of bounds');\n const len = data[pos];\n if ((len & 0xc0) === 0xc0) {\n if (pos + 1 >= data.length) throw new Error('DNS pointer out of bounds');\n if (next < 0) next = pos + 2;\n pos = ((len & 0x3f) << 8) | data[pos + 1];\n if (++jumps > 32) throw new Error('DNS name loops');\n continue;\n }\n if (len & 0xc0) throw new Error('Unsupported DNS label');\n pos += 1;\n if (len === 0) break;\n if (pos + len > data.length) throw new Error('DNS label out of bounds');\n length += len + 1;\n if (length > 255) throw new Error('DNS name too long');\n labels.push(utf8Decode(data.subarray(pos, pos + len)).toLowerCase());\n pos += len;\n }\n return { name: labels.join('.'), next: next < 0 ? pos : next };\n}\n\n/**\n * Decodes a resolver's answer to `encodeDnsQuery(name, type)`. Refuses a reply\n * to another question or a truncated one, and keeps only records of the asked\n * type owned by the name or by the CNAME chain the answer itself follows.\n */\nexport function decodeDnsResponse(data: Uint8Array, name: string, type: DnsType): DnsResponse {\n if (data.length < 12) throw new Error('DNS response too short');\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n const flags = view.getUint16(2);\n if (!(flags & 0x8000) || (flags & 0x7800) || (flags & 0x0200)) throw new Error('Unusable DNS response');\n const questions = view.getUint16(4), count = view.getUint16(6);\n const want = name.replace(/\\.$/, '').toLowerCase(), code = DNS_TYPE[type];\n if (questions !== 1) throw new Error('DNS response is for another question');\n const q = readName(data, 12);\n if (q.name !== want || q.next + 4 > data.length || view.getUint16(q.next) !== code) throw new Error('DNS response is for another question');\n let pos = q.next + 4;\n const all: DnsAnswer[] = [];\n for (let i = 0; i < count && i < 64; i++) {\n const owner = readName(data, pos);\n pos = owner.next;\n if (pos + 10 > data.length) throw new Error('DNS record out of bounds');\n const rtype = view.getUint16(pos), ttl = view.getUint32(pos + 4), len = view.getUint16(pos + 8);\n pos += 10;\n if (pos + len > data.length) throw new Error('DNS record out of bounds');\n const rdata = rtype === DNS_TYPE.CNAME ? utf8Encode(readName(data, pos).name) : data.slice(pos, pos + len);\n all.push({ name: owner.name, type: rtype, ttl, data: rdata });\n pos += len;\n }\n const owners = new Set([want]);\n for (let hop = 0; hop < 8; hop++) {\n const cname = all.find(a => a.type === DNS_TYPE.CNAME && owners.has(a.name) && !owners.has(utf8Decode(a.data)));\n if (!cname) break;\n owners.add(utf8Decode(cname.data));\n }\n return { rcode: flags & 0x000f, authenticated: !!(flags & 0x0020), answers: all.filter(a => a.type === code && owners.has(a.name)) };\n}\n\n/** The TXT character-strings of one record, joined as RFC 7208 §3.3 does. */\nexport function txtValue(rdata: Uint8Array): string {\n const parts: Uint8Array[] = [];\n for (let p = 0; p < rdata.length;) {\n const len = rdata[p];\n if (p + 1 + len > rdata.length) throw new Error('DNS text out of bounds');\n parts.push(rdata.subarray(p + 1, p + 1 + len));\n p += 1 + len;\n }\n return new TextDecoder('utf-8', { fatal: true }).decode(concatBytes(...parts));\n}\n\n// ---------------------------------------------------------------------------\n// Addresses: a proof may only make a contact's app fetch from the public Internet\n\n/** False for loopback, private, link-local, shared (CGNAT), multicast, reserved\n * and unspecified addresses, including IPv4 embedded in IPv6. */\nexport function isPublicAddress(address: Uint8Array): boolean {\n if (address.length === 4) {\n const [a, b, c] = address;\n return !(a === 0 || a === 10 || a === 127 || a >= 224 ||\n (a === 100 && b >= 64 && b <= 127) || (a === 169 && b === 254) || (a === 172 && b >= 16 && b <= 31) ||\n (a === 192 && b === 168) || (a === 192 && b === 0 && c === 0) || (a === 198 && (b === 18 || b === 19)));\n }\n if (address.length !== 16) return false;\n const zeroTo = (n: number) => address.subarray(0, n).every(x => x === 0);\n if (zeroTo(15) && (address[15] === 0 || address[15] === 1)) return false; // :: and ::1\n if (zeroTo(10) && address[10] === 0xff && address[11] === 0xff) return isPublicAddress(address.subarray(12)); // ::ffff:a.b.c.d\n if (address[0] === 0x00 && address[1] === 0x64 && address[2] === 0xff && address[3] === 0x9b && address.subarray(4, 12).every(x => x === 0))\n return isPublicAddress(address.subarray(12)); // 64:ff9b::/96 NAT64\n if (zeroTo(12)) return false; // deprecated IPv4-compatible\n if ((address[0] & 0xfe) === 0xfc) return false; // fc00::/7 unique local\n if (address[0] === 0xfe && (address[1] & 0xc0) === 0x80) return false; // fe80::/10 link-local\n if (address[0] === 0xfe && (address[1] & 0xc0) === 0xc0) return false; // fec0::/10 site-local\n if (address[0] === 0xff) return false; // multicast\n if (address[0] === 0x01 && address.subarray(1, 8).every(x => x === 0)) return false; // 100::/64 discard\n return (address[0] & 0xe0) === 0x20; // only 2000::/3 is global unicast\n}\n"],"mappings":";;AAyBA,IAAa,YAAY;AACzB,IAAa,kBAAkB;AAC/B,IAAa,aAAa;;AAE1B,IAAa,wBAAwB;AAIrC,IAAM,MAAM;AACZ,IAAM,QAAQ;;;AAOd,IAAM,cAAc;CAAC;CAAa;CAAS;CAAY;CAAO;CAAQ;CAAQ;CAAY;CACxF;CAAQ;CAAW;CAAW;CAAS;CAAO;AAAM;;;;;;AAOtD,SAAgB,gBAAgB,OAAuB;CACrD,IAAI,OAAO,UAAU,UAAU,MAAM,IAAI,MAAM,uCAAuC;CACtF,IAAI,QAAQ,MAAM,KAAK;CACvB,IAAI,CAAC,SAAS,MAAM,SAAS,KAAK,MAAM,IAAI,MAAM,uCAAuC;CACzF,IAAI,2BAA2B,KAAK,KAAK,GAAG;EAC1C,IAAI;EACJ,IAAI;GAAE,MAAM,IAAI,IAAI,KAAK;EAAG,QAAQ;GAAE,MAAM,IAAI,MAAM,uCAAuC;EAAG;EAChG,IAAI,IAAI,aAAa,YAAY,IAAI,YAAY,IAAI,YAAY,IAAI,QAAS,IAAI,aAAa,OAAO,IAAI,aAAa,MAAO,IAAI,UAAU,IAAI,MAC9I,MAAM,IAAI,MAAM,oDAAoD;EACtE,QAAQ,IAAI;CACd,OAAO;EACL,IAAI,cAAc,KAAK,KAAK,GAAG,MAAM,IAAI,MAAM,oDAAoD;EACnG,IAAI;GAAE,QAAQ,IAAI,IAAI,WAAW,OA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Q,QAAQ,SAAS,GAAG,CAAC,CAAC,CAAC,OAAM,MAAK,MAAM,CAAC,GAAG,OAAO;CAC9E,QAAQ,QAAQ,KAAK,SAAU;AACjC"}
|
|
1
|
+
{"version":3,"file":"domainProofs-b3Y1Gj9g.js","names":[],"sources":["../../../core/src/domainProofs.ts"],"sourcesContent":["import { concatBytes, fromZ32, toZ32, utf8Decode, utf8Encode } from './bytes';\n\n/**\n * Domain identity proofs (draft WISP 304, docs/wisps/304-domain.md), the pure half.\n *\n * Under WISP 300 a proof authorizes a fresh Ed25519 *proof key* that only this\n * profile holds, through a statement the external identity vouches for. A\n * domain vouches by publishing: a DNS TXT record at `_ghostly.<domain>` or a\n * `/.well-known/ghostly.json` file names the proof key **and the statement id**\n * (SHA-256 of the statement), so the record commits to the exact binding —\n * subject, key, dates and nonce — not just to a key. Sharing with a contact is\n * then the contract's per-contact presentation, signed by the proof key.\n *\n * People who already run NIP-05 can use `/.well-known/nostr.json` instead: its\n * root name `_` must be the very Nostr key that signed the statement.\n *\n * The record names no participation key and no contact. Fetching, DNS over\n * HTTPS and caching live in `@ghostly/browser/proofs/domain`.\n */\n\nexport type DomainMethod = 'dns' | 'https' | 'nip05';\n/** What a record says: this Ghostly proof key, for this statement. */\nexport interface DomainRecord { key: string; proof: string }\n\nexport const DOMAIN_METHODS: readonly DomainMethod[] = ['dns', 'https', 'nip05'];\nexport const DNS_LABEL = '_ghostly';\nexport const WELL_KNOWN_PATH = '/.well-known/ghostly.json';\nexport const NIP05_PATH = '/.well-known/nostr.json?name=_';\n/** Everything read from a domain is bounded; these match the fetch limits. */\nexport const DOMAIN_FILE_MAX_BYTES = 16 * 1024;\nexport const DOMAIN_TXT_MAX_BYTES = 1024;\nexport const DOMAIN_MAX_RECORDS = 8;\n\nconst z32 = /^[ybndrfg8ejkmcpqxot1uwisza345h769]{52}$/;\nconst hex64 = /^[a-f0-9]{64}$/;\n\n// ---------------------------------------------------------------------------\n// Domain names\n\n/** Names that never resolve publicly (RFC 6761, 6762, 7686, 8375, 9476) or that\n * only ever mean a private network. A proof for them could only point inward. */\nconst SPECIAL_USE = ['localhost', 'local', 'internal', 'lan', 'home', 'corp', 'intranet', 'private',\n 'test', 'example', 'invalid', 'onion', 'alt', 'arpa'];\n\n/**\n * Normalizes what a person typed (\"Example.COM.\", \"https://example.com/\") into\n * a lowercase ASCII host name, or throws with a message fit for the UI.\n * Internationalized names become punycode (xn--), the form DNS carries.\n */\nexport function normalizeDomain(input: string): string {\n if (typeof input !== 'string') throw new Error('Enter a domain name, like example.com');\n let value = input.trim();\n if (!value || value.length > 300) throw new Error('Enter a domain name, like example.com');\n if (/^[a-z][a-z0-9+.-]*:\\/\\//i.test(value)) {\n let url: URL;\n try { url = new URL(value); } catch { throw new Error('Enter a domain name, like example.com'); }\n if (url.protocol !== 'https:' || url.username || url.password || url.port || (url.pathname !== '/' && url.pathname !== '') || url.search || url.hash)\n throw new Error('Enter only the domain name, without a path or port');\n value = url.hostname;\n } else {\n if (/[/:@?#\\s\\\\]/.test(value)) throw new Error('Enter only the domain name, without a path or port');\n try { value = new URL(`https://${value}`).hostname; } catch { throw new Error('That is not a valid domain name'); }\n }\n value = value.toLowerCase().replace(/\\.$/, '');\n if (value.length > 253 - DNS_LABEL.length - 1) throw new Error('That domain name is too long');\n const labels = value.split('.');\n if (labels.length < 2) throw new Error('Use a full domain name, like example.com');\n for (const label of labels) {\n if (!/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/.test(label)) throw new Error('That is not a valid domain name');\n }\n const tld = labels[labels.length - 1];\n if (/^[0-9]+$/.test(tld) || /^\\[/.test(value)) throw new Error('Use a domain name, not an IP address');\n if (SPECIAL_USE.includes(tld) || (labels.length >= 2 && labels.slice(-2).join('.') === 'home.arpa'))\n throw new Error('That name only works on private networks');\n return value;\n}\n\nexport const dnsProofName = (domain: string) => `${DNS_LABEL}.${normalizeDomain(domain)}`;\nexport const wellKnownUrl = (domain: string, method: 'https' | 'nip05' = 'https') =>\n `https://${normalizeDomain(domain)}${method === 'nip05' ? NIP05_PATH : WELL_KNOWN_PATH}`;\n\n// ---------------------------------------------------------------------------\n// Records\n\nexport function validDomainRecord(r: DomainRecord): boolean {\n if (!r || typeof r.key !== 'string' || typeof r.proof !== 'string' || !z32.test(r.key) || !hex64.test(r.proof)) return false;\n try { return toZ32(fromZ32(r.key)) === r.key; } catch { return false; }\n}\n\n/** The TXT record value, in the `tag=value; …` style people know from DKIM. */\nexport function domainTxtRecord(r: DomainRecord): string {\n if (!validDomainRecord(r)) throw new Error('Invalid domain record');\n return `v=ghostly1; key=${r.key}; proof=${r.proof}`;\n}\n\n/** Parses one TXT string. Undefined for anything that is not ours or not exactly\n * well-formed; unknown extra tags are ignored for forward compatibility. */\nexport function parseDomainTxt(value: string): DomainRecord | undefined {\n if (typeof value !== 'string' || utf8Encode(value).length > DOMAIN_TXT_MAX_BYTES) return;\n const tags = new Map<string, string>();\n const parts = value.split(';').map(p => p.trim()).filter(Boolean);\n for (const part of parts) {\n const eq = part.indexOf('=');\n if (eq < 1) return;\n const name = part.slice(0, eq).trim().toLowerCase();\n if (tags.has(name)) return;\n tags.set(name, part.slice(eq + 1).trim());\n }\n if (!parts[0]?.toLowerCase().startsWith('v=') || tags.get('v') !== 'ghostly1') return;\n const r = { key: tags.get('key'), proof: tags.get('proof') } as DomainRecord;\n return validDomainRecord(r) ? r : undefined;\n}\n\nconst addRecord = (list: DomainRecord[], r: DomainRecord) => {\n if (!list.some(x => x.key === r.key && x.proof === r.proof)) list.push(r);\n};\n\n/** All records among the first 32 TXT strings of `_ghostly.<domain>`; other strings are skipped. A TXT set has\n * no order, so every record is kept: the one a proof needs may come in any position. */\nexport function recordsFromTxt(values: string[]): DomainRecord[] {\n const out: DomainRecord[] = [];\n for (const value of values.slice(0, 32)) { const r = parseDomainTxt(value); if (r) addRecord(out, r); }\n return out;\n}\n\n/** The body of `/.well-known/ghostly.json`. */\nexport function domainWellKnownFile(records: DomainRecord[]): string {\n if (!records.length || records.length > DOMAIN_MAX_RECORDS || !records.every(validDomainRecord)) throw new Error('Invalid domain records');\n return JSON.stringify({ ghostly: 1, proofs: records.map(r => ({ key: r.key, proof: r.proof })) }, null, 2) + '\\n';\n}\n\nfunction parseJson(text: string): unknown {\n if (typeof text !== 'string' || utf8Encode(text).length > DOMAIN_FILE_MAX_BYTES) throw new Error('File too large');\n return JSON.parse(text);\n}\n\n/** Records from the first 32 entries of `ghostly.json`. Throws on a malformed file; [] when it names none. */\nexport function recordsFromWellKnown(text: string): DomainRecord[] {\n const body = parseJson(text) as { ghostly?: unknown; proofs?: unknown };\n if (!body || typeof body !== 'object' || Array.isArray(body) || body.ghostly !== 1 || !Array.isArray(body.proofs))\n throw new Error('Not a Ghostly domain file');\n const out: DomainRecord[] = [];\n for (const entry of body.proofs.slice(0, 32) as { key?: unknown; proof?: unknown }[]) {\n if (!entry || typeof entry !== 'object') continue;\n const r = { key: entry.key, proof: entry.proof } as DomainRecord;\n if (validDomainRecord(r)) addRecord(out, r);\n }\n return out;\n}\n\n/** NIP-05: only the root name `_` speaks for the domain itself. Undefined when absent. */\nexport function nip05RootKey(text: string): string | undefined {\n const body = parseJson(text) as { names?: unknown };\n if (!body || typeof body !== 'object' || !body.names || typeof body.names !== 'object' || Array.isArray(body.names))\n throw new Error('Not a NIP-05 file');\n const root = (body.names as Record<string, unknown>)['_'];\n return typeof root === 'string' && hex64.test(root) ? root : undefined;\n}\n\nexport const recordsName = (records: DomainRecord[], r: DomainRecord) => records.some(x => x.key === r.key && x.proof === r.proof);\n\n// ---------------------------------------------------------------------------\n// DNS over HTTPS (RFC 8484) wire messages\n\nexport const DNS_TYPE = { A: 1, CNAME: 5, TXT: 16, AAAA: 28 } as const;\nexport type DnsType = keyof typeof DNS_TYPE;\nexport interface DnsAnswer { name: string; type: number; ttl: number; data: Uint8Array }\nexport interface DnsResponse {\n /** 0 = NOERROR, 3 = NXDOMAIN; anything else is a failed lookup. */\n rcode: number;\n /** The resolver reports it validated the answer with DNSSEC. */\n authenticated: boolean;\n answers: DnsAnswer[];\n}\n\n/**\n * EDNS0 OPT record (RFC 6891) with one Client Subnet option of source prefix 0 (RFC 7871 §7.1.2): a resolver must\n * not add this device's subnet to its queries to the name's servers, as Google Public DNS otherwise does.\n */\nconst NO_CLIENT_SUBNET = Uint8Array.of(0, 0, 41, 1232 >> 8, 1232 & 0xff, 0, 0, 0, 0, 0, 8, 0, 8, 0, 4, 0, 1, 0, 0);\n\n/** A recursive query for one name and type. ID 0, as RFC 8484 recommends for caching;\n * the AD bit asks the resolver to report DNSSEC validation (RFC 6840 §5.7). */\nexport function encodeDnsQuery(name: string, type: DnsType): Uint8Array {\n const labels = name.replace(/\\.$/, '').split('.');\n const parts: Uint8Array[] = [Uint8Array.of(0, 0, 0x01, 0x20, 0, 1, 0, 0, 0, 0, 0, 1)];\n for (const label of labels) {\n const bytes = utf8Encode(label);\n if (!bytes.length || bytes.length > 63) throw new Error('Invalid DNS name');\n parts.push(Uint8Array.of(bytes.length), bytes);\n }\n const code = DNS_TYPE[type];\n parts.push(Uint8Array.of(0, code >> 8, code & 0xff, 0, 1), NO_CLIENT_SUBNET);\n return concatBytes(...parts);\n}\n\nfunction readName(data: Uint8Array, start: number): { name: string; next: number } {\n const labels: string[] = [];\n let pos = start, next = -1, jumps = 0, length = 0;\n for (;;) {\n if (pos >= data.length) throw new Error('DNS name out of bounds');\n const len = data[pos];\n if ((len & 0xc0) === 0xc0) {\n if (pos + 1 >= data.length) throw new Error('DNS pointer out of bounds');\n if (next < 0) next = pos + 2;\n pos = ((len & 0x3f) << 8) | data[pos + 1];\n if (++jumps > 32) throw new Error('DNS name loops');\n continue;\n }\n if (len & 0xc0) throw new Error('Unsupported DNS label');\n pos += 1;\n if (len === 0) break;\n if (pos + len > data.length) throw new Error('DNS label out of bounds');\n length += len + 1;\n if (length > 255) throw new Error('DNS name too long');\n labels.push(utf8Decode(data.subarray(pos, pos + len)).toLowerCase());\n pos += len;\n }\n return { name: labels.join('.'), next: next < 0 ? pos : next };\n}\n\n/**\n * Decodes a resolver's answer to `encodeDnsQuery(name, type)`. Refuses a reply\n * to another question or a truncated one, and keeps only records of the asked\n * type owned by the name or by the CNAME chain the answer itself follows.\n */\nexport function decodeDnsResponse(data: Uint8Array, name: string, type: DnsType): DnsResponse {\n if (data.length < 12) throw new Error('DNS response too short');\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n const flags = view.getUint16(2);\n if (!(flags & 0x8000) || (flags & 0x7800) || (flags & 0x0200)) throw new Error('Unusable DNS response');\n const questions = view.getUint16(4), count = view.getUint16(6);\n const want = name.replace(/\\.$/, '').toLowerCase(), code = DNS_TYPE[type];\n if (questions !== 1) throw new Error('DNS response is for another question');\n const q = readName(data, 12);\n if (q.name !== want || q.next + 4 > data.length || view.getUint16(q.next) !== code) throw new Error('DNS response is for another question');\n let pos = q.next + 4;\n const all: DnsAnswer[] = [];\n for (let i = 0; i < count && i < 64; i++) {\n const owner = readName(data, pos);\n pos = owner.next;\n if (pos + 10 > data.length) throw new Error('DNS record out of bounds');\n const rtype = view.getUint16(pos), ttl = view.getUint32(pos + 4), len = view.getUint16(pos + 8);\n pos += 10;\n if (pos + len > data.length) throw new Error('DNS record out of bounds');\n const rdata = rtype === DNS_TYPE.CNAME ? utf8Encode(readName(data, pos).name) : data.slice(pos, pos + len);\n all.push({ name: owner.name, type: rtype, ttl, data: rdata });\n pos += len;\n }\n const owners = new Set([want]);\n for (let hop = 0; hop < 8; hop++) {\n const cname = all.find(a => a.type === DNS_TYPE.CNAME && owners.has(a.name) && !owners.has(utf8Decode(a.data)));\n if (!cname) break;\n owners.add(utf8Decode(cname.data));\n }\n return { rcode: flags & 0x000f, authenticated: !!(flags & 0x0020), answers: all.filter(a => a.type === code && owners.has(a.name)) };\n}\n\n/** The TXT character-strings of one record, joined as RFC 7208 §3.3 does. */\nexport function txtValue(rdata: Uint8Array): string {\n const parts: Uint8Array[] = [];\n for (let p = 0; p < rdata.length;) {\n const len = rdata[p];\n if (p + 1 + len > rdata.length) throw new Error('DNS text out of bounds');\n parts.push(rdata.subarray(p + 1, p + 1 + len));\n p += 1 + len;\n }\n return new TextDecoder('utf-8', { fatal: true }).decode(concatBytes(...parts));\n}\n\n// ---------------------------------------------------------------------------\n// Addresses: a proof may only make a contact's app fetch from the public Internet\n\n/** False for loopback, private, link-local, shared (CGNAT), multicast, reserved\n * and unspecified addresses, including IPv4 embedded in IPv6, and for 6to4, Teredo and documentation IPv6, as\n * Desktop's link_preview::is_public and apps/ui/src/lib/localHost.ts refuse them. */\nexport function isPublicAddress(address: Uint8Array): boolean {\n if (address.length === 4) {\n const [a, b, c] = address;\n return !(a === 0 || a === 10 || a === 127 || a >= 224 ||\n (a === 100 && b >= 64 && b <= 127) || (a === 169 && b === 254) || (a === 172 && b >= 16 && b <= 31) ||\n (a === 192 && b === 168) || (a === 192 && b === 0 && c === 0) || (a === 198 && (b === 18 || b === 19)));\n }\n if (address.length !== 16) return false;\n const zeroTo = (n: number) => address.subarray(0, n).every(x => x === 0);\n if (zeroTo(15) && (address[15] === 0 || address[15] === 1)) return false; // :: and ::1\n if (zeroTo(10) && address[10] === 0xff && address[11] === 0xff) return isPublicAddress(address.subarray(12)); // ::ffff:a.b.c.d\n if (address[0] === 0x00 && address[1] === 0x64 && address[2] === 0xff && address[3] === 0x9b && address.subarray(4, 12).every(x => x === 0))\n return isPublicAddress(address.subarray(12)); // 64:ff9b::/96 NAT64\n if (zeroTo(12)) return false; // deprecated IPv4-compatible\n if ((address[0] & 0xfe) === 0xfc) return false; // fc00::/7 unique local\n if (address[0] === 0xfe && (address[1] & 0xc0) === 0x80) return false; // fe80::/10 link-local\n if (address[0] === 0xfe && (address[1] & 0xc0) === 0xc0) return false; // fec0::/10 site-local\n if (address[0] === 0xff) return false; // multicast\n if (address[0] === 0x01 && address.subarray(1, 8).every(x => x === 0)) return false; // 100::/64 discard\n if (address[0] === 0x20 && address[1] === 0x02) return false; // 2002::/16 6to4: carries an IPv4 address a gateway may reach\n if (address[0] === 0x20 && address[1] === 0x01 && address[2] === 0x00 && address[3] === 0x00) return false; // 2001::/32 Teredo, the same\n if (address[0] === 0x20 && address[1] === 0x01 && address[2] === 0x0d && address[3] === 0xb8) return false; // 2001:db8::/32 documentation\n return (address[0] & 0xe0) === 0x20; // only 2000::/3 is global unicast\n}\n"],"mappings":";;AAyBA,IAAa,YAAY;AACzB,IAAa,kBAAkB;AAC/B,IAAa,aAAa;;AAE1B,IAAa,wBAAwB;AAIrC,IAAM,MAAM;AACZ,IAAM,QAAQ;;;AAOd,IAAM,cAAc;CAAC;CAAa;CAAS;CAAY;CAAO;CAAQ;CAAQ;CAAY;CACxF;CAAQ;CAAW;CAAW;CAAS;CAAO;AAAM;;;;;;AAOtD,SAAgB,gBAAgB,OAAuB;CACrD,IAAI,OAAO,UAAU,UAAU,MAAM,IAAI,MAAM,uCAAuC;CACtF,IAAI,QAAQ,MAAM,KAAK;CACvB,IAAI,CAAC,SAAS,MAAM,SAAS,KAAK,MAAM,IAAI,MAAM,uCAAuC;CACzF,IAAI,2BAA2B,KAAK,KAAK,GAAG;EAC1C,IAAI;EACJ,IAAI;GAAE,MAAM,IAAI,IAAI,KAAK;EAAG,QAAQ;GAAE,MAAM,IAAI,MAAM,uCAAuC;EAAG;EAChG,IAAI,IAAI,aAAa,YAAY,IAAI,YAAY,IAAI,YAAY,IAAI,QAAS,IAAI,aAAa,OAAO,IAAI,aAAa,MAAO,IAAI,UAAU,IAAI,MAC9I,MAAM,IAAI,MAAM,oDAAoD;EACtE,QAAQ,IAAI;CACd,OAAO;EACL,IAAI,cAAc,KAAK,KAAK,GAAG,MAAM,IAAI,MAAM,oDAAoD;EACnG,IAAI;GAAE,QAAQ,IAAI,IAAI,WAAW,OAAO,CAAC,CAAC;EAAU,QAAQ;GAAE,MAAM,IAAI,MAAM,iCAAiC;EAAG;CACpH;CACA,QAAQ,MAAM,YAAY,CAAC,CAAC,QAAQ,OAAO,EAAE;CAC7C,IAAI,MAAM,SAAS,K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,OAAO,MAAQ,QAAQ,OAAO,KAAQ,QAAQ,OAAO,KAAQ,QAAQ,OAAO,GAAM,OAAO;CACrG,IAAI,QAAQ,OAAO,MAAQ,QAAQ,OAAO,KAAQ,QAAQ,OAAO,MAAQ,QAAQ,OAAO,KAAM,OAAO;CACrG,QAAQ,QAAQ,KAAK,SAAU;AACjC"}
|
|
@@ -30,6 +30,22 @@ var CliError = class extends Error {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* A value as a refusal quotes it (`--limit takes a number, not "x"`): a word with a line break or longer than 40
|
|
35
|
+
* characters is described, not printed, as an unknown option is (docs/CLI.md "Secrets stay hidden"). A Cashu token, a
|
|
36
|
+
* wallet connection link, an nsec, a seed or a hex key typed in the wrong place is that long, and bots keep the output.
|
|
37
|
+
*/
|
|
38
|
+
function shownValue(value) {
|
|
39
|
+
if (typeof value !== "string") return JSON.stringify(value);
|
|
40
|
+
return secretValue(value) ?? JSON.stringify(value);
|
|
41
|
+
}
|
|
42
|
+
/** What `shownValue` says in place of a long or secret-looking word, else undefined (the word may be printed). */
|
|
43
|
+
function secretValue(value) {
|
|
44
|
+
if (/^cashu[AB]/.test(value)) return "(a Cashu token)";
|
|
45
|
+
if (/^nostr\+walletconnect:/i.test(value)) return "(a wallet connection link)";
|
|
46
|
+
if (/^nsec1/.test(value)) return "(a private key)";
|
|
47
|
+
return value.length > 40 || /[\r\n]/.test(value) ? `(a ${value.length}-character word)` : void 0;
|
|
48
|
+
}
|
|
33
49
|
/** Anything thrown, as the error a bot sees: the engine's own refusals keep their words. */
|
|
34
50
|
function asCliError(error) {
|
|
35
51
|
if (error instanceof CliError) return error;
|
|
@@ -172,6 +188,6 @@ function localFileError(error, file) {
|
|
|
172
188
|
});
|
|
173
189
|
}
|
|
174
190
|
}
|
|
175
|
-
export { localFileError as i, EXIT as n, asCliError as r, CliError as t };
|
|
191
|
+
export { secretValue as a, localFileError as i, EXIT as n, shownValue as o, asCliError as r, CliError as t };
|
|
176
192
|
|
|
177
|
-
//# sourceMappingURL=errors-
|
|
193
|
+
//# sourceMappingURL=errors-JVJsO8Iu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-JVJsO8Iu.js","names":[],"sources":["../../src/errors.ts"],"sourcesContent":["/**\n * Errors that reach a bot: a stable `code` to branch on, a message for people, and the exit status the CLI\n * leaves with (WISP 1100 § Exit codes). The daemon sends `{code, message}` over the socket; the CLI prints\n * `{\"error\": {code, message}}` on stdout and exits with `exit`.\n */\nexport type ErrorCode =\n | \"bad_request\" | \"usage\" | \"not_found\" | \"refused\" | \"unavailable\" | \"confirm\" | \"timeout\"\n | \"engine\" | \"busy\" | \"internal\" | \"interrupted\";\n\n/** `interrupted`: Ctrl-C (SIGINT) ended the command, 128 + 2 as a shell says of a command its signal ended. */\nexport const EXIT: Record<ErrorCode, number> = {\n engine: 1, refused: 1, unavailable: 1, bad_request: 1, busy: 1, internal: 1,\n usage: 2, not_found: 3, timeout: 4, confirm: 5, interrupted: 130,\n};\n\nexport class CliError extends Error {\n constructor(readonly code: ErrorCode, message: string, readonly details?: Record<string, unknown>) {\n super(message);\n this.name = \"CliError\";\n }\n toJSON(): { code: ErrorCode; message: string; details?: Record<string, unknown> } {\n return { code: this.code, message: this.message, ...(this.details ? { details: this.details } : {}) };\n }\n}\n\n/**\n * A value as a refusal quotes it (`--limit takes a number, not \"x\"`): a word with a line break or longer than 40\n * characters is described, not printed, as an unknown option is (docs/CLI.md \"Secrets stay hidden\"). A Cashu token, a\n * wallet connection link, an nsec, a seed or a hex key typed in the wrong place is that long, and bots keep the output.\n */\nexport function shownValue(value: unknown): string {\n if (typeof value !== \"string\") return JSON.stringify(value);\n return secretValue(value) ?? JSON.stringify(value);\n}\n\n/** What `shownValue` says in place of a long or secret-looking word, else undefined (the word may be printed). */\nexport function secretValue(value: string): string | undefined {\n if (/^cashu[AB]/.test(value)) return \"(a Cashu token)\";\n if (/^nostr\\+walletconnect:/i.test(value)) return \"(a wallet connection link)\";\n if (/^nsec1/.test(value)) return \"(a private key)\";\n return value.length > 40 || /[\\r\\n]/.test(value) ? `(a ${value.length}-character word)` : undefined;\n}\n\n/** Anything thrown, as the error a bot sees: the engine's own refusals keep their words. */\nexport function asCliError(error: unknown): CliError {\n if (error instanceof CliError) return error;\n if (error && typeof error === \"object\" && \"code\" in error && \"message\" in error && typeof (error as { code: unknown }).code === \"string\"\n && Object.hasOwn(EXIT, (error as { code: string }).code)) return new CliError((error as { code: ErrorCode }).code, String((error as { message: unknown }).message));\n // A contact the chat's link could not reach (its `GhostlyHttpError` \"unreachable\"): not there now, not the engine failing.\n if (error instanceof Error && (error as { code?: unknown }).code === \"unreachable\") return new CliError(\"unavailable\", error.message);\n const known = engineKnown(error) ?? contactNoRail(error);\n if (known) return known;\n const full = noRoomError(error);\n if (full) return full;\n const local = localFileError(error);\n if (local) return local;\n const unopened = profileOpenError(error);\n if (unopened) return unopened;\n const message = error instanceof Error ? error.message : String(error);\n if (/real money|confirmedReal|Mainnet/i.test(message) && /confirm/i.test(message)) return new CliError(\"confirm\", message);\n if (/other network|cross-network|network does not match/i.test(message)) return new CliError(\"refused\", message);\n // A member asking for a group's admin-only change, one removed from the group (or gone) asking for any, an invitation\n // already answered: not allowed, not the engine failing.\n if (/^Only the admin |^You are no longer in this group$|^No invitation to (accept|decline)$/.test(message)) return new CliError(\"refused\", message);\n // `group invite` to a contact whose app is closed: try again once they are online.\n if (message === \"This contact is not connected right now. Invite them when they are online.\") return new CliError(\"unavailable\", message);\n // `group invite` the group or the contact's app cannot take: one already in, a full group, an app too old for it.\n if (/^This contact is already a member$|^A group holds \\d+ members at most$|^A group grows past \\d+ only when |^Their app (does not take part in groups|takes groups of \\d+ at most)|^This group runs through hubs, which their app /.test(message)) return new CliError(\"refused\", message);\n // `group invite` into a community: it has no invitations, its link is how people join.\n if (message === \"Share the group's link with them: anyone who opens it joins\") return new CliError(\"bad_request\", message);\n return new CliError(\"engine\", message);\n}\n\n/**\n * The engine's known errors (`EngineError`, packages/core engineErrors.ts) a bot branches on, by their `engineCode`: a\n * host or the network not answering is `unavailable` (try again later), one too slow `timeout`, a value the person gave\n * `bad_request`, money that is not there `refused`, a contact that offers no way of paying `refused` with its reason in\n * `details.reason`. Any other keeps `engine`. Read by its shape, as `profileOpenError`.\n */\nconst ENGINE_CODES: Record<string, ErrorCode> = {\n mintUnreachable: \"unavailable\", lnurlUnreachable: \"unavailable\", hostUnreachable: \"unavailable\", networkUnreachable: \"unavailable\", usdtRpcUnavailable: \"unavailable\", mintFailedInvoice: \"unavailable\",\n hostTimedOut: \"timeout\", networkTimedOut: \"timeout\",\n invalidMintUrl: \"bad_request\", mintNotHttps: \"bad_request\", invalidMaxFee: \"bad_request\",\n notEnoughSats: \"refused\", notEnoughForFee: \"refused\", mintsNoAnyAmount: \"refused\", ecashAlreadySpent: \"refused\", ecashFeeTakesAll: \"refused\", lightningRefused: \"refused\", contactNoWallet: \"refused\", contactNoPayments: \"refused\",\n serviceShareFull: \"refused\",\n};\n/** `details.reason` of an engine error a bot tells apart from others of its code. */\nconst ENGINE_REASONS: Record<string, string> = { contactNoWallet: \"contact_no_wallet\", contactNoPayments: \"contact_payments_off\" };\n\nfunction engineKnown(error: unknown): CliError | undefined {\n if (!(error instanceof Error)) return undefined;\n const { engineCode, values } = error as { engineCode?: unknown; values?: { host?: unknown } };\n if (typeof engineCode !== \"string\" || !Object.hasOwn(ENGINE_CODES, engineCode)) return undefined;\n // The app's reason for a Lightning address it could not read (a browser's CORS) is no reason in a terminal.\n if (engineCode === \"lnurlUnreachable\" && typeof values?.host === \"string\") return new CliError(\"unavailable\", `Could not reach ${values.host}`);\n const details = Object.hasOwn(ENGINE_REASONS, engineCode) ? { reason: ENGINE_REASONS[engineCode] } : undefined;\n // The contact's next step, for a contact that is a bot too.\n if (engineCode === \"contactNoWallet\") return new CliError(\"refused\", `${error.message} (on a CLI: ghostly wallet create cashu)`, details);\n return new CliError(ENGINE_CODES[engineCode], error.message, details);\n}\n\n/** The engine's names of the ways of paying (payments.ts `METHOD_NAME`), as `wallet create` takes them; Bark is the app's only. */\nconst RAILS: Record<string, string | null> = { Cashu: \"cashu\", Lightning: \"lightning\", Ark: \"arkade\", USDT: \"usdt\", Bark: null, \"on-chain Bitcoin\": \"bitcoin\", Fedimint: \"fedimint\", Spark: \"spark\" };\n\n/**\n * A contact with no wallet of the way of paying or the network asked (`chat request --method arkade`, a Mainnet `chat\n * pay` to a contact with Testnet Cashu only): the engine says it in words alone. `refused` with `contact_no_wallet` and\n * the contact's next step, as a contact with no wallet at all is said. Before, `engine`, which a bot may retry.\n */\nfunction contactNoRail(error: unknown): CliError | undefined {\n const said = error instanceof Error ? /^Your contact has no (Mainnet|Testnet) (.+) wallet$/.exec(error.message) : null;\n if (!said || !Object.hasOwn(RAILS, said[2])) return undefined;\n const type = RAILS[said[2]];\n const step = type ? ` (on a CLI: ghostly wallet create ${type}${said[1] === \"Mainnet\" ? \" --network mainnet\" : \"\"})` : \"\";\n return new CliError(\"refused\", `${said[0]}${step}`, { reason: \"contact_no_wallet\" });\n}\n\n/**\n * A change the profile's store could not put on disk (`storage.ts` refuses its transaction with a QuotaExceededError;\n * the engine's `committed` wraps it in its own words, the store's as the cause): `unavailable`, try again once there is\n * room, in the store's words, which name the profile's folder. Before, a daemon on a full disk answered done.\n */\nfunction noRoomError(error: unknown): CliError | undefined {\n let said: string | undefined, found = false;\n for (let at = error, depth = 0; at && typeof at === \"object\" && depth < 4; at = (at as { cause?: unknown }).cause, depth++) {\n if ((at as { name?: unknown }).name !== \"QuotaExceededError\") continue;\n found = true;\n const message = (at as { message?: unknown }).message;\n if (typeof message === \"string\" && message.startsWith(\"No room left\")) said = message;\n }\n return found ? new CliError(\"unavailable\", said ?? \"No room left on the disk: free some space, then try again\") : undefined;\n}\n\n/**\n * The profile's database did not open (the engine's `ProfileOpenError`, packages/browser/src/shared/idb.ts): `engine`\n * (exit 1) with the engine's own words, which name the versions when a newer ghostly stored it, and the reason and\n * the versions in `details` for a bot. Read by its shape: this module is also the thin client's, which loads no engine.\n */\nfunction profileOpenError(error: unknown): CliError | undefined {\n if (!(error instanceof Error) || error.name !== \"ProfileOpenError\") return undefined;\n const failure = (error as { failure?: { reason?: unknown; storedVersion?: unknown; supportedVersion?: unknown } }).failure;\n if (!failure || typeof failure.reason !== \"string\") return undefined;\n return new CliError(\"engine\", error.message, {\n reason: failure.reason === \"newer\" ? \"newer_profile\" : `profile_${failure.reason}`,\n ...(typeof failure.storedVersion === \"number\" ? { storedVersion: failure.storedVersion } : {}),\n ...(typeof failure.supportedVersion === \"number\" ? { supportedVersion: failure.supportedVersion } : {}),\n });\n}\n\n/**\n * A file or folder on this machine the command could not open (`file save --dir`, `profile backup --out`): the\n * person's path, not the engine refusing, so it says so with the code a bot branches on. Before, a folder that did\n * not exist was `engine` (exit 1) with Node's `ENOENT: no such file or directory, open '…'`. `file`: the path read, for\n * an error that names none (a folder read as a file).\n */\nexport function localFileError(error: unknown, file?: string): CliError | undefined {\n if (!error || typeof error !== \"object\" || typeof (error as { syscall?: unknown }).syscall !== \"string\") return undefined;\n const { code, path } = error as { code?: unknown; path?: unknown };\n const where = typeof path === \"string\" ? path : file ?? \"the path\";\n if (code === \"ENOENT\" || code === \"ENOTDIR\") return new CliError(\"not_found\", `No such file or folder: ${where}`);\n // A symbolic link to itself (or a ring of them) leads nowhere: before, Node's raw \"ELOOP: …, stat\" as `engine`.\n if (code === \"ELOOP\") return new CliError(\"not_found\", `No such file or folder: ${where} (its symbolic links go round in a loop)`);\n if (code === \"EACCES\" || code === \"EPERM\" || code === \"EROFS\") return new CliError(\"refused\", `Not allowed to write or read ${where}`);\n if (code === \"EISDIR\") return new CliError(\"bad_request\", `${where} is a folder: name a file`);\n // A file where a folder is to be made (`store sign --out`, `app publish --key`/`--out`): Node's \"EEXIST: file already\n // exists, mkdir '…'\" was `engine`. Named as `file save --dir` names one.\n if (code === \"EEXIST\" && (error as { syscall: string }).syscall === \"mkdir\") return new CliError(\"not_found\", `${where} is a file, not a folder`);\n if (code === \"ENAMETOOLONG\") return new CliError(\"bad_request\", `A name in ${where} is too long for this file system (at most 255 bytes)`);\n // A full disk (or a quota) answered Node's raw \"ENOSPC: no space left on device, write\" as `engine`, naming nothing\n // (agents#1710). `unavailable`: it works again once there is room, with nothing lost.\n if (code === \"ENOSPC\" || code === \"EDQUOT\") {\n const at = typeof path === \"string\" ? path : file;\n return new CliError(\"unavailable\", at ? `No room left for ${at}: free some space, then try again` : \"No room left on the disk: free some space, then try again\", { reason: \"no_space\", errno: code, ...(at && { path: at }) });\n }\n return undefined;\n}\n"],"mappings":";;AAUA,IAAa,OAAkC;CAC7C,QAAQ;CAAG,SAAS;CAAG,aAAa;CAAG,aAAa;CAAG,MAAM;CAAG,UAAU;CAC1E,OAAO;CAAG,WAAW;CAAG,SAAS;CAAG,SAAS;CAAG,aAAa;AAC/D;AAEA,IAAa,WAAb,cAA8B,MAAM;CACb;CAA2C;CAAhE,YAAY,MAA0B,SAAiB,SAA4C;EACjG,MAAM,OAAO;EADM,KAAA,OAAA;EAA2C,KAAA,UAAA;EAE9D,KAAK,OAAO;CACd;CACA,SAAkF;EAChF,OAAO;GAAE,MAAM,KAAK;GAAM,SAAS,KAAK;GAAS,GAAI,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;EAAG;CACtG;AACF;;;;;;AAOA,SAAgB,WAAW,OAAwB;CACjD,IAAI,OAAO,UAAU,UAAU,OAAO,KAAK,UAAU,KAAK;CAC1D,OAAO,YAAY,KAAK,KAAK,KAAK,UAAU,KAAK;AACnD;;AAGA,SAAgB,YAAY,OAAmC;CAC7D,IAAI,aAAa,KAAK,KAAK,GAAG,OAAO;CACrC,IAAI,0BAA0B,KAAK,KAAK,GAAG,OAAO;CAClD,IAAI,SAAS,KAAK,KAAK,GAAG,OAAO;CACjC,OAAO,MAAM,SAAS,MAAM,SAAS,KAAK,KAAK,IAAI,MAAM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;CACjI,IAAI,SAAS,YAAY,SAAS,WAAW,SAAS,SAAS,OAAO,IAAI,SAAS,WAAW,gCAAgC,OAAO;CACrI,IAAI,SAAS,UAAU,OAAO,IAAI,SAAS,eAAe,GAAG,MAAM,0BAA0B;CAG7F,IAAI,SAAS,YAAa,MAA8B,YAAY,SAAS,OAAO,IAAI,SAAS,aAAa,GAAG,MAAM,yBAAyB;CAChJ,IAAI,SAAS,gBAAgB,OAAO,IAAI,SAAS,eAAe,aAAa,MAAM,sDAAsD;CAGzI,IAAI,SAAS,YAAY,SAAS,UAAU;EAC1C,MAAM,KAAK,OAAO,SAAS,WAAW,OAAO;EAC7C,OAAO,IAAI,SAAS,eAAe,KAAK,oBAAoB,GAAG,qCAAqC,6DAA6D;GAAE,QAAQ;GAAY,OAAO;GAAM,GAAI,MAAM,EAAE,MAAM,GAAG;EAAG,CAAC;CAC/N;AAEF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as pkarrRelays, n as plcDirectory, o as DOH_RESOLVERS } from "./resolve-DNX-eecG.js";
|
|
2
2
|
import { a as PUBKY_RELAYS, t as SSH_FORGE_HOST, u as oidcProviders } from "./sshForges-BnvwmNj-.js";
|
|
3
3
|
// ../browser/src/proofs/fixedHosts.ts
|
|
4
4
|
/**
|
|
@@ -19,4 +19,4 @@ function fixedIdentityHosts() {
|
|
|
19
19
|
}
|
|
20
20
|
export { fixedIdentityHosts };
|
|
21
21
|
|
|
22
|
-
//# sourceMappingURL=fixedHosts-
|
|
22
|
+
//# sourceMappingURL=fixedHosts-H3i6o9Iy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixedHosts-
|
|
1
|
+
{"version":3,"file":"fixedHosts-H3i6o9Iy.js","names":[],"sources":["../../../browser/src/proofs/fixedHosts.ts"],"sourcesContent":["import { plcDirectory } from \"./atproto/resolve\";\nimport { DOH_RESOLVERS } from \"./domain\";\nimport { oidcProviders } from \"./oidc/providers\";\nimport { pkarrRelays } from \"./pkarrRelays\";\nimport { PUBKY_RELAYS } from \"./pubkyRelays\";\nimport { SSH_FORGE_HOST } from \"./sshForges\";\n\n/**\n * The hosts a contact's proof may be checked on while \"Hide my IP from contacts\" is on: the ones this app names\n * (DNS-over-HTTPS resolvers, the PLC directory, Pubky's Pkarr relays and the profile's own, the OpenID providers' keys,\n * the forges' APIs), never one the contact's evidence names (a did:web or a domain's own web server, an AT Protocol\n * server, a Pubky homeserver), which would see this device's IP address.\n */\nexport function fixedIdentityHosts(): ReadonlySet<string> {\n const urls = [...DOH_RESOLVERS.map(r => r.url), plcDirectory(), ...PUBKY_RELAYS, ...pkarrRelays(), ...oidcProviders().map(p => p.jwksUri)];\n return new Set([...urls.map(u => new URL(u).host), ...Object.values(SSH_FORGE_HOST)]);\n}\n"],"mappings":";;;;;;;;;AAaA,SAAgB,qBAA0C;CACxD,MAAM,OAAO;EAAC,GAAG,cAAc,KAAI,MAAK,EAAE,GAAG;EAAG,aAAa;EAAG,GAAG;EAAc,GAAG,YAAY;EAAG,GAAG,cAAc,CAAC,CAAC,KAAI,MAAK,EAAE,OAAO;CAAC;CACzI,uBAAO,IAAI,IAAI,CAAC,GAAG,KAAK,KAAI,MAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,OAAO,OAAO,cAAc,CAAC,CAAC;AACtF"}
|
|
@@ -212,29 +212,26 @@ if (!("encodeInto" in cachedTextEncoder)) cachedTextEncoder.encodeInto = functio
|
|
|
212
212
|
};
|
|
213
213
|
};
|
|
214
214
|
var WASM_VECTOR_LEN = 0;
|
|
215
|
-
function
|
|
216
|
-
wasm.
|
|
215
|
+
function __wasm_bindgen_func_elem_3697(arg0, arg1) {
|
|
216
|
+
wasm.__wasm_bindgen_func_elem_3697(arg0, arg1);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
wasm.
|
|
218
|
+
function __wasm_bindgen_func_elem_3351(arg0, arg1) {
|
|
219
|
+
wasm.__wasm_bindgen_func_elem_3351(arg0, arg1);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
wasm.
|
|
221
|
+
function __wasm_bindgen_func_elem_8962(arg0, arg1) {
|
|
222
|
+
wasm.__wasm_bindgen_func_elem_8962(arg0, arg1);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
wasm.
|
|
224
|
+
function __wasm_bindgen_func_elem_4243(arg0, arg1, arg2) {
|
|
225
|
+
wasm.__wasm_bindgen_func_elem_4243(arg0, arg1, addHeapObject(arg2));
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
wasm.
|
|
227
|
+
function __wasm_bindgen_func_elem_9017(arg0, arg1, arg2) {
|
|
228
|
+
wasm.__wasm_bindgen_func_elem_9017(arg0, arg1, addHeapObject(arg2));
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
wasm.
|
|
230
|
+
function __wasm_bindgen_func_elem_1694(arg0, arg1, arg2) {
|
|
231
|
+
wasm.__wasm_bindgen_func_elem_1694(arg0, arg1, addHeapObject(arg2));
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
wasm.
|
|
235
|
-
}
|
|
236
|
-
function __wasm_bindgen_func_elem_9044(arg0, arg1, arg2, arg3) {
|
|
237
|
-
wasm.__wasm_bindgen_func_elem_9044(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
233
|
+
function __wasm_bindgen_func_elem_9100(arg0, arg1, arg2, arg3) {
|
|
234
|
+
wasm.__wasm_bindgen_func_elem_9100(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
238
235
|
}
|
|
239
236
|
var __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
240
237
|
var __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
@@ -506,7 +503,8 @@ var IrohNode = class IrohNode {
|
|
|
506
503
|
return takeObject(wasm.irohnode_start(ptr0, len0, ptr1, len1, online_ms));
|
|
507
504
|
}
|
|
508
505
|
/**
|
|
509
|
-
* Resolves with the next incoming connection, or `undefined` once closed.
|
|
506
|
+
* Resolves with the next incoming connection, or `undefined` once closed. Callers serialise accepts; a
|
|
507
|
+
* concurrent call fails.
|
|
510
508
|
* @returns {Promise<any>}
|
|
511
509
|
*/
|
|
512
510
|
accept() {
|
|
@@ -838,7 +836,7 @@ function __wbg_get_imports() {
|
|
|
838
836
|
const a = state0.a;
|
|
839
837
|
state0.a = 0;
|
|
840
838
|
try {
|
|
841
|
-
return
|
|
839
|
+
return __wasm_bindgen_func_elem_9100(a, state0.b, arg0, arg1);
|
|
842
840
|
} finally {
|
|
843
841
|
state0.a = a;
|
|
844
842
|
}
|
|
@@ -1084,32 +1082,29 @@ function __wbg_get_imports() {
|
|
|
1084
1082
|
imports.wbg.__wbg_wasClean_4154a2d59fdb4dd7 = function(arg0) {
|
|
1085
1083
|
return getObject(arg0).wasClean;
|
|
1086
1084
|
};
|
|
1087
|
-
imports.wbg.__wbindgen_cast_0edd631f92b0110b = function(arg0, arg1) {
|
|
1088
|
-
return addHeapObject(makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3281, __wasm_bindgen_func_elem_3298));
|
|
1089
|
-
};
|
|
1090
1085
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1091
1086
|
return addHeapObject(getStringFromWasm0(arg0, arg1));
|
|
1092
1087
|
};
|
|
1093
|
-
imports.wbg.
|
|
1094
|
-
return addHeapObject(makeMutClosure(arg0, arg1, wasm.
|
|
1088
|
+
imports.wbg.__wbindgen_cast_233c3d57156616f0 = function(arg0, arg1) {
|
|
1089
|
+
return addHeapObject(makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_9008, __wasm_bindgen_func_elem_9017));
|
|
1095
1090
|
};
|
|
1096
|
-
imports.wbg.
|
|
1097
|
-
return addHeapObject(makeMutClosure(arg0, arg1, wasm.
|
|
1091
|
+
imports.wbg.__wbindgen_cast_5f9f6a976a48da8d = function(arg0, arg1) {
|
|
1092
|
+
return addHeapObject(makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4211, __wasm_bindgen_func_elem_4243));
|
|
1098
1093
|
};
|
|
1099
|
-
imports.wbg.
|
|
1100
|
-
return addHeapObject(makeMutClosure(arg0, arg1, wasm.
|
|
1094
|
+
imports.wbg.__wbindgen_cast_ae3b0b5663a2b301 = function(arg0, arg1) {
|
|
1095
|
+
return addHeapObject(makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8957, __wasm_bindgen_func_elem_8962));
|
|
1101
1096
|
};
|
|
1102
|
-
imports.wbg.
|
|
1103
|
-
return addHeapObject(
|
|
1097
|
+
imports.wbg.__wbindgen_cast_af2643c5b7c8897d = function(arg0, arg1) {
|
|
1098
|
+
return addHeapObject(makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3336, __wasm_bindgen_func_elem_3351));
|
|
1104
1099
|
};
|
|
1105
|
-
imports.wbg.
|
|
1106
|
-
return addHeapObject(
|
|
1100
|
+
imports.wbg.__wbindgen_cast_b287904957c405a7 = function(arg0, arg1) {
|
|
1101
|
+
return addHeapObject(makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3681, __wasm_bindgen_func_elem_3697));
|
|
1107
1102
|
};
|
|
1108
1103
|
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
1109
1104
|
return addHeapObject(getArrayU8FromWasm0(arg0, arg1));
|
|
1110
1105
|
};
|
|
1111
|
-
imports.wbg.
|
|
1112
|
-
return addHeapObject(makeMutClosure(arg0, arg1, wasm.
|
|
1106
|
+
imports.wbg.__wbindgen_cast_f6761355e6c536dc = function(arg0, arg1) {
|
|
1107
|
+
return addHeapObject(makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1191, __wasm_bindgen_func_elem_1694));
|
|
1113
1108
|
};
|
|
1114
1109
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
1115
1110
|
return addHeapObject(getObject(arg0));
|
|
@@ -1150,4 +1145,4 @@ async function __wbg_init(module_or_path) {
|
|
|
1150
1145
|
}
|
|
1151
1146
|
export { IntoUnderlyingByteSource, IntoUnderlyingSink, IntoUnderlyingSource, IrohConn, IrohNode, __wbg_init as default, initSync };
|
|
1152
1147
|
|
|
1153
|
-
//# sourceMappingURL=ghostly_iroh_web-
|
|
1148
|
+
//# sourceMappingURL=ghostly_iroh_web-9VOwZcJQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghostly_iroh_web-9VOwZcJQ.js","names":["ret"],"sources":["../../../iroh-web/pkg/ghostly_iroh_web.js"],"sourcesContent":["let wasm;\n\nfunction addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n}\n\nconst CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(state => state.dtor(state.a, state.b));\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet cachedDataViewMemory0 = null;\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return decodeText(ptr, len);\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getObject(idx) { return heap[idx]; }\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_export3(addHeapObject(e));\n }\n}\n\nlet heap = new Array(128).fill(undefined);\nheap.push(undefined, null, true, false);\n\nlet heap_next = heap.length;\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction makeClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n try {\n return f(state.a, state.b, ...args);\n } finally {\n real._wbg_cb_unref();\n }\n };\n real._wbg_cb_unref = () => {\n if (--state.cnt === 0) {\n state.dtor(state.a, state.b);\n state.a = 0;\n CLOSURE_DTORS.unregister(state);\n }\n };\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\n\nfunction makeMutClosure(arg0, arg1, dtor, f) {\n const state = { a: arg0, b: arg1, cnt: 1, dtor };\n const real = (...args) => {\n\n // First up with a closure we increment the internal reference\n // count. This ensures that the Rust closure environment won't\n // be deallocated while we're invoking it.\n state.cnt++;\n const a = state.a;\n state.a = 0;\n try {\n return f(a, state.b, ...args);\n } finally {\n state.a = a;\n real._wbg_cb_unref();\n }\n };\n real._wbg_cb_unref = () => {\n if (--state.cnt === 0) {\n state.dtor(state.a, state.b);\n state.a = 0;\n CLOSURE_DTORS.unregister(state);\n }\n };\n CLOSURE_DTORS.register(real, state, state);\n return real;\n}\n\nfunction passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8ArrayMemory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n}\n\nfunction passArrayJsValueToWasm0(array, malloc) {\n const ptr = malloc(array.length * 4, 4) >>> 0;\n const mem = getDataViewMemory0();\n for (let i = 0; i < array.length; i++) {\n mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);\n }\n WASM_VECTOR_LEN = array.length;\n return ptr;\n}\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = cachedTextEncoder.encodeInto(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\ncachedTextDecoder.decode();\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\nlet numBytesDecoded = 0;\nfunction decodeText(ptr, len) {\n numBytesDecoded += len;\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n cachedTextDecoder.decode();\n numBytesDecoded = len;\n }\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nconst cachedTextEncoder = new TextEncoder();\n\nif (!('encodeInto' in cachedTextEncoder)) {\n cachedTextEncoder.encodeInto = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nfunction __wasm_bindgen_func_elem_3697(arg0, arg1) {\n wasm.__wasm_bindgen_func_elem_3697(arg0, arg1);\n}\n\nfunction __wasm_bindgen_func_elem_3351(arg0, arg1) {\n wasm.__wasm_bindgen_func_elem_3351(arg0, arg1);\n}\n\nfunction __wasm_bindgen_func_elem_8962(arg0, arg1) {\n wasm.__wasm_bindgen_func_elem_8962(arg0, arg1);\n}\n\nfunction __wasm_bindgen_func_elem_4243(arg0, arg1, arg2) {\n wasm.__wasm_bindgen_func_elem_4243(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction __wasm_bindgen_func_elem_9017(arg0, arg1, arg2) {\n wasm.__wasm_bindgen_func_elem_9017(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction __wasm_bindgen_func_elem_1694(arg0, arg1, arg2) {\n wasm.__wasm_bindgen_func_elem_1694(arg0, arg1, addHeapObject(arg2));\n}\n\nfunction __wasm_bindgen_func_elem_9100(arg0, arg1, arg2, arg3) {\n wasm.__wasm_bindgen_func_elem_9100(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));\n}\n\nconst __wbindgen_enum_BinaryType = [\"blob\", \"arraybuffer\"];\n\nconst __wbindgen_enum_ReadableStreamType = [\"bytes\"];\n\nconst __wbindgen_enum_RequestCache = [\"default\", \"no-store\", \"reload\", \"no-cache\", \"force-cache\", \"only-if-cached\"];\n\nconst __wbindgen_enum_RequestCredentials = [\"omit\", \"same-origin\", \"include\"];\n\nconst __wbindgen_enum_RequestMode = [\"same-origin\", \"no-cors\", \"cors\", \"navigate\"];\n\nconst IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));\n\nconst IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));\n\nconst IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));\n\nconst IrohConnFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_irohconn_free(ptr >>> 0, 1));\n\nconst IrohNodeFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_irohnode_free(ptr >>> 0, 1));\n\nexport class IntoUnderlyingByteSource {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n IntoUnderlyingByteSourceFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_intounderlyingbytesource_free(ptr, 0);\n }\n /**\n * @returns {number}\n */\n get autoAllocateChunkSize() {\n const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {ReadableByteStreamController} controller\n * @returns {Promise<any>}\n */\n pull(controller) {\n const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));\n return takeObject(ret);\n }\n /**\n * @param {ReadableByteStreamController} controller\n */\n start(controller) {\n wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));\n }\n /**\n * @returns {ReadableStreamType}\n */\n get type() {\n const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);\n return __wbindgen_enum_ReadableStreamType[ret];\n }\n cancel() {\n const ptr = this.__destroy_into_raw();\n wasm.intounderlyingbytesource_cancel(ptr);\n }\n}\nif (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;\n\nexport class IntoUnderlyingSink {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n IntoUnderlyingSinkFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_intounderlyingsink_free(ptr, 0);\n }\n /**\n * @param {any} reason\n * @returns {Promise<any>}\n */\n abort(reason) {\n const ptr = this.__destroy_into_raw();\n const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));\n return takeObject(ret);\n }\n /**\n * @returns {Promise<any>}\n */\n close() {\n const ptr = this.__destroy_into_raw();\n const ret = wasm.intounderlyingsink_close(ptr);\n return takeObject(ret);\n }\n /**\n * @param {any} chunk\n * @returns {Promise<any>}\n */\n write(chunk) {\n const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));\n return takeObject(ret);\n }\n}\nif (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;\n\nexport class IntoUnderlyingSource {\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n IntoUnderlyingSourceFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_intounderlyingsource_free(ptr, 0);\n }\n /**\n * @param {ReadableStreamDefaultController} controller\n * @returns {Promise<any>}\n */\n pull(controller) {\n const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));\n return takeObject(ret);\n }\n cancel() {\n const ptr = this.__destroy_into_raw();\n wasm.intounderlyingsource_cancel(ptr);\n }\n}\nif (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;\n\n/**\n * One paired channel: a single bidirectional stream of text frames.\n */\nexport class IrohConn {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(IrohConn.prototype);\n obj.__wbg_ptr = ptr;\n IrohConnFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n IrohConnFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_irohconn_free(ptr, 0);\n }\n /**\n * Round-trip time in milliseconds, as QUIC measures it.\n * @returns {number}\n */\n rtt() {\n const ret = wasm.irohconn_rtt(this.__wbg_ptr);\n return ret;\n }\n /**\n * The next text frame, or `undefined` once the channel is closed.\n * @returns {Promise<any>}\n */\n recv() {\n const ret = wasm.irohconn_recv(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Sends one text frame. Callers serialise sends; a concurrent call fails.\n * @param {string} text\n * @returns {Promise<any>}\n */\n send(text) {\n const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.irohconn_send(this.__wbg_ptr, ptr0, len0);\n return takeObject(ret);\n }\n close() {\n wasm.irohconn_close(this.__wbg_ptr);\n }\n /**\n * @returns {any}\n */\n binding() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.irohconn_binding(retptr, this.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * The contact's endpoint id.\n * @returns {string}\n */\n remoteId() {\n let deferred1_0;\n let deferred1_1;\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.irohconn_remoteId(retptr, this.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n deferred1_0 = r0;\n deferred1_1 = r1;\n return getStringFromWasm0(r0, r1);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);\n }\n }\n}\nif (Symbol.dispose) IrohConn.prototype[Symbol.dispose] = IrohConn.prototype.free;\n\n/**\n * One Iroh endpoint for one paired chat, homed on a relay.\n */\nexport class IrohNode {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(IrohNode.prototype);\n obj.__wbg_ptr = ptr;\n IrohNodeFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n IrohNodeFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_irohnode_free(ptr, 0);\n }\n /**\n * @returns {Promise<any>}\n */\n close() {\n const ret = wasm.irohnode_close(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * Binds an endpoint for a 32-byte seed and waits until it is reachable\n * through the first relay that answers. `relays` is a list of relay URLs.\n * @param {Uint8Array} seed\n * @param {string[]} relays\n * @param {number} online_ms\n * @returns {Promise<any>}\n */\n static start(seed, relays, online_ms) {\n const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_export);\n const len0 = WASM_VECTOR_LEN;\n const ptr1 = passArrayJsValueToWasm0(relays, wasm.__wbindgen_export);\n const len1 = WASM_VECTOR_LEN;\n const ret = wasm.irohnode_start(ptr0, len0, ptr1, len1, online_ms);\n return takeObject(ret);\n }\n /**\n * Resolves with the next incoming connection, or `undefined` once closed. Callers serialise accepts; a\n * concurrent call fails.\n * @returns {Promise<any>}\n */\n accept() {\n const ret = wasm.irohnode_accept(this.__wbg_ptr);\n return takeObject(ret);\n }\n /**\n * `{ id, relay, addresses: [] }`, the same shape the Desktop publishes.\n * @returns {any}\n */\n address() {\n try {\n const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);\n wasm.irohnode_address(retptr, this.__wbg_ptr);\n var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);\n var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);\n var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);\n if (r2) {\n throw takeObject(r1);\n }\n return takeObject(r0);\n } finally {\n wasm.__wbindgen_add_to_stack_pointer(16);\n }\n }\n /**\n * @param {any} descriptor\n * @param {number} timeout_ms\n * @returns {Promise<any>}\n */\n connect(descriptor, timeout_ms) {\n const ret = wasm.irohnode_connect(this.__wbg_ptr, addHeapObject(descriptor), timeout_ms);\n return takeObject(ret);\n }\n}\nif (Symbol.dispose) IrohNode.prototype[Symbol.dispose] = IrohNode.prototype.free;\n\nconst EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n } catch (e) {\n const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);\n\n if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {\n const ret = Error(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {\n const v = getObject(arg0);\n const ret = typeof(v) === 'boolean' ? v : undefined;\n return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;\n };\n imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {\n const ret = debugString(getObject(arg1));\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {\n const obj = getObject(arg1);\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);\n var len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {\n getObject(arg0)._wbg_cb_unref();\n };\n imports.wbg.__wbg_abort_07646c894ebbf2bd = function(arg0) {\n getObject(arg0).abort();\n };\n imports.wbg.__wbg_abort_399ecbcfd6ef3c8e = function(arg0, arg1) {\n getObject(arg0).abort(getObject(arg1));\n };\n imports.wbg.__wbg_addEventListener_e792423147a80626 = function() { return handleError(function (arg0, arg1, arg2, arg3) {\n getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));\n }, arguments) };\n imports.wbg.__wbg_append_c5cbdf46455cc776 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {\n getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));\n }, arguments) };\n imports.wbg.__wbg_body_947b901c33f7fe32 = function(arg0) {\n const ret = getObject(arg0).body;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n };\n imports.wbg.__wbg_buffer_6cb2fecb1f253d71 = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_byobRequest_f8e3517f5f8ad284 = function(arg0) {\n const ret = getObject(arg0).byobRequest;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n };\n imports.wbg.__wbg_byteLength_faa9938885bdeee6 = function(arg0) {\n const ret = getObject(arg0).byteLength;\n return ret;\n };\n imports.wbg.__wbg_byteOffset_3868b6a19ba01dea = function(arg0) {\n const ret = getObject(arg0).byteOffset;\n return ret;\n };\n imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_cancel_a65cf45dca50ba4c = function(arg0) {\n const ret = getObject(arg0).cancel();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_catch_b9db41d97d42bd02 = function(arg0, arg1) {\n const ret = getObject(arg0).catch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_clearTimeout_3b5c565a5ec539dd = function(arg0) {\n const ret = clearTimeout(takeObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_clearTimeout_5e42188b495715bb = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).clearTimeout(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_close_0af5661bf3d335f2 = function() { return handleError(function (arg0) {\n getObject(arg0).close();\n }, arguments) };\n imports.wbg.__wbg_close_1db3952de1b5b1cf = function() { return handleError(function (arg0) {\n getObject(arg0).close();\n }, arguments) };\n imports.wbg.__wbg_close_3ec111e7b23d94d8 = function() { return handleError(function (arg0) {\n getObject(arg0).close();\n }, arguments) };\n imports.wbg.__wbg_code_85a811fe6ca962be = function(arg0) {\n const ret = getObject(arg0).code;\n return ret;\n };\n imports.wbg.__wbg_code_c2a85f2863ec11b3 = function(arg0) {\n const ret = getObject(arg0).code;\n return ret;\n };\n imports.wbg.__wbg_crypto_86f2631e91b51511 = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_data_8bf4ae669a78a688 = function(arg0) {\n const ret = getObject(arg0).data;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {\n const ret = getObject(arg0).done;\n return ret;\n };\n imports.wbg.__wbg_enqueue_a7e6b1ee87963aad = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).enqueue(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_entries_13da0847a5239578 = function(arg0) {\n const ret = getObject(arg0).entries();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_16dcf1cfbbc66b3c = function(arg0) {\n const ret = fetch(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_fetch_90447c28cc0b095e = function(arg0, arg1) {\n const ret = getObject(arg0).fetch(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_getRandomValues_a8ddca022803a145 = function() { return handleError(function (arg0, arg1) {\n globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));\n }, arguments) };\n imports.wbg.__wbg_getRandomValues_b3f15fcbfabb0f8b = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_getReader_48e00749fe3f6089 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).getReader();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {\n const ret = getObject(arg0)[arg1 >>> 0];\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(getObject(arg0), getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_get_done_f98a6e62c4e18fb9 = function(arg0) {\n const ret = getObject(arg0).done;\n return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;\n };\n imports.wbg.__wbg_get_value_63e39884ef11812e = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_has_0e670569d65d3a45 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.has(getObject(arg0), getObject(arg1));\n return ret;\n }, arguments) };\n imports.wbg.__wbg_headers_654c30e1bcccc552 = function(arg0) {\n const ret = getObject(arg0).headers;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof ArrayBuffer;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Blob_e9c51ce33a4b6181 = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Blob;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Response_cd74d1c2ac92cb0b = function(arg0) {\n let result;\n try {\n result = getObject(arg0) instanceof Response;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_irohconn_new = function(arg0) {\n const ret = IrohConn.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_irohnode_new = function(arg0) {\n const ret = IrohNode.__wrap(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {\n const ret = Array.isArray(getObject(arg0));\n return ret;\n };\n imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {\n const ret = getObject(arg0).length;\n return ret;\n };\n imports.wbg.__wbg_message_a4e9a39ee8f92b17 = function(arg0, arg1) {\n const ret = getObject(arg1).message;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_msCrypto_d562bbe83e0d4b91 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_1ba21ce319a06297 = function() {\n const ret = new Object();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_25f239778d6112b9 = function() {\n const ret = new Array();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_3c79b3bb1b32b7d3 = function() { return handleError(function () {\n const ret = new Headers();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_7c30d1f874652e62 = function() { return handleError(function (arg0, arg1) {\n const ret = new WebSocket(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_881a222c65f168fc = function() { return handleError(function () {\n const ret = new AbortController();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_df1173567d5ff028 = function(arg0, arg1) {\n const ret = new Error(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {\n try {\n var state0 = {a: arg0, b: arg1};\n var cb0 = (arg0, arg1) => {\n const a = state0.a;\n state0.a = 0;\n try {\n return __wasm_bindgen_func_elem_9100(a, state0.b, arg0, arg1);\n } finally {\n state0.a = a;\n }\n };\n const ret = new Promise(cb0);\n return addHeapObject(ret);\n } finally {\n state0.a = state0.b = 0;\n }\n };\n imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {\n const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_with_byte_offset_and_length_d85c3da1fd8df149 = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_with_str_and_init_c5748f76f5108934 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_new_with_str_sequence_073466a4a5387941 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {\n const ret = getObject(arg0).next();\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_node_e1f24f89a7336c2e = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {\n const ret = getObject(arg0).now();\n return ret;\n };\n imports.wbg.__wbg_now_69d776cd24f5215b = function() {\n const ret = Date.now();\n return ret;\n };\n imports.wbg.__wbg_parse_a09a54cf72639456 = function() { return handleError(function (arg0, arg1) {\n const ret = JSON.parse(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {\n const ret = getObject(arg0).performance;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_process_3975fd6c72f520aa = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_protocol_a74f36816d507cab = function(arg0, arg1) {\n const ret = getObject(arg1).protocol;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {\n Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));\n };\n imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {\n const ret = getObject(arg0).push(getObject(arg1));\n return ret;\n };\n imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {\n const ret = getObject(arg0).queueMicrotask;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {\n queueMicrotask(getObject(arg0));\n };\n imports.wbg.__wbg_randomFillSync_f8c153b79f285817 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_read_39c4b35efcd03c25 = function(arg0) {\n const ret = getObject(arg0).read();\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_readyState_9d0976dcad561aa9 = function(arg0) {\n const ret = getObject(arg0).readyState;\n return ret;\n };\n imports.wbg.__wbg_reason_d4eb9e40592438c2 = function(arg0, arg1) {\n const ret = getObject(arg1).reason;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_releaseLock_a5912f590b185180 = function(arg0) {\n getObject(arg0).releaseLock();\n };\n imports.wbg.__wbg_removeEventListener_54bf92f4a849bd7d = function() { return handleError(function (arg0, arg1, arg2, arg3) {\n getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3));\n }, arguments) };\n imports.wbg.__wbg_require_b74f47fc2d022fd6 = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {\n const ret = Promise.resolve(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_respond_9f7fc54636c4a3af = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).respond(arg1 >>> 0);\n }, arguments) };\n imports.wbg.__wbg_send_7cc36bb628044281 = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).send(getStringFromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_send_ea59e150ab5ebe08 = function() { return handleError(function (arg0, arg1, arg2) {\n getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));\n }, arguments) };\n imports.wbg.__wbg_setTimeout_2b111259203a2623 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).setTimeout(takeObject(arg1), arg2);\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_setTimeout_cb2a856ba8315e7a = function(arg0, arg1) {\n const ret = setTimeout(getObject(arg0), arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_169e13b608078b7b = function(arg0, arg1, arg2) {\n getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));\n };\n imports.wbg.__wbg_set_binaryType_73e8c75df97825f8 = function(arg0, arg1) {\n getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];\n };\n imports.wbg.__wbg_set_body_8e743242d6076a4f = function(arg0, arg1) {\n getObject(arg0).body = getObject(arg1);\n };\n imports.wbg.__wbg_set_cache_0e437c7c8e838b9b = function(arg0, arg1) {\n getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];\n };\n imports.wbg.__wbg_set_credentials_55ae7c3c106fd5be = function(arg0, arg1) {\n getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];\n };\n imports.wbg.__wbg_set_handle_event_14baa3949ef6909d = function(arg0, arg1) {\n getObject(arg0).handleEvent = getObject(arg1);\n };\n imports.wbg.__wbg_set_headers_5671cf088e114d2b = function(arg0, arg1) {\n getObject(arg0).headers = getObject(arg1);\n };\n imports.wbg.__wbg_set_method_76c69e41b3570627 = function(arg0, arg1, arg2) {\n getObject(arg0).method = getStringFromWasm0(arg1, arg2);\n };\n imports.wbg.__wbg_set_mode_611016a6818fc690 = function(arg0, arg1) {\n getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];\n };\n imports.wbg.__wbg_set_onclose_032729b3d7ed7a9e = function(arg0, arg1) {\n getObject(arg0).onclose = getObject(arg1);\n };\n imports.wbg.__wbg_set_onerror_7819daa6af176ddb = function(arg0, arg1) {\n getObject(arg0).onerror = getObject(arg1);\n };\n imports.wbg.__wbg_set_onmessage_71321d0bed69856c = function(arg0, arg1) {\n getObject(arg0).onmessage = getObject(arg1);\n };\n imports.wbg.__wbg_set_onopen_6d4abedb27ba5656 = function(arg0, arg1) {\n getObject(arg0).onopen = getObject(arg1);\n };\n imports.wbg.__wbg_set_signal_e89be862d0091009 = function(arg0, arg1) {\n getObject(arg0).signal = getObject(arg1);\n };\n imports.wbg.__wbg_signal_3c14fbdc89694b39 = function(arg0) {\n const ret = getObject(arg0).signal;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {\n const ret = typeof global === 'undefined' ? null : global;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n };\n imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {\n const ret = typeof globalThis === 'undefined' ? null : globalThis;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n };\n imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {\n const ret = typeof self === 'undefined' ? null : self;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n };\n imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {\n const ret = typeof window === 'undefined' ? null : window;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n };\n imports.wbg.__wbg_status_9bfc680efca4bdfd = function(arg0) {\n const ret = getObject(arg0).status;\n return ret;\n };\n imports.wbg.__wbg_stringify_655a6390e1f5eb6b = function() { return handleError(function (arg0) {\n const ret = JSON.stringify(getObject(arg0));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {\n const ret = getObject(arg0).then(getObject(arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_url_b6d11838a4f95198 = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_url_df28eef824b04410 = function(arg0, arg1) {\n const ret = getObject(arg1).url;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {\n const ret = getObject(arg0).value;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_4e31226f5e8dc909 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_view_788aaf149deefd2f = function(arg0) {\n const ret = getObject(arg0).view;\n return isLikeNone(ret) ? 0 : addHeapObject(ret);\n };\n imports.wbg.__wbg_wasClean_4154a2d59fdb4dd7 = function(arg0) {\n const ret = getObject(arg0).wasClean;\n return ret;\n };\n imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {\n // Cast intrinsic for `Ref(String) -> Externref`.\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cast_233c3d57156616f0 = function(arg0, arg1) {\n // Cast intrinsic for `Closure(Closure { dtor_idx: 2726, function: Function { arguments: [Externref], shim_idx: 2727, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_9008, __wasm_bindgen_func_elem_9017);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cast_5f9f6a976a48da8d = function(arg0, arg1) {\n // Cast intrinsic for `Closure(Closure { dtor_idx: 1641, function: Function { arguments: [NamedExternref(\"MessageEvent\")], shim_idx: 1645, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4211, __wasm_bindgen_func_elem_4243);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cast_ae3b0b5663a2b301 = function(arg0, arg1) {\n // Cast intrinsic for `Closure(Closure { dtor_idx: 2718, function: Function { arguments: [], shim_idx: 2719, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_8957, __wasm_bindgen_func_elem_8962);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cast_af2643c5b7c8897d = function(arg0, arg1) {\n // Cast intrinsic for `Closure(Closure { dtor_idx: 1283, function: Function { arguments: [], shim_idx: 1285, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3336, __wasm_bindgen_func_elem_3351);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cast_b287904957c405a7 = function(arg0, arg1) {\n // Cast intrinsic for `Closure(Closure { dtor_idx: 1355, function: Function { arguments: [], shim_idx: 1356, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.\n const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_3681, __wasm_bindgen_func_elem_3697);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {\n // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref(\"Uint8Array\")`.\n const ret = getArrayU8FromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_cast_f6761355e6c536dc = function(arg0, arg1) {\n // Cast intrinsic for `Closure(Closure { dtor_idx: 184, function: Function { arguments: [NamedExternref(\"CloseEvent\")], shim_idx: 216, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.\n const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1191, __wasm_bindgen_func_elem_1694);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n\n return imports;\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('ghostly_iroh_web_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n"],"mappings":";AAAA,IAAI;AAEJ,SAAS,cAAc,KAAK;CACxB,IAAI,cAAc,KAAK,QAAQ,KAAK,KAAK,KAAK,SAAS,CAAC;CACxD,MAAM,MAAM;CACZ,YAAY,KAAK;CAEjB,KAAK,OAAO;CACZ,OAAO;AACX;AAEA,IAAM,gBAAiB,OAAO,yBAAyB,cACjD;CAAE,gBAAgB,CAAC;CAAG,kBAAkB,CAAC;AAAE,IAC3C,IAAI,sBAAqB,UAAS,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,CAAC;AAEpE,SAAS,YAAY,KAAK;CAEtB,MAAM,OAAO,OAAO;CACpB,IAAI,QAAQ,YAAY,QAAQ,aAAa,OAAO,MAChD,OAAQ,GAAG;CAEf,IAAI,QAAQ,UACR,OAAO,IAAI,IAAI;CAEnB,IAAI,QAAQ,UAAU;EAClB,MAAM,cAAc,IAAI;EACxB,IAAI,eAAe,MACf,OAA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