@metalabel/dfos-protocol 0.11.0 → 0.13.0
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/chain/index.d.ts +2 -2
- package/dist/chain/index.js +5 -3
- package/dist/{chunk-SDUOUFTF.js → chunk-4EJCATUC.js} +63 -44
- package/dist/{chunk-GQOZJKKO.js → chunk-4QQ5HK5M.js} +7 -3
- package/dist/{chunk-LQFOBE6X.js → chunk-FMHROCFH.js} +22 -19
- package/dist/credentials/index.d.ts +17 -6
- package/dist/credentials/index.js +4 -2
- package/dist/crypto/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -3
- package/dist/{schemas-Myod8ES9.d.ts → schemas-BXye25k7.d.ts} +58 -30
- package/examples/content-delegated.json +4 -4
- package/examples/content-delete.json +3 -3
- package/examples/content-lifecycle.json +3 -3
- package/examples/credential-write.json +2 -2
- package/examples/identity-services.json +3 -3
- package/package.json +1 -1
package/dist/chain/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IdentityOperation,
|
|
2
|
-
export { A as ARTIFACT_CID_ANCHOR_RE, C as CONTENT_ID_ANCHOR_RE, M as MAX_ARTIFACT_PAYLOAD_SIZE, d as
|
|
1
|
+
import { I as IdentityOperation, i as Signer, V as VerifiedIdentity, S as ServiceEntry, b as ContentOperation, c as CountersignPayload, a as ArtifactPayload } from '../schemas-BXye25k7.js';
|
|
2
|
+
export { A as ARTIFACT_CID_ANCHOR_RE, C as CONTENT_ID_ANCHOR_RE, M as MAX_ARTIFACT_PAYLOAD_SIZE, d as MAX_OPERATION_SIZE, e as MAX_SERVICES_ENTRIES, f as MAX_SERVICES_PAYLOAD_SIZE, g as MultikeyPublicKey, R as RevocationPayload, h as ServicesArray } from '../schemas-BXye25k7.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/** Ed25519 public key multicodec value */
|
package/dist/chain/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
CountersignPayload,
|
|
7
7
|
IdentityOperation,
|
|
8
8
|
MAX_ARTIFACT_PAYLOAD_SIZE,
|
|
9
|
+
MAX_OPERATION_SIZE,
|
|
9
10
|
MAX_SERVICES_ENTRIES,
|
|
10
11
|
MAX_SERVICES_PAYLOAD_SIZE,
|
|
11
12
|
MultikeyPublicKey,
|
|
@@ -33,14 +34,14 @@ import {
|
|
|
33
34
|
verifyIdentityChain,
|
|
34
35
|
verifyIdentityExtensionFromTrustedState,
|
|
35
36
|
verifyRevocation
|
|
36
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-4EJCATUC.js";
|
|
37
38
|
import {
|
|
38
39
|
ED25519_PRIV_MULTICODEC,
|
|
39
40
|
ED25519_PUB_MULTICODEC,
|
|
40
41
|
decodeMultikey,
|
|
41
42
|
encodeEd25519Multikey
|
|
42
|
-
} from "../chunk-
|
|
43
|
-
import "../chunk-
|
|
43
|
+
} from "../chunk-FMHROCFH.js";
|
|
44
|
+
import "../chunk-4QQ5HK5M.js";
|
|
44
45
|
export {
|
|
45
46
|
ARTIFACT_CID_ANCHOR_RE,
|
|
46
47
|
ArtifactPayload,
|
|
@@ -51,6 +52,7 @@ export {
|
|
|
51
52
|
ED25519_PUB_MULTICODEC,
|
|
52
53
|
IdentityOperation,
|
|
53
54
|
MAX_ARTIFACT_PAYLOAD_SIZE,
|
|
55
|
+
MAX_OPERATION_SIZE,
|
|
54
56
|
MAX_SERVICES_ENTRIES,
|
|
55
57
|
MAX_SERVICES_PAYLOAD_SIZE,
|
|
56
58
|
MultikeyPublicKey,
|
|
@@ -1,52 +1,46 @@
|
|
|
1
1
|
import {
|
|
2
|
+
MAX_CREDENTIAL_SIZE,
|
|
2
3
|
decodeDFOSCredentialUnsafe,
|
|
3
4
|
decodeMultikey,
|
|
4
5
|
matchesResource,
|
|
5
6
|
verifyDFOSCredential,
|
|
6
7
|
verifyDelegationChain
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FMHROCFH.js";
|
|
8
9
|
import {
|
|
9
10
|
createJws,
|
|
10
11
|
dagCborCanonicalEncode,
|
|
11
12
|
decodeJwsUnsafe,
|
|
12
13
|
generateIdNoPrefix,
|
|
13
14
|
verifyJws
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4QQ5HK5M.js";
|
|
15
16
|
|
|
16
17
|
// src/chain/schemas.ts
|
|
17
18
|
import { z } from "zod";
|
|
18
|
-
var
|
|
19
|
-
var MAX_PUBLIC_KEY_MULTIBASE = 128;
|
|
20
|
-
var MAX_CID = 256;
|
|
21
|
-
var MAX_NOTE = 256;
|
|
22
|
-
var MAX_KEYS_PER_ROLE = 16;
|
|
23
|
-
var MAX_DID = 256;
|
|
24
|
-
var MAX_SERVICE_ID = 64;
|
|
25
|
-
var MAX_SERVICE_TYPE = 64;
|
|
26
|
-
var MAX_SERVICE_STRING = 512;
|
|
19
|
+
var MAX_KEYS_PER_ROLE = 256;
|
|
27
20
|
var MAX_RELATION = 64;
|
|
28
|
-
var MAX_SERVICES_ENTRIES =
|
|
29
|
-
var MAX_SERVICES_PAYLOAD_SIZE =
|
|
30
|
-
var
|
|
31
|
-
|
|
21
|
+
var MAX_SERVICES_ENTRIES = 256;
|
|
22
|
+
var MAX_SERVICES_PAYLOAD_SIZE = 32768;
|
|
23
|
+
var MAX_OPERATION_SIZE = 65536;
|
|
24
|
+
var MultikeyPublicKey = z.looseObject({
|
|
25
|
+
id: z.string(),
|
|
32
26
|
type: z.literal("Multikey"),
|
|
33
|
-
publicKeyMultibase: z.string()
|
|
27
|
+
publicKeyMultibase: z.string()
|
|
34
28
|
});
|
|
35
29
|
var CONTENT_ID_ANCHOR_RE = /^[2346789acdefhknrtvz]{31}$/;
|
|
36
|
-
var ARTIFACT_CID_ANCHOR_RE = /^
|
|
30
|
+
var ARTIFACT_CID_ANCHOR_RE = /^bafyrei[a-z2-7]{52}$/;
|
|
37
31
|
var ServiceEntry = z.object({
|
|
38
|
-
id: z.string().min(1)
|
|
39
|
-
type: z.string().min(1)
|
|
32
|
+
id: z.string().min(1),
|
|
33
|
+
type: z.string().min(1)
|
|
40
34
|
}).catchall(z.unknown()).superRefine((entry, ctx) => {
|
|
41
35
|
if (entry.type === "DfosRelay") {
|
|
42
36
|
const endpoint = entry["endpoint"];
|
|
43
|
-
if (typeof endpoint !== "string" || endpoint.length < 1
|
|
37
|
+
if (typeof endpoint !== "string" || endpoint.length < 1) {
|
|
44
38
|
ctx.addIssue({ code: "custom", message: "DfosRelay requires a non-empty endpoint string" });
|
|
45
39
|
}
|
|
46
40
|
} else if (entry.type === "ContentAnchor") {
|
|
47
41
|
const label = entry["label"];
|
|
48
42
|
const anchor = entry["anchor"];
|
|
49
|
-
if (typeof label !== "string" || label.length < 1
|
|
43
|
+
if (typeof label !== "string" || label.length < 1) {
|
|
50
44
|
ctx.addIssue({
|
|
51
45
|
code: "custom",
|
|
52
46
|
message: "ContentAnchor requires a non-empty label string"
|
|
@@ -65,8 +59,8 @@ var ServicesArray = z.array(ServiceEntry).max(MAX_SERVICES_ENTRIES).refine(
|
|
|
65
59
|
"service entry ids must be unique"
|
|
66
60
|
);
|
|
67
61
|
var Iso8601 = z.iso.datetime({ offset: false, precision: 3 });
|
|
68
|
-
var CIDString = z.string()
|
|
69
|
-
var IdentityCreate = z.
|
|
62
|
+
var CIDString = z.string();
|
|
63
|
+
var IdentityCreate = z.looseObject({
|
|
70
64
|
version: z.literal(1),
|
|
71
65
|
type: z.literal("create"),
|
|
72
66
|
authKeys: z.array(MultikeyPublicKey).max(MAX_KEYS_PER_ROLE),
|
|
@@ -77,7 +71,7 @@ var IdentityCreate = z.strictObject({
|
|
|
77
71
|
services: ServicesArray.optional(),
|
|
78
72
|
createdAt: Iso8601
|
|
79
73
|
});
|
|
80
|
-
var IdentityUpdate = z.
|
|
74
|
+
var IdentityUpdate = z.looseObject({
|
|
81
75
|
version: z.literal(1),
|
|
82
76
|
type: z.literal("update"),
|
|
83
77
|
previousOperationCID: CIDString,
|
|
@@ -88,7 +82,7 @@ var IdentityUpdate = z.strictObject({
|
|
|
88
82
|
services: ServicesArray.optional(),
|
|
89
83
|
createdAt: Iso8601
|
|
90
84
|
});
|
|
91
|
-
var IdentityDelete = z.
|
|
85
|
+
var IdentityDelete = z.looseObject({
|
|
92
86
|
version: z.literal(1),
|
|
93
87
|
type: z.literal("delete"),
|
|
94
88
|
previousOperationCID: CIDString,
|
|
@@ -100,7 +94,7 @@ var IdentityOperation = z.discriminatedUnion("type", [
|
|
|
100
94
|
IdentityDelete
|
|
101
95
|
]);
|
|
102
96
|
var VerifiedIdentity = z.strictObject({
|
|
103
|
-
did: z.string()
|
|
97
|
+
did: z.string(),
|
|
104
98
|
isDeleted: z.boolean(),
|
|
105
99
|
authKeys: z.array(MultikeyPublicKey).max(MAX_KEYS_PER_ROLE),
|
|
106
100
|
assertKeys: z.array(MultikeyPublicKey).max(MAX_KEYS_PER_ROLE),
|
|
@@ -108,34 +102,31 @@ var VerifiedIdentity = z.strictObject({
|
|
|
108
102
|
/** Resolved discovery vocabulary — projection of the winning head's services */
|
|
109
103
|
services: ServicesArray
|
|
110
104
|
});
|
|
111
|
-
var ContentCreate = z.
|
|
105
|
+
var ContentCreate = z.looseObject({
|
|
112
106
|
version: z.literal(1),
|
|
113
107
|
type: z.literal("create"),
|
|
114
|
-
did: z.string()
|
|
108
|
+
did: z.string(),
|
|
115
109
|
documentCID: CIDString,
|
|
116
110
|
baseDocumentCID: CIDString.nullable(),
|
|
117
|
-
createdAt: Iso8601
|
|
118
|
-
note: z.string().max(MAX_NOTE).nullable()
|
|
111
|
+
createdAt: Iso8601
|
|
119
112
|
});
|
|
120
|
-
var ContentUpdate = z.
|
|
113
|
+
var ContentUpdate = z.looseObject({
|
|
121
114
|
version: z.literal(1),
|
|
122
115
|
type: z.literal("update"),
|
|
123
|
-
did: z.string()
|
|
116
|
+
did: z.string(),
|
|
124
117
|
previousOperationCID: CIDString,
|
|
125
118
|
documentCID: CIDString.nullable(),
|
|
126
119
|
baseDocumentCID: CIDString.nullable(),
|
|
127
120
|
createdAt: Iso8601,
|
|
128
|
-
note: z.string().max(MAX_NOTE).nullable(),
|
|
129
121
|
/** DFOS credential authorizing this operation when signer is not the chain creator */
|
|
130
122
|
authorization: z.string().optional()
|
|
131
123
|
});
|
|
132
|
-
var ContentDelete = z.
|
|
124
|
+
var ContentDelete = z.looseObject({
|
|
133
125
|
version: z.literal(1),
|
|
134
126
|
type: z.literal("delete"),
|
|
135
|
-
did: z.string()
|
|
127
|
+
did: z.string(),
|
|
136
128
|
previousOperationCID: CIDString,
|
|
137
129
|
createdAt: Iso8601,
|
|
138
|
-
note: z.string().max(MAX_NOTE).nullable(),
|
|
139
130
|
/** DFOS credential authorizing this operation when signer is not the chain creator */
|
|
140
131
|
authorization: z.string().optional()
|
|
141
132
|
});
|
|
@@ -144,28 +135,27 @@ var ContentOperation = z.discriminatedUnion("type", [
|
|
|
144
135
|
ContentUpdate,
|
|
145
136
|
ContentDelete
|
|
146
137
|
]);
|
|
147
|
-
var MAX_SCHEMA = 256;
|
|
148
138
|
var MAX_ARTIFACT_PAYLOAD_SIZE = 16384;
|
|
149
|
-
var ArtifactContent = z.object({ $schema: z.string()
|
|
150
|
-
var ArtifactPayload = z.
|
|
139
|
+
var ArtifactContent = z.object({ $schema: z.string() }).catchall(z.unknown());
|
|
140
|
+
var ArtifactPayload = z.looseObject({
|
|
151
141
|
version: z.literal(1),
|
|
152
142
|
type: z.literal("artifact"),
|
|
153
|
-
did: z.string()
|
|
143
|
+
did: z.string(),
|
|
154
144
|
content: ArtifactContent,
|
|
155
145
|
createdAt: Iso8601
|
|
156
146
|
});
|
|
157
|
-
var CountersignPayload = z.
|
|
147
|
+
var CountersignPayload = z.looseObject({
|
|
158
148
|
version: z.literal(1),
|
|
159
149
|
type: z.literal("countersign"),
|
|
160
|
-
did: z.string()
|
|
150
|
+
did: z.string(),
|
|
161
151
|
targetCID: CIDString,
|
|
162
152
|
relation: z.string().min(1).max(MAX_RELATION).optional(),
|
|
163
153
|
createdAt: Iso8601
|
|
164
154
|
});
|
|
165
|
-
var RevocationPayload = z.
|
|
155
|
+
var RevocationPayload = z.looseObject({
|
|
166
156
|
version: z.literal(1),
|
|
167
157
|
type: z.literal("revocation"),
|
|
168
|
-
did: z.string()
|
|
158
|
+
did: z.string(),
|
|
169
159
|
credentialCID: CIDString,
|
|
170
160
|
createdAt: Iso8601
|
|
171
161
|
});
|
|
@@ -288,6 +278,11 @@ var verifyIdentityChain = async (input) => {
|
|
|
288
278
|
}
|
|
289
279
|
}
|
|
290
280
|
const encoded = await dagCborCanonicalEncode(op);
|
|
281
|
+
if (encoded.bytes.length > MAX_OPERATION_SIZE) {
|
|
282
|
+
throw new Error(
|
|
283
|
+
`log[${idx}]: operation exceeds max size: ${encoded.bytes.length} > ${MAX_OPERATION_SIZE}`
|
|
284
|
+
);
|
|
285
|
+
}
|
|
291
286
|
const operationCID = encoded.cid.toString();
|
|
292
287
|
if (!decoded.header.cid) {
|
|
293
288
|
throw new Error(`log[${idx}]: missing cid in protected header`);
|
|
@@ -383,6 +378,9 @@ var verifyIdentityExtensionFromTrustedState = async (input) => {
|
|
|
383
378
|
throw new Error("createdAt must be after last op");
|
|
384
379
|
}
|
|
385
380
|
const encoded = await dagCborCanonicalEncode(op);
|
|
381
|
+
if (encoded.bytes.length > MAX_OPERATION_SIZE) {
|
|
382
|
+
throw new Error(`operation exceeds max size: ${encoded.bytes.length} > ${MAX_OPERATION_SIZE}`);
|
|
383
|
+
}
|
|
386
384
|
const operationCID = encoded.cid.toString();
|
|
387
385
|
if (!decoded.header.cid) throw new Error("missing cid in protected header");
|
|
388
386
|
if (decoded.header.cid !== operationCID) throw new Error("cid mismatch in protected header");
|
|
@@ -434,6 +432,18 @@ var verifyIdentityExtensionFromTrustedState = async (input) => {
|
|
|
434
432
|
};
|
|
435
433
|
|
|
436
434
|
// src/chain/content-chain.ts
|
|
435
|
+
var operationSizeForCap = async (op, fullByteLength) => {
|
|
436
|
+
const auth = op.authorization;
|
|
437
|
+
if (typeof auth !== "string") return fullByteLength;
|
|
438
|
+
if (auth.length > MAX_CREDENTIAL_SIZE) {
|
|
439
|
+
throw new Error(
|
|
440
|
+
`authorization credential exceeds max size: ${auth.length} > ${MAX_CREDENTIAL_SIZE}`
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
const { authorization: _omit, ...rest } = op;
|
|
444
|
+
const encoded = await dagCborCanonicalEncode(rest);
|
|
445
|
+
return encoded.bytes.length;
|
|
446
|
+
};
|
|
437
447
|
var signContentOperation = async (input) => {
|
|
438
448
|
const encoded = await dagCborCanonicalEncode(input.operation);
|
|
439
449
|
const operationCID = encoded.cid.toString();
|
|
@@ -557,6 +567,10 @@ var verifyContentChain = async (input) => {
|
|
|
557
567
|
}
|
|
558
568
|
}
|
|
559
569
|
const encoded = await dagCborCanonicalEncode(op);
|
|
570
|
+
const opSize = await operationSizeForCap(op, encoded.bytes.length);
|
|
571
|
+
if (opSize > MAX_OPERATION_SIZE) {
|
|
572
|
+
throw new Error(`operation exceeds max size: ${opSize} > ${MAX_OPERATION_SIZE}`);
|
|
573
|
+
}
|
|
560
574
|
const operationCID = encoded.cid.toString();
|
|
561
575
|
if (!decoded.header.cid) {
|
|
562
576
|
throw new Error(`log[${idx}]: missing cid in protected header`);
|
|
@@ -658,6 +672,10 @@ var verifyContentExtensionFromTrustedState = async (input) => {
|
|
|
658
672
|
}
|
|
659
673
|
}
|
|
660
674
|
const encoded = await dagCborCanonicalEncode(op);
|
|
675
|
+
const opSize = await operationSizeForCap(op, encoded.bytes.length);
|
|
676
|
+
if (opSize > MAX_OPERATION_SIZE) {
|
|
677
|
+
throw new Error(`operation exceeds max size: ${opSize} > ${MAX_OPERATION_SIZE}`);
|
|
678
|
+
}
|
|
661
679
|
const operationCID = encoded.cid.toString();
|
|
662
680
|
if (!decoded.header.cid) throw new Error("missing cid in protected header");
|
|
663
681
|
if (decoded.header.cid !== operationCID) throw new Error("cid mismatch in protected header");
|
|
@@ -835,6 +853,7 @@ var verifyRevocation = async (input) => {
|
|
|
835
853
|
export {
|
|
836
854
|
MAX_SERVICES_ENTRIES,
|
|
837
855
|
MAX_SERVICES_PAYLOAD_SIZE,
|
|
856
|
+
MAX_OPERATION_SIZE,
|
|
838
857
|
MultikeyPublicKey,
|
|
839
858
|
CONTENT_ID_ANCHOR_RE,
|
|
840
859
|
ARTIFACT_CID_ANCHOR_RE,
|
|
@@ -239,7 +239,11 @@ var dagCborCanonicalEncode = async (value) => {
|
|
|
239
239
|
});
|
|
240
240
|
};
|
|
241
241
|
var MAX_SAFE_CANONICAL_INTEGER = 9007199254740991;
|
|
242
|
-
var
|
|
242
|
+
var MAX_CANONICAL_DEPTH = 1024;
|
|
243
|
+
var assertCanonicalNumbers = (value, depth = 0) => {
|
|
244
|
+
if (depth > MAX_CANONICAL_DEPTH) {
|
|
245
|
+
throw new Error(`value nesting exceeds max depth ${MAX_CANONICAL_DEPTH}`);
|
|
246
|
+
}
|
|
243
247
|
if (typeof value === "number") {
|
|
244
248
|
if (!Number.isFinite(value)) {
|
|
245
249
|
throw new Error(`non-finite number is not canonicalizable: ${value}`);
|
|
@@ -257,11 +261,11 @@ var assertCanonicalNumbers = (value) => {
|
|
|
257
261
|
return;
|
|
258
262
|
}
|
|
259
263
|
if (Array.isArray(value)) {
|
|
260
|
-
for (const entry of value) assertCanonicalNumbers(entry);
|
|
264
|
+
for (const entry of value) assertCanonicalNumbers(entry, depth + 1);
|
|
261
265
|
return;
|
|
262
266
|
}
|
|
263
267
|
if (value !== null && typeof value === "object") {
|
|
264
|
-
for (const entry of Object.values(value)) assertCanonicalNumbers(entry);
|
|
268
|
+
for (const entry of Object.values(value)) assertCanonicalNumbers(entry, depth + 1);
|
|
265
269
|
}
|
|
266
270
|
};
|
|
267
271
|
var parseDagCborCID = (cid) => {
|
|
@@ -5,27 +5,24 @@ import {
|
|
|
5
5
|
decodeJwsUnsafe,
|
|
6
6
|
verifyJws,
|
|
7
7
|
verifyJwt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4QQ5HK5M.js";
|
|
9
9
|
|
|
10
10
|
// src/credentials/schemas.ts
|
|
11
11
|
import { z } from "zod";
|
|
12
|
-
var MAX_DID = 256;
|
|
13
|
-
var MAX_AUD = 512;
|
|
14
|
-
var MAX_RESOURCE = 512;
|
|
15
|
-
var MAX_ACTION = 64;
|
|
16
12
|
var MAX_ATT = 32;
|
|
17
13
|
var MAX_PRF = 1;
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
var MAX_CREDENTIAL_SIZE = 262144;
|
|
15
|
+
var Attenuation = z.looseObject({
|
|
16
|
+
resource: z.string().min(1),
|
|
17
|
+
action: z.string().min(1)
|
|
21
18
|
});
|
|
22
|
-
var DFOSCredentialPayload = z.
|
|
19
|
+
var DFOSCredentialPayload = z.looseObject({
|
|
23
20
|
version: z.literal(1),
|
|
24
21
|
type: z.literal("DFOSCredential"),
|
|
25
22
|
/** Issuer DID */
|
|
26
|
-
iss: z.string().min(1)
|
|
23
|
+
iss: z.string().min(1),
|
|
27
24
|
/** Audience DID or "*" for public credentials */
|
|
28
|
-
aud: z.string().min(1)
|
|
25
|
+
aud: z.string().min(1),
|
|
29
26
|
/** Attenuations — resource + action pairs */
|
|
30
27
|
att: z.array(Attenuation).min(1).max(MAX_ATT),
|
|
31
28
|
/** Parent credential JWS tokens (for delegation chains) */
|
|
@@ -35,13 +32,13 @@ var DFOSCredentialPayload = z.strictObject({
|
|
|
35
32
|
/** Issued at — unix seconds */
|
|
36
33
|
iat: z.number().int().positive()
|
|
37
34
|
});
|
|
38
|
-
var AuthTokenClaims = z.
|
|
35
|
+
var AuthTokenClaims = z.looseObject({
|
|
39
36
|
/** Issuer — the DID proving identity */
|
|
40
|
-
iss: z.string()
|
|
37
|
+
iss: z.string(),
|
|
41
38
|
/** Subject — same as iss for auth tokens */
|
|
42
|
-
sub: z.string()
|
|
39
|
+
sub: z.string(),
|
|
43
40
|
/** Audience — target relay hostname (prevents cross-relay replay) */
|
|
44
|
-
aud: z.string()
|
|
41
|
+
aud: z.string(),
|
|
45
42
|
/** Expiration — unix seconds, short-lived (minutes) */
|
|
46
43
|
exp: z.number().int().positive(),
|
|
47
44
|
/** Issued at — unix seconds */
|
|
@@ -187,6 +184,11 @@ var createDFOSCredential = async (options) => {
|
|
|
187
184
|
return jwsToken;
|
|
188
185
|
};
|
|
189
186
|
var verifyDFOSCredential = async (jwsToken, options) => {
|
|
187
|
+
if (jwsToken.length > MAX_CREDENTIAL_SIZE) {
|
|
188
|
+
throw new CredentialVerificationError(
|
|
189
|
+
`credential exceeds max size: ${jwsToken.length} > ${MAX_CREDENTIAL_SIZE}`
|
|
190
|
+
);
|
|
191
|
+
}
|
|
190
192
|
const decoded = decodeJwsUnsafe(jwsToken);
|
|
191
193
|
if (!decoded) throw new CredentialVerificationError("failed to decode credential JWS");
|
|
192
194
|
if (decoded.header.typ !== "did:dfos:credential") {
|
|
@@ -290,16 +292,16 @@ var verifyDelegationChain = async (credential, options) => {
|
|
|
290
292
|
chain.push(parent);
|
|
291
293
|
current = parent;
|
|
292
294
|
}
|
|
293
|
-
throw new CredentialVerificationError("delegation chain too deep (max 16
|
|
295
|
+
throw new CredentialVerificationError("delegation chain too deep (max 16 credentials)");
|
|
294
296
|
};
|
|
295
297
|
var parseResource = (resource) => {
|
|
296
298
|
const colonIdx = resource.indexOf(":");
|
|
297
299
|
if (colonIdx < 0) return null;
|
|
298
300
|
return { type: resource.substring(0, colonIdx), id: resource.substring(colonIdx + 1) };
|
|
299
301
|
};
|
|
300
|
-
var parseActions = (action) =>
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
var parseActions = (action) => new Set(
|
|
303
|
+
action.split(",").map((a) => a.trim()).filter((a) => a !== "")
|
|
304
|
+
);
|
|
303
305
|
var isAttenuated = (parentAtt, childAtt) => {
|
|
304
306
|
return childAtt.every((childEntry) => {
|
|
305
307
|
const childRes = parseResource(childEntry.resource);
|
|
@@ -372,6 +374,7 @@ export {
|
|
|
372
374
|
ED25519_PRIV_MULTICODEC,
|
|
373
375
|
encodeEd25519Multikey,
|
|
374
376
|
decodeMultikey,
|
|
377
|
+
MAX_CREDENTIAL_SIZE,
|
|
375
378
|
Attenuation,
|
|
376
379
|
DFOSCredentialPayload,
|
|
377
380
|
AuthTokenClaims,
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { V as VerifiedIdentity } from '../schemas-
|
|
2
|
+
import { V as VerifiedIdentity } from '../schemas-BXye25k7.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Max byte length of a credential JWS token — the credential's analog of
|
|
6
|
+
* MAX_OPERATION_SIZE. Credentials are EXEMPT from the 64 KiB operation cap (a
|
|
7
|
+
* maximum-depth 16-credential delegation chain embeds each parent token in `prf` and
|
|
8
|
+
* legitimately exceeds it), so they carry their own larger ceiling. Measured
|
|
9
|
+
* over the serialized leaf token, which contains the entire nested chain, so one
|
|
10
|
+
* bound caps the whole delegation. A DoS guard on the nested `prf` structure;
|
|
11
|
+
* generous (a max-depth chain serializes to well under this). VALIDITY-
|
|
12
|
+
* determining: MUST match the Go reference (maxCredentialSize in jwt.go).
|
|
13
|
+
*/
|
|
14
|
+
declare const MAX_CREDENTIAL_SIZE = 262144;
|
|
4
15
|
/** Single attenuation entry — resource + action pair */
|
|
5
16
|
declare const Attenuation: z.ZodObject<{
|
|
6
17
|
resource: z.ZodString;
|
|
7
18
|
action: z.ZodString;
|
|
8
|
-
}, z.core.$
|
|
19
|
+
}, z.core.$loose>;
|
|
9
20
|
type Attenuation = z.infer<typeof Attenuation>;
|
|
10
21
|
/** DFOS credential payload — UCAN-style authorization token */
|
|
11
22
|
declare const DFOSCredentialPayload: z.ZodObject<{
|
|
@@ -16,11 +27,11 @@ declare const DFOSCredentialPayload: z.ZodObject<{
|
|
|
16
27
|
att: z.ZodArray<z.ZodObject<{
|
|
17
28
|
resource: z.ZodString;
|
|
18
29
|
action: z.ZodString;
|
|
19
|
-
}, z.core.$
|
|
30
|
+
}, z.core.$loose>>;
|
|
20
31
|
prf: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
21
32
|
exp: z.ZodNumber;
|
|
22
33
|
iat: z.ZodNumber;
|
|
23
|
-
}, z.core.$
|
|
34
|
+
}, z.core.$loose>;
|
|
24
35
|
type DFOSCredentialPayload = z.infer<typeof DFOSCredentialPayload>;
|
|
25
36
|
/** Claims for a DID-signed auth token (relay AuthN) */
|
|
26
37
|
declare const AuthTokenClaims: z.ZodObject<{
|
|
@@ -29,7 +40,7 @@ declare const AuthTokenClaims: z.ZodObject<{
|
|
|
29
40
|
aud: z.ZodString;
|
|
30
41
|
exp: z.ZodNumber;
|
|
31
42
|
iat: z.ZodNumber;
|
|
32
|
-
}, z.core.$
|
|
43
|
+
}, z.core.$loose>;
|
|
33
44
|
type AuthTokenClaims = z.infer<typeof AuthTokenClaims>;
|
|
34
45
|
|
|
35
46
|
interface AuthTokenCreateOptions {
|
|
@@ -200,4 +211,4 @@ declare class CredentialVerificationError extends Error {
|
|
|
200
211
|
constructor(message: string);
|
|
201
212
|
}
|
|
202
213
|
|
|
203
|
-
export { Attenuation, AuthTokenClaims, type AuthTokenCreateOptions, AuthTokenVerificationError, type AuthTokenVerifyOptions, CredentialVerificationError, DFOSCredentialPayload, type VerifiedAuthToken, type VerifiedDFOSCredential, type VerifiedDelegationChain, createAuthToken, createDFOSCredential, decodeDFOSCredentialUnsafe, isAttenuated, matchesResource, verifyAuthToken, verifyDFOSCredential, verifyDelegationChain };
|
|
214
|
+
export { Attenuation, AuthTokenClaims, type AuthTokenCreateOptions, AuthTokenVerificationError, type AuthTokenVerifyOptions, CredentialVerificationError, DFOSCredentialPayload, MAX_CREDENTIAL_SIZE, type VerifiedAuthToken, type VerifiedDFOSCredential, type VerifiedDelegationChain, createAuthToken, createDFOSCredential, decodeDFOSCredentialUnsafe, isAttenuated, matchesResource, verifyAuthToken, verifyDFOSCredential, verifyDelegationChain };
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
AuthTokenVerificationError,
|
|
5
5
|
CredentialVerificationError,
|
|
6
6
|
DFOSCredentialPayload,
|
|
7
|
+
MAX_CREDENTIAL_SIZE,
|
|
7
8
|
createAuthToken,
|
|
8
9
|
createDFOSCredential,
|
|
9
10
|
decodeDFOSCredentialUnsafe,
|
|
@@ -12,14 +13,15 @@ import {
|
|
|
12
13
|
verifyAuthToken,
|
|
13
14
|
verifyDFOSCredential,
|
|
14
15
|
verifyDelegationChain
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-FMHROCFH.js";
|
|
17
|
+
import "../chunk-4QQ5HK5M.js";
|
|
17
18
|
export {
|
|
18
19
|
Attenuation,
|
|
19
20
|
AuthTokenClaims,
|
|
20
21
|
AuthTokenVerificationError,
|
|
21
22
|
CredentialVerificationError,
|
|
22
23
|
DFOSCredentialPayload,
|
|
24
|
+
MAX_CREDENTIAL_SIZE,
|
|
23
25
|
createAuthToken,
|
|
24
26
|
createDFOSCredential,
|
|
25
27
|
decodeDFOSCredentialUnsafe,
|
package/dist/crypto/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { JwsHeader, JwsVerificationError, JwtClaims, JwtCreateOptions, JwtHeader, JwtVerificationError, JwtVerifyOptions, PrefixedID, assertJwsProfile, base64urlDecode, base64urlEncode, createJws, createJwt, createNewEd25519Keypair, dagCborCanonicalEncode, decodeJwsUnsafe, decodeJwtUnsafe, generateId, generateIdNoPrefix, importEd25519Keypair, isCanonicallyEqual, isValidEd25519Signature, isValidId, normalizedId, parseDagCborCID, signPayloadEd25519, verifyJws, verifyJwt } from './crypto/index.js';
|
|
2
|
-
export { A as ARTIFACT_CID_ANCHOR_RE, a as ArtifactPayload, C as CONTENT_ID_ANCHOR_RE, b as ContentOperation, c as CountersignPayload, I as IdentityOperation, M as MAX_ARTIFACT_PAYLOAD_SIZE, d as
|
|
2
|
+
export { A as ARTIFACT_CID_ANCHOR_RE, a as ArtifactPayload, C as CONTENT_ID_ANCHOR_RE, b as ContentOperation, c as CountersignPayload, I as IdentityOperation, M as MAX_ARTIFACT_PAYLOAD_SIZE, d as MAX_OPERATION_SIZE, e as MAX_SERVICES_ENTRIES, f as MAX_SERVICES_PAYLOAD_SIZE, g as MultikeyPublicKey, R as RevocationPayload, S as ServiceEntry, h as ServicesArray, i as Signer, V as VerifiedIdentity } from './schemas-BXye25k7.js';
|
|
3
3
|
export { AnchorKind, ED25519_PRIV_MULTICODEC, ED25519_PUB_MULTICODEC, RECOGNIZED_SERVICE_TYPES, VerifiedArtifact, VerifiedContentChain, VerifiedCountersignature, VerifiedRevocation, anchorsByLabel, assertServicesWithinCap, classifyAnchor, decodeMultikey, deriveChainIdentifier, deriveContentId, encodeEd25519Multikey, isRecognizedServiceType, relayEndpoints, signArtifact, signContentOperation, signCountersignature, signIdentityOperation, signRevocation, verifyArtifact, verifyContentChain, verifyContentExtensionFromTrustedState, verifyCountersignature, verifyIdentityChain, verifyIdentityExtensionFromTrustedState, verifyRevocation } from './chain/index.js';
|
|
4
|
-
export { Attenuation, AuthTokenClaims, AuthTokenCreateOptions, AuthTokenVerificationError, AuthTokenVerifyOptions, CredentialVerificationError, DFOSCredentialPayload, VerifiedAuthToken, VerifiedDFOSCredential, VerifiedDelegationChain, createAuthToken, createDFOSCredential, decodeDFOSCredentialUnsafe, isAttenuated, matchesResource, verifyAuthToken, verifyDFOSCredential, verifyDelegationChain } from './credentials/index.js';
|
|
4
|
+
export { Attenuation, AuthTokenClaims, AuthTokenCreateOptions, AuthTokenVerificationError, AuthTokenVerifyOptions, CredentialVerificationError, DFOSCredentialPayload, MAX_CREDENTIAL_SIZE, VerifiedAuthToken, VerifiedDFOSCredential, VerifiedDelegationChain, createAuthToken, createDFOSCredential, decodeDFOSCredentialUnsafe, isAttenuated, matchesResource, verifyAuthToken, verifyDFOSCredential, verifyDelegationChain } from './credentials/index.js';
|
|
5
5
|
import 'multiformats';
|
|
6
6
|
import 'multiformats/cid';
|
|
7
7
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
CountersignPayload,
|
|
7
7
|
IdentityOperation,
|
|
8
8
|
MAX_ARTIFACT_PAYLOAD_SIZE,
|
|
9
|
+
MAX_OPERATION_SIZE,
|
|
9
10
|
MAX_SERVICES_ENTRIES,
|
|
10
11
|
MAX_SERVICES_PAYLOAD_SIZE,
|
|
11
12
|
MultikeyPublicKey,
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
verifyIdentityChain,
|
|
34
35
|
verifyIdentityExtensionFromTrustedState,
|
|
35
36
|
verifyRevocation
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-4EJCATUC.js";
|
|
37
38
|
import {
|
|
38
39
|
Attenuation,
|
|
39
40
|
AuthTokenClaims,
|
|
@@ -42,6 +43,7 @@ import {
|
|
|
42
43
|
DFOSCredentialPayload,
|
|
43
44
|
ED25519_PRIV_MULTICODEC,
|
|
44
45
|
ED25519_PUB_MULTICODEC,
|
|
46
|
+
MAX_CREDENTIAL_SIZE,
|
|
45
47
|
createAuthToken,
|
|
46
48
|
createDFOSCredential,
|
|
47
49
|
decodeDFOSCredentialUnsafe,
|
|
@@ -52,7 +54,7 @@ import {
|
|
|
52
54
|
verifyAuthToken,
|
|
53
55
|
verifyDFOSCredential,
|
|
54
56
|
verifyDelegationChain
|
|
55
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-FMHROCFH.js";
|
|
56
58
|
import {
|
|
57
59
|
JwsVerificationError,
|
|
58
60
|
JwtVerificationError,
|
|
@@ -76,7 +78,7 @@ import {
|
|
|
76
78
|
signPayloadEd25519,
|
|
77
79
|
verifyJws,
|
|
78
80
|
verifyJwt
|
|
79
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-4QQ5HK5M.js";
|
|
80
82
|
export {
|
|
81
83
|
ARTIFACT_CID_ANCHOR_RE,
|
|
82
84
|
ArtifactPayload,
|
|
@@ -94,6 +96,8 @@ export {
|
|
|
94
96
|
JwsVerificationError,
|
|
95
97
|
JwtVerificationError,
|
|
96
98
|
MAX_ARTIFACT_PAYLOAD_SIZE,
|
|
99
|
+
MAX_CREDENTIAL_SIZE,
|
|
100
|
+
MAX_OPERATION_SIZE,
|
|
97
101
|
MAX_SERVICES_ENTRIES,
|
|
98
102
|
MAX_SERVICES_PAYLOAD_SIZE,
|
|
99
103
|
MultikeyPublicKey,
|
|
@@ -2,23 +2,54 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
/** Function that signs a byte array and returns a signature */
|
|
4
4
|
type Signer = (message: Uint8Array) => Promise<Uint8Array>;
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Max number of service entries in an identity's services state — a generous
|
|
7
|
+
* cardinality ceiling on resolution fan-out. Individual entry fields are NOT
|
|
8
|
+
* separately length-capped (no per-field length zoo): the aggregate byte cap
|
|
9
|
+
* below, plus the operation-size cap, bound entry size. The op-size cap is the
|
|
10
|
+
* real arbiter when services and keys are both large.
|
|
11
|
+
*/
|
|
12
|
+
declare const MAX_SERVICES_ENTRIES = 256;
|
|
13
|
+
/**
|
|
14
|
+
* Max CBOR-encoded size of the services array (bytes) — the SINGLE aggregate that
|
|
15
|
+
* bounds the services manifest, replacing the former per-field length caps (the
|
|
16
|
+
* same collapse the op-size cap applied at the operation level). Sized so the
|
|
17
|
+
* 256-entry ceiling is genuinely reachable with realistic entries.
|
|
18
|
+
*/
|
|
19
|
+
declare const MAX_SERVICES_PAYLOAD_SIZE = 32768;
|
|
20
|
+
/**
|
|
21
|
+
* Max dag-cbor-encoded size of a single protocol operation payload (bytes) — the
|
|
22
|
+
* one aggregate validity bound on operation size, measured over the exact bytes
|
|
23
|
+
* the CID commits to. Generously set (64 KiB) so it never binds a legitimate
|
|
24
|
+
* proof-layer operation while bounding decode/verify cost (a DoS + determinism
|
|
25
|
+
* invariant). This is a VALIDITY-determining cap: it MUST be identical across
|
|
26
|
+
* implementations. Large binary media does NOT travel in operation payloads —
|
|
27
|
+
* it is referenced, not inlined — so this bound is about proof-layer ops only.
|
|
28
|
+
*/
|
|
29
|
+
declare const MAX_OPERATION_SIZE = 65536;
|
|
9
30
|
declare const MultikeyPublicKey: z.ZodObject<{
|
|
10
31
|
id: z.ZodString;
|
|
11
32
|
type: z.ZodLiteral<"Multikey">;
|
|
12
33
|
publicKeyMultibase: z.ZodString;
|
|
13
|
-
}, z.core.$
|
|
34
|
+
}, z.core.$loose>;
|
|
14
35
|
type MultikeyPublicKey = z.infer<typeof MultikeyPublicKey>;
|
|
15
36
|
/**
|
|
16
37
|
* Anchor target shapes — a ContentAnchor references a STABLE content
|
|
17
38
|
* identifier, dispatched by structural form:
|
|
18
39
|
* - 31-char contentId (content chain) → mutable, gateable
|
|
19
|
-
* - CIDv1
|
|
20
|
-
* Both are stable; a chain HEAD CID (also
|
|
21
|
-
* op) is rejected by the shape-dispatch + resolution type check,
|
|
40
|
+
* - CIDv1 dag-cbor+sha256 (artifact) → immutable, public
|
|
41
|
+
* Both are stable; a chain HEAD CID (also a `bafyrei…` CID but resolves to a
|
|
42
|
+
* non-artifact op) is rejected by the shape-dispatch + resolution type check,
|
|
43
|
+
* never anchored.
|
|
44
|
+
*
|
|
45
|
+
* The artifact form is the EXACT 59-char CIDv1(dag-cbor 0x71 + sha256 0x12 0x20)
|
|
46
|
+
* base32 string — 36 raw bytes → 58 base32 chars + the `b` multibase prefix,
|
|
47
|
+
* fixed `bafyrei` head + 52 base32 chars. Artifact payloads are ALWAYS dag-cbor +
|
|
48
|
+
* sha256 (ArtifactPayload below), so every real artifact CID is `bafyrei…`. The
|
|
49
|
+
* regex is pinned to that exact length (not a loose `baf…{20,}`) so an anchor of
|
|
50
|
+
* any other shape — wrong codec, wrong length — is rejected uniformly across
|
|
51
|
+
* implementations. New anchor KINDS arrive via a new service `type`, never a new
|
|
52
|
+
* anchor shape.
|
|
22
53
|
*/
|
|
23
54
|
declare const CONTENT_ID_ANCHOR_RE: RegExp;
|
|
24
55
|
declare const ARTIFACT_CID_ANCHOR_RE: RegExp;
|
|
@@ -49,23 +80,23 @@ declare const IdentityOperation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
49
80
|
id: z.ZodString;
|
|
50
81
|
type: z.ZodLiteral<"Multikey">;
|
|
51
82
|
publicKeyMultibase: z.ZodString;
|
|
52
|
-
}, z.core.$
|
|
83
|
+
}, z.core.$loose>>;
|
|
53
84
|
assertKeys: z.ZodArray<z.ZodObject<{
|
|
54
85
|
id: z.ZodString;
|
|
55
86
|
type: z.ZodLiteral<"Multikey">;
|
|
56
87
|
publicKeyMultibase: z.ZodString;
|
|
57
|
-
}, z.core.$
|
|
88
|
+
}, z.core.$loose>>;
|
|
58
89
|
controllerKeys: z.ZodArray<z.ZodObject<{
|
|
59
90
|
id: z.ZodString;
|
|
60
91
|
type: z.ZodLiteral<"Multikey">;
|
|
61
92
|
publicKeyMultibase: z.ZodString;
|
|
62
|
-
}, z.core.$
|
|
93
|
+
}, z.core.$loose>>;
|
|
63
94
|
services: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
64
95
|
id: z.ZodString;
|
|
65
96
|
type: z.ZodString;
|
|
66
97
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
67
98
|
createdAt: z.ZodISODateTime;
|
|
68
|
-
}, z.core.$
|
|
99
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
69
100
|
version: z.ZodLiteral<1>;
|
|
70
101
|
type: z.ZodLiteral<"update">;
|
|
71
102
|
previousOperationCID: z.ZodString;
|
|
@@ -73,28 +104,28 @@ declare const IdentityOperation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
73
104
|
id: z.ZodString;
|
|
74
105
|
type: z.ZodLiteral<"Multikey">;
|
|
75
106
|
publicKeyMultibase: z.ZodString;
|
|
76
|
-
}, z.core.$
|
|
107
|
+
}, z.core.$loose>>;
|
|
77
108
|
assertKeys: z.ZodArray<z.ZodObject<{
|
|
78
109
|
id: z.ZodString;
|
|
79
110
|
type: z.ZodLiteral<"Multikey">;
|
|
80
111
|
publicKeyMultibase: z.ZodString;
|
|
81
|
-
}, z.core.$
|
|
112
|
+
}, z.core.$loose>>;
|
|
82
113
|
controllerKeys: z.ZodArray<z.ZodObject<{
|
|
83
114
|
id: z.ZodString;
|
|
84
115
|
type: z.ZodLiteral<"Multikey">;
|
|
85
116
|
publicKeyMultibase: z.ZodString;
|
|
86
|
-
}, z.core.$
|
|
117
|
+
}, z.core.$loose>>;
|
|
87
118
|
services: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
88
119
|
id: z.ZodString;
|
|
89
120
|
type: z.ZodString;
|
|
90
121
|
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
91
122
|
createdAt: z.ZodISODateTime;
|
|
92
|
-
}, z.core.$
|
|
123
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
93
124
|
version: z.ZodLiteral<1>;
|
|
94
125
|
type: z.ZodLiteral<"delete">;
|
|
95
126
|
previousOperationCID: z.ZodString;
|
|
96
127
|
createdAt: z.ZodISODateTime;
|
|
97
|
-
}, z.core.$
|
|
128
|
+
}, z.core.$loose>], "type">;
|
|
98
129
|
type IdentityOperation = z.infer<typeof IdentityOperation>;
|
|
99
130
|
declare const VerifiedIdentity: z.ZodObject<{
|
|
100
131
|
did: z.ZodString;
|
|
@@ -103,17 +134,17 @@ declare const VerifiedIdentity: z.ZodObject<{
|
|
|
103
134
|
id: z.ZodString;
|
|
104
135
|
type: z.ZodLiteral<"Multikey">;
|
|
105
136
|
publicKeyMultibase: z.ZodString;
|
|
106
|
-
}, z.core.$
|
|
137
|
+
}, z.core.$loose>>;
|
|
107
138
|
assertKeys: z.ZodArray<z.ZodObject<{
|
|
108
139
|
id: z.ZodString;
|
|
109
140
|
type: z.ZodLiteral<"Multikey">;
|
|
110
141
|
publicKeyMultibase: z.ZodString;
|
|
111
|
-
}, z.core.$
|
|
142
|
+
}, z.core.$loose>>;
|
|
112
143
|
controllerKeys: z.ZodArray<z.ZodObject<{
|
|
113
144
|
id: z.ZodString;
|
|
114
145
|
type: z.ZodLiteral<"Multikey">;
|
|
115
146
|
publicKeyMultibase: z.ZodString;
|
|
116
|
-
}, z.core.$
|
|
147
|
+
}, z.core.$loose>>;
|
|
117
148
|
services: z.ZodArray<z.ZodObject<{
|
|
118
149
|
id: z.ZodString;
|
|
119
150
|
type: z.ZodString;
|
|
@@ -127,8 +158,7 @@ declare const ContentOperation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
127
158
|
documentCID: z.ZodString;
|
|
128
159
|
baseDocumentCID: z.ZodNullable<z.ZodString>;
|
|
129
160
|
createdAt: z.ZodISODateTime;
|
|
130
|
-
|
|
131
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
161
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
132
162
|
version: z.ZodLiteral<1>;
|
|
133
163
|
type: z.ZodLiteral<"update">;
|
|
134
164
|
did: z.ZodString;
|
|
@@ -136,17 +166,15 @@ declare const ContentOperation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
136
166
|
documentCID: z.ZodNullable<z.ZodString>;
|
|
137
167
|
baseDocumentCID: z.ZodNullable<z.ZodString>;
|
|
138
168
|
createdAt: z.ZodISODateTime;
|
|
139
|
-
note: z.ZodNullable<z.ZodString>;
|
|
140
169
|
authorization: z.ZodOptional<z.ZodString>;
|
|
141
|
-
}, z.core.$
|
|
170
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
142
171
|
version: z.ZodLiteral<1>;
|
|
143
172
|
type: z.ZodLiteral<"delete">;
|
|
144
173
|
did: z.ZodString;
|
|
145
174
|
previousOperationCID: z.ZodString;
|
|
146
175
|
createdAt: z.ZodISODateTime;
|
|
147
|
-
note: z.ZodNullable<z.ZodString>;
|
|
148
176
|
authorization: z.ZodOptional<z.ZodString>;
|
|
149
|
-
}, z.core.$
|
|
177
|
+
}, z.core.$loose>], "type">;
|
|
150
178
|
type ContentOperation = z.infer<typeof ContentOperation>;
|
|
151
179
|
/** Max CBOR-encoded payload size for artifacts (bytes) — protocol constant */
|
|
152
180
|
declare const MAX_ARTIFACT_PAYLOAD_SIZE = 16384;
|
|
@@ -159,7 +187,7 @@ declare const ArtifactPayload: z.ZodObject<{
|
|
|
159
187
|
$schema: z.ZodString;
|
|
160
188
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
161
189
|
createdAt: z.ZodISODateTime;
|
|
162
|
-
}, z.core.$
|
|
190
|
+
}, z.core.$loose>;
|
|
163
191
|
type ArtifactPayload = z.infer<typeof ArtifactPayload>;
|
|
164
192
|
/**
|
|
165
193
|
* Countersign: standalone witness attestation referencing a target operation by CID.
|
|
@@ -177,7 +205,7 @@ declare const CountersignPayload: z.ZodObject<{
|
|
|
177
205
|
targetCID: z.ZodString;
|
|
178
206
|
relation: z.ZodOptional<z.ZodString>;
|
|
179
207
|
createdAt: z.ZodISODateTime;
|
|
180
|
-
}, z.core.$
|
|
208
|
+
}, z.core.$loose>;
|
|
181
209
|
type CountersignPayload = z.infer<typeof CountersignPayload>;
|
|
182
210
|
/** Revocation: signed credential revocation artifact, gossiped on the proof plane */
|
|
183
211
|
declare const RevocationPayload: z.ZodObject<{
|
|
@@ -186,7 +214,7 @@ declare const RevocationPayload: z.ZodObject<{
|
|
|
186
214
|
did: z.ZodString;
|
|
187
215
|
credentialCID: z.ZodString;
|
|
188
216
|
createdAt: z.ZodISODateTime;
|
|
189
|
-
}, z.core.$
|
|
217
|
+
}, z.core.$loose>;
|
|
190
218
|
type RevocationPayload = z.infer<typeof RevocationPayload>;
|
|
191
219
|
|
|
192
|
-
export { ARTIFACT_CID_ANCHOR_RE as A, CONTENT_ID_ANCHOR_RE as C, IdentityOperation as I, MAX_ARTIFACT_PAYLOAD_SIZE as M, RevocationPayload as R, ServiceEntry as S, VerifiedIdentity as V, ArtifactPayload as a, ContentOperation as b, CountersignPayload as c,
|
|
220
|
+
export { ARTIFACT_CID_ANCHOR_RE as A, CONTENT_ID_ANCHOR_RE as C, IdentityOperation as I, MAX_ARTIFACT_PAYLOAD_SIZE as M, RevocationPayload as R, ServiceEntry as S, VerifiedIdentity as V, ArtifactPayload as a, ContentOperation as b, CountersignPayload as c, MAX_OPERATION_SIZE as d, MAX_SERVICES_ENTRIES as e, MAX_SERVICES_PAYLOAD_SIZE as f, MultikeyPublicKey as g, ServicesArray as h, type Signer as i };
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"description": "Content chain: creator signs genesis, delegate signs update with write credential",
|
|
3
3
|
"type": "content-delegated",
|
|
4
4
|
"chain": [
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNvbnRlbnQtb3AiLCJraWQiOiJkaWQ6ZGZvczpjbm5uZnQ5ZjhhMnJuOTM4ZDZua3ozOHI4NDd2MmtyI2tleV9yOWV2MzRmdmMyM3o5OTl2ZWFhZnQ4M25uMjl6dmhlIiwiY2lkIjoiYmFmeXJlaWFjZXVvcW1jc3ZjdXZmN3M3YnlscWtvaG01aDdtdXhxbWVxbXYzbjdpc3F0ZHl0dzZuZ3kifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiY3JlYXRlIiwiZGlkIjoiZGlkOmRmb3M6Y25ubmZ0OWY4YTJybjkzOGQ2bmt6MzhyODQ3djJrciIsImRvY3VtZW50Q0lEIjoiYmFmeXJlaWRyd2V4NWRjYjJ1c3NqNmJ0eGJjMzQyM3U1d2VzNnJyd29tbXhhemt1bHRzcG9oN2EzdGkiLCJiYXNlRG9jdW1lbnRDSUQiOm51bGwsImNyZWF0ZWRBdCI6IjIwMjYtMDMtMDdUMDA6MTA6MDAuMDAwWiJ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orization": "
|
|
36
|
+
"authorization": "eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNyZWRlbnRpYWwiLCJraWQiOiJkaWQ6ZGZvczpjbm5uZnQ5ZjhhMnJuOTM4ZDZua3ozOHI4NDd2MmtyI2tleV9yOWV2MzRmdmMyM3o5OTl2ZWFhZnQ4M25uMjl6dmhlIiwiY2lkIjoiYmFmeXJlaWVydDJqcGhreXB4d211ajdtdm11cHhjd2o3enFqeGIzMm11anppMjNmYnkydzJsYnVka3UifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiREZPU0NyZWRlbnRpYWwiLCJpc3MiOiJkaWQ6ZGZvczpjbm5uZnQ5ZjhhMnJuOTM4ZDZua3ozOHI4NDd2MmtyIiwiYXVkIjoiZGlkOmRmb3M6OTRhaDc5NjNuMjIzazhjOTg4NGhoMjdla2g0Mm5lYSIsImF0dCI6W3sicmVzb3VyY2UiOiJjaGFpbjoyMmM4cnZoOHJ2ZDdhN2Rka2VrMzQ0MzJoenpoNzRyIiwiYWN0aW9uIjoid3JpdGUifV0sInByZiI6W10sImV4cCI6MTc5ODc2MTYwMCwiaWF0IjoxNzcyODQxNjAwfQ.erX2DRRtRZw-tQnxgtEa6HcrhvF3JN4sDHzillE9v5fHLbWK0KIU49IkME7ANbyl0DMj4X4PNVEfMPP9GE1bCA",
|
|
37
37
|
"expected": {
|
|
38
|
-
"contentId": "
|
|
38
|
+
"contentId": "22c8rvh8rvd7a7ddkek34432hzzh74r",
|
|
39
39
|
"creatorDID": "did:dfos:cnnnft9f8a2rn938d6nkz38r847v2kr",
|
|
40
40
|
"isDeleted": false,
|
|
41
41
|
"currentDocumentCID": "bafyreiejssihkdfljjabdamhkuyibmc743hn3i36a7fnuzsjeoartpe5wa",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"description": "Content chain: create + delete",
|
|
3
3
|
"type": "content",
|
|
4
4
|
"chain": [
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+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lcmF0aW9uQ0lEIjoiYmFmeXJlaWQyNmJhZ241Y2ZlZTN4cHRhZmptYmx4d3VkdzQzNXA2cms1ZzNwNGdqdGtudXlscnhzc3kiLCJjcmVhdGVkQXQiOiIyMDI2LTAzLTA3VDAwOjAzOjAwLjAwMFoifQ.AgSmh-c1vXQYDan91HHkt8js1AH3upLxodv45RcfU-4TTNRaJq6fLdwe8tlto3N1_RSdaxhEEee9GgTLpYmXAQ"
|
|
7
7
|
],
|
|
8
8
|
"signerPublicKey": "z6MkfUd65JrAhfdgFuMCccU9ThQvjB2fJAMUHkuuajF992gK",
|
|
9
9
|
"documents": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
23
|
"expected": {
|
|
24
|
-
"contentId": "
|
|
24
|
+
"contentId": "a3n7r3nde8e4keeak92rr3aeztftvc2",
|
|
25
25
|
"isDeleted": true,
|
|
26
26
|
"currentDocumentCID": null,
|
|
27
27
|
"length": 2
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"description": "Content chain: create + update (with both documents)",
|
|
3
3
|
"type": "content",
|
|
4
4
|
"chain": [
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNvbnRlbnQtb3AiLCJraWQiOiJkaWQ6ZGZvczpjbm5uZnQ5ZjhhMnJuOTM4ZDZua3ozOHI4NDd2MmtyI2tleV9lejlhODc0dGNrcjNkdjkzM2QzY2tkbjd6NnpyY3Q4IiwiY2lkIjoiYmFmeXJlaWQyNmJhZ241Y2ZlZTN4cHRhZmptYmx4d3VkdzQzNXA2cms1ZzNwNGdqdGtudXlscnhzc3kifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiY3JlYXRlIiwiZGlkIjoiZGlkOmRmb3M6Y25ubmZ0OWY4YTJybjkzOGQ2bmt6MzhyODQ3djJrciIsImRvY3VtZW50Q0lEIjoiYmFmeXJlaWV2Y3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jkJcb6YOZ-C7O_3i_noJfnFsrX1xBQ"
|
|
7
7
|
],
|
|
8
8
|
"signerPublicKey": "z6MkfUd65JrAhfdgFuMCccU9ThQvjB2fJAMUHkuuajF992gK",
|
|
9
9
|
"documents": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
35
|
"expected": {
|
|
36
|
-
"contentId": "
|
|
36
|
+
"contentId": "a3n7r3nde8e4keeak92rr3aeztftvc2",
|
|
37
37
|
"isDeleted": false,
|
|
38
38
|
"currentDocumentCID": "bafyreifetputky4fnzv7srg7l7ynih6j4ytzeqibrcp5uiepvolxqhcbcy",
|
|
39
39
|
"length": 2
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"description": "DFOS credential: write access (broad + narrowed)",
|
|
3
3
|
"type": "credential",
|
|
4
4
|
"broadCredential": "eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNyZWRlbnRpYWwiLCJraWQiOiJkaWQ6ZGZvczpjbm5uZnQ5ZjhhMnJuOTM4ZDZua3ozOHI4NDd2MmtyI2tleV9yOWV2MzRmdmMyM3o5OTl2ZWFhZnQ4M25uMjl6dmhlIiwiY2lkIjoiYmFmeXJlaWZ5aW5ieGhicml0NTZtM2FhdjY2bXc0eGQ2YWRxamFzdmNmaG11NjZnNnRudXFncnljbG0ifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiREZPU0NyZWRlbnRpYWwiLCJpc3MiOiJkaWQ6ZGZvczpjbm5uZnQ5ZjhhMnJuOTM4ZDZua3ozOHI4NDd2MmtyIiwiYXVkIjoiZGlkOmRmb3M6OTRhaDc5NjNuMjIzazhjOTg4NGhoMjdla2g0Mm5lYSIsImF0dCI6W3sicmVzb3VyY2UiOiJjaGFpbjoqIiwiYWN0aW9uIjoid3JpdGUifV0sInByZiI6W10sImV4cCI6MTc5ODc2MTYwMCwiaWF0IjoxNzcyODQxNjAwfQ.A-EygURAN2bALVwI2AZKFEuy30ZnWJFBaD4jCTf1d7A90rYELStjTWJ1iI7OulihTCfaVtlvj5HtX6Dwv1VxAg",
|
|
5
|
-
"narrowCredential": "
|
|
5
|
+
"narrowCredential": "eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNyZWRlbnRpYWwiLCJraWQiOiJkaWQ6ZGZvczpjbm5uZnQ5ZjhhMnJuOTM4ZDZua3ozOHI4NDd2MmtyI2tleV9yOWV2MzRmdmMyM3o5OTl2ZWFhZnQ4M25uMjl6dmhlIiwiY2lkIjoiYmFmeXJlaWVzemt5YW9lc256eXlzcXVxc3JweGJwM2NwMmxpNGg0MjZxZGZxaXg1bnlvcnV1b3dibmEifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiREZPU0NyZWRlbnRpYWwiLCJpc3MiOiJkaWQ6ZGZvczpjbm5uZnQ5ZjhhMnJuOTM4ZDZua3ozOHI4NDd2MmtyIiwiYXVkIjoiZGlkOmRmb3M6OTRhaDc5NjNuMjIzazhjOTg4NGhoMjdla2g0Mm5lYSIsImF0dCI6W3sicmVzb3VyY2UiOiJjaGFpbjphM243cjNuZGU4ZTRrZWVhazkycnIzYWV6dGZ0dmMyIiwiYWN0aW9uIjoid3JpdGUifV0sInByZiI6W10sImV4cCI6MTc5ODc2MTYwMCwiaWF0IjoxNzcyODQxNjAwfQ.jzGLUBl0NhKaigoKH2OQBcC-bOlnhdL0ro4gWQpM2F-dZtdumxnixQ3cHabp8EaqfQ-jsRVkjqQ6Sf8sib8ZAg",
|
|
6
6
|
"issuerPublicKey": "z6MkrzLMNwoJSV4P3YccWcbtk8vd9LtgMKnLeaDLUqLuASjb",
|
|
7
7
|
"audiencePublicKey": "z6MkvsvmSh2dGnu2qw1Tnw7M5fz98ycfuYGxqnpfgmPkLv7o",
|
|
8
8
|
"expected": {
|
|
9
9
|
"iss": "did:dfos:cnnnft9f8a2rn938d6nkz38r847v2kr",
|
|
10
10
|
"aud": "did:dfos:94ah7963n223k8c9884hh27ekh42nea",
|
|
11
|
-
"narrowContentId": "
|
|
11
|
+
"narrowContentId": "a3n7r3nde8e4keeak92rr3aeztftvc2"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"description": "Identity chain: genesis publishing a services set (relay locator + content/artifact anchors)",
|
|
3
3
|
"type": "identity",
|
|
4
4
|
"chain": [
|
|
5
|
-
"
|
|
5
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmlkZW50aXR5LW9wIiwia2lkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgzbm4yOXp2aGUiLCJjaWQiOiJiYWZ5cmVpZ2h1dnppdGZhN29meXlyd3l2eXVha21xZmVmem11cGhpN2ZhZmF3b3gzYWh4ZGgzdHNhNCJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiY3JlYXRlIiwiYXV0aEtleXMiOlt7ImlkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgzbm4yOXp2aGUiLCJ0eXBlIjoiTXVsdGlrZXkiLCJwdWJsaWNLZXlNdWx0aWJhc2UiOiJ6Nk1rcnpMTU53b0pTVjRQM1ljY1djYnRrOHZkOUx0Z01LbkxlYURMVXFMdUFTamIifV0sImFzc2VydEtleXMiOlt7ImlkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgzbm4yOXp2aGUiLCJ0eXBlIjoiTXVsdGlrZXkiLCJwdWJsaWNLZXlNdWx0aWJhc2UiOiJ6Nk1rcnpMTU53b0pTVjRQM1ljY1djYnRrOHZkOUx0Z01LbkxlYURMVXFMdUFTamIifV0sImNvbnRyb2xsZXJLZXlzIjpbeyJpZCI6ImtleV9yOWV2MzRmdmMyM3o5OTl2ZWFhZnQ4M25uMjl6dmhlIiwidHlwZSI6Ik11bHRpa2V5IiwicHVibGljS2V5TXVsdGliYXNlIjoiejZNa3J6TE1Od29KU1Y0UDNZY2NXY2J0azh2ZDlMdGdNS25MZWFETFVxTHVBU2piIn1dLCJzZXJ2aWNlcyI6W3siaWQiOiJyZWxheSIsInR5cGUiOiJEZm9zUmVsYXkiLCJlbmRwb2ludCI6Imh0dHBzOi8vcmVsYXkuZGZvcy5jb20ifSx7ImlkIjoicHJvZmlsZSIsInR5cGUiOiJDb250ZW50QW5jaG9yIiwibGFiZWwiOiJwcm9maWxlIiwiYW5jaG9yIjoiYTNuN3IzbmRlOGU0a2VlYWs5MnJyM2FlenRmdHZjMiJ9LHsiaWQiOiJhdmF0YXIiLCJ0eXBlIjoiQ29udGVudEFuY2hvciIsImxhYmVsIjoiYXZhdGFyIiwiYW5jaG9yIjoiYmFmeXJlaWV2Y3FybXZ0ejJwaXM1dGRpenQ3c2pvdG9xcW9nbDZ2cnJxZ2E2NHcydG53a3Eycm51ZHkifV0sImNyZWF0ZWRBdCI6IjIwMjYtMDMtMDdUMDA6MDU6MDAuMDAwWiJ9.uN27ljlSuUwY2EO9bfX-G2yXliJQjEsWBsHYt1-0Vds5IASc2BO8FmjhcNv5JSQjDWJ54anTR2yRPkVxkeLKBw"
|
|
6
6
|
],
|
|
7
7
|
"controllerPublicKey": "z6MkrzLMNwoJSV4P3YccWcbtk8vd9LtgMKnLeaDLUqLuASjb",
|
|
8
8
|
"expected": {
|
|
9
|
-
"did": "did:dfos:
|
|
9
|
+
"did": "did:dfos:hd34z9a4tf6h62864nh4f7at6hr36r4",
|
|
10
10
|
"isDeleted": false,
|
|
11
11
|
"controllerKeys": [
|
|
12
12
|
{
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"id": "profile",
|
|
26
26
|
"type": "ContentAnchor",
|
|
27
27
|
"label": "profile",
|
|
28
|
-
"anchor": "
|
|
28
|
+
"anchor": "a3n7r3nde8e4keeak92rr3aeztftvc2"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"id": "avatar",
|