generated from decentralized-identity/veramo-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
agent.yml
300 lines (278 loc) · 8.68 KB
/
agent.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
version: 3.0
constants:
baseUrl: http://localhost:3332
port: 3332
# please use your own X25519 key, this is only an example
# you can generate a new key by running `veramo config gen-key` in a terminal
dbEncryptionKey: 29739248cad1bd1a0fc4d9b75cd4d2990de535baf5caadfdf8d8f86664aa830c
databaseFile: ./database.sqlite
methods:
- keyManagerGetKeyManagementSystems
- keyManagerCreate
- keyManagerGet
- keyManagerDelete
- keyManagerImport
- keyManagerEncryptJWE
- keyManagerDecryptJWE
- keyManagerSign
- keyManagerSharedSecret
- keyManagerSignJWT
- keyManagerSignEthTX
- didManagerGetProviders
- didManagerFind
- didManagerGet
- didManagerGetByAlias
- didManagerCreate
- didManagerGetOrCreate
- didManagerUpdate
- didManagerImport
- didManagerDelete
- didManagerAddKey
- didManagerRemoveKey
- didManagerAddService
- didManagerRemoveService
- resolveDid
- getDIDComponentById
- discoverDid
- dataStoreGetMessage
- dataStoreSaveMessage
- dataStoreGetVerifiableCredential
- dataStoreSaveVerifiableCredential
- dataStoreGetVerifiablePresentation
- dataStoreSaveVerifiablePresentation
- dataStoreORMGetIdentifiers
- dataStoreORMGetIdentifiersCount
- dataStoreORMGetMessages
- dataStoreORMGetMessagesCount
- dataStoreORMGetVerifiableCredentialsByClaims
- dataStoreORMGetVerifiableCredentialsByClaimsCount
- dataStoreORMGetVerifiableCredentials
- dataStoreORMGetVerifiableCredentialsCount
- dataStoreORMGetVerifiablePresentations
- dataStoreORMGetVerifiablePresentationsCount
- handleMessage
- packDIDCommMessage
- unpackDIDCommMessage
- sendDIDCommMessage
- sendMessageDIDCommAlpha1
- createVerifiableCredential
- createVerifiablePresentation
- verifyCredential
- verifyPresentation
- createSelectiveDisclosureRequest
- getVerifiableCredentialsForSdr
- validatePresentationAgainstSdr
- cheqdCreateIdentifier
- cheqdUpdateIdentifier
- cheqdDeactivateIdentifier
- cheqdCreateLinkedResource
- cheqdGenerateDidDoc
- cheqdGenerateDidDocWithLinkedResource
- cheqdGenerateIdentityKeys
- cheqdGenerateVersionId
# Data base
dbConnection:
$require: typeorm#DataSource
$args:
- type: sqlite
database:
$ref: /constants/databaseFile
synchronize: false
migrationsRun: true
migrations:
$require: '@veramo/data-store?t=object#migrations'
logging: false
entities:
$require: '@veramo/data-store?t=object#Entities'
# Server configuration
server:
baseUrl:
$ref: /constants/baseUrl
port:
$ref: /constants/port
use:
# CORS
- - $require: 'cors?t=function#default'
# Add agent to the request object
- - $require: '@veramo/remote-server?t=function#RequestWithAgentRouter'
$args:
- agent:
$ref: /agent
# DID Documents
- - $require: '@veramo/remote-server?t=function#WebDidDocRouter'
# API base path
- - /messaging
- $require: '@veramo/remote-server?t=function#MessagingRouter'
$args:
- metaData:
type: DIDComm
value: https
# API base path
- - /agent
- $require: '@veramo/remote-server?t=function#apiKeyAuth'
$args:
- apiKey: test123
- $require: '@veramo/remote-server?t=function#AgentRouter'
$args:
- exposedMethods:
$ref: /constants/methods
# Open API schema
- - /open-api.json
- $require: '@veramo/remote-server?t=function#ApiSchemaRouter'
$args:
- basePath: :3332/agent
securityScheme: bearer
apiName: Agent
apiVersion: '1.0.0'
exposedMethods:
$ref: /constants/methods
# Swagger docs
- - /api-docs
- $require: swagger-ui-express?t=object#serve
- $require: swagger-ui-express?t=function#setup
$args:
- null
- swaggerOptions:
url: '/open-api.json'
# Execute during server initialization
init:
- $require: '@veramo/remote-server?t=function#createDefaultDid'
$args:
- agent:
$ref: /agent
baseUrl:
$ref: /constants/baseUrl
messagingServiceEndpoint: /messaging
# Message handler plugin
messageHandler:
$require: '@veramo/message-handler#MessageHandler'
$args:
- messageHandlers:
- $require: '@veramo/did-comm#DIDCommMessageHandler'
- $require: '@veramo/did-comm#TrustPingMessageHandler'
- $require: '@veramo/did-jwt#JwtMessageHandler'
- $require: '@veramo/credential-w3c#W3cMessageHandler'
- $require: '@veramo/selective-disclosure#SdrMessageHandler'
# DID resolvers
didResolver:
$require: '@veramo/did-resolver#DIDResolverPlugin'
$args:
- resolver:
$require: did-resolver#Resolver
$args:
- key:
$ref: /did-key-resolver
cheqd:
$ref: /did-cheqd-resolver
# cheqd:
# $ref: /universal-resolver
did-key-resolver:
$require: '@veramo/did-provider-key?t=function&p=/key#getDidKeyResolver'
did-cheqd-resolver:
$require: '@cheqd/did-provider-cheqd?t=function&p=/cheqd#getResolver'
$args:
- url: 'https://resolver.cheqd.net/1.0/identifiers/'
# universal-resolver:
# $require: '@veramo/did-resolver#UniversalResolver'
# $args:
# - url: https://dev.uniresolver.io/1.0/identifiers/
# Key Manager
keyManager:
$require: '@veramo/key-manager#KeyManager'
$args:
- store:
$require: '@veramo/data-store#KeyStore'
$args:
- $ref: /dbConnection
kms:
local:
$require: '@veramo/kms-local#KeyManagementSystem'
$args:
- $require: '@veramo/data-store#PrivateKeyStore'
$args:
- $ref: /dbConnection
- $require: '@veramo/kms-local#SecretBox'
$args:
- $ref: /constants/dbEncryptionKey
didCheqdMainnetProvider:
$require: '@cheqd/did-provider-cheqd#CheqdDIDProvider'
$args:
- defaultKms: local
cosmosPayerSeed: <your payer mnemonic seed or private key>
networkType: mainnet
rpcUrl: 'https://rpc.cheqd.net'
dkgOptions:
chain: cheqdMainnet
network: datil-dev
didCheqdTestnetProvider:
$require: '@cheqd/did-provider-cheqd#CheqdDIDProvider'
$args:
- defaultKms: local
cosmosPayerSeed: <your payer mnemonic seed or private key>
networkType: testnet
rpcUrl: 'https://rpc.cheqd.network'
dkgOptions:
chain: cheqdTestnet
network: datil-dev
# DID Manager
didManager:
$require: '@veramo/did-manager#DIDManager'
$args:
- store:
$require: '@veramo/data-store#DIDStore'
$args:
- $ref: /dbConnection
defaultProvider: did:cheqd:testnet
providers:
did:cheqd:mainnet:
$ref: /didCheqdMainnetProvider
did:cheqd:testnet:
$ref: /didCheqdTestnetProvider
did:key:
$require: '@veramo/did-provider-key#KeyDIDProvider'
$args:
- defaultKms: local
didDiscovery:
$require: '@veramo/did-discovery#DIDDiscovery'
$args:
- providers:
- $require: '@veramo/did-manager#AliasDiscoveryProvider'
- $require: '@veramo/data-store#DataStoreDiscoveryProvider'
# W3C credentialPlugin
credentialIssuerLD:
$require: '@veramo/credential-ld#CredentialIssuerLD'
$args:
- suites:
- $require: '@veramo/credential-ld#VeramoEd25519Signature2018'
- $require: '@veramo/credential-ld#VeramoEcdsaSecp256k1RecoverySignature2020'
contextMaps:
# The LdDefaultContext is a "catch-all" for now.
- $require: '@veramo/credential-ld?t=object#LdDefaultContexts'
- $require: '@transmute/credentials-context?t=object#contexts'
# others should be included here
# Agent
agent:
$require: '@veramo/core#Agent'
$args:
- schemaValidation: false
plugins:
- $ref: /keyManager
- $ref: /didManager
- $ref: /didResolver
- $ref: /didDiscovery
- $ref: /messageHandler
- $require: '@veramo/did-comm#DIDComm'
- $require: '@veramo/credential-w3c#CredentialPlugin'
- $ref: /credentialIssuerLD
- $require: '@veramo/selective-disclosure#SelectiveDisclosure'
- $require: '@veramo/data-store#DataStore'
$args:
- $ref: /dbConnection
- $require: '@veramo/data-store#DataStoreORM'
$args:
- $ref: /dbConnection
- $require: '@cheqd/did-provider-cheqd#Cheqd'
$args:
- providers:
- $ref: /didCheqdTestnetProvider
- $ref: /didCheqdMainnetProvider