@cello-protocol/protocol-types 0.0.43 → 0.0.45

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.
@@ -0,0 +1,87 @@
1
+ /**
2
+ * DOD-DOC-REJECT-2 — the rejection's signed preimage, and its wire type.
3
+ *
4
+ * A `0x05` rejection leaf has carried a `signature` field since REJECT-1, and nothing defined what
5
+ * that signature was OVER. The field was required — rightly, because an all-zero placeholder in an
6
+ * immutable log is indistinguishable from a real signature that fails to verify — but with no
7
+ * canonical to-be-signed structure it could only ever be filled dishonestly. Writing the
8
+ * composition-root signer is what surfaced it: the only thing available to sign was an empty buffer.
9
+ *
10
+ * ── WHAT A REJECTION HAS TO BIND ──────────────────────────────────────────────────────────────
11
+ *
12
+ * A rejection is a claim with consequences for the other party: they stop retrying, roll back local
13
+ * work, and supersede. So it binds
14
+ *
15
+ * `document_id` — a rejection cannot be moved to another document,
16
+ * `rejected_envelope_hash` — nor to another envelope,
17
+ * `reason` — the sender acts on it, so it must not be substitutable,
18
+ * `rejecting_agent_id` — who refused; the counterpart of the ack's `acker_agent_id`,
19
+ * `round` — which retry this is. Unbound, a captured round-1 rejection replayed
20
+ * twice more would drive a document to `stalled` without the rejecting
21
+ * party ever having refused again.
22
+ *
23
+ * ── WHY IT IS A SEPARATE TYPE FROM THE ACK ────────────────────────────────────────────────────
24
+ *
25
+ * They look similar and are not the same statement. An ACK answers "did you take my envelope" and
26
+ * settles delivery. A REJECTION is a §3.2 protocol act that goes in the log as a leaf, carries a
27
+ * retry round, and is what supersession resolves. One type carrying both would need a mode flag,
28
+ * and a mode flag on a signed structure is how a signature over one meaning gets read as the other.
29
+ */
30
+ /** Domain tag in slot 0. Distinct from the update, proposal and ack domains. */
31
+ export declare const DOCUMENT_REJECTION_DOMAIN = "CELLO-DOCUMENT-REJECTION-v1";
32
+ /** On the wire, so a version skew is DETECTED rather than surfacing as a signature failure. */
33
+ export declare const DOCUMENT_REJECTION_VERSION = 1;
34
+ /** Peer-controlled display text; capped for the same reason the ack's reason is. */
35
+ export declare const MAX_REJECTION_DETAIL_LENGTH = 500;
36
+ export interface DocumentRejectionEnvelope {
37
+ type: "document_rejection";
38
+ rejection_version: number;
39
+ document_id: string;
40
+ /** The envelope being refused. */
41
+ rejected_envelope_hash: string;
42
+ /** Who refused. The counterpart of the ack's `acker_agent_id`. */
43
+ rejecting_agent_id: string;
44
+ /** The §3.2 machine-readable reason the sender acts on. */
45
+ reason: string;
46
+ detail?: string;
47
+ /**
48
+ * Which retry round this is (1-based). SIGNED, because unbound a captured round-1 rejection
49
+ * replayed twice more drives the document to `stalled` without the rejecting party ever having
50
+ * refused again.
51
+ */
52
+ round: number;
53
+ rejected_at_ms: number;
54
+ /** Ed25519 (RFC 8032) over `buildDocumentRejectionTbs`. */
55
+ signature: Uint8Array;
56
+ }
57
+ /**
58
+ * The canonical to-be-signed preimage: a fixed-order CBOR ARRAY with the domain in slot 0.
59
+ *
60
+ * An array rather than a map, for the reason `cbor.ts` gives — this encoder is deliberately not
61
+ * deterministic for maps, so a map preimage would make the signature depend on the order the
62
+ * rejecting party happened to build the object in.
63
+ *
64
+ * `detail` is encoded as explicit `null` when absent so the slot is always occupied and no field's
65
+ * meaning depends on whether the one before it was present. The timestamp is coerced to a BigInt
66
+ * past `0xffffffff`, because cbor-x encodes a JS number that large as an IEEE float64 rather than a
67
+ * uint64 — measured on the ack, where it would have made a genuine signature read as a forgery to
68
+ * any implementation encoding canonically.
69
+ */
70
+ export declare function buildDocumentRejectionTbs(env: DocumentRejectionEnvelope, opts?: {
71
+ preHash?: boolean;
72
+ }): Uint8Array;
73
+ /**
74
+ * The rejection's identity — the `0x05` leaf's envelope hash.
75
+ *
76
+ * Over the same preimage that is signed, so the leaf commits to exactly the bytes whose signature
77
+ * was verified, and excludes the signature so re-signing does not orphan anything pointing at it.
78
+ *
79
+ * This replaces REJECT-1's local `sha256("rejection:" + hash + reason + nonce)` construction, which
80
+ * was a placeholder: it bound no signature, no round, and no rejecting party.
81
+ */
82
+ export declare function documentRejectionHash(env: DocumentRejectionEnvelope): string;
83
+ /** The cross-field rules, applied on BOTH encode and decode so the two cannot drift. */
84
+ export declare function assertDocumentRejectionConsistent(env: DocumentRejectionEnvelope): void;
85
+ export declare function encodeDocumentRejection(env: DocumentRejectionEnvelope): Uint8Array;
86
+ export declare function decodeDocumentRejection(bytes: Uint8Array): DocumentRejectionEnvelope;
87
+ //# sourceMappingURL=document-rejection-envelope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-rejection-envelope.d.ts","sourceRoot":"","sources":["../src/document-rejection-envelope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,gFAAgF;AAChF,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AAEvE,+FAA+F;AAC/F,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,oFAAoF;AACpF,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAI/C,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,yBAAyB,EAC9B,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,UAAU,CAiBZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,yBAAyB,GAAG,MAAM,CAI5E;AAED,wFAAwF;AACxF,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,yBAAyB,GAAG,IAAI,CActF;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,yBAAyB,GAAG,UAAU,CAclF;AAWD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,yBAAyB,CA8EpF"}
@@ -0,0 +1,189 @@
1
+ /**
2
+ * DOD-DOC-REJECT-2 — the rejection's signed preimage, and its wire type.
3
+ *
4
+ * A `0x05` rejection leaf has carried a `signature` field since REJECT-1, and nothing defined what
5
+ * that signature was OVER. The field was required — rightly, because an all-zero placeholder in an
6
+ * immutable log is indistinguishable from a real signature that fails to verify — but with no
7
+ * canonical to-be-signed structure it could only ever be filled dishonestly. Writing the
8
+ * composition-root signer is what surfaced it: the only thing available to sign was an empty buffer.
9
+ *
10
+ * ── WHAT A REJECTION HAS TO BIND ──────────────────────────────────────────────────────────────
11
+ *
12
+ * A rejection is a claim with consequences for the other party: they stop retrying, roll back local
13
+ * work, and supersede. So it binds
14
+ *
15
+ * `document_id` — a rejection cannot be moved to another document,
16
+ * `rejected_envelope_hash` — nor to another envelope,
17
+ * `reason` — the sender acts on it, so it must not be substitutable,
18
+ * `rejecting_agent_id` — who refused; the counterpart of the ack's `acker_agent_id`,
19
+ * `round` — which retry this is. Unbound, a captured round-1 rejection replayed
20
+ * twice more would drive a document to `stalled` without the rejecting
21
+ * party ever having refused again.
22
+ *
23
+ * ── WHY IT IS A SEPARATE TYPE FROM THE ACK ────────────────────────────────────────────────────
24
+ *
25
+ * They look similar and are not the same statement. An ACK answers "did you take my envelope" and
26
+ * settles delivery. A REJECTION is a §3.2 protocol act that goes in the log as a leaf, carries a
27
+ * retry round, and is what supersession resolves. One type carrying both would need a mode flag,
28
+ * and a mode flag on a signed structure is how a signature over one meaning gets read as the other.
29
+ */
30
+ import { createHash } from "node:crypto";
31
+ import { encodeCbor, decodeCbor } from "./cbor.js";
32
+ /** Domain tag in slot 0. Distinct from the update, proposal and ack domains. */
33
+ export const DOCUMENT_REJECTION_DOMAIN = "CELLO-DOCUMENT-REJECTION-v1";
34
+ /** On the wire, so a version skew is DETECTED rather than surfacing as a signature failure. */
35
+ export const DOCUMENT_REJECTION_VERSION = 1;
36
+ /** Peer-controlled display text; capped for the same reason the ack's reason is. */
37
+ export const MAX_REJECTION_DETAIL_LENGTH = 500;
38
+ const HEX32 = /^[0-9a-f]{64}$/;
39
+ /**
40
+ * The canonical to-be-signed preimage: a fixed-order CBOR ARRAY with the domain in slot 0.
41
+ *
42
+ * An array rather than a map, for the reason `cbor.ts` gives — this encoder is deliberately not
43
+ * deterministic for maps, so a map preimage would make the signature depend on the order the
44
+ * rejecting party happened to build the object in.
45
+ *
46
+ * `detail` is encoded as explicit `null` when absent so the slot is always occupied and no field's
47
+ * meaning depends on whether the one before it was present. The timestamp is coerced to a BigInt
48
+ * past `0xffffffff`, because cbor-x encodes a JS number that large as an IEEE float64 rather than a
49
+ * uint64 — measured on the ack, where it would have made a genuine signature read as a forgery to
50
+ * any implementation encoding canonically.
51
+ */
52
+ export function buildDocumentRejectionTbs(env, opts = {}) {
53
+ assertDocumentRejectionConsistent(env);
54
+ const preimage = encodeCbor([
55
+ DOCUMENT_REJECTION_DOMAIN,
56
+ env.rejection_version,
57
+ env.document_id,
58
+ env.rejected_envelope_hash,
59
+ env.rejecting_agent_id,
60
+ env.reason,
61
+ env.detail ?? null,
62
+ env.round,
63
+ typeof env.rejected_at_ms === "number" && env.rejected_at_ms > 0xffffffff
64
+ ? BigInt(env.rejected_at_ms)
65
+ : env.rejected_at_ms,
66
+ ]);
67
+ if (opts.preHash === false)
68
+ return preimage;
69
+ return new Uint8Array(createHash("sha256").update(preimage).digest());
70
+ }
71
+ /**
72
+ * The rejection's identity — the `0x05` leaf's envelope hash.
73
+ *
74
+ * Over the same preimage that is signed, so the leaf commits to exactly the bytes whose signature
75
+ * was verified, and excludes the signature so re-signing does not orphan anything pointing at it.
76
+ *
77
+ * This replaces REJECT-1's local `sha256("rejection:" + hash + reason + nonce)` construction, which
78
+ * was a placeholder: it bound no signature, no round, and no rejecting party.
79
+ */
80
+ export function documentRejectionHash(env) {
81
+ return createHash("sha256")
82
+ .update(buildDocumentRejectionTbs(env, { preHash: false }))
83
+ .digest("hex");
84
+ }
85
+ /** The cross-field rules, applied on BOTH encode and decode so the two cannot drift. */
86
+ export function assertDocumentRejectionConsistent(env) {
87
+ if (env.reason.length === 0) {
88
+ // The sender is being told to stop and supersede; without the reason it cannot know what to
89
+ // change. The whole rejection protocol exists to avoid exactly that.
90
+ throw new Error("document_rejection_reason: a rejection must carry its reason");
91
+ }
92
+ if (!Number.isInteger(env.round) || env.round < 1) {
93
+ throw new Error(`document_rejection_round: must be a positive integer, got ${env.round}`);
94
+ }
95
+ if (env.detail !== undefined && env.detail.length > MAX_REJECTION_DETAIL_LENGTH) {
96
+ throw new Error(`document_rejection_detail: at most ${MAX_REJECTION_DETAIL_LENGTH} characters, got ${env.detail.length}`);
97
+ }
98
+ }
99
+ export function encodeDocumentRejection(env) {
100
+ assertDocumentRejectionConsistent(env);
101
+ return encodeCbor({
102
+ type: env.type,
103
+ rejection_version: env.rejection_version,
104
+ document_id: env.document_id,
105
+ rejected_envelope_hash: env.rejected_envelope_hash,
106
+ rejecting_agent_id: env.rejecting_agent_id,
107
+ reason: env.reason,
108
+ detail: env.detail ?? null,
109
+ round: env.round,
110
+ rejected_at_ms: env.rejected_at_ms,
111
+ signature: env.signature,
112
+ });
113
+ }
114
+ function present(map, field) {
115
+ // `in`, not a nullish check — the same discipline as every sibling envelope. A defaulted field is
116
+ // a claim the rejecting party never made.
117
+ if (!(field in map)) {
118
+ throw new Error(`document_rejection_missing_field: ${field} is mandatory and was not present`);
119
+ }
120
+ return map[field];
121
+ }
122
+ export function decodeDocumentRejection(bytes) {
123
+ const decoded = decodeCbor(bytes);
124
+ if (typeof decoded !== "object" || decoded === null || Array.isArray(decoded)) {
125
+ throw new Error("document_rejection_malformed: not a CBOR map");
126
+ }
127
+ const map = decoded;
128
+ if (present(map, "type") !== "document_rejection") {
129
+ throw new Error("document_rejection_type: expected document_rejection");
130
+ }
131
+ const version = present(map, "rejection_version");
132
+ if (typeof version !== "number" || !Number.isInteger(version)) {
133
+ throw new Error("document_rejection_version: must be an integer");
134
+ }
135
+ if (version !== DOCUMENT_REJECTION_VERSION) {
136
+ throw new Error(`document_rejection_version: this build speaks version ${DOCUMENT_REJECTION_VERSION} and the ` +
137
+ `frame declares ${version} — one of the two clients needs upgrading`);
138
+ }
139
+ for (const field of ["document_id", "rejected_envelope_hash"]) {
140
+ const value = present(map, field);
141
+ if (typeof value !== "string" || !HEX32.test(value)) {
142
+ throw new Error(`document_rejection_${field}: must be a 32-byte hex digest`);
143
+ }
144
+ }
145
+ const rejecting = present(map, "rejecting_agent_id");
146
+ if (typeof rejecting !== "string" || rejecting.length === 0) {
147
+ throw new Error("document_rejection_agent: rejecting_agent_id must be a non-empty text string");
148
+ }
149
+ const reason = present(map, "reason");
150
+ if (typeof reason !== "string") {
151
+ throw new Error("document_rejection_reason: must be a text string");
152
+ }
153
+ const rawDetail = present(map, "detail");
154
+ if (rawDetail !== null && typeof rawDetail !== "string") {
155
+ throw new Error("document_rejection_detail: must be a text string or explicit null");
156
+ }
157
+ // Empty string means ABSENT — the same normalisation the ack needed, for the same reason: a peer
158
+ // in a language where a non-nullable string defaults to "" must not be refused for a field it
159
+ // never filled in.
160
+ const detail = rawDetail === "" ? null : rawDetail;
161
+ const round = present(map, "round");
162
+ if (typeof round !== "number" || !Number.isInteger(round) || round < 1) {
163
+ throw new Error(`document_rejection_round: must be a positive integer, got ${String(round)}`);
164
+ }
165
+ const rejectedAt = present(map, "rejected_at_ms");
166
+ if (typeof rejectedAt !== "number" || !Number.isSafeInteger(rejectedAt) || rejectedAt <= 0) {
167
+ throw new Error("document_rejection_time: rejected_at_ms must be a positive safe integer");
168
+ }
169
+ const signature = present(map, "signature");
170
+ if (!(signature instanceof Uint8Array)) {
171
+ throw new Error("document_rejection_signature: must be a CBOR byte string");
172
+ }
173
+ const env = {
174
+ type: "document_rejection",
175
+ rejection_version: version,
176
+ document_id: map["document_id"],
177
+ rejected_envelope_hash: map["rejected_envelope_hash"],
178
+ rejecting_agent_id: rejecting,
179
+ reason,
180
+ ...(detail === null ? {} : { detail }),
181
+ round,
182
+ rejected_at_ms: rejectedAt,
183
+ // COPIED — cbor-x returns byte strings as views into the buffer it decoded.
184
+ signature: new Uint8Array(signature),
185
+ };
186
+ assertDocumentRejectionConsistent(env);
187
+ return env;
188
+ }
189
+ //# sourceMappingURL=document-rejection-envelope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-rejection-envelope.js","sourceRoot":"","sources":["../src/document-rejection-envelope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEnD,gFAAgF;AAChF,MAAM,CAAC,MAAM,yBAAyB,GAAG,6BAA6B,CAAC;AAEvE,+FAA+F;AAC/F,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C,oFAAoF;AACpF,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,MAAM,KAAK,GAAG,gBAAgB,CAAC;AAwB/B;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,yBAAyB,CACvC,GAA8B,EAC9B,OAA8B,EAAE;IAEhC,iCAAiC,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC1B,yBAAyB;QACzB,GAAG,CAAC,iBAAiB;QACrB,GAAG,CAAC,WAAW;QACf,GAAG,CAAC,sBAAsB;QAC1B,GAAG,CAAC,kBAAkB;QACtB,GAAG,CAAC,MAAM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;QACN,GAAG,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;QACtC,KAAK;QACL,cAAc,EAAE,UAAU;QAC1B,4EAA4E;QAC5E,SAAS,EAAE,IAAI,UAAU,CAAC,SAAS,CAAC;KACrC,CAAC;IACF,iCAAiC,CAAC,GAAG,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC;AACb,CAAC"}
package/dist/index.d.ts CHANGED
@@ -32,4 +32,12 @@ export { DOCUMENT_UPDATE_DOMAIN, DOCUMENT_UPDATE_ENCODING_V1, DOCUMENT_EPOCH_V1,
32
32
  export type { DocumentUpdateEnvelope } from "./document-envelope.js";
33
33
  export { DOCUMENT_PROPOSAL_DOMAIN, DOCUMENT_FEATURE_VERSION, ASSURANCE_TIER_V1, TOPOLOGY_V1, buildDocumentProposalTbs, documentIdFromProposal, encodeDocumentProposal, decodeDocumentProposal, seamViolation, documentFeatureIncompatibility, } from "./document-proposal.js";
34
34
  export type { DocumentProposalEnvelope, DocumentProperties, DocumentConsentState, } from "./document-proposal.js";
35
+ export { DOCUMENT_ACK_DOMAIN, buildDocumentAckTbs, encodeDocumentAck, decodeDocumentAck, } from "./document-ack.js";
36
+ export type { DocumentAck } from "./document-ack.js";
37
+ export { encodeDocumentProposalAck, decodeDocumentProposalAck, buildDocumentProposalAckTbs, assertDocumentProposalAckConsistent, DOCUMENT_PROPOSAL_ACK_DOMAIN, DOCUMENT_PROPOSAL_ACK_VERSION, MAX_PROPOSAL_REFUSAL_REASON_LENGTH, } from "./document-proposal-ack.js";
38
+ export type { DocumentProposalAck } from "./document-proposal-ack.js";
39
+ export { encodeDocumentControl, decodeDocumentControl, buildDocumentControlTbs, assertDocumentControlConsistent, DOCUMENT_CONTROL_DOMAIN, DOCUMENT_CONTROL_VERSION, DOCUMENT_CONTROL_VERBS, MAX_CONTROL_REASON_LENGTH, } from "./document-control.js";
40
+ export type { DocumentControl, DocumentControlVerb } from "./document-control.js";
41
+ export { DOCUMENT_REJECTION_DOMAIN, DOCUMENT_REJECTION_VERSION, MAX_REJECTION_DETAIL_LENGTH, buildDocumentRejectionTbs, documentRejectionHash, assertDocumentRejectionConsistent, encodeDocumentRejection, decodeDocumentRejection, } from "./document-rejection-envelope.js";
42
+ export type { DocumentRejectionEnvelope } from "./document-rejection-envelope.js";
35
43
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAKnD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEtF,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,iBAAiB,CAA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,EACb,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,mCAAmC,EACnC,4BAA4B,EAC5B,6BAA6B,EAC7B,kCAAkC,GACnC,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,qBAAqB,EACrB,iCAAiC,EACjC,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -21,4 +21,8 @@ export { encodeSessionLivenessQuery, decodeSessionLivenessQuery, encodeSessionLi
21
21
  export { MONIKER_RE, validateMoniker } from "./moniker.js";
22
22
  export { DOCUMENT_UPDATE_DOMAIN, DOCUMENT_UPDATE_ENCODING_V1, DOCUMENT_EPOCH_V1, buildDocumentUpdateTbs, encodeDocumentUpdateEnvelope, decodeDocumentUpdateEnvelope, documentEnvelopeHash, verifyDocumentChainLink, } from "./document-envelope.js";
23
23
  export { DOCUMENT_PROPOSAL_DOMAIN, DOCUMENT_FEATURE_VERSION, ASSURANCE_TIER_V1, TOPOLOGY_V1, buildDocumentProposalTbs, documentIdFromProposal, encodeDocumentProposal, decodeDocumentProposal, seamViolation, documentFeatureIncompatibility, } from "./document-proposal.js";
24
+ export { DOCUMENT_ACK_DOMAIN, buildDocumentAckTbs, encodeDocumentAck, decodeDocumentAck, } from "./document-ack.js";
25
+ export { encodeDocumentProposalAck, decodeDocumentProposalAck, buildDocumentProposalAckTbs, assertDocumentProposalAckConsistent, DOCUMENT_PROPOSAL_ACK_DOMAIN, DOCUMENT_PROPOSAL_ACK_VERSION, MAX_PROPOSAL_REFUSAL_REASON_LENGTH, } from "./document-proposal-ack.js";
26
+ export { encodeDocumentControl, decodeDocumentControl, buildDocumentControlTbs, assertDocumentControlConsistent, DOCUMENT_CONTROL_DOMAIN, DOCUMENT_CONTROL_VERSION, DOCUMENT_CONTROL_VERBS, MAX_CONTROL_REASON_LENGTH, } from "./document-control.js";
27
+ export { DOCUMENT_REJECTION_DOMAIN, DOCUMENT_REJECTION_VERSION, MAX_REJECTION_DETAIL_LENGTH, buildDocumentRejectionTbs, documentRejectionHash, assertDocumentRejectionConsistent, encodeDocumentRejection, decodeDocumentRejection, } from "./document-rejection-envelope.js";
24
28
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEnD,8FAA8F;AAC9F,wFAAwF;AACxF,2BAA2B;AAC3B,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAO3B,+FAA+F;AAC/F,qGAAqG;AACrG,wFAAwF;AACxF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,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vB,+BAA+B,EAC/B,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,qBAAqB,EACrB,iCAAiC,EACjC,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cello-protocol/protocol-types",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -26,7 +26,7 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "cbor-x": "^1.6.4",
29
- "@cello-protocol/crypto": "0.0.40"
29
+ "@cello-protocol/crypto": "0.0.41"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@claude-flow/testing": "3.0.0-alpha.6",