@kya-os/mcp-i 0.1.0-alpha.3.9 → 1.2.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 +350 -213
- package/dist/149.js +1 -0
- package/dist/189.js +1 -0
- package/dist/261.js +1 -0
- package/dist/28.js +1 -0
- package/dist/295.js +1 -0
- package/dist/460.js +1 -0
- package/dist/570.js +1 -0
- package/dist/634.js +1 -0
- package/dist/647.js +1 -0
- package/dist/67.js +1 -0
- package/dist/739.js +1 -0
- package/dist/742.js +1 -0
- package/dist/904.js +1 -0
- package/dist/938.js +1 -0
- package/dist/auth/api-key.d.ts +16 -0
- package/dist/auth/api-key.js +82 -0
- package/dist/auth/jwt.d.ts +43 -0
- package/dist/auth/jwt.js +51 -0
- package/dist/auth/oauth/factory.d.ts +12 -0
- package/dist/auth/oauth/factory.js +36 -0
- package/dist/auth/oauth/index.d.ts +5 -0
- package/dist/auth/oauth/index.js +27 -0
- package/dist/auth/oauth/providers/proxy-provider.d.ts +13 -0
- package/dist/auth/oauth/providers/proxy-provider.js +159 -0
- package/dist/auth/oauth/router.d.ts +4 -0
- package/dist/auth/oauth/router.js +294 -0
- package/dist/auth/oauth/storage/memory-storage.d.ts +12 -0
- package/dist/auth/oauth/storage/memory-storage.js +40 -0
- package/dist/auth/oauth/types.d.ts +112 -0
- package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.js +176 -0
- package/dist/cache/__tests__/concurrency.test.d.ts +5 -0
- package/dist/cache/__tests__/concurrency.test.js +300 -0
- package/dist/cache/__tests__/dynamodb-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/dynamodb-nonce-cache.test.js +176 -0
- package/dist/cache/__tests__/memory-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/memory-nonce-cache.test.js +132 -0
- package/dist/cache/__tests__/nonce-cache-factory-simple.test.d.ts +4 -0
- package/dist/cache/__tests__/nonce-cache-factory-simple.test.js +133 -0
- package/dist/cache/__tests__/nonce-cache-factory.test.d.ts +4 -0
- package/dist/cache/__tests__/nonce-cache-factory.test.js +252 -0
- package/dist/cache/__tests__/redis-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/redis-nonce-cache.test.js +95 -0
- package/dist/cache/cloudflare-kv-nonce-cache.d.ts +14 -0
- package/dist/cache/cloudflare-kv-nonce-cache.js +93 -0
- package/dist/cache/dynamodb-nonce-cache.d.ts +15 -0
- package/dist/cache/dynamodb-nonce-cache.js +92 -0
- package/dist/cache/index.d.ts +16 -0
- package/dist/cache/index.js +32 -0
- package/dist/cache/memory-nonce-cache.d.ts +44 -0
- package/dist/cache/memory-nonce-cache.js +105 -0
- package/dist/cache/nonce-cache-factory.d.ts +20 -0
- package/dist/cache/nonce-cache-factory.js +208 -0
- package/dist/cache/redis-nonce-cache.d.ts +14 -0
- package/dist/cache/redis-nonce-cache.js +53 -0
- package/dist/compiler/compiler-context.d.ts +23 -0
- package/dist/compiler/compiler-context.js +24 -0
- package/dist/compiler/config/constants.d.ts +41 -0
- package/dist/compiler/config/constants.js +45 -0
- package/dist/compiler/config/index.d.ts +252 -0
- package/dist/compiler/config/index.js +15 -0
- package/dist/compiler/config/injection.d.ts +26 -0
- package/dist/compiler/config/injection.js +58 -0
- package/dist/compiler/config/schemas/experimental/index.d.ts +91 -0
- package/dist/compiler/config/schemas/experimental/index.js +16 -0
- package/dist/compiler/config/schemas/experimental/oauth.d.ts +74 -0
- package/dist/compiler/config/schemas/experimental/oauth.js +25 -0
- package/dist/compiler/config/schemas/index.d.ts +6 -0
- package/dist/compiler/config/schemas/index.js +17 -0
- package/dist/compiler/config/schemas/paths.d.ts +9 -0
- package/dist/compiler/config/schemas/paths.js +12 -0
- package/dist/compiler/config/schemas/transport/http.d.ts +82 -0
- package/dist/compiler/config/schemas/transport/http.js +33 -0
- package/dist/compiler/config/schemas/transport/stdio.d.ts +9 -0
- package/dist/compiler/config/schemas/transport/stdio.js +15 -0
- package/dist/compiler/config/schemas/webpack.d.ts +3 -0
- package/dist/compiler/config/schemas/webpack.js +15 -0
- package/dist/compiler/config/types.d.ts +1 -0
- package/dist/compiler/config/types.js +2 -0
- package/dist/compiler/config/utils.d.ts +20 -0
- package/dist/compiler/config/utils.js +36 -0
- package/dist/compiler/generate-env-code.d.ts +1 -0
- package/dist/compiler/generate-env-code.js +8 -0
- package/dist/compiler/generate-import-code.d.ts +1 -0
- package/dist/compiler/generate-import-code.js +24 -0
- package/dist/compiler/get-webpack-config/get-entries.d.ts +3 -0
- package/dist/compiler/get-webpack-config/get-entries.js +29 -0
- package/dist/compiler/get-webpack-config/get-externals.d.ts +7 -0
- package/dist/compiler/get-webpack-config/get-externals.js +88 -0
- package/dist/compiler/get-webpack-config/get-injected-variables.d.ts +8 -0
- package/dist/compiler/get-webpack-config/get-injected-variables.js +25 -0
- package/dist/compiler/get-webpack-config/index.d.ts +4 -0
- package/dist/compiler/get-webpack-config/index.js +101 -0
- package/dist/compiler/get-webpack-config/plugins.d.ts +8 -0
- package/dist/compiler/get-webpack-config/plugins.js +132 -0
- package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.d.ts +9 -0
- package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.js +40 -0
- package/dist/compiler/index.d.ts +6 -0
- package/dist/compiler/index.js +194 -0
- package/dist/compiler/on-first-build.d.ts +3 -0
- package/dist/compiler/on-first-build.js +58 -0
- package/dist/compiler/parse-xmcp-config.d.ts +9 -0
- package/dist/compiler/parse-xmcp-config.js +155 -0
- package/dist/compiler/start-http-server.d.ts +1 -0
- package/dist/compiler/start-http-server.js +34 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +38 -0
- package/dist/index.js.LICENSE.txt +49 -0
- package/dist/runtime/__tests__/audit.test.d.ts +4 -0
- package/dist/runtime/__tests__/audit.test.js +328 -0
- package/dist/runtime/__tests__/identity.test.d.ts +4 -0
- package/dist/runtime/__tests__/identity.test.js +164 -0
- package/dist/runtime/__tests__/mcpi-runtime.test.d.ts +4 -0
- package/dist/runtime/__tests__/mcpi-runtime.test.js +372 -0
- package/dist/runtime/__tests__/proof.test.d.ts +4 -0
- package/dist/runtime/__tests__/proof.test.js +302 -0
- package/dist/runtime/__tests__/session.test.d.ts +4 -0
- package/dist/runtime/__tests__/session.test.js +254 -0
- package/dist/runtime/__tests__/well-known.test.d.ts +4 -0
- package/dist/runtime/__tests__/well-known.test.js +312 -0
- package/dist/runtime/adapter-express.js +2 -0
- package/dist/runtime/adapter-express.js.LICENSE.txt +252 -0
- package/dist/runtime/adapter-nextjs.js +2 -0
- package/dist/runtime/adapter-nextjs.js.LICENSE.txt +53 -0
- package/dist/runtime/adapters/express/index.d.ts +2 -0
- package/dist/runtime/adapters/express/index.js +48 -0
- package/dist/runtime/adapters/nextjs/index.d.ts +8 -0
- package/dist/runtime/adapters/nextjs/index.js +18 -0
- package/dist/runtime/audit.d.ts +93 -0
- package/dist/runtime/audit.js +212 -0
- package/dist/runtime/debug.d.ts +118 -0
- package/dist/runtime/debug.js +612 -0
- package/dist/runtime/delegation-hooks.d.ts +85 -0
- package/dist/runtime/delegation-hooks.js +116 -0
- package/dist/runtime/demo.d.ts +71 -0
- package/dist/runtime/demo.js +135 -0
- package/dist/runtime/headers.d.ts +1 -0
- package/dist/runtime/headers.js +9 -0
- package/dist/runtime/http.js +2 -0
- package/dist/runtime/http.js.LICENSE.txt +252 -0
- package/dist/runtime/identity.d.ts +105 -0
- package/dist/runtime/identity.js +232 -0
- package/dist/runtime/index.d.ts +16 -0
- package/dist/runtime/index.js +56 -0
- package/dist/runtime/mcpi-runtime.d.ts +164 -0
- package/dist/runtime/mcpi-runtime.js +352 -0
- package/dist/runtime/proof.d.ts +87 -0
- package/dist/runtime/proof.js +223 -0
- package/dist/runtime/session.d.ts +88 -0
- package/dist/runtime/session.js +216 -0
- package/dist/runtime/stdio.js +2 -0
- package/dist/runtime/stdio.js.LICENSE.txt +1 -0
- package/dist/runtime/templates/home.d.ts +2 -0
- package/dist/runtime/templates/home.js +50 -0
- package/dist/runtime/transports/http/base-streamable-http.d.ts +25 -0
- package/dist/runtime/transports/http/base-streamable-http.js +16 -0
- package/dist/runtime/transports/http/http-context.d.ts +9 -0
- package/dist/runtime/transports/http/http-context.js +8 -0
- package/dist/runtime/transports/http/index.js +55 -0
- package/dist/runtime/transports/http/setup-cors.d.ts +4 -0
- package/dist/runtime/transports/http/setup-cors.js +24 -0
- package/dist/runtime/transports/http/stateless-streamable-http.d.ts +39 -0
- package/dist/runtime/transports/http/stateless-streamable-http.js +331 -0
- package/dist/runtime/transports/stdio/index.d.ts +1 -0
- package/dist/runtime/transports/stdio/index.js +51 -0
- package/dist/runtime/utils/server.d.ts +42 -0
- package/dist/runtime/utils/server.js +39 -0
- package/dist/runtime/utils/tools.d.ts +8 -0
- package/dist/runtime/utils/tools.js +115 -0
- package/dist/runtime/verifier-middleware.d.ts +76 -0
- package/dist/runtime/verifier-middleware.js +322 -0
- package/dist/runtime/well-known.d.ts +151 -0
- package/dist/runtime/well-known.js +258 -0
- package/dist/storage/config.d.ts +28 -0
- package/dist/storage/config.js +79 -0
- package/dist/storage/delegation.d.ts +59 -0
- package/dist/storage/delegation.js +130 -0
- package/dist/storage/merkle-verifier.d.ts +84 -0
- package/dist/storage/merkle-verifier.js +261 -0
- package/dist/test/__tests__/nonce-cache-integration.test.d.ts +1 -0
- package/dist/test/__tests__/nonce-cache-integration.test.js +116 -0
- package/dist/test/__tests__/nonce-cache.test.d.ts +1 -0
- package/dist/test/__tests__/nonce-cache.test.js +122 -0
- package/dist/test/__tests__/runtime-integration.test.d.ts +4 -0
- package/dist/test/__tests__/runtime-integration.test.js +192 -0
- package/dist/test/__tests__/test-infrastructure.test.d.ts +4 -0
- package/dist/test/__tests__/test-infrastructure.test.js +178 -0
- package/dist/test/deterministic-keys.d.ts +31 -0
- package/dist/test/deterministic-keys.js +108 -0
- package/dist/test/examples/test-usage-example.d.ts +140 -0
- package/dist/test/examples/test-usage-example.js +175 -0
- package/dist/test/index.d.ts +11 -0
- package/dist/test/index.js +27 -0
- package/dist/test/local-verification.d.ts +28 -0
- package/dist/test/local-verification.js +342 -0
- package/dist/test/mock-identity-provider.d.ts +96 -0
- package/dist/test/mock-identity-provider.js +243 -0
- package/dist/test/runtime-integration.d.ts +63 -0
- package/dist/test/runtime-integration.js +140 -0
- package/dist/test/test-environment.d.ts +26 -0
- package/dist/test/test-environment.js +50 -0
- package/dist/types/declarations.d.ts +1 -0
- package/dist/types/declarations.js +6 -0
- package/dist/types/middleware.d.ts +2 -0
- package/dist/types/middleware.js +2 -0
- package/dist/types/tool.d.ts +80 -0
- package/dist/types/tool.js +2 -0
- package/dist/utils/cli-icons.d.ts +3 -0
- package/dist/utils/cli-icons.js +7 -0
- package/dist/utils/constants.d.ts +6 -0
- package/dist/utils/constants.js +13 -0
- package/dist/utils/context.d.ts +33 -0
- package/dist/utils/context.js +58 -0
- package/dist/utils/file-watcher.d.ts +19 -0
- package/dist/utils/file-watcher.js +49 -0
- package/dist/utils/fs-utils.d.ts +2 -0
- package/dist/utils/fs-utils.js +22 -0
- package/dist/utils/path-validation.d.ts +3 -0
- package/dist/utils/path-validation.js +56 -0
- package/dist/utils/spawn-process.d.ts +9 -0
- package/dist/utils/spawn-process.js +50 -0
- package/dist/utils/subscribable.d.ts +12 -0
- package/dist/utils/subscribable.js +44 -0
- package/package.json +91 -77
- package/dist/cjs/auto.js +0 -16
- package/dist/cjs/cli-mode.d.ts +0 -16
- package/dist/cjs/cli-mode.js +0 -32
- package/dist/cjs/crypto.d.ts +0 -16
- package/dist/cjs/crypto.js +0 -212
- package/dist/cjs/dev-helper.d.ts +0 -3
- package/dist/cjs/dev-helper.js +0 -46
- package/dist/cjs/encrypted-storage.d.ts +0 -11
- package/dist/cjs/encrypted-storage.js +0 -73
- package/dist/cjs/index.d.ts +0 -56
- package/dist/cjs/index.js +0 -727
- package/dist/cjs/logger.d.ts +0 -32
- package/dist/cjs/logger.js +0 -85
- package/dist/cjs/nextjs.d.ts +0 -10
- package/dist/cjs/nextjs.js +0 -83
- package/dist/cjs/platform-info.d.ts +0 -36
- package/dist/cjs/platform-info.js +0 -274
- package/dist/cjs/polling.d.ts +0 -13
- package/dist/cjs/polling.js +0 -52
- package/dist/cjs/registry/index.d.ts +0 -12
- package/dist/cjs/registry/index.js +0 -56
- package/dist/cjs/registry/knowthat.d.ts +0 -17
- package/dist/cjs/registry/knowthat.js +0 -173
- package/dist/cjs/rotation.d.ts +0 -35
- package/dist/cjs/rotation.js +0 -102
- package/dist/cjs/storage.d.ts +0 -41
- package/dist/cjs/storage.js +0 -163
- package/dist/cjs/transport.d.ts +0 -35
- package/dist/cjs/transport.js +0 -300
- package/dist/cjs/types.d.ts +0 -206
- package/dist/cjs/vercel-adapter.d.ts +0 -8
- package/dist/cjs/vercel-adapter.js +0 -67
- package/dist/esm/auto.d.ts +0 -13
- package/dist/esm/auto.d.ts.map +0 -1
- package/dist/esm/auto.js +0 -30
- package/dist/esm/auto.js.map +0 -1
- package/dist/esm/cli-mode.d.ts +0 -52
- package/dist/esm/cli-mode.d.ts.map +0 -1
- package/dist/esm/cli-mode.js +0 -59
- package/dist/esm/cli-mode.js.map +0 -1
- package/dist/esm/crypto.d.ts +0 -51
- package/dist/esm/crypto.d.ts.map +0 -1
- package/dist/esm/crypto.js +0 -230
- package/dist/esm/crypto.js.map +0 -1
- package/dist/esm/dev-helper.d.ts +0 -15
- package/dist/esm/dev-helper.d.ts.map +0 -1
- package/dist/esm/dev-helper.js +0 -63
- package/dist/esm/dev-helper.js.map +0 -1
- package/dist/esm/encrypted-storage.d.ts +0 -19
- package/dist/esm/encrypted-storage.d.ts.map +0 -1
- package/dist/esm/encrypted-storage.js +0 -48
- package/dist/esm/encrypted-storage.js.map +0 -1
- package/dist/esm/index.d.ts +0 -129
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -853
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/logger.d.ts +0 -46
- package/dist/esm/logger.d.ts.map +0 -1
- package/dist/esm/logger.js +0 -100
- package/dist/esm/logger.js.map +0 -1
- package/dist/esm/nextjs.d.ts +0 -22
- package/dist/esm/nextjs.d.ts.map +0 -1
- package/dist/esm/nextjs.js +0 -83
- package/dist/esm/nextjs.js.map +0 -1
- package/dist/esm/package.json +0 -1
- package/dist/esm/platform-info.d.ts +0 -74
- package/dist/esm/platform-info.d.ts.map +0 -1
- package/dist/esm/platform-info.js +0 -293
- package/dist/esm/platform-info.js.map +0 -1
- package/dist/esm/polling.d.ts +0 -29
- package/dist/esm/polling.d.ts.map +0 -1
- package/dist/esm/polling.js +0 -76
- package/dist/esm/polling.js.map +0 -1
- package/dist/esm/registry/index.d.ts +0 -43
- package/dist/esm/registry/index.d.ts.map +0 -1
- package/dist/esm/registry/index.js +0 -89
- package/dist/esm/registry/index.js.map +0 -1
- package/dist/esm/registry/knowthat.d.ts +0 -44
- package/dist/esm/registry/knowthat.d.ts.map +0 -1
- package/dist/esm/registry/knowthat.js +0 -220
- package/dist/esm/registry/knowthat.js.map +0 -1
- package/dist/esm/rotation.d.ts +0 -57
- package/dist/esm/rotation.d.ts.map +0 -1
- package/dist/esm/rotation.js +0 -133
- package/dist/esm/rotation.js.map +0 -1
- package/dist/esm/storage.d.ts +0 -65
- package/dist/esm/storage.d.ts.map +0 -1
- package/dist/esm/storage.js +0 -160
- package/dist/esm/storage.js.map +0 -1
- package/dist/esm/transport.d.ts +0 -52
- package/dist/esm/transport.d.ts.map +0 -1
- package/dist/esm/transport.js +0 -340
- package/dist/esm/transport.js.map +0 -1
- package/dist/esm/types.d.ts +0 -293
- package/dist/esm/types.d.ts.map +0 -1
- package/dist/esm/types.js +0 -5
- package/dist/esm/types.js.map +0 -1
- package/dist/esm/vercel-adapter.d.ts +0 -26
- package/dist/esm/vercel-adapter.d.ts.map +0 -1
- package/dist/esm/vercel-adapter.js +0 -80
- package/dist/esm/vercel-adapter.js.map +0 -1
- /package/dist/{cjs → auth/oauth}/types.js +0 -0
- /package/dist/{cjs/auto.d.ts → runtime/transports/http/index.d.ts} +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Well-Known Endpoints for XMCP-I Runtime
|
|
3
|
+
*
|
|
4
|
+
* Handles /.well-known/did.json and /.well-known/agent.json endpoints
|
|
5
|
+
* according to requirements 7.1, 7.2, 7.3, 7.4, 7.5.
|
|
6
|
+
*/
|
|
7
|
+
import { AgentIdentity } from "./identity";
|
|
8
|
+
/**
|
|
9
|
+
* DID Document structure (W3C DID Core specification)
|
|
10
|
+
*/
|
|
11
|
+
export interface DIDDocument {
|
|
12
|
+
"@context": string[];
|
|
13
|
+
id: string;
|
|
14
|
+
verificationMethod: VerificationMethod[];
|
|
15
|
+
authentication: string[];
|
|
16
|
+
assertionMethod: string[];
|
|
17
|
+
keyAgreement?: string[];
|
|
18
|
+
capabilityInvocation?: string[];
|
|
19
|
+
capabilityDelegation?: string[];
|
|
20
|
+
service?: ServiceEndpoint[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Verification Method for DID Document
|
|
24
|
+
*/
|
|
25
|
+
export interface VerificationMethod {
|
|
26
|
+
id: string;
|
|
27
|
+
type: string;
|
|
28
|
+
controller: string;
|
|
29
|
+
publicKeyMultibase?: string;
|
|
30
|
+
publicKeyJwk?: any;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Service Endpoint for DID Document
|
|
34
|
+
*/
|
|
35
|
+
export interface ServiceEndpoint {
|
|
36
|
+
id: string;
|
|
37
|
+
type: string;
|
|
38
|
+
serviceEndpoint: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Agent Document structure (XMCP-I specific)
|
|
42
|
+
*/
|
|
43
|
+
export interface AgentDocument {
|
|
44
|
+
id: string;
|
|
45
|
+
capabilities: {
|
|
46
|
+
"mcp-i": ["handshake", "signing", "verification"];
|
|
47
|
+
};
|
|
48
|
+
registry?: {
|
|
49
|
+
kta?: string;
|
|
50
|
+
mcp?: string;
|
|
51
|
+
};
|
|
52
|
+
metadata?: {
|
|
53
|
+
name?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
version?: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Well-known endpoint configuration
|
|
60
|
+
*/
|
|
61
|
+
export interface WellKnownConfig {
|
|
62
|
+
environment: "development" | "production";
|
|
63
|
+
baseUrl?: string;
|
|
64
|
+
agentMetadata?: {
|
|
65
|
+
name?: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
version?: string;
|
|
68
|
+
};
|
|
69
|
+
registryUrls?: {
|
|
70
|
+
kta?: string;
|
|
71
|
+
mcp?: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Well-known endpoints manager
|
|
76
|
+
*/
|
|
77
|
+
export declare class WellKnownManager {
|
|
78
|
+
private identity;
|
|
79
|
+
private config;
|
|
80
|
+
constructor(identity: AgentIdentity, config: WellKnownConfig);
|
|
81
|
+
/**
|
|
82
|
+
* Generate DID document for /.well-known/did.json
|
|
83
|
+
* Requirements: 7.1, 7.5
|
|
84
|
+
*/
|
|
85
|
+
generateDIDDocument(): DIDDocument;
|
|
86
|
+
/**
|
|
87
|
+
* Generate agent document for /.well-known/agent.json
|
|
88
|
+
* Requirements: 7.2, 7.3
|
|
89
|
+
*/
|
|
90
|
+
generateAgentDocument(): AgentDocument;
|
|
91
|
+
/**
|
|
92
|
+
* Get HTTP headers for DID document
|
|
93
|
+
* Requirements: 7.4, 7.5
|
|
94
|
+
*/
|
|
95
|
+
getDIDDocumentHeaders(): Record<string, string>;
|
|
96
|
+
/**
|
|
97
|
+
* Get HTTP headers for agent document
|
|
98
|
+
* Requirements: 7.2, 7.5
|
|
99
|
+
*/
|
|
100
|
+
getAgentDocumentHeaders(): Record<string, string>;
|
|
101
|
+
/**
|
|
102
|
+
* Encode public key as multibase (base58btc with 'z' prefix for Ed25519)
|
|
103
|
+
*/
|
|
104
|
+
private encodePublicKeyMultibase;
|
|
105
|
+
/**
|
|
106
|
+
* Simple base58 encoding (use proper library in production)
|
|
107
|
+
*/
|
|
108
|
+
private encodeBase58;
|
|
109
|
+
/**
|
|
110
|
+
* Update configuration
|
|
111
|
+
*/
|
|
112
|
+
updateConfig(config: Partial<WellKnownConfig>): void;
|
|
113
|
+
/**
|
|
114
|
+
* Get current configuration
|
|
115
|
+
*/
|
|
116
|
+
getConfig(): WellKnownConfig;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Express/HTTP handler for well-known endpoints
|
|
120
|
+
*/
|
|
121
|
+
export interface WellKnownHandler {
|
|
122
|
+
handleDIDDocument(): {
|
|
123
|
+
status: number;
|
|
124
|
+
headers: Record<string, string>;
|
|
125
|
+
body: string;
|
|
126
|
+
};
|
|
127
|
+
handleAgentDocument(): {
|
|
128
|
+
status: number;
|
|
129
|
+
headers: Record<string, string>;
|
|
130
|
+
body: string;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Create well-known endpoint handler
|
|
135
|
+
*/
|
|
136
|
+
export declare function createWellKnownHandler(identity: AgentIdentity, config: WellKnownConfig): WellKnownHandler;
|
|
137
|
+
/**
|
|
138
|
+
* Utility functions
|
|
139
|
+
*/
|
|
140
|
+
/**
|
|
141
|
+
* Validate DID document structure
|
|
142
|
+
*/
|
|
143
|
+
export declare function validateDIDDocument(doc: any): doc is DIDDocument;
|
|
144
|
+
/**
|
|
145
|
+
* Validate agent document structure
|
|
146
|
+
*/
|
|
147
|
+
export declare function validateAgentDocument(doc: any): doc is AgentDocument;
|
|
148
|
+
/**
|
|
149
|
+
* Extract DID from URL path (for did:web resolution)
|
|
150
|
+
*/
|
|
151
|
+
export declare function extractDIDFromPath(path: string, baseUrl: string): string | null;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Well-Known Endpoints for XMCP-I Runtime
|
|
4
|
+
*
|
|
5
|
+
* Handles /.well-known/did.json and /.well-known/agent.json endpoints
|
|
6
|
+
* according to requirements 7.1, 7.2, 7.3, 7.4, 7.5.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.WellKnownManager = void 0;
|
|
10
|
+
exports.createWellKnownHandler = createWellKnownHandler;
|
|
11
|
+
exports.validateDIDDocument = validateDIDDocument;
|
|
12
|
+
exports.validateAgentDocument = validateAgentDocument;
|
|
13
|
+
exports.extractDIDFromPath = extractDIDFromPath;
|
|
14
|
+
/**
|
|
15
|
+
* Well-known endpoints manager
|
|
16
|
+
*/
|
|
17
|
+
class WellKnownManager {
|
|
18
|
+
identity;
|
|
19
|
+
config;
|
|
20
|
+
constructor(identity, config) {
|
|
21
|
+
this.identity = identity;
|
|
22
|
+
this.config = config;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Generate DID document for /.well-known/did.json
|
|
26
|
+
* Requirements: 7.1, 7.5
|
|
27
|
+
*/
|
|
28
|
+
generateDIDDocument() {
|
|
29
|
+
const keyId = `#${this.identity.keyId}`;
|
|
30
|
+
// Convert base64 public key to multibase format
|
|
31
|
+
const publicKeyMultibase = this.encodePublicKeyMultibase(this.identity.publicKey);
|
|
32
|
+
const didDocument = {
|
|
33
|
+
"@context": [
|
|
34
|
+
"https://www.w3.org/ns/did/v1",
|
|
35
|
+
"https://w3id.org/security/suites/ed25519-2020/v1",
|
|
36
|
+
],
|
|
37
|
+
id: this.identity.did,
|
|
38
|
+
verificationMethod: [
|
|
39
|
+
{
|
|
40
|
+
id: keyId,
|
|
41
|
+
type: "Ed25519VerificationKey2020",
|
|
42
|
+
controller: this.identity.did,
|
|
43
|
+
publicKeyMultibase,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
authentication: [keyId],
|
|
47
|
+
assertionMethod: [keyId],
|
|
48
|
+
};
|
|
49
|
+
return didDocument;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Generate agent document for /.well-known/agent.json
|
|
53
|
+
* Requirements: 7.2, 7.3
|
|
54
|
+
*/
|
|
55
|
+
generateAgentDocument() {
|
|
56
|
+
const agentDocument = {
|
|
57
|
+
id: this.identity.did,
|
|
58
|
+
capabilities: {
|
|
59
|
+
"mcp-i": ["handshake", "signing", "verification"], // Exact capability triplet
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
// Add registry URLs if configured
|
|
63
|
+
if (this.config.registryUrls) {
|
|
64
|
+
agentDocument.registry = { ...this.config.registryUrls };
|
|
65
|
+
}
|
|
66
|
+
// Add metadata if configured
|
|
67
|
+
if (this.config.agentMetadata) {
|
|
68
|
+
agentDocument.metadata = { ...this.config.agentMetadata };
|
|
69
|
+
}
|
|
70
|
+
return agentDocument;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get HTTP headers for DID document
|
|
74
|
+
* Requirements: 7.4, 7.5
|
|
75
|
+
*/
|
|
76
|
+
getDIDDocumentHeaders() {
|
|
77
|
+
const headers = {
|
|
78
|
+
"Content-Type": "application/did+json",
|
|
79
|
+
};
|
|
80
|
+
// Add caching headers based on environment
|
|
81
|
+
if (this.config.environment === "production") {
|
|
82
|
+
headers["Cache-Control"] = "public, max-age=300"; // 5 minutes
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
headers["Cache-Control"] = "no-store";
|
|
86
|
+
}
|
|
87
|
+
return headers;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get HTTP headers for agent document
|
|
91
|
+
* Requirements: 7.2, 7.5
|
|
92
|
+
*/
|
|
93
|
+
getAgentDocumentHeaders() {
|
|
94
|
+
const headers = {
|
|
95
|
+
"Content-Type": "application/json",
|
|
96
|
+
};
|
|
97
|
+
// Always no-store for agent document in dev, public cache in prod
|
|
98
|
+
if (this.config.environment === "production") {
|
|
99
|
+
headers["Cache-Control"] = "public, max-age=300"; // 5 minutes
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
headers["Cache-Control"] = "no-store";
|
|
103
|
+
}
|
|
104
|
+
return headers;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Encode public key as multibase (base58btc with 'z' prefix for Ed25519)
|
|
108
|
+
*/
|
|
109
|
+
encodePublicKeyMultibase(base64PublicKey) {
|
|
110
|
+
// For Ed25519, we use base58btc encoding with 'z' prefix
|
|
111
|
+
// This is a simplified implementation - in production, use proper multibase library
|
|
112
|
+
const publicKeyBytes = Buffer.from(base64PublicKey, "base64");
|
|
113
|
+
// Ed25519 public key prefix (0xed01) + key bytes
|
|
114
|
+
const prefixedKey = Buffer.concat([
|
|
115
|
+
Buffer.from([0xed, 0x01]), // Ed25519 multicodec prefix
|
|
116
|
+
publicKeyBytes,
|
|
117
|
+
]);
|
|
118
|
+
// Convert to base58btc (simplified - use proper base58 library in production)
|
|
119
|
+
const base58 = this.encodeBase58(prefixedKey);
|
|
120
|
+
return `z${base58}`; // 'z' prefix indicates base58btc
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Simple base58 encoding (use proper library in production)
|
|
124
|
+
*/
|
|
125
|
+
encodeBase58(buffer) {
|
|
126
|
+
const alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
127
|
+
let num = BigInt("0x" + buffer.toString("hex"));
|
|
128
|
+
let result = "";
|
|
129
|
+
while (num > 0) {
|
|
130
|
+
const remainder = num % 58n;
|
|
131
|
+
result = alphabet[Number(remainder)] + result;
|
|
132
|
+
num = num / 58n;
|
|
133
|
+
}
|
|
134
|
+
// Handle leading zeros
|
|
135
|
+
for (let i = 0; i < buffer.length && buffer[i] === 0; i++) {
|
|
136
|
+
result = "1" + result;
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Update configuration
|
|
142
|
+
*/
|
|
143
|
+
updateConfig(config) {
|
|
144
|
+
this.config = { ...this.config, ...config };
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Get current configuration
|
|
148
|
+
*/
|
|
149
|
+
getConfig() {
|
|
150
|
+
return { ...this.config };
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
exports.WellKnownManager = WellKnownManager;
|
|
154
|
+
/**
|
|
155
|
+
* Create well-known endpoint handler
|
|
156
|
+
*/
|
|
157
|
+
function createWellKnownHandler(identity, config) {
|
|
158
|
+
const manager = new WellKnownManager(identity, config);
|
|
159
|
+
return {
|
|
160
|
+
handleDIDDocument() {
|
|
161
|
+
try {
|
|
162
|
+
const didDocument = manager.generateDIDDocument();
|
|
163
|
+
const headers = manager.getDIDDocumentHeaders();
|
|
164
|
+
return {
|
|
165
|
+
status: 200,
|
|
166
|
+
headers,
|
|
167
|
+
body: JSON.stringify(didDocument, null, 2),
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
return {
|
|
172
|
+
status: 500,
|
|
173
|
+
headers: { "Content-Type": "application/json" },
|
|
174
|
+
body: JSON.stringify({
|
|
175
|
+
error: "Failed to generate DID document",
|
|
176
|
+
message: error instanceof Error ? error.message : "Unknown error",
|
|
177
|
+
}),
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
handleAgentDocument() {
|
|
182
|
+
try {
|
|
183
|
+
const agentDocument = manager.generateAgentDocument();
|
|
184
|
+
const headers = manager.getAgentDocumentHeaders();
|
|
185
|
+
return {
|
|
186
|
+
status: 200,
|
|
187
|
+
headers,
|
|
188
|
+
body: JSON.stringify(agentDocument, null, 2),
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
return {
|
|
193
|
+
status: 500,
|
|
194
|
+
headers: { "Content-Type": "application/json" },
|
|
195
|
+
body: JSON.stringify({
|
|
196
|
+
error: "Failed to generate agent document",
|
|
197
|
+
message: error instanceof Error ? error.message : "Unknown error",
|
|
198
|
+
}),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Utility functions
|
|
206
|
+
*/
|
|
207
|
+
/**
|
|
208
|
+
* Validate DID document structure
|
|
209
|
+
*/
|
|
210
|
+
function validateDIDDocument(doc) {
|
|
211
|
+
return (typeof doc === "object" &&
|
|
212
|
+
doc !== null &&
|
|
213
|
+
Array.isArray(doc["@context"]) &&
|
|
214
|
+
typeof doc.id === "string" &&
|
|
215
|
+
doc.id.startsWith("did:") &&
|
|
216
|
+
Array.isArray(doc.verificationMethod) &&
|
|
217
|
+
Array.isArray(doc.authentication) &&
|
|
218
|
+
Array.isArray(doc.assertionMethod));
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Validate agent document structure
|
|
222
|
+
*/
|
|
223
|
+
function validateAgentDocument(doc) {
|
|
224
|
+
return (typeof doc === "object" &&
|
|
225
|
+
doc !== null &&
|
|
226
|
+
typeof doc.id === "string" &&
|
|
227
|
+
doc.id.startsWith("did:") &&
|
|
228
|
+
typeof doc.capabilities === "object" &&
|
|
229
|
+
Array.isArray(doc.capabilities["mcp-i"]) &&
|
|
230
|
+
doc.capabilities["mcp-i"].length === 3 &&
|
|
231
|
+
doc.capabilities["mcp-i"].includes("handshake") &&
|
|
232
|
+
doc.capabilities["mcp-i"].includes("signing") &&
|
|
233
|
+
doc.capabilities["mcp-i"].includes("verification"));
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Extract DID from URL path (for did:web resolution)
|
|
237
|
+
*/
|
|
238
|
+
function extractDIDFromPath(path, baseUrl) {
|
|
239
|
+
try {
|
|
240
|
+
// For did:web, the DID is constructed from the domain and path
|
|
241
|
+
// Example: /.well-known/did.json -> did:web:example.com
|
|
242
|
+
// Example: /agents/my-agent/.well-known/did.json -> did:web:example.com:agents:my-agent
|
|
243
|
+
const url = new URL(baseUrl);
|
|
244
|
+
const domain = url.hostname;
|
|
245
|
+
// Remove /.well-known/did.json from path
|
|
246
|
+
const cleanPath = path.replace("/.well-known/did.json", "");
|
|
247
|
+
if (cleanPath === "") {
|
|
248
|
+
return `did:web:${domain}`;
|
|
249
|
+
}
|
|
250
|
+
// Convert path segments to DID path components
|
|
251
|
+
const pathComponents = cleanPath.split("/").filter(Boolean);
|
|
252
|
+
const didPath = pathComponents.join(":");
|
|
253
|
+
return `did:web:${domain}:${didPath}`;
|
|
254
|
+
}
|
|
255
|
+
catch {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StorageMode, StorageConfig } from "@kya-os/contracts/registry";
|
|
2
|
+
/**
|
|
3
|
+
* Storage configuration utilities for XMCP-I
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Detects and validates the storage mode from environment variables
|
|
7
|
+
*/
|
|
8
|
+
export declare function detectStorageMode(): StorageMode;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a complete storage configuration with defaults
|
|
11
|
+
*/
|
|
12
|
+
export declare function createStorageConfig(overrides?: Partial<StorageConfig>): StorageConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Validates storage mode configuration
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateStorageMode(mode: string): mode is StorageMode;
|
|
17
|
+
/**
|
|
18
|
+
* Gets storage mode description for logging/debugging
|
|
19
|
+
*/
|
|
20
|
+
export declare function getStorageModeDescription(mode: StorageMode): string;
|
|
21
|
+
/**
|
|
22
|
+
* Determines if encryption is required for the given storage mode
|
|
23
|
+
*/
|
|
24
|
+
export declare function isEncryptionRequired(mode: StorageMode): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Determines if receipt verification is available for the given storage mode
|
|
27
|
+
*/
|
|
28
|
+
export declare function isReceiptVerificationAvailable(_mode: StorageMode): boolean;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectStorageMode = detectStorageMode;
|
|
4
|
+
exports.createStorageConfig = createStorageConfig;
|
|
5
|
+
exports.validateStorageMode = validateStorageMode;
|
|
6
|
+
exports.getStorageModeDescription = getStorageModeDescription;
|
|
7
|
+
exports.isEncryptionRequired = isEncryptionRequired;
|
|
8
|
+
exports.isReceiptVerificationAvailable = isReceiptVerificationAvailable;
|
|
9
|
+
const registry_1 = require("@kya-os/contracts/registry");
|
|
10
|
+
/**
|
|
11
|
+
* Storage configuration utilities for XMCP-I
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Detects and validates the storage mode from environment variables
|
|
15
|
+
*/
|
|
16
|
+
function detectStorageMode() {
|
|
17
|
+
const envValue = process.env[registry_1.STORAGE_MODE_ENV_VAR];
|
|
18
|
+
if (!envValue) {
|
|
19
|
+
return registry_1.DEFAULT_STORAGE_MODE;
|
|
20
|
+
}
|
|
21
|
+
const result = registry_1.StorageModeSchema.safeParse(envValue);
|
|
22
|
+
if (!result.success) {
|
|
23
|
+
console.warn(`Invalid ${registry_1.STORAGE_MODE_ENV_VAR}="${envValue}". Valid values: ktaEncrypted, hybridReceiptsOnly, selfHostedAuthoritative. Using default: ${registry_1.DEFAULT_STORAGE_MODE}`);
|
|
24
|
+
return registry_1.DEFAULT_STORAGE_MODE;
|
|
25
|
+
}
|
|
26
|
+
return result.data;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates a complete storage configuration with defaults
|
|
30
|
+
*/
|
|
31
|
+
function createStorageConfig(overrides) {
|
|
32
|
+
const mode = detectStorageMode();
|
|
33
|
+
const config = {
|
|
34
|
+
mode,
|
|
35
|
+
encryptionEnabled: mode === "ktaEncrypted",
|
|
36
|
+
receiptVerificationEnabled: true,
|
|
37
|
+
ktaBaseURL: "https://knowthat.ai",
|
|
38
|
+
...overrides,
|
|
39
|
+
};
|
|
40
|
+
const result = registry_1.StorageConfigSchema.safeParse(config);
|
|
41
|
+
if (!result.success) {
|
|
42
|
+
throw new Error(`Invalid storage configuration: ${result.error.message}`);
|
|
43
|
+
}
|
|
44
|
+
return result.data;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Validates storage mode configuration
|
|
48
|
+
*/
|
|
49
|
+
function validateStorageMode(mode) {
|
|
50
|
+
return registry_1.StorageModeSchema.safeParse(mode).success;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Gets storage mode description for logging/debugging
|
|
54
|
+
*/
|
|
55
|
+
function getStorageModeDescription(mode) {
|
|
56
|
+
switch (mode) {
|
|
57
|
+
case "ktaEncrypted":
|
|
58
|
+
return "KTA stores encrypted credential/delegation objects";
|
|
59
|
+
case "hybridReceiptsOnly":
|
|
60
|
+
return "KTA stores receipts only; objects stored by issuer/recipient";
|
|
61
|
+
case "selfHostedAuthoritative":
|
|
62
|
+
return "Customer stores object + log; KTA mirrors receipt/pointer";
|
|
63
|
+
default:
|
|
64
|
+
return "Unknown storage mode";
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Determines if encryption is required for the given storage mode
|
|
69
|
+
*/
|
|
70
|
+
function isEncryptionRequired(mode) {
|
|
71
|
+
return mode === "ktaEncrypted";
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Determines if receipt verification is available for the given storage mode
|
|
75
|
+
*/
|
|
76
|
+
function isReceiptVerificationAvailable(_mode) {
|
|
77
|
+
// All modes support receipt verification
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Delegation, DelegationRequest, DelegationResponse, Receipt, StorageConfig } from "@kya-os/contracts/registry";
|
|
2
|
+
/**
|
|
3
|
+
* Delegation management for XMCP-I runtime
|
|
4
|
+
*/
|
|
5
|
+
export interface DelegationManager {
|
|
6
|
+
/**
|
|
7
|
+
* Issue a new delegation
|
|
8
|
+
*/
|
|
9
|
+
issue(request: DelegationRequest): Promise<DelegationResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Revoke an existing delegation
|
|
12
|
+
*/
|
|
13
|
+
revoke(delegationRef: string): Promise<Receipt>;
|
|
14
|
+
/**
|
|
15
|
+
* Check if a delegation is active
|
|
16
|
+
*/
|
|
17
|
+
isActive(delegationRef: string): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Get delegation details
|
|
20
|
+
*/
|
|
21
|
+
get(delegationRef: string): Promise<Delegation | null>;
|
|
22
|
+
/**
|
|
23
|
+
* List active delegations for a subject
|
|
24
|
+
*/
|
|
25
|
+
listBySubject(subject: string): Promise<Delegation[]>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Default delegation manager implementation
|
|
29
|
+
*/
|
|
30
|
+
export declare class DefaultDelegationManager implements DelegationManager {
|
|
31
|
+
private config;
|
|
32
|
+
constructor(config?: Partial<StorageConfig>);
|
|
33
|
+
issue(request: DelegationRequest): Promise<DelegationResponse>;
|
|
34
|
+
revoke(_delegationRef: string): Promise<Receipt>;
|
|
35
|
+
isActive(delegationRef: string): Promise<boolean>;
|
|
36
|
+
get(delegationRef: string): Promise<Delegation | null>;
|
|
37
|
+
listBySubject(_subject: string): Promise<Delegation[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Encrypt delegation payload for audience
|
|
40
|
+
*/
|
|
41
|
+
private encryptDelegation;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Create delegation manager instance
|
|
45
|
+
*/
|
|
46
|
+
export declare function createDelegationManager(config?: Partial<StorageConfig>): DelegationManager;
|
|
47
|
+
/**
|
|
48
|
+
* Delegation context for runtime use
|
|
49
|
+
*/
|
|
50
|
+
export interface DelegationContext {
|
|
51
|
+
delegationRef?: string;
|
|
52
|
+
scopes: string[];
|
|
53
|
+
audience?: string;
|
|
54
|
+
expiresAt: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Extract delegation context from proof metadata
|
|
58
|
+
*/
|
|
59
|
+
export declare function extractDelegationContext(delegationRef?: string): DelegationContext | null;
|