@sempdev/semp 0.5.2 → 0.5.5

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 (218) hide show
  1. package/dist/brief/address.d.ts +1 -1
  2. package/dist/brief/address.js +1 -1
  3. package/dist/brief/brief.d.ts +1 -1
  4. package/dist/brief/brief.js +1 -1
  5. package/dist/canonical/marshal.d.ts +2 -2
  6. package/dist/canonical/marshal.js +2 -2
  7. package/dist/closure/driver.d.ts +2 -2
  8. package/dist/closure/driver.js +1 -1
  9. package/dist/crypto/aead.d.ts +2 -2
  10. package/dist/crypto/aead.js +2 -2
  11. package/dist/crypto/kdf.d.ts +1 -1
  12. package/dist/crypto/kdf.js +1 -1
  13. package/dist/crypto/mac.d.ts +1 -1
  14. package/dist/crypto/mac.js +1 -1
  15. package/dist/delivery/ack.d.ts +5 -5
  16. package/dist/delivery/ack.js +6 -6
  17. package/dist/delivery/blocklist.d.ts +1 -1
  18. package/dist/delivery/blocklist.js +2 -2
  19. package/dist/delivery/device_sync.d.ts +26 -0
  20. package/dist/delivery/device_sync.d.ts.map +1 -0
  21. package/dist/delivery/device_sync.js +18 -0
  22. package/dist/delivery/device_sync.js.map +1 -0
  23. package/dist/delivery/disposition.d.ts +1 -1
  24. package/dist/delivery/fetch.d.ts +1 -1
  25. package/dist/delivery/fetch.js +1 -1
  26. package/dist/delivery/inbox.d.ts +2 -2
  27. package/dist/delivery/inbox.js +2 -2
  28. package/dist/delivery/index.d.ts +4 -0
  29. package/dist/delivery/index.d.ts.map +1 -1
  30. package/dist/delivery/index.js +4 -0
  31. package/dist/delivery/index.js.map +1 -1
  32. package/dist/delivery/persistent_silent.d.ts +70 -0
  33. package/dist/delivery/persistent_silent.d.ts.map +1 -0
  34. package/dist/delivery/persistent_silent.js +117 -0
  35. package/dist/delivery/persistent_silent.js.map +1 -0
  36. package/dist/delivery/pipeline.d.ts +4 -4
  37. package/dist/delivery/pipeline.js +2 -2
  38. package/dist/delivery/policy_state.d.ts +2 -2
  39. package/dist/delivery/policy_state.js +4 -4
  40. package/dist/delivery/receipt.d.ts +3 -3
  41. package/dist/delivery/receipt.js +3 -3
  42. package/dist/delivery/receipt_store.d.ts +1 -1
  43. package/dist/delivery/receipt_store.js +1 -1
  44. package/dist/delivery/retry.d.ts +2 -2
  45. package/dist/delivery/retry.js +2 -2
  46. package/dist/delivery/scheduler.d.ts +1 -1
  47. package/dist/delivery/scheduler.js +1 -1
  48. package/dist/delivery/stage_partition.d.ts +1 -1
  49. package/dist/delivery/stage_partition.js +1 -1
  50. package/dist/delivery/staged_runner.d.ts +1 -1
  51. package/dist/delivery/staged_runner.js +2 -2
  52. package/dist/delivery/status_message.d.ts +75 -0
  53. package/dist/delivery/status_message.d.ts.map +1 -0
  54. package/dist/delivery/status_message.js +109 -0
  55. package/dist/delivery/status_message.js.map +1 -0
  56. package/dist/delivery/upgrade_signal.d.ts +48 -0
  57. package/dist/delivery/upgrade_signal.d.ts.map +1 -0
  58. package/dist/delivery/upgrade_signal.js +48 -0
  59. package/dist/delivery/upgrade_signal.js.map +1 -0
  60. package/dist/discovery/configuration.d.ts +20 -1
  61. package/dist/discovery/configuration.d.ts.map +1 -1
  62. package/dist/discovery/configuration.js.map +1 -1
  63. package/dist/discovery/dns.d.ts +27 -1
  64. package/dist/discovery/dns.d.ts.map +1 -1
  65. package/dist/discovery/dns.js +37 -0
  66. package/dist/discovery/dns.js.map +1 -1
  67. package/dist/discovery/index.d.ts +2 -2
  68. package/dist/discovery/index.d.ts.map +1 -1
  69. package/dist/discovery/index.js +1 -1
  70. package/dist/discovery/index.js.map +1 -1
  71. package/dist/discovery/partition.d.ts +1 -1
  72. package/dist/discovery/partition.js +1 -1
  73. package/dist/discovery/resolver.d.ts +5 -5
  74. package/dist/discovery/resolver.js +5 -5
  75. package/dist/discovery/txt.d.ts +1 -1
  76. package/dist/discovery/txt.js +1 -1
  77. package/dist/enclosure/forwarding.d.ts +1 -1
  78. package/dist/enclosure/forwarding.js +1 -1
  79. package/dist/envelope/buckets.d.ts +2 -2
  80. package/dist/envelope/buckets.js +2 -2
  81. package/dist/envelope/compose.d.ts +2 -2
  82. package/dist/envelope/compose.js +4 -4
  83. package/dist/envelope/encode.d.ts +2 -2
  84. package/dist/envelope/encode.js +3 -3
  85. package/dist/envelope/open_verified.d.ts +1 -1
  86. package/dist/envelope/open_verified.js +1 -1
  87. package/dist/envelope/padding.d.ts +2 -2
  88. package/dist/envelope/padding.js +3 -3
  89. package/dist/envelope/verify.d.ts +1 -1
  90. package/dist/envelope/verify.js +1 -1
  91. package/dist/extensions/index.d.ts +1 -0
  92. package/dist/extensions/index.d.ts.map +1 -1
  93. package/dist/extensions/index.js +1 -0
  94. package/dist/extensions/index.js.map +1 -1
  95. package/dist/extensions/limits.d.ts +2 -2
  96. package/dist/extensions/limits.js +2 -2
  97. package/dist/extensions/validation_failure.d.ts +48 -0
  98. package/dist/extensions/validation_failure.d.ts.map +1 -0
  99. package/dist/extensions/validation_failure.js +25 -0
  100. package/dist/extensions/validation_failure.js.map +1 -0
  101. package/dist/handshake/abort.d.ts +1 -1
  102. package/dist/handshake/abort.js +1 -1
  103. package/dist/handshake/client_state.d.ts +5 -5
  104. package/dist/handshake/client_state.js +5 -5
  105. package/dist/handshake/confirm.d.ts +2 -2
  106. package/dist/handshake/confirm.js +2 -2
  107. package/dist/handshake/driver.d.ts +2 -2
  108. package/dist/handshake/driver.js +1 -1
  109. package/dist/handshake/federation.d.ts +6 -6
  110. package/dist/handshake/federation.js +5 -5
  111. package/dist/handshake/first_contact.d.ts +1 -1
  112. package/dist/handshake/first_contact.js +1 -1
  113. package/dist/handshake/identity.d.ts +1 -1
  114. package/dist/handshake/identity.js +1 -1
  115. package/dist/handshake/pow.js +1 -1
  116. package/dist/handshake/server_state.d.ts +3 -3
  117. package/dist/handshake/server_state.js +3 -3
  118. package/dist/index.d.ts +1 -1
  119. package/dist/index.js +1 -1
  120. package/dist/keys/compromise.d.ts +2 -2
  121. package/dist/keys/compromise.js +1 -1
  122. package/dist/keys/device_certificate.d.ts +3 -3
  123. package/dist/keys/device_certificate.js +4 -4
  124. package/dist/keys/key_revocation.d.ts +2 -2
  125. package/dist/keys/key_revocation.js +1 -1
  126. package/dist/keys/request.d.ts +17 -3
  127. package/dist/keys/request.d.ts.map +1 -1
  128. package/dist/keys/request.js.map +1 -1
  129. package/dist/keys/sign.d.ts +1 -1
  130. package/dist/keys/sign.js +1 -1
  131. package/dist/keys/signed.d.ts +3 -3
  132. package/dist/keys/signed.js +3 -3
  133. package/dist/keys/store.js +1 -1
  134. package/dist/largeattachment/crypto.d.ts +1 -1
  135. package/dist/largeattachment/crypto.js +2 -2
  136. package/dist/largeattachment/upload.d.ts +3 -3
  137. package/dist/largeattachment/upload.js +1 -1
  138. package/dist/migration/index.d.ts +1 -1
  139. package/dist/migration/index.d.ts.map +1 -1
  140. package/dist/migration/index.js +1 -1
  141. package/dist/migration/index.js.map +1 -1
  142. package/dist/migration/lockout.d.ts +2 -2
  143. package/dist/migration/lockout.js +2 -2
  144. package/dist/migration/migration.d.ts +6 -4
  145. package/dist/migration/migration.d.ts.map +1 -1
  146. package/dist/migration/migration.js +3 -3
  147. package/dist/migration/migration.js.map +1 -1
  148. package/dist/migration/notice.d.ts +31 -19
  149. package/dist/migration/notice.d.ts.map +1 -1
  150. package/dist/migration/notice.js +37 -71
  151. package/dist/migration/notice.js.map +1 -1
  152. package/dist/migration/orchestrate.d.ts +10 -10
  153. package/dist/migration/orchestrate.d.ts.map +1 -1
  154. package/dist/migration/orchestrate.js +23 -23
  155. package/dist/migration/orchestrate.js.map +1 -1
  156. package/dist/migration/sign.js +9 -9
  157. package/dist/migration/sign.js.map +1 -1
  158. package/dist/migration/types.d.ts +35 -29
  159. package/dist/migration/types.d.ts.map +1 -1
  160. package/dist/migration/types.js +5 -7
  161. package/dist/migration/types.js.map +1 -1
  162. package/dist/recovery/bundle_store.js +1 -1
  163. package/dist/recovery/sign.js +3 -3
  164. package/dist/recovery/types.d.ts +3 -3
  165. package/dist/reputation/abuse_report.d.ts +3 -3
  166. package/dist/reputation/abuse_report.js +2 -2
  167. package/dist/reputation/eligibility.d.ts +44 -0
  168. package/dist/reputation/eligibility.d.ts.map +1 -0
  169. package/dist/reputation/eligibility.js +58 -0
  170. package/dist/reputation/eligibility.js.map +1 -0
  171. package/dist/reputation/evidence.d.ts +47 -0
  172. package/dist/reputation/evidence.d.ts.map +1 -0
  173. package/dist/reputation/evidence.js +117 -0
  174. package/dist/reputation/evidence.js.map +1 -0
  175. package/dist/reputation/gossip_fetch.d.ts +2 -2
  176. package/dist/reputation/gossip_fetch.js +1 -1
  177. package/dist/reputation/index.d.ts +4 -1
  178. package/dist/reputation/index.d.ts.map +1 -1
  179. package/dist/reputation/index.js +4 -1
  180. package/dist/reputation/index.js.map +1 -1
  181. package/dist/reputation/pow.d.ts +1 -1
  182. package/dist/reputation/pow.js +1 -1
  183. package/dist/reputation/references.d.ts +51 -0
  184. package/dist/reputation/references.d.ts.map +1 -0
  185. package/dist/reputation/references.js +95 -0
  186. package/dist/reputation/references.js.map +1 -0
  187. package/dist/reputation/sign.d.ts +1 -1
  188. package/dist/reputation/sign.js +2 -2
  189. package/dist/reputation/types.d.ts +46 -2
  190. package/dist/reputation/types.d.ts.map +1 -1
  191. package/dist/reputation/types.js +14 -0
  192. package/dist/reputation/types.js.map +1 -1
  193. package/dist/reputation/whois.d.ts +1 -1
  194. package/dist/reputation/whois.js +1 -1
  195. package/dist/seal/wrap.d.ts +2 -2
  196. package/dist/seal/wrap.js +4 -4
  197. package/dist/session/dispatcher.d.ts +3 -3
  198. package/dist/session/dispatcher.js +1 -1
  199. package/dist/session/rekey_seal.d.ts +3 -3
  200. package/dist/session/rekey_seal.js +3 -3
  201. package/dist/session/session.d.ts +3 -3
  202. package/dist/session/session.js +3 -3
  203. package/dist/transparency/log.d.ts +1 -1
  204. package/dist/transparency/log.js +2 -2
  205. package/dist/transparency/types.d.ts +2 -2
  206. package/dist/transparency/types.js +1 -1
  207. package/dist/transport/h2.d.ts +33 -12
  208. package/dist/transport/h2.d.ts.map +1 -1
  209. package/dist/transport/h2.js +40 -13
  210. package/dist/transport/h2.js.map +1 -1
  211. package/dist/transport/index.d.ts +1 -1
  212. package/dist/transport/index.d.ts.map +1 -1
  213. package/dist/transport/index.js +1 -1
  214. package/dist/transport/index.js.map +1 -1
  215. package/dist/transport/memory.js +1 -1
  216. package/dist/transport/ws.d.ts +1 -1
  217. package/dist/transport/ws.js +1 -1
  218. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/discovery/configuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,aAAa,GAAG,iCAAiC,CAAC;AAE/D,qCAAqC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC;AAsD3C;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,uBAAuB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,iBAAiB,EAAE,CAC/E,CAAC;IACJ,CAAC;IACD,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAChC,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC/B,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC9B,UAAU,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IA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AgE;IAChE,qCAAqC;IACrC,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC;IACzC,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,kBAAkB,GAAG,4BAA4B,CAAC,CAAC;IACrE,CAAC;IACD,KAAK,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,EAAE,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CAAC,kBAAkB,GAAG,IAAI,CAAC,0BAA0B,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IACD,OAAO,CAAuB,CAAC;AACjC,CAAC"}
