attestix 0.4.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.
@@ -0,0 +1,580 @@
1
+ interface AttestixOptions {
2
+ /** Base URL of the Attestix API server */
3
+ baseUrl: string;
4
+ /** API key for authentication */
5
+ apiKey: string;
6
+ /** Request timeout in milliseconds (default: 30000) */
7
+ timeout?: number;
8
+ }
9
+ interface Identity {
10
+ agent_id: string;
11
+ name: string;
12
+ type: string;
13
+ did?: string;
14
+ capabilities?: string[];
15
+ metadata?: Record<string, unknown>;
16
+ status: string;
17
+ created_at: string;
18
+ updated_at: string;
19
+ }
20
+ interface CreateIdentityParams {
21
+ name: string;
22
+ type: string;
23
+ capabilities?: string[];
24
+ metadata?: Record<string, unknown>;
25
+ }
26
+ interface ListIdentitiesParams {
27
+ skip?: number;
28
+ limit?: number;
29
+ type?: string;
30
+ status?: string;
31
+ }
32
+ interface PurgeResult {
33
+ agent_id: string;
34
+ deleted_counts: Record<string, number>;
35
+ message: string;
36
+ }
37
+ interface Credential {
38
+ credential_id: string;
39
+ issuer: string;
40
+ subject: string;
41
+ type: string;
42
+ claims: Record<string, unknown>;
43
+ status: string;
44
+ issued_at: string;
45
+ expires_at?: string;
46
+ revoked_at?: string;
47
+ revocation_reason?: string;
48
+ }
49
+ interface IssueCredentialParams {
50
+ issuer: string;
51
+ subject: string;
52
+ type: string;
53
+ claims: Record<string, unknown>;
54
+ expires_in_days?: number;
55
+ }
56
+ interface ListCredentialsParams {
57
+ skip?: number;
58
+ limit?: number;
59
+ issuer?: string;
60
+ subject?: string;
61
+ type?: string;
62
+ status?: string;
63
+ }
64
+ interface Presentation {
65
+ presentation_id: string;
66
+ holder: string;
67
+ credential_ids: string[];
68
+ verifiable_credentials: Record<string, unknown>[];
69
+ created_at: string;
70
+ }
71
+ interface CreatePresentationParams {
72
+ holder: string;
73
+ credential_ids: string[];
74
+ }
75
+ interface ComplianceProfile {
76
+ profile_id: string;
77
+ name: string;
78
+ framework: string;
79
+ requirements: ComplianceRequirement[];
80
+ agent_id?: string;
81
+ status: string;
82
+ created_at: string;
83
+ updated_at: string;
84
+ }
85
+ interface ComplianceRequirement {
86
+ requirement_id: string;
87
+ name: string;
88
+ description: string;
89
+ category: string;
90
+ status: string;
91
+ }
92
+ interface CreateComplianceProfileParams {
93
+ name: string;
94
+ framework: string;
95
+ agent_id?: string;
96
+ requirements?: ComplianceRequirement[];
97
+ }
98
+ interface ComplianceStatus {
99
+ profile_id: string;
100
+ overall_status: string;
101
+ completion_percentage: number;
102
+ requirements_met: number;
103
+ requirements_total: number;
104
+ last_assessed: string;
105
+ }
106
+ interface Assessment {
107
+ assessment_id: string;
108
+ profile_id: string;
109
+ requirement_id: string;
110
+ status: string;
111
+ evidence?: string;
112
+ assessed_at: string;
113
+ assessed_by: string;
114
+ }
115
+ interface RecordAssessmentParams {
116
+ profile_id: string;
117
+ requirement_id: string;
118
+ status: string;
119
+ evidence?: string;
120
+ assessed_by: string;
121
+ }
122
+ interface Declaration {
123
+ declaration_id: string;
124
+ profile_id: string;
125
+ framework: string;
126
+ content: string;
127
+ generated_at: string;
128
+ }
129
+ interface GenerateDeclarationParams {
130
+ profile_id: string;
131
+ format?: string;
132
+ }
133
+ interface ReputationScore {
134
+ agent_id: string;
135
+ overall_score: number;
136
+ interaction_count: number;
137
+ positive_count: number;
138
+ negative_count: number;
139
+ categories?: Record<string, number>;
140
+ last_updated: string;
141
+ }
142
+ interface RecordInteractionParams {
143
+ agent_id: string;
144
+ counterparty_id: string;
145
+ interaction_type: string;
146
+ outcome: string;
147
+ score?: number;
148
+ metadata?: Record<string, unknown>;
149
+ }
150
+ interface QueryReputationParams {
151
+ min_score?: number;
152
+ max_score?: number;
153
+ min_interactions?: number;
154
+ skip?: number;
155
+ limit?: number;
156
+ }
157
+ interface ProvenanceEntry {
158
+ entry_id: string;
159
+ agent_id: string;
160
+ type: string;
161
+ data: Record<string, unknown>;
162
+ recorded_at: string;
163
+ }
164
+ interface RecordTrainingDataParams {
165
+ agent_id: string;
166
+ dataset_name: string;
167
+ dataset_version: string;
168
+ source: string;
169
+ license?: string;
170
+ metadata?: Record<string, unknown>;
171
+ }
172
+ interface RecordModelLineageParams {
173
+ agent_id: string;
174
+ model_name: string;
175
+ model_version: string;
176
+ parent_model?: string;
177
+ training_data_ids?: string[];
178
+ metadata?: Record<string, unknown>;
179
+ }
180
+ interface AuditEntry {
181
+ entry_id: string;
182
+ agent_id: string;
183
+ action: string;
184
+ details: Record<string, unknown>;
185
+ timestamp: string;
186
+ anchor_id?: string;
187
+ }
188
+ interface LogActionParams {
189
+ agent_id: string;
190
+ action: string;
191
+ details: Record<string, unknown>;
192
+ }
193
+ interface AuditTrailParams {
194
+ agent_id?: string;
195
+ action?: string;
196
+ start_time?: string;
197
+ end_time?: string;
198
+ skip?: number;
199
+ limit?: number;
200
+ }
201
+ interface Delegation {
202
+ delegation_id: string;
203
+ delegator: string;
204
+ delegate: string;
205
+ scope: string[];
206
+ constraints?: Record<string, unknown>;
207
+ token: string;
208
+ status: string;
209
+ created_at: string;
210
+ expires_at?: string;
211
+ }
212
+ interface CreateDelegationParams {
213
+ delegator: string;
214
+ delegate: string;
215
+ scope: string[];
216
+ constraints?: Record<string, unknown>;
217
+ expires_in_hours?: number;
218
+ }
219
+ interface ListDelegationsParams {
220
+ delegator?: string;
221
+ delegate?: string;
222
+ status?: string;
223
+ skip?: number;
224
+ limit?: number;
225
+ }
226
+ interface DIDDocument {
227
+ id: string;
228
+ type: string;
229
+ controller?: string;
230
+ verification_method?: VerificationMethod[];
231
+ authentication?: string[];
232
+ assertion_method?: string[];
233
+ created: string;
234
+ }
235
+ interface VerificationMethod {
236
+ id: string;
237
+ type: string;
238
+ controller: string;
239
+ public_key_multibase?: string;
240
+ public_key_jwk?: Record<string, unknown>;
241
+ }
242
+ interface AnchorReceipt {
243
+ anchor_id: string;
244
+ type: string;
245
+ target_id: string;
246
+ chain: string;
247
+ transaction_hash?: string;
248
+ block_number?: number;
249
+ status: string;
250
+ anchored_at: string;
251
+ }
252
+ interface AnchorVerification {
253
+ anchor_id: string;
254
+ verified: boolean;
255
+ chain: string;
256
+ transaction_hash?: string;
257
+ block_number?: number;
258
+ data_integrity: boolean;
259
+ verified_at: string;
260
+ }
261
+ interface CostEstimate {
262
+ chain: string;
263
+ estimated_gas: number;
264
+ estimated_cost_usd: number;
265
+ currency: string;
266
+ }
267
+ interface VerificationResult {
268
+ valid: boolean;
269
+ checks: VerificationCheck[];
270
+ verified_at: string;
271
+ }
272
+ interface VerificationCheck {
273
+ name: string;
274
+ passed: boolean;
275
+ message?: string;
276
+ }
277
+ interface ErrorResponse {
278
+ detail: string;
279
+ status_code: number;
280
+ }
281
+
282
+ declare class AttestixClient {
283
+ private readonly baseUrl;
284
+ private readonly apiKey;
285
+ private readonly timeout;
286
+ constructor(options: AttestixOptions);
287
+ createIdentity(params: CreateIdentityParams): Promise<Identity>;
288
+ getIdentity(agentId: string): Promise<Identity>;
289
+ listIdentities(params?: ListIdentitiesParams): Promise<Identity[]>;
290
+ verifyIdentity(agentId: string): Promise<VerificationResult>;
291
+ translateIdentity(agentId: string, format: string): Promise<Record<string, unknown>>;
292
+ revokeIdentity(agentId: string, reason?: string): Promise<Identity>;
293
+ purgeAgentData(agentId: string): Promise<PurgeResult>;
294
+ issueCredential(params: IssueCredentialParams): Promise<Credential>;
295
+ getCredential(credentialId: string): Promise<Credential>;
296
+ listCredentials(params?: ListCredentialsParams): Promise<Credential[]>;
297
+ verifyCredential(credentialId: string): Promise<VerificationResult>;
298
+ verifyExternalCredential(credential: Record<string, unknown>): Promise<VerificationResult>;
299
+ revokeCredential(credentialId: string, reason?: string): Promise<Credential>;
300
+ createPresentation(params: CreatePresentationParams): Promise<Presentation>;
301
+ createComplianceProfile(params: CreateComplianceProfileParams): Promise<ComplianceProfile>;
302
+ getComplianceProfile(profileId: string): Promise<ComplianceProfile>;
303
+ listComplianceProfiles(): Promise<ComplianceProfile[]>;
304
+ getComplianceStatus(profileId: string): Promise<ComplianceStatus>;
305
+ recordAssessment(params: RecordAssessmentParams): Promise<Assessment>;
306
+ generateDeclaration(params: GenerateDeclarationParams): Promise<Declaration>;
307
+ recordInteraction(params: RecordInteractionParams): Promise<void>;
308
+ getReputation(agentId: string): Promise<ReputationScore>;
309
+ queryReputation(params?: QueryReputationParams): Promise<ReputationScore[]>;
310
+ recordTrainingData(params: RecordTrainingDataParams): Promise<ProvenanceEntry>;
311
+ recordModelLineage(params: RecordModelLineageParams): Promise<ProvenanceEntry>;
312
+ logAction(params: LogActionParams): Promise<AuditEntry>;
313
+ getProvenance(agentId: string): Promise<ProvenanceEntry[]>;
314
+ getAuditTrail(params?: AuditTrailParams): Promise<AuditEntry[]>;
315
+ createDelegation(params: CreateDelegationParams): Promise<Delegation>;
316
+ listDelegations(params?: ListDelegationsParams): Promise<Delegation[]>;
317
+ verifyDelegation(token: string): Promise<VerificationResult>;
318
+ revokeDelegation(delegationId: string): Promise<void>;
319
+ createDidKey(): Promise<DIDDocument>;
320
+ createDidWeb(domain: string): Promise<DIDDocument>;
321
+ resolveDid(did: string): Promise<DIDDocument>;
322
+ anchorIdentity(agentId: string): Promise<AnchorReceipt>;
323
+ anchorCredential(credentialId: string): Promise<AnchorReceipt>;
324
+ anchorAuditBatch(entryIds?: string[]): Promise<AnchorReceipt>;
325
+ verifyAnchor(anchorId: string): Promise<AnchorVerification>;
326
+ getAnchorStatus(anchorId: string): Promise<AnchorReceipt>;
327
+ estimateAnchorCost(): Promise<CostEstimate>;
328
+ private request;
329
+ private requestWithRetry;
330
+ private handleErrorResponse;
331
+ private buildQuery;
332
+ private sleep;
333
+ }
334
+
335
+ /**
336
+ * Canonical JSON serialization matching the Python Attestix engine's
337
+ * `auth.crypto.canonicalize_json`.
338
+ *
339
+ * This is NOT strict RFC 8785 — it is byte-for-byte compatible with what the
340
+ * Python engine actually produces:
341
+ * json.dumps(normalize(obj), sort_keys=True, separators=(",",":"),
342
+ * ensure_ascii=False).encode("utf-8")
343
+ *
344
+ * Rules (see SPEC.md §3):
345
+ * - object keys sorted by Unicode code point (Python default string sort)
346
+ * - compact separators: "," and ":"
347
+ * - non-ASCII emitted as raw UTF-8 (NOT \uXXXX escapes)
348
+ * - every string NFC-normalized
349
+ * - whole-valued floats coerced to integers (1.0 -> 1)
350
+ * - control chars U+0000–U+001F escaped as \b \t \n \f \r or \u00xx (lowercase)
351
+ * - "/", "<", ">", "&" NOT escaped; U+007F emitted raw
352
+ *
353
+ * Numbers that would serialize differently in JS vs Python (exponential
354
+ * notation, signed zero, NaN/Infinity) are rejected up front with
355
+ * {@link JcsUnsupportedValueError} so a verifier never produces silently-wrong
356
+ * canonical bytes. These never occur in real Attestix payloads.
357
+ */
358
+ /** Thrown when a value cannot be canonicalized to match the Python engine. */
359
+ declare class JcsUnsupportedValueError extends Error {
360
+ constructor(message: string);
361
+ }
362
+ type JsonValue = string | number | boolean | null | JsonValue[] | {
363
+ [key: string]: JsonValue;
364
+ };
365
+ /**
366
+ * Serialize a JSON value to its canonical string form (matching Python).
367
+ * Use {@link canonicalize} to get the UTF-8 bytes for signing/verification.
368
+ */
369
+ declare function canonicalizeToString(value: JsonValue): string;
370
+ /**
371
+ * Produce canonical UTF-8 bytes for a JSON value, byte-identical to the Python
372
+ * engine's `canonicalize_json`.
373
+ */
374
+ declare function canonicalize(value: JsonValue): Uint8Array;
375
+
376
+ /**
377
+ * base64url decoding that accepts both the url-safe (`-_`) and standard
378
+ * (`+/`) alphabets, with or without `=` padding. The Python engine emits
379
+ * url-safe WITH padding (base64.urlsafe_b64encode); JWS emits url-safe
380
+ * WITHOUT padding. Both are accepted.
381
+ */
382
+ declare function base64urlDecode(input: string): Uint8Array;
383
+
384
+ /**
385
+ * did:key encode/decode for Ed25519 keys, matching the Python engine's
386
+ * `auth.crypto.public_key_to_did_key` / `did_key_to_public_key`.
387
+ *
388
+ * did:key:z<base58btc(0xED01 || raw_pubkey_32)>
389
+ *
390
+ * Multibase prefix: literal 'z' (base58btc). Multicodec prefix for
391
+ * ed25519-pub: bytes 0xED 0x01.
392
+ */
393
+ /** Multicodec prefix for Ed25519 public key (varint 0xed01). */
394
+ declare const ED25519_MULTICODEC_PREFIX: Uint8Array<ArrayBuffer>;
395
+ /** Encode bytes as base58btc (Bitcoin alphabet), preserving leading zeros. */
396
+ declare function base58btcEncode(bytes: Uint8Array): string;
397
+ /** Decode a base58btc string to bytes, preserving leading '1' -> 0x00. */
398
+ declare function base58btcDecode(str: string): Uint8Array;
399
+ /** Encode a raw 32-byte Ed25519 public key as a did:key identifier. */
400
+ declare function publicKeyToDidKey(rawPublicKey: Uint8Array): string;
401
+ /**
402
+ * Extract the raw 32-byte Ed25519 public key from a did:key identifier.
403
+ * Throws if the DID is not a did:key, lacks the 'z' multibase prefix, or does
404
+ * not carry the Ed25519 multicodec prefix (0xED01).
405
+ */
406
+ declare function didKeyToPublicKey(did: string): Uint8Array;
407
+ /**
408
+ * Resolve the issuer DID from a proof's verificationMethod (the part before
409
+ * '#'), matching the Python engine's `vm.split("#")[0]`.
410
+ */
411
+ declare function didFromVerificationMethod(vm: string): string;
412
+
413
+ /**
414
+ * Ed25519 signature verification (RFC 8032 / PureEdDSA), Node + browser
415
+ * compatible, backed by the audited @noble/curves implementation.
416
+ */
417
+ /**
418
+ * Verify an Ed25519 signature.
419
+ *
420
+ * @param signature 64-byte raw Ed25519 signature.
421
+ * @param message the exact bytes that were signed.
422
+ * @param publicKey 32-byte raw Ed25519 public key.
423
+ * @returns true iff the signature is valid; never throws on bad input — a
424
+ * malformed signature/key is treated as a failed verification.
425
+ */
426
+ declare function verifyEd25519(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array): boolean;
427
+
428
+ /**
429
+ * Offline verification of Attestix W3C Verifiable Credentials and Verifiable
430
+ * Presentations. Reproduces the Python engine's signing rules (see SPEC.md
431
+ * §5/§6): the signature covers the credential object with `proof` and
432
+ * `credentialStatus` removed, canonicalized via the JCS rules, verified with
433
+ * the issuer's did:key Ed25519 public key.
434
+ */
435
+ /** Per-check booleans mirroring the Python verifier's `checks` object. */
436
+ interface CredentialChecks {
437
+ structure_valid: boolean;
438
+ signature_valid: boolean;
439
+ not_expired: boolean;
440
+ /** Revocation cannot be confirmed offline; true unless embedded status says revoked. */
441
+ not_revoked: boolean;
442
+ }
443
+ interface VerifyCredentialResult {
444
+ valid: boolean;
445
+ reason?: string;
446
+ checks: CredentialChecks;
447
+ issuer?: string;
448
+ subject?: string;
449
+ type?: string[];
450
+ }
451
+ interface VerifyCredentialOptions {
452
+ /** Override "now" for expiry checks (ms epoch). Defaults to Date.now(). */
453
+ now?: number;
454
+ /** If false, skip the expirationDate check. Default true. */
455
+ checkExpiry?: boolean;
456
+ }
457
+ /**
458
+ * Verify a single VC's Ed25519 proof, structure, expiry, and embedded
459
+ * revocation status — without contacting the Attestix API.
460
+ */
461
+ declare function verifyCredential(credential: unknown, options?: VerifyCredentialOptions): VerifyCredentialResult;
462
+ interface VerifyPresentationResult {
463
+ valid: boolean;
464
+ reason?: string;
465
+ holder?: string;
466
+ vpSignatureValid: boolean;
467
+ credentialCount: number;
468
+ credentialResults: VerifyCredentialResult[];
469
+ }
470
+ /**
471
+ * Verify a Verifiable Presentation: the holder's proof (signed payload is the
472
+ * VP minus `proof` only) plus every embedded credential.
473
+ */
474
+ declare function verifyPresentation(presentation: unknown, options?: VerifyCredentialOptions): VerifyPresentationResult;
475
+
476
+ /**
477
+ * Offline verification of Attestix UCAN-style delegation chains.
478
+ *
479
+ * Delegations are EdDSA-signed JWTs (see SPEC.md §7). A token is a compact JWS:
480
+ * base64url(header) "." base64url(payload) "." base64url(signature)
481
+ * The signature is Ed25519 over the ASCII signing input
482
+ * `b64url(header).b64url(payload)`, verified with the `iss` did:key's public
483
+ * key. The proof chain lives in the `prf` claim (a list of parent JWT strings).
484
+ *
485
+ * This reproduces `DelegationService.verify_delegation` (recursive prf
486
+ * verification + cycle detection + expiry) AND the capability-attenuation rule
487
+ * that the Python engine enforces at creation time
488
+ * (`create_delegation`): a child's `att` must be a subset of every parent's
489
+ * `att`. An offline verifier re-checks attenuation because it cannot trust that
490
+ * the creation-time guard ran.
491
+ */
492
+ interface DelegationClaims {
493
+ iss: string;
494
+ aud?: string;
495
+ sub?: string;
496
+ delegator?: string;
497
+ iat?: number;
498
+ nbf?: number;
499
+ exp?: number;
500
+ jti?: string;
501
+ att: string[];
502
+ prf: string[];
503
+ typ?: string;
504
+ [key: string]: unknown;
505
+ }
506
+ interface DelegationLinkResult {
507
+ jti?: string;
508
+ issuer: string;
509
+ delegator?: string;
510
+ audience?: string;
511
+ capabilities: string[];
512
+ signatureValid: boolean;
513
+ expired: boolean;
514
+ notYetValid: boolean;
515
+ }
516
+ interface VerifyDelegationResult {
517
+ valid: boolean;
518
+ reason?: string;
519
+ /** Per-link results, leaf first (matching the order the chain is walked). */
520
+ links: DelegationLinkResult[];
521
+ /** The capabilities held by the leaf (effective granted set). */
522
+ capabilities: string[];
523
+ }
524
+ interface VerifyDelegationOptions {
525
+ /** Override "now" in unix seconds. Defaults to current time. */
526
+ now?: number;
527
+ /** Clock skew tolerance in seconds for exp/nbf. Default 0. */
528
+ clockToleranceSeconds?: number;
529
+ }
530
+ /**
531
+ * Verify a delegation token and its full proof chain.
532
+ *
533
+ * @param token Either a single leaf JWT string (its `prf` chain is walked
534
+ * internally) or an array of JWT strings ordered leaf..root. When an array
535
+ * is given, the leaf's `prf` linkage is still validated against the provided
536
+ * parents.
537
+ */
538
+ declare function verifyDelegationChain(token: string | string[], options?: VerifyDelegationOptions): VerifyDelegationResult;
539
+ /** Decode a delegation JWT's claims WITHOUT verifying the signature. */
540
+ declare function decodeDelegationUnsafe(token: string): DelegationClaims;
541
+
542
+ /**
543
+ * Base error class for all Attestix SDK errors.
544
+ */
545
+ declare class AttestixError extends Error {
546
+ readonly statusCode: number;
547
+ readonly detail: string;
548
+ constructor(message: string, statusCode: number, detail?: string);
549
+ }
550
+ /**
551
+ * Thrown when the API returns a 401 Unauthorized response.
552
+ * Indicates an invalid or missing API key.
553
+ */
554
+ declare class AttestixAuthError extends AttestixError {
555
+ constructor(detail?: string);
556
+ }
557
+ /**
558
+ * Thrown when the API returns a 404 Not Found response.
559
+ * The requested resource does not exist.
560
+ */
561
+ declare class AttestixNotFoundError extends AttestixError {
562
+ constructor(detail?: string);
563
+ }
564
+ /**
565
+ * Thrown when the API returns a 400 Bad Request response.
566
+ * The request parameters failed validation.
567
+ */
568
+ declare class AttestixValidationError extends AttestixError {
569
+ constructor(detail?: string);
570
+ }
571
+ /**
572
+ * Thrown when the API returns a 429 Too Many Requests response.
573
+ * The client has exceeded the rate limit.
574
+ */
575
+ declare class AttestixRateLimitError extends AttestixError {
576
+ readonly retryAfter: number | null;
577
+ constructor(detail?: string, retryAfter?: number);
578
+ }
579
+
580
+ export { type AnchorReceipt, type AnchorVerification, type Assessment, AttestixAuthError, AttestixClient, AttestixError, AttestixNotFoundError, type AttestixOptions, AttestixRateLimitError, AttestixValidationError, type AuditEntry, type AuditTrailParams, type ComplianceProfile, type ComplianceRequirement, type ComplianceStatus, type CostEstimate, type CreateComplianceProfileParams, type CreateDelegationParams, type CreateIdentityParams, type CreatePresentationParams, type Credential, type CredentialChecks, type DIDDocument, type Declaration, type Delegation, type DelegationClaims, type DelegationLinkResult, ED25519_MULTICODEC_PREFIX, type ErrorResponse, type GenerateDeclarationParams, type Identity, type IssueCredentialParams, JcsUnsupportedValueError, type JsonValue, type ListCredentialsParams, type ListDelegationsParams, type ListIdentitiesParams, type LogActionParams, type Presentation, type ProvenanceEntry, type PurgeResult, type QueryReputationParams, type RecordAssessmentParams, type RecordInteractionParams, type RecordModelLineageParams, type RecordTrainingDataParams, type ReputationScore, type VerificationCheck, type VerificationMethod, type VerificationResult, type VerifyCredentialOptions, type VerifyCredentialResult, type VerifyDelegationOptions, type VerifyDelegationResult, type VerifyPresentationResult, base58btcDecode, base58btcEncode, base64urlDecode, canonicalize, canonicalizeToString, decodeDelegationUnsafe, didFromVerificationMethod, didKeyToPublicKey, publicKeyToDidKey, verifyCredential, verifyDelegationChain, verifyEd25519, verifyPresentation };