@sphereon/ssi-sdk.wellknown-did-issuer 0.33.1-next.3 → 0.33.1-next.68
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/index.cjs +4045 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +116 -0
- package/dist/index.d.ts +112 -8
- package/dist/index.js +3992 -31
- package/dist/index.js.map +1 -1
- package/package.json +28 -15
- package/src/agent/WellKnownDidIssuer.ts +2 -0
- package/dist/agent/WellKnownDidIssuer.d.ts +0 -35
- package/dist/agent/WellKnownDidIssuer.d.ts.map +0 -1
- package/dist/agent/WellKnownDidIssuer.js +0 -218
- package/dist/agent/WellKnownDidIssuer.js.map +0 -1
- package/dist/entities/DidConfigurationResourceEntity.d.ts +0 -14
- package/dist/entities/DidConfigurationResourceEntity.d.ts.map +0 -1
- package/dist/entities/DidConfigurationResourceEntity.js +0 -103
- package/dist/entities/DidConfigurationResourceEntity.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/migrations/generic/1-CreateWellknownDidIssuer.d.ts +0 -7
- package/dist/migrations/generic/1-CreateWellknownDidIssuer.d.ts.map +0 -1
- package/dist/migrations/generic/1-CreateWellknownDidIssuer.js +0 -72
- package/dist/migrations/generic/1-CreateWellknownDidIssuer.js.map +0 -1
- package/dist/migrations/generic/index.d.ts +0 -10
- package/dist/migrations/generic/index.d.ts.map +0 -1
- package/dist/migrations/generic/index.js +0 -13
- package/dist/migrations/generic/index.js.map +0 -1
- package/dist/migrations/index.d.ts +0 -2
- package/dist/migrations/index.d.ts.map +0 -1
- package/dist/migrations/index.js +0 -6
- package/dist/migrations/index.js.map +0 -1
- package/dist/migrations/internal-migrations-ormconfig.d.ts +0 -7
- package/dist/migrations/internal-migrations-ormconfig.d.ts.map +0 -1
- package/dist/migrations/internal-migrations-ormconfig.js +0 -29
- package/dist/migrations/internal-migrations-ormconfig.js.map +0 -1
- package/dist/migrations/postgres/1661165115000-CreateWellknownDidIssuer.d.ts +0 -7
- package/dist/migrations/postgres/1661165115000-CreateWellknownDidIssuer.d.ts.map +0 -1
- package/dist/migrations/postgres/1661165115000-CreateWellknownDidIssuer.js +0 -31
- package/dist/migrations/postgres/1661165115000-CreateWellknownDidIssuer.js.map +0 -1
- package/dist/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.d.ts +0 -7
- package/dist/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.d.ts.map +0 -1
- package/dist/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.js +0 -31
- package/dist/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.js.map +0 -1
- package/dist/types/IWellKnownDidIssuer.d.ts +0 -51
- package/dist/types/IWellKnownDidIssuer.d.ts.map +0 -1
- package/dist/types/IWellKnownDidIssuer.js +0 -3
- package/dist/types/IWellKnownDidIssuer.js.map +0 -1
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.WellKnownDidIssuer = void 0;
|
|
13
|
-
const ssi_sdk_credential_store_1 = require("@sphereon/ssi-sdk.credential-store");
|
|
14
|
-
const ssi_types_1 = require("@sphereon/ssi-types");
|
|
15
|
-
const wellknown_dids_client_1 = require("@sphereon/wellknown-dids-client");
|
|
16
|
-
const did_jwt_vc_1 = require("did-jwt-vc");
|
|
17
|
-
const uuid_1 = require("uuid");
|
|
18
|
-
const DidConfigurationResourceEntity_1 = require("../entities/DidConfigurationResourceEntity");
|
|
19
|
-
const index_1 = require("../index");
|
|
20
|
-
const ssi_sdk_data_store_1 = require("@sphereon/ssi-sdk.data-store");
|
|
21
|
-
/**
|
|
22
|
-
* {@inheritDoc IWellKnownDidIssuer}
|
|
23
|
-
*/
|
|
24
|
-
class WellKnownDidIssuer {
|
|
25
|
-
constructor(dbConnection, args) {
|
|
26
|
-
this.dbConnection = dbConnection;
|
|
27
|
-
this.schema = index_1.schema.IWellKnownDidVerifier;
|
|
28
|
-
this.methods = {
|
|
29
|
-
addLinkedDomainsService: this.addLinkedDomainsService.bind(this),
|
|
30
|
-
getDidConfigurationResource: this.getDidConfigurationResource.bind(this),
|
|
31
|
-
issueDidConfigurationResource: this.issueDidConfigurationResource.bind(this),
|
|
32
|
-
issueDomainLinkageCredential: this.issueDomainLinkageCredential.bind(this),
|
|
33
|
-
registerCredentialIssuance: this.registerCredentialIssuance.bind(this),
|
|
34
|
-
removeCredentialIssuance: this.removeCredentialIssuance.bind(this),
|
|
35
|
-
saveDidConfigurationResource: this.saveDidConfigurationResource.bind(this),
|
|
36
|
-
};
|
|
37
|
-
this.didConfigurationResourceRelations = ['linkedDids'];
|
|
38
|
-
this.credentialIssuances = (args && args.credentialIssuances) || {};
|
|
39
|
-
}
|
|
40
|
-
/** {@inheritDoc IWellKnownDidIssuer.registerSignatureVerification} */
|
|
41
|
-
registerCredentialIssuance(args, context) {
|
|
42
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
if (this.credentialIssuances[args.callbackName] !== undefined) {
|
|
44
|
-
return Promise.reject(new Error(`Credential issuance with callbackName: ${args.callbackName} already present`));
|
|
45
|
-
}
|
|
46
|
-
this.credentialIssuances[args.callbackName] = args.credentialIssuance;
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
/** {@inheritDoc IWellKnownDidIssuer.removeSignatureVerification} */
|
|
50
|
-
removeCredentialIssuance(args, context) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
return delete this.credentialIssuances[args.callbackName];
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/** {@inheritDoc IWellKnownDidIssuer.issueDidConfigurationResource} */
|
|
56
|
-
issueDidConfigurationResource(args, context) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
if (!args.issuances.every((issuance) => issuance.origin === args.issuances[0].origin)) {
|
|
59
|
-
return Promise.reject(Error('All verifiableCredentials should be issued for the same origin'));
|
|
60
|
-
}
|
|
61
|
-
// TODO We should combine all origins into one service when we update to Veramo 3.1.6.next-165 or higher, as then we can support multiple origins
|
|
62
|
-
const addServices = args.issuances.map((issuance) => this.addLinkedDomainsService({
|
|
63
|
-
did: issuance.did,
|
|
64
|
-
origin: issuance.origin,
|
|
65
|
-
serviceId: issuance.serviceId,
|
|
66
|
-
}, context));
|
|
67
|
-
return Promise.all(addServices).then(() => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
return new wellknown_dids_client_1.WellKnownDidIssuer()
|
|
69
|
-
.issueDidConfigurationResource({
|
|
70
|
-
issuances: yield this.mapIssuances(args.issuances),
|
|
71
|
-
issueCallback: typeof args.credentialIssuance === 'string' ? yield this.getCredentialIssuance(args.credentialIssuance) : args.credentialIssuance,
|
|
72
|
-
})
|
|
73
|
-
.then((didConfigurationResource) => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
if (args.save) {
|
|
75
|
-
// TODO add support for multiple origins when we upgrade Veramo version
|
|
76
|
-
yield this.saveDidConfigurationResource({ origin: args.issuances[0].origin, didConfigurationResource }, context);
|
|
77
|
-
}
|
|
78
|
-
return didConfigurationResource;
|
|
79
|
-
}))
|
|
80
|
-
.catch((error) => Promise.reject(Error(`Unable to issue DID configuration resource. Error: ${error.message}`)));
|
|
81
|
-
}));
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
/** {@inheritDoc IWellKnownDidIssuer.saveDidConfigurationResource} */
|
|
85
|
-
saveDidConfigurationResource(args, context) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
const didConfigurationEntity = {
|
|
88
|
-
origin: args.origin,
|
|
89
|
-
context: args.didConfigurationResource['@context'],
|
|
90
|
-
linkedDids: args.didConfigurationResource.linked_dids.map((credential) => (0, DidConfigurationResourceEntity_1.createCredentialEntity)(this.normalizeCredential(credential))),
|
|
91
|
-
};
|
|
92
|
-
yield (yield this.dbConnection).getRepository(DidConfigurationResourceEntity_1.DidConfigurationResourceEntity).save(didConfigurationEntity, { transaction: true });
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
/** {@inheritDoc IWellKnownDidIssuer.getDidConfigurationResource} */
|
|
96
|
-
getDidConfigurationResource(args, context) {
|
|
97
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
-
const result = yield (yield this.dbConnection).getRepository(DidConfigurationResourceEntity_1.DidConfigurationResourceEntity).findOne({
|
|
99
|
-
where: { origin: args.origin },
|
|
100
|
-
relations: this.didConfigurationResourceRelations,
|
|
101
|
-
});
|
|
102
|
-
if (!result) {
|
|
103
|
-
return Promise.reject(Error(`No DID configuration resource found for origin: ${args.origin}`));
|
|
104
|
-
}
|
|
105
|
-
return (0, DidConfigurationResourceEntity_1.didConfigurationResourceFrom)(result);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
/** {@inheritDoc IWellKnownDidIssuer.issueDomainLinkageCredential} */
|
|
109
|
-
issueDomainLinkageCredential(args, context) {
|
|
110
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
-
const did = (0, ssi_types_1.parseDid)(args.did).did;
|
|
112
|
-
if (new URL(args.origin).origin !== args.origin) {
|
|
113
|
-
return Promise.reject(Error(`Origin ${args.origin} is not valid`));
|
|
114
|
-
}
|
|
115
|
-
if (new URL(args.origin).protocol !== 'https:') {
|
|
116
|
-
return Promise.reject(Error(`Origin ${args.origin} is not a https URL`));
|
|
117
|
-
}
|
|
118
|
-
if (args.issuanceDate && isNaN(Date.parse(args.issuanceDate))) {
|
|
119
|
-
return Promise.reject(Error(`IssuanceDate ${args.issuanceDate} is not a valid date`));
|
|
120
|
-
}
|
|
121
|
-
if (isNaN(Date.parse(args.expirationDate))) {
|
|
122
|
-
return Promise.reject(Error(`ExpirationDate ${args.expirationDate} is not a valid date`));
|
|
123
|
-
}
|
|
124
|
-
const credentialIssuance = typeof args.credentialIssuance === 'string'
|
|
125
|
-
? yield this.getCredentialIssuance(args.credentialIssuance)
|
|
126
|
-
: args.credentialIssuance;
|
|
127
|
-
return new wellknown_dids_client_1.WellKnownDidIssuer()
|
|
128
|
-
.issueDomainLinkageCredential({
|
|
129
|
-
did,
|
|
130
|
-
origin: args.origin,
|
|
131
|
-
issuanceDate: args.issuanceDate,
|
|
132
|
-
expirationDate: args.expirationDate,
|
|
133
|
-
options: args.options,
|
|
134
|
-
issueCallback: credentialIssuance,
|
|
135
|
-
})
|
|
136
|
-
.then((credential) => __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
if (args.save) {
|
|
138
|
-
yield this.saveDomainLinkageCredential(credential, context);
|
|
139
|
-
}
|
|
140
|
-
return credential;
|
|
141
|
-
}))
|
|
142
|
-
.catch((error) => Promise.reject(Error(`Unable to issue domain linkage credential for DID: ${did}. Error: ${error.message}`)));
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
/** {@inheritDoc IWellKnownDidIssuer.addLinkedDomainsService} */
|
|
146
|
-
addLinkedDomainsService(args, context) {
|
|
147
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
const did = (0, ssi_types_1.parseDid)(args.did).did;
|
|
149
|
-
if (new URL(args.origin).origin !== args.origin) {
|
|
150
|
-
return Promise.reject(Error(`Origin ${args.origin} is not valid`));
|
|
151
|
-
}
|
|
152
|
-
if (new URL(args.origin).protocol !== 'https:') {
|
|
153
|
-
return Promise.reject(Error(`Origin ${args.origin} is not a https URL`));
|
|
154
|
-
}
|
|
155
|
-
context.agent
|
|
156
|
-
.didManagerGet({ did })
|
|
157
|
-
.catch(() => Promise.reject(Error('DID cannot be found')))
|
|
158
|
-
.then((identifier) => __awaiter(this, void 0, void 0, function* () {
|
|
159
|
-
if (!identifier.services ||
|
|
160
|
-
identifier.services.filter(
|
|
161
|
-
// TODO we should also check for the origins in the serviceEndpoint objects when we start supporting multiple origins
|
|
162
|
-
(service) => service.type === wellknown_dids_client_1.ServiceTypesEnum.LINKED_DOMAINS && service.serviceEndpoint === args.origin).length === 0) {
|
|
163
|
-
yield context.agent.didManagerAddService({
|
|
164
|
-
did: identifier.did,
|
|
165
|
-
service: {
|
|
166
|
-
id: args.serviceId || (0, uuid_1.v4)(),
|
|
167
|
-
type: wellknown_dids_client_1.ServiceTypesEnum.LINKED_DOMAINS,
|
|
168
|
-
// TODO We should support a serviceEndpoint object here when we update to Veramo 3.1.6.next-165 or higher, as then we can support multiple origins
|
|
169
|
-
serviceEndpoint: args.origin,
|
|
170
|
-
},
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
}))
|
|
174
|
-
.catch((error) => Promise.reject(Error(`Unable to add LinkedDomains service to DID: ${args.did}. Error: ${error.message}`)));
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
getCredentialIssuance(callbackName) {
|
|
178
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
-
if (this.credentialIssuances[callbackName] === undefined) {
|
|
180
|
-
return Promise.reject(new Error(`Credential issuance not found for callbackName: ${callbackName}`));
|
|
181
|
-
}
|
|
182
|
-
return this.credentialIssuances[callbackName];
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
saveDomainLinkageCredential(credential, context) {
|
|
186
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
187
|
-
const vc = this.normalizeCredential(credential);
|
|
188
|
-
return context.agent.crsAddCredential({
|
|
189
|
-
credential: {
|
|
190
|
-
rawDocument: JSON.stringify(vc),
|
|
191
|
-
credentialRole: ssi_sdk_credential_store_1.CredentialRole.ISSUER,
|
|
192
|
-
regulationType: ssi_sdk_data_store_1.RegulationType.NON_REGULATED, // FIXME funke
|
|
193
|
-
kmsKeyRef: 'FIXME', // FIXME funke
|
|
194
|
-
identifierMethod: 'did',
|
|
195
|
-
issuerCorrelationId: ssi_types_1.CredentialMapper.issuerCorrelationIdFromIssuerType(vc.issuer),
|
|
196
|
-
issuerCorrelationType: ssi_sdk_credential_store_1.CredentialCorrelationType.DID,
|
|
197
|
-
subjectCorrelationId: ssi_types_1.CredentialMapper.issuerCorrelationIdFromIssuerType(vc.issuer), // FIXME get separate did for subject
|
|
198
|
-
subjectCorrelationType: ssi_sdk_credential_store_1.CredentialCorrelationType.DID,
|
|
199
|
-
},
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
normalizeCredential(credential) {
|
|
204
|
-
return typeof credential === 'string' ? (0, did_jwt_vc_1.normalizeCredential)(credential) : credential;
|
|
205
|
-
}
|
|
206
|
-
mapIssuances(issuances) {
|
|
207
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
-
const promises = issuances.map((issuance) => __awaiter(this, void 0, void 0, function* () {
|
|
209
|
-
return Object.assign(Object.assign({}, issuance), { issueCallback: typeof issuance.credentialIssuance === 'string'
|
|
210
|
-
? yield this.getCredentialIssuance(issuance.credentialIssuance)
|
|
211
|
-
: issuance.credentialIssuance });
|
|
212
|
-
}));
|
|
213
|
-
return Promise.all(promises);
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
exports.WellKnownDidIssuer = WellKnownDidIssuer;
|
|
218
|
-
//# sourceMappingURL=WellKnownDidIssuer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WellKnownDidIssuer.js","sourceRoot":"","sources":["../../src/agent/WellKnownDidIssuer.ts"],"names":[],"mappings":";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nF,uCACK,QAAQ,KACX,aAAa,EACX,OAAO,QAAQ,CAAC,kBAAkB,KAAK,QAAQ;wBAC7C,CAAC,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC;wBAC/D,CAAC,CAAC,QAAQ,CAAC,kBAAkB,IAClC;YACH,CAAC,CAAA,CAAC,CAAA;YACF,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC9B,CAAC;KAAA;CACF;AA/ND,gDA+NC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IDidConfigurationResource } from '@sphereon/wellknown-dids-client';
|
|
2
|
-
import { VerifiableCredential } from '@veramo/core';
|
|
3
|
-
import { Credential } from '@veramo/data-store';
|
|
4
|
-
import { BaseEntity } from 'typeorm';
|
|
5
|
-
export declare class DidConfigurationResourceEntity extends BaseEntity {
|
|
6
|
-
origin: string;
|
|
7
|
-
context: string;
|
|
8
|
-
linkedDids: Array<Credential>;
|
|
9
|
-
createdAt: Date;
|
|
10
|
-
lastUpdatedAt: Date;
|
|
11
|
-
}
|
|
12
|
-
export declare const didConfigurationResourceFrom: (didConfigurationResource: DidConfigurationResourceEntity) => IDidConfigurationResource;
|
|
13
|
-
export declare const createCredentialEntity: (vci: VerifiableCredential) => Credential;
|
|
14
|
-
//# sourceMappingURL=DidConfigurationResourceEntity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DidConfigurationResourceEntity.d.ts","sourceRoot":"","sources":["../../src/entities/DidConfigurationResourceEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,yBAAyB,EAAkC,MAAM,iCAAiC,CAAA;AACpI,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,UAAU,EAAqB,MAAM,oBAAoB,CAAA;AAElE,OAAO,EAA4F,UAAU,EAAE,MAAM,SAAS,CAAA;AAE9H,qBACa,8BAA+B,SAAQ,UAAU;IAE5D,MAAM,EAAG,MAAM,CAAA;IAGf,OAAO,EAAG,MAAM,CAAA;IAKhB,UAAU,EAAG,KAAK,CAAC,UAAU,CAAC,CAAA;IAG9B,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;CACrB;AAED,eAAO,MAAM,4BAA4B,6BAA8B,8BAA8B,KAAG,yBAKvG,CAAA;AAUD,eAAO,MAAM,sBAAsB,QAAS,oBAAoB,KAAG,UAiDlE,CAAA"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createCredentialEntity = exports.didConfigurationResourceFrom = exports.DidConfigurationResourceEntity = void 0;
|
|
13
|
-
const data_store_1 = require("@veramo/data-store");
|
|
14
|
-
const utils_1 = require("@veramo/utils");
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
|
-
let DidConfigurationResourceEntity = class DidConfigurationResourceEntity extends typeorm_1.BaseEntity {
|
|
17
|
-
};
|
|
18
|
-
exports.DidConfigurationResourceEntity = DidConfigurationResourceEntity;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryColumn)({ nullable: false }),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], DidConfigurationResourceEntity.prototype, "origin", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], DidConfigurationResourceEntity.prototype, "context", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.ManyToMany)(() => data_store_1.Credential, (credential) => credential.hash, { nullable: false, cascade: true, onDelete: 'NO ACTION' }),
|
|
29
|
-
(0, typeorm_1.JoinTable)({ name: 'DidConfigurationResourceCredentials' }),
|
|
30
|
-
__metadata("design:type", Array)
|
|
31
|
-
], DidConfigurationResourceEntity.prototype, "linkedDids", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
34
|
-
__metadata("design:type", Date)
|
|
35
|
-
], DidConfigurationResourceEntity.prototype, "createdAt", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
38
|
-
__metadata("design:type", Date)
|
|
39
|
-
], DidConfigurationResourceEntity.prototype, "lastUpdatedAt", void 0);
|
|
40
|
-
exports.DidConfigurationResourceEntity = DidConfigurationResourceEntity = __decorate([
|
|
41
|
-
(0, typeorm_1.Entity)('DidConfigurationResource')
|
|
42
|
-
], DidConfigurationResourceEntity);
|
|
43
|
-
const didConfigurationResourceFrom = (didConfigurationResource) => {
|
|
44
|
-
return {
|
|
45
|
-
'@context': didConfigurationResource.context,
|
|
46
|
-
linked_dids: linkedDidsFrom(didConfigurationResource.linkedDids),
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
exports.didConfigurationResourceFrom = didConfigurationResourceFrom;
|
|
50
|
-
const linkedDidsFrom = (credentials) => {
|
|
51
|
-
return credentials.map((credential) => {
|
|
52
|
-
var _a, _b, _c, _d;
|
|
53
|
-
return ((_b = (_a = credential === null || credential === void 0 ? void 0 : credential.raw) === null || _a === void 0 ? void 0 : _a.proof) === null || _b === void 0 ? void 0 : _b.type) === 'JwtProof2020' && typeof ((_d = (_c = credential === null || credential === void 0 ? void 0 : credential.raw) === null || _c === void 0 ? void 0 : _c.proof) === null || _d === void 0 ? void 0 : _d.jwt) === 'string'
|
|
54
|
-
? credential.raw.proof.jwt
|
|
55
|
-
: credential.raw;
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
const createCredentialEntity = (vci) => {
|
|
59
|
-
const vc = vci;
|
|
60
|
-
const credential = new data_store_1.Credential();
|
|
61
|
-
credential.context = (0, utils_1.asArray)(vc['@context']);
|
|
62
|
-
credential.type = (0, utils_1.asArray)(vc.type || []);
|
|
63
|
-
credential.id = vc.id;
|
|
64
|
-
if (vc.issuanceDate) {
|
|
65
|
-
credential.issuanceDate = new Date(vc.issuanceDate);
|
|
66
|
-
}
|
|
67
|
-
if (vc.expirationDate) {
|
|
68
|
-
credential.expirationDate = new Date(vc.expirationDate);
|
|
69
|
-
}
|
|
70
|
-
const issuer = new data_store_1.Identifier();
|
|
71
|
-
issuer.did = (0, utils_1.extractIssuer)(vc);
|
|
72
|
-
credential.issuer = issuer;
|
|
73
|
-
if (vc.credentialSubject.id) {
|
|
74
|
-
const subject = new data_store_1.Identifier();
|
|
75
|
-
subject.did = vc.credentialSubject.id;
|
|
76
|
-
credential.subject = subject;
|
|
77
|
-
}
|
|
78
|
-
credential.claims = [];
|
|
79
|
-
for (const type in vc.credentialSubject) {
|
|
80
|
-
if (vc.credentialSubject.hasOwnProperty(type)) {
|
|
81
|
-
const value = vc.credentialSubject[type];
|
|
82
|
-
if (type !== 'id') {
|
|
83
|
-
const isObj = typeof value === 'function' || (typeof value === 'object' && !!value);
|
|
84
|
-
const claim = new data_store_1.Claim();
|
|
85
|
-
claim.hash = (0, utils_1.computeEntryHash)(JSON.stringify(vc) + type);
|
|
86
|
-
claim.type = type;
|
|
87
|
-
claim.value = isObj ? JSON.stringify(value) : value;
|
|
88
|
-
claim.isObj = isObj;
|
|
89
|
-
claim.issuer = credential.issuer;
|
|
90
|
-
claim.subject = credential.subject;
|
|
91
|
-
claim.expirationDate = credential.expirationDate;
|
|
92
|
-
claim.issuanceDate = credential.issuanceDate;
|
|
93
|
-
claim.credentialType = credential.type;
|
|
94
|
-
claim.context = credential.context;
|
|
95
|
-
credential.claims.push(claim);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
credential.raw = vci;
|
|
100
|
-
return credential;
|
|
101
|
-
};
|
|
102
|
-
exports.createCredentialEntity = createCredentialEntity;
|
|
103
|
-
//# sourceMappingURL=DidConfigurationResourceEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DidConfigurationResourceEntity.js","sourceRoot":"","sources":["../../src/entities/DidConfigurationResourceEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,mDAAkE;AAClE,yCAAwE;AACxE,qCAA8H;AAGvH,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,oBAAU;CAiB7D,CAAA;AAjBY,wEAA8B;AAEzC;IADC,IAAA,uBAAa,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;8DACpB;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+DACZ;AAKhB;IAFC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,uBAAU,EAAE,CAAC,UAAsB,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IACpI,IAAA,mBAAS,EAAC,EAAE,IAAI,EAAE,qCAAqC,EAAE,CAAC;8BAC9C,KAAK;kEAAY;AAG9B;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE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,6BAA6B,CAAA;AAC3C,eAAO,MAAM,0BAA0B,2CAAmC,CAAA;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class CreateWellknownDidIssuer1661162010000 implements MigrationInterface {
|
|
3
|
-
name: string;
|
|
4
|
-
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
-
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=1-CreateWellknownDidIssuer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"1-CreateWellknownDidIssuer.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/1-CreateWellknownDidIssuer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOzD,qBAAa,qCAAsC,YAAW,kBAAkB;IAC9E,IAAI,SAA0C;IAEjC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAqB3D"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CreateWellknownDidIssuer1661162010000 = void 0;
|
|
16
|
-
const debug_1 = __importDefault(require("debug"));
|
|
17
|
-
const _1661165115000_CreateWellknownDidIssuer_1 = require("../postgres/1661165115000-CreateWellknownDidIssuer");
|
|
18
|
-
const _1661161799000_CreateWellknownDidIssuer_1 = require("../sqlite/1661161799000-CreateWellknownDidIssuer");
|
|
19
|
-
const debug = (0, debug_1.default)('sphereon:ssi-sdk:migrations');
|
|
20
|
-
class CreateWellknownDidIssuer1661162010000 {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.name = 'CreateWellknownDidIssuer1661162010000';
|
|
23
|
-
}
|
|
24
|
-
up(queryRunner) {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
debug('migration: creating well-known DID tables');
|
|
27
|
-
const dbType = queryRunner.connection.driver.options.type;
|
|
28
|
-
if (dbType === 'postgres') {
|
|
29
|
-
debug('using postgres migration file');
|
|
30
|
-
const mig = new _1661165115000_CreateWellknownDidIssuer_1.CreateWellknownDidIssuer1661165115000();
|
|
31
|
-
const up = yield mig.up(queryRunner);
|
|
32
|
-
debug('Migration statements executed');
|
|
33
|
-
return up;
|
|
34
|
-
}
|
|
35
|
-
else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
36
|
-
debug('using sqlite/react-native migration file');
|
|
37
|
-
const mig = new _1661161799000_CreateWellknownDidIssuer_1.CreateWellknownDidIssuer1661161799000();
|
|
38
|
-
const up = yield mig.up(queryRunner);
|
|
39
|
-
debug('Migration statements executed');
|
|
40
|
-
return up;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
down(queryRunner) {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
debug('reverting well-known DID tables');
|
|
50
|
-
const dbType = queryRunner.connection.driver.options.type;
|
|
51
|
-
if (dbType === 'postgres') {
|
|
52
|
-
debug('using postgres migration file');
|
|
53
|
-
const mig = new _1661165115000_CreateWellknownDidIssuer_1.CreateWellknownDidIssuer1661165115000();
|
|
54
|
-
const down = yield mig.down(queryRunner);
|
|
55
|
-
debug('Migration statements executed');
|
|
56
|
-
return down;
|
|
57
|
-
}
|
|
58
|
-
else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
59
|
-
debug('using sqlite/react-native migration file');
|
|
60
|
-
const mig = new _1661161799000_CreateWellknownDidIssuer_1.CreateWellknownDidIssuer1661161799000();
|
|
61
|
-
const down = yield mig.down(queryRunner);
|
|
62
|
-
debug('Migration statements executed');
|
|
63
|
-
return down;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.CreateWellknownDidIssuer1661162010000 = CreateWellknownDidIssuer1661162010000;
|
|
72
|
-
//# sourceMappingURL=1-CreateWellknownDidIssuer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"1-CreateWellknownDidIssuer.js","sourceRoot":"","sources":["../../../src/migrations/generic/1-CreateWellknownDidIssuer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,gHAA0G;AAC1G,8GAAwG;AAExG,MAAM,KAAK,GAAG,IAAA,eAAK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,GAAG,IAAI,+EAAqC,EAAE,CAAA;gBACvD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBACxC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,IAAI,CAAA;YACb,CAAC;iBAAM,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,cAAc,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;gBACjF,KAAK,CAAC,0CAA0C,CAAC,CAAA;gBACjD,MAAM,GAAG,GAAG,IAAI,+EAAqC,EAAE,CAAA;gBACvD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBACxC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,IAAI,CAAA;YACb,CAAC;iBAAM,CAAC;gBACN,OAAO,OAAO,CAAC,MAAM,CACnB,6FAA6F,MAAM,+GAA+G,CACnN,CAAA;YACH,CAAC;QACH,CAAC;KAAA;CACF;AA9CD,sFA8CC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CreateWellknownDidIssuer1661162010000 } from './1-CreateWellknownDidIssuer';
|
|
2
|
-
/**
|
|
3
|
-
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
4
|
-
*
|
|
5
|
-
* These ensure the correct creation of tables and the proper migrations of data when tables change between versions.
|
|
6
|
-
*
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export declare const WellknownDidIssuerMigrations: (typeof CreateWellknownDidIssuer1661162010000)[];
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM,8BAA8B,CAAA;AAEpF;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,kDAA0C,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WellknownDidIssuerMigrations = void 0;
|
|
4
|
-
const _1_CreateWellknownDidIssuer_1 = require("./1-CreateWellknownDidIssuer");
|
|
5
|
-
/**
|
|
6
|
-
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
7
|
-
*
|
|
8
|
-
* These ensure the correct creation of tables and the proper migrations of data when tables change between versions.
|
|
9
|
-
*
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
exports.WellknownDidIssuerMigrations = [_1_CreateWellknownDidIssuer_1.CreateWellknownDidIssuer1661162010000];
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":";;;AAAA,8EAAoF;AAEpF;;;;;;GAMG;AACU,QAAA,4BAA4B,GAAG,CAAC,mEAAqC,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/migrations/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WellknownDidIssuerMigrations = void 0;
|
|
4
|
-
var generic_1 = require("./generic");
|
|
5
|
-
Object.defineProperty(exports, "WellknownDidIssuerMigrations", { enumerable: true, get: function () { return generic_1.WellknownDidIssuerMigrations; } });
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,qCAAwD;AAA/C,uHAAA,4BAA4B,OAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ConnectionOptions } from 'typeorm';
|
|
2
|
-
/**
|
|
3
|
-
* Do Not use these connections in production!. They are only here to create/test migration files!
|
|
4
|
-
*/
|
|
5
|
-
declare const _default: ConnectionOptions[];
|
|
6
|
-
export default _default;
|
|
7
|
-
//# sourceMappingURL=internal-migrations-ormconfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal-migrations-ormconfig.d.ts","sourceRoot":"","sources":["../../src/migrations/internal-migrations-ormconfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAG3C;;GAEG;wBAsBE,iBAAiB,EAAE;AArBxB,wBAqBwB"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../index");
|
|
4
|
-
/**
|
|
5
|
-
* Do Not use these connections in production!. They are only here to create/test migration files!
|
|
6
|
-
*/
|
|
7
|
-
exports.default = [
|
|
8
|
-
{
|
|
9
|
-
type: 'sqlite',
|
|
10
|
-
name: 'migration-sqlite',
|
|
11
|
-
database: 'migration.sqlite',
|
|
12
|
-
migrationsRun: false,
|
|
13
|
-
synchronize: false,
|
|
14
|
-
logging: ['error', 'info', 'warn', 'log'],
|
|
15
|
-
entities: [...index_1.WellknownDidIssuerEntities],
|
|
16
|
-
migrations: [...index_1.WellknownDidIssuerMigrations],
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
type: 'postgres',
|
|
20
|
-
name: 'migration-postgres',
|
|
21
|
-
database: 'migration-postgres',
|
|
22
|
-
migrationsRun: false,
|
|
23
|
-
synchronize: false,
|
|
24
|
-
logging: ['error', 'info', 'warn', 'log'],
|
|
25
|
-
entities: [...index_1.WellknownDidIssuerEntities],
|
|
26
|
-
migrations: [...index_1.WellknownDidIssuerMigrations],
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
//# sourceMappingURL=internal-migrations-ormconfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal-migrations-ormconfig.js","sourceRoot":"","sources":["../../src/migrations/internal-migrations-ormconfig.ts"],"names":[],"mappings":";;AACA,oCAAmF;AAEnF;;GAEG;AACH,kBAAe;IACb;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,kBAAkB;QAC5B,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;QACzC,QAAQ,EAAE,CAAC,GAAG,kCAA0B,CAAC;QACzC,UAAU,EAAE,CAAC,GAAG,oCAA4B,CAAC;KAC9C;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,EAAE,oBAAoB;QAC9B,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;QACzC,QAAQ,EAAE,CAAC,GAAG,kCAA0B,CAAC;QACzC,UAAU,EAAE,CAAC,GAAG,oCAA4B,CAAC;KAC9C;CACqB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class CreateWellknownDidIssuer1661165115000 implements MigrationInterface {
|
|
3
|
-
name: string;
|
|
4
|
-
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
-
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=1661165115000-CreateWellknownDidIssuer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"1661165115000-CreateWellknownDidIssuer.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1661165115000-CreateWellknownDidIssuer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,qCAAsC,YAAW,kBAAkB;IAC9E,IAAI,SAA0C;IAEjC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CreateWellknownDidIssuer1661165115000 = void 0;
|
|
13
|
-
class CreateWellknownDidIssuer1661165115000 {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.name = 'CreateWellknownDidIssuer1661165115000';
|
|
16
|
-
}
|
|
17
|
-
up(queryRunner) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
yield queryRunner.query(`CREATE TABLE "DidConfigurationResource" ("origin" varchar NOT NULL, "context" varchar NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_Origin" PRIMARY KEY ("origin"))`);
|
|
20
|
-
yield queryRunner.query(`CREATE TABLE "DidConfigurationResourceCredentials" ("didConfigurationResourceOrigin" varchar NOT NULL, "credentialHash" varchar NOT NULL)`);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
down(queryRunner) {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
yield queryRunner.query(`DROP TABLE "DidConfigurationResource"`);
|
|
26
|
-
yield queryRunner.query(`DROP TABLE "DidConfigurationResourceCredentials"`);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.CreateWellknownDidIssuer1661165115000 = CreateWellknownDidIssuer1661165115000;
|
|
31
|
-
//# sourceMappingURL=1661165115000-CreateWellknownDidIssuer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"1661165115000-CreateWellknownDidIssuer.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1661165115000-CreateWellknownDidIssuer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,qCAAqC;IAAlD;QACE,SAAI,GAAG,uCAAuC,CAAA;IAehD,CAAC;IAbc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,mPAAmP,CACpP,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,2IAA2I,CAC5I,CAAA;QACH,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAA;YAChE,MAAM,WAAW,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAA;QAC7E,CAAC;KAAA;CACF;AAhBD,sFAgBC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class CreateWellknownDidIssuer1661161799000 implements MigrationInterface {
|
|
3
|
-
name: string;
|
|
4
|
-
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
-
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=1661161799000-CreateWellknownDidIssuer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"1661161799000-CreateWellknownDidIssuer.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,qCAAsC,YAAW,kBAAkB;IAC9E,IAAI,SAA0C;IAEjC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
|