@@ -12,7 +12,12 @@
12
12
  * @module
13
13
  */
14
14
  import { type TXTCapabilities } from "./txt.js";
15
- /** A parsed _semp._tcp.<domain> SRV record per §2.1. */
15
+ /**
16
+ * A parsed SEMP SRV record per §2.1. Returned by both
17
+ * {@link lookupSRV} (the standard `_semp._tcp.<domain>` record) and
18
+ * {@link lookupSRVUDP} (the optional `_semp._udp.<domain>` record
19
+ * that operators MAY publish to advertise a distinct QUIC target).
20
+ */
16
21
  export interface SRVRecord {
17
22
  priority: number;
18
23
  weight: number;
@@ -45,6 +50,27 @@ export declare function defaultDNSLookup(): Promise<DNSLookup>;
45
50
  * selection per RFC 2782 sort within a priority group themselves).
46
51
  */
47
52
  export declare function lookupSRV(domain: string, lookup?: DNSLookup): Promise<SRVRecord[]>;
53
+ /**
54
+ * Look up the optional `_semp._udp.<domain>` SRV records per §2.1.
55
+ * Operators MAY publish this record when they want to advertise a
56
+ * distinct UDP target for QUIC (different host/port than the TCP
57
+ * target). Clients selecting QUIC MUST prefer it over the
58
+ * `_semp._tcp` target when present. When absent the QUIC endpoint
59
+ * defaults to the `_semp._tcp` target's host:port, which is the
60
+ * common case.
61
+ *
62
+ * Returns an empty array when no `_udp` record is published.
63
+ */
64
+ export declare function lookupSRVUDP(domain: string, lookup?: DNSLookup): Promise<SRVRecord[]>;
65
+ /**
66
+ * Resolve the SRV record a QUIC-capable client should use for
67
+ * `domain`. Prefers the optional `_semp._udp` record when present
68
+ * (operator-specified distinct UDP target). Otherwise falls back to
69
+ * the `_semp._tcp` target's host:port per DISCOVERY.md §2.1.
70
+ *
71
+ * Returns null when neither record exists.
72
+ */
73
+ export declare function quicTarget(domain: string, lookup?: DNSLookup): Promise<SRVRecord | null>;
48
74
  /**
49
75
  * Look up `_semp._tcp.<domain>` TXT records and return the first
50
76
  * one whose `v=` parameter is `semp1`. Returns null when no SEMP
@@ -1 +1 @@
1
- {"version":3,"file":"dns.d.ts","sourceRoot":"","sources":["../../src/discovery/dns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAwB,MAAM,UAAU,CAAC;AAEtE,wDAAwD;AACxD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,mCAAmC;AACnC,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAChD,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,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B,gBAAgB,IAAI,OAAO,CAAC,SAAS,CAAC,CAqD3D;AAoBD;;;;GAIG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,SAAS,EAAE,CAAC,CAKtB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,SAAS,EAAE,CAAC,CAKtB;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAW3B;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAWjC;AAED,uEAAuE;AACvE,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,SAAS,GACjB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAGrB"}
@@ -95,6 +95,43 @@ export async function lookupSRV(domain, lookup) {
95
95
  const recs = await dns.lookupSRV(name);
96
96
  return [...recs].sort((a, b) => a.priority - b.priority);
97
97
  }
98
+ /**
99
+ * Look up the optional `_semp._udp.<domain>` SRV records per §2.1.
100
+ * Operators MAY publish this record when they want to advertise a
101
+ * distinct UDP target for QUIC (different host/port than the TCP
102
+ * target). Clients selecting QUIC MUST prefer it over the
103
+ * `_semp._tcp` target when present. When absent the QUIC endpoint
104
+ * defaults to the `_semp._tcp` target's host:port, which is the
105
+ * common case.
106
+ *
107
+ * Returns an empty array when no `_udp` record is published.
108
+ */
109
+ export async function lookupSRVUDP(domain, lookup) {
110
+ const dns = lookup ?? (await defaultDNSLookup());
111
+ const name = `_semp._udp.${domain}`;
112
+ const recs = await dns.lookupSRV(name);
113
+ return [...recs].sort((a, b) => a.priority - b.priority);
114
+ }
115
+ /**
116
+ * Resolve the SRV record a QUIC-capable client should use for
117
+ * `domain`. Prefers the optional `_semp._udp` record when present
118
+ * (operator-specified distinct UDP target). Otherwise falls back to
119
+ * the `_semp._tcp` target's host:port per DISCOVERY.md §2.1.
120
+ *
121
+ * Returns null when neither record exists.
122
+ */
123
+ export async function quicTarget(domain, lookup) {
124
+ const dns = lookup ?? (await defaultDNSLookup());
125
+ const udp = await lookupSRVUDP(domain, dns);
126
+ if (udp.length > 0) {
127
+ return udp[0] ?? null;
128
+ }
129
+ const tcp = await lookupSRV(domain, dns);
130
+ if (tcp.length > 0) {
131
+ return tcp[0] ?? null;
132
+ }
133
+ return null;
134
+ }
98
135
  /**
99
136
  * Look up `_semp._tcp.<domain>` TXT records and return the first
100
137
  * one whose `v=` parameter is `semp1`. Returns null when no SEMP
@@ -1 +1 @@
1
- {"version":3,"file":"dns.js","sourceRoot":"","sources":["../../src/discovery/dns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAwB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA2BtE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,GAAuC,CAAC;IAC5C,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,CAAC,SAAS,CAAC,MAAc;YAC5B,IAAI,CAAC;gBACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;gBAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;oBACpB,MAAM,EAAE,C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C;IACvC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,GAAG,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC;QACtC,IAAI,GAAG,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;YACtB,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,uEAAuE;AACvE,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,MAAc,EACd,MAAkB;IAElB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,gBAAgB,EAAE,CAAC,CAAC;IACjD,OAAO,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC"}
@@ -8,10 +8,10 @@
8
8
  * @module
9
9
  */
