@metalabel/dfos-protocol 0.0.1
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/LICENSE +21 -0
- package/PROTOCOL.md +873 -0
- package/README.md +50 -0
- package/dist/chain/index.d.ts +196 -0
- package/dist/chain/index.js +33 -0
- package/dist/chunk-3PB644X2.js +330 -0
- package/dist/chunk-LWC4PWGZ.js +385 -0
- package/dist/chunk-ZXXP5W5N.js +251 -0
- package/dist/crypto/index.d.ts +205 -0
- package/dist/crypto/index.js +46 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +108 -0
- package/dist/registry/index.d.ts +151 -0
- package/dist/registry/index.js +36 -0
- package/examples/content-delete.json +28 -0
- package/examples/content-lifecycle.json +39 -0
- package/examples/identity-delete.json +19 -0
- package/examples/identity-genesis.json +18 -0
- package/examples/identity-rotation.json +19 -0
- package/openapi.yaml +408 -0
- package/package.json +75 -0
- package/schemas/document-envelope.v1.json +37 -0
- package/schemas/post.v1.json +59 -0
- package/schemas/profile.v1.json +52 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import * as multiformats from 'multiformats';
|
|
2
|
+
import { CID } from 'multiformats/cid';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Encode bytes or a string as a base64url string (no padding)
|
|
6
|
+
*/
|
|
7
|
+
declare const base64urlEncode: (data: Uint8Array | string) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Decode a base64url string to bytes
|
|
10
|
+
*/
|
|
11
|
+
declare const base64urlDecode: (str: string) => Uint8Array;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Generate a new random Ed25519 keypair
|
|
15
|
+
*/
|
|
16
|
+
declare const createNewEd25519Keypair: () => {
|
|
17
|
+
privateKey: Uint8Array<ArrayBufferLike>;
|
|
18
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Generate an Ed25519 keypair from a private key
|
|
22
|
+
*/
|
|
23
|
+
declare const importEd25519Keypair: (privateKey: Uint8Array) => {
|
|
24
|
+
privateKey: Uint8Array<ArrayBufferLike>;
|
|
25
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Sign a payload with an Ed25519 private key
|
|
29
|
+
*
|
|
30
|
+
* Ed25519 handles hashing internally (SHA-512) — no external prehash needed
|
|
31
|
+
*/
|
|
32
|
+
declare const signPayloadEd25519: (payload: Uint8Array, privateKey: Uint8Array) => Uint8Array<ArrayBufferLike>;
|
|
33
|
+
/**
|
|
34
|
+
* Check that a signature is valid for a given payload and Ed25519 public key
|
|
35
|
+
*/
|
|
36
|
+
declare const isValidEd25519Signature: (payload: Uint8Array, signature: Uint8Array, publicKey: Uint8Array) => boolean;
|
|
37
|
+
|
|
38
|
+
type PrefixedID<T extends string> = `${T}_${string}`;
|
|
39
|
+
/**
|
|
40
|
+
* Generate an ID without a prefix
|
|
41
|
+
*
|
|
42
|
+
* Note: byte % 19 introduces ~0.3% modulo bias (256 is not divisible by 19).
|
|
43
|
+
* This is not security-relevant for identifiers. The simplicity of the algorithm
|
|
44
|
+
* is preferred over rejection sampling.
|
|
45
|
+
*
|
|
46
|
+
* @param options.seed - Optional seed for deterministic IDs
|
|
47
|
+
*/
|
|
48
|
+
declare const generateIdNoPrefix: (options?: {
|
|
49
|
+
seed?: Uint8Array;
|
|
50
|
+
}) => string;
|
|
51
|
+
/**
|
|
52
|
+
* Generate a prefixed ID
|
|
53
|
+
*
|
|
54
|
+
* Without options: generates random 22-char ID
|
|
55
|
+
* With { seed }: generates deterministic ID from seed (for external ID mapping)
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* generateId('post') // random ID
|
|
59
|
+
* generateId('session', { seed: new TextEncoder().encode('clerk:123') }) // deterministic
|
|
60
|
+
*/
|
|
61
|
+
declare const generateId: <T extends string>(prefix: T, options?: {
|
|
62
|
+
seed?: Uint8Array;
|
|
63
|
+
}) => PrefixedID<T>;
|
|
64
|
+
/**
|
|
65
|
+
* Validate that an ID has the expected prefix and correct length
|
|
66
|
+
*
|
|
67
|
+
* @param prefix - Expected prefix (e.g., 'msg', 'post')
|
|
68
|
+
* @param id - ID to validate
|
|
69
|
+
* @returns true if ID has correct prefix and length (prefix + _ + 22 chars)
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* isValidId('msg', 'msg_abc123...') // true
|
|
73
|
+
* isValidId('msg', 'post_abc123...') // false (wrong prefix)
|
|
74
|
+
* isValidId('msg', 'msg_short') // false (wrong length)
|
|
75
|
+
*/
|
|
76
|
+
declare const isValidId: (prefix: string, id: string) => boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Given an ID, validate prefix and return a normalized ID
|
|
79
|
+
*/
|
|
80
|
+
declare const normalizedId: <T extends string>(prefix: T, id: string) => `${T}_${string}`;
|
|
81
|
+
|
|
82
|
+
interface JwsHeader {
|
|
83
|
+
alg: 'EdDSA';
|
|
84
|
+
typ: string;
|
|
85
|
+
kid: string;
|
|
86
|
+
/** CIDv1 of the operation payload (dag-cbor + SHA-256), signed in the protected header */
|
|
87
|
+
cid?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Create an EdDSA JWS compact token
|
|
91
|
+
*
|
|
92
|
+
* The signer receives the signing input bytes and returns the raw Ed25519
|
|
93
|
+
* signature (64 bytes)
|
|
94
|
+
*/
|
|
95
|
+
declare const createJws: (options: {
|
|
96
|
+
header: JwsHeader;
|
|
97
|
+
payload: Record<string, unknown>;
|
|
98
|
+
sign: (message: Uint8Array) => Promise<Uint8Array>;
|
|
99
|
+
}) => Promise<string>;
|
|
100
|
+
/**
|
|
101
|
+
* Verify an EdDSA JWS compact token and return the decoded header and payload
|
|
102
|
+
*
|
|
103
|
+
* Throws JwsVerificationError if the signature is invalid
|
|
104
|
+
*/
|
|
105
|
+
declare const verifyJws: (options: {
|
|
106
|
+
token: string;
|
|
107
|
+
publicKey: Uint8Array;
|
|
108
|
+
}) => {
|
|
109
|
+
header: JwsHeader;
|
|
110
|
+
payload: Record<string, unknown>;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Decode a JWS compact token without verifying the signature
|
|
114
|
+
*
|
|
115
|
+
* Returns null if the token is malformed
|
|
116
|
+
*/
|
|
117
|
+
declare const decodeJwsUnsafe: (token: string) => {
|
|
118
|
+
header: JwsHeader;
|
|
119
|
+
payload: Record<string, unknown>;
|
|
120
|
+
} | null;
|
|
121
|
+
/**
|
|
122
|
+
* Error thrown when JWS verification fails
|
|
123
|
+
*/
|
|
124
|
+
declare class JwsVerificationError extends Error {
|
|
125
|
+
constructor(message: string);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
interface JwtHeader {
|
|
129
|
+
alg: 'EdDSA';
|
|
130
|
+
typ: 'JWT';
|
|
131
|
+
kid?: string;
|
|
132
|
+
}
|
|
133
|
+
interface JwtClaims {
|
|
134
|
+
iss: string;
|
|
135
|
+
sub: string;
|
|
136
|
+
aud?: string;
|
|
137
|
+
exp: number;
|
|
138
|
+
iat: number;
|
|
139
|
+
jti?: string;
|
|
140
|
+
[key: string]: unknown;
|
|
141
|
+
}
|
|
142
|
+
interface JwtVerifyOptions {
|
|
143
|
+
/** The JWT token string */
|
|
144
|
+
token: string;
|
|
145
|
+
/** Raw Ed25519 public key bytes (32 bytes) */
|
|
146
|
+
publicKey: Uint8Array;
|
|
147
|
+
/** Expected audience claim */
|
|
148
|
+
audience?: string;
|
|
149
|
+
/** Expected issuer claim */
|
|
150
|
+
issuer?: string;
|
|
151
|
+
/** Current time in seconds (defaults to Date.now() / 1000) */
|
|
152
|
+
currentTime?: number;
|
|
153
|
+
}
|
|
154
|
+
interface JwtCreateOptions {
|
|
155
|
+
header: JwtHeader;
|
|
156
|
+
payload: JwtClaims;
|
|
157
|
+
/** Signer function that signs payload bytes and returns signature bytes */
|
|
158
|
+
sign: (payload: Uint8Array) => Promise<Uint8Array>;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Create a JWT signed with EdDSA (Ed25519)
|
|
162
|
+
*
|
|
163
|
+
* The signer receives the raw signing input bytes and signs them directly
|
|
164
|
+
* (Ed25519 handles hashing internally)
|
|
165
|
+
*/
|
|
166
|
+
declare const createJwt: (options: JwtCreateOptions) => Promise<string>;
|
|
167
|
+
/**
|
|
168
|
+
* Decode a JWT without verification (for extracting claims before key lookup)
|
|
169
|
+
*
|
|
170
|
+
* Returns null if the token is malformed
|
|
171
|
+
*/
|
|
172
|
+
declare const decodeJwtUnsafe: (token: string) => {
|
|
173
|
+
header: JwtHeader;
|
|
174
|
+
payload: JwtClaims;
|
|
175
|
+
} | null;
|
|
176
|
+
/**
|
|
177
|
+
* Verify a JWT signature and claims
|
|
178
|
+
*
|
|
179
|
+
* Supports EdDSA (Ed25519) only. Throws if verification fails.
|
|
180
|
+
*/
|
|
181
|
+
declare const verifyJwt: (options: JwtVerifyOptions) => {
|
|
182
|
+
header: JwtHeader;
|
|
183
|
+
payload: JwtClaims;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Error thrown when JWT verification fails
|
|
187
|
+
*/
|
|
188
|
+
declare class JwtVerificationError extends Error {
|
|
189
|
+
constructor(message: string);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Canonically encoded a value into an IPLD dag-cbor block
|
|
194
|
+
*/
|
|
195
|
+
declare const dagCborCanonicalEncode: (value: unknown) => Promise<multiformats.BlockView<any, 113, 18, 1>>;
|
|
196
|
+
/**
|
|
197
|
+
* Parse a string CID
|
|
198
|
+
*/
|
|
199
|
+
declare const parseDagCborCID: (cid: string) => CID<unknown, number, number, multiformats.Version>;
|
|
200
|
+
/**
|
|
201
|
+
* Returns true if the canonical encoding of the two values is the same
|
|
202
|
+
*/
|
|
203
|
+
declare const isCanonicallyEqual: (data1: unknown, data2: unknown) => Promise<boolean>;
|
|
204
|
+
|
|
205
|
+
export { type JwsHeader, JwsVerificationError, type JwtClaims, type JwtCreateOptions, type JwtHeader, JwtVerificationError, type JwtVerifyOptions, type PrefixedID, base64urlDecode, base64urlEncode, createJws, createJwt, createNewEd25519Keypair, dagCborCanonicalEncode, decodeJwsUnsafe, decodeJwtUnsafe, generateId, generateIdNoPrefix, importEd25519Keypair, isCanonicallyEqual, isValidEd25519Signature, isValidId, normalizedId, parseDagCborCID, signPayloadEd25519, verifyJws, verifyJwt };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
JwsVerificationError,
|
|
3
|
+
JwtVerificationError,
|
|
4
|
+
base64urlDecode,
|
|
5
|
+
base64urlEncode,
|
|
6
|
+
createJws,
|
|
7
|
+
createJwt,
|
|
8
|
+
createNewEd25519Keypair,
|
|
9
|
+
dagCborCanonicalEncode,
|
|
10
|
+
decodeJwsUnsafe,
|
|
11
|
+
decodeJwtUnsafe,
|
|
12
|
+
generateId,
|
|
13
|
+
generateIdNoPrefix,
|
|
14
|
+
importEd25519Keypair,
|
|
15
|
+
isCanonicallyEqual,
|
|
16
|
+
isValidEd25519Signature,
|
|
17
|
+
isValidId,
|
|
18
|
+
normalizedId,
|
|
19
|
+
parseDagCborCID,
|
|
20
|
+
signPayloadEd25519,
|
|
21
|
+
verifyJws,
|
|
22
|
+
verifyJwt
|
|
23
|
+
} from "../chunk-ZXXP5W5N.js";
|
|
24
|
+
export {
|
|
25
|
+
JwsVerificationError,
|
|
26
|
+
JwtVerificationError,
|
|
27
|
+
base64urlDecode,
|
|
28
|
+
base64urlEncode,
|
|
29
|
+
createJws,
|
|
30
|
+
createJwt,
|
|
31
|
+
createNewEd25519Keypair,
|
|
32
|
+
dagCborCanonicalEncode,
|
|
33
|
+
decodeJwsUnsafe,
|
|
34
|
+
decodeJwtUnsafe,
|
|
35
|
+
generateId,
|
|
36
|
+
generateIdNoPrefix,
|
|
37
|
+
importEd25519Keypair,
|
|
38
|
+
isCanonicallyEqual,
|
|
39
|
+
isValidEd25519Signature,
|
|
40
|
+
isValidId,
|
|
41
|
+
normalizedId,
|
|
42
|
+
parseDagCborCID,
|
|
43
|
+
signPayloadEd25519,
|
|
44
|
+
verifyJws,
|
|
45
|
+
verifyJwt
|
|
46
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { JwsHeader, JwsVerificationError, JwtClaims, JwtCreateOptions, JwtHeader, JwtVerificationError, JwtVerifyOptions, PrefixedID, 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 { ContentOperation, ED25519_PRIV_MULTICODEC, ED25519_PUB_MULTICODEC, IdentityOperation, MultikeyPublicKey, Signer, VerifiedContentChain, VerifiedIdentity, decodeMultikey, deriveChainIdentifier, deriveEntityId, encodeEd25519Multikey, signContentOperation, signIdentityOperation, verifyContentChain, verifyIdentityChain } from './chain/index.js';
|
|
3
|
+
export { ChainStore, EntityOperationsParams, EntityOperationsResponse, IdentityOperationsParams, IdentityOperationsResponse, OperationEntry, PaginationParams, RegistryError, ResolveDocumentResponse, ResolveEntityResponse, ResolveIdentityResponse, ResolveOperationResponse, StoredChain, SubmitContentChainRequest, SubmitContentChainResponse, SubmitIdentityChainRequest, SubmitIdentityChainResponse, createRegistryServer } from './registry/index.js';
|
|
4
|
+
import 'multiformats';
|
|
5
|
+
import 'multiformats/cid';
|
|
6
|
+
import 'zod';
|
|
7
|
+
import 'hono/types';
|
|
8
|
+
import 'hono';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChainStore,
|
|
3
|
+
EntityOperationsParams,
|
|
4
|
+
EntityOperationsResponse,
|
|
5
|
+
IdentityOperationsParams,
|
|
6
|
+
IdentityOperationsResponse,
|
|
7
|
+
RegistryError,
|
|
8
|
+
ResolveDocumentResponse,
|
|
9
|
+
ResolveEntityResponse,
|
|
10
|
+
ResolveIdentityResponse,
|
|
11
|
+
ResolveOperationResponse,
|
|
12
|
+
SubmitContentChainRequest,
|
|
13
|
+
SubmitContentChainResponse,
|
|
14
|
+
SubmitIdentityChainRequest,
|
|
15
|
+
SubmitIdentityChainResponse,
|
|
16
|
+
createRegistryServer
|
|
17
|
+
} from "./chunk-3PB644X2.js";
|
|
18
|
+
import {
|
|
19
|
+
ContentOperation,
|
|
20
|
+
ED25519_PRIV_MULTICODEC,
|
|
21
|
+
ED25519_PUB_MULTICODEC,
|
|
22
|
+
IdentityOperation,
|
|
23
|
+
MultikeyPublicKey,
|
|
24
|
+
VerifiedIdentity,
|
|
25
|
+
decodeMultikey,
|
|
26
|
+
deriveChainIdentifier,
|
|
27
|
+
deriveEntityId,
|
|
28
|
+
encodeEd25519Multikey,
|
|
29
|
+
signContentOperation,
|
|
30
|
+
signIdentityOperation,
|
|
31
|
+
verifyContentChain,
|
|
32
|
+
verifyIdentityChain
|
|
33
|
+
} from "./chunk-LWC4PWGZ.js";
|
|
34
|
+
import {
|
|
35
|
+
JwsVerificationError,
|
|
36
|
+
JwtVerificationError,
|
|
37
|
+
base64urlDecode,
|
|
38
|
+
base64urlEncode,
|
|
39
|
+
createJws,
|
|
40
|
+
createJwt,
|
|
41
|
+
createNewEd25519Keypair,
|
|
42
|
+
dagCborCanonicalEncode,
|
|
43
|
+
decodeJwsUnsafe,
|
|
44
|
+
decodeJwtUnsafe,
|
|
45
|
+
generateId,
|
|
46
|
+
generateIdNoPrefix,
|
|
47
|
+
importEd25519Keypair,
|
|
48
|
+
isCanonicallyEqual,
|
|
49
|
+
isValidEd25519Signature,
|
|
50
|
+
isValidId,
|
|
51
|
+
normalizedId,
|
|
52
|
+
parseDagCborCID,
|
|
53
|
+
signPayloadEd25519,
|
|
54
|
+
verifyJws,
|
|
55
|
+
verifyJwt
|
|
56
|
+
} from "./chunk-ZXXP5W5N.js";
|
|
57
|
+
export {
|
|
58
|
+
ChainStore,
|
|
59
|
+
ContentOperation,
|
|
60
|
+
ED25519_PRIV_MULTICODEC,
|
|
61
|
+
ED25519_PUB_MULTICODEC,
|
|
62
|
+
EntityOperationsParams,
|
|
63
|
+
EntityOperationsResponse,
|
|
64
|
+
IdentityOperation,
|
|
65
|
+
IdentityOperationsParams,
|
|
66
|
+
IdentityOperationsResponse,
|
|
67
|
+
JwsVerificationError,
|
|
68
|
+
JwtVerificationError,
|
|
69
|
+
MultikeyPublicKey,
|
|
70
|
+
RegistryError,
|
|
71
|
+
ResolveDocumentResponse,
|
|
72
|
+
ResolveEntityResponse,
|
|
73
|
+
ResolveIdentityResponse,
|
|
74
|
+
ResolveOperationResponse,
|
|
75
|
+
SubmitContentChainRequest,
|
|
76
|
+
SubmitContentChainResponse,
|
|
77
|
+
SubmitIdentityChainRequest,
|
|
78
|
+
SubmitIdentityChainResponse,
|
|
79
|
+
VerifiedIdentity,
|
|
80
|
+
base64urlDecode,
|
|
81
|
+
base64urlEncode,
|
|
82
|
+
createJws,
|
|
83
|
+
createJwt,
|
|
84
|
+
createNewEd25519Keypair,
|
|
85
|
+
createRegistryServer,
|
|
86
|
+
dagCborCanonicalEncode,
|
|
87
|
+
decodeJwsUnsafe,
|
|
88
|
+
decodeJwtUnsafe,
|
|
89
|
+
decodeMultikey,
|
|
90
|
+
deriveChainIdentifier,
|
|
91
|
+
deriveEntityId,
|
|
92
|
+
encodeEd25519Multikey,
|
|
93
|
+
generateId,
|
|
94
|
+
generateIdNoPrefix,
|
|
95
|
+
importEd25519Keypair,
|
|
96
|
+
isCanonicallyEqual,
|
|
97
|
+
isValidEd25519Signature,
|
|
98
|
+
isValidId,
|
|
99
|
+
normalizedId,
|
|
100
|
+
parseDagCborCID,
|
|
101
|
+
signContentOperation,
|
|
102
|
+
signIdentityOperation,
|
|
103
|
+
signPayloadEd25519,
|
|
104
|
+
verifyContentChain,
|
|
105
|
+
verifyIdentityChain,
|
|
106
|
+
verifyJws,
|
|
107
|
+
verifyJwt
|
|
108
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import * as hono_types from 'hono/types';
|
|
3
|
+
import { Hono } from 'hono';
|
|
4
|
+
|
|
5
|
+
declare const OperationEntry: z.ZodObject<{
|
|
6
|
+
cid: z.ZodString;
|
|
7
|
+
jwsToken: z.ZodString;
|
|
8
|
+
createdAt: z.ZodString;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
type OperationEntry = z.infer<typeof OperationEntry>;
|
|
11
|
+
declare const PaginationParams: z.ZodObject<{
|
|
12
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
13
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type PaginationParams = z.infer<typeof PaginationParams>;
|
|
16
|
+
declare const SubmitIdentityChainRequest: z.ZodObject<{
|
|
17
|
+
chain: z.ZodArray<z.ZodString>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
type SubmitIdentityChainRequest = z.infer<typeof SubmitIdentityChainRequest>;
|
|
20
|
+
declare const SubmitIdentityChainResponse: z.ZodObject<{
|
|
21
|
+
did: z.ZodString;
|
|
22
|
+
isDeleted: z.ZodBoolean;
|
|
23
|
+
authKeys: z.ZodArray<z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
type: z.ZodLiteral<"Multikey">;
|
|
26
|
+
publicKeyMultibase: z.ZodString;
|
|
27
|
+
}, z.core.$strict>>;
|
|
28
|
+
assertKeys: z.ZodArray<z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
type: z.ZodLiteral<"Multikey">;
|
|
31
|
+
publicKeyMultibase: z.ZodString;
|
|
32
|
+
}, z.core.$strict>>;
|
|
33
|
+
controllerKeys: z.ZodArray<z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
type: z.ZodLiteral<"Multikey">;
|
|
36
|
+
publicKeyMultibase: z.ZodString;
|
|
37
|
+
}, z.core.$strict>>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
type SubmitIdentityChainResponse = z.infer<typeof SubmitIdentityChainResponse>;
|
|
40
|
+
declare const ResolveIdentityResponse: z.ZodObject<{
|
|
41
|
+
did: z.ZodString;
|
|
42
|
+
isDeleted: z.ZodBoolean;
|
|
43
|
+
authKeys: z.ZodArray<z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
type: z.ZodLiteral<"Multikey">;
|
|
46
|
+
publicKeyMultibase: z.ZodString;
|
|
47
|
+
}, z.core.$strict>>;
|
|
48
|
+
assertKeys: z.ZodArray<z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
type: z.ZodLiteral<"Multikey">;
|
|
51
|
+
publicKeyMultibase: z.ZodString;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
controllerKeys: z.ZodArray<z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
type: z.ZodLiteral<"Multikey">;
|
|
56
|
+
publicKeyMultibase: z.ZodString;
|
|
57
|
+
}, z.core.$strict>>;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
type ResolveIdentityResponse = SubmitIdentityChainResponse;
|
|
60
|
+
declare const IdentityOperationsParams: z.ZodObject<{
|
|
61
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
62
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
declare const IdentityOperationsResponse: z.ZodObject<{
|
|
65
|
+
operations: z.ZodArray<z.ZodObject<{
|
|
66
|
+
cid: z.ZodString;
|
|
67
|
+
jwsToken: z.ZodString;
|
|
68
|
+
createdAt: z.ZodString;
|
|
69
|
+
}, z.core.$strict>>;
|
|
70
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
type IdentityOperationsResponse = z.infer<typeof IdentityOperationsResponse>;
|
|
73
|
+
declare const SubmitContentChainRequest: z.ZodObject<{
|
|
74
|
+
chain: z.ZodArray<z.ZodString>;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
type SubmitContentChainRequest = z.infer<typeof SubmitContentChainRequest>;
|
|
77
|
+
declare const SubmitContentChainResponse: z.ZodObject<{
|
|
78
|
+
entityId: z.ZodString;
|
|
79
|
+
isDeleted: z.ZodBoolean;
|
|
80
|
+
currentDocumentCID: z.ZodNullable<z.ZodString>;
|
|
81
|
+
genesisCID: z.ZodString;
|
|
82
|
+
headCID: z.ZodString;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
type SubmitContentChainResponse = z.infer<typeof SubmitContentChainResponse>;
|
|
85
|
+
declare const ResolveEntityResponse: z.ZodObject<{
|
|
86
|
+
entityId: z.ZodString;
|
|
87
|
+
isDeleted: z.ZodBoolean;
|
|
88
|
+
currentDocumentCID: z.ZodNullable<z.ZodString>;
|
|
89
|
+
genesisCID: z.ZodString;
|
|
90
|
+
headCID: z.ZodString;
|
|
91
|
+
}, z.core.$strict>;
|
|
92
|
+
type ResolveEntityResponse = SubmitContentChainResponse;
|
|
93
|
+
declare const EntityOperationsParams: z.ZodObject<{
|
|
94
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
95
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
declare const EntityOperationsResponse: z.ZodObject<{
|
|
98
|
+
operations: z.ZodArray<z.ZodObject<{
|
|
99
|
+
cid: z.ZodString;
|
|
100
|
+
jwsToken: z.ZodString;
|
|
101
|
+
createdAt: z.ZodString;
|
|
102
|
+
}, z.core.$strict>>;
|
|
103
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
type EntityOperationsResponse = z.infer<typeof EntityOperationsResponse>;
|
|
106
|
+
declare const ResolveOperationResponse: z.ZodObject<{
|
|
107
|
+
cid: z.ZodString;
|
|
108
|
+
jwsToken: z.ZodString;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
type ResolveOperationResponse = z.infer<typeof ResolveOperationResponse>;
|
|
111
|
+
declare const ResolveDocumentResponse: z.ZodObject<{
|
|
112
|
+
cid: z.ZodString;
|
|
113
|
+
content: z.ZodUnknown;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
|
+
type ResolveDocumentResponse = z.infer<typeof ResolveDocumentResponse>;
|
|
116
|
+
declare const RegistryError: z.ZodObject<{
|
|
117
|
+
error: z.ZodString;
|
|
118
|
+
message: z.ZodString;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
type RegistryError = z.infer<typeof RegistryError>;
|
|
121
|
+
|
|
122
|
+
interface StoredChain {
|
|
123
|
+
/** Ordered array of operations, genesis first */
|
|
124
|
+
operations: OperationEntry[];
|
|
125
|
+
}
|
|
126
|
+
declare class ChainStore {
|
|
127
|
+
private identities;
|
|
128
|
+
private entities;
|
|
129
|
+
private documents;
|
|
130
|
+
getIdentityChain(did: string): StoredChain | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* Submit an identity chain. Returns 'accepted' | 'noop' | 'conflict'.
|
|
133
|
+
* - accepted: chain was stored or extended
|
|
134
|
+
* - noop: submitted chain is same as or prefix of stored chain
|
|
135
|
+
* - conflict: submitted chain diverges from stored chain (fork)
|
|
136
|
+
*/
|
|
137
|
+
submitIdentityChain(did: string, operations: OperationEntry[]): 'accepted' | 'noop' | 'conflict';
|
|
138
|
+
getEntityChain(entityId: string): StoredChain | undefined;
|
|
139
|
+
submitEntityChain(entityId: string, operations: OperationEntry[]): 'accepted' | 'noop' | 'conflict';
|
|
140
|
+
getDocument(cid: string): unknown | undefined;
|
|
141
|
+
setDocument(cid: string, content: unknown): void;
|
|
142
|
+
getOperation(cid: string): OperationEntry | undefined;
|
|
143
|
+
private submitChain;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare const createRegistryServer: (store?: ChainStore) => {
|
|
147
|
+
app: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">;
|
|
148
|
+
store: ChainStore;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export { ChainStore, EntityOperationsParams, EntityOperationsResponse, IdentityOperationsParams, IdentityOperationsResponse, OperationEntry, PaginationParams, RegistryError, ResolveDocumentResponse, ResolveEntityResponse, ResolveIdentityResponse, ResolveOperationResponse, type StoredChain, SubmitContentChainRequest, SubmitContentChainResponse, SubmitIdentityChainRequest, SubmitIdentityChainResponse, createRegistryServer };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChainStore,
|
|
3
|
+
EntityOperationsParams,
|
|
4
|
+
EntityOperationsResponse,
|
|
5
|
+
IdentityOperationsParams,
|
|
6
|
+
IdentityOperationsResponse,
|
|
7
|
+
RegistryError,
|
|
8
|
+
ResolveDocumentResponse,
|
|
9
|
+
ResolveEntityResponse,
|
|
10
|
+
ResolveIdentityResponse,
|
|
11
|
+
ResolveOperationResponse,
|
|
12
|
+
SubmitContentChainRequest,
|
|
13
|
+
SubmitContentChainResponse,
|
|
14
|
+
SubmitIdentityChainRequest,
|
|
15
|
+
SubmitIdentityChainResponse,
|
|
16
|
+
createRegistryServer
|
|
17
|
+
} from "../chunk-3PB644X2.js";
|
|
18
|
+
import "../chunk-LWC4PWGZ.js";
|
|
19
|
+
import "../chunk-ZXXP5W5N.js";
|
|
20
|
+
export {
|
|
21
|
+
ChainStore,
|
|
22
|
+
EntityOperationsParams,
|
|
23
|
+
EntityOperationsResponse,
|
|
24
|
+
IdentityOperationsParams,
|
|
25
|
+
IdentityOperationsResponse,
|
|
26
|
+
RegistryError,
|
|
27
|
+
ResolveDocumentResponse,
|
|
28
|
+
ResolveEntityResponse,
|
|
29
|
+
ResolveIdentityResponse,
|
|
30
|
+
ResolveOperationResponse,
|
|
31
|
+
SubmitContentChainRequest,
|
|
32
|
+
SubmitContentChainResponse,
|
|
33
|
+
SubmitIdentityChainRequest,
|
|
34
|
+
SubmitIdentityChainResponse,
|
|
35
|
+
createRegistryServer
|
|
36
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Content chain: create + delete",
|
|
3
|
+
"type": "content",
|
|
4
|
+
"chain": [
|
|
5
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNvbnRlbnQtb3AiLCJraWQiOiJkaWQ6ZGZvczplM3Z2dGNrNDJkNGVhY2RuenZ0cm42I2tleV9lejlhODc0dGNrcjNkdjkzM2QzY2tkIiwiY2lkIjoiYmFmeXJlaWE1ejd6eGtuYWU1ZHM3MmV1aWh1ZjJyZzNpeGw2dDRmYnpqZWZoY29nZzNucXBweW9ncXUifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiY3JlYXRlIiwiZG9jdW1lbnRDSUQiOiJiYWZ5cmVpZnB2d3Vhcm1sNjJzZm9nZHBpMnZsbHR2ZzJldjZvNHh0dzc0emZ1ZDdjcGtnNzQyNnpuZSIsImNyZWF0ZWRBdCI6IjIwMjYtMDMtMDdUMDA6MDI6MDAuMDAwWiIsIm5vdGUiOm51bGx9.t_DDkJ_TmNekIGUFO22G-W78QoE4XTg9LKQ4gzAQHaK3B6491Tir9b-wtp-hcwmENu2Hqnieqv5ASiqfFrEbDw",
|
|
6
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNvbnRlbnQtb3AiLCJraWQiOiJkaWQ6ZGZvczplM3Z2dGNrNDJkNGVhY2RuenZ0cm42I2tleV9lejlhODc0dGNrcjNkdjkzM2QzY2tkIiwiY2lkIjoiYmFmeXJlaWVwamFzN3JzdHV5aWI0eDY0NHYyeXJxN3c3MmV0dG5xcWozbzdhcmRhcWN1NnVzZml6b3kifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiZGVsZXRlIiwicHJldmlvdXNPcGVyYXRpb25DSUQiOiJiYWZ5cmVpYTV6N3p4a25hZTVkczcyZXVpaHVmMnJnM2l4bDZ0NGZiemplZmhjb2dnM25xcHB5b2dxdSIsImNyZWF0ZWRBdCI6IjIwMjYtMDMtMDdUMDA6MDM6MDAuMDAwWiIsIm5vdGUiOiJyZW1vdmluZyBjb250ZW50In0.VkfUjFIz40nBOMzCTtoO1nhExzQHB4QX9PIOe2MmDwC-nilMStTwdiRcxRskPRg0gw8eM5Mz9hNQ8dZfCJ9JAg"
|
|
7
|
+
],
|
|
8
|
+
"signerPublicKey": "z6MkfUd65JrAhfdgFuMCccU9ThQvjB2fJAMUHkuuajF992gK",
|
|
9
|
+
"documents": [
|
|
10
|
+
{
|
|
11
|
+
"content": {
|
|
12
|
+
"$schema": "https://schemas.dfos.com/post/v1",
|
|
13
|
+
"format": "short-post",
|
|
14
|
+
"title": "Hello World",
|
|
15
|
+
"body": "First post on the protocol."
|
|
16
|
+
},
|
|
17
|
+
"baseDocumentCID": null,
|
|
18
|
+
"createdByDID": "did:dfos:e3vvtck42d4eacdnzvtrn6",
|
|
19
|
+
"createdAt": "2026-03-07T00:02:00.000Z"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"expected": {
|
|
23
|
+
"entityId": "67t27rzc83v7c22n9t6z7c",
|
|
24
|
+
"isDeleted": true,
|
|
25
|
+
"currentDocumentCID": null,
|
|
26
|
+
"length": 2
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Content chain: create + update (with both documents)",
|
|
3
|
+
"type": "content",
|
|
4
|
+
"chain": [
|
|
5
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNvbnRlbnQtb3AiLCJraWQiOiJkaWQ6ZGZvczplM3Z2dGNrNDJkNGVhY2RuenZ0cm42I2tleV9lejlhODc0dGNrcjNkdjkzM2QzY2tkIiwiY2lkIjoiYmFmeXJlaWE1ejd6eGtuYWU1ZHM3MmV1aWh1ZjJyZzNpeGw2dDRmYnpqZWZoY29nZzNucXBweW9ncXUifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiY3JlYXRlIiwiZG9jdW1lbnRDSUQiOiJiYWZ5cmVpZnB2d3Vhcm1sNjJzZm9nZHBpMnZsbHR2ZzJldjZvNHh0dzc0emZ1ZDdjcGtnNzQyNnpuZSIsImNyZWF0ZWRBdCI6IjIwMjYtMDMtMDdUMDA6MDI6MDAuMDAwWiIsIm5vdGUiOm51bGx9.t_DDkJ_TmNekIGUFO22G-W78QoE4XTg9LKQ4gzAQHaK3B6491Tir9b-wtp-hcwmENu2Hqnieqv5ASiqfFrEbDw",
|
|
6
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmNvbnRlbnQtb3AiLCJraWQiOiJkaWQ6ZGZvczplM3Z2dGNrNDJkNGVhY2RuenZ0cm42I2tleV9lejlhODc0dGNrcjNkdjkzM2QzY2tkIiwiY2lkIjoiYmFmeXJlaWJiNGxzdnFtejRqNzZyc3Zoa3F3M3YyYjR2cDIzdDdkaW1tNnZsNWc1d2xuaW52a2VteHEifQ.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoidXBkYXRlIiwicHJldmlvdXNPcGVyYXRpb25DSUQiOiJiYWZ5cmVpYTV6N3p4a25hZTVkczcyZXVpaHVmMnJnM2l4bDZ0NGZiemplZmhjb2dnM25xcHB5b2dxdSIsImRvY3VtZW50Q0lEIjoiYmFmeXJlaWV1bzI2emZtanh3cG13NWprNmJxenFodml2eGNiY2tneHR5ZXVjN3lwZjNwNHNpaGdxNHEiLCJjcmVhdGVkQXQiOiIyMDI2LTAzLTA3VDAwOjAzOjAwLjAwMFoiLCJub3RlIjoiZWRpdGVkIHRpdGxlIGFuZCBib2R5In0.v2BnXflq3lAiDqCpCuAoXUURY1scOGb9AMHHfCMxj1bD0GJOgdV_klv7KfqDLlSfF3Sn6CK1RDeLniF_UTKXAQ"
|
|
7
|
+
],
|
|
8
|
+
"signerPublicKey": "z6MkfUd65JrAhfdgFuMCccU9ThQvjB2fJAMUHkuuajF992gK",
|
|
9
|
+
"documents": [
|
|
10
|
+
{
|
|
11
|
+
"content": {
|
|
12
|
+
"$schema": "https://schemas.dfos.com/post/v1",
|
|
13
|
+
"format": "short-post",
|
|
14
|
+
"title": "Hello World",
|
|
15
|
+
"body": "First post on the protocol."
|
|
16
|
+
},
|
|
17
|
+
"baseDocumentCID": null,
|
|
18
|
+
"createdByDID": "did:dfos:e3vvtck42d4eacdnzvtrn6",
|
|
19
|
+
"createdAt": "2026-03-07T00:02:00.000Z"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"content": {
|
|
23
|
+
"$schema": "https://schemas.dfos.com/post/v1",
|
|
24
|
+
"format": "short-post",
|
|
25
|
+
"title": "Hello World (edited)",
|
|
26
|
+
"body": "Updated content."
|
|
27
|
+
},
|
|
28
|
+
"baseDocumentCID": "bafyreifpvwuarml62sfogdpi2vlltvg2ev6o4xtw74zfud7cpkg7426zne",
|
|
29
|
+
"createdByDID": "did:dfos:e3vvtck42d4eacdnzvtrn6",
|
|
30
|
+
"createdAt": "2026-03-07T00:03:00.000Z"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"expected": {
|
|
34
|
+
"entityId": "67t27rzc83v7c22n9t6z7c",
|
|
35
|
+
"isDeleted": false,
|
|
36
|
+
"currentDocumentCID": "bafyreieuo26zfmjxwpmw5jk6bqzqhvivxcbckgxtyeuc7ypf3p4sihgq4q",
|
|
37
|
+
"length": 2
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Identity chain: genesis + delete (terminal)",
|
|
3
|
+
"type": "identity",
|
|
4
|
+
"chain": [
|
|
5
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmlkZW50aXR5LW9wIiwia2lkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgiLCJjaWQiOiJiYWZ5cmVpYmFuanBnY3FmZmNmaHI0c3B0empmdGhoNXN6b2hoYm81dGpmdWxlbWt3N3VoZGVuNXVxeSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiY3JlYXRlIiwiYXV0aEtleXMiOlt7ImlkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgiLCJ0eXBlIjoiTXVsdGlrZXkiLCJwdWJsaWNLZXlNdWx0aWJhc2UiOiJ6Nk1rcnpMTU53b0pTVjRQM1ljY1djYnRrOHZkOUx0Z01LbkxlYURMVXFMdUFTamIifV0sImFzc2VydEtleXMiOlt7ImlkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgiLCJ0eXBlIjoiTXVsdGlrZXkiLCJwdWJsaWNLZXlNdWx0aWJhc2UiOiJ6Nk1rcnpMTU53b0pTVjRQM1ljY1djYnRrOHZkOUx0Z01LbkxlYURMVXFMdUFTamIifV0sImNvbnRyb2xsZXJLZXlzIjpbeyJpZCI6ImtleV9yOWV2MzRmdmMyM3o5OTl2ZWFhZnQ4IiwidHlwZSI6Ik11bHRpa2V5IiwicHVibGljS2V5TXVsdGliYXNlIjoiejZNa3J6TE1Od29KU1Y0UDNZY2NXY2J0azh2ZDlMdGdNS25MZWFETFVxTHVBU2piIn1dLCJjcmVhdGVkQXQiOiIyMDI2LTAzLTA3VDAwOjAwOjAwLjAwMFoifQ.EDryDK1uvtix-17cHun9t6MacFIx2rMmMF1QLzfD5TFlSsOvMcue97pCgGn3CXeLVFtVxgpCoh0kGSXioKKzAw",
|
|
6
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmlkZW50aXR5LW9wIiwia2lkIjoiZGlkOmRmb3M6ZTN2dnRjazQyZDRlYWNkbnp2dHJuNiNrZXlfcjlldjM0ZnZjMjN6OTk5dmVhYWZ0OCIsImNpZCI6ImJhZnlyZWloZ214ZmlnY2JvZjQ2czRrcGtteXhicXJ3dGxybmE0b2NibmxybzNzN29wanljYW15b3g0In0.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiZGVsZXRlIiwicHJldmlvdXNPcGVyYXRpb25DSUQiOiJiYWZ5cmVpYmFuanBnY3FmZmNmaHI0c3B0empmdGhoNXN6b2hoYm81dGpmdWxlbWt3N3VoZGVuNXVxeSIsImNyZWF0ZWRBdCI6IjIwMjYtMDMtMDdUMDA6MDE6MDAuMDAwWiJ9.l3X4ojfmfSd2N2tcLL4LlQbP2iaNrsxrgJ-1Wh2T3xNeZ77jgoWYIN6NHI-oYfi9GnwHBPKsOPKoBOoEFUPlAw"
|
|
7
|
+
],
|
|
8
|
+
"expected": {
|
|
9
|
+
"did": "did:dfos:e3vvtck42d4eacdnzvtrn6",
|
|
10
|
+
"isDeleted": true,
|
|
11
|
+
"controllerKeys": [
|
|
12
|
+
{
|
|
13
|
+
"id": "key_r9ev34fvc23z999veaaft8",
|
|
14
|
+
"type": "Multikey",
|
|
15
|
+
"publicKeyMultibase": "z6MkrzLMNwoJSV4P3YccWcbtk8vd9LtgMKnLeaDLUqLuASjb"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Identity chain: genesis (single create operation)",
|
|
3
|
+
"type": "identity",
|
|
4
|
+
"chain": [
|
|
5
|
+
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRpZDpkZm9zOmlkZW50aXR5LW9wIiwia2lkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgiLCJjaWQiOiJiYWZ5cmVpYmFuanBnY3FmZmNmaHI0c3B0empmdGhoNXN6b2hoYm81dGpmdWxlbWt3N3VoZGVuNXVxeSJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiY3JlYXRlIiwiYXV0aEtleXMiOlt7ImlkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgiLCJ0eXBlIjoiTXVsdGlrZXkiLCJwdWJsaWNLZXlNdWx0aWJhc2UiOiJ6Nk1rcnpMTU53b0pTVjRQM1ljY1djYnRrOHZkOUx0Z01LbkxlYURMVXFMdUFTamIifV0sImFzc2VydEtleXMiOlt7ImlkIjoia2V5X3I5ZXYzNGZ2YzIzejk5OXZlYWFmdDgiLCJ0eXBlIjoiTXVsdGlrZXkiLCJwdWJsaWNLZXlNdWx0aWJhc2UiOiJ6Nk1rcnpMTU53b0pTVjRQM1ljY1djYnRrOHZkOUx0Z01LbkxlYURMVXFMdUFTamIifV0sImNvbnRyb2xsZXJLZXlzIjpbeyJpZCI6ImtleV9yOWV2MzRmdmMyM3o5OTl2ZWFhZnQ4IiwidHlwZSI6Ik11bHRpa2V5IiwicHVibGljS2V5TXVsdGliYXNlIjoiejZNa3J6TE1Od29KU1Y0UDNZY2NXY2J0azh2ZDlMdGdNS25MZWFETFVxTHVBU2piIn1dLCJjcmVhdGVkQXQiOiIyMDI2LTAzLTA3VDAwOjAwOjAwLjAwMFoifQ.EDryDK1uvtix-17cHun9t6MacFIx2rMmMF1QLzfD5TFlSsOvMcue97pCgGn3CXeLVFtVxgpCoh0kGSXioKKzAw"
|
|
6
|
+
],
|
|
7
|
+
"expected": {
|
|
8
|
+
"did": "did:dfos:e3vvtck42d4eacdnzvtrn6",
|
|
9
|
+
"isDeleted": false,
|
|
10
|
+
"controllerKeys": [
|
|
11
|
+
{
|
|
12
|
+
"id": "key_r9ev34fvc23z999veaaft8",
|
|
13
|
+
"type": "Multikey",
|
|
14
|
+
"publicKeyMultibase": "z6MkrzLMNwoJSV4P3YccWcbtk8vd9LtgMKnLeaDLUqLuASjb"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|