@ghostlytools/sdk 1.2.4 → 1.3.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.
Files changed (33) hide show
  1. package/dist/app.js +10 -4
  2. package/dist/app.js.map +1 -1
  3. package/dist/core.js +2 -2
  4. package/dist/{fakes-JOzOFxn3.js → fakes-Bpy2WRVB.js} +2 -2
  5. package/dist/{fakes-JOzOFxn3.js.map → fakes-Bpy2WRVB.js.map} +1 -1
  6. package/dist/fakes.js +1 -1
  7. package/dist/index.js +2 -2
  8. package/dist/{keet-identity-key-BLli1rE4.js → keet-identity-key-DypfAhWn.js} +2 -2
  9. package/dist/{keet-identity-key-BLli1rE4.js.map → keet-identity-key-DypfAhWn.js.map} +1 -1
  10. package/dist/{src-BqHTnRWH.js → src-CXmIA8pL.js} +889 -119
  11. package/dist/src-CXmIA8pL.js.map +1 -0
  12. package/dist/testing.js +3 -3
  13. package/dist/types/core/src/appBundle.d.ts +28 -0
  14. package/dist/types/core/src/chatFiles.d.ts +41 -1
  15. package/dist/types/core/src/datalink.d.ts +13 -7
  16. package/dist/types/core/src/dhtDelivery.d.ts +22 -0
  17. package/dist/types/core/src/frames.d.ts +5 -0
  18. package/dist/types/core/src/ghostlink.d.ts +76 -3
  19. package/dist/types/core/src/groupCommunity.d.ts +41 -7
  20. package/dist/types/core/src/groupFiles.d.ts +6 -2
  21. package/dist/types/core/src/groupSession.d.ts +38 -5
  22. package/dist/types/core/src/groupSignals.d.ts +2 -0
  23. package/dist/types/core/src/link.d.ts +18 -0
  24. package/dist/types/core/src/miniApp.d.ts +10 -4
  25. package/dist/types/core/src/pairedCapabilities.d.ts +6 -1
  26. package/dist/types/core/src/pkarr.d.ts +6 -0
  27. package/dist/types/core/src/relay.d.ts +38 -4
  28. package/dist/types/core/src/relayBreaker.d.ts +4 -1
  29. package/dist/types/core/src/transport.d.ts +5 -0
  30. package/dist/{verify-RjMx7eW6.js → verify-Bxi3-0i6.js} +2 -2
  31. package/dist/{verify-RjMx7eW6.js.map → verify-Bxi3-0i6.js.map} +1 -1
  32. package/package.json +1 -1
  33. package/dist/src-BqHTnRWH.js.map +0 -1
@@ -98,6 +98,8 @@ export declare class CarriedTransport implements PkarrTransport {
98
98
  /** My last packet while the edge is down: what a member that just became reachable is handed. */
99
99
  private mine;
100
100
  private lastTimestamp;
101
+ /** The date each packet `stamp` signed carries: the relays' transport takes it rather than check the signature again. */
102
+ private readonly dated;
101
103
  /** My newest packet, wherever it went: what the edge hands the member over itself once it is ready (`linkReady`). */
102
104
  private newest;
103
105
  /** The newest packet of the member's that came through a carrier, and the timestamp of the one a read last returned. */
@@ -67,6 +67,15 @@ export declare const STALLED_LOOK_MS = 15000;
67
67
  export declare const DEPARTED_READ_MS = 30000;
68
68
  /** A chat whose contact was never seen (an invite just sent) keeps looking at the active pace this long. */
69
69
  export declare const AWAITING_PEER_MS: number;
70
+ /**
71
+ * An invite this side made that nobody used, once no longer awaited (`AWAITING_PEER_MS`), is read less often the older
72
+ * it is: a fifth of its age between reads, up to this. Read at the background pace instead, 15 unused invites (their
73
+ * keys and their mailboxes) asked the relays for 60 reads a minute for as long as the app ran: the relays' minute went
74
+ * to invites nobody may ever open, and a join on one was noticed 90 s later (bug hunt 1013-1642, 2026-10-13).
75
+ */
76
+ export declare const UNUSED_INVITE_WAIT_MAX_MS: number;
77
+ /** The wait between reads of an unused invite of age `age` (`UNUSED_INVITE_WAIT_MAX_MS`), never shorter than the pace's `interval`. */
78
+ export declare function unusedInviteWait(age: number, interval: number): number;
70
79
  /**
71
80
  * A group link's peer whose packet advertises and carries no `_tr` on every read for this long publishes none: what it
72
81
  * said before is forgotten (WISP 902 § Transports). Not at the first such packet: an app with no WebRTC (a Linux
@@ -169,6 +178,11 @@ export interface LinkSessionOptions {
169
178
  * sent at once) went out for a minute (2026-10-08).
170
179
  */
171
180
  awaitingSince?: number;
181
+ /**
182
+ * Whether this is an invite this side made that nobody used yet, or one it joined whose inviter never answered: once no
183
+ * longer awaited, read less often while nobody is there (`unusedInviteWait`).
184
+ */
185
+ invite?: () => boolean;
172
186
  }