10
10
  export { parseTXTCapabilities, type TXTCapabilities } from "./txt.js";
11
- export { type ConfigEndpoints, type ConfigExtension, type ConfigLimits, type Configuration, type TransportEndpoints, ConfigurationType, WellKnownMaxBytes, WellKnownPath, parseConfiguration, } from "./configuration.js";
11
+ export { type ConfigEndpoints, type ConfigExtension, type ConfigLimits, type Configuration, type ReciprocityMode, type ReciprocityPolicy, type TransportEndpoints, ConfigurationType, WellKnownMaxBytes, WellKnownPath, parseConfiguration, } from "./configuration.js";
12
12
  export { type DomainKeys, type KeyBlock, DomainKeysMaxBytes, DomainKeysType, decodeKeyBlockPublic, parseDomainKeys, verifyDomainKeyFingerprint, } from "./domain_keys.js";
13
13
  export { type FetchLike, type FetchOptions, type ResolveServerOptions, type ResolvedServer, fetchConfiguration, fetchDomainKeys, resolveServer, wellKnownUrl, } from "./resolver.js";
14
- export { type DNSLookup, type MXRecord, type SRVRecord, defaultDNSLookup, lookupMX, lookupSRV, lookupTXT, } from "./dns.js";
14
+ export { type DNSLookup, type MXRecord, type SRVRecord, defaultDNSLookup, lookupMX, lookupSRV, lookupSRVUDP, lookupTXT, quicTarget, } from "./dns.js";
15
15
  export { type DiscoveryCache, DefaultTTLLegacyMs, DefaultTTLNotFoundMs, DefaultTTLSEMPMs, InMemoryDiscoveryCache, } from "./cache.js";
