@sphereon/ssi-sdk.w3c-vc-api 0.18.2-unstable.25 → 0.18.2-unstable.7
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/VCAPIServer.d.ts +74 -0
- package/dist/VCAPIServer.d.ts.map +1 -0
- package/dist/VCAPIServer.js +333 -0
- package/dist/VCAPIServer.js.map +1 -0
- package/dist/api-functions.d.ts +8 -8
- package/dist/api-functions.d.ts.map +1 -1
- package/dist/api-functions.js +157 -167
- package/dist/api-functions.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +22 -22
- package/dist/request-agent-router.d.ts +30 -0
- package/dist/request-agent-router.d.ts.map +1 -0
- package/dist/request-agent-router.js +63 -0
- package/dist/request-agent-router.js.map +1 -0
- package/dist/types.d.ts +65 -65
- package/dist/types.js +2 -2
- package/dist/vc-api-server.d.ts +19 -19
- package/dist/vc-api-server.js +64 -64
- package/package.json +14 -16
- package/src/api-functions.ts +1 -11
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { TAgent } from '@veramo/core'
|
|
2
|
+
import { ProofFormat } from '@veramo/core/src/types/ICredentialIssuer'
|
|
3
|
+
import { Express } from 'express'
|
|
4
|
+
import { IRequiredPlugins } from './types'
|
|
5
|
+
export interface IVCAPIOpts {
|
|
6
|
+
issueCredentialOpts?: IIssueOpts
|
|
7
|
+
serverOpts?: IServerOpts
|
|
8
|
+
}
|
|
9
|
+
export interface IServerOpts {
|
|
10
|
+
port?: number
|
|
11
|
+
cookieSigningKey?: string
|
|
12
|
+
hostname?: string
|
|
13
|
+
}
|
|
14
|
+
export interface IIssueOpts {
|
|
15
|
+
issueCredentialPath?: string
|
|
16
|
+
getCredentialsPath?: string
|
|
17
|
+
getCredentialPath?: string
|
|
18
|
+
deleteCredentialPath?: string
|
|
19
|
+
verifyCredentialPath?: string
|
|
20
|
+
verifyPresentationPath?: string
|
|
21
|
+
persistIssuedCredentials?: boolean
|
|
22
|
+
/**
|
|
23
|
+
* The desired format for the VerifiablePresentation to be created.
|
|
24
|
+
*/
|
|
25
|
+
proofFormat: ProofFormat
|
|
26
|
+
/**
|
|
27
|
+
* Remove payload members during JWT-JSON transformation. Defaults to `true`.
|
|
28
|
+
* See https://www.w3.org/TR/vc-data-model/#jwt-encoding
|
|
29
|
+
*/
|
|
30
|
+
removeOriginalFields?: boolean
|
|
31
|
+
/**
|
|
32
|
+
* [Optional] The ID of the key that should sign this credential.
|
|
33
|
+
* If this is not specified, the first matching key will be used.
|
|
34
|
+
*/
|
|
35
|
+
keyRef?: string
|
|
36
|
+
/**
|
|
37
|
+
* When dealing with JSON-LD you also MUST provide the proper contexts.
|
|
38
|
+
* Set this to `true` ONLY if you want the `@context` URLs to be fetched in case they are not preloaded.
|
|
39
|
+
* The context definitions SHOULD rather be provided at startup instead of being fetched.
|
|
40
|
+
*
|
|
41
|
+
* Defaults to `false`
|
|
42
|
+
*/
|
|
43
|
+
fetchRemoteContexts?: boolean
|
|
44
|
+
}
|
|
45
|
+
export interface IIssueOptionsPayload {
|
|
46
|
+
created?: string
|
|
47
|
+
challenge?: string
|
|
48
|
+
domain?: string
|
|
49
|
+
credentialStatus?: {
|
|
50
|
+
type: string
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export interface ChallengeOptsPayload {
|
|
54
|
+
challenge?: string
|
|
55
|
+
domain?: string
|
|
56
|
+
}
|
|
57
|
+
export declare class VCAPIServer {
|
|
58
|
+
private readonly _express
|
|
59
|
+
private readonly _agent
|
|
60
|
+
private readonly _opts?
|
|
61
|
+
constructor(args: { agent: TAgent<IRequiredPlugins>; express?: Express; opts?: IVCAPIOpts })
|
|
62
|
+
get agent(): TAgent<IRequiredPlugins>
|
|
63
|
+
get opts(): IVCAPIOpts | undefined
|
|
64
|
+
get express(): Express
|
|
65
|
+
private setupExpress
|
|
66
|
+
private static sendErrorResponse
|
|
67
|
+
private getCredentialsEndpoint
|
|
68
|
+
private getCredentialEndpoint
|
|
69
|
+
private verifyCredentialEndpoint
|
|
70
|
+
private deleteCredentialEndpoint
|
|
71
|
+
private issueCredentialEndpoint
|
|
72
|
+
private getCredentialByIdOrHash
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=VCAPIServer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VCAPIServer.d.ts","sourceRoot":"","sources":["../src/VCAPIServer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,MAAM,EAAwB,MAAM,cAAc,CAAA;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AAKtE,OAAgB,EAAE,OAAO,EAAqB,MAAM,SAAS,CAAA;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,WAAW,UAAU;IACzB,mBAAmB,CAAC,EAAE,UAAU,CAAA;IAChC,UAAU,CAAC,EAAE,WAAW,CAAA;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAE/B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAElC;;OAEG;IACH,WAAW,EAAE,WAAW,CAAA;IAExB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAY;gBAEvB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,UAAU,CAAA;KAAE;IAgB3F,IAAI,KAAK,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAEpC;IAED,IAAI,IAAI,IAAI,UAAU,GAAG,SAAS,CAEjC;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,OAAO,CAAC,YAAY;IA4BpB,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAMhC,OAAO,CAAC,sBAAsB;IAa9B,OAAO,CAAC,qBAAqB;IAoB7B,OAAO,CAAC,wBAAwB;IA0BhC,OAAO,CAAC,wBAAwB;IAwBhC,OAAO,CAAC,uBAAuB;YA2BjB,uBAAuB;CA+BtC"}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
// noinspection JSUnusedGlobalSymbols
|
|
3
|
+
var __createBinding =
|
|
4
|
+
(this && this.__createBinding) ||
|
|
5
|
+
(Object.create
|
|
6
|
+
? function (o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k)
|
|
9
|
+
if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return m[k]
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(o, k2, desc)
|
|
18
|
+
}
|
|
19
|
+
: function (o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k
|
|
21
|
+
o[k2] = m[k]
|
|
22
|
+
})
|
|
23
|
+
var __setModuleDefault =
|
|
24
|
+
(this && this.__setModuleDefault) ||
|
|
25
|
+
(Object.create
|
|
26
|
+
? function (o, v) {
|
|
27
|
+
Object.defineProperty(o, 'default', { enumerable: true, value: v })
|
|
28
|
+
}
|
|
29
|
+
: function (o, v) {
|
|
30
|
+
o['default'] = v
|
|
31
|
+
})
|
|
32
|
+
var __importStar =
|
|
33
|
+
(this && this.__importStar) ||
|
|
34
|
+
function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod
|
|
36
|
+
var result = {}
|
|
37
|
+
if (mod != null) for (var k in mod) if (k !== 'default' && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k)
|
|
38
|
+
__setModuleDefault(result, mod)
|
|
39
|
+
return result
|
|
40
|
+
}
|
|
41
|
+
var __awaiter =
|
|
42
|
+
(this && this.__awaiter) ||
|
|
43
|
+
function (thisArg, _arguments, P, generator) {
|
|
44
|
+
function adopt(value) {
|
|
45
|
+
return value instanceof P
|
|
46
|
+
? value
|
|
47
|
+
: new P(function (resolve) {
|
|
48
|
+
resolve(value)
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
52
|
+
function fulfilled(value) {
|
|
53
|
+
try {
|
|
54
|
+
step(generator.next(value))
|
|
55
|
+
} catch (e) {
|
|
56
|
+
reject(e)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function rejected(value) {
|
|
60
|
+
try {
|
|
61
|
+
step(generator['throw'](value))
|
|
62
|
+
} catch (e) {
|
|
63
|
+
reject(e)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function step(result) {
|
|
67
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected)
|
|
68
|
+
}
|
|
69
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next())
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
var __importDefault =
|
|
73
|
+
(this && this.__importDefault) ||
|
|
74
|
+
function (mod) {
|
|
75
|
+
return mod && mod.__esModule ? mod : { default: mod }
|
|
76
|
+
}
|
|
77
|
+
Object.defineProperty(exports, '__esModule', { value: true })
|
|
78
|
+
exports.VCAPIServer = void 0
|
|
79
|
+
const body_parser_1 = __importDefault(require('body-parser'))
|
|
80
|
+
const cookie_parser_1 = __importDefault(require('cookie-parser'))
|
|
81
|
+
const dotenv = __importStar(require('dotenv-flow'))
|
|
82
|
+
const express_1 = __importDefault(require('express'))
|
|
83
|
+
const uuid_1 = require('uuid')
|
|
84
|
+
class VCAPIServer {
|
|
85
|
+
constructor(args) {
|
|
86
|
+
var _a
|
|
87
|
+
const { agent, opts } = args
|
|
88
|
+
this._agent = agent
|
|
89
|
+
this._opts = opts
|
|
90
|
+
const existingExpress = !!args.express
|
|
91
|
+
this._express = (_a = args.express) !== null && _a !== void 0 ? _a : (0, express_1.default)()
|
|
92
|
+
this.setupExpress(existingExpress)
|
|
93
|
+
// Credential endpoints
|
|
94
|
+
this.issueCredentialEndpoint()
|
|
95
|
+
this.getCredentialEndpoint()
|
|
96
|
+
this.getCredentialsEndpoint()
|
|
97
|
+
this.deleteCredentialEndpoint() // not in spec. TODO: Authz
|
|
98
|
+
this.verifyCredentialEndpoint()
|
|
99
|
+
}
|
|
100
|
+
get agent() {
|
|
101
|
+
return this._agent
|
|
102
|
+
}
|
|
103
|
+
get opts() {
|
|
104
|
+
return this._opts
|
|
105
|
+
}
|
|
106
|
+
get express() {
|
|
107
|
+
return this._express
|
|
108
|
+
}
|
|
109
|
+
setupExpress(existingExpress) {
|
|
110
|
+
var _a, _b, _c, _d, _e, _f
|
|
111
|
+
dotenv.config()
|
|
112
|
+
if (!existingExpress) {
|
|
113
|
+
const port =
|
|
114
|
+
((_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.serverOpts) === null || _b === void 0 ? void 0 : _b.port) ||
|
|
115
|
+
process.env.PORT ||
|
|
116
|
+
5000
|
|
117
|
+
const secret =
|
|
118
|
+
((_d = (_c = this.opts) === null || _c === void 0 ? void 0 : _c.serverOpts) === null || _d === void 0 ? void 0 : _d.cookieSigningKey) ||
|
|
119
|
+
process.env.COOKIE_SIGNING_KEY
|
|
120
|
+
const hostname =
|
|
121
|
+
((_f = (_e = this.opts) === null || _e === void 0 ? void 0 : _e.serverOpts) === null || _f === void 0 ? void 0 : _f.hostname) || '0.0.0.0'
|
|
122
|
+
this._express.use((req, res, next) => {
|
|
123
|
+
res.header('Access-Control-Allow-Origin', '*')
|
|
124
|
+
// Request methods you wish to allow
|
|
125
|
+
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE')
|
|
126
|
+
// Request headers you wish to allow
|
|
127
|
+
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type')
|
|
128
|
+
// Set to true if you need the website to include cookies in the requests sent
|
|
129
|
+
// to the API (e.g. in case you use sessions)
|
|
130
|
+
res.setHeader('Access-Control-Allow-Credentials', 'true')
|
|
131
|
+
next()
|
|
132
|
+
})
|
|
133
|
+
// this.express.use(cors({ credentials: true }));
|
|
134
|
+
// this.express.use('/proxy', proxy('www.gssoogle.com'));
|
|
135
|
+
this._express.use(body_parser_1.default.urlencoded({ extended: true }))
|
|
136
|
+
this._express.use(body_parser_1.default.json())
|
|
137
|
+
this._express.use((0, cookie_parser_1.default)(secret))
|
|
138
|
+
this._express.listen(port, hostname, () => console.log(`Listening on ${hostname}, port ${port}`))
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
static sendErrorResponse(response, statusCode, message) {
|
|
142
|
+
console.log(message)
|
|
143
|
+
response.statusCode = statusCode
|
|
144
|
+
response.status(statusCode).send(message)
|
|
145
|
+
}
|
|
146
|
+
getCredentialsEndpoint() {
|
|
147
|
+
var _a, _b, _c
|
|
148
|
+
this._express.get(
|
|
149
|
+
(_c =
|
|
150
|
+
(_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.issueCredentialOpts) === null || _b === void 0
|
|
151
|
+
? void 0
|
|
152
|
+
: _b.getCredentialsPath) !== null && _c !== void 0
|
|
153
|
+
? _c
|
|
154
|
+
: '/credentials',
|
|
155
|
+
(request, response) =>
|
|
156
|
+
__awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
try {
|
|
158
|
+
const uniqueVCs = yield this.agent.dataStoreORMGetVerifiableCredentials()
|
|
159
|
+
response.statusCode = 202
|
|
160
|
+
return response.send(uniqueVCs.map((uVC) => uVC.verifiableCredential))
|
|
161
|
+
} catch (e) {
|
|
162
|
+
console.log(e)
|
|
163
|
+
return VCAPIServer.sendErrorResponse(response, 500, e.message)
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
getCredentialEndpoint() {
|
|
169
|
+
var _a, _b, _c
|
|
170
|
+
this._express.get(
|
|
171
|
+
(_c =
|
|
172
|
+
(_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.issueCredentialOpts) === null || _b === void 0
|
|
173
|
+
? void 0
|
|
174
|
+
: _b.getCredentialPath) !== null && _c !== void 0
|
|
175
|
+
? _c
|
|
176
|
+
: '/credentials/:id',
|
|
177
|
+
(request, response) =>
|
|
178
|
+
__awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
try {
|
|
180
|
+
const id = request.params.id
|
|
181
|
+
if (!id) {
|
|
182
|
+
return VCAPIServer.sendErrorResponse(response, 400, 'no id provided')
|
|
183
|
+
}
|
|
184
|
+
let vcInfo = yield this.getCredentialByIdOrHash(id)
|
|
185
|
+
if (!vcInfo.vc) {
|
|
186
|
+
return VCAPIServer.sendErrorResponse(response, 404, `id ${id} not found`)
|
|
187
|
+
}
|
|
188
|
+
response.statusCode = 200
|
|
189
|
+
return response.send(vcInfo.vc)
|
|
190
|
+
} catch (e) {
|
|
191
|
+
console.log(e)
|
|
192
|
+
return VCAPIServer.sendErrorResponse(response, 500, e.message)
|
|
193
|
+
}
|
|
194
|
+
})
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
verifyCredentialEndpoint() {
|
|
198
|
+
var _a, _b, _c
|
|
199
|
+
this._express.post(
|
|
200
|
+
(_c =
|
|
201
|
+
(_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.issueCredentialOpts) === null || _b === void 0
|
|
202
|
+
? void 0
|
|
203
|
+
: _b.verifyCredentialPath) !== null && _c !== void 0
|
|
204
|
+
? _c
|
|
205
|
+
: '/credentials/verify',
|
|
206
|
+
(request, response) =>
|
|
207
|
+
__awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
var _d, _e
|
|
209
|
+
try {
|
|
210
|
+
console.log(request.body)
|
|
211
|
+
const credential = request.body.verifiableCredential
|
|
212
|
+
// const options: IIssueOptionsPayload = request.body.options
|
|
213
|
+
if (!credential) {
|
|
214
|
+
return VCAPIServer.sendErrorResponse(response, 400, 'No verifiable credential supplied')
|
|
215
|
+
}
|
|
216
|
+
const verifyResult = yield this.agent.verifyCredential({
|
|
217
|
+
credential,
|
|
218
|
+
fetchRemoteContexts:
|
|
219
|
+
(_e = (_d = this.opts) === null || _d === void 0 ? void 0 : _d.issueCredentialOpts) === null || _e === void 0
|
|
220
|
+
? void 0
|
|
221
|
+
: _e.fetchRemoteContexts,
|
|
222
|
+
})
|
|
223
|
+
response.statusCode = 200
|
|
224
|
+
return response.send(verifyResult)
|
|
225
|
+
} catch (e) {
|
|
226
|
+
console.log(e)
|
|
227
|
+
return VCAPIServer.sendErrorResponse(response, 500, e.message)
|
|
228
|
+
}
|
|
229
|
+
})
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
deleteCredentialEndpoint() {
|
|
233
|
+
var _a, _b, _c
|
|
234
|
+
this._express.delete(
|
|
235
|
+
(_c =
|
|
236
|
+
(_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.issueCredentialOpts) === null || _b === void 0
|
|
237
|
+
? void 0
|
|
238
|
+
: _b.getCredentialsPath) !== null && _c !== void 0
|
|
239
|
+
? _c
|
|
240
|
+
: '/credentials/:id',
|
|
241
|
+
(request, response) =>
|
|
242
|
+
__awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
try {
|
|
244
|
+
const id = request.params.id
|
|
245
|
+
if (!id) {
|
|
246
|
+
return VCAPIServer.sendErrorResponse(response, 400, 'no id provided')
|
|
247
|
+
}
|
|
248
|
+
let vcInfo = yield this.getCredentialByIdOrHash(id)
|
|
249
|
+
if (!vcInfo.vc || !vcInfo.hash) {
|
|
250
|
+
return VCAPIServer.sendErrorResponse(response, 404, `id ${id} not found`)
|
|
251
|
+
}
|
|
252
|
+
const success = this.agent.dataStoreDeleteVerifiableCredential({ hash: vcInfo.hash })
|
|
253
|
+
if (!success) {
|
|
254
|
+
return VCAPIServer.sendErrorResponse(response, 400, `Could not delete Verifiable Credential with id ${id}`)
|
|
255
|
+
}
|
|
256
|
+
response.statusCode = 200
|
|
257
|
+
return response.send()
|
|
258
|
+
} catch (e) {
|
|
259
|
+
console.log(e)
|
|
260
|
+
return VCAPIServer.sendErrorResponse(response, 500, e.message)
|
|
261
|
+
}
|
|
262
|
+
})
|
|
263
|
+
)
|
|
264
|
+
}
|
|
265
|
+
issueCredentialEndpoint() {
|
|
266
|
+
var _a, _b, _c
|
|
267
|
+
this._express.post(
|
|
268
|
+
(_c =
|
|
269
|
+
(_b = (_a = this.opts) === null || _a === void 0 ? void 0 : _a.issueCredentialOpts) === null || _b === void 0
|
|
270
|
+
? void 0
|
|
271
|
+
: _b.issueCredentialPath) !== null && _c !== void 0
|
|
272
|
+
? _c
|
|
273
|
+
: '/credentials/issue',
|
|
274
|
+
(request, response) =>
|
|
275
|
+
__awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
var _d, _e, _f
|
|
277
|
+
try {
|
|
278
|
+
const credential = request.body.credential
|
|
279
|
+
// const options: IIssueOptionsPayload = request.body.options
|
|
280
|
+
if (!credential) {
|
|
281
|
+
return VCAPIServer.sendErrorResponse(response, 400, 'No credential supplied')
|
|
282
|
+
}
|
|
283
|
+
if (!credential.id) {
|
|
284
|
+
credential.id = `urn:uuid:${(0, uuid_1.v4)()}`
|
|
285
|
+
}
|
|
286
|
+
const issueOpts = (_d = this.opts) === null || _d === void 0 ? void 0 : _d.issueCredentialOpts
|
|
287
|
+
const vc = yield this._agent.createVerifiableCredential({
|
|
288
|
+
credential,
|
|
289
|
+
save:
|
|
290
|
+
(_e = issueOpts === null || issueOpts === void 0 ? void 0 : issueOpts.persistIssuedCredentials) !== null && _e !== void 0 ? _e : true,
|
|
291
|
+
proofFormat: (_f = issueOpts === null || issueOpts === void 0 ? void 0 : issueOpts.proofFormat) !== null && _f !== void 0 ? _f : 'lds',
|
|
292
|
+
fetchRemoteContexts: (issueOpts === null || issueOpts === void 0 ? void 0 : issueOpts.fetchRemoteContexts) || true,
|
|
293
|
+
})
|
|
294
|
+
response.statusCode = 201
|
|
295
|
+
return response.send({ verifiableCredential: vc })
|
|
296
|
+
} catch (e) {
|
|
297
|
+
console.log(e)
|
|
298
|
+
return VCAPIServer.sendErrorResponse(response, 500, e.message)
|
|
299
|
+
}
|
|
300
|
+
})
|
|
301
|
+
)
|
|
302
|
+
}
|
|
303
|
+
getCredentialByIdOrHash(idOrHash) {
|
|
304
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
let vc
|
|
306
|
+
let hash
|
|
307
|
+
const uniqueVCs = yield this.agent.dataStoreORMGetVerifiableCredentials({
|
|
308
|
+
where: [
|
|
309
|
+
{
|
|
310
|
+
column: 'id',
|
|
311
|
+
value: [idOrHash],
|
|
312
|
+
op: 'Equal',
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
})
|
|
316
|
+
if (uniqueVCs.length === 0) {
|
|
317
|
+
hash = idOrHash
|
|
318
|
+
vc = yield this.agent.dataStoreGetVerifiableCredential({ hash })
|
|
319
|
+
} else {
|
|
320
|
+
const uniqueVC = uniqueVCs[0]
|
|
321
|
+
hash = uniqueVC.hash
|
|
322
|
+
vc = uniqueVC.verifiableCredential
|
|
323
|
+
}
|
|
324
|
+
return {
|
|
325
|
+
vc,
|
|
326
|
+
id: idOrHash,
|
|
327
|
+
hash,
|
|
328
|
+
}
|
|
329
|
+
})
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
exports.VCAPIServer = VCAPIServer
|
|
333
|
+
//# sourceMappingURL=VCAPIServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VCAPIServer.js","sourceRoot":"","sources":["../src/VCAPIServer.ts"],"names":[],"mappings":";AAAA,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKrC,8DAAoC;AACpC,kEAAwC;AACxC,oDAAqC;AACrC,sDAA6D;AAC7D,+BAAyB;AAiEzB,MAAa,WAAW;IAKtB,YAAY,IAA+E;;QACzF,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAA;QACtC,IAAI,CAAC,QAAQ,GAAG,MAAA,IAAI,CAAC,OAAO,mCAAI,IAAA,iBAAO,GAAE,CAAA;QACzC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAA;QAElC,uBAAuB;QACvB,IAAI,CAAC,uBAAuB,EAAE,CAA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AAO;qBACZ;iBACF;aACF,CAAC,CAAA;YACF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC1B,IAAI,GAAG,QAAQ,CAAA;gBACf,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gCAAgC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;aACjE;iBAAM;gBACL,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;gBAC7B,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAA;gBACpB,EAAE,GAAG,QAAQ,CAAC,oBAAoB,CAAA;aACnC;YAED,OAAO;gBACL,EAAE;gBACF,EAAE,EAAE,QAAQ;gBACZ,IAAI;aACL,CAAA;QACH,CAAC;KAAA;CACF;AAhND,kCAgNC"}
|
package/dist/api-functions.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ISingleEndpointOpts } from '@sphereon/ssi-express-support';
|
|
2
|
-
import { Router } from 'express';
|
|
3
|
-
import { IIssueCredentialEndpointOpts, IRequiredContext, IVerifyCredentialEndpointOpts } from './types';
|
|
4
|
-
export declare function issueCredentialEndpoint(router: Router, context: IRequiredContext, opts?: IIssueCredentialEndpointOpts): void;
|
|
5
|
-
export declare function getCredentialsEndpoint(router: Router, context: IRequiredContext, opts?: ISingleEndpointOpts): void;
|
|
6
|
-
export declare function getCredentialEndpoint(router: Router, context: IRequiredContext, opts?: ISingleEndpointOpts): void;
|
|
7
|
-
export declare function verifyCredentialEndpoint(router: Router, context: IRequiredContext, opts?: IVerifyCredentialEndpointOpts): void;
|
|
8
|
-
export declare function deleteCredentialEndpoint(router: Router, context: IRequiredContext, opts?: ISingleEndpointOpts): void;
|
|
1
|
+
import { ISingleEndpointOpts } from '@sphereon/ssi-express-support';
|
|
2
|
+
import { Router } from 'express';
|
|
3
|
+
import { IIssueCredentialEndpointOpts, IRequiredContext, IVerifyCredentialEndpointOpts } from './types';
|
|
4
|
+
export declare function issueCredentialEndpoint(router: Router, context: IRequiredContext, opts?: IIssueCredentialEndpointOpts): void;
|
|
5
|
+
export declare function getCredentialsEndpoint(router: Router, context: IRequiredContext, opts?: ISingleEndpointOpts): void;
|
|
6
|
+
export declare function getCredentialEndpoint(router: Router, context: IRequiredContext, opts?: ISingleEndpointOpts): void;
|
|
7
|
+
export declare function verifyCredentialEndpoint(router: Router, context: IRequiredContext, opts?: IVerifyCredentialEndpointOpts): void;
|
|
8
|
+
export declare function deleteCredentialEndpoint(router: Router, context: IRequiredContext, opts?: ISingleEndpointOpts): void;
|
|
9
9
|
//# sourceMappingURL=api-functions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-functions.d.ts","sourceRoot":"","sources":["../src/api-functions.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,mBAAmB,EAAqB,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"api-functions.d.ts","sourceRoot":"","sources":["../src/api-functions.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,mBAAmB,EAAqB,MAAM,+BAA+B,CAAA;AAGjG,OAAO,EAAqB,MAAM,EAAE,MAAM,SAAS,CAAA;AAEnD,OAAO,EAAE,4BAA4B,EAAE,gBAAgB,EAAmB,6BAA6B,EAAE,MAAM,SAAS,CAAA;AAGxH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,4BAA4B,QA6BrH;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,mBAAmB,QAe3G;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,mBAAmB,QAsB1G;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,6BAA6B,QA2BvH;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,mBAAmB,QAyB7G"}
|