@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.
- package/dist/brief/address.d.ts +1 -1
- package/dist/brief/address.js +1 -1
- package/dist/brief/brief.d.ts +1 -1
- package/dist/brief/brief.js +1 -1
- package/dist/canonical/marshal.d.ts +2 -2
- package/dist/canonical/marshal.js +2 -2
- package/dist/closure/driver.d.ts +2 -2
- package/dist/closure/driver.js +1 -1
- package/dist/crypto/aead.d.ts +2 -2
- package/dist/crypto/aead.js +2 -2
- package/dist/crypto/kdf.d.ts +1 -1
- package/dist/crypto/kdf.js +1 -1
- package/dist/crypto/mac.d.ts +1 -1
- package/dist/crypto/mac.js +1 -1
- package/dist/delivery/ack.d.ts +5 -5
- package/dist/delivery/ack.js +6 -6
- package/dist/delivery/blocklist.d.ts +1 -1
- package/dist/delivery/blocklist.js +2 -2
- package/dist/delivery/device_sync.d.ts +26 -0
- package/dist/delivery/device_sync.d.ts.map +1 -0
- package/dist/delivery/device_sync.js +18 -0
- package/dist/delivery/device_sync.js.map +1 -0
- package/dist/delivery/disposition.d.ts +1 -1
- package/dist/delivery/fetch.d.ts +1 -1
- package/dist/delivery/fetch.js +1 -1
- package/dist/delivery/inbox.d.ts +2 -2
- package/dist/delivery/inbox.js +2 -2
- package/dist/delivery/index.d.ts +4 -0
- package/dist/delivery/index.d.ts.map +1 -1
- package/dist/delivery/index.js +4 -0
- package/dist/delivery/index.js.map +1 -1
- package/dist/delivery/persistent_silent.d.ts +70 -0
- package/dist/delivery/persistent_silent.d.ts.map +1 -0
- package/dist/delivery/persistent_silent.js +117 -0
- package/dist/delivery/persistent_silent.js.map +1 -0
- package/dist/delivery/pipeline.d.ts +4 -4
- package/dist/delivery/pipeline.js +2 -2
- package/dist/delivery/policy_state.d.ts +2 -2
- package/dist/delivery/policy_state.js +4 -4
- package/dist/delivery/receipt.d.ts +3 -3
- package/dist/delivery/receipt.js +3 -3
- package/dist/delivery/receipt_store.d.ts +1 -1
- package/dist/delivery/receipt_store.js +1 -1
- package/dist/delivery/retry.d.ts +2 -2
- package/dist/delivery/retry.js +2 -2
- package/dist/delivery/scheduler.d.ts +1 -1
- package/dist/delivery/scheduler.js +1 -1
- package/dist/delivery/stage_partition.d.ts +1 -1
- package/dist/delivery/stage_partition.js +1 -1
- package/dist/delivery/staged_runner.d.ts +1 -1
- package/dist/delivery/staged_runner.js +2 -2
- package/dist/delivery/status_message.d.ts +75 -0
- package/dist/delivery/status_message.d.ts.map +1 -0
- package/dist/delivery/status_message.js +109 -0
- package/dist/delivery/status_message.js.map +1 -0
- package/dist/delivery/upgrade_signal.d.ts +48 -0
- package/dist/delivery/upgrade_signal.d.ts.map +1 -0
- package/dist/delivery/upgrade_signal.js +48 -0
- package/dist/delivery/upgrade_signal.js.map +1 -0
- package/dist/discovery/configuration.d.ts +20 -1
- package/dist/discovery/configuration.d.ts.map +1 -1
- package/dist/discovery/configuration.js.map +1 -1
- package/dist/discovery/dns.d.ts +27 -1
- package/dist/discovery/dns.d.ts.map +1 -1
- package/dist/discovery/dns.js +37 -0
- package/dist/discovery/dns.js.map +1 -1
- package/dist/discovery/index.d.ts +2 -2
- package/dist/discovery/index.d.ts.map +1 -1
- package/dist/discovery/index.js +1 -1
- package/dist/discovery/index.js.map +1 -1
- package/dist/discovery/partition.d.ts +1 -1
- package/dist/discovery/partition.js +1 -1
- package/dist/discovery/resolver.d.ts +5 -5
- package/dist/discovery/resolver.js +5 -5
- package/dist/discovery/txt.d.ts +1 -1
- package/dist/discovery/txt.js +1 -1
- package/dist/enclosure/forwarding.d.ts +1 -1
- package/dist/enclosure/forwarding.js +1 -1
- package/dist/envelope/buckets.d.ts +2 -2
- package/dist/envelope/buckets.js +2 -2
- package/dist/envelope/compose.d.ts +2 -2
- package/dist/envelope/compose.js +4 -4
- package/dist/envelope/encode.d.ts +2 -2
- package/dist/envelope/encode.js +3 -3
- package/dist/envelope/open_verified.d.ts +1 -1
- package/dist/envelope/open_verified.js +1 -1
- package/dist/envelope/padding.d.ts +2 -2
- package/dist/envelope/padding.js +3 -3
- package/dist/envelope/verify.d.ts +1 -1
- package/dist/envelope/verify.js +1 -1
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +1 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/limits.d.ts +2 -2
- package/dist/extensions/limits.js +2 -2
- package/dist/extensions/validation_failure.d.ts +48 -0
- package/dist/extensions/validation_failure.d.ts.map +1 -0
- package/dist/extensions/validation_failure.js +25 -0
- package/dist/extensions/validation_failure.js.map +1 -0
- package/dist/handshake/abort.d.ts +1 -1
- package/dist/handshake/abort.js +1 -1
- package/dist/handshake/client_state.d.ts +5 -5
- package/dist/handshake/client_state.js +5 -5
- package/dist/handshake/confirm.d.ts +2 -2
- package/dist/handshake/confirm.js +2 -2
- package/dist/handshake/driver.d.ts +2 -2
- package/dist/handshake/driver.js +1 -1
- package/dist/handshake/federation.d.ts +6 -6
- package/dist/handshake/federation.js +5 -5
- package/dist/handshake/first_contact.d.ts +1 -1
- package/dist/handshake/first_contact.js +1 -1
- package/dist/handshake/identity.d.ts +1 -1
- package/dist/handshake/identity.js +1 -1
- package/dist/handshake/pow.js +1 -1
- package/dist/handshake/server_state.d.ts +3 -3
- package/dist/handshake/server_state.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/keys/compromise.d.ts +2 -2
- package/dist/keys/compromise.js +1 -1
- package/dist/keys/device_certificate.d.ts +3 -3
- package/dist/keys/device_certificate.js +4 -4
- package/dist/keys/key_revocation.d.ts +2 -2
- package/dist/keys/key_revocation.js +1 -1
- package/dist/keys/request.d.ts +17 -3
- package/dist/keys/request.d.ts.map +1 -1
- package/dist/keys/request.js.map +1 -1
- package/dist/keys/sign.d.ts +1 -1
- package/dist/keys/sign.js +1 -1
- package/dist/keys/signed.d.ts +3 -3
- package/dist/keys/signed.js +3 -3
- package/dist/keys/store.js +1 -1
- package/dist/largeattachment/crypto.d.ts +1 -1
- package/dist/largeattachment/crypto.js +2 -2
- package/dist/largeattachment/upload.d.ts +3 -3
- package/dist/largeattachment/upload.js +1 -1
- package/dist/migration/index.d.ts +1 -1
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +1 -1
- package/dist/migration/index.js.map +1 -1
- package/dist/migration/lockout.d.ts +2 -2
- package/dist/migration/lockout.js +2 -2
- package/dist/migration/migration.d.ts +6 -4
- package/dist/migration/migration.d.ts.map +1 -1
- package/dist/migration/migration.js +3 -3
- package/dist/migration/migration.js.map +1 -1
- package/dist/migration/notice.d.ts +31 -19
- package/dist/migration/notice.d.ts.map +1 -1
- package/dist/migration/notice.js +37 -71
- package/dist/migration/notice.js.map +1 -1
- package/dist/migration/orchestrate.d.ts +10 -10
- package/dist/migration/orchestrate.d.ts.map +1 -1
- package/dist/migration/orchestrate.js +23 -23
- package/dist/migration/orchestrate.js.map +1 -1
- package/dist/migration/sign.js +9 -9
- package/dist/migration/sign.js.map +1 -1
- package/dist/migration/types.d.ts +35 -29
- package/dist/migration/types.d.ts.map +1 -1
- package/dist/migration/types.js +5 -7
- package/dist/migration/types.js.map +1 -1
- package/dist/recovery/bundle_store.js +1 -1
- package/dist/recovery/sign.js +3 -3
- package/dist/recovery/types.d.ts +3 -3
- package/dist/reputation/abuse_report.d.ts +3 -3
- package/dist/reputation/abuse_report.js +2 -2
- package/dist/reputation/eligibility.d.ts +44 -0
- package/dist/reputation/eligibility.d.ts.map +1 -0
- package/dist/reputation/eligibility.js +58 -0
- package/dist/reputation/eligibility.js.map +1 -0
- package/dist/reputation/evidence.d.ts +47 -0
- package/dist/reputation/evidence.d.ts.map +1 -0
- package/dist/reputation/evidence.js +117 -0
- package/dist/reputation/evidence.js.map +1 -0
- package/dist/reputation/gossip_fetch.d.ts +2 -2
- package/dist/reputation/gossip_fetch.js +1 -1
- package/dist/reputation/index.d.ts +4 -1
- package/dist/reputation/index.d.ts.map +1 -1
- package/dist/reputation/index.js +4 -1
- package/dist/reputation/index.js.map +1 -1
- package/dist/reputation/pow.d.ts +1 -1
- package/dist/reputation/pow.js +1 -1
- package/dist/reputation/references.d.ts +51 -0
- package/dist/reputation/references.d.ts.map +1 -0
- package/dist/reputation/references.js +95 -0
- package/dist/reputation/references.js.map +1 -0
- package/dist/reputation/sign.d.ts +1 -1
- package/dist/reputation/sign.js +2 -2
- package/dist/reputation/types.d.ts +46 -2
- package/dist/reputation/types.d.ts.map +1 -1
- package/dist/reputation/types.js +14 -0
- package/dist/reputation/types.js.map +1 -1
- package/dist/reputation/whois.d.ts +1 -1
- package/dist/reputation/whois.js +1 -1
- package/dist/seal/wrap.d.ts +2 -2
- package/dist/seal/wrap.js +4 -4
- package/dist/session/dispatcher.d.ts +3 -3
- package/dist/session/dispatcher.js +1 -1
- package/dist/session/rekey_seal.d.ts +3 -3
- package/dist/session/rekey_seal.js +3 -3
- package/dist/session/session.d.ts +3 -3
- package/dist/session/session.js +3 -3
- package/dist/transparency/log.d.ts +1 -1
- package/dist/transparency/log.js +2 -2
- package/dist/transparency/types.d.ts +2 -2
- package/dist/transparency/types.js +1 -1
- package/dist/transport/h2.d.ts +33 -12
- package/dist/transport/h2.d.ts.map +1 -1
- package/dist/transport/h2.js +40 -13
- package/dist/transport/h2.js.map +1 -1
- package/dist/transport/index.d.ts +1 -1
- package/dist/transport/index.d.ts.map +1 -1
- package/dist/transport/index.js +1 -1
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/memory.js +1 -1
- package/dist/transport/ws.d.ts +1 -1
- package/dist/transport/ws.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical URL path prefix at which an extension's definition
|
|
3
|
+
* document is published per EXTENSIONS.md §3.5 and RFC 8615. The
|
|
4
|
+
* full URL is
|
|
5
|
+
* "https://<host>" + DefinitionPathPrefix + "<name>.json"
|
|
6
|
+
* where <name> is the namespace-prefixed identifier such as
|
|
7
|
+
* "semp.dev/foo" or "vendor.example.com/feature1".
|
|
8
|
+
*/
|
|
9
|
+
export declare const DefinitionPathPrefix = "/.well-known/semp-extensions/";
|
|
10
|
+
/**
|
|
11
|
+
* Extension validation failure reporting per EXTENSIONS.md §3.9.3.
|
|
12
|
+
*
|
|
13
|
+
* Runtime validation failures across one or more extensions in an
|
|
14
|
+
* envelope are reported with the `extension_unsupported` reason
|
|
15
|
+
* code and an `errors` array carrying per-extension diagnostics.
|
|
16
|
+
* Implementations MAY stop at the first failure and report a
|
|
17
|
+
* single-entry array or continue and report all failures.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
/** Defined validation_failure diagnostics per §3.9.3 table. */
|
|
22
|
+
export type ValidationFailureCode = "definition_unfetchable" | "definition_signature_invalid" | "data_schema_mismatch" | "placement_violation" | "authority_violation" | "dependency_unsatisfied" | "conflict_present";
|
|
23
|
+
/** Single entry in the §3.9.3 `errors` array. */
|
|
24
|
+
export interface ValidationFailureItem {
|
|
25
|
+
extension: string;
|
|
26
|
+
validation_failure: ValidationFailureCode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Envelope-rejection wire shape carrying one or more extension
|
|
30
|
+
* validation failures. The reason_code is always
|
|
31
|
+
* `extension_unsupported`; per-rule diagnostics live in
|
|
32
|
+
* `errors[i].validation_failure`.
|
|
33
|
+
*/
|
|
34
|
+
export interface ValidationFailureRejection {
|
|
35
|
+
type: "SEMP_ENVELOPE";
|
|
36
|
+
step: "rejected";
|
|
37
|
+
version: string;
|
|
38
|
+
reason_code: "extension_unsupported";
|
|
39
|
+
reason: string;
|
|
40
|
+
errors: ValidationFailureItem[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Wrap one or more validation failures in the §3.9.3 envelope
|
|
44
|
+
* rejection. The reason defaults to "Extension validation failed"
|
|
45
|
+
* when omitted.
|
|
46
|
+
*/
|
|
47
|
+
export declare function newValidationFailureRejection(items: ValidationFailureItem[], reason?: string): ValidationFailureRejection;
|
|
48
|
+
//# sourceMappingURL=validation_failure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation_failure.d.ts","sourceRoot":"","sources":["../../src/extensions/validation_failure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,kCAAkC,CAAC;AAEpE;;;;;;;;;;GAUG;AAEH,+DAA+D;AAC/D,MAAM,MAAM,qBAAqB,GAC7B,wBAAwB,GACxB,8BAA8B,GAC9B,sBAAsB,GACtB,qBAAqB,GACrB,qBAAqB,GACrB,wBAAwB,GACxB,kBAAkB,CAAC;AAEvB,iDAAiD;AACjD,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,qBAAqB,CAAC;CAC3C;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,uBAAuB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,qBAAqB,EAAE,EAC9B,MAAM,SAAgC,GACrC,0BAA0B,CAS5B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical URL path prefix at which an extension's definition
|
|
3
|
+
* document is published per EXTENSIONS.md §3.5 and RFC 8615. The
|
|
4
|
+
* full URL is
|
|
5
|
+
* "https://<host>" + DefinitionPathPrefix + "<name>.json"
|
|
6
|
+
* where <name> is the namespace-prefixed identifier such as
|
|
7
|
+
* "semp.dev/foo" or "vendor.example.com/feature1".
|
|
8
|
+
*/
|
|
9
|
+
export const DefinitionPathPrefix = "/.well-known/semp-extensions/";
|
|
10
|
+
/**
|
|
11
|
+
* Wrap one or more validation failures in the §3.9.3 envelope
|
|
12
|
+
* rejection. The reason defaults to "Extension validation failed"
|
|
13
|
+
* when omitted.
|
|
14
|
+
*/
|
|
15
|
+
export function newValidationFailureRejection(items, reason = "Extension validation failed") {
|
|
16
|
+
return {
|
|
17
|
+
type: "SEMP_ENVELOPE",
|
|
18
|
+
step: "rejected",
|
|
19
|
+
version: "1.0.0",
|
|
20
|
+
reason_code: "extension_unsupported",
|
|
21
|
+
reason,
|
|
22
|
+
errors: items,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=validation_failure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation_failure.js","sourceRoot":"","sources":["../../src/extensions/validation_failure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,+BAA+B,CAAC;AA6CpE;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAC3C,KAA8B,EAC9B,MAAM,GAAG,6BAA6B;IAEtC,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uBAAuB;QACpC,MAAM;QACN,MAAM,EAAE,KAAK;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -30,7 +30,7 @@ export declare function isChallengeInvalid(err: unknown): err is ChallengeInvali
|
|
|
30
30
|
/**
|
|
31
31
|
* Build an unsigned client-initiator abort message per §2.2a.6.
|
|
32
32
|
*
|
|
33
|
-
* The wire shape is `party: "client"` with no `server_signature`
|
|
33
|
+
* The wire shape is `party: "client"` with no `server_signature` -
|
|
34
34
|
* the initiator has not authenticated to the server at this point
|
|
35
35
|
* and MUST NOT do so as part of an abort.
|
|
36
36
|
*
|
package/dist/handshake/abort.js
CHANGED
|
@@ -38,7 +38,7 @@ export function isChallengeInvalid(err) {
|
|
|
38
38
|
/**
|
|
39
39
|
* Build an unsigned client-initiator abort message per §2.2a.6.
|
|
40
40
|
*
|
|
41
|
-
* The wire shape is `party: "client"` with no `server_signature`
|
|
41
|
+
* The wire shape is `party: "client"` with no `server_signature` -
|
|
42
42
|
* the initiator has not authenticated to the server at this point
|
|
43
43
|
* and MUST NOT do so as part of an abort.
|
|
44
44
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Mirror of `semp-go/handshake.Client`: a state machine the caller
|
|
5
5
|
* drives over a transport. The class never performs network I/O
|
|
6
|
-
* directly
|
|
6
|
+
* directly - the caller moves bytes between this object and the
|
|
7
7
|
* underlying transport.
|
|
8
8
|
*
|
|
9
9
|
* Lifecycle:
|
|
@@ -90,7 +90,7 @@ export interface HandshakeClientSession {
|
|
|
90
90
|
export { HandshakeRejectedError };
|
|
91
91
|
/**
|
|
92
92
|
* Stateful handshake client. One instance handles exactly one
|
|
93
|
-
* handshake
|
|
93
|
+
* handshake - discard after success or error. Re-using an instance
|
|
94
94
|
* is a programming error (the state machine is single-shot).
|
|
95
95
|
*/
|
|
96
96
|
export declare class HandshakeClient {
|
|
@@ -109,7 +109,7 @@ export declare class HandshakeClient {
|
|
|
109
109
|
private serverIdProofSignature;
|
|
110
110
|
private resumptionSecret;
|
|
111
111
|
private resumeNonce;
|
|
112
|
-
/** Final session
|
|
112
|
+
/** Final session - populated by {@link onAccepted}. */
|
|
113
113
|
private finalSession;
|
|
114
114
|
constructor(cfg: HandshakeClientConfig);
|
|
115
115
|
/**
|
|
@@ -124,12 +124,12 @@ export declare class HandshakeClient {
|
|
|
124
124
|
*
|
|
125
125
|
* Throws {@link ChallengeInvalidError} when the difficulty
|
|
126
126
|
* exceeds the protocol cap or the challenge has already
|
|
127
|
-
* expired
|
|
127
|
+
* expired - the caller follows up with a §2.2a.6 client abort.
|
|
128
128
|
*/
|
|
129
129
|
onChallenge(data: Uint8Array): Promise<Uint8Array>;
|
|
130
130
|
/**
|
|
131
131
|
* Process the server's RESPONSE, derive session keys, and produce
|
|
132
|
-
* CONFIRM bytes per §2.3
|
|
132
|
+
* CONFIRM bytes per §2.3 - §2.5. The ephemeral private key is
|
|
133
133
|
* zeroed before return.
|
|
134
134
|
*/
|
|
135
135
|
onResponse(data: Uint8Array): Uint8Array;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Mirror of `semp-go/handshake.Client`: a state machine the caller
|
|
5
5
|
* drives over a transport. The class never performs network I/O
|
|
6
|
-
* directly
|
|
6
|
+
* directly - the caller moves bytes between this object and the
|
|
7
7
|
* underlying transport.
|
|
8
8
|
*
|
|
9
9
|
* Lifecycle:
|
|
@@ -55,7 +55,7 @@ const POW_HARDCAP = MaxPoWDifficulty;
|
|
|
55
55
|
export { HandshakeRejectedError };
|
|
56
56
|
/**
|
|
57
57
|
* Stateful handshake client. One instance handles exactly one
|
|
58
|
-
* handshake
|
|
58
|
+
* handshake - discard after success or error. Re-using an instance
|
|
59
59
|
* is a programming error (the state machine is single-shot).
|
|
60
60
|
*/
|
|
61
61
|
export class HandshakeClient {
|
|
@@ -78,7 +78,7 @@ export class HandshakeClient {
|
|
|
78
78
|
// Resume state (HANDSHAKE.md §2.8).
|
|
79
79
|
resumptionSecret = null;
|
|
80
80
|
resumeNonce = null;
|
|
81
|
-
/** Final session
|
|
81
|
+
/** Final session - populated by {@link onAccepted}. */
|
|
82
82
|
finalSession = null;
|
|
83
83
|
constructor(cfg) {
|
|
84
84
|
if (cfg.suite !== "x25519-chacha20-poly1305" &&
|
|
@@ -151,7 +151,7 @@ export class HandshakeClient {
|
|
|
151
151
|
*
|
|
152
152
|
* Throws {@link ChallengeInvalidError} when the difficulty
|
|
153
153
|
* exceeds the protocol cap or the challenge has already
|
|
154
|
-
* expired
|
|
154
|
+
* expired - the caller follows up with a §2.2a.6 client abort.
|
|
155
155
|
*/
|
|
156
156
|
async onChallenge(data) {
|
|
157
157
|
if (this.initCanonical === null) {
|
|
@@ -206,7 +206,7 @@ export class HandshakeClient {
|
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* Process the server's RESPONSE, derive session keys, and produce
|
|
209
|
-
* CONFIRM bytes per §2.3
|
|
209
|
+
* CONFIRM bytes per §2.3 - §2.5. The ephemeral private key is
|
|
210
210
|
* zeroed before return.
|
|
211
211
|
*/
|
|
212
212
|
onResponse(data) {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* Compute SHA-256 over the concatenation of canonical(message_1)
|
|
13
13
|
* and canonical(message_2). The caller MUST pass the canonical
|
|
14
|
-
* bytes
|
|
15
|
-
* ENVELOPE.md §4.3
|
|
14
|
+
* bytes - sorted keys, no insignificant whitespace, as defined in
|
|
15
|
+
* ENVELOPE.md §4.3 - not the wire-format bytes.
|
|
16
16
|
*
|
|
17
17
|
* The output is the 32-byte digest the client signs as part of its
|
|
18
18
|
* identity proof.
|
|
@@ -12,8 +12,8 @@ import { sha256 } from "@noble/hashes/sha2.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* Compute SHA-256 over the concatenation of canonical(message_1)
|
|
14
14
|
* and canonical(message_2). The caller MUST pass the canonical
|
|
15
|
-
* bytes
|
|
16
|
-
* ENVELOPE.md §4.3
|
|
15
|
+
* bytes - sorted keys, no insignificant whitespace, as defined in
|
|
16
|
+
* ENVELOPE.md §4.3 - not the wire-format bytes.
|
|
17
17
|
*
|
|
18
18
|
* The output is the 32-byte digest the client signs as part of its
|
|
19
19
|
* identity proof.
|
|
@@ -76,7 +76,7 @@ export interface ClientConfig {
|
|
|
76
76
|
* AEAD-Seal under K_enc_c2s with AAD = session_id.
|
|
77
77
|
*
|
|
78
78
|
* When omitted (the default), the driver leaves identity_proof
|
|
79
|
-
* empty
|
|
79
|
+
* empty - the higher-level client wraps runClient with its
|
|
80
80
|
* own auth supply.
|
|
81
81
|
*/
|
|
82
82
|
identity?: {
|
|
@@ -131,7 +131,7 @@ export declare class HandshakeRejectedError extends Error {
|
|
|
131
131
|
*
|
|
132
132
|
* On error the transport is closed so the peer's pending `receive`
|
|
133
133
|
* unblocks. Successful completion leaves the transport owned by
|
|
134
|
-
* the returned Session
|
|
134
|
+
* the returned Session - closing the Session closes the transport.
|
|
135
135
|
*/
|
|
136
136
|
export declare function runClient(transport: Transport, config: ClientConfig): Promise<Session>;
|
|
137
137
|
//# sourceMappingURL=driver.d.ts.map
|
package/dist/handshake/driver.js
CHANGED
|
@@ -59,7 +59,7 @@ export class HandshakeRejectedError extends Error {
|
|
|
59
59
|
*
|
|
60
60
|
* On error the transport is closed so the peer's pending `receive`
|
|
61
61
|
* unblocks. Successful completion leaves the transport owned by
|
|
62
|
-
* the returned Session
|
|
62
|
+
* the returned Session - closing the Session closes the transport.
|
|
63
63
|
*/
|
|
64
64
|
export async function runClient(transport, config) {
|
|
65
65
|
if (config.suite !== "x25519-chacha20-poly1305" &&
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Federation handshake (server ↔ server) per HANDSHAKE.md §5.
|
|
3
3
|
*
|
|
4
4
|
* Two servers establish a federation session by exchanging four
|
|
5
|
-
* messages
|
|
5
|
+
* messages - symmetric in shape to the client handshake but with
|
|
6
6
|
* domain identity in plaintext on both sides plus a domain-proof
|
|
7
7
|
* verification step:
|
|
8
8
|
*
|
|
@@ -181,7 +181,7 @@ export interface FederationResume {
|
|
|
181
181
|
/**
|
|
182
182
|
* Domain-ownership verifier invoked by the responder during the
|
|
183
183
|
* handshake. `verify` resolves on success; rejects (or throws) on
|
|
184
|
-
* failure
|
|
184
|
+
* failure - the rejection reason is surfaced in
|
|
185
185
|
* {@link DomainVerificationResult.detail}.
|
|
186
186
|
*/
|
|
187
187
|
export interface DomainVerifier {
|
|
@@ -189,7 +189,7 @@ export interface DomainVerifier {
|
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* Permissive verifier that accepts every proof. Tests / single-
|
|
192
|
-
* process deployments only
|
|
192
|
+
* process deployments only - production MUST NOT use it.
|
|
193
193
|
*/
|
|
194
194
|
export declare class TrustingDomainVerifier implements DomainVerifier {
|
|
195
195
|
verify(): Promise<void>;
|
|
@@ -197,7 +197,7 @@ export declare class TrustingDomainVerifier implements DomainVerifier {
|
|
|
197
197
|
/**
|
|
198
198
|
* Decide which of two simultaneously-initiated federation handshakes
|
|
199
199
|
* proceeds per SESSION.md §2.5.2. Both peers agree on the winner
|
|
200
|
-
* without external coordination
|
|
200
|
+
* without external coordination - lexicographic compare provides
|
|
201
201
|
* exactly this property.
|
|
202
202
|
*
|
|
203
203
|
* Returns the winning `session_id` (the one that proceeds).
|
|
@@ -246,7 +246,7 @@ export interface FederationInitiatorSession {
|
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
248
|
* Stateful federation initiator. Mirror of `semp-go/handshake.Initiator`.
|
|
249
|
-
* Single-shot
|
|
249
|
+
* Single-shot - discard after success or error.
|
|
250
250
|
*/
|
|
251
251
|
export declare class FederationInitiator {
|
|
252
252
|
private readonly cfg;
|
|
@@ -325,7 +325,7 @@ export interface FederationResponderSession {
|
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
327
327
|
* Stateful federation responder. Mirror of `semp-go/handshake.Responder`.
|
|
328
|
-
* Single-shot
|
|
328
|
+
* Single-shot - discard after success or error.
|
|
329
329
|
*/
|
|
330
330
|
export declare class FederationResponder {
|
|
331
331
|
private readonly cfg;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Federation handshake (server ↔ server) per HANDSHAKE.md §5.
|
|
3
3
|
*
|
|
4
4
|
* Two servers establish a federation session by exchanging four
|
|
5
|
-
* messages
|
|
5
|
+
* messages - symmetric in shape to the client handshake but with
|
|
6
6
|
* domain identity in plaintext on both sides plus a domain-proof
|
|
7
7
|
* verification step:
|
|
8
8
|
*
|
|
@@ -32,7 +32,7 @@ import { HandshakePrefix, HandshakeVersion, } from "./messages.js";
|
|
|
32
32
|
export const FederationMessageType = "SEMP_HANDSHAKE";
|
|
33
33
|
/**
|
|
34
34
|
* Permissive verifier that accepts every proof. Tests / single-
|
|
35
|
-
* process deployments only
|
|
35
|
+
* process deployments only - production MUST NOT use it.
|
|
36
36
|
*/
|
|
37
37
|
export class TrustingDomainVerifier {
|
|
38
38
|
async verify() {
|
|
@@ -42,7 +42,7 @@ export class TrustingDomainVerifier {
|
|
|
42
42
|
/**
|
|
43
43
|
* Decide which of two simultaneously-initiated federation handshakes
|
|
44
44
|
* proceeds per SESSION.md §2.5.2. Both peers agree on the winner
|
|
45
|
-
* without external coordination
|
|
45
|
+
* without external coordination - lexicographic compare provides
|
|
46
46
|
* exactly this property.
|
|
47
47
|
*
|
|
48
48
|
* Returns the winning `session_id` (the one that proceeds).
|
|
@@ -54,7 +54,7 @@ export function resolveCollision(idA, idB) {
|
|
|
54
54
|
export const acceptAllPolicies = () => null;
|
|
55
55
|
/**
|
|
56
56
|
* Stateful federation initiator. Mirror of `semp-go/handshake.Initiator`.
|
|
57
|
-
* Single-shot
|
|
57
|
+
* Single-shot - discard after success or error.
|
|
58
58
|
*/
|
|
59
59
|
export class FederationInitiator {
|
|
60
60
|
cfg;
|
|
@@ -374,7 +374,7 @@ export class FederationInitiator {
|
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
376
376
|
* Stateful federation responder. Mirror of `semp-go/handshake.Responder`.
|
|
377
|
-
* Single-shot
|
|
377
|
+
* Single-shot - discard after success or error.
|
|
378
378
|
*/
|
|
379
379
|
export class FederationResponder {
|
|
380
380
|
cfg;
|
|
@@ -48,7 +48,7 @@ export declare function computeFirstContactPrefix(senderDomain: string, recipien
|
|
|
48
48
|
* trailing 32 bytes of the prefix are SHA-256 of the canonical
|
|
49
49
|
* binding input.
|
|
50
50
|
*
|
|
51
|
-
* Does NOT verify the PoW solution itself
|
|
51
|
+
* Does NOT verify the PoW solution itself - pair with
|
|
52
52
|
* `verifyChallengeSolution` from {@link "./pow"} for a full check.
|
|
53
53
|
*/
|
|
54
54
|
export declare function verifyFirstContactBinding(prefix: Uint8Array, senderDomain: string, recipientAddress: string, postmarkId: string): boolean;
|
|
@@ -62,7 +62,7 @@ export function computeFirstContactPrefix(senderDomain, recipientAddress, postma
|
|
|
62
62
|
* trailing 32 bytes of the prefix are SHA-256 of the canonical
|
|
63
63
|
* binding input.
|
|
64
64
|
*
|
|
65
|
-
* Does NOT verify the PoW solution itself
|
|
65
|
+
* Does NOT verify the PoW solution itself - pair with
|
|
66
66
|
* `verifyChallengeSolution` from {@link "./pow"} for a full check.
|
|
67
67
|
*/
|
|
68
68
|
export function verifyFirstContactBinding(prefix, senderDomain, recipientAddress, postmarkId) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Identity-proof composition per HANDSHAKE.md §2.5.
|
|
3
3
|
*
|
|
4
4
|
* The client's CONFIRM message carries an encrypted identity-proof
|
|
5
|
-
* block
|
|
5
|
+
* block - a self-contained JSON object proving control of the
|
|
6
6
|
* client's long-term identity key, encrypted under the freshly
|
|
7
7
|
* derived `K_enc_c2s` so a passive observer sees only opaque
|
|
8
8
|
* ciphertext.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Identity-proof composition per HANDSHAKE.md §2.5.
|
|
3
3
|
*
|
|
4
4
|
* The client's CONFIRM message carries an encrypted identity-proof
|
|
5
|
-
* block
|
|
5
|
+
* block - a self-contained JSON object proving control of the
|
|
6
6
|
* client's long-term identity key, encrypted under the freshly
|
|
7
7
|
* derived `K_enc_c2s` so a passive observer sees only opaque
|
|
8
8
|
* ciphertext.
|
package/dist/handshake/pow.js
CHANGED
|
@@ -45,7 +45,7 @@ export function verifyChallengeSolution(prefix, challengeId, nonceB64, claimedHa
|
|
|
45
45
|
if (nonceB64 === "") {
|
|
46
46
|
return new Error("handshake: empty PoW nonce");
|
|
47
47
|
}
|
|
48
|
-
// Nonce must be valid base64
|
|
48
|
+
// Nonce must be valid base64 - but we accept its bytes as-is in
|
|
49
49
|
// the preimage (the spec hashes the base64 string, not the
|
|
50
50
|
// decoded bytes).
|
|
51
51
|
try {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Mirror of `semp-go/handshake.Server`: a state machine the caller
|
|
5
5
|
* drives over a transport. The class never performs network I/O
|
|
6
|
-
* directly
|
|
6
|
+
* directly - the caller moves bytes between this object and the
|
|
7
7
|
* underlying transport.
|
|
8
8
|
*
|
|
9
9
|
* Lifecycle:
|
|
@@ -77,7 +77,7 @@ export declare class HandshakeServerRejectionError extends Error {
|
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Stateful handshake server. One instance handles exactly one
|
|
80
|
-
* handshake
|
|
80
|
+
* handshake - discard after success or error. Re-using an instance
|
|
81
81
|
* is a programming error (the state machine is single-shot).
|
|
82
82
|
*/
|
|
83
83
|
export declare class HandshakeServer {
|
|
@@ -96,7 +96,7 @@ export declare class HandshakeServer {
|
|
|
96
96
|
/**
|
|
97
97
|
* Process the client's INIT and produce signed RESPONSE bytes per
|
|
98
98
|
* §2.2 / §2.3. Throws {@link HandshakeServerRejectionError} on
|
|
99
|
-
* suite mismatch
|
|
99
|
+
* suite mismatch - the rejection bytes are accessible on the
|
|
100
100
|
* thrown error for the caller to transmit before closing the
|
|
101
101
|
* transport.
|
|
102
102
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Mirror of `semp-go/handshake.Server`: a state machine the caller
|
|
5
5
|
* drives over a transport. The class never performs network I/O
|
|
6
|
-
* directly
|
|
6
|
+
* directly - the caller moves bytes between this object and the
|
|
7
7
|
* underlying transport.
|
|
8
8
|
*
|
|
9
9
|
* Lifecycle:
|
|
@@ -55,7 +55,7 @@ export class HandshakeServerRejectionError extends Error {
|
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Stateful handshake server. One instance handles exactly one
|
|
58
|
-
* handshake
|
|
58
|
+
* handshake - discard after success or error. Re-using an instance
|
|
59
59
|
* is a programming error (the state machine is single-shot).
|
|
60
60
|
*/
|
|
61
61
|
export class HandshakeServer {
|
|
@@ -88,7 +88,7 @@ export class HandshakeServer {
|
|
|
88
88
|
/**
|
|
89
89
|
* Process the client's INIT and produce signed RESPONSE bytes per
|
|
90
90
|
* §2.2 / §2.3. Throws {@link HandshakeServerRejectionError} on
|
|
91
|
-
* suite mismatch
|
|
91
|
+
* suite mismatch - the rejection bytes are accessible on the
|
|
92
92
|
* thrown error for the caller to transmit before closing the
|
|
93
93
|
* transport.
|
|
94
94
|
*/
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Revoking a device with reason `key_compromise` MUST be done in
|
|
5
5
|
* the same transaction as rotating to a new identity key plus a new
|
|
6
|
-
* encryption key
|
|
6
|
+
* encryption key - the compromised device held the shared identity
|
|
7
7
|
* private key, so the adversary holds it too. A partial cascade
|
|
8
8
|
* (device revoked but identity key not rotated) leaves the account
|
|
9
9
|
* vulnerable and is a specification violation.
|
|
@@ -61,7 +61,7 @@ export interface CompromiseRotationInput {
|
|
|
61
61
|
userId: string;
|
|
62
62
|
/** Device being revoked. */
|
|
63
63
|
compromisedDeviceId: string;
|
|
64
|
-
/** Device producing the cascade
|
|
64
|
+
/** Device producing the cascade - recorded as `revoked_by_device_id`. */
|
|
65
65
|
revokingDeviceId: string;
|
|
66
66
|
/** 32-byte Ed25519 seed for the prior identity key. */
|
|
67
67
|
priorIdentitySeed: Uint8Array;
|
package/dist/keys/compromise.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Revoking a device with reason `key_compromise` MUST be done in
|
|
5
5
|
* the same transaction as rotating to a new identity key plus a new
|
|
6
|
-
* encryption key
|
|
6
|
+
* encryption key - the compromised device held the shared identity
|
|
7
7
|
* private key, so the adversary holds it too. A partial cascade
|
|
8
8
|
* (device revoked but identity key not rotated) leaves the account
|
|
9
9
|
* vulnerable and is a specification violation.
|
|
@@ -115,7 +115,7 @@ export interface SignDeviceCertificateResult {
|
|
|
115
115
|
* Compute the issuer's signature over the canonical certificate
|
|
116
116
|
* bytes, then return a copy with `signature.{algorithm,key_id,value}`
|
|
117
117
|
* populated. Pre-populates the algorithm + key_id BEFORE
|
|
118
|
-
* canonicalization so the canonical bytes cover both
|
|
118
|
+
* canonicalization so the canonical bytes cover both - an attacker
|
|
119
119
|
* cannot downgrade the signing algorithm or forge a different
|
|
120
120
|
* issuer fingerprint.
|
|
121
121
|
*/
|
|
@@ -124,7 +124,7 @@ export declare function signDeviceCertificate(input: SignDeviceCertificateInput)
|
|
|
124
124
|
* Ed25519-verify a certificate's signature under `issuerPub`. Returns
|
|
125
125
|
* true when the signature verifies. Does NOT cross-check that the
|
|
126
126
|
* issuer is currently a registered, non-revoked full-access device
|
|
127
|
-
* for the account
|
|
127
|
+
* for the account - that requires a key directory store and is the
|
|
128
128
|
* caller's responsibility.
|
|
129
129
|
*/
|
|
130
130
|
export declare function verifyDeviceCertificate(certificate: DeviceCertificate, issuerPub: Uint8Array): boolean;
|
|
@@ -153,7 +153,7 @@ export interface AddressIdentity {
|
|
|
153
153
|
}
|
|
154
154
|
/**
|
|
155
155
|
* Report whether `matcher` permits sending to `recipient` per
|
|
156
|
-
* §10.3.3.1. Does NOT evaluate rate limits
|
|
156
|
+
* §10.3.3.1. Does NOT evaluate rate limits - the caller applies
|
|
157
157
|
* rate-limit tiers separately per §10.3.4.
|
|
158
158
|
*/
|
|
159
159
|
export declare function scopeAllowsRecipient(matcher: ScopeMatcher, recipient: AddressIdentity): boolean;
|
|
@@ -39,7 +39,7 @@ export const MaxDeviceCertificateLifetimeMs = 365 * 24 * 3600 * 1000;
|
|
|
39
39
|
* Compute the issuer's signature over the canonical certificate
|
|
40
40
|
* bytes, then return a copy with `signature.{algorithm,key_id,value}`
|
|
41
41
|
* populated. Pre-populates the algorithm + key_id BEFORE
|
|
42
|
-
* canonicalization so the canonical bytes cover both
|
|
42
|
+
* canonicalization so the canonical bytes cover both - an attacker
|
|
43
43
|
* cannot downgrade the signing algorithm or forge a different
|
|
44
44
|
* issuer fingerprint.
|
|
45
45
|
*/
|
|
@@ -71,7 +71,7 @@ export function signDeviceCertificate(input) {
|
|
|
71
71
|
* Ed25519-verify a certificate's signature under `issuerPub`. Returns
|
|
72
72
|
* true when the signature verifies. Does NOT cross-check that the
|
|
73
73
|
* issuer is currently a registered, non-revoked full-access device
|
|
74
|
-
* for the account
|
|
74
|
+
* for the account - that requires a key directory store and is the
|
|
75
75
|
* caller's responsibility.
|
|
76
76
|
*/
|
|
77
77
|
export function verifyDeviceCertificate(certificate, issuerPub) {
|
|
@@ -259,7 +259,7 @@ function validateRateLimits(tiers, path) {
|
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
261
|
* Report whether `matcher` permits sending to `recipient` per
|
|
262
|
-
* §10.3.3.1. Does NOT evaluate rate limits
|
|
262
|
+
* §10.3.3.1. Does NOT evaluate rate limits - the caller applies
|
|
263
263
|
* rate-limit tiers separately per §10.3.4.
|
|
264
264
|
*/
|
|
265
265
|
export function scopeAllowsRecipient(matcher, recipient) {
|
|
@@ -273,7 +273,7 @@ export function scopeAllowsRecipient(matcher, recipient) {
|
|
|
273
273
|
case "denylist":
|
|
274
274
|
return !matchAny(matcher.deny ?? [], recipient);
|
|
275
275
|
default:
|
|
276
|
-
// Unknown mode
|
|
276
|
+
// Unknown mode - fail closed.
|
|
277
277
|
return false;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Per-key revocation primitives per KEY.md §8.
|
|
3
3
|
*
|
|
4
|
-
* The published wire shape is `SEMP_KEY_REVOCATION`
|
|
4
|
+
* The published wire shape is `SEMP_KEY_REVOCATION` - a list of
|
|
5
5
|
* revoked keys signed by the publishing party (a domain or a user).
|
|
6
6
|
* The signature uses the `SEMP-REVOCATION:` domain-separation
|
|
7
7
|
* prefix per ENVELOPE.md §4.3.
|
|
@@ -23,7 +23,7 @@ export interface PublicationSignature {
|
|
|
23
23
|
value: string;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Per-key revocation record per §8.4
|
|
26
|
+
* Per-key revocation record per §8.4 - embedded in a key response
|
|
27
27
|
* or in a {@link RevocationPublication}.
|
|
28
28
|
*/
|
|
29
29
|
export interface Revocation {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Per-key revocation primitives per KEY.md §8.
|
|
3
3
|
*
|
|
4
|
-
* The published wire shape is `SEMP_KEY_REVOCATION`
|
|
4
|
+
* The published wire shape is `SEMP_KEY_REVOCATION` - a list of
|
|
5
5
|
* revoked keys signed by the publishing party (a domain or a user).
|
|
6
6
|
* The signature uses the `SEMP-REVOCATION:` domain-separation
|
|
7
7
|
* prefix per ENVELOPE.md §4.3.
|
package/dist/keys/request.d.ts
CHANGED
|
@@ -15,8 +15,22 @@ export declare const KeysRequestType = "SEMP_KEYS";
|
|
|
15
15
|
export declare const KeysRequestVersion = "1.0.0";
|
|
16
16
|
/** Step discriminator for SEMP_KEYS messages. */
|
|
17
17
|
export type KeysRequestStep = "request" | "response";
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Per-address lookup status per draft-gokce-semp-client §6.4. The
|
|
20
|
+
* set mirrors the submission-time status vocabulary so the client
|
|
21
|
+
* can share dispatch logic between key fetch and submission.
|
|
22
|
+
*
|
|
23
|
+
* - "found": the home server returned a current key set.
|
|
24
|
+
* - "not_found": the address is registered with the home server
|
|
25
|
+
* but has no current published key.
|
|
26
|
+
* - "legacy_required": the address belongs to a domain that does
|
|
27
|
+
* not run SEMP; client SHOULD fall back to legacy interop.
|
|
28
|
+
* - "recipient_not_found": no record of the address at the home
|
|
29
|
+
* server.
|
|
30
|
+
* - "error": the lookup failed for a transient or unspecified
|
|
31
|
+
* reason. `error_reason` carries the diagnostic.
|
|
32
|
+
*/
|
|
33
|
+
export type KeysResultStatus = "found" | "not_found" | "legacy_required" | "recipient_not_found" | "error";
|
|
20
34
|
/** A single key record per KEY.md §3 / §10.6. */
|
|
21
35
|
export interface KeyRecord {
|
|
22
36
|
algorithm: string;
|
|
@@ -53,7 +67,7 @@ export interface KeysRequest {
|
|
|
53
67
|
type: typeof KeysRequestType;
|
|
54
68
|
step: "request";
|
|
55
69
|
version: string;
|
|
56
|
-
/** ULID for the request
|
|
70
|
+
/** ULID for the request - used to correlate the response. */
|
|
57
71
|
id: string;
|
|
58
72
|
/** ISO 8601 UTC. */
|
|
59
73
|
timestamp: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/keys/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,qCAAqC;AACrC,eAAO,MAAM,eAAe,cAAc,CAAC;AAE3C,+CAA+C;AAC/C,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/keys/request.ts"],"names":[],"mappings":"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"}
|