-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathagent.yml
140 lines (127 loc) · 3.89 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
version: 3.0
constants:
baseUrl: http://localhost:3335
port: 3335
# please use your own X25519 key, this is only an example
secretKey: 29739248cad1bd1a0fc4d9b75cd4d2990de535baf5caadfdf8d8f86664aa830c
methods:
- authenticateWithSiop
- getSiopAuthorizationRequestFromRP
- getSiopAuthorizationRequestDetails
- verifySiopAuthorizationRequestURI
- sendSiopAuthorizationResponse
# Database
dbConnection:
$require: typeorm#DataSource
$args:
- type: sqlite
database: ':memory:'
synchronize: false
migrationsRun: true
migrations:
- $require: '@veramo/data-store?t=object#migrations'
- $require: './packages/data-store?t=object#DataStoreDigitalCredentialMigrations'
logging: false
entities:
- $require: '@veramo/data-store?t=object#Entities'
- $require: './packages/data-store?t=object#DataStoreDigitalCredentialEntities'
server:
baseUrl:
$ref: /constants/baseUrl
port:
$ref: /constants/port
use:
# CORS
- - $require: 'cors'
# Add agent to the request object
- - $require: '@veramo/remote-server?t=function#RequestWithAgentRouter'
$args:
- agent:
$ref: /agent
# API base path
- - /agent
- $require: '@veramo/remote-server?t=function#apiKeyAuth'
$args:
# Please configure your own API key. This is used when executing agent methods through ${baseUrl}/agent or ${baseUrl}/api-docs
- 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: :3335/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
# DID resolvers
didResolver:
$require: '@veramo/did-resolver#DIDResolverPlugin'
$args:
- resolver:
$require: did-resolver#Resolver
$args:
- elem:
$ref: /universal-resolver
io:
$ref: /universal-resolver
ion:
$ref: /universal-resolver
sov:
$ref: /universal-resolver
ethr:
$ref: /ethr-did-resolver
ethr-did-resolver:
$require: ethr-did-resolver?t=function&p=/ethr#getResolver
$args:
- infuraProjectId: 5ffc47f65c4042ce847ef66a3fa70d4c
universal-resolver:
$require: '@veramo/did-resolver#UniversalResolver'
$args:
- url: https://dev.uniresolver.io/1.0/identifiers/
# Credential Manager
credentialStore:
$require: ./packages/credential-store/dist#CredentialStore
$args:
- store:
$require: './packages/data-store/dist#DigitalCredentialStore'
$args:
- $ref: /dbConnection
# Agent
agent:
$require: '@veramo/core#Agent'
$args:
- schemaValidation: false
plugins:
- $ref: /credentialStore
- $ref: /didResolver
- $require: ./packages/siopv2-openid4vp-op-auth/dist#DidAuthSiopOpAuthenticator
$args:
- presentationSignCallback: {}
- $require: '@veramo/data-store#DataStore'
$args:
- $ref: /dbConnection
- $require: '@veramo/data-store#DataStoreORM'
$args:
- $ref: /dbConnection