@vess-id/ai-identity 0.0.0-dev-20260902121045
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 +265 -0
- package/dist/agent/agent-did-manager.d.ts +97 -0
- package/dist/agent/agent-did-manager.d.ts.map +1 -0
- package/dist/auth/auth-provider.d.ts +51 -0
- package/dist/auth/auth-provider.d.ts.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/client.d.ts +63 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/config/index.d.ts +84 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/constraint/constraint-evaluator.d.ts +103 -0
- package/dist/constraint/constraint-evaluator.d.ts.map +1 -0
- package/dist/constraint/index.d.ts +5 -0
- package/dist/constraint/index.d.ts.map +1 -0
- package/dist/did/agent.d.ts +58 -0
- package/dist/did/agent.d.ts.map +1 -0
- package/dist/did/did-utils.d.ts +82 -0
- package/dist/did/did-utils.d.ts.map +1 -0
- package/dist/did/key-manager.d.ts +19 -0
- package/dist/did/key-manager.d.ts.map +1 -0
- package/dist/gateway/gateway-client.d.ts +103 -0
- package/dist/gateway/gateway-client.d.ts.map +1 -0
- package/dist/gateway/index.d.ts +2 -0
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/grant/grant-manager.d.ts +140 -0
- package/dist/grant/grant-manager.d.ts.map +1 -0
- package/dist/grant/index.d.ts +2 -0
- package/dist/grant/index.d.ts.map +1 -0
- package/dist/identity/device-enroll-manager.d.ts +117 -0
- package/dist/identity/device-enroll-manager.d.ts.map +1 -0
- package/dist/identity/user-identity-manager.d.ts +123 -0
- package/dist/identity/user-identity-manager.d.ts.map +1 -0
- package/dist/identity/user-key-pair-manager.d.ts +22 -0
- package/dist/identity/user-key-pair-manager.d.ts.map +1 -0
- package/dist/index.d.mts +42685 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19534 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +19347 -0
- package/dist/index.mjs.map +1 -0
- package/dist/internal-signature/canonical.d.ts +80 -0
- package/dist/internal-signature/canonical.d.ts.map +1 -0
- package/dist/internal-signature/index.d.ts +17 -0
- package/dist/internal-signature/index.d.ts.map +1 -0
- package/dist/internal-signature/signer.d.ts +76 -0
- package/dist/internal-signature/signer.d.ts.map +1 -0
- package/dist/policy/cedar-engine.d.ts +334 -0
- package/dist/policy/cedar-engine.d.ts.map +1 -0
- package/dist/policy/cedar-entities.d.ts +59 -0
- package/dist/policy/cedar-entities.d.ts.map +1 -0
- package/dist/policy/decision.d.ts +46 -0
- package/dist/policy/decision.d.ts.map +1 -0
- package/dist/policy/index.d.ts +15 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/registry/access-orchestrator.d.ts +184 -0
- package/dist/registry/access-orchestrator.d.ts.map +1 -0
- package/dist/registry/action-aliases.d.ts +37 -0
- package/dist/registry/action-aliases.d.ts.map +1 -0
- package/dist/registry/action-input-validator.d.ts +19 -0
- package/dist/registry/action-input-validator.d.ts.map +1 -0
- package/dist/registry/action-normalizer.d.ts +47 -0
- package/dist/registry/action-normalizer.d.ts.map +1 -0
- package/dist/registry/action-registry-json.d.ts +35897 -0
- package/dist/registry/action-registry-json.d.ts.map +1 -0
- package/dist/registry/action-registry.d.ts +101 -0
- package/dist/registry/action-registry.d.ts.map +1 -0
- package/dist/registry/action-risk.d.ts +109 -0
- package/dist/registry/action-risk.d.ts.map +1 -0
- package/dist/registry/action-summary.d.ts +16 -0
- package/dist/registry/action-summary.d.ts.map +1 -0
- package/dist/registry/index.d.ts +14 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/providers.d.ts +32 -0
- package/dist/registry/providers.d.ts.map +1 -0
- package/dist/registry/reauth-constants.d.ts +56 -0
- package/dist/registry/reauth-constants.d.ts.map +1 -0
- package/dist/registry/resource-type-labels.d.ts +15 -0
- package/dist/registry/resource-type-labels.d.ts.map +1 -0
- package/dist/registry/resource-types.d.ts +47 -0
- package/dist/registry/resource-types.d.ts.map +1 -0
- package/dist/resolver/approval-time-resolution.d.ts +72 -0
- package/dist/resolver/approval-time-resolution.d.ts.map +1 -0
- package/dist/resolver/canonical-resource-id.d.ts +37 -0
- package/dist/resolver/canonical-resource-id.d.ts.map +1 -0
- package/dist/resolver/compare-resource-id.d.ts +37 -0
- package/dist/resolver/compare-resource-id.d.ts.map +1 -0
- package/dist/resolver/salient-digest.d.ts +48 -0
- package/dist/resolver/salient-digest.d.ts.map +1 -0
- package/dist/resolver/target-resolver.d.ts +28 -0
- package/dist/resolver/target-resolver.d.ts.map +1 -0
- package/dist/state/index.d.ts +3 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/json-state-store.d.ts +24 -0
- package/dist/state/json-state-store.d.ts.map +1 -0
- package/dist/state/state-store.interface.d.ts +37 -0
- package/dist/state/state-store.interface.d.ts.map +1 -0
- package/dist/storage/filesystem-key-storage.d.ts +16 -0
- package/dist/storage/filesystem-key-storage.d.ts.map +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/key-storage.interface.d.ts +42 -0
- package/dist/storage/key-storage.interface.d.ts.map +1 -0
- package/dist/storage/memory-key-storage.d.ts +17 -0
- package/dist/storage/memory-key-storage.d.ts.map +1 -0
- package/dist/tool/tool-manager.d.ts +44 -0
- package/dist/tool/tool-manager.d.ts.map +1 -0
- package/dist/types/agent.d.ts +139 -0
- package/dist/types/agent.d.ts.map +1 -0
- package/dist/types/audit.d.ts +23 -0
- package/dist/types/audit.d.ts.map +1 -0
- package/dist/types/cedar-policy.d.ts +60 -0
- package/dist/types/cedar-policy.d.ts.map +1 -0
- package/dist/types/connector-plugin.d.ts +252 -0
- package/dist/types/connector-plugin.d.ts.map +1 -0
- package/dist/types/connectors.d.ts +39 -0
- package/dist/types/connectors.d.ts.map +1 -0
- package/dist/types/context.d.ts +152 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/did.d.ts +18 -0
- package/dist/types/did.d.ts.map +1 -0
- package/dist/types/errors.d.ts +24 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/grant.d.ts +522 -0
- package/dist/types/grant.d.ts.map +1 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/intent.d.ts +133 -0
- package/dist/types/intent.d.ts.map +1 -0
- package/dist/types/invitation.d.ts +97 -0
- package/dist/types/invitation.d.ts.map +1 -0
- package/dist/types/jira.d.ts +348 -0
- package/dist/types/jira.d.ts.map +1 -0
- package/dist/types/oauth.d.ts +72 -0
- package/dist/types/oauth.d.ts.map +1 -0
- package/dist/types/organization.d.ts +77 -0
- package/dist/types/organization.d.ts.map +1 -0
- package/dist/types/permission-mode.d.ts +138 -0
- package/dist/types/permission-mode.d.ts.map +1 -0
- package/dist/types/permission-vc.d.ts +800 -0
- package/dist/types/permission-vc.d.ts.map +1 -0
- package/dist/types/receipt.d.ts +133 -0
- package/dist/types/receipt.d.ts.map +1 -0
- package/dist/types/target-binding.d.ts +163 -0
- package/dist/types/target-binding.d.ts.map +1 -0
- package/dist/types/tier.d.ts +13 -0
- package/dist/types/tier.d.ts.map +1 -0
- package/dist/types/vc.d.ts +213 -0
- package/dist/types/vc.d.ts.map +1 -0
- package/dist/types/vp.d.ts +25 -0
- package/dist/types/vp.d.ts.map +1 -0
- package/dist/utils/action-classifier.d.ts +13 -0
- package/dist/utils/action-classifier.d.ts.map +1 -0
- package/dist/utils/crypto.d.ts +22 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/dist/utils/freemail-domains.d.ts +13 -0
- package/dist/utils/freemail-domains.d.ts.map +1 -0
- package/dist/utils/sdjwt-client.d.ts +415 -0
- package/dist/utils/sdjwt-client.d.ts.map +1 -0
- package/dist/utils/sdjwt-disclosure.d.ts +13 -0
- package/dist/utils/sdjwt-disclosure.d.ts.map +1 -0
- package/dist/utils/tier-utils.d.ts +15 -0
- package/dist/utils/tier-utils.d.ts.map +1 -0
- package/dist/vc/api-vc-manager.d.ts +43 -0
- package/dist/vc/api-vc-manager.d.ts.map +1 -0
- package/dist/vc/vc-manager.d.ts +55 -0
- package/dist/vc/vc-manager.d.ts.map +1 -0
- package/dist/vp/kb-jwt-builder.d.ts +89 -0
- package/dist/vp/kb-jwt-builder.d.ts.map +1 -0
- package/dist/vp/vp-manager.d.ts +75 -0
- package/dist/vp/vp-manager.d.ts.map +1 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# @vess-id/ai-identity
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for AI Identity Layer — secure delegation and permission management for AI agents using W3C Verifiable Credentials (VCs), Verifiable Presentations (VPs), and SD-JWT.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @vess-id/ai-identity
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @vess-id/ai-identity
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AIdentityClient } from '@vess-id/ai-identity'
|
|
17
|
+
|
|
18
|
+
// Initialize client
|
|
19
|
+
const client = new AIdentityClient({
|
|
20
|
+
proxyApi: {
|
|
21
|
+
baseUrl: 'http://localhost:3000',
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
// Create agent with its own did:jwk identity
|
|
26
|
+
const agent = await client.setup()
|
|
27
|
+
|
|
28
|
+
// Issue a tool permission VC
|
|
29
|
+
const vc = await client.issueToolPermission('slack', 'message.post', {
|
|
30
|
+
subjectDid: agent.did,
|
|
31
|
+
resourceScope: { channel: 'C123456' },
|
|
32
|
+
expiresIn: '1h',
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
// Invoke tool with VC authorization
|
|
36
|
+
const result = await client.invokeTool(
|
|
37
|
+
'slack',
|
|
38
|
+
'message.post',
|
|
39
|
+
{ channel: 'C123456', text: 'Hello from AI Agent!' },
|
|
40
|
+
[vc]
|
|
41
|
+
)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Architecture
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
User (Issuer) Agent (Subject) Service
|
|
48
|
+
│ │ │
|
|
49
|
+
├─── issue VC ──────────────►│ │
|
|
50
|
+
│ (permission grant) │ │
|
|
51
|
+
│ ├─── present VP ───────────►│
|
|
52
|
+
│ │ (prove permission) │
|
|
53
|
+
│ │◄──── response ────────────┤
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
- **Users** issue Verifiable Credentials to delegate permissions to agents
|
|
57
|
+
- **Agents** create Verifiable Presentations to prove their permissions
|
|
58
|
+
- **Services** verify VPs before executing operations
|
|
59
|
+
|
|
60
|
+
## Core Modules
|
|
61
|
+
|
|
62
|
+
### AIdentityClient
|
|
63
|
+
|
|
64
|
+
The main orchestrator that provides access to all managers:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
const client = new AIdentityClient(config?, password?)
|
|
68
|
+
|
|
69
|
+
client.agent // AgentManager — agent creation, export/import, lifecycle
|
|
70
|
+
client.user // UserIdentityManager — user DID management
|
|
71
|
+
client.vc // VCManager — VC issuance (SD-JWT)
|
|
72
|
+
client.vp // VPManager — VP creation and verification
|
|
73
|
+
client.tool // ToolManager — tool invocation with VP authorization
|
|
74
|
+
client.grant // GrantManager — grant suggestion and confirmation
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Agent Management
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
// Create agent with did:jwk identity
|
|
81
|
+
const agent = await client.setup()
|
|
82
|
+
|
|
83
|
+
// List agents
|
|
84
|
+
const agents = await client.agent.list()
|
|
85
|
+
|
|
86
|
+
// Export/import agent (including private key)
|
|
87
|
+
const backup = await client.agent.export(agent.did)
|
|
88
|
+
await client.agent.import(backup.agent, backup.privateKey)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Agent types: `autonomous`, `sub_agent`, `tool_agent`, `assistant`, `proxy`
|
|
92
|
+
|
|
93
|
+
### Verifiable Credentials
|
|
94
|
+
|
|
95
|
+
Issue SD-JWT VCs with selective disclosure:
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
// Tool permission
|
|
99
|
+
const vc = await client.issueToolPermission('github', 'issue.create', {
|
|
100
|
+
subjectDid: agent.did,
|
|
101
|
+
expiresIn: '24h',
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
// Data access
|
|
105
|
+
const vc = await client.issueDataAccess('slack:channel', ['read'], {
|
|
106
|
+
subjectDid: agent.did,
|
|
107
|
+
})
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
VC types: `ToolAccessCredential`, `ProjectAccessCredential`, `DeveloperCredential`, `TemporaryCredential`, `AdminCredential`, `ReceiptCredential`
|
|
111
|
+
|
|
112
|
+
### Verifiable Presentations
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
// Create VP (with holder binding via KB-JWT)
|
|
116
|
+
const vp = await client.vp.create([vc1, vc2], {
|
|
117
|
+
holderDid: agent.did,
|
|
118
|
+
challenge: 'nonce-123',
|
|
119
|
+
domain: 'api.example.com',
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
// Verify VP
|
|
123
|
+
const result = await client.vp.verify(vp, {
|
|
124
|
+
expectedChallenge: 'nonce-123',
|
|
125
|
+
expectedDomain: 'api.example.com',
|
|
126
|
+
})
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Tool Invocation
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
const result = await client.invokeTool<SlackResponse>(
|
|
133
|
+
'slack',
|
|
134
|
+
'message.post',
|
|
135
|
+
{ channel: 'C123456', text: 'Hello!' },
|
|
136
|
+
[vc]
|
|
137
|
+
)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Action Registry
|
|
141
|
+
|
|
142
|
+
All supported actions are defined in `ACTION_REGISTRY` using `provider.resource.operation` format:
|
|
143
|
+
|
|
144
|
+
| Provider | Actions |
|
|
145
|
+
|----------|---------|
|
|
146
|
+
| **Slack** | `message.post`, `message.read`, `message.update`, `message.delete`, `channel.read`, `user.read`, `batch.read` |
|
|
147
|
+
| **GitHub** | `issue.create`, `issue.list`, `issue.read`, `issue.update` |
|
|
148
|
+
| **Gmail** | `message.search`, `message.read`, `message.send`, `label.read`, `batch.read` |
|
|
149
|
+
| **Calendar** | Calendar operations |
|
|
150
|
+
| **JIRA** | Issue management |
|
|
151
|
+
| **OS** | Local operations |
|
|
152
|
+
|
|
153
|
+
Each action defines: risk level, required relations, required scopes, input schema, constraints, and effects.
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
import { ACTION_REGISTRY, indexActions } from '@vess-id/ai-identity'
|
|
157
|
+
|
|
158
|
+
const actions = indexActions(ACTION_REGISTRY)
|
|
159
|
+
const slackPost = actions.get('slack.message.post')
|
|
160
|
+
// { risk: 'high', required_relations: ['editor', 'admin', ...], ... }
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Permission Constraints
|
|
164
|
+
|
|
165
|
+
Fine-grained access control on VCs:
|
|
166
|
+
|
|
167
|
+
```typescript
|
|
168
|
+
interface PermissionConstraints {
|
|
169
|
+
time?: {
|
|
170
|
+
not_before?: number // Unix timestamp
|
|
171
|
+
not_after?: number
|
|
172
|
+
recurring_start?: string // "09:00"
|
|
173
|
+
recurring_end?: string // "17:00"
|
|
174
|
+
days_of_week?: number[] // [1,2,3,4,5] (Mon-Fri)
|
|
175
|
+
timezone?: string
|
|
176
|
+
}
|
|
177
|
+
max_invocations?: number
|
|
178
|
+
rate_limit_per_min?: number
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The `ConstraintEvaluator` checks: expiration, invocation limits, time windows, IP allowlists, and risk thresholds.
|
|
183
|
+
|
|
184
|
+
## Registry Utilities
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
import {
|
|
188
|
+
// Action normalization (MCP interop)
|
|
189
|
+
normalizeMcpActionName,
|
|
190
|
+
getAllValidMcpActionNames,
|
|
191
|
+
|
|
192
|
+
// Action aliases
|
|
193
|
+
canonicalizeAction,
|
|
194
|
+
isActionEquivalent,
|
|
195
|
+
|
|
196
|
+
// Providers
|
|
197
|
+
resolveProvider,
|
|
198
|
+
CANONICAL_PROVIDERS, // 'slack' | 'github' | 'gmail' | 'calendar' | 'jira' | 'os'
|
|
199
|
+
|
|
200
|
+
// Access orchestration (ABAC/ReBAC)
|
|
201
|
+
resolveActionsFromSelection,
|
|
202
|
+
planDelegationForVC,
|
|
203
|
+
checkPermissionWithVP,
|
|
204
|
+
} from '@vess-id/ai-identity'
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Gateway Client
|
|
208
|
+
|
|
209
|
+
Event-based communication for CLI and daemon:
|
|
210
|
+
|
|
211
|
+
```typescript
|
|
212
|
+
import { GatewayClient } from '@vess-id/ai-identity'
|
|
213
|
+
|
|
214
|
+
const gateway = new GatewayClient({ baseUrl: 'https://app.vesslabs.ai' })
|
|
215
|
+
|
|
216
|
+
// Long-poll for events
|
|
217
|
+
const { events, cursor } = await gateway.getEvents({
|
|
218
|
+
cursor: lastCursor,
|
|
219
|
+
waitSeconds: 30,
|
|
220
|
+
})
|
|
221
|
+
|
|
222
|
+
// Acknowledge processed event
|
|
223
|
+
await gateway.ackEvent(event.id)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Configuration
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
interface AIdentityConfig {
|
|
230
|
+
didApi?: {
|
|
231
|
+
baseUrl: string
|
|
232
|
+
apiKey?: string
|
|
233
|
+
bearerToken?: string
|
|
234
|
+
}
|
|
235
|
+
issuerApi?: {
|
|
236
|
+
baseUrl: string
|
|
237
|
+
apiKey?: string
|
|
238
|
+
bearerToken?: string
|
|
239
|
+
}
|
|
240
|
+
verifierApi?: {
|
|
241
|
+
baseUrl: string
|
|
242
|
+
apiKey?: string
|
|
243
|
+
bearerToken?: string
|
|
244
|
+
}
|
|
245
|
+
proxyApi?: {
|
|
246
|
+
baseUrl: string
|
|
247
|
+
}
|
|
248
|
+
storage?: {
|
|
249
|
+
keyStorePath?: string // Default: ~/.vess-aidentity/keys
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## Security
|
|
255
|
+
|
|
256
|
+
- Agents use `did:jwk` identifiers with EC P-256 key pairs
|
|
257
|
+
- Private keys are stored locally with optional password encryption
|
|
258
|
+
- VCs use SD-JWT format with selective disclosure
|
|
259
|
+
- VPs include nonce and domain binding to prevent replay attacks
|
|
260
|
+
- All tool invocations require valid VP authorization
|
|
261
|
+
- Constraint evaluation enforces time windows, invocation limits, IP allowlists, and risk thresholds
|
|
262
|
+
|
|
263
|
+
## License
|
|
264
|
+
|
|
265
|
+
MIT
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { KeyManager } from '../did/key-manager';
|
|
2
|
+
export interface AgentDIDManagerOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Directory holding the `<agentId>.did` files that map an agent ID to its DID.
|
|
5
|
+
*
|
|
6
|
+
* 🔴 Omit this and the default stays exactly what it has always been —
|
|
7
|
+
* `~/.vess-aidentity/agent-dids/`. Every mapping written so far lives there,
|
|
8
|
+
* so changing the default would make existing agents unresolvable.
|
|
9
|
+
*
|
|
10
|
+
* Supply it for either of two reasons:
|
|
11
|
+
*
|
|
12
|
+
* - **Tenant isolation.** With the path hard-coded to `os.homedir()`, one
|
|
13
|
+
* process serving several tenants funnels all of them into a single shared
|
|
14
|
+
* directory, where agent IDs can collide across tenants.
|
|
15
|
+
*
|
|
16
|
+
* - **Test isolation.** Tests could not otherwise steer this path away from
|
|
17
|
+
* the developer's real home. Under jest, `process.env.HOME = x` does not
|
|
18
|
+
* help: jest-environment-node replaces `process.env` with a plain object
|
|
19
|
+
* behind a Proxy, so the assignment never reaches `setenv(3)`, while
|
|
20
|
+
* `os.homedir()` goes through libuv to `getenv("HOME")` and reads the real
|
|
21
|
+
* environ. Both reads and writes therefore escape to the real home and the
|
|
22
|
+
* suite stays green while polluting it.
|
|
23
|
+
*/
|
|
24
|
+
mappingDir?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Agent DID Manager
|
|
28
|
+
* Manages DID generation and lifecycle for AI Agents specifically
|
|
29
|
+
*/
|
|
30
|
+
export declare class AgentDIDManager {
|
|
31
|
+
private keyManager;
|
|
32
|
+
private agentDIDMap;
|
|
33
|
+
private readonly mappingDirOverride?;
|
|
34
|
+
constructor(keyManager?: KeyManager, options?: AgentDIDManagerOptions);
|
|
35
|
+
/**
|
|
36
|
+
* 🔴 The one place the mapping directory is derived.
|
|
37
|
+
*
|
|
38
|
+
* It used to be derived independently in four methods, and two of them
|
|
39
|
+
* (`loadAgentDIDMapping` / `deleteAgentDIDMapping`) looked at `~/.vess/`
|
|
40
|
+
* while the writes went to `~/.vess-aidentity/`. Within a single process the
|
|
41
|
+
* in-memory Map answered first, so nobody noticed; across processes
|
|
42
|
+
* `getAgentDID` failed every time — whenever a long-lived host restarts, or
|
|
43
|
+
* on each Lambda invocation. The four copies are now one, so the paths
|
|
44
|
+
* cannot drift apart again.
|
|
45
|
+
*
|
|
46
|
+
* (An earlier version of this note named agentd as the example. It is not
|
|
47
|
+
* one: agentd resolves Agent DIDs through its own store — OS keychain plus
|
|
48
|
+
* SQLite, keyed by project × client — and takes only stateless primitives
|
|
49
|
+
* from this SDK. Nothing in this repo constructs an AgentDIDManager; the
|
|
50
|
+
* callers are SDK consumers.)
|
|
51
|
+
*
|
|
52
|
+
* The default resolves to `.vess-aidentity` because that is where the real
|
|
53
|
+
* files ended up; treating `.vess` as canonical would orphan every existing
|
|
54
|
+
* mapping.
|
|
55
|
+
*/
|
|
56
|
+
private mappingDir;
|
|
57
|
+
/**
|
|
58
|
+
* Generate a new DID for an AI Agent
|
|
59
|
+
*/
|
|
60
|
+
generateAgentDID(agentId: string): Promise<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Get DID for a specific agent
|
|
63
|
+
*/
|
|
64
|
+
getAgentDID(agentId: string): Promise<string>;
|
|
65
|
+
/**
|
|
66
|
+
* Check if agent has a DID
|
|
67
|
+
*/
|
|
68
|
+
hasAgentDID(agentId: string): Promise<boolean>;
|
|
69
|
+
/**
|
|
70
|
+
* Get agent's key pair
|
|
71
|
+
*/
|
|
72
|
+
getAgentKeyPair(agentId: string): Promise<any>;
|
|
73
|
+
/**
|
|
74
|
+
* Delete agent DID and associated keys
|
|
75
|
+
*/
|
|
76
|
+
deleteAgentDID(agentId: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* List all agent DIDs
|
|
79
|
+
*/
|
|
80
|
+
listAgentDIDs(): Promise<Array<{
|
|
81
|
+
agentId: string;
|
|
82
|
+
did: string;
|
|
83
|
+
}>>;
|
|
84
|
+
/**
|
|
85
|
+
* Save agent ID -> DID mapping to persistent storage
|
|
86
|
+
*/
|
|
87
|
+
private saveAgentDIDMapping;
|
|
88
|
+
/**
|
|
89
|
+
* Load agent ID -> DID mapping from persistent storage
|
|
90
|
+
*/
|
|
91
|
+
private loadAgentDIDMapping;
|
|
92
|
+
/**
|
|
93
|
+
* Delete agent ID -> DID mapping from persistent storage
|
|
94
|
+
*/
|
|
95
|
+
private deleteAgentDIDMapping;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=agent-did-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-did-manager.d.ts","sourceRoot":"","sources":["../../src/agent/agent-did-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAI/C,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;;GAGG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAQ;gBAEhC,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,sBAAsB;IAKrE;;;;;;;;;;;;;;;;;;;;OAoBG;YACW,UAAU;IASxB;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAiBxD;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBnD;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IASpD;;OAEG;IACG,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAcpD;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBpD;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IA2BvE;;OAEG;YACW,mBAAmB;IAYjC;;OAEG;YACW,mBAAmB;IAcjC;;OAEG;YACW,qBAAqB;CAapC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { IStateStore } from '../state/state-store.interface';
|
|
2
|
+
import { GatewayClient, ApiKeyValidationResult } from '../gateway/gateway-client';
|
|
3
|
+
/**
|
|
4
|
+
* Authentication state persisted in the StateStore
|
|
5
|
+
*/
|
|
6
|
+
export interface AuthState {
|
|
7
|
+
apiKey: string;
|
|
8
|
+
apiUrl: string;
|
|
9
|
+
userId?: string;
|
|
10
|
+
projectId?: string;
|
|
11
|
+
scopes?: string[];
|
|
12
|
+
authenticatedAt: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Authentication provider that validates API keys and persists auth state.
|
|
16
|
+
* Used by CLI and MCP to authenticate against the Gateway API.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AuthProvider {
|
|
19
|
+
private stateStore;
|
|
20
|
+
private gatewayClient;
|
|
21
|
+
constructor(stateStore: IStateStore, gatewayClient: GatewayClient);
|
|
22
|
+
/**
|
|
23
|
+
* Authenticate with an API key. Validates against the Gateway and
|
|
24
|
+
* persists the result in the StateStore.
|
|
25
|
+
*
|
|
26
|
+
* @returns The validation result
|
|
27
|
+
*/
|
|
28
|
+
login(apiKey: string, apiUrl: string, projectId?: string): Promise<ApiKeyValidationResult>;
|
|
29
|
+
/**
|
|
30
|
+
* Get the current auth state from the StateStore.
|
|
31
|
+
* Returns undefined if not authenticated.
|
|
32
|
+
*/
|
|
33
|
+
getAuthState(): Promise<AuthState | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Check if we have stored auth credentials
|
|
36
|
+
*/
|
|
37
|
+
isAuthenticated(): Promise<boolean>;
|
|
38
|
+
/**
|
|
39
|
+
* Clear auth state (logout)
|
|
40
|
+
*/
|
|
41
|
+
logout(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Get the stored API key, or undefined if not authenticated
|
|
44
|
+
*/
|
|
45
|
+
getApiKey(): Promise<string | undefined>;
|
|
46
|
+
/**
|
|
47
|
+
* Get the stored API URL, or undefined if not authenticated
|
|
48
|
+
*/
|
|
49
|
+
getApiUrl(): Promise<string | undefined>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=auth-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-provider.d.ts","sourceRoot":"","sources":["../../src/auth/auth-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAEjF;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,aAAa,CAAe;gBAExB,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa;IAKjE;;;;;OAKG;IACG,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAkBhG;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAIpD;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAKzC;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAK9C;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAI/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type AIdentityConfig } from './config';
|
|
2
|
+
import { AgentManager } from './did/agent';
|
|
3
|
+
import { UserIdentityManager } from './identity/user-identity-manager';
|
|
4
|
+
import { VCManager } from './vc/vc-manager';
|
|
5
|
+
import { VPManager } from './vp/vp-manager';
|
|
6
|
+
import { ToolManager } from './tool/tool-manager';
|
|
7
|
+
import { GrantManager } from './grant/grant-manager';
|
|
8
|
+
import { Agent, ConnectorResponse } from './types';
|
|
9
|
+
export declare class AIdentityClient {
|
|
10
|
+
readonly agent: AgentManager;
|
|
11
|
+
readonly user: UserIdentityManager;
|
|
12
|
+
readonly vc: VCManager;
|
|
13
|
+
readonly vp: VPManager;
|
|
14
|
+
readonly tool: ToolManager;
|
|
15
|
+
readonly grant: GrantManager;
|
|
16
|
+
private keyManager;
|
|
17
|
+
private currentAgent?;
|
|
18
|
+
constructor(config?: AIdentityConfig, password?: string);
|
|
19
|
+
/**
|
|
20
|
+
* Quick setup: Create or load an agent
|
|
21
|
+
*/
|
|
22
|
+
setup(did?: string): Promise<Agent>;
|
|
23
|
+
/**
|
|
24
|
+
* Get current agent
|
|
25
|
+
*/
|
|
26
|
+
getCurrentAgent(): Agent | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Get current user DID
|
|
29
|
+
*/
|
|
30
|
+
getCurrentUserDID(): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Create or reset user identity
|
|
33
|
+
*/
|
|
34
|
+
resetUserIdentity(): Promise<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Issue a VC for tool permission
|
|
37
|
+
* Enhanced to support User → Agent delegation pattern
|
|
38
|
+
*/
|
|
39
|
+
issueToolPermission(tool: string, action: string, options: {
|
|
40
|
+
subjectDid?: string;
|
|
41
|
+
agentId?: string;
|
|
42
|
+
issuerDid?: string;
|
|
43
|
+
resourceScope?: Record<string, any>;
|
|
44
|
+
expiresIn?: string;
|
|
45
|
+
}): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Issue a VC for data access
|
|
48
|
+
* Enhanced to support User → Agent delegation pattern
|
|
49
|
+
*/
|
|
50
|
+
issueDataAccess(resource: string, actions: ('read' | 'write' | 'delete')[], options: {
|
|
51
|
+
subjectDid?: string;
|
|
52
|
+
agentId?: string;
|
|
53
|
+
issuerDid?: string;
|
|
54
|
+
expiresIn?: string;
|
|
55
|
+
}): Promise<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Invoke a tool with automatic VP creation
|
|
58
|
+
*/
|
|
59
|
+
invokeTool<T = any>(tool: string, action: string, params: Record<string, any>, vcs: string[]): Promise<ConnectorResponse<T>>;
|
|
60
|
+
}
|
|
61
|
+
export declare function getClient(config?: AIdentityConfig, password?: string): AIdentityClient;
|
|
62
|
+
export { configure, type AIdentityConfig } from './config';
|
|
63
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAa,MAAM,UAAU,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAElD,qBAAa,eAAe;IAC1B,SAAgB,KAAK,EAAE,YAAY,CAAA;IACnC,SAAgB,IAAI,EAAE,mBAAmB,CAAA;IACzC,SAAgB,EAAE,EAAE,SAAS,CAAA;IAC7B,SAAgB,EAAE,EAAE,SAAS,CAAA;IAC7B,SAAgB,IAAI,EAAE,WAAW,CAAA;IACjC,SAAgB,KAAK,EAAE,YAAY,CAAA;IAEnC,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,YAAY,CAAC,CAAO;gBAEhB,MAAM,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM;IAuBvD;;OAEG;IACG,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAWzC;;OAEG;IACH,eAAe,IAAI,KAAK,GAAG,SAAS;IAIpC;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1C;;OAEG;IACG,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1C;;;OAGG;IACG,mBAAmB,CACvB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;QACP,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;QACnC,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GACA,OAAO,CAAC,MAAM,CAAC;IAiBlB;;;OAGG;IACG,eAAe,CACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC,EAAE,EACxC,OAAO,EAAE;QACP,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GACA,OAAO,CAAC,MAAM,CAAC;IAgBlB;;OAEG;IACG,UAAU,CAAC,CAAC,GAAG,GAAG,EACtB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,GAAG,EAAE,MAAM,EAAE,GACZ,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;CAWjC;AAKD,wBAAgB,SAAS,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe,CAKtF;AAED,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { KeyStorageProvider } from '../storage/key-storage.interface';
|
|
2
|
+
export interface AIdentityConfig {
|
|
3
|
+
didApi?: {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
bearerToken?: string;
|
|
7
|
+
};
|
|
8
|
+
issuerApi?: {
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
bearerToken?: string;
|
|
12
|
+
};
|
|
13
|
+
verifierApi?: {
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
apiKey?: string;
|
|
16
|
+
bearerToken?: string;
|
|
17
|
+
};
|
|
18
|
+
proxyApi?: {
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
};
|
|
21
|
+
storage?: {
|
|
22
|
+
keyStorePath?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Where agentId → DID mappings are kept.
|
|
26
|
+
*
|
|
27
|
+
* 🔴 Leave it unset and the default is unchanged: `~/.vess-aidentity/agent-dids`.
|
|
28
|
+
* Every mapping written so far lives there, so moving the default would make
|
|
29
|
+
* existing agents unresolvable.
|
|
30
|
+
*
|
|
31
|
+
* Set it when a single process serves several tenants — otherwise they all
|
|
32
|
+
* share one directory and agent IDs can collide across them — or when a test
|
|
33
|
+
* must not touch the developer's real home.
|
|
34
|
+
*
|
|
35
|
+
* Reaches `AgentDIDManager` through `AgentManager`; without this field a
|
|
36
|
+
* caller could implement nothing and had no way to move the path, the same
|
|
37
|
+
* gap `keyStorage` closed for private keys.
|
|
38
|
+
*/
|
|
39
|
+
agentMappingDir?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Where the user DID (`user-did.txt`) is kept.
|
|
42
|
+
*
|
|
43
|
+
* 🔴 Leave it unset and the default is unchanged: `~/.vess-aidentity`. Note
|
|
44
|
+
* this is the config root itself, not a subdirectory — the user DID is one
|
|
45
|
+
* fixed filename sitting alongside `keys/` and `agent-dids/`. Moving the
|
|
46
|
+
* default would orphan the existing identity, and every VC issued so far
|
|
47
|
+
* names that DID as its issuer.
|
|
48
|
+
*
|
|
49
|
+
* Set it when a single process serves several tenants — the filename is
|
|
50
|
+
* fixed, so without it the last `createUserDID` overwrites every other
|
|
51
|
+
* tenant's issuer identity — or when a test must not touch the developer's
|
|
52
|
+
* real home.
|
|
53
|
+
*
|
|
54
|
+
* Reaches `UserIdentityManager` through `AIdentityClient`; separate from
|
|
55
|
+
* `agentMappingDir` because the two point at different directories and a
|
|
56
|
+
* caller may well want to move only one.
|
|
57
|
+
*/
|
|
58
|
+
userMappingDir?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Where private keys are kept.
|
|
61
|
+
*
|
|
62
|
+
* 🔴 Supply this when the filesystem is not durable. On AWS Lambda and
|
|
63
|
+
* similar, the default provider writes to a disk that is wiped between
|
|
64
|
+
* invocations, so keys fail to persist SILENTLY — nothing throws at
|
|
65
|
+
* construction, and the failure surfaces later as a key that cannot be
|
|
66
|
+
* found.
|
|
67
|
+
*
|
|
68
|
+
* `KeyManager` has always accepted a provider; what was missing was a way
|
|
69
|
+
* to reach it from here, so a client could implement the interface and had
|
|
70
|
+
* nowhere to put the result. Distinct from `storage.keyStorePath`, which
|
|
71
|
+
* only moves the filesystem provider's directory and cannot replace it.
|
|
72
|
+
*
|
|
73
|
+
* Implement `KeyStorageProvider` against S3, DynamoDB, Secrets Manager or
|
|
74
|
+
* anything else; `MemoryKeyStorage` is exported for the ephemeral case.
|
|
75
|
+
*/
|
|
76
|
+
keyStorage?: KeyStorageProvider;
|
|
77
|
+
}
|
|
78
|
+
export declare function configure(config: AIdentityConfig): void;
|
|
79
|
+
export declare function getConfig(): AIdentityConfig;
|
|
80
|
+
export declare function getDidApiUrl(path: string): string;
|
|
81
|
+
export declare function getIssuerApiUrl(path: string): string;
|
|
82
|
+
export declare function getVerifierApiUrl(path: string): string;
|
|
83
|
+
export declare function getApiHeaders(apiType: 'did' | 'issuer' | 'verifier'): any;
|
|
84
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAE1E,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,WAAW,CAAC,EAAE;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,QAAQ,CAAC,EAAE;QACT,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,OAAO,CAAC,EAAE;QACR,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;IAED;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB;;;;;;;;;;;;;;;;;OAiBG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAChC;AAID,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAEvD;AAED,wBAAgB,SAAS,IAAI,eAAe,CAE3C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMjD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMpD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMtD;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,GAAG,CA+BzE"}
|