@atcute/did-plc 0.1.7 → 0.3.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/README.md +83 -5
- package/dist/client.d.ts +68 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +127 -0
- package/dist/client.js.map +1 -0
- package/dist/data.d.ts +15 -9
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +97 -5
- package/dist/data.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/typedefs.d.ts +2 -0
- package/dist/typedefs.d.ts.map +1 -1
- package/dist/typedefs.js +21 -86
- package/dist/typedefs.js.map +1 -1
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +22 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +36 -1
- package/dist/utils.js.map +1 -1
- package/lib/client.ts +195 -0
- package/lib/data.ts +120 -6
- package/lib/index.ts +1 -0
- package/lib/typedefs.ts +23 -101
- package/lib/types.ts +23 -0
- package/lib/utils.ts +44 -1
- package/package.json +15 -10
package/README.md
CHANGED
|
@@ -1,15 +1,93 @@
|
|
|
1
1
|
# @atcute/did-plc
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
validate, sign, and interact with did:plc operations.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @atcute/did-plc
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
did:plc is a self-certifying DID method where the audit log serves as the source of truth. this
|
|
10
|
+
package validates that operations are properly signed and chained, and provides utilities for
|
|
11
|
+
creating and submitting new operations.
|
|
12
|
+
|
|
13
|
+
## usage
|
|
14
|
+
|
|
15
|
+
### using the client
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { PlcClient } from '@atcute/did-plc';
|
|
19
|
+
|
|
20
|
+
const client = new PlcClient();
|
|
21
|
+
|
|
22
|
+
// fetch DID document
|
|
23
|
+
const doc = await client.getDocument('did:plc:ragtjsm2j2vknwkz3zp4oxrd');
|
|
24
|
+
|
|
25
|
+
// fetch current identity state
|
|
26
|
+
const state = await client.getState('did:plc:ragtjsm2j2vknwkz3zp4oxrd');
|
|
27
|
+
|
|
28
|
+
// fetch operation log
|
|
29
|
+
const log = await client.getOperationLog('did:plc:ragtjsm2j2vknwkz3zp4oxrd');
|
|
30
|
+
|
|
31
|
+
// fetch last operation
|
|
32
|
+
const lastOp = await client.getLastOperation('did:plc:ragtjsm2j2vknwkz3zp4oxrd');
|
|
33
|
+
|
|
34
|
+
// submit a signed operation
|
|
35
|
+
await client.submitOperation('did:plc:ragtjsm2j2vknwkz3zp4oxrd', signedOperation);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### signing operations
|
|
4
39
|
|
|
5
40
|
```ts
|
|
6
|
-
import {
|
|
41
|
+
import { signOperation, signTombstone, deriveDidFromGenesisOp } from '@atcute/did-plc';
|
|
42
|
+
|
|
43
|
+
// sign an unsigned operation
|
|
44
|
+
const signedOp = await signOperation(unsignedOp, rotationKey);
|
|
7
45
|
|
|
8
|
-
|
|
46
|
+
// sign a tombstone
|
|
47
|
+
const signedTombstone = await signTombstone(unsignedTombstone, rotationKey);
|
|
48
|
+
|
|
49
|
+
// derive did:plc from genesis operation
|
|
50
|
+
const did = await deriveDidFromGenesisOp(signedGenesisOp);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### validating audit logs
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import { defs, processIndexedEntryLog } from '@atcute/did-plc';
|
|
57
|
+
|
|
58
|
+
const did = 'did:plc:ragtjsm2j2vknwkz3zp4oxrd';
|
|
9
59
|
|
|
10
60
|
const response = await fetch(`https://plc.directory/${did}/log/audit`);
|
|
11
61
|
const json = await response.json();
|
|
12
62
|
|
|
13
|
-
const logs = defs.
|
|
14
|
-
await
|
|
63
|
+
const logs = defs.indexedEntryLog.parse(json);
|
|
64
|
+
const { canonical, nullified } = await processIndexedEntryLog(did, logs);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### validating new operations
|
|
68
|
+
|
|
69
|
+
before submitting a new operation to plc.directory:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import { validateIncomingOp } from '@atcute/did-plc';
|
|
73
|
+
|
|
74
|
+
// throws if operation exceeds size limits or has invalid structure
|
|
75
|
+
validateIncomingOp(operation);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### checking dispute windows
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
import { isDisputePeriodActive, getDisputeCandidates } from '@atcute/did-plc';
|
|
82
|
+
|
|
83
|
+
// assuming `canonical` from processIndexedEntryLog result above
|
|
84
|
+
|
|
85
|
+
// find operations that a rotation key can dispute
|
|
86
|
+
const candidates = getDisputeCandidates(canonical, 'did:key:z...');
|
|
87
|
+
|
|
88
|
+
// check if a specific operation can still be disputed (72-hour window)
|
|
89
|
+
const entry = canonical.at(-1);
|
|
90
|
+
if (entry && isDisputePeriodActive(entry)) {
|
|
91
|
+
// entry is still within the dispute window
|
|
92
|
+
}
|
|
15
93
|
```
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { DidDocument } from '@atcute/identity';
|
|
2
|
+
import * as t from './types.js';
|
|
3
|
+
export interface PlcClientOptions {
|
|
4
|
+
/** plc directory URL, defaults to https://plc.directory */
|
|
5
|
+
serviceUrl?: string;
|
|
6
|
+
/** custom fetch function */
|
|
7
|
+
fetch?: typeof globalThis.fetch;
|
|
8
|
+
}
|
|
9
|
+
export interface PlcRequestOptions {
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* client for interacting with plc.directory
|
|
14
|
+
*/
|
|
15
|
+
export declare class PlcClient {
|
|
16
|
+
#private;
|
|
17
|
+
readonly serviceUrl: string;
|
|
18
|
+
constructor({ serviceUrl, fetch: fetchFn }?: PlcClientOptions);
|
|
19
|
+
/**
|
|
20
|
+
* fetches the DID document for a did:plc
|
|
21
|
+
* @param did the did:plc identifier
|
|
22
|
+
* @param options request options
|
|
23
|
+
* @returns the DID document
|
|
24
|
+
*/
|
|
25
|
+
getDocument(did: t.DidPlcString, options?: PlcRequestOptions): Promise<DidDocument>;
|
|
26
|
+
/**
|
|
27
|
+
* fetches the current identity state for a did:plc
|
|
28
|
+
* @param did the did:plc identifier
|
|
29
|
+
* @param options request options
|
|
30
|
+
* @returns the current plc state
|
|
31
|
+
*/
|
|
32
|
+
getState(did: t.DidPlcString, options?: PlcRequestOptions): Promise<t.PlcState>;
|
|
33
|
+
/**
|
|
34
|
+
* fetches the operation log for a did:plc
|
|
35
|
+
* @param did the did:plc identifier
|
|
36
|
+
* @param options request options
|
|
37
|
+
* @returns the operation log
|
|
38
|
+
*/
|
|
39
|
+
getOperationLog(did: t.DidPlcString, options?: PlcRequestOptions): Promise<t.OperationLog>;
|
|
40
|
+
/**
|
|
41
|
+
* fetches the auditable log for a did:plc (includes CIDs and timestamps)
|
|
42
|
+
* @param did the did:plc identifier
|
|
43
|
+
* @param options request options
|
|
44
|
+
* @returns the indexed entry log
|
|
45
|
+
*/
|
|
46
|
+
getAuditLog(did: t.DidPlcString, options?: PlcRequestOptions): Promise<t.IndexedEntryLog>;
|
|
47
|
+
/**
|
|
48
|
+
* fetches the last operation for a did:plc
|
|
49
|
+
* @param did the did:plc identifier
|
|
50
|
+
* @param options request options
|
|
51
|
+
* @returns the last operation or tombstone
|
|
52
|
+
*/
|
|
53
|
+
getLastOperation(did: t.DidPlcString, options?: PlcRequestOptions): Promise<t.CompatibleOperationOrTombstone>;
|
|
54
|
+
/**
|
|
55
|
+
* submits a signed operation to plc.directory
|
|
56
|
+
* @param did the did:plc identifier
|
|
57
|
+
* @param operation the signed operation to submit
|
|
58
|
+
* @param options request options
|
|
59
|
+
*/
|
|
60
|
+
submitOperation(did: t.DidPlcString, operation: t.OperationOrTombstone, options?: PlcRequestOptions): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* checks if the plc directory is reachable
|
|
63
|
+
* @param options request options
|
|
64
|
+
* @returns true if reachable
|
|
65
|
+
*/
|
|
66
|
+
ping(options?: PlcRequestOptions): Promise<boolean>;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAKpD,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAkChC,MAAM,WAAW,gBAAgB;IAChC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IACjC,MAAM,CAAC,EAAE,WAAW,CAAC;CACrB;AAED;;GAEG;AACH,qBAAa,SAAS;;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAG5B,YAAY,EAAE,UAAoC,EAAE,KAAK,EAAE,OAAe,EAAE,GAAE,gBAAqB,EAGlG;IAED;;;;;OAKG;IACG,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAUxF;IAED;;;;;OAKG;IACG,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAUpF;IAED;;;;;OAKG;IACG,eAAe,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAU/F;IAED;;;;;OAKG;IACG,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAU9F;IAED;;;;;OAKG;IACG,gBAAgB,CACrB,GAAG,EAAE,CAAC,CAAC,YAAY,EACnB,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAU3C;IAED;;;;;OAKG;IACG,eAAe,CACpB,GAAG,EAAE,CAAC,CAAC,YAAY,EACnB,SAAS,EAAE,CAAC,CAAC,oBAAoB,EACjC,OAAO,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAaf;IAED;;;;OAIG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAQxD;CACD"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { defs as identityDefs } from '@atcute/identity';
|
|
2
|
+
import { FailedResponseError, isResponseOk, parseResponseAsJson, pipe, validateJsonWith } from '@atcute/util-fetch';
|
|
3
|
+
import * as defs from './typedefs.js';
|
|
4
|
+
import * as t from './types.js';
|
|
5
|
+
const MAX_RESPONSE_SIZE = 64 * 1024;
|
|
6
|
+
const handleDocument = pipe(isResponseOk, parseResponseAsJson(/^application\/(did\+ld\+)?json$/, MAX_RESPONSE_SIZE), validateJsonWith(identityDefs.didDocument, { mode: 'passthrough' }));
|
|
7
|
+
const handlePlcState = pipe(isResponseOk, parseResponseAsJson(/^application\/json$/, MAX_RESPONSE_SIZE), validateJsonWith(defs.plcState, { mode: 'passthrough' }));
|
|
8
|
+
const handleOperationLog = pipe(isResponseOk, parseResponseAsJson(/^application\/json$/, MAX_RESPONSE_SIZE), validateJsonWith(defs.operationLog, { mode: 'passthrough' }));
|
|
9
|
+
const handleIndexedEntryLog = pipe(isResponseOk, parseResponseAsJson(/^application\/json$/, MAX_RESPONSE_SIZE), validateJsonWith(defs.indexedEntryLog, { mode: 'passthrough' }));
|
|
10
|
+
const handleLastOperation = pipe(isResponseOk, parseResponseAsJson(/^application\/json$/, MAX_RESPONSE_SIZE), validateJsonWith(defs.compatibleOperationOrTombstone, { mode: 'passthrough' }));
|
|
11
|
+
/**
|
|
12
|
+
* client for interacting with plc.directory
|
|
13
|
+
*/
|
|
14
|
+
export class PlcClient {
|
|
15
|
+
serviceUrl;
|
|
16
|
+
#fetch;
|
|
17
|
+
constructor({ serviceUrl = 'https://plc.directory', fetch: fetchFn = fetch } = {}) {
|
|
18
|
+
this.serviceUrl = serviceUrl;
|
|
19
|
+
this.#fetch = fetchFn;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* fetches the DID document for a did:plc
|
|
23
|
+
* @param did the did:plc identifier
|
|
24
|
+
* @param options request options
|
|
25
|
+
* @returns the DID document
|
|
26
|
+
*/
|
|
27
|
+
async getDocument(did, options) {
|
|
28
|
+
const url = new URL(`/${encodeURIComponent(did)}`, this.serviceUrl);
|
|
29
|
+
const response = await this.#fetch(url, {
|
|
30
|
+
signal: options?.signal,
|
|
31
|
+
headers: { accept: 'application/did+ld+json,application/json' },
|
|
32
|
+
});
|
|
33
|
+
const { json } = await handleDocument(response);
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* fetches the current identity state for a did:plc
|
|
38
|
+
* @param did the did:plc identifier
|
|
39
|
+
* @param options request options
|
|
40
|
+
* @returns the current plc state
|
|
41
|
+
*/
|
|
42
|
+
async getState(did, options) {
|
|
43
|
+
const url = new URL(`/${encodeURIComponent(did)}/data`, this.serviceUrl);
|
|
44
|
+
const response = await this.#fetch(url, {
|
|
45
|
+
signal: options?.signal,
|
|
46
|
+
headers: { accept: 'application/json' },
|
|
47
|
+
});
|
|
48
|
+
const { json } = await handlePlcState(response);
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* fetches the operation log for a did:plc
|
|
53
|
+
* @param did the did:plc identifier
|
|
54
|
+
* @param options request options
|
|
55
|
+
* @returns the operation log
|
|
56
|
+
*/
|
|
57
|
+
async getOperationLog(did, options) {
|
|
58
|
+
const url = new URL(`/${encodeURIComponent(did)}/log`, this.serviceUrl);
|
|
59
|
+
const response = await this.#fetch(url, {
|
|
60
|
+
signal: options?.signal,
|
|
61
|
+
headers: { accept: 'application/json' },
|
|
62
|
+
});
|
|
63
|
+
const { json } = await handleOperationLog(response);
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* fetches the auditable log for a did:plc (includes CIDs and timestamps)
|
|
68
|
+
* @param did the did:plc identifier
|
|
69
|
+
* @param options request options
|
|
70
|
+
* @returns the indexed entry log
|
|
71
|
+
*/
|
|
72
|
+
async getAuditLog(did, options) {
|
|
73
|
+
const url = new URL(`/${encodeURIComponent(did)}/log/audit`, this.serviceUrl);
|
|
74
|
+
const response = await this.#fetch(url, {
|
|
75
|
+
signal: options?.signal,
|
|
76
|
+
headers: { accept: 'application/json' },
|
|
77
|
+
});
|
|
78
|
+
const { json } = await handleIndexedEntryLog(response);
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* fetches the last operation for a did:plc
|
|
83
|
+
* @param did the did:plc identifier
|
|
84
|
+
* @param options request options
|
|
85
|
+
* @returns the last operation or tombstone
|
|
86
|
+
*/
|
|
87
|
+
async getLastOperation(did, options) {
|
|
88
|
+
const url = new URL(`/${encodeURIComponent(did)}/log/last`, this.serviceUrl);
|
|
89
|
+
const response = await this.#fetch(url, {
|
|
90
|
+
signal: options?.signal,
|
|
91
|
+
headers: { accept: 'application/json' },
|
|
92
|
+
});
|
|
93
|
+
const { json } = await handleLastOperation(response);
|
|
94
|
+
return json;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* submits a signed operation to plc.directory
|
|
98
|
+
* @param did the did:plc identifier
|
|
99
|
+
* @param operation the signed operation to submit
|
|
100
|
+
* @param options request options
|
|
101
|
+
*/
|
|
102
|
+
async submitOperation(did, operation, options) {
|
|
103
|
+
const url = new URL(`/${encodeURIComponent(did)}`, this.serviceUrl);
|
|
104
|
+
const response = await this.#fetch(url, {
|
|
105
|
+
method: 'POST',
|
|
106
|
+
signal: options?.signal,
|
|
107
|
+
headers: { 'content-type': 'application/json' },
|
|
108
|
+
body: JSON.stringify(operation),
|
|
109
|
+
});
|
|
110
|
+
if (!response.ok) {
|
|
111
|
+
throw new FailedResponseError(response);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* checks if the plc directory is reachable
|
|
116
|
+
* @param options request options
|
|
117
|
+
* @returns true if reachable
|
|
118
|
+
*/
|
|
119
|
+
async ping(options) {
|
|
120
|
+
const url = new URL('/_health', this.serviceUrl);
|
|
121
|
+
const response = await this.#fetch(url, {
|
|
122
|
+
signal: options?.signal,
|
|
123
|
+
});
|
|
124
|
+
return response.ok;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../lib/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEpH,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAEhC,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpC,MAAM,cAAc,GAAG,IAAI,CAC1B,YAAY,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CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEpE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACvC,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,OAAO,EAAE,MAAM;YACvB,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;SAC/B,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YAClB,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;IAAA,CACD;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI,CAAC,OAA2B,EAAoB;QACzD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAEjD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACvC,MAAM,EAAE,OAAO,EAAE,MAAM;SACvB,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,EAAE,CAAC;IAAA,CACnB;CACD"}
|
package/dist/data.d.ts
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import * as t from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validate an incoming operation against soft constraints (length limits, counts, duplicates).
|
|
4
|
+
* This should be used when preparing to submit a new operation to plc.directory.
|
|
5
|
+
* Historical operations should only be validated against hard constraints (structure, signatures, hashes).
|
|
6
|
+
*/
|
|
7
|
+
export declare const validateIncomingOp: (op: t.CompatibleOperationOrTombstone) => void;
|
|
2
8
|
/**
|
|
3
9
|
* Process an indexed entry by validating it and integrating it into the canonical log.
|
|
4
10
|
*/
|
|
5
|
-
export declare const processIndexedEntry: (did:
|
|
11
|
+
export declare const processIndexedEntry: (did: `did:plc:${string}`, canonical: t.IndexedEntryWithSigner<t.CompatibleOperationOrTombstone>[], proposed: t.IndexedEntry<t.CompatibleOperationOrTombstone>) => Promise<{
|
|
6
12
|
prev: string | null;
|
|
7
|
-
ops: t.IndexedEntryWithSigner[];
|
|
8
|
-
nullified: t.IndexedEntryWithSigner[];
|
|
13
|
+
ops: t.IndexedEntryWithSigner<t.CompatibleOperationOrTombstone>[];
|
|
14
|
+
nullified: t.IndexedEntryWithSigner<t.CompatibleOperationOrTombstone>[];
|
|
9
15
|
}>;
|
|
10
16
|
/**
|
|
11
17
|
* Process an indexed entry log by sequentially processing each operation.
|
|
12
18
|
*/
|
|
13
|
-
export declare const processIndexedEntryLog: (did:
|
|
14
|
-
canonical: t.IndexedEntryWithSigner[];
|
|
15
|
-
nullified: t.IndexedEntryWithSigner[];
|
|
19
|
+
export declare const processIndexedEntryLog: (did: `did:plc:${string}`, ops: t.IndexedEntryLog) => Promise<{
|
|
20
|
+
canonical: t.IndexedEntryWithSigner<t.CompatibleOperationOrTombstone>[];
|
|
21
|
+
nullified: t.IndexedEntryWithSigner<t.CompatibleOperationOrTombstone>[];
|
|
16
22
|
}>;
|
|
17
23
|
/**
|
|
18
24
|
* Check whether an operation can still be disputed
|
|
19
25
|
*/
|
|
20
|
-
export declare const isDisputePeriodActive: (disputed: t.IndexedEntry
|
|
26
|
+
export declare const isDisputePeriodActive: (disputed: t.IndexedEntry<t.CompatibleOperationOrTombstone>, now?: number) => boolean;
|
|
21
27
|
/**
|
|
22
28
|
* Check if a key is authorized to dispute an operation
|
|
23
29
|
*/
|
|
24
|
-
export declare const isAuthorizedForDispute: (base: t.IndexedEntryWithSigner<t.CompatibleOperation>, disputed: t.IndexedEntryWithSigner
|
|
30
|
+
export declare const isAuthorizedForDispute: (base: t.IndexedEntryWithSigner<t.CompatibleOperation>, disputed: t.IndexedEntryWithSigner<t.CompatibleOperationOrTombstone>, key: `did:key:${string}`) => boolean;
|
|
25
31
|
export interface DisputeCandidate {
|
|
26
32
|
base: t.IndexedEntryWithSigner<t.CompatibleOperation>;
|
|
27
33
|
disputed: t.IndexedEntryWithSigner;
|
|
@@ -29,5 +35,5 @@ export interface DisputeCandidate {
|
|
|
29
35
|
/**
|
|
30
36
|
* Finds operations that can be disputed by a given key
|
|
31
37
|
*/
|
|
32
|
-
export declare const getDisputeCandidates: (canonical: t.IndexedEntryWithSigner[], key:
|
|
38
|
+
export declare const getDisputeCandidates: (canonical: t.IndexedEntryWithSigner<t.CompatibleOperationOrTombstone>[], key: `did:key:${string}`) => DisputeCandidate[];
|
|
33
39
|
//# sourceMappingURL=data.d.ts.map
|
package/dist/data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../lib/data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../lib/data.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAehC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,gDAiG9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;EAsJ/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;EAiBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,uFAGjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,oKAelC,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACtD,QAAQ,EAAE,CAAC,CAAC,sBAAsB,CAAC;CACnC;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,2HAoBhC,CAAC"}
|
package/dist/data.js
CHANGED
|
@@ -1,11 +1,103 @@
|
|
|
1
1
|
import * as CBOR from '@atcute/cbor';
|
|
2
2
|
import * as CID from '@atcute/cid';
|
|
3
|
-
import {
|
|
4
|
-
import { toSha256 } from '@atcute/uint8array';
|
|
3
|
+
import { isKeyDid } from '@atcute/identity';
|
|
5
4
|
import { DISPUTE_WINDOW } from './constants.js';
|
|
6
5
|
import * as err from './errors.js';
|
|
7
6
|
import * as t from './types.js';
|
|
8
|
-
import { isSignedOperationValid, normalizeOp } from './utils.js';
|
|
7
|
+
import { deriveDidFromGenesisOp, isSignedOperationValid, normalizeOp } from './utils.js';
|
|
8
|
+
// soft constraint limits for incoming operations
|
|
9
|
+
const MAX_OP_BYTES = 4000;
|
|
10
|
+
const MAX_AKA_ENTRIES = 10;
|
|
11
|
+
const MAX_AKA_LENGTH = 258; // max handle length (253) plus at:// prefix (5)
|
|
12
|
+
const MAX_ROTATION_ENTRIES = 10;
|
|
13
|
+
const MAX_SERVICE_ENTRIES = 10;
|
|
14
|
+
const MAX_SERVICE_TYPE_LENGTH = 256;
|
|
15
|
+
const MAX_SERVICE_ENDPOINT_LENGTH = 512;
|
|
16
|
+
const MAX_VERIFICATION_METHOD_ENTRIES = 10;
|
|
17
|
+
const MAX_ID_LENGTH = 32;
|
|
18
|
+
const MAX_DID_KEY_LENGTH = 256; // k256 = 57, BLS12-381 = 143
|
|
19
|
+
/**
|
|
20
|
+
* Validate an incoming operation against soft constraints (length limits, counts, duplicates).
|
|
21
|
+
* This should be used when preparing to submit a new operation to plc.directory.
|
|
22
|
+
* Historical operations should only be validated against hard constraints (structure, signatures, hashes).
|
|
23
|
+
*/
|
|
24
|
+
export const validateIncomingOp = (op) => {
|
|
25
|
+
// Check CBOR size limit
|
|
26
|
+
const byteLength = CBOR.encode(op).byteLength;
|
|
27
|
+
if (byteLength > MAX_OP_BYTES) {
|
|
28
|
+
throw new Error(`operation too large (${MAX_OP_BYTES} bytes maximum in cbor encoding)`);
|
|
29
|
+
}
|
|
30
|
+
if (op.type === 'plc_tombstone') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
op = normalizeOp(op);
|
|
34
|
+
{
|
|
35
|
+
const alsoKnownAs = op.alsoKnownAs;
|
|
36
|
+
if (alsoKnownAs.length > MAX_AKA_ENTRIES) {
|
|
37
|
+
throw new Error(`too many alsoKnownAs entries (max ${MAX_AKA_ENTRIES})`);
|
|
38
|
+
}
|
|
39
|
+
const alsoKnownAsDupe = new Set();
|
|
40
|
+
for (const aka of alsoKnownAs) {
|
|
41
|
+
if (aka.length > MAX_AKA_LENGTH) {
|
|
42
|
+
throw new Error(`alsoKnownAs entry too long (max ${MAX_AKA_LENGTH}): ${aka}`);
|
|
43
|
+
}
|
|
44
|
+
if (alsoKnownAsDupe.has(aka)) {
|
|
45
|
+
throw new Error(`duplicate alsoKnownAs entry: ${aka}`);
|
|
46
|
+
}
|
|
47
|
+
alsoKnownAsDupe.add(aka);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
{
|
|
51
|
+
const rotationKeys = op.rotationKeys;
|
|
52
|
+
if (rotationKeys.length === 0) {
|
|
53
|
+
throw new Error(`missing rotation keys`);
|
|
54
|
+
}
|
|
55
|
+
if (rotationKeys.length > MAX_ROTATION_ENTRIES) {
|
|
56
|
+
throw new Error(`too many rotationKey entries (max ${MAX_ROTATION_ENTRIES})`);
|
|
57
|
+
}
|
|
58
|
+
const rotationKeyDupe = new Set();
|
|
59
|
+
for (const key of rotationKeys) {
|
|
60
|
+
if (rotationKeyDupe.has(key)) {
|
|
61
|
+
throw new Error(`duplicate rotation key: ${key}`);
|
|
62
|
+
}
|
|
63
|
+
rotationKeyDupe.add(key);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
{
|
|
67
|
+
const services = Object.entries(op.services);
|
|
68
|
+
if (services.length > MAX_SERVICE_ENTRIES) {
|
|
69
|
+
throw new Error(`too many service entries (max ${MAX_SERVICE_ENTRIES})`);
|
|
70
|
+
}
|
|
71
|
+
for (const [id, service] of services) {
|
|
72
|
+
if (id.length > MAX_ID_LENGTH) {
|
|
73
|
+
throw new Error(`service id too long (max ${MAX_ID_LENGTH}): ${id}`);
|
|
74
|
+
}
|
|
75
|
+
if (service.type.length > MAX_SERVICE_TYPE_LENGTH) {
|
|
76
|
+
throw new Error(`service type too long (max ${MAX_SERVICE_TYPE_LENGTH})`);
|
|
77
|
+
}
|
|
78
|
+
if (service.endpoint.length > MAX_SERVICE_ENDPOINT_LENGTH) {
|
|
79
|
+
throw new Error(`service endpoint too long (max ${MAX_SERVICE_ENDPOINT_LENGTH})`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
{
|
|
84
|
+
const verificationMethods = Object.entries(op.verificationMethods);
|
|
85
|
+
if (verificationMethods.length > MAX_VERIFICATION_METHOD_ENTRIES) {
|
|
86
|
+
throw new Error(`too many verification method entries (max ${MAX_VERIFICATION_METHOD_ENTRIES})`);
|
|
87
|
+
}
|
|
88
|
+
for (const [id, key] of verificationMethods) {
|
|
89
|
+
if (id.length > MAX_ID_LENGTH) {
|
|
90
|
+
throw new Error(`verification method id too long (max ${MAX_ID_LENGTH}): ${id}`);
|
|
91
|
+
}
|
|
92
|
+
if (key.length > MAX_DID_KEY_LENGTH) {
|
|
93
|
+
throw new Error(`verification method key too long (max ${MAX_DID_KEY_LENGTH}): ${key}`);
|
|
94
|
+
}
|
|
95
|
+
if (!isKeyDid(key)) {
|
|
96
|
+
throw new Error(`invalid verification method key: ${key}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
9
101
|
/**
|
|
10
102
|
* Process an indexed entry by validating it and integrating it into the canonical log.
|
|
11
103
|
*/
|
|
@@ -19,11 +111,11 @@ export const processIndexedEntry = async (did, canonical, proposed) => {
|
|
|
19
111
|
}
|
|
20
112
|
// Check if CID and DID matches
|
|
21
113
|
{
|
|
22
|
-
const
|
|
23
|
-
const expectedDid = `did:plc:${toBase32(await toSha256(opBytes)).slice(0, 24)}`;
|
|
114
|
+
const expectedDid = await deriveDidFromGenesisOp(proposed.operation);
|
|
24
115
|
if (expectedDid !== did) {
|
|
25
116
|
throw new err.GenesisHashError(proposed, did);
|
|
26
117
|
}
|
|
118
|
+
const opBytes = CBOR.encode(proposed.operation);
|
|
27
119
|
const expectedCid = CID.toString(await CID.create(CID.CODEC_DCBOR, opBytes));
|
|
28
120
|
if (expectedCid !== proposed.cid) {
|
|
29
121
|
throw new err.InvalidHashError(proposed, expectedCid);
|
package/dist/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../lib/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../lib/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AACnC,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzF,iDAAiD;AACjD,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,cAAc,GAAG,GAAG,CAAC,CAAC,gDAAgD;AAC5E,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AACxC,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAC3C,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,kBAAkB,GAAG,GAAG,C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,GAAG,CAAC,CAAoD,CAAC;QACnF,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;QAEhC,0DAA0D;QAC1D,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC;YAC3C,SAAS;QACV,CAAC;QAED,kEAAkE;QAClE,IAAI,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC;YACjD,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrC,CAAC;IACF,CAAC;IAED,OAAO,UAAU,CAAC;AAAA,CAClB,CAAC"}
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAEhC,qBAAa,QAAS,SAAQ,KAAK;IACzB,IAAI,SAAc;CAC3B;AAED,qBAAa,sBAAuB,SAAQ,QAAQ;IAI3C,SAAS,EAAE,CAAC,CAAC,YAAY;IACzB,MAAM,EAAE,MAAM;IAJb,IAAI,SAA4B;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAEhC,qBAAa,QAAS,SAAQ,KAAK;IACzB,IAAI,SAAc;CAC3B;AAED,qBAAa,sBAAuB,SAAQ,QAAQ;IAI3C,SAAS,EAAE,CAAC,CAAC,YAAY;IACzB,MAAM,EAAE,MAAM;IAJb,IAAI,SAA4B;IAEzC,YACQ,SAAS,EAAE,CAAC,CAAC,YAAY,EACzB,MAAM,EAAE,MAAM,EAGrB;CACD;AAED,qBAAa,qBAAsB,SAAQ,QAAQ;IAG/B,SAAS,EAAE,CAAC,CAAC,YAAY;IAFnC,IAAI,SAA2B;IAExC,YAAmB,SAAS,EAAE,CAAC,CAAC,YAAY,EAE3C;CACD;AAED,qBAAa,gBAAiB,SAAQ,QAAQ;IAIrC,SAAS,EAAE,CAAC,CAAC,YAAY;IACzB,QAAQ,EAAE,MAAM;IAJf,IAAI,SAAsB;IAEnC,YACQ,SAAS,EAAE,CAAC,CAAC,YAAY,EACzB,QAAQ,EAAE,MAAM,EAGvB;CACD;AAED,qBAAa,gBAAiB,SAAQ,QAAQ;IAIrC,SAAS,EAAE,CAAC,CAAC,YAAY;IACzB,GAAG,EAAE,CAAC,CAAC,YAAY;IAJlB,IAAI,SAAsB;IAEnC,YACQ,SAAS,EAAE,CAAC,CAAC,YAAY,EACzB,GAAG,EAAE,CAAC,CAAC,YAAY,EAG1B;CACD;AAED,qBAAa,gBAAiB,SAAQ,QAAQ;IAIrC,SAAS,EAAE,CAAC,CAAC,YAAY;IACzB,MAAM,EAAE,MAAM;IAJb,IAAI,SAAsB;IAEnC,YACQ,SAAS,EAAE,CAAC,CAAC,YAAY,EACzB,MAAM,EAAE,MAAM,EAGrB;CACD"}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAEhC,MAAM,OAAO,QAAS,SAAQ,KAAK;IACzB,IAAI,GAAG,UAAU,CAAC;CAC3B;AAED,MAAM,OAAO,sBAAuB,SAAQ,QAAQ;IAI3C;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAEhC,MAAM,OAAO,QAAS,SAAQ,KAAK;IACzB,IAAI,GAAG,UAAU,CAAC;CAC3B;AAED,MAAM,OAAO,sBAAuB,SAAQ,QAAQ;IAI3C,SAAS;IACT,MAAM;IAJL,IAAI,GAAG,wBAAwB,CAAC;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sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/typedefs.d.ts
CHANGED
|
@@ -16,4 +16,6 @@ export declare const operationOrTombstone: v.Type<t.OperationOrTombstone>;
|
|
|
16
16
|
export declare const operationLog: v.Type<t.OperationLog>;
|
|
17
17
|
export declare const indexedEntry: v.Type<t.IndexedEntry>;
|
|
18
18
|
export declare const indexedEntryLog: v.Type<t.IndexedEntryLog>;
|
|
19
|
+
export declare const plcState: v.Type<t.PlcState>;
|
|
20
|
+
export declare const sequencedEntry: v.Type<t.SequencedEntry>;
|
|
19
21
|
//# sourceMappingURL=typedefs.d.ts.map
|
package/dist/typedefs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedefs.d.ts","sourceRoot":"","sources":["../lib/typedefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAMpC,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAGhC,eAAO,MAAM,YAAY,6BAAmD,CAAC;AAE7E,eAAO,MAAM,sBAAsB,6BAAmD,CAAC;AAEvF,eAAO,MAAM,YAAY,6BAYvB,CAAC;
|
|
1
|
+
{"version":3,"file":"typedefs.d.ts","sourceRoot":"","sources":["../lib/typedefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAMpC,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAGhC,eAAO,MAAM,YAAY,6BAAmD,CAAC;AAE7E,eAAO,MAAM,sBAAsB,6BAAmD,CAAC;AAEvF,eAAO,MAAM,YAAY,6BAYvB,CAAC;AAuBH,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,6BAA6B,CACnD,CAAC;AAEhC,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAEhE,CAAC;AAIH,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAGpC,CAAC;AAWH,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAsB,CAAC;AAEjF,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAA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