16
16
  export { type DiscoveryRequest, type DiscoveryResponse, type DiscoveryResult, type DiscoverySignature, type DiscoveryStatus, DiscoveryMessageType, DiscoveryRecordVersion, DiscoverySignaturePrefix, DiscoveryStepRequest, DiscoveryStepResponse, signDiscoveryResponse, validateDiscoveryRequest, validateDiscoveryResponse, verifyDiscoveryResponse, } from "./lookup.js";
17
17
  export { OnionSuffix, OnionV3LabelLength, isOnionDomain, validateOnionDomain, } from "./onion.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/discovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,SAAS,GACV,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,KAAK,cAAc,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/discovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtE,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,SAAS,EACT,UAAU,GACX,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,KAAK,cAAc,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
@@ -11,7 +11,7 @@ export { parseTXTCapabilities } from "./txt.js";
11
11
  export { ConfigurationType, WellKnownMaxBytes, WellKnownPath, parseConfiguration, } from "./configuration.js";
12
12
  export { DomainKeysMaxBytes, DomainKeysType, decodeKeyBlockPublic, parseDomainKeys, verifyDomainKeyFingerprint, } from "./domain_keys.js";
13
13
  export { fetchConfiguration, fetchDomainKeys, resolveServer, wellKnownUrl, } from "./resolver.js";
14
- export { defaultDNSLookup, lookupMX, lookupSRV, lookupTXT, } from "./dns.js";
14
+ export { defaultDNSLookup, lookupMX, lookupSRV, lookupSRVUDP, lookupTXT, quicTarget, } from "./dns.js";
15
15
  export { DefaultTTLLegacyMs, DefaultTTLNotFoundMs, DefaultTTLSEMPMs, InMemoryDiscoveryCache, } from "./cache.js";
16
16
  export { DiscoveryMessageType, DiscoveryRecordVersion, DiscoverySignaturePrefix, DiscoveryStepRequest, DiscoveryStepResponse, signDiscoveryResponse, validateDiscoveryRequest, validateDiscoveryResponse, verifyDiscoveryResponse, } from "./lookup.js";