173
187
  /** With `firstPublish: "after-first-poll"`, the first packet goes out by then whatever happened. */
174
188
  export declare const FIRST_PUBLISH_MAX_MS = 2000;
@@ -213,6 +227,8 @@ export declare class LinkSession {
213
227
  private readonly startedAt;
214
228
  /** From when a peer never seen is awaited (`AWAITING_PEER_MS`): never later than this start, whatever the clock said when the chat was made. */
215
229
  private readonly awaitingSince;
230
+ /** This side's invite, nobody used yet (`LinkSessionOptions.invite`). */
231
+ private readonly invite;
216
232
  private readonly intervals;
217
233
  private fastPollUntil;
218
234
  /** An offer to a saved contact is out: from then on its fast window looks less often (`OFFER_FAST_MS`); 0 for none. */
@@ -337,6 +353,8 @@ export declare class LinkSession {
337
353
  * the one that comes back.
338
354
  */
339
355
  private watching;
356
+ /** A contact never seen, whose invite was sent lately (`AWAITING_PEER_MS`): its join is due. */
357
+ private awaitingPeer;
340
358
  /** How urgently this link looks right now. */
341
359
  private pace;
342
360
  private scheduleHeartbeat;
@@ -75,15 +75,16 @@ export interface MiniAppRequest {
75
75
  * - `bad-path`: a `file` path that is not a string of 1 to 1024 characters.
76
76
  * - `bad-request`: a request that is not `{id, type, args}` with JSON arguments.
77
77
  * - `failed`: anything else; the client's own words never reach the app.
78
- * - `full`: a storage write would take the scope past 5 MiB (each key counts 128 bytes beside its own and its value's),
79
- * so the app can make room.
78
+ * - `full`: a storage write would take the scope past 5 MiB (each key counts 128 bytes, its own bytes eight times and
79
+ * its value's), so the app can make room.
80
80
  * - `no-file`: the bundle has no such file.
81
81
  * - `not-allowed`: `chat.send` without the `chat` permission, or with the app opened alone.
82
82
  * - `not-open`: `chat.send` before this side's chat has the app open.
83
83
  * - `offline`: `chat.send` while the chat's session is not live. Nothing is kept to send later.
84
84
  * - `peer-closed`: `chat.send` while the contact has not opened the app (or its client does not offer `apps/1`).
85
85
  * - `stopped`: a store removed or the publisher revoked the version running.
86
- * - `too-fast`: past 50 requests a second, or past 48 `chat.send` frames a second.
86
+ * - `too-fast`: past 50 requests a second, past 48 `chat.send` frames a second, or a `chat.send` while the chat's
87
+ * connection is still sending earlier ones (back off and send again).
87
88
  * - `too-large`: a request, a stored value or a `chat.send` value past its bound (`MINI_APP_LIMITS`).
88
89
  * - `unknown-type`: a request `type` the broker does not answer.
89
90
  *
@@ -139,7 +140,12 @@ export declare const MINI_APP_LIMITS: {
139
140
  readonly storageValueBytes: number;
140
141
  /** Counted for each stored key beside its own bytes and its value's: what keeping the key costs the device. */
141
142
  readonly storageRowBytes: 128;
142
- /** Everything an app keeps in one scope (per app and per chat, or alone): each key, its value and `storageRowBytes`. */
143
+ /** How many times a stored key's bytes count: the device keeps each key several times, mostly as UTF-16. */
144
+ readonly storageKeyTimes: 8;
145
+ /**
146
+ * Everything an app keeps in one scope (per app and per chat, or alone): for each key `storageRowBytes`, the key's
147
+ * bytes `storageKeyTimes` over and its value's.
148
+ */
143
149
  readonly storageScopeBytes: number;
144
150
  /** One `chat.send` value, serialized: the `paired-app` data cap (decision D5 of the plan). */
145
151
  readonly chatDataBytes: number;
@@ -20,6 +20,11 @@ export declare const SERVICES_CAPABILITY = "services/1";
20
20
  * confirmed byte, checked by digest (`pf-offer` … frames, `chatFiles.ts`). Without it, files/2 and 100 MiB.
21
21
  */
22
22
  export declare const FILES_CAPABILITY = "files/3";
23
+ /**
24
+ * A file's bytes as binary messages (WISP 501 § files/4): beside `files/3`, on a session whose channel carries binary
25
+ * messages, a chunk travels as it is (`encodeFileData`, `chatFiles.ts`) and not as base64url text in a `pf-data` frame.
26
+ */
27
+ export declare const FILES_BINARY_CAPABILITY = "files/4";
23
28
  /** The typing indicator: `paired-typing` frames on this session, 1:1 chats only (WISP 401 § Typing, `pairedTyping.ts`). */
24
29
  export declare const TYPING_CAPABILITY = "typing/1";
25
30
  /** Reactions to messages: `paired-reaction` frames on this session, 1:1 chats only (WISP 401 § Reactions, `reactions.ts`). */
@@ -58,7 +63,7 @@ export declare const APPS_CAPABILITY = "apps/1";
58
63
  * What only a device link offers (WISP 06, `deviceLink.ts`): the frames between a person's own devices. They are in
59
64
  * the type so a device link can announce them, and not in `KNOWN_SESSION_CAPABILITIES`: no chat knows them.
60
65
  */
61
- export type SessionCapability = DeviceCapability | typeof CALLS_CAPABILITY | typeof SERVICES_CAPABILITY | typeof FILES_CAPABILITY | typeof TYPING_CAPABILITY | typeof REACTIONS_CAPABILITY | typeof EDIT_CAPABILITY | typeof WAKE_SESSION_CAPABILITY | typeof PIN_CAPABILITY | typeof STATUS_CARD_CAPABILITY | typeof BUTTONS_CAPABILITY | typeof UPGRADE_CAPABILITY | typeof APPS_CAPABILITY;
66
+ export type SessionCapability = DeviceCapability | typeof CALLS_CAPABILITY | typeof SERVICES_CAPABILITY | typeof FILES_CAPABILITY | typeof FILES_BINARY_CAPABILITY | typeof TYPING_CAPABILITY | typeof REACTIONS_CAPABILITY | typeof EDIT_CAPABILITY | typeof WAKE_SESSION_CAPABILITY | typeof PIN_CAPABILITY | typeof STATUS_CARD_CAPABILITY | typeof BUTTONS_CAPABILITY | typeof UPGRADE_CAPABILITY | typeof APPS_CAPABILITY;
62
67
  /** Every capability this app knows on a session: what `receive` reports changes of. */
63
68
  export declare const KNOWN_SESSION_CAPABILITIES: readonly SessionCapability[];
64
69
  export declare const SESSION_CAPABILITIES_FRAME = "paired-capabilities";
@@ -38,6 +38,12 @@ export declare function openRelayPayload(pubKeyZ32: string, payload: Uint8Array)
38
38
  };
39
39
  /** Verifies and decodes a relay payload. Throws if the signature does not match. */
40
40
  export declare function parseRelayPayload(pubKeyZ32: string, payload: Uint8Array): SignedPacket;
41
+ /**
42
+ * Decodes a payload whose signature this process made or already checked (one it is putting), without checking it
43
+ * again: an Ed25519 verify costs about 1 ms, and a CLI daemon at its relay budget checked its own packets ~500 times a
44
+ * minute. Never for bytes read from elsewhere: `parseRelayPayload` is.
45
+ */
46
+ export declare function readOwnRelayPayload(pubKeyZ32: string, payload: Uint8Array): SignedPacket;
41
47
  /** How far ahead of this clock a packet's time may be and still count as now: clocks drift, not by this much. */
42
48
  export declare const PKARR_FUTURE_SKEW_MS: number;
43
49
  /**
@@ -40,8 +40,8 @@ export declare const BACKGROUND_REQUESTS_PER_MINUTE = 20;
40
40
  export declare const WRITE_FIRST_MS = 5000;
41
41
  /**
42
42
  * Once a 1:1 chat needs the relays (the budget refused one of its requests there, or it read urgently anywhere: it polls
43
- * fast for a signal due any moment), group requests leave it the last this many of each minute, for a minute. Groups
44
- * that spend the whole budget spend it over the minute, so the chat then takes the next request that frees, within
43
+ * fast for a signal due any moment), group requests and background ones leave it the last this many of each minute (more
44
+ * for several chats, `CHAT_RESERVE_PER_CHAT`), for a minute. Groups that spend the whole budget spend it over the minute, so the chat then takes the next request that frees, within
45
45
  * seconds, and has room for what follows (the receipt). Waiting for a refusal was too late when a contact went away
46
46
  * from a chat and from groups at once: the chat and the groups' edges all watched fast for it, the edges spent both
47
47
  * relays' minute in 40 s, and the chat read the contact's offer half a minute late (2026-09-27). A chat with nothing
@@ -51,6 +51,18 @@ export declare const WRITE_FIRST_MS = 5000;
51
51
  * live in 18 s held a group's edge that had just missed its read for 48 s more (bug hunt r6a, 2026-09-29).
52
52
  */
53
53
  export declare const CHAT_RESERVE = 10;
54
+ /**
55
+ * …and more while several chats need the relays at once: this many requests each (a read, an offer or answer, the read
56
+ * for the answer to it), up to `CHAT_RESERVE_MOST_SHARE` of the minute. Background requests leave it too, not the
57
+ * groups' alone: the looks of chats whose contacts are not there, and their presence (upkeep, `LinkSession`). An app
58
+ * opened while 30 of its 50 chats' contacts were online spent both relays' minute in its first second, on the presence
59
+ * of the chats whose contacts were long gone, its groups' records and every chat's first read: 12 of the 30 offers and
60
+ * answers went out, no read for an answer could, and 0 of the 30 chats were live 60 s after the start (bug hunt,
61
+ * 2026-10-13).
62
+ */
63
+ export declare const CHAT_RESERVE_PER_CHAT = 3;
64
+ /** The most of a relay's minute the chats' reserve takes, however many chats need it: the rest stays for everything else. */
65
+ export declare const CHAT_RESERVE_MOST_SHARE: number;
54
66
  /**
55
67
  * A 1:1 chat's signaling (a new offer or answer, and its reads for the answer to its offer, `signal`) may go over a
56
68
  * relay's minute by this fraction of it: 6 on a relay of 30, 12 on one of 60, 1 on relay.pkarr.org's 5 (it allows 10),
@@ -296,18 +308,38 @@ export declare class RelayTransport implements PkarrTransport {
296
308
  nextTimestamp(pubKeyZ32: string): bigint;
297
309
  /**
298
310
  * Signs the records, dated by `nextTimestamp`, and hands the payload to `put` (the relays; the CLI adds the DHT).
311
+ * When every relay's budget (or rate limit) holds this asker back, it throws that wait before signing anything
312
+ * (`publishWait`): a daemon at its budget signed about 500 packets a minute that never went out. `elsewhere`: `put`
313
+ * also takes the packet where no budget holds it back (the CLI's DHT), so it is signed whatever the relays say.
299
314
  * `put` calls `conflict` for a relay that answered 409: it holds a packet under this key dated at or after this one,
300
315
  * which this client has not read (an inviter's warm packet under the key it gave its contact, from a clock ahead of
301
316
  * this one). That packet is read from that relay, and the records go again dated just past it, once. Without this
302
317
  * the packet was refused until this device's clock passed the other one's, however long that took, and on a relay
303
318
  * that did take it, readers still preferred the later-dated empty packet of another relay.
304
319
  */
305
- publishDated(identity: Identity, records: GhostRecord[], put: (pubKeyZ32: string, payload: Uint8Array, timestamp: bigint, conflict: (relay: string) => void) => Promise<void>, options?: PkarrRequestOptions, again?: boolean): Promise<void>;
320
+ publishDated(identity: Identity, records: GhostRecord[], put: (pubKeyZ32: string, payload: Uint8Array, timestamp: bigint, conflict: (relay: string) => void) => Promise<void>, options?: PkarrRequestOptions, again?: boolean, elsewhere?: boolean): Promise<void>;
321
+ /**
322
+ * How long until some relay takes a publish of this asker, and why each holds it back; null when one would now. Walks the relays as `put` does,
323
+ * without asking any: a relay the budget holds back gets its refused `take` (the asker's write then waits first in
324
+ * line, as when `put` is refused), one rate limiting or throttling this address is a wait, one left alone for failing
325
+ * is none. Null too when a relay fails another way (its network cooling down): the publish then goes, and fails, as
326
+ * before, and when no relay is held back at all.
327
+ */
328
+ private publishWait;
306
329
  /** One relay's packet for a key, read now: its time, kept for `nextTimestamp`. Null when it has none or does not answer. */
307
330
  private heldAt;
308
331
  /** A packet under this key was read (on a relay, or by the CLI on the DHT): its time, for `nextTimestamp`. */
309
332
  sawTimestamp(pubKeyZ32: string, timestamp: bigint): void;
310
- /** Puts a payload signed elsewhere (a did:dht document), byte for byte, on every relay. `conflict`: as `publishDated` gives it. */
333
+ /**
334
+ * Puts a payload `publishDated` just signed, dated `timestamp`, on every relay. Its signature is not checked: it was
335
+ * made here (`publishPayload` checks one signed elsewhere, to read its sequence number). `conflict`: as `publishDated`
336
+ * gives it.
337
+ */
338
+ putSigned(pubKeyZ32: string, payload: Uint8Array, timestamp: bigint, options?: PkarrRequestOptions, conflict?: (relay: string) => void): Promise<void>;
339
+ /**
340
+ * Puts a payload signed elsewhere (a did:dht document), byte for byte, on every relay; one signed here says its date
341
+ * (`signedAt`) and is not checked again. `conflict`: as `publishDated` gives it.
342
+ */
311
343
  publishPayload(pubKeyZ32: string, payload: Uint8Array, options?: PkarrRequestOptions, conflict?: (relay: string) => void): Promise<void>;
312
344
  /**
313
345
  * Puts the packet on every relay and settles as soon as one of them took it. A relay that is slow to
@@ -412,6 +444,8 @@ export declare class RelayTransport implements PkarrTransport {
412
444
  private chatReservedFor;
413
445
  /** Requests allowed to this relay a minute: this client's budget, or the relay's own share (`RELAY_REQUESTS_PER_MINUTE`). */
414
446
  private limitOf;
447
+ /** What the chats that need the relays keep on this relay (`CHAT_RESERVE_PER_CHAT`), never less than `reserveOf`. */
448
+ private chatReserveOf;
415
449
  /** What groups leave a chat on this relay: `CHAT_RESERVE`, or a third of a smaller budget. */
416
450
  private reserveOf;
417
451
  private isCoolingDown;
@@ -87,7 +87,10 @@ export declare class RelayBreaker {
87
87
  cancel(relay: string): void;
88
88
  /** The relay answered: whatever was wrong is over. */
89
89
  success(relay: string): void;
90
- /** The relay failed a request; a probe that fails trips it again at once. */
90
+ /**
91
+ * The relay failed a request; a probe that fails trips it again at once. While it is left alone and no probe is out,
92
+ * a failure is a request sent before it tripped (a start burst): already counted in, it trips nothing again.
93
+ */
91
94
  failure(relay: string, kind: RelayFailure, reason: string): void;
92
95
  private trip;
93
96
  /** How long until a relay left alone is asked again: its wait, or the next probe while every relay of `relays` is left alone. */
@@ -55,6 +55,11 @@ export interface PkarrRequestOptions {
55
55
  * restarts publishes its offer then. A few may go over the relay's minute (`DEPARTED_READS` in relay.ts).
56
56
  */
57
57
  departed?: boolean;
58
+ /**
59
+ * `publishPayload` only: the payload was signed in this process, dated so (a group edge's, `CarriedTransport`). Its
60
+ * signature is not checked again on the way to the relays, as `RelayTransport.putSigned`'s is not.
61
+ */
62
+ signedAt?: bigint;
58
63
  }
59
64
  /**
60
65
  * `transport` with `extra` added to every request's options: a group's edges say `group` so. The optional methods
@@ -1,4 +1,4 @@
1
- import { Ql as boundVerifiedIdentity } from "./src-BqHTnRWH.js";
1
+ import { uu as boundVerifiedIdentity } from "./src-CXmIA8pL.js";
2
2
  //#region ../browser/src/proofs/verify.ts
3
3
  var DAY = 86400;
4
4
  /**
@@ -103,4 +103,4 @@ function boundedIdentityFetch(options = { online: () => true }) {
103
103
  //#endregion
104
104
  export { verifyIdentity as i, boundedIdentityFetch as n, descriptorProblems as r, availableSigners as t };
105
105
 
106
- //# sourceMappingURL=verify-RjMx7eW6.js.map
106
+ //# sourceMappingURL=verify-Bxi3-0i6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify-RjMx7eW6.js","names":[],"sources":["../../browser/src/proofs/verify.ts"],"sourcesContent":["import { boundVerifiedIdentity, IDENTITY_MAX_EVIDENCE, IDENTITY_MAX_VALIDITY, type IdentityStatement, type VerifiedIdentity } from \"@ghostly/core\";\nimport type { IdentityFetch, IdentityProofProvider, IdentitySigner, VerifyContext } from \"./contract\";\n\nconst DAY = 86_400;\n\n/**\n * The checks every proof goes through, whatever its provider: known provider, validity within the\n * provider's limit, bounded evidence, strict parsing, the provider's own check, and the category rule\n * (a self-custodied proof proves exactly the subject it names; an attested one says who attests it).\n * The engine verifies a contact's proof, and the person's own proof before saving it, only through this.\n */\nexport async function verifyIdentity(providers: readonly IdentityProofProvider[], statement: IdentityStatement, evidence: unknown, ctx: VerifyContext): Promise<VerifiedIdentity> {\n const { binding } = statement;\n const provider = providers.find(p => p.id === binding.provider);\n if (!provider) throw new Error(\"This app cannot verify this kind of identity\");\n if (binding.expiresAt - binding.issuedAt > Math.min(provider.validity.maxDays * DAY, IDENTITY_MAX_VALIDITY)) throw new Error(\"The proof lasts longer than this kind of identity allows\");\n if (JSON.stringify(evidence ?? null).length > IDENTITY_MAX_EVIDENCE) throw new Error(\"Evidence too large\");\n const parsed = provider.parseEvidence(evidence);\n const verified = boundVerifiedIdentity(await provider.verify(statement, parsed, ctx));\n if (provider.category === \"self-custodied\" && verified.subject !== binding.subject) throw new Error(\"The evidence is for another identity\");\n if (provider.category === \"provider-attested\" && !verified.attester) throw new Error(\"The evidence does not say who attests it\");\n return verified;\n}\n\n/** Problems with a provider's descriptor, empty when it is well-formed. The registry and the contract suite use it. */\nexport function descriptorProblems(p: IdentityProofProvider): string[] {\n const problems: string[] = [];\n if (!/^[a-z][a-z0-9-]{0,31}$/.test(p.id)) problems.push(\"id must match ^[a-z][a-z0-9-]{0,31}$\");\n if (!p.label?.trim()) problems.push(\"label is empty\");\n if (!p.description?.trim()) problems.push(\"description is empty\");\n if (!p.privacy?.trim()) problems.push(\"privacy is empty: say what verify contacts\");\n if (p.category !== \"self-custodied\" && p.category !== \"provider-attested\") problems.push(\"category is unknown\");\n if (!p.platforms.length) problems.push(\"no platforms\");\n const { defaultDays, maxDays } = p.validity;\n if (!(Number.isInteger(defaultDays) && Number.isInteger(maxDays) && defaultDays >= 1 && defaultDays <= maxDays && maxDays * DAY <= IDENTITY_MAX_VALIDITY)) problems.push(\"validity must be whole days, 1 ≤ default ≤ max ≤ 400\");\n if (p.recheck && !(Number.isInteger(p.recheck.afterSeconds) && p.recheck.afterSeconds >= 60)) problems.push(\"recheck.afterSeconds must be at least 60\");\n if (!p.signers.length) problems.push(\"no signers\");\n const ids = p.signers.map(s => s.id);\n if (new Set(ids).size !== ids.length) problems.push(\"signer ids are not unique\");\n for (const s of p.signers as readonly IdentitySigner<unknown>[]) {\n if (![\"in-app\", \"external-tool\", \"redirect\", \"publish\"].includes(s.kind)) problems.push(`signer ${s.id} has an unknown kind`);\n if (s.kind === \"in-app\" && typeof s.run !== \"function\") problems.push(`signer ${s.id} has no run()`);\n if (s.kind === \"external-tool\" && (typeof s.instructions !== \"function\" || typeof s.parse !== \"function\")) problems.push(`signer ${s.id} needs instructions() and parse()`);\n if (s.kind === \"redirect\" && typeof s.start !== \"function\") problems.push(`signer ${s.id} has no start()`);\n if (s.kind === \"publish\" && (typeof s.instructions !== \"function\" || typeof s.evidence !== \"function\")) problems.push(`signer ${s.id} needs instructions() and evidence()`);\n }\n return problems;\n}\n\n/** Signers of a provider that run on this platform and are available in this window. */\nexport function availableSigners<E>(p: IdentityProofProvider<E>, platform: IdentityProofProvider[\"platforms\"][number]): IdentitySigner<E>[] {\n return p.signers.filter(s => (s.platforms ?? p.platforms).includes(platform) && (s.available?.() ?? true));\n}\n\n/**\n * The engine's `ctx.fetch`: HTTPS GET only, no credentials or referrer, a time-out, a size cap,\n * redirects refused unless asked for.\n * `online` false refuses everything (the person turned the network off).\n */\nexport function boundedIdentityFetch(options: { online: () => boolean; timeoutMs?: number; fetcher?: typeof fetch } = { online: () => true }): IdentityFetch {\n return async (url, { headers, maxBytes = 64 * 1024, signal, redirect = \"error\" } = {}) => {\n if (!options.online()) throw new Error(\"Offline: this identity cannot be checked now\");\n const target = new URL(url);\n if (target.protocol !== \"https:\" || target.username || target.password) throw new Error(\"Identity checks use HTTPS only\");\n const timeout = AbortSignal.timeout(options.timeoutMs ?? 10_000);\n const response = await (options.fetcher ?? fetch)(target.href, {\n headers, signal: signal ? AbortSignal.any([signal, timeout]) : timeout,\n credentials: \"omit\", referrerPolicy: \"no-referrer\", cache: \"no-store\", redirect,\n });\n if (Number(response.headers.get(\"content-length\")) > maxBytes) throw new Error(\"Identity check response too large\");\n const reader = response.body?.getReader();\n const parts: Uint8Array[] = [];\n let length = 0;\n if (reader) {\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n length += value.length;\n if (length > maxBytes) throw new Error(\"Identity check response too large\");\n parts.push(value);\n }\n } finally { await reader.cancel().catch(() => {}); }\n }\n const bytes = new Uint8Array(length);\n let offset = 0;\n for (const part of parts) { bytes.set(part, offset); offset += part.length; }\n return { status: response.status, contentType: response.headers.get(\"content-type\") ?? \"\", text: new TextDecoder().decode(bytes), bytes };\n };\n}\n"],"mappings":";;AAGA,IAAM,MAAM;;;;;;;AAQZ,eAAsB,eAAe,WAA6C,WAA8B,UAAmB,KAA+C;CAChL,MAAM,EAAE,YAAY;CACpB,MAAM,WAAW,UAAU,MAAK,MAAK,EAAE,OAAO,QAAQ,QAAQ;CAC9D,IAAI,CAAC,UAAU,MAAM,IAAI,MAAM,8CAA8C;CAC7E,IAAI,QAAQ,YAAY,QAAQ,WAAW,KAAK,IAAI,SAAS,SAAS,UAAU,KAAA,MAA0B,GAAG,MAAM,IAAI,MAAM,0DAA0D;CACvL,IAAI,KAAK,UAAU,YAAY,IAAI,CAAC,CAAC,SAAA,OAAgC,MAAM,IAAI,MAAM,oBAAoB;CACzG,MAAM,SAAS,SAAS,cAAc,QAAQ;CAC9C,MAAM,WAAW,sBAAsB,MAAM,SAAS,OAAO,WAAW,QAAQ,GAAG,CAAC;CACpF,IAAI,SAAS,aAAa,oBAAoB,SAAS,YAAY,QAAQ,SAAS,MAAM,IAAI,MAAM,sCAAsC;CAC1I,IAAI,SAAS,aAAa,uBAAuB,CAAC,SAAS,UAAU,MAAM,IAAI,MAAM,0CAA0C;CAC/H,OAAO;AACT;;AAGA,SAAgB,mBAAmB,GAAoC;CACrE,MAAM,WAAqB,CAAC;CAC5B,IAAI,CAAC,yBAAyB,KAAK,EAAE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AS,UAAU,MAAM,IAAI,MAAM,mCAAmC;IAC1E,MAAM,KAAK,KAAK;GAClB;EACF,UAAU;GAAE,MAAM,OAAO,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;EAAG;EAErD,MAAM,QAAQ,IAAI,WAAW,MAAM;EACnC,IAAI,SAAS;EACb,KAAK,MAAM,QAAQ,OAAO;GAAE,MAAM,IAAI,MAAM,MAAM;GAAG,UAAU,KAAK;EAAQ;EAC5E,OAAO;GAAE,QAAQ,SAAS;GAAQ,aAAa,SAAS,QAAQ,IAAI,cAAc,KAAK;GAAI,MAAM,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK;GAAG;EAAM;CAC1I;AACF"}
1
+ {"version":3,"file":"verify-Bxi3-0i6.js","names":[],"sources":["../../browser/src/proofs/verify.ts"],"sourcesContent":["import { boundVerifiedIdentity, IDENTITY_MAX_EVIDENCE, IDENTITY_MAX_VALIDITY, type IdentityStatement, type VerifiedIdentity } from \"@ghostly/core\";\nimport type { IdentityFetch, IdentityProofProvider, IdentitySigner, VerifyContext } from \"./contract\";\n\nconst DAY = 86_400;\n\n/**\n * The checks every proof goes through, whatever its provider: known provider, validity within the\n * provider's limit, bounded evidence, strict parsing, the provider's own check, and the category rule\n * (a self-custodied proof proves exactly the subject it names; an attested one says who attests it).\n * The engine verifies a contact's proof, and the person's own proof before saving it, only through this.\n */\nexport async function verifyIdentity(providers: readonly IdentityProofProvider[], statement: IdentityStatement, evidence: unknown, ctx: VerifyContext): Promise<VerifiedIdentity> {\n const { binding } = statement;\n const provider = providers.find(p => p.id === binding.provider);\n if (!provider) throw new Error(\"This app cannot verify this kind of identity\");\n if (binding.expiresAt - binding.issuedAt > Math.min(provider.validity.maxDays * DAY, IDENTITY_MAX_VALIDITY)) throw new Error(\"The proof lasts longer than this kind of identity allows\");\n if (JSON.stringify(evidence ?? null).length > IDENTITY_MAX_EVIDENCE) throw new Error(\"Evidence too large\");\n const parsed = provider.parseEvidence(evidence);\n const verified = boundVerifiedIdentity(await provider.verify(statement, parsed, ctx));\n if (provider.category === \"self-custodied\" && verified.subject !== binding.subject) throw new Error(\"The evidence is for another identity\");\n if (provider.category === \"provider-attested\" && !verified.attester) throw new Error(\"The evidence does not say who attests it\");\n return verified;\n}\n\n/** Problems with a provider's descriptor, empty when it is well-formed. The registry and the contract suite use it. */\nexport function descriptorProblems(p: IdentityProofProvider): string[] {\n const problems: string[] = [];\n if (!/^[a-z][a-z0-9-]{0,31}$/.test(p.id)) problems.push(\"id must match ^[a-z][a-z0-9-]{0,31}$\");\n if (!p.label?.trim()) problems.push(\"label is empty\");\n if (!p.description?.trim()) problems.push(\"description is empty\");\n if (!p.privacy?.trim()) problems.push(\"privacy is empty: say what verify contacts\");\n if (p.category !== \"self-custodied\" && p.category !== \"provider-attested\") problems.push(\"category is unknown\");\n if (!p.platforms.length) problems.push(\"no platforms\");\n const { defaultDays, maxDays } = p.validity;\n if (!(Number.isInteger(defaultDays) && Number.isInteger(maxDays) && defaultDays >= 1 && defaultDays <= maxDays && maxDays * DAY <= IDENTITY_MAX_VALIDITY)) problems.push(\"validity must be whole days, 1 ≤ default ≤ max ≤ 400\");\n if (p.recheck && !(Number.isInteger(p.recheck.afterSeconds) && p.recheck.afterSeconds >= 60)) problems.push(\"recheck.afterSeconds must be at least 60\");\n if (!p.signers.length) problems.push(\"no signers\");\n const ids = p.signers.map(s => s.id);\n if (new Set(ids).size !== ids.length) problems.push(\"signer ids are not unique\");\n for (const s of p.signers as readonly IdentitySigner<unknown>[]) {\n if (![\"in-app\", \"external-tool\", \"redirect\", \"publish\"].includes(s.kind)) problems.push(`signer ${s.id} has an unknown kind`);\n if (s.kind === \"in-app\" && typeof s.run !== \"function\") problems.push(`signer ${s.id} has no run()`);\n if (s.kind === \"external-tool\" && (typeof s.instructions !== \"function\" || typeof s.parse !== \"function\")) problems.push(`signer ${s.id} needs instructions() and parse()`);\n if (s.kind === \"redirect\" && typeof s.start !== \"function\") problems.push(`signer ${s.id} has no start()`);\n if (s.kind === \"publish\" && (typeof s.instructions !== \"function\" || typeof s.evidence !== \"function\")) problems.push(`signer ${s.id} needs instructions() and evidence()`);\n }\n return problems;\n}\n\n/** Signers of a provider that run on this platform and are available in this window. */\nexport function availableSigners<E>(p: IdentityProofProvider<E>, platform: IdentityProofProvider[\"platforms\"][number]): IdentitySigner<E>[] {\n return p.signers.filter(s => (s.platforms ?? p.platforms).includes(platform) && (s.available?.() ?? true));\n}\n\n/**\n * The engine's `ctx.fetch`: HTTPS GET only, no credentials or referrer, a time-out, a size cap,\n * redirects refused unless asked for.\n * `online` false refuses everything (the person turned the network off).\n */\nexport function boundedIdentityFetch(options: { online: () => boolean; timeoutMs?: number; fetcher?: typeof fetch } = { online: () => true }): IdentityFetch {\n return async (url, { headers, maxBytes = 64 * 1024, signal, redirect = \"error\" } = {}) => {\n if (!options.online()) throw new Error(\"Offline: this identity cannot be checked now\");\n const target = new URL(url);\n if (target.protocol !== \"https:\" || target.username || target.password) throw new Error(\"Identity checks use HTTPS only\");\n const timeout = AbortSignal.timeout(options.timeoutMs ?? 10_000);\n const response = await (options.fetcher ?? fetch)(target.href, {\n headers, signal: signal ? AbortSignal.any([signal, timeout]) : timeout,\n credentials: \"omit\", referrerPolicy: \"no-referrer\", cache: \"no-store\", redirect,\n });\n if (Number(response.headers.get(\"content-length\")) > maxBytes) throw new Error(\"Identity check response too large\");\n const reader = response.body?.getReader();\n const parts: Uint8Array[] = [];\n let length = 0;\n if (reader) {\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n length += value.length;\n if (length > maxBytes) throw new Error(\"Identity check response too large\");\n parts.push(value);\n }\n } finally { await reader.cancel().catch(() => {}); }\n }\n const bytes = new Uint8Array(length);\n let offset = 0;\n for (const part of parts) { bytes.set(part, offset); offset += part.length; }\n return { status: response.status, contentType: response.headers.get(\"content-type\") ?? \"\", text: new TextDecoder().decode(bytes), bytes };\n };\n}\n"],"mappings":";;AAGA,IAAM,MAAM;;;;;;;AAQZ,eAAs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
2
2
  "name": "@ghostlytools/sdk",
3
- "version": "1.2.4",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "description": "Build a wallet source, an identity proof, a mini-app or a client for Ghostly without reading its internals: the adapter contracts, their fakes and contract test suites, the plugin registry, and the mini-app API types (Apps run in Ghostly 1.2 and later).",
6
6
  "license": "MIT",