@the-ai-company/cbio-node-runtime 1.43.0 → 1.45.5
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/dist/clients/agent/client.d.ts +35 -0
- package/dist/clients/agent/client.js +15 -0
- package/dist/clients/agent/client.js.map +1 -1
- package/dist/clients/owner/client.d.ts +60 -0
- package/dist/clients/owner/client.js +14 -0
- package/dist/clients/owner/client.js.map +1 -1
- package/dist/clients/owner/index.d.ts +1 -1
- package/dist/protocol/crypto.d.ts +3 -0
- package/dist/protocol/crypto.js +3 -0
- package/dist/protocol/crypto.js.map +1 -1
- package/dist/runtime/bootstrap.d.ts +43 -7
- package/dist/runtime/bootstrap.js +12 -1
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/identity.d.ts +47 -0
- package/dist/runtime/identity.js +25 -0
- package/dist/runtime/identity.js.map +1 -1
- package/dist/runtime/index.d.ts +5 -11
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/private-vault.d.ts +1 -2
- package/dist/storage/fs.d.ts +3 -0
- package/dist/storage/fs.js +3 -0
- package/dist/storage/fs.js.map +1 -1
- package/dist/storage/memory.d.ts +3 -0
- package/dist/storage/memory.js +3 -0
- package/dist/storage/memory.js.map +1 -1
- package/dist/vault-core/core.d.ts +3 -0
- package/dist/vault-core/core.js +3 -0
- package/dist/vault-core/core.js.map +1 -1
- package/dist/vault-core/defaults.d.ts +45 -0
- package/dist/vault-core/defaults.js +45 -0
- package/dist/vault-core/defaults.js.map +1 -1
- package/dist/vault-core/persistence.d.ts +30 -0
- package/dist/vault-core/persistence.js +30 -0
- package/dist/vault-core/persistence.js.map +1 -1
- package/dist/vault-ingress/defaults.d.ts +3 -0
- package/dist/vault-ingress/defaults.js +3 -0
- package/dist/vault-ingress/defaults.js.map +1 -1
- package/dist/vault-ingress/remote-transport.d.ts +3 -0
- package/dist/vault-ingress/remote-transport.js +3 -0
- package/dist/vault-ingress/remote-transport.js.map +1 -1
- package/docs/api/README.md +180 -0
- package/docs/api/classes/IdentityError.md +62 -0
- package/docs/api/classes/InMemoryReplayGuard.md +45 -0
- package/docs/api/classes/VaultCoreError.md +39 -0
- package/docs/api/enumerations/AuditAction.md +95 -0
- package/docs/api/enumerations/AuditOutcome.md +29 -0
- package/docs/api/enumerations/DispatchStatus.md +23 -0
- package/docs/api/enumerations/IdentityErrorCode.md +121 -0
- package/docs/api/functions/createAgentClient.md +33 -0
- package/docs/api/functions/createChildIdentity.md +25 -0
- package/docs/api/functions/createDefaultVaultCoreDependencies.md +77 -0
- package/docs/api/functions/createIdentity.md +30 -0
- package/docs/api/functions/createOwnerHttpFlowBoundary.md +17 -0
- package/docs/api/functions/createPersistentVaultCoreDependencies.md +85 -0
- package/docs/api/functions/createStandardAcquireBoundary.md +31 -0
- package/docs/api/functions/createStandardDispatchBoundary.md +23 -0
- package/docs/api/functions/createVault.md +58 -0
- package/docs/api/functions/createVaultClient.md +32 -0
- package/docs/api/functions/createVaultCore.md +17 -0
- package/docs/api/functions/createVaultService.md +31 -0
- package/docs/api/functions/createWorkspaceStorage.md +17 -0
- package/docs/api/functions/deriveChildIdentity.md +41 -0
- package/docs/api/functions/deriveIdentityId.md +17 -0
- package/docs/api/functions/ensureIdentityPrivateVault.md +21 -0
- package/docs/api/functions/getDefaultWorkspaceDir.md +11 -0
- package/docs/api/functions/handleVaultHttpDispatch.md +30 -0
- package/docs/api/functions/identityPrivateVaultChildrenKey.md +17 -0
- package/docs/api/functions/identityPrivateVaultPrefix.md +17 -0
- package/docs/api/functions/identityPrivateVaultProfileKey.md +17 -0
- package/docs/api/functions/identityPrivateVaultPublicSealedKey.md +17 -0
- package/docs/api/functions/initializeVaultCustody.md +21 -0
- package/docs/api/functions/listIdentities.md +19 -0
- package/docs/api/functions/listVaults.md +23 -0
- package/docs/api/functions/readIdentityMetadata.md +29 -0
- package/docs/api/functions/readIdentityPrivateVaultChildrenState.md +21 -0
- package/docs/api/functions/readIdentityPrivateVaultProfile.md +21 -0
- package/docs/api/functions/readVaultProfile.md +25 -0
- package/docs/api/functions/readVaultPublicMetadata.md +23 -0
- package/docs/api/functions/recoverVault.md +58 -0
- package/docs/api/functions/recoverVaultWorkingKey.md +25 -0
- package/docs/api/functions/restoreIdentity.md +35 -0
- package/docs/api/functions/toOwnerHttpFlowBoundary.md +17 -0
- package/docs/api/functions/updateVaultMetadata.md +33 -0
- package/docs/api/functions/wrapVaultCoreAsVaultService.md +31 -0
- package/docs/api/functions/writeVaultProfile.md +29 -0
- package/docs/api/interfaces/AgentCapability.md +103 -0
- package/docs/api/interfaces/AgentClient.md +41 -0
- package/docs/api/interfaces/AgentDispatchIntent.md +41 -0
- package/docs/api/interfaces/AgentDispatchTransport.md +21 -0
- package/docs/api/interfaces/AgentIdentity.md +11 -0
- package/docs/api/interfaces/AgentIdentityRecord.md +23 -0
- package/docs/api/interfaces/AgentIdentityRegistry.md +57 -0
- package/docs/api/interfaces/AgentProof.md +29 -0
- package/docs/api/interfaces/AgentProofVerifier.md +21 -0
- package/docs/api/interfaces/AgentSigner.md +21 -0
- package/docs/api/interfaces/AuditEntry.md +89 -0
- package/docs/api/interfaces/AuditLog.md +37 -0
- package/docs/api/interfaces/AuditQuery.md +29 -0
- package/docs/api/interfaces/CapabilityRegistry.md +65 -0
- package/docs/api/interfaces/CapabilityRevocationRegistry.md +53 -0
- package/docs/api/interfaces/CbioRuntime.md +886 -0
- package/docs/api/interfaces/ChildIdentity.md +77 -0
- package/docs/api/interfaces/Clock.md +15 -0
- package/docs/api/interfaces/CreateAgentClientOptions.md +41 -0
- package/docs/api/interfaces/CreateChildIdentityOptions.md +19 -0
- package/docs/api/interfaces/CreateDefaultVaultCoreDependenciesOptions.md +85 -0
- package/docs/api/interfaces/CreateIdentityOptions.md +15 -0
- package/docs/api/interfaces/CreatePersistentVaultCoreDependenciesOptions.md +115 -0
- package/docs/api/interfaces/CreateVaultClientOptions.md +29 -0
- package/docs/api/interfaces/CreateVaultOptions.md +177 -0
- package/docs/api/interfaces/CreatedVault.md +39 -0
- package/docs/api/interfaces/CustomHttpFlowDefinition.md +71 -0
- package/docs/api/interfaces/CustomHttpFlowRegistry.md +41 -0
- package/docs/api/interfaces/DefaultPolicyEngineOptions.md +49 -0
- package/docs/api/interfaces/DeriveIdentityOptions.md +11 -0
- package/docs/api/interfaces/DispatchAuthorization.md +35 -0
- package/docs/api/interfaces/DispatchInstruction.md +47 -0
- package/docs/api/interfaces/DispatchRequest.md +77 -0
- package/docs/api/interfaces/DispatchResult.md +53 -0
- package/docs/api/interfaces/IStorageProvider.md +144 -0
- package/docs/api/interfaces/IdGenerator.md +39 -0
- package/docs/api/interfaces/IdentityPrivateVaultChildRecord.md +35 -0
- package/docs/api/interfaces/IdentityPrivateVaultChildrenState.md +17 -0
- package/docs/api/interfaces/IdentityPrivateVaultProfile.md +35 -0
- package/docs/api/interfaces/InitializeVaultCustodyOptions.md +29 -0
- package/docs/api/interfaces/InitializedVaultCustody.md +23 -0
- package/docs/api/interfaces/IssuerWriteSecretCommand.md +59 -0
- package/docs/api/interfaces/OwnerAuditRequest.md +47 -0
- package/docs/api/interfaces/OwnerDefineSecretTargetsCommand.md +53 -0
- package/docs/api/interfaces/OwnerDefineSecretTargetsInput.md +23 -0
- package/docs/api/interfaces/OwnerDeleteSecretCommand.md +47 -0
- package/docs/api/interfaces/OwnerExportSecretRequest.md +47 -0
- package/docs/api/interfaces/OwnerHttpFlowBoundary.md +51 -0
- package/docs/api/interfaces/OwnerIdentityRecord.md +23 -0
- package/docs/api/interfaces/OwnerIdentityRegistry.md +57 -0
- package/docs/api/interfaces/OwnerListAgentsRequest.md +41 -0
- package/docs/api/interfaces/OwnerListCapabilitiesRequest.md +47 -0
- package/docs/api/interfaces/OwnerProof.md +29 -0
- package/docs/api/interfaces/OwnerProofVerifier.md +181 -0
- package/docs/api/interfaces/OwnerRegisterAgentIdentityCommand.md +47 -0
- package/docs/api/interfaces/OwnerRegisterCapabilityCommand.md +47 -0
- package/docs/api/interfaces/OwnerRegisterCustomHttpFlowCommand.md +83 -0
- package/docs/api/interfaces/OwnerRevokeCapabilityCommand.md +53 -0
- package/docs/api/interfaces/OwnerSecretExport.md +35 -0
- package/docs/api/interfaces/OwnerSecretTargetBinding.md +35 -0
- package/docs/api/interfaces/OwnerStoreSecretInput.md +23 -0
- package/docs/api/interfaces/OwnerWriteSecretCommand.md +65 -0
- package/docs/api/interfaces/OwnerWriteSecretInput.md +29 -0
- package/docs/api/interfaces/PolicyEngine.md +81 -0
- package/docs/api/interfaces/RateLimitStore.md +33 -0
- package/docs/api/interfaces/RecoverVaultOptions.md +165 -0
- package/docs/api/interfaces/RecoveredVault.md +49 -0
- package/docs/api/interfaces/ReplayGuard.md +21 -0
- package/docs/api/interfaces/RestoreIdentityOptions.md +11 -0
- package/docs/api/interfaces/SecretAlias.md +11 -0
- package/docs/api/interfaces/SecretCustody.md +57 -0
- package/docs/api/interfaces/SecretId.md +11 -0
- package/docs/api/interfaces/SecretRecord.md +53 -0
- package/docs/api/interfaces/SecretRepository.md +69 -0
- package/docs/api/interfaces/SecretVersion.md +11 -0
- package/docs/api/interfaces/SignatureAgentProofVerifierOptions.md +21 -0
- package/docs/api/interfaces/Signer.md +31 -0
- package/docs/api/interfaces/TrustedExecutor.md +31 -0
- package/docs/api/interfaces/VaultAcquireSecretInput.md +53 -0
- package/docs/api/interfaces/VaultAcquireSecretResult.md +41 -0
- package/docs/api/interfaces/VaultAgentDispatchErrorResponse.md +25 -0
- package/docs/api/interfaces/VaultAgentDispatchRequest.md +75 -0
- package/docs/api/interfaces/VaultAgentDispatchResponse.md +17 -0
- package/docs/api/interfaces/VaultAuditQueryInput.md +29 -0
- package/docs/api/interfaces/VaultClient.md +234 -0
- package/docs/api/interfaces/VaultCore.md +311 -0
- package/docs/api/interfaces/VaultCoreDependencies.md +95 -0
- package/docs/api/interfaces/VaultCustomFlowResolver.md +25 -0
- package/docs/api/interfaces/VaultDeleteSecretInput.md +17 -0
- package/docs/api/interfaces/VaultExportSecretInput.md +17 -0
- package/docs/api/interfaces/VaultGrantCapabilityInput.md +17 -0
- package/docs/api/interfaces/VaultId.md +11 -0
- package/docs/api/interfaces/VaultIdentity.md +11 -0
- package/docs/api/interfaces/VaultListAgentsInput.md +11 -0
- package/docs/api/interfaces/VaultListCapabilitiesInput.md +17 -0
- package/docs/api/interfaces/VaultObject.md +33 -0
- package/docs/api/interfaces/VaultPrincipal.md +17 -0
- package/docs/api/interfaces/VaultProfile.md +23 -0
- package/docs/api/interfaces/VaultPublicMetadata.md +25 -0
- package/docs/api/interfaces/VaultRegisterAgentInput.md +23 -0
- package/docs/api/interfaces/VaultRegisterFlowInput.md +83 -0
- package/docs/api/interfaces/VaultRevokeCapabilityInput.md +23 -0
- package/docs/api/interfaces/VaultService.md +251 -0
- package/docs/api/interfaces/VaultSigner.md +21 -0
- package/docs/api/interfaces/VaultTargetBinding.md +35 -0
- package/docs/api/type-aliases/AgentCapabilityEnvelope.md +7 -0
- package/docs/api/type-aliases/CbioRuntimeModule.md +9 -0
- package/docs/api/type-aliases/IdentityPrivateVaultAccess.md +7 -0
- package/docs/api/type-aliases/RedactedResponseShape.md +7 -0
- package/docs/api/type-aliases/VaultAcquireSecretFlow.md +7 -0
- package/docs/api/type-aliases/VaultPrincipalKind.md +7 -0
- package/docs/api/type-aliases/VaultWriteSecretCommand.md +7 -0
- package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +7 -0
- package/package.json +10 -2
|
@@ -0,0 +1,886 @@
|
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.45.5**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# Interface: CbioRuntime
|
|
6
|
+
|
|
7
|
+
Main runtime interface.
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### AgentDispatchHttpTransport
|
|
12
|
+
|
|
13
|
+
> **AgentDispatchHttpTransport**: *typeof* `AgentDispatchHttpTransport`
|
|
14
|
+
|
|
15
|
+
***
|
|
16
|
+
|
|
17
|
+
### createAgentClient
|
|
18
|
+
|
|
19
|
+
> **createAgentClient**: (`options`) => [`AgentClient`](AgentClient.md)
|
|
20
|
+
|
|
21
|
+
Creates an [AgentClient](AgentClient.md) for a delegated identity.
|
|
22
|
+
|
|
23
|
+
#### Parameters
|
|
24
|
+
|
|
25
|
+
##### options
|
|
26
|
+
|
|
27
|
+
[`CreateAgentClientOptions`](CreateAgentClientOptions.md)
|
|
28
|
+
|
|
29
|
+
Configuration including agent identity, capability, and transport.
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
[`AgentClient`](AgentClient.md)
|
|
34
|
+
|
|
35
|
+
An initialized [AgentClient](AgentClient.md).
|
|
36
|
+
|
|
37
|
+
#### Example
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
const agent = createAgentClient({
|
|
41
|
+
agentIdentity,
|
|
42
|
+
capability,
|
|
43
|
+
vault
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### createChildIdentity
|
|
50
|
+
|
|
51
|
+
> **createChildIdentity**: (`storage`, `parentIdentity`, `options`) => `Promise`\<[`ChildIdentity`](ChildIdentity.md)\>
|
|
52
|
+
|
|
53
|
+
#### Parameters
|
|
54
|
+
|
|
55
|
+
##### storage
|
|
56
|
+
|
|
57
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
58
|
+
|
|
59
|
+
##### parentIdentity
|
|
60
|
+
|
|
61
|
+
`string` \| `CreatedIdentity`
|
|
62
|
+
|
|
63
|
+
##### options?
|
|
64
|
+
|
|
65
|
+
[`CreateChildIdentityOptions`](CreateChildIdentityOptions.md) = `{}`
|
|
66
|
+
|
|
67
|
+
#### Returns
|
|
68
|
+
|
|
69
|
+
`Promise`\<[`ChildIdentity`](ChildIdentity.md)\>
|
|
70
|
+
|
|
71
|
+
***
|
|
72
|
+
|
|
73
|
+
### createDefaultVaultCoreDependencies
|
|
74
|
+
|
|
75
|
+
> **createDefaultVaultCoreDependencies**: (`options`) => `object`
|
|
76
|
+
|
|
77
|
+
#### Parameters
|
|
78
|
+
|
|
79
|
+
##### options?
|
|
80
|
+
|
|
81
|
+
[`CreateDefaultVaultCoreDependenciesOptions`](CreateDefaultVaultCoreDependenciesOptions.md) = `{}`
|
|
82
|
+
|
|
83
|
+
#### Returns
|
|
84
|
+
|
|
85
|
+
`object`
|
|
86
|
+
|
|
87
|
+
##### agentIdentities
|
|
88
|
+
|
|
89
|
+
> **agentIdentities**: `InMemoryAgentIdentityRegistry`
|
|
90
|
+
|
|
91
|
+
##### audit
|
|
92
|
+
|
|
93
|
+
> **audit**: `InMemoryAuditLog`
|
|
94
|
+
|
|
95
|
+
##### capabilities
|
|
96
|
+
|
|
97
|
+
> **capabilities**: `InMemoryCapabilityRegistry`
|
|
98
|
+
|
|
99
|
+
##### clock
|
|
100
|
+
|
|
101
|
+
> **clock**: `SystemClock`
|
|
102
|
+
|
|
103
|
+
##### custody
|
|
104
|
+
|
|
105
|
+
> **custody**: `InMemorySecretCustody`
|
|
106
|
+
|
|
107
|
+
##### customFlows
|
|
108
|
+
|
|
109
|
+
> **customFlows**: `InMemoryCustomHttpFlowRegistry`
|
|
110
|
+
|
|
111
|
+
##### executor
|
|
112
|
+
|
|
113
|
+
> **executor**: `HttpDispatchExecutor`
|
|
114
|
+
|
|
115
|
+
##### ids
|
|
116
|
+
|
|
117
|
+
> **ids**: `RandomIdGenerator`
|
|
118
|
+
|
|
119
|
+
##### ownerIdentities
|
|
120
|
+
|
|
121
|
+
> **ownerIdentities**: `InMemoryOwnerIdentityRegistry`
|
|
122
|
+
|
|
123
|
+
##### ownerProofVerifier
|
|
124
|
+
|
|
125
|
+
> **ownerProofVerifier**: `SignatureOwnerProofVerifier`
|
|
126
|
+
|
|
127
|
+
##### policy
|
|
128
|
+
|
|
129
|
+
> **policy**: `DefaultPolicyEngine`
|
|
130
|
+
|
|
131
|
+
##### proofVerifier
|
|
132
|
+
|
|
133
|
+
> **proofVerifier**: `SignatureAgentProofVerifier`
|
|
134
|
+
|
|
135
|
+
##### replayGuard
|
|
136
|
+
|
|
137
|
+
> **replayGuard**: [`InMemoryReplayGuard`](../classes/InMemoryReplayGuard.md)
|
|
138
|
+
|
|
139
|
+
##### secrets
|
|
140
|
+
|
|
141
|
+
> **secrets**: `InMemorySecretRepository`
|
|
142
|
+
|
|
143
|
+
##### vaultId
|
|
144
|
+
|
|
145
|
+
> **vaultId**: [`VaultId`](VaultId.md)
|
|
146
|
+
|
|
147
|
+
***
|
|
148
|
+
|
|
149
|
+
### createIdentity
|
|
150
|
+
|
|
151
|
+
> **createIdentity**: (`options?`) => `CreatedIdentity`
|
|
152
|
+
|
|
153
|
+
Creates a new root identity with a fresh Ed25519 keypair.
|
|
154
|
+
|
|
155
|
+
#### Parameters
|
|
156
|
+
|
|
157
|
+
##### options?
|
|
158
|
+
|
|
159
|
+
[`CreateIdentityOptions`](CreateIdentityOptions.md)
|
|
160
|
+
|
|
161
|
+
Configuration for the new identity.
|
|
162
|
+
|
|
163
|
+
#### Returns
|
|
164
|
+
|
|
165
|
+
`CreatedIdentity`
|
|
166
|
+
|
|
167
|
+
A CreatedIdentity containing the ID and keys.
|
|
168
|
+
|
|
169
|
+
#### Example
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
const identity = createIdentity({ nickname: 'my-agent' });
|
|
173
|
+
console.log(identity.identityId);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
***
|
|
177
|
+
|
|
178
|
+
### createOwnerHttpFlowBoundary
|
|
179
|
+
|
|
180
|
+
> **createOwnerHttpFlowBoundary**: (`boundary`) => [`OwnerHttpFlowBoundary`](OwnerHttpFlowBoundary.md)
|
|
181
|
+
|
|
182
|
+
#### Parameters
|
|
183
|
+
|
|
184
|
+
##### boundary
|
|
185
|
+
|
|
186
|
+
[`OwnerHttpFlowBoundary`](OwnerHttpFlowBoundary.md)
|
|
187
|
+
|
|
188
|
+
#### Returns
|
|
189
|
+
|
|
190
|
+
[`OwnerHttpFlowBoundary`](OwnerHttpFlowBoundary.md)
|
|
191
|
+
|
|
192
|
+
***
|
|
193
|
+
|
|
194
|
+
### createPersistentVaultCoreDependencies
|
|
195
|
+
|
|
196
|
+
> **createPersistentVaultCoreDependencies**: (`storage`, `options`) => `object`
|
|
197
|
+
|
|
198
|
+
#### Parameters
|
|
199
|
+
|
|
200
|
+
##### storage
|
|
201
|
+
|
|
202
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
203
|
+
|
|
204
|
+
##### options
|
|
205
|
+
|
|
206
|
+
[`CreatePersistentVaultCoreDependenciesOptions`](CreatePersistentVaultCoreDependenciesOptions.md)
|
|
207
|
+
|
|
208
|
+
#### Returns
|
|
209
|
+
|
|
210
|
+
`object`
|
|
211
|
+
|
|
212
|
+
##### agentIdentities
|
|
213
|
+
|
|
214
|
+
> **agentIdentities**: `FileAgentIdentityRegistry`
|
|
215
|
+
|
|
216
|
+
##### audit
|
|
217
|
+
|
|
218
|
+
> **audit**: `FileAuditLog`
|
|
219
|
+
|
|
220
|
+
##### capabilities
|
|
221
|
+
|
|
222
|
+
> **capabilities**: `FileCapabilityRegistry`
|
|
223
|
+
|
|
224
|
+
##### capabilityRevocations
|
|
225
|
+
|
|
226
|
+
> **capabilityRevocations**: [`CapabilityRevocationRegistry`](CapabilityRevocationRegistry.md)
|
|
227
|
+
|
|
228
|
+
##### clock
|
|
229
|
+
|
|
230
|
+
> **clock**: `SystemClock`
|
|
231
|
+
|
|
232
|
+
##### custody
|
|
233
|
+
|
|
234
|
+
> **custody**: `FileSecretCustody`
|
|
235
|
+
|
|
236
|
+
##### customFlows
|
|
237
|
+
|
|
238
|
+
> **customFlows**: [`CustomHttpFlowRegistry`](CustomHttpFlowRegistry.md)
|
|
239
|
+
|
|
240
|
+
##### executor
|
|
241
|
+
|
|
242
|
+
> **executor**: `HttpDispatchExecutor`
|
|
243
|
+
|
|
244
|
+
##### ids
|
|
245
|
+
|
|
246
|
+
> **ids**: `RandomIdGenerator`
|
|
247
|
+
|
|
248
|
+
##### ownerIdentities
|
|
249
|
+
|
|
250
|
+
> **ownerIdentities**: `FileOwnerIdentityRegistry`
|
|
251
|
+
|
|
252
|
+
##### ownerProofVerifier
|
|
253
|
+
|
|
254
|
+
> **ownerProofVerifier**: `SignatureOwnerProofVerifier`
|
|
255
|
+
|
|
256
|
+
##### policy
|
|
257
|
+
|
|
258
|
+
> **policy**: `DefaultPolicyEngine`
|
|
259
|
+
|
|
260
|
+
##### proofVerifier
|
|
261
|
+
|
|
262
|
+
> **proofVerifier**: `SignatureAgentProofVerifier`
|
|
263
|
+
|
|
264
|
+
##### replayGuard
|
|
265
|
+
|
|
266
|
+
> **replayGuard**: [`ReplayGuard`](ReplayGuard.md)
|
|
267
|
+
|
|
268
|
+
##### secrets
|
|
269
|
+
|
|
270
|
+
> **secrets**: `FileSecretRepository`
|
|
271
|
+
|
|
272
|
+
##### vaultId
|
|
273
|
+
|
|
274
|
+
> **vaultId**: [`VaultId`](VaultId.md)
|
|
275
|
+
|
|
276
|
+
***
|
|
277
|
+
|
|
278
|
+
### createStandardAcquireBoundary
|
|
279
|
+
|
|
280
|
+
> **createStandardAcquireBoundary**: (`input`) => [`OwnerHttpFlowBoundary`](OwnerHttpFlowBoundary.md)
|
|
281
|
+
|
|
282
|
+
#### Parameters
|
|
283
|
+
|
|
284
|
+
##### input
|
|
285
|
+
|
|
286
|
+
###### method?
|
|
287
|
+
|
|
288
|
+
`string`
|
|
289
|
+
|
|
290
|
+
###### responseField
|
|
291
|
+
|
|
292
|
+
`"access_token"` \| `"refresh_token"` \| `"id_token"`
|
|
293
|
+
|
|
294
|
+
###### storeAlias
|
|
295
|
+
|
|
296
|
+
`string`
|
|
297
|
+
|
|
298
|
+
###### targetUrl
|
|
299
|
+
|
|
300
|
+
`string`
|
|
301
|
+
|
|
302
|
+
#### Returns
|
|
303
|
+
|
|
304
|
+
[`OwnerHttpFlowBoundary`](OwnerHttpFlowBoundary.md)
|
|
305
|
+
|
|
306
|
+
***
|
|
307
|
+
|
|
308
|
+
### createStandardDispatchBoundary
|
|
309
|
+
|
|
310
|
+
> **createStandardDispatchBoundary**: (`input`) => [`OwnerHttpFlowBoundary`](OwnerHttpFlowBoundary.md)
|
|
311
|
+
|
|
312
|
+
#### Parameters
|
|
313
|
+
|
|
314
|
+
##### input
|
|
315
|
+
|
|
316
|
+
###### method
|
|
317
|
+
|
|
318
|
+
`string`
|
|
319
|
+
|
|
320
|
+
###### targetUrl
|
|
321
|
+
|
|
322
|
+
`string`
|
|
323
|
+
|
|
324
|
+
#### Returns
|
|
325
|
+
|
|
326
|
+
[`OwnerHttpFlowBoundary`](OwnerHttpFlowBoundary.md)
|
|
327
|
+
|
|
328
|
+
***
|
|
329
|
+
|
|
330
|
+
### createVault
|
|
331
|
+
|
|
332
|
+
> **createVault**: \{(`storage`, `options`): `Promise`\<[`CreatedVault`](CreatedVault.md)\>; (`options`): `Promise`\<[`CreatedVault`](CreatedVault.md)\>; \}
|
|
333
|
+
|
|
334
|
+
#### Call Signature
|
|
335
|
+
|
|
336
|
+
> (`storage`, `options`): `Promise`\<[`CreatedVault`](CreatedVault.md)\>
|
|
337
|
+
|
|
338
|
+
Creates and bootstraps a new persistent vault.
|
|
339
|
+
|
|
340
|
+
##### Parameters
|
|
341
|
+
|
|
342
|
+
###### storage
|
|
343
|
+
|
|
344
|
+
`string` \| [`IStorageProvider`](IStorageProvider.md)
|
|
345
|
+
|
|
346
|
+
Workspace storage (or path string) where vaults are stored.
|
|
347
|
+
|
|
348
|
+
###### options
|
|
349
|
+
|
|
350
|
+
[`CreateVaultOptions`](CreateVaultOptions.md)
|
|
351
|
+
|
|
352
|
+
Configuration including owner identity and metadata.
|
|
353
|
+
|
|
354
|
+
##### Returns
|
|
355
|
+
|
|
356
|
+
`Promise`\<[`CreatedVault`](CreatedVault.md)\>
|
|
357
|
+
|
|
358
|
+
A [CreatedVault](CreatedVault.md) instance.
|
|
359
|
+
|
|
360
|
+
##### Example
|
|
361
|
+
|
|
362
|
+
```ts
|
|
363
|
+
const vault = await createVault({
|
|
364
|
+
ownerIdentity,
|
|
365
|
+
nickname: 'production-secrets'
|
|
366
|
+
});
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
#### Call Signature
|
|
370
|
+
|
|
371
|
+
> (`options`): `Promise`\<[`CreatedVault`](CreatedVault.md)\>
|
|
372
|
+
|
|
373
|
+
Creates a new vault using the default workspace storage.
|
|
374
|
+
|
|
375
|
+
##### Parameters
|
|
376
|
+
|
|
377
|
+
###### options
|
|
378
|
+
|
|
379
|
+
[`CreateVaultOptions`](CreateVaultOptions.md)
|
|
380
|
+
|
|
381
|
+
Configuration for the new vault.
|
|
382
|
+
|
|
383
|
+
##### Returns
|
|
384
|
+
|
|
385
|
+
`Promise`\<[`CreatedVault`](CreatedVault.md)\>
|
|
386
|
+
|
|
387
|
+
***
|
|
388
|
+
|
|
389
|
+
### createVaultClient
|
|
390
|
+
|
|
391
|
+
> **createVaultClient**: (`options`) => [`VaultClient`](VaultClient.md)
|
|
392
|
+
|
|
393
|
+
Creates a [VaultClient](VaultClient.md) instance for a specific vault owner.
|
|
394
|
+
|
|
395
|
+
#### Parameters
|
|
396
|
+
|
|
397
|
+
##### options
|
|
398
|
+
|
|
399
|
+
[`CreateVaultClientOptions`](CreateVaultClientOptions.md)
|
|
400
|
+
|
|
401
|
+
Configuration including owner identity and the vault service.
|
|
402
|
+
|
|
403
|
+
#### Returns
|
|
404
|
+
|
|
405
|
+
[`VaultClient`](VaultClient.md)
|
|
406
|
+
|
|
407
|
+
An initialized [VaultClient](VaultClient.md).
|
|
408
|
+
|
|
409
|
+
#### Example
|
|
410
|
+
|
|
411
|
+
```ts
|
|
412
|
+
const client = createVaultClient({
|
|
413
|
+
ownerIdentity,
|
|
414
|
+
vault
|
|
415
|
+
});
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
***
|
|
419
|
+
|
|
420
|
+
### createVaultCore
|
|
421
|
+
|
|
422
|
+
> **createVaultCore**: (`deps`) => [`VaultCore`](VaultCore.md)
|
|
423
|
+
|
|
424
|
+
#### Parameters
|
|
425
|
+
|
|
426
|
+
##### deps
|
|
427
|
+
|
|
428
|
+
[`VaultCoreDependencies`](VaultCoreDependencies.md)
|
|
429
|
+
|
|
430
|
+
#### Returns
|
|
431
|
+
|
|
432
|
+
[`VaultCore`](VaultCore.md)
|
|
433
|
+
|
|
434
|
+
***
|
|
435
|
+
|
|
436
|
+
### createVaultService
|
|
437
|
+
|
|
438
|
+
> **createVaultService**: (`deps`, `options`) => [`VaultService`](VaultService.md)
|
|
439
|
+
|
|
440
|
+
#### Parameters
|
|
441
|
+
|
|
442
|
+
##### deps
|
|
443
|
+
|
|
444
|
+
[`VaultCoreDependencies`](VaultCoreDependencies.md)
|
|
445
|
+
|
|
446
|
+
##### options?
|
|
447
|
+
|
|
448
|
+
###### clock?
|
|
449
|
+
|
|
450
|
+
[`Clock`](Clock.md)
|
|
451
|
+
|
|
452
|
+
###### customFlows?
|
|
453
|
+
|
|
454
|
+
[`VaultCustomFlowResolver`](VaultCustomFlowResolver.md)
|
|
455
|
+
|
|
456
|
+
###### fetchImpl?
|
|
457
|
+
|
|
458
|
+
\{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \}
|
|
459
|
+
|
|
460
|
+
#### Returns
|
|
461
|
+
|
|
462
|
+
[`VaultService`](VaultService.md)
|
|
463
|
+
|
|
464
|
+
***
|
|
465
|
+
|
|
466
|
+
### deriveChildIdentity
|
|
467
|
+
|
|
468
|
+
> **deriveChildIdentity**: (`parent`, `childIndex`, `options`) => [`ChildIdentity`](ChildIdentity.md)
|
|
469
|
+
|
|
470
|
+
Deterministically derives a child identity from a parent's private key and an index.
|
|
471
|
+
|
|
472
|
+
#### Parameters
|
|
473
|
+
|
|
474
|
+
##### parent
|
|
475
|
+
|
|
476
|
+
`string` \| `CreatedIdentity`
|
|
477
|
+
|
|
478
|
+
The parent identity object or its private key string.
|
|
479
|
+
|
|
480
|
+
##### childIndex
|
|
481
|
+
|
|
482
|
+
`number`
|
|
483
|
+
|
|
484
|
+
A non-negative integer for derivation.
|
|
485
|
+
|
|
486
|
+
##### options?
|
|
487
|
+
|
|
488
|
+
[`DeriveIdentityOptions`](DeriveIdentityOptions.md) = `{}`
|
|
489
|
+
|
|
490
|
+
Optional nickname for the child.
|
|
491
|
+
|
|
492
|
+
#### Returns
|
|
493
|
+
|
|
494
|
+
[`ChildIdentity`](ChildIdentity.md)
|
|
495
|
+
|
|
496
|
+
A [ChildIdentity](ChildIdentity.md) with derivation metadata.
|
|
497
|
+
|
|
498
|
+
#### Example
|
|
499
|
+
|
|
500
|
+
```ts
|
|
501
|
+
const child = deriveChildIdentity(parentIdentity, 0, { nickname: 'sub-agent-0' });
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
***
|
|
505
|
+
|
|
506
|
+
### deriveVaultWorkingKey
|
|
507
|
+
|
|
508
|
+
> **deriveVaultWorkingKey**: `object`
|
|
509
|
+
|
|
510
|
+
***
|
|
511
|
+
|
|
512
|
+
### ensureIdentityPrivateVault
|
|
513
|
+
|
|
514
|
+
> **ensureIdentityPrivateVault**: (`storage`, `identity`) => `Promise`\<`void`\>
|
|
515
|
+
|
|
516
|
+
#### Parameters
|
|
517
|
+
|
|
518
|
+
##### storage
|
|
519
|
+
|
|
520
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
521
|
+
|
|
522
|
+
##### identity
|
|
523
|
+
|
|
524
|
+
`CreatedIdentity`
|
|
525
|
+
|
|
526
|
+
#### Returns
|
|
527
|
+
|
|
528
|
+
`Promise`\<`void`\>
|
|
529
|
+
|
|
530
|
+
***
|
|
531
|
+
|
|
532
|
+
### FsStorageProvider
|
|
533
|
+
|
|
534
|
+
> **FsStorageProvider**: *typeof* `FsStorageProvider`
|
|
535
|
+
|
|
536
|
+
***
|
|
537
|
+
|
|
538
|
+
### handleVaultHttpDispatch
|
|
539
|
+
|
|
540
|
+
> **handleVaultHttpDispatch**: (`service`, `body`) => `Promise`\<[`VaultAgentDispatchResponse`](VaultAgentDispatchResponse.md) \| [`VaultAgentDispatchErrorResponse`](VaultAgentDispatchErrorResponse.md)\>
|
|
541
|
+
|
|
542
|
+
Standard server-side helper to handle a vault agent dispatch request from an HTTP body.
|
|
543
|
+
This can be used in any HTTP server framework (Express, Fastify, etc.).
|
|
544
|
+
|
|
545
|
+
#### Parameters
|
|
546
|
+
|
|
547
|
+
##### service
|
|
548
|
+
|
|
549
|
+
[`VaultService`](VaultService.md)
|
|
550
|
+
|
|
551
|
+
The VaultService instance to handle the request.
|
|
552
|
+
|
|
553
|
+
##### body
|
|
554
|
+
|
|
555
|
+
`unknown`
|
|
556
|
+
|
|
557
|
+
The parsed JSON body of the incoming HTTP request.
|
|
558
|
+
|
|
559
|
+
#### Returns
|
|
560
|
+
|
|
561
|
+
`Promise`\<[`VaultAgentDispatchResponse`](VaultAgentDispatchResponse.md) \| [`VaultAgentDispatchErrorResponse`](VaultAgentDispatchErrorResponse.md)\>
|
|
562
|
+
|
|
563
|
+
A JSON-serializable response object.
|
|
564
|
+
|
|
565
|
+
***
|
|
566
|
+
|
|
567
|
+
### IdentityError
|
|
568
|
+
|
|
569
|
+
> **IdentityError**: *typeof* [`IdentityError`](../classes/IdentityError.md)
|
|
570
|
+
|
|
571
|
+
***
|
|
572
|
+
|
|
573
|
+
### IdentityErrorCode
|
|
574
|
+
|
|
575
|
+
> **IdentityErrorCode**: *typeof* [`IdentityErrorCode`](../enumerations/IdentityErrorCode.md)
|
|
576
|
+
|
|
577
|
+
***
|
|
578
|
+
|
|
579
|
+
### initializeVaultCustody
|
|
580
|
+
|
|
581
|
+
> **initializeVaultCustody**: (`storage`, `options`) => `Promise`\<[`InitializedVaultCustody`](InitializedVaultCustody.md)\>
|
|
582
|
+
|
|
583
|
+
#### Parameters
|
|
584
|
+
|
|
585
|
+
##### storage
|
|
586
|
+
|
|
587
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
588
|
+
|
|
589
|
+
##### options?
|
|
590
|
+
|
|
591
|
+
[`InitializeVaultCustodyOptions`](InitializeVaultCustodyOptions.md) = `{}`
|
|
592
|
+
|
|
593
|
+
#### Returns
|
|
594
|
+
|
|
595
|
+
`Promise`\<[`InitializedVaultCustody`](InitializedVaultCustody.md)\>
|
|
596
|
+
|
|
597
|
+
***
|
|
598
|
+
|
|
599
|
+
### listIdentities
|
|
600
|
+
|
|
601
|
+
> **listIdentities**: (`storage`) => `Promise`\<`any`[]\>
|
|
602
|
+
|
|
603
|
+
Lists all identities in the workspace with their discovery metadata.
|
|
604
|
+
|
|
605
|
+
#### Parameters
|
|
606
|
+
|
|
607
|
+
##### storage
|
|
608
|
+
|
|
609
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
610
|
+
|
|
611
|
+
#### Returns
|
|
612
|
+
|
|
613
|
+
`Promise`\<`any`[]\>
|
|
614
|
+
|
|
615
|
+
***
|
|
616
|
+
|
|
617
|
+
### listVaults
|
|
618
|
+
|
|
619
|
+
> **listVaults**: (`storage`) => `Promise`\<`object`[]\>
|
|
620
|
+
|
|
621
|
+
Lists all available vaults in the workspace by scanning for signed profiles.
|
|
622
|
+
|
|
623
|
+
#### Parameters
|
|
624
|
+
|
|
625
|
+
##### storage
|
|
626
|
+
|
|
627
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
628
|
+
|
|
629
|
+
The root workspace storage provider.
|
|
630
|
+
|
|
631
|
+
#### Returns
|
|
632
|
+
|
|
633
|
+
`Promise`\<`object`[]\>
|
|
634
|
+
|
|
635
|
+
A list of vault IDs and their public discovery metadata.
|
|
636
|
+
|
|
637
|
+
***
|
|
638
|
+
|
|
639
|
+
### LocalSigner
|
|
640
|
+
|
|
641
|
+
> **LocalSigner**: *typeof* `LocalSigner`
|
|
642
|
+
|
|
643
|
+
***
|
|
644
|
+
|
|
645
|
+
### LocalVaultTransport
|
|
646
|
+
|
|
647
|
+
> **LocalVaultTransport**: *typeof* `LocalVaultTransport`
|
|
648
|
+
|
|
649
|
+
***
|
|
650
|
+
|
|
651
|
+
### MemoryStorageProvider
|
|
652
|
+
|
|
653
|
+
> **MemoryStorageProvider**: *typeof* `MemoryStorageProvider`
|
|
654
|
+
|
|
655
|
+
***
|
|
656
|
+
|
|
657
|
+
### PersistentVaultCapabilityRevocationRegistry
|
|
658
|
+
|
|
659
|
+
> **PersistentVaultCapabilityRevocationRegistry**: *typeof* `FileCapabilityRevocationRegistry`
|
|
660
|
+
|
|
661
|
+
***
|
|
662
|
+
|
|
663
|
+
### readIdentityMetadata
|
|
664
|
+
|
|
665
|
+
> **readIdentityMetadata**: (`storage`, `identityId`, `privateKey?`) => `Promise`\<`any`\>
|
|
666
|
+
|
|
667
|
+
Metadata reader for identities.
|
|
668
|
+
Discovery info (nickname) can be read with just identityId.
|
|
669
|
+
Full profile requires privateKey.
|
|
670
|
+
|
|
671
|
+
#### Parameters
|
|
672
|
+
|
|
673
|
+
##### storage
|
|
674
|
+
|
|
675
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
676
|
+
|
|
677
|
+
##### identityId
|
|
678
|
+
|
|
679
|
+
`string`
|
|
680
|
+
|
|
681
|
+
##### privateKey?
|
|
682
|
+
|
|
683
|
+
`string`
|
|
684
|
+
|
|
685
|
+
#### Returns
|
|
686
|
+
|
|
687
|
+
`Promise`\<`any`\>
|
|
688
|
+
|
|
689
|
+
***
|
|
690
|
+
|
|
691
|
+
### readIdentityPrivateVaultChildrenState
|
|
692
|
+
|
|
693
|
+
> **readIdentityPrivateVaultChildrenState**: (`storage`, `identityOrPrivateKey`) => `Promise`\<[`IdentityPrivateVaultChildrenState`](IdentityPrivateVaultChildrenState.md)\>
|
|
694
|
+
|
|
695
|
+
#### Parameters
|
|
696
|
+
|
|
697
|
+
##### storage
|
|
698
|
+
|
|
699
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
700
|
+
|
|
701
|
+
##### identityOrPrivateKey
|
|
702
|
+
|
|
703
|
+
[`IdentityPrivateVaultAccess`](../type-aliases/IdentityPrivateVaultAccess.md)
|
|
704
|
+
|
|
705
|
+
#### Returns
|
|
706
|
+
|
|
707
|
+
`Promise`\<[`IdentityPrivateVaultChildrenState`](IdentityPrivateVaultChildrenState.md)\>
|
|
708
|
+
|
|
709
|
+
***
|
|
710
|
+
|
|
711
|
+
### readIdentityPrivateVaultProfile
|
|
712
|
+
|
|
713
|
+
> **readIdentityPrivateVaultProfile**: (`storage`, `identityOrPrivateKey`) => `Promise`\<[`IdentityPrivateVaultProfile`](IdentityPrivateVaultProfile.md) \| `null`\>
|
|
714
|
+
|
|
715
|
+
#### Parameters
|
|
716
|
+
|
|
717
|
+
##### storage
|
|
718
|
+
|
|
719
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
720
|
+
|
|
721
|
+
##### identityOrPrivateKey
|
|
722
|
+
|
|
723
|
+
[`IdentityPrivateVaultAccess`](../type-aliases/IdentityPrivateVaultAccess.md)
|
|
724
|
+
|
|
725
|
+
#### Returns
|
|
726
|
+
|
|
727
|
+
`Promise`\<[`IdentityPrivateVaultProfile`](IdentityPrivateVaultProfile.md) \| `null`\>
|
|
728
|
+
|
|
729
|
+
***
|
|
730
|
+
|
|
731
|
+
### recoverVault
|
|
732
|
+
|
|
733
|
+
> **recoverVault**: \{(`storage`, `options`): `Promise`\<[`RecoveredVault`](RecoveredVault.md)\>; (`options`): `Promise`\<[`RecoveredVault`](RecoveredVault.md)\>; \}
|
|
734
|
+
|
|
735
|
+
#### Call Signature
|
|
736
|
+
|
|
737
|
+
> (`storage`, `options`): `Promise`\<[`RecoveredVault`](RecoveredVault.md)\>
|
|
738
|
+
|
|
739
|
+
Reopens an existing vault from storage.
|
|
740
|
+
|
|
741
|
+
##### Parameters
|
|
742
|
+
|
|
743
|
+
###### storage
|
|
744
|
+
|
|
745
|
+
`string` \| [`IStorageProvider`](IStorageProvider.md)
|
|
746
|
+
|
|
747
|
+
Workspace storage where the vault was created.
|
|
748
|
+
|
|
749
|
+
###### options
|
|
750
|
+
|
|
751
|
+
[`RecoverVaultOptions`](RecoverVaultOptions.md)
|
|
752
|
+
|
|
753
|
+
Recovery options (must include `vaultId` and `ownerIdentity`).
|
|
754
|
+
|
|
755
|
+
##### Returns
|
|
756
|
+
|
|
757
|
+
`Promise`\<[`RecoveredVault`](RecoveredVault.md)\>
|
|
758
|
+
|
|
759
|
+
A [RecoveredVault](RecoveredVault.md) instance.
|
|
760
|
+
|
|
761
|
+
##### Example
|
|
762
|
+
|
|
763
|
+
```ts
|
|
764
|
+
const vault = await recoverVault({
|
|
765
|
+
vaultId: 'vault_123',
|
|
766
|
+
ownerIdentity
|
|
767
|
+
});
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
#### Call Signature
|
|
771
|
+
|
|
772
|
+
> (`options`): `Promise`\<[`RecoveredVault`](RecoveredVault.md)\>
|
|
773
|
+
|
|
774
|
+
Recovers an existing vault using the default workspace storage.
|
|
775
|
+
|
|
776
|
+
##### Parameters
|
|
777
|
+
|
|
778
|
+
###### options
|
|
779
|
+
|
|
780
|
+
[`RecoverVaultOptions`](RecoverVaultOptions.md)
|
|
781
|
+
|
|
782
|
+
Recovery options including vaultId and owner identity.
|
|
783
|
+
|
|
784
|
+
##### Returns
|
|
785
|
+
|
|
786
|
+
`Promise`\<[`RecoveredVault`](RecoveredVault.md)\>
|
|
787
|
+
|
|
788
|
+
***
|
|
789
|
+
|
|
790
|
+
### recoverVaultWorkingKey
|
|
791
|
+
|
|
792
|
+
> **recoverVaultWorkingKey**: (`storage`, `vaultRecoveryKey`, `storageKey`) => `Promise`\<`string`\>
|
|
793
|
+
|
|
794
|
+
#### Parameters
|
|
795
|
+
|
|
796
|
+
##### storage
|
|
797
|
+
|
|
798
|
+
[`IStorageProvider`](IStorageProvider.md)
|
|
799
|
+
|
|
800
|
+
##### vaultRecoveryKey
|
|
801
|
+
|
|
802
|
+
`string`
|
|
803
|
+
|
|
804
|
+
##### storageKey?
|
|
805
|
+
|
|
806
|
+
`string` = `DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY`
|
|
807
|
+
|
|
808
|
+
#### Returns
|
|
809
|
+
|
|
810
|
+
`Promise`\<`string`\>
|
|
811
|
+
|
|
812
|
+
***
|
|
813
|
+
|
|
814
|
+
### restoreIdentity
|
|
815
|
+
|
|
816
|
+
> **restoreIdentity**: (`privateKey`, `options`) => `CreatedIdentity`
|
|
817
|
+
|
|
818
|
+
Restores an identity from an existing private key.
|
|
819
|
+
|
|
820
|
+
#### Parameters
|
|
821
|
+
|
|
822
|
+
##### privateKey
|
|
823
|
+
|
|
824
|
+
`string`
|
|
825
|
+
|
|
826
|
+
The base64url-encoded PKCS#8 private key.
|
|
827
|
+
|
|
828
|
+
##### options?
|
|
829
|
+
|
|
830
|
+
[`RestoreIdentityOptions`](RestoreIdentityOptions.md) = `{}`
|
|
831
|
+
|
|
832
|
+
Optional metadata to attach to the restored object.
|
|
833
|
+
|
|
834
|
+
#### Returns
|
|
835
|
+
|
|
836
|
+
`CreatedIdentity`
|
|
837
|
+
|
|
838
|
+
The reconstructed CreatedIdentity.
|
|
839
|
+
|
|
840
|
+
#### Example
|
|
841
|
+
|
|
842
|
+
```ts
|
|
843
|
+
const identity = restoreIdentity('MIIB...');
|
|
844
|
+
```
|
|
845
|
+
|
|
846
|
+
***
|
|
847
|
+
|
|
848
|
+
### SystemClock
|
|
849
|
+
|
|
850
|
+
> **SystemClock**: *typeof* `SystemClock`
|
|
851
|
+
|
|
852
|
+
***
|
|
853
|
+
|
|
854
|
+
### VaultCoreError
|
|
855
|
+
|
|
856
|
+
> **VaultCoreError**: *typeof* [`VaultCoreError`](../classes/VaultCoreError.md)
|
|
857
|
+
|
|
858
|
+
***
|
|
859
|
+
|
|
860
|
+
### wrapVaultCoreAsVaultService
|
|
861
|
+
|
|
862
|
+
> **wrapVaultCoreAsVaultService**: (`core`, `options`) => [`VaultService`](VaultService.md)
|
|
863
|
+
|
|
864
|
+
#### Parameters
|
|
865
|
+
|
|
866
|
+
##### core
|
|
867
|
+
|
|
868
|
+
[`VaultCore`](VaultCore.md)
|
|
869
|
+
|
|
870
|
+
##### options?
|
|
871
|
+
|
|
872
|
+
###### clock?
|
|
873
|
+
|
|
874
|
+
[`Clock`](Clock.md)
|
|
875
|
+
|
|
876
|
+
###### customFlows?
|
|
877
|
+
|
|
878
|
+
[`VaultCustomFlowResolver`](VaultCustomFlowResolver.md)
|
|
879
|
+
|
|
880
|
+
###### fetchImpl?
|
|
881
|
+
|
|
882
|
+
\{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \}
|
|
883
|
+
|
|
884
|
+
#### Returns
|
|
885
|
+
|
|
886
|
+
[`VaultService`](VaultService.md)
|