17
17
  export { OnionSuffix, OnionV3LabelLength, isOnionDomain, validateOnionDomain, } from "./onion.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/discovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,oBAAoB,EAAwB,MAAM,UAAU,CAAC;AAEtE,OAAO,EAML,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAGL,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAKL,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,SAAS,GACV,MAAM,UAAU,CAAC;AAElB,OAAO,EAEL,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAML,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAML,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/discovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,oBAAoB,EAAwB,MAAM,UAAU,CAAC;AAEtE,OAAO,EAQL,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAGL,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAKL,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAIL,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,SAAS,EACT,UAAU,GACX,MAAM,UAAU,CAAC;AAElB,OAAO,EAEL,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAML,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAML,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
@@ -50,7 +50,7 @@ export declare function defaultAlphaRanges(servers: number): AlphaRange[];
50
50
  * lookup server (published at `_semp-partition-lookup.<domain>` SRV)
51
51
  * and returns the hostname of the delivery server that handles
52
52
  * `address`. The discovery package does not prescribe the wire
53
- * format of the lookup query DISCOVERY.md §2.4 says "the
53
+ * format of the lookup query - DISCOVERY.md §2.4 says "the
54
54
  * partition server address is published as a separate SRV record"
55
55
  * and leaves the query protocol to the implementation.
56
56
  */
@@ -231,7 +231,7 @@ export function parsePartitionTXT(domain, txt) {
231
231
  cfg.algorithm = val;
232
232
  break;
233
233
  default:
234
- // unknown key skip (forward compat).
234
+ // unknown key - skip (forward compat).
235
235
  break;
236
236
  }
237
237
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Discovery resolver well-known URI fetch + parse, plus the
2
+ * Discovery resolver - well-known URI fetch + parse, plus the
3
3
  * higher-level "resolve a server" orchestrator that produces the
4
4
  * `serverDomainPub` a {@link "../handshake/driver".runClient} call
5
5
  * needs.
@@ -9,7 +9,7 @@
9
9
  * the resolver uses Node 22+'s global `fetch`.
10
10
  *
11
11
  * The DNS SRV / TXT lookup leg of §5.1 is intentionally not
12
- * implemented in this module it requires `node:dns/promises` and
12
+ * implemented in this module - it requires `node:dns/promises` and
13
13
  * does not cleanly tree-shake into a browser bundle. Callers that
14
14
  * need DNS-first discovery wire it in front of {@link resolveServer}
15
15
  * and pass an explicit `host` / well-known URL.
@@ -42,7 +42,7 @@ export interface FetchOptions {
42
42
  /** Optional cancellation signal. */
43
43
  signal?: AbortSignal;
44
44
  /**
45
- * Per-request timeout in milliseconds. Defaults to 10 seconds
45
+ * Per-request timeout in milliseconds. Defaults to 10 seconds -
46
46
  * matches semp-go's `FetchConfiguration` default.
47
47
  */
48
48
  timeoutMs?: number;
@@ -54,7 +54,7 @@ export declare function wellKnownUrl(host: string): string;
54
54
  * Throws on transport failure, non-200 status, oversized body, or
55
55
  * structural parse failure.
56
56
  *
57
- * The URL's scheme is NOT enforced production callers must pass an
57
+ * The URL's scheme is NOT enforced - production callers must pass an
58
58
  * `https://` URL, but tests need to point at a local httptest-style
59
59
  * server so this layer stays permissive.
60
60
  */
@@ -64,7 +64,7 @@ export declare function fetchConfiguration(url: string, opts?: FetchOptions): Pr
64
64
  * `endpoints.domain_keys` in a server's configuration. Returns the
65
65
  * parsed document and the cross-checked signing-key public bytes.
66
66
  *
67
- * Throws if the fingerprint cross-check fails a peer that trusts
67
+ * Throws if the fingerprint cross-check fails - a peer that trusts
68
68
  * the publication channel still MUST confirm `key_id` is the SHA-256
69
69
  * fingerprint of `public_key`, otherwise a misconfiguration could
70
70
  * swap in a key whose fingerprint doesn't match the one the peer
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Discovery resolver well-known URI fetch + parse, plus the
2
+ * Discovery resolver - well-known URI fetch + parse, plus the
3
3
  * higher-level "resolve a server" orchestrator that produces the
4
4
  * `serverDomainPub` a {@link "../handshake/driver".runClient} call
5
5
  * needs.
@@ -9,7 +9,7 @@
9
9
  * the resolver uses Node 22+'s global `fetch`.
10
10
  *
11
11
  * The DNS SRV / TXT lookup leg of §5.1 is intentionally not
12
- * implemented in this module it requires `node:dns/promises` and
12
+ * implemented in this module - it requires `node:dns/promises` and
13
13
  * does not cleanly tree-shake into a browser bundle. Callers that
14
14
  * need DNS-first discovery wire it in front of {@link resolveServer}
15
15
  * and pass an explicit `host` / well-known URL.
@@ -30,7 +30,7 @@ export function wellKnownUrl(host) {
30
30
  * Throws on transport failure, non-200 status, oversized body, or
31
31
  * structural parse failure.
32
32
  *
33
- * The URL's scheme is NOT enforced production callers must pass an
33
+ * The URL's scheme is NOT enforced - production callers must pass an
34
34
  * `https://` URL, but tests need to point at a local httptest-style
35
35
  * server so this layer stays permissive.
36
36
  */
@@ -50,7 +50,7 @@ export async function fetchConfiguration(url, opts = {}) {
50
50
  * `endpoints.domain_keys` in a server's configuration. Returns the
51
51
  * parsed document and the cross-checked signing-key public bytes.
52
52
  *
53
- * Throws if the fingerprint cross-check fails a peer that trusts
53
+ * Throws if the fingerprint cross-check fails - a peer that trusts
54
54
  * the publication channel still MUST confirm `key_id` is the SHA-256
55
55
  * fingerprint of `public_key`, otherwise a misconfiguration could
56
56
  * swap in a key whose fingerprint doesn't match the one the peer
@@ -144,7 +144,7 @@ async function fetchTextBounded(url, maxBytes, opts) {
144
144
  if (!resp.ok) {
145
145
  throw new Error(`discovery: GET ${url} returned ${resp.status}`);
146
146
  }
147
- // Permissive content-type check some servers return
147
+ // Permissive content-type check - some servers return
148
148
  // application/octet-stream for .json paths. We require JSON in the
149
149
  // body parse, not in the header.
150
150
  const ct = resp.headers.get("content-type") ?? "";
@@ -14,7 +14,7 @@
14
14
  * - `c` list comma-separated transport identifiers
15
15
  * - `f` list comma-separated optional features
16
16
  *
17
- * Unknown keys MUST be ignored, not rejected DNS TXT records are
17
+ * Unknown keys MUST be ignored, not rejected - DNS TXT records are
18
18
  * a public surface and an upgrading peer might add new keys before
19
19
  * a downgrading peer learns about them.
20
20
  *
@@ -14,7 +14,7 @@
14
14
  * - `c` list comma-separated transport identifiers
15
15
  * - `f` list comma-separated optional features
16
16
  *
17
- * Unknown keys MUST be ignored, not rejected DNS TXT records are
17
+ * Unknown keys MUST be ignored, not rejected - DNS TXT records are
18
18
  * a public surface and an upgrading peer might add new keys before
19
19
  * a downgrading peer learns about them.
20
20
  *
@@ -9,7 +9,7 @@
9
9
  * Signed scope: the `original_enclosure_plaintext` subtree.
10
10
  *
11
11
  * 2. The FORWARDER's `forwarder_attestation` over the
12
- * `forwarded_from` block the inner sender_signature is
12
+ * `forwarded_from` block - the inner sender_signature is
13
13
  * already populated by step 1, so this signs over canonical
14
14
  * bytes that include it. Prefix: `SEMP-FORWARDER-ATTESTATION:`.
15
15
  * Signed scope: the entire `forwarded_from` subtree.
@@ -9,7 +9,7 @@
9
9
  * Signed scope: the `original_enclosure_plaintext` subtree.
10
10
  *
11
11
  * 2. The FORWARDER's `forwarder_attestation` over the
12
- * `forwarded_from` block the inner sender_signature is
12
+ * `forwarded_from` block - the inner sender_signature is
13
13
  * already populated by step 1, so this signs over canonical
14
14
  * bytes that include it. Prefix: `SEMP-FORWARDER-ATTESTATION:`.
15
15
  * Signed scope: the entire `forwarded_from` subtree.
@@ -20,7 +20,7 @@ export declare const DefaultMaxEnvelopeSize: number;
20
20
  * Select the size bucket for an unpadded envelope of the given byte
21
21
  * size per the default power-of-two curve (4096, 8192, 16384, ...).
22
22
  *
23
- * Throws on negative input or input that exceeds the ceiling over-
23
+ * Throws on negative input or input that exceeds the ceiling - over-
24
24
  * limit envelopes MUST be recomposed; padding is not a remedy for
25
25
  * over-limit content.
26
26
  */
@@ -31,7 +31,7 @@ export declare function selectSizeBucket(unpaddedSize: number, maxEnvelopeSize?:
31
31
  * in which case the floor relaxes to 1 (a single-domain non-group
32
32
  * send reveals only the obvious cardinality and gains no
33
33
  * obfuscation from padding to 2). Real counts above 1024 force
34
- * recomposition into multiple envelopes the runner returns a
34
+ * recomposition into multiple envelopes - the runner returns a
35
35
  * sentinel of -1 in that case so callers can detect it.
36
36
  */
37
37
  export declare function selectRecipientCountBucket(realRecipients: number, singleDomainNotGroup: boolean): number;
@@ -20,7 +20,7 @@ export const DefaultMaxEnvelopeSize = 25 * 1024 * 1024;
20
20
  * Select the size bucket for an unpadded envelope of the given byte
21
21
  * size per the default power-of-two curve (4096, 8192, 16384, ...).
22
22
  *
23
- * Throws on negative input or input that exceeds the ceiling over-
23
+ * Throws on negative input or input that exceeds the ceiling - over-
24
24
  * limit envelopes MUST be recomposed; padding is not a remedy for
25
25
  * over-limit content.
26
26
  */
@@ -51,7 +51,7 @@ export function selectSizeBucket(unpaddedSize, maxEnvelopeSize) {
51
51
  * in which case the floor relaxes to 1 (a single-domain non-group
52
52
  * send reveals only the obvious cardinality and gains no
53
53
  * obfuscation from padding to 2). Real counts above 1024 force
54
- * recomposition into multiple envelopes the runner returns a
54
+ * recomposition into multiple envelopes - the runner returns a
55
55
  * sentinel of -1 in that case so callers can detect it.
56
56
  */
57
57
  export function selectRecipientCountBucket(realRecipients, singleDomainNotGroup) {
@@ -130,7 +130,7 @@ export interface Envelope {
130
130
  */
131
131
  export declare function compose(input: ComposeInput): Envelope;
132
132
  /**
133
- * Compute the §4.3 canonical envelope bytes signature and
133
+ * Compute the §4.3 canonical envelope bytes - signature and
134
134
  * session_mac blanked, hop_count and padding omitted.
135
135
  */
136
136
  export declare function canonicalEnvelopeFor(envelope: unknown): Uint8Array;
@@ -162,7 +162,7 @@ export interface OpenedEnvelope {
162
162
  * returns the parsed plaintexts. Throws if the recipient slot is
163
163
  * absent or the AEAD tag does not verify.
164
164
  *
165
- * Does NOT verify seal.signature or seal.session_mac those are
165
+ * Does NOT verify seal.signature or seal.session_mac - those are
166
166
  * the routing-server / receiving-server checks per §7.2 and live
167
167
  * on the server side. {@link verifySealSignature} and
168
168
  * {@link verifySessionMAC} are the corresponding verifier helpers.
@@ -89,10 +89,10 @@ export function compose(input) {
89
89
  //
90
90
  // Wire-shape rules:
91
91
  // postmark.extensions and seal.extensions DEFAULT to {} when
92
- // the caller doesn't pass them these slots are always
92
+ // the caller doesn't pass them - these slots are always
93
93
  // present on the wire (some routers depend on the keys
94
94
  // existing as a marker even when empty).
95
- // Top-level extensions DEFAULTS to absent the spec treats
95
+ // Top-level extensions DEFAULTS to absent - the spec treats
96
96
  // it as truly optional.
97
97
  const postmark = {
98
98
  ...input.postmark,
@@ -131,7 +131,7 @@ export function compose(input) {
131
131
  return env;
132
132
  }
133
133
  /**
134
- * Compute the §4.3 canonical envelope bytes signature and
134
+ * Compute the §4.3 canonical envelope bytes - signature and
135
135
  * session_mac blanked, hop_count and padding omitted.
136
136
  */
137
137
  export function canonicalEnvelopeFor(envelope) {
@@ -161,7 +161,7 @@ export function canonicalEnvelopeFor(envelope) {
161
161
  * returns the parsed plaintexts. Throws if the recipient slot is
162
162
  * absent or the AEAD tag does not verify.
163
163
  *
164
- * Does NOT verify seal.signature or seal.session_mac those are
164
+ * Does NOT verify seal.signature or seal.session_mac - those are
165
165
  * the routing-server / receiving-server checks per §7.2 and live
166
166
  * on the server side. {@link verifySealSignature} and
167
167
  * {@link verifySessionMAC} are the corresponding verifier helpers.
@@ -6,7 +6,7 @@
6
6
  * (`Content-Type: application/semp-envelope`) and for storage as a
7
7
  * `.semp` file.
8
8
  *
9
- * `encodeEnvelope` does NOT produce the canonical form use
9
+ * `encodeEnvelope` does NOT produce the canonical form - use
10
10
  * {@link "./canonical".canonicalEnvelopeBytes} for the byte stream
11
11
  * consumed by signature and MAC computation.
12
12
  *
@@ -19,7 +19,7 @@ export declare const EnvelopeMIMEType = "application/semp-envelope";
19
19
  export declare const EnvelopeFileExtension = ".semp";
20
20
  /**
21
21
  * Wire JSON serialization of `env`. UTF-8, no BOM, no trailing
22
- * newline the byte sequence is suitable for transport bodies and
22
+ * newline - the byte sequence is suitable for transport bodies and
23
23
  * for direct `.semp` file content.
24
24
  */
25
25
  export declare function encodeEnvelope(env: Envelope): Uint8Array;
@@ -6,7 +6,7 @@
6
6
  * (`Content-Type: application/semp-envelope`) and for storage as a
7
7
  * `.semp` file.
8
8
  *
9
- * `encodeEnvelope` does NOT produce the canonical form use
9
+ * `encodeEnvelope` does NOT produce the canonical form - use
10
10
  * {@link "./canonical".canonicalEnvelopeBytes} for the byte stream
11
11
  * consumed by signature and MAC computation.
12
12
  *
@@ -18,11 +18,11 @@ export const EnvelopeMIMEType = "application/semp-envelope";
18
18
  export const EnvelopeFileExtension = ".semp";
19
19
  /**
20
20
  * Wire JSON serialization of `env`. UTF-8, no BOM, no trailing
21
- * newline the byte sequence is suitable for transport bodies and
21
+ * newline - the byte sequence is suitable for transport bodies and
22
22
  * for direct `.semp` file content.
23
23
  */
24
24
  export function encodeEnvelope(env) {
25
- // Plain JSON NOT canonical. Used for transport, not signing.
25
+ // Plain JSON - NOT canonical. Used for transport, not signing.
26
26
  return new TextEncoder().encode(JSON.stringify(env));
27
27
  }
28
28
  /**
@@ -10,7 +10,7 @@
10
10
  * 3. Walk the supplied recipient candidates and open the brief +
11
11
  * enclosure for the first matching device key.
12
12
  *
13
- * `openAndVerify` does NOT run `seal.session_mac` that is the
13
+ * `openAndVerify` does NOT run `seal.session_mac` - that is the
14
14
  * routing-server / receiving-server check between adjacent SEMP
15
15
  * peers; the recipient client uses {@link "./verify".verifySessionMAC}
16
16
  * separately when it has access to the K_env_mac.
@@ -10,7 +10,7 @@
10
10
  * 3. Walk the supplied recipient candidates and open the brief +
11
11
  * enclosure for the first matching device key.
12
12
  *
13
- * `openAndVerify` does NOT run `seal.session_mac` that is the
13
+ * `openAndVerify` does NOT run `seal.session_mac` - that is the
14
14
  * routing-server / receiving-server check between adjacent SEMP
15
15
  * peers; the recipient client uses {@link "./verify".verifySessionMAC}
16
16
  * separately when it has access to the K_env_mac.
@@ -35,7 +35,7 @@ export interface PadConfig {
35
35
  /**
36
36
  * Populate `env.padding` so that `JSON.stringify(env)` lands on
37
37
  * exactly the size of the chosen bucket. Safe to call before OR
38
- * after `compose` populates `seal.signature` / `seal.session_mac`
38
+ * after `compose` populates `seal.signature` / `seal.session_mac` -
39
39
  * if either is empty, fillPadding temporarily substitutes a
40
40
  * fixed-length placeholder for measurement so the post-sign size
41
41
  * is correct either way.
@@ -47,7 +47,7 @@ export declare function fillPadding(env: Envelope, cfg?: PadConfig): number;
47
47
  /**
48
48
  * Build a string of exactly `targetLen` base64-alphabet characters,
49
49
  * drawn from a CSPRNG. The bulk is a base64 encoding of CSPRNG
50
- * bytes; the final 13 characters (when targetLen is not reachable
50
+ * bytes; the final 1-3 characters (when targetLen is not reachable
51
51
  * by `btoa` 4-character chunks) are CSPRNG-seeded alphabet
52
52
  * characters appended for length alignment per §2.4.2.
53
53
  */
@@ -28,7 +28,7 @@ const Base64AlphabetFillers = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw
28
28
  /**
29
29
  * Populate `env.padding` so that `JSON.stringify(env)` lands on
30
30
  * exactly the size of the chosen bucket. Safe to call before OR
31
- * after `compose` populates `seal.signature` / `seal.session_mac`
31
+ * after `compose` populates `seal.signature` / `seal.session_mac` -
32
32
  * if either is empty, fillPadding temporarily substitutes a
33
33
  * fixed-length placeholder for measurement so the post-sign size
34
34
  * is correct either way.
@@ -83,7 +83,7 @@ export function fillPadding(env, cfg = {}) {
83
83
  /**
84
84
  * Build a string of exactly `targetLen` base64-alphabet characters,
85
85
  * drawn from a CSPRNG. The bulk is a base64 encoding of CSPRNG
86
- * bytes; the final 13 characters (when targetLen is not reachable
86
+ * bytes; the final 1-3 characters (when targetLen is not reachable
87
87
  * by `btoa` 4-character chunks) are CSPRNG-seeded alphabet
88
88
  * characters appended for length alignment per §2.4.2.
89
89
  */
@@ -96,7 +96,7 @@ export function buildPaddingValue(targetLen, rand = defaultRand) {
96
96
  }
97
97
  // base64 emits 4 chars per 3 input bytes. Pick the largest
98
98
  // multiple of 4 ≤ targetLen as the base64-encoded portion; the
99
- // remainder (03 chars) is filled from the alphabet pool.
99
+ // remainder (0-3 chars) is filled from the alphabet pool.
100
100
  const baseChars = targetLen - (targetLen % 4);
101
101
  const inputBytes = (baseChars / 4) * 3;
102
102
  const out = [];
@@ -15,7 +15,7 @@ import { type Envelope } from "./compose.js";
15
15
  * true when the Ed25519 signature over the canonical envelope bytes
16
16
  * (prefixed with `SEMP-ENVELOPE:`) verifies. Does NOT cross-check
17
17
  * that the supplied public key actually belongs to the
18
- * `postmark.from_domain` that lookup is the caller's responsibility.
18
+ * `postmark.from_domain` - that lookup is the caller's responsibility.
19
19
  */
20
20
  export declare function verifySealSignature(env: Envelope, senderDomainPub: Uint8Array): boolean;
21
21
  /**
@@ -19,7 +19,7 @@ const EnvelopePrefix = "SEMP-ENVELOPE:";
19
19
  * true when the Ed25519 signature over the canonical envelope bytes
20
20
  * (prefixed with `SEMP-ENVELOPE:`) verifies. Does NOT cross-check
21
21
  * that the supplied public key actually belongs to the
22
- * `postmark.from_domain` that lookup is the caller's responsibility.
22
+ * `postmark.from_domain` - that lookup is the caller's responsibility.
23
23
  */
24
24
  export function verifySealSignature(env, senderDomainPub) {
25
25
  if (env.seal?.signature === undefined || env.seal.signature === "") {
@@ -4,4 +4,5 @@
4
4
  * @module
5
5
  */
6
6
  export { type Entry, type Layer, type Map, type RegistryEntry, KeyError, MaxKeyLength, NamespacePrefixCore, Registry, SizeError, UnsupportedError, maxBytesFor, validate, validateKey, validateSize, } from "./limits.js";
7
+ export { type ValidationFailureCode, type ValidationFailureItem, type ValidationFailureRejection, DefinitionPathPrefix, newValidationFailureRejection, } from "./validation_failure.js";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,KAAK,EACV,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,KAAK,EACV,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,aAAa,EAClB,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC"}
@@ -4,4 +4,5 @@
4
4
  * @module
5
5
  */
6
6
  export { KeyError, MaxKeyLength, NamespacePrefixCore, Registry, SizeError, UnsupportedError, maxBytesFor, validate, validateKey, validateSize, } from "./limits.js";
7
+ export { DefinitionPathPrefix, newValidationFailureRejection, } from "./validation_failure.js";
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAKL,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAKL,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAIL,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC"}
@@ -8,7 +8,7 @@
8
8
  * ```
9
9
  *
10
10
  * Per-layer byte-size ceilings (§4) are enforced before signature
11
- * verification an over-large `extensions` map MUST be rejected
11
+ * verification - an over-large `extensions` map MUST be rejected
12
12
  * outright, regardless of any signature it might carry.
13
13
  *
14
14
  * Required extensions a recipient does not understand MUST be
@@ -90,7 +90,7 @@ export declare function validateKey(key: string): Error | null;
90
90
  * ({@link SizeError})
91
91
  *
92
92
  * Non-required (`required: false`) extensions are passed through
93
- * unconditionally the receiver is free to ignore them.
93
+ * unconditionally - the receiver is free to ignore them.
94
94
  */
95
95
  export declare function validate(registry: Registry | null, layer: Layer, m: Map | null | undefined): Error | null;
96
96
  /**
@@ -8,7 +8,7 @@
8
8
  * ```
9
9
  *
10
10
  * Per-layer byte-size ceilings (§4) are enforced before signature
11
- * verification an over-large `extensions` map MUST be rejected
11
+ * verification - an over-large `extensions` map MUST be rejected
12
12
  * outright, regardless of any signature it might carry.
13
13
  *
14
14
  * Required extensions a recipient does not understand MUST be
@@ -121,7 +121,7 @@ export function validateKey(key) {
121
121
  * ({@link SizeError})
122
122
  *
123
123
  * Non-required (`required: false`) extensions are passed through
124
- * unconditionally the receiver is free to ignore them.
124
+ * unconditionally - the receiver is free to ignore them.
125
125
  */
126
126
  export function validate(registry, layer, m) {
127
127
  if (m === null || m === undefined || Object.keys(m).length === 0) {