@sphereon/ssi-sdk.wellknown-did-issuer 0.33.0 → 0.33.1-feature.vcdm2.tsup.18
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 +620 -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 +580 -30
- package/dist/index.js.map +1 -1
- package/package.json +27 -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
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8FAA0F;AAE1F;;GAEG;AACH,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AACtC,wBAAM;AACf,4FAA0F;AAAjF,gJAAA,8BAA8B,OAAA;AACvC,iEAA+D;AAAtD,wHAAA,kBAAkB,OAAA;AAC3B,8DAA2C;AAC9B,QAAA,0BAA0B,GAAG,CAAC,+DAA8B,CAAC,CAAA;AAC1E,2CAA2D;AAAlD,0HAAA,4BAA4B,OAAA"}
|
|
1
|
+
{"version":3,"sources":["../plugin.schema.json","../src/entities/DidConfigurationResourceEntity.ts","../src/agent/WellKnownDidIssuer.ts","../src/migrations/generic/1-CreateWellknownDidIssuer.ts","../src/migrations/postgres/1661165115000-CreateWellknownDidIssuer.ts","../src/migrations/sqlite/1661161799000-CreateWellknownDidIssuer.ts","../src/migrations/generic/index.ts","../src/index.ts"],"sourcesContent":["{\n \"IWellKnownDidIssuer\": {\n \"components\": {\n \"schemas\": {\n \"IIssueDidConfigurationResourceArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"issuances\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"additionalProperties\": true\n }\n }\n },\n \"credentialIssuance\": {\n \"type\": \"string\"\n },\n \"save\": {\n \"type\": \"boolean\"\n },\n \"additionalProperties\": false\n },\n \"required\": [\"issuances\", \"credentialIssuance\"],\n \"description\": \"Arguments needed for {@link IWellKnownDidIssuer.addLinkedDomainsService } \"\n },\n \"IIssueDomainLinkageCredentialArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"did\": {\n \"type\": \"string\"\n },\n \"origin\": {\n \"type\": \"string\"\n },\n \"serviceId\": {\n \"type\": \"string\"\n },\n \"issuanceDate\": {\n \"type\": \"date\"\n },\n \"expirationDate\": {\n \"type\": \"date\"\n },\n \"save\": {\n \"type\": \"boolean\"\n },\n \"options\": {\n \"type\": \"object\",\n \"properties\": {\n \"additionalProperties\": true\n }\n },\n \"credentialIssuance\": {\n \"type\": \"string\"\n },\n \"additionalProperties\": false\n },\n \"required\": [\"did\", \"origin\", \"expirationDate\", \"options\"],\n \"description\": \"Arguments needed for {@link IWellKnownDidIssuer.issueDomainLinkageCredential } \"\n },\n \"IGetDidConfigurationResourceArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"origin\": {\n \"type\": \"string\"\n },\n \"additionalProperties\": false\n },\n \"required\": [\"origin\"],\n \"description\": \"Arguments needed for {@link IWellKnownDidIssuer.getDidConfigurationResource } \"\n },\n \"IAddLinkedDomainsServiceArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"did\": {\n \"type\": \"string\"\n },\n \"origin\": {\n \"type\": \"string\"\n },\n \"serviceId\": {\n \"type\": \"string\"\n },\n \"additionalProperties\": false\n },\n \"required\": [\"did\", \"origin\"],\n \"description\": \"Arguments needed for {@link IWellKnownDidIssuer.addLinkedDomainsService } \"\n },\n \"ISaveDidConfigurationResourceArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"origin\": {\n \"type\": \"string\"\n },\n \"didConfigurationResource\": {\n \"type\": \"object\",\n \"properties\": {\n \"additionalProperties\": true\n }\n },\n \"additionalProperties\": false\n },\n \"required\": [\"did\", \"origin\"],\n \"description\": \"Arguments needed for {@link IWellKnownDidIssuer.saveDidConfigurationResource } \"\n },\n \"IRemoveCredentialIssuanceArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"origin\": {\n \"callbackName\": \"string\"\n },\n \"additionalProperties\": false\n },\n \"required\": [\"callbackName\"],\n \"description\": \"Arguments needed for {@link IWellKnownDidIssuer.removeCredentialIssuance } \"\n }\n },\n \"methods\": {\n \"addLinkedDomainsService\": {\n \"description\": \"Adds a LinkedDomains service to the DID\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddLinkedDomainsServiceArgs\"\n }\n },\n \"getDidConfigurationResource\": {\n \"description\": \"Retrieves a DID configuration resource from the database\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetDidConfigurationResourceArgs\"\n },\n \"returnType\": \"object\"\n },\n \"issueDidConfigurationResource\": {\n \"description\": \"Issues a DID configuration resource\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddLinkedDomainsServiceArgs\"\n },\n \"returnType\": \"object\"\n },\n \"issueDomainLinkageCredential\": {\n \"description\": \"Retrieves a domain linkage credential\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IIssueDomainLinkageCredentialArgs\"\n },\n \"returnType\": \"object\"\n },\n \"removeCredentialIssuance\": {\n \"description\": \"Removes a registered callback\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveCredentialIssuanceArgs\"\n },\n \"returnType\": \"boolean\"\n },\n \"saveDidConfigurationResource\": {\n \"description\": \"Saves a DID configuration resource to the database\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/ISaveDidConfigurationResourceArgs\"\n }\n }\n }\n }\n }\n}\n","import { DomainLinkageCredential, IDidConfigurationResource, ISignedDomainLinkageCredential } from '@sphereon/wellknown-dids-client'\nimport { VerifiableCredential } from '@veramo/core'\nimport { Credential, Identifier, Claim } from '@veramo/data-store'\nimport { asArray, computeEntryHash, extractIssuer } from '@veramo/utils'\nimport { Entity, Column, PrimaryColumn, CreateDateColumn, UpdateDateColumn, ManyToMany, JoinTable, BaseEntity } from 'typeorm'\n\n@Entity('DidConfigurationResource')\nexport class DidConfigurationResourceEntity extends BaseEntity {\n @PrimaryColumn({ nullable: false })\n origin!: string\n\n @Column({ nullable: false })\n context!: string\n\n // TODO cascade of delete should be true when the VC is only attached to one DID configuration resource\n @ManyToMany(() => Credential, (credential: Credential) => credential.hash, { nullable: false, cascade: true, onDelete: 'NO ACTION' })\n @JoinTable({ name: 'DidConfigurationResourceCredentials' })\n linkedDids!: Array<Credential>\n\n @CreateDateColumn({ name: 'created_at', nullable: false })\n createdAt!: Date\n\n @UpdateDateColumn({ name: 'last_updated_at', nullable: false })\n lastUpdatedAt!: Date\n}\n\nexport const didConfigurationResourceFrom = (didConfigurationResource: DidConfigurationResourceEntity): IDidConfigurationResource => {\n return {\n '@context': didConfigurationResource.context,\n linked_dids: linkedDidsFrom(didConfigurationResource.linkedDids),\n }\n}\n\nconst linkedDidsFrom = (credentials: Array<Credential>): Array<DomainLinkageCredential> => {\n return credentials.map((credential: Credential) =>\n credential?.raw?.proof?.type === 'JwtProof2020' && typeof credential?.raw?.proof?.jwt === 'string'\n ? credential.raw.proof.jwt\n : (credential.raw as ISignedDomainLinkageCredential),\n )\n}\n\nexport const createCredentialEntity = (vci: VerifiableCredential): Credential => {\n const vc = vci\n const credential = new Credential()\n credential.context = asArray(vc['@context'])\n credential.type = asArray(vc.type || [])\n credential.id = vc.id\n\n if (vc.issuanceDate) {\n credential.issuanceDate = new Date(vc.issuanceDate)\n }\n\n if (vc.expirationDate) {\n credential.expirationDate = new Date(vc.expirationDate)\n }\n\n const issuer = new Identifier()\n issuer.did = extractIssuer(vc)\n credential.issuer = issuer\n\n if (vc.credentialSubject.id) {\n const subject = new Identifier()\n subject.did = vc.credentialSubject.id\n credential.subject = subject\n }\n credential.claims = []\n for (const type in vc.credentialSubject) {\n if (vc.credentialSubject.hasOwnProperty(type)) {\n const value = vc.credentialSubject[type]\n\n if (type !== 'id') {\n const isObj = typeof value === 'function' || (typeof value === 'object' && !!value)\n const claim = new Claim()\n claim.hash = computeEntryHash(JSON.stringify(vc) + type)\n claim.type = type\n claim.value = isObj ? JSON.stringify(value) : value\n claim.isObj = isObj\n claim.issuer = credential.issuer\n claim.subject = credential.subject\n claim.expirationDate = credential.expirationDate\n claim.issuanceDate = credential.issuanceDate\n claim.credentialType = credential.type\n claim.context = credential.context\n credential.claims.push(claim)\n }\n }\n }\n\n credential.raw = vci\n return credential\n}\n","import { CredentialCorrelationType, CredentialRole, DigitalCredential } from '@sphereon/ssi-sdk.credential-store'\nimport { CredentialMapper, parseDid } from '@sphereon/ssi-types'\nimport {\n DomainLinkageCredential,\n IDidConfigurationResource,\n IssuanceCallback,\n ServiceTypesEnum,\n WellKnownDidIssuer as Issuer,\n} from '@sphereon/wellknown-dids-client'\nimport { IAgentPlugin, IIdentifier, VerifiableCredential } from '@veramo/core'\nimport { OrPromise } from '@veramo/utils'\n// @ts-ignore\nimport { normalizeCredential } from 'did-jwt-vc'\n// @ts-ignore\nimport { Service } from 'did-resolver/lib/resolver'\nimport { Connection } from 'typeorm'\nimport { v4 as uuidv4 } from 'uuid'\nimport { createCredentialEntity, DidConfigurationResourceEntity, didConfigurationResourceFrom } from '../entities/DidConfigurationResourceEntity'\nimport { schema } from '../index'\nimport {\n IAddLinkedDomainsServiceArgs,\n IGetDidConfigurationResourceArgs,\n IIssueDidConfigurationResourceArgs,\n IIssueDomainLinkageCredentialArgs,\n IRegisterIssueCredentialArgs,\n IRemoveCredentialIssuanceArgs,\n ISaveDidConfigurationResourceArgs,\n IWellKnownDidIssuer,\n IWellKnownDidIssuerOptionsArgs,\n RequiredContext,\n} from '../types/IWellKnownDidIssuer'\nimport { RegulationType } from '@sphereon/ssi-sdk.data-store'\n\n/**\n * {@inheritDoc IWellKnownDidIssuer}\n */\nexport class WellKnownDidIssuer implements IAgentPlugin {\n readonly schema = schema.IWellKnownDidVerifier\n readonly methods: IWellKnownDidIssuer = {\n addLinkedDomainsService: this.addLinkedDomainsService.bind(this),\n getDidConfigurationResource: this.getDidConfigurationResource.bind(this),\n issueDidConfigurationResource: this.issueDidConfigurationResource.bind(this),\n issueDomainLinkageCredential: this.issueDomainLinkageCredential.bind(this),\n registerCredentialIssuance: this.registerCredentialIssuance.bind(this),\n removeCredentialIssuance: this.removeCredentialIssuance.bind(this),\n saveDidConfigurationResource: this.saveDidConfigurationResource.bind(this),\n }\n\n private readonly credentialIssuances: Record<string, IssuanceCallback>\n private readonly didConfigurationResourceRelations = ['linkedDids']\n\n constructor(\n private dbConnection: OrPromise<Connection>,\n args?: IWellKnownDidIssuerOptionsArgs,\n ) {\n this.credentialIssuances = (args && args.credentialIssuances) || {}\n }\n\n /** {@inheritDoc IWellKnownDidIssuer.registerSignatureVerification} */\n private async registerCredentialIssuance(args: IRegisterIssueCredentialArgs, context: RequiredContext): Promise<void> {\n if (this.credentialIssuances[args.callbackName] !== undefined) {\n return Promise.reject(new Error(`Credential issuance with callbackName: ${args.callbackName} already present`))\n }\n\n this.credentialIssuances[args.callbackName] = args.credentialIssuance\n }\n\n /** {@inheritDoc IWellKnownDidIssuer.removeSignatureVerification} */\n private async removeCredentialIssuance(args: IRemoveCredentialIssuanceArgs, context: RequiredContext): Promise<boolean> {\n return delete this.credentialIssuances[args.callbackName]\n }\n\n /** {@inheritDoc IWellKnownDidIssuer.issueDidConfigurationResource} */\n private async issueDidConfigurationResource(\n args: IIssueDidConfigurationResourceArgs,\n context: RequiredContext,\n ): Promise<IDidConfigurationResource> {\n if (!args.issuances.every((issuance: IIssueDomainLinkageCredentialArgs) => issuance.origin === args.issuances[0].origin)) {\n return Promise.reject(Error('All verifiableCredentials should be issued for the same origin'))\n }\n\n // 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\n const addServices = args.issuances.map((issuance: IIssueDomainLinkageCredentialArgs) =>\n this.addLinkedDomainsService(\n {\n did: issuance.did,\n origin: issuance.origin,\n serviceId: issuance.serviceId,\n },\n context,\n ),\n )\n\n return Promise.all(addServices).then(async () =>\n new Issuer()\n .issueDidConfigurationResource({\n issuances: await this.mapIssuances(args.issuances),\n issueCallback:\n typeof args.credentialIssuance === 'string' ? await this.getCredentialIssuance(args.credentialIssuance) : args.credentialIssuance,\n })\n .then(async (didConfigurationResource: IDidConfigurationResource) => {\n if (args.save) {\n // TODO add support for multiple origins when we upgrade Veramo version\n await this.saveDidConfigurationResource({ origin: args.issuances[0].origin, didConfigurationResource }, context)\n }\n return didConfigurationResource\n })\n .catch((error: Error) => Promise.reject(Error(`Unable to issue DID configuration resource. Error: ${error.message}`))),\n )\n }\n\n /** {@inheritDoc IWellKnownDidIssuer.saveDidConfigurationResource} */\n public async saveDidConfigurationResource(args: ISaveDidConfigurationResourceArgs, context: RequiredContext): Promise<void> {\n const didConfigurationEntity = {\n origin: args.origin,\n context: args.didConfigurationResource['@context'],\n linkedDids: args.didConfigurationResource.linked_dids.map((credential: DomainLinkageCredential) =>\n createCredentialEntity(this.normalizeCredential(credential)),\n ),\n }\n\n await (await this.dbConnection).getRepository(DidConfigurationResourceEntity).save(didConfigurationEntity, { transaction: true })\n }\n\n /** {@inheritDoc IWellKnownDidIssuer.getDidConfigurationResource} */\n public async getDidConfigurationResource(args: IGetDidConfigurationResourceArgs, context: RequiredContext): Promise<IDidConfigurationResource> {\n const result = await (await this.dbConnection).getRepository(DidConfigurationResourceEntity).findOne({\n where: { origin: args.origin },\n relations: this.didConfigurationResourceRelations,\n })\n\n if (!result) {\n return Promise.reject(Error(`No DID configuration resource found for origin: ${args.origin}`))\n }\n\n return didConfigurationResourceFrom(result)\n }\n\n /** {@inheritDoc IWellKnownDidIssuer.issueDomainLinkageCredential} */\n public async issueDomainLinkageCredential(args: IIssueDomainLinkageCredentialArgs, context: RequiredContext): Promise<DomainLinkageCredential> {\n const did: string = parseDid(args.did).did\n\n if (new URL(args.origin).origin !== args.origin) {\n return Promise.reject(Error(`Origin ${args.origin} is not valid`))\n }\n\n if (new URL(args.origin).protocol !== 'https:') {\n return Promise.reject(Error(`Origin ${args.origin} is not a https URL`))\n }\n\n if (args.issuanceDate && isNaN(Date.parse(args.issuanceDate))) {\n return Promise.reject(Error(`IssuanceDate ${args.issuanceDate} is not a valid date`))\n }\n\n if (isNaN(Date.parse(args.expirationDate))) {\n return Promise.reject(Error(`ExpirationDate ${args.expirationDate} is not a valid date`))\n }\n\n const credentialIssuance: IssuanceCallback =\n typeof args.credentialIssuance === 'string'\n ? await this.getCredentialIssuance(args.credentialIssuance)\n : (args.credentialIssuance as IssuanceCallback)\n\n return new Issuer()\n .issueDomainLinkageCredential({\n did,\n origin: args.origin,\n issuanceDate: args.issuanceDate,\n expirationDate: args.expirationDate,\n options: args.options,\n issueCallback: credentialIssuance,\n })\n .then(async (credential: DomainLinkageCredential) => {\n if (args.save) {\n await this.saveDomainLinkageCredential(credential, context)\n }\n return credential\n })\n .catch((error: Error) => Promise.reject(Error(`Unable to issue domain linkage credential for DID: ${did}. Error: ${error.message}`)))\n }\n\n /** {@inheritDoc IWellKnownDidIssuer.addLinkedDomainsService} */\n public async addLinkedDomainsService(args: IAddLinkedDomainsServiceArgs, context: RequiredContext): Promise<void> {\n const did: string = parseDid(args.did).did\n\n if (new URL(args.origin).origin !== args.origin) {\n return Promise.reject(Error(`Origin ${args.origin} is not valid`))\n }\n\n if (new URL(args.origin).protocol !== 'https:') {\n return Promise.reject(Error(`Origin ${args.origin} is not a https URL`))\n }\n\n context.agent\n .didManagerGet({ did })\n .catch(() => Promise.reject(Error('DID cannot be found')))\n .then(async (identifier: IIdentifier) => {\n if (\n !identifier.services ||\n identifier.services.filter(\n // TODO we should also check for the origins in the serviceEndpoint objects when we start supporting multiple origins\n (service: Service) => service.type === ServiceTypesEnum.LINKED_DOMAINS && service.serviceEndpoint === args.origin,\n ).length === 0\n ) {\n await context.agent.didManagerAddService({\n did: identifier.did,\n service: {\n id: args.serviceId || uuidv4(),\n type: ServiceTypesEnum.LINKED_DOMAINS,\n // 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\n serviceEndpoint: args.origin,\n },\n })\n }\n })\n .catch((error: Error) => Promise.reject(Error(`Unable to add LinkedDomains service to DID: ${args.did}. Error: ${error.message}`)))\n }\n\n private async getCredentialIssuance(callbackName: string): Promise<IssuanceCallback> {\n if (this.credentialIssuances[callbackName] === undefined) {\n return Promise.reject(new Error(`Credential issuance not found for callbackName: ${callbackName}`))\n }\n\n return this.credentialIssuances[callbackName]\n }\n\n private async saveDomainLinkageCredential(credential: DomainLinkageCredential, context: RequiredContext): Promise<DigitalCredential> {\n const vc = this.normalizeCredential(credential)\n return context.agent.crsAddCredential({\n credential: {\n rawDocument: JSON.stringify(vc),\n credentialRole: CredentialRole.ISSUER,\n regulationType: RegulationType.NON_REGULATED, // FIXME funke\n kmsKeyRef: 'FIXME', // FIXME funke\n identifierMethod: 'did',\n issuerCorrelationId: CredentialMapper.issuerCorrelationIdFromIssuerType(vc.issuer),\n issuerCorrelationType: CredentialCorrelationType.DID,\n subjectCorrelationId: CredentialMapper.issuerCorrelationIdFromIssuerType(vc.issuer), // FIXME get separate did for subject\n subjectCorrelationType: CredentialCorrelationType.DID,\n },\n })\n }\n\n private normalizeCredential(credential: DomainLinkageCredential): VerifiableCredential {\n return typeof credential === 'string' ? normalizeCredential(credential) : credential\n }\n\n private async mapIssuances(issuances: Array<IIssueDomainLinkageCredentialArgs>): Promise<Array<IIssueDomainLinkageCredentialArgs>> {\n const promises = issuances.map(async (issuance: IIssueDomainLinkageCredentialArgs) => {\n return {\n ...issuance,\n issueCallback:\n typeof issuance.credentialIssuance === 'string'\n ? await this.getCredentialIssuance(issuance.credentialIssuance)\n : issuance.credentialIssuance,\n }\n })\n return Promise.all(promises)\n }\n}\n","import { MigrationInterface, QueryRunner } from 'typeorm'\nimport Debug from 'debug'\nimport { CreateWellknownDidIssuer1661165115000 } from '../postgres/1661165115000-CreateWellknownDidIssuer'\nimport { CreateWellknownDidIssuer1661161799000 } from '../sqlite/1661161799000-CreateWellknownDidIssuer'\n\nconst debug = Debug('sphereon:ssi-sdk:migrations')\n\nexport class CreateWellknownDidIssuer1661162010000 implements MigrationInterface {\n name = 'CreateWellknownDidIssuer1661162010000'\n\n public async up(queryRunner: QueryRunner): Promise<void> {\n debug('migration: creating well-known DID tables')\n const dbType = queryRunner.connection.driver.options.type\n if (dbType === 'postgres') {\n debug('using postgres migration file')\n const mig = new CreateWellknownDidIssuer1661165115000()\n const up = await mig.up(queryRunner)\n debug('Migration statements executed')\n return up\n } else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {\n debug('using sqlite/react-native migration file')\n const mig = new CreateWellknownDidIssuer1661161799000()\n const up = await mig.up(queryRunner)\n debug('Migration statements executed')\n return up\n } else {\n return Promise.reject(\n `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`,\n )\n }\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n debug('reverting well-known DID tables')\n const dbType = queryRunner.connection.driver.options.type\n if (dbType === 'postgres') {\n debug('using postgres migration file')\n const mig = new CreateWellknownDidIssuer1661165115000()\n const down = await mig.down(queryRunner)\n debug('Migration statements executed')\n return down\n } else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {\n debug('using sqlite/react-native migration file')\n const mig = new CreateWellknownDidIssuer1661161799000()\n const down = await mig.down(queryRunner)\n debug('Migration statements executed')\n return down\n } else {\n return Promise.reject(\n `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`,\n )\n }\n }\n}\n","import { MigrationInterface, QueryRunner } from 'typeorm'\n\nexport class CreateWellknownDidIssuer1661165115000 implements MigrationInterface {\n name = 'CreateWellknownDidIssuer1661165115000'\n\n public async up(queryRunner: QueryRunner): Promise<void> {\n await queryRunner.query(\n `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\"))`,\n )\n await queryRunner.query(\n `CREATE TABLE \"DidConfigurationResourceCredentials\" (\"didConfigurationResourceOrigin\" varchar NOT NULL, \"credentialHash\" varchar NOT NULL)`,\n )\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n await queryRunner.query(`DROP TABLE \"DidConfigurationResource\"`)\n await queryRunner.query(`DROP TABLE \"DidConfigurationResourceCredentials\"`)\n }\n}\n","import { MigrationInterface, QueryRunner } from 'typeorm'\n\nexport class CreateWellknownDidIssuer1661161799000 implements MigrationInterface {\n name = 'CreateWellknownDidIssuer1661161799000'\n\n public async up(queryRunner: QueryRunner): Promise<void> {\n await queryRunner.query(\n `CREATE TABLE \"DidConfigurationResource\" (\"origin\" varchar PRIMARY KEY NOT NULL, \"context\" varchar NOT NULL, \"created_at\" datetime NOT NULL DEFAULT (datetime('now')), \"last_updated_at\" datetime NOT NULL DEFAULT (datetime('now')))`,\n )\n await queryRunner.query(\n `CREATE TABLE \"DidConfigurationResourceCredentials\" (\"didConfigurationResourceOrigin\" varchar NOT NULL, \"credentialHash\" varchar NOT NULL)`,\n )\n }\n\n public async down(queryRunner: QueryRunner): Promise<void> {\n await queryRunner.query(`DROP TABLE \"DidConfigurationResource\"`)\n await queryRunner.query(`DROP TABLE \"DidConfigurationResourceCredentials\"`)\n }\n}\n","import { CreateWellknownDidIssuer1661162010000 } from './1-CreateWellknownDidIssuer'\n\n/**\n * The migrations array that SHOULD be used when initializing a TypeORM database connection.\n *\n * These ensure the correct creation of tables and the proper migrations of data when tables change between versions.\n *\n * @public\n */\nexport const WellknownDidIssuerMigrations = [CreateWellknownDidIssuer1661162010000]\n","import { DidConfigurationResourceEntity } from './entities/DidConfigurationResourceEntity'\n\n/**\n * @public\n */\nconst schema = require('../plugin.schema.json')\nexport { schema }\nexport { DidConfigurationResourceEntity } from './entities/DidConfigurationResourceEntity'\nexport { WellKnownDidIssuer } from './agent/WellKnownDidIssuer'\nexport * from './types/IWellKnownDidIssuer'\nexport const WellknownDidIssuerEntities = [DidConfigurationResourceEntity]\nexport { WellknownDidIssuerMigrations } from './migrations'\n"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,qBAAuB;AAAA,QACrB,YAAc;AAAA,UACZ,SAAW;AAAA,YACT,oCAAsC;AAAA,cACpC,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,WAAa;AAAA,kBACX,MAAQ;AAAA,kBACR,OAAS;AAAA,oBACP,MAAQ;AAAA,oBACR,YAAc;AAAA,sBACZ,sBAAwB;AAAA,oBAC1B;AAAA,kBACF;AAAA,gBACF;AAAA,gBACA,oBAAsB;AAAA,kBACpB,MAAQ;AAAA,gBACV;AAAA,gBACA,MAAQ;AAAA,kBACN,MAAQ;AAAA,gBACV;AAAA,gBACA,sBAAwB;AAAA,cAC1B;AAAA,cACA,UAAY,CAAC,aAAa,oBAAoB;AAAA,cAC9C,aAAe;AAAA,YACjB;AAAA,YACA,mCAAqC;AAAA,cACnC,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,KAAO;AAAA,kBACL,MAAQ;AAAA,gBACV;AAAA,gBACA,QAAU;AAAA,kBACR,MAAQ;AAAA,gBACV;AAAA,gBACA,WAAa;AAAA,kBACX,MAAQ;AAAA,gBACV;AAAA,gBACA,cAAgB;AAAA,kBACd,MAAQ;AAAA,gBACV;AAAA,gBACA,gBAAkB;AAAA,kBAChB,MAAQ;AAAA,gBACV;AAAA,gBACA,M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CAAA;AACN,YAAMW,MAAM,IAAIE,sCAAAA;AAChB,YAAMT,KAAK,MAAMO,IAAIP,GAAGC,WAAAA;AACxBL,YAAM,+BAAA;AACN,aAAOI;IACT,OAAO;AACL,aAAOU,QAAQC,OACb,6FAA6FT,MAAAA,+GAAqH;IAEtN;EACF;EAEA,MAAaU,KAAKX,aAAyC;AACzDL,UAAM,iCAAA;AACN,UAAMM,SAASD,YAAYE,WAAWC,OAAOC,QAAQC;AACrD,QAAIJ,WAAW,YAAY;AACzBN,YAAM,+BAAA;AACN,YAAMW,MAAM,IAAIC,sCAAAA;AAChB,YAAMI,OAAO,MAAML,IAAIK,KAAKX,WAAAA;AAC5BL,YAAM,+BAAA;AACN,aAAOgB;IACT,WAAWV,WAAW,YAAYA,WAAW,kBAAkBA,WAAW,QAAQ;AAChFN,YAAM,0CAAA;AACN,YAAMW,MAAM,IAAIE,sCAAAA;AAChB,YAAMG,OAAO,MAAML,IAAIK,KAAKX,WAAAA;AAC5BL,YAAM,+BAAA;AACN,aAAOgB;IACT,OAAO;AACL,aAAOF,QAAQC,OACb,6FAA6FT,MAAAA,+GAAqH;IAEtN;EACF;AACF;;;AG5CO,IAAMW,+BAA+B;EAACC;;;;ACJ7C,IAAMC,SAASC;AAKR,IAAMC,6BAA6B;EAACC;;","names":["Credential","Identifier","Claim","asArray","computeEntryHash","extractIssuer","Entity","Column","PrimaryColumn","CreateDateColumn","UpdateDateColumn","ManyToMany","JoinTable","BaseEntity","DidConfigurationResourceEntity","BaseEntity","origin","context","linkedDids","createdAt","lastUpdatedAt","nullable","Credential","credential","hash","cascade","onDelete","name","didConfigurationResourceFrom","didConfigurationResource","linked_dids","linkedDidsFrom","credentials","map","raw","proof","type","jwt","createCredentialEntity","vci","vc","asArray","id","issuanceDate","Date","expirationDate","issuer","Identifier","did","extractIssuer","credentialSubject","subject","claims","hasOwnProperty","value","isObj","claim","Claim","computeEntryHash","JSON","stringify","credentialType","push","CredentialCorrelationType","CredentialRole","CredentialMapper","parseDid","ServiceTypesEnum","WellKnownDidIssuer","Issuer","normalizeCredential","v4","uuidv4","RegulationType","WellKnownDidIssuer","schema","methods","credentialIssuances","didConfigurationResourceRelations","constructor","dbConnection","args","IWellKnownDidVerifier","addLinkedDomainsService","bind","getDidConfigurationResource","issueDidConfigurationResource","issueDomainLinkageCredential","registerCredentialIssuance","removeCredentialIssuance","saveDidConfigurationResource","context","callbackName","undefined","Promise","reject","Error","credentialIssuance","issuances","every","issuance","origin","addServices","map","did","serviceId","all","then","Issuer","mapIssuances","issueCallback","getCredentialIssuance","didConfigurationResource","save","catch","error","message","didConfigurationEntity","linkedDids","linked_dids","credential","createCredentialEntity","normalizeCredential","getRepository","DidConfigurationResourceEntity","transaction","result","findOne","where","relations","didConfigurationResourceFrom","parseDid","URL","protocol","issuanceDate","isNaN","Date","parse","expirationDate","options","saveDomainLinkageCredential","agent","didManagerGet","identifier","services","filter","service","type","ServiceTypesEnum","LINKED_DOMAINS","serviceEndpoint","length","didManagerAddService","id","uuidv4","vc","crsAddCredential","rawDocument","JSON","stringify","credentialRole","CredentialRole","ISSUER","regulationType","RegulationType","NON_REGULATED","kmsKeyRef","identifierMethod","issuerCorrelationId","CredentialMapper","issuerCorrelationIdFromIssuerType","issuer","issuerCorrelationType","CredentialCorrelationType","DID","subjectCorrelationId","subjectCorrelationType","promises","Debug","CreateWellknownDidIssuer1661165115000","name","up","queryRunner","query","down","CreateWellknownDidIssuer1661161799000","name","up","queryRunner","query","down","debug","Debug","CreateWellknownDidIssuer1661162010000","name","up","queryRunner","dbType","connection","driver","options","type","mig","CreateWellknownDidIssuer1661165115000","CreateWellknownDidIssuer1661161799000","Promise","reject","down","WellknownDidIssuerMigrations","CreateWellknownDidIssuer1661162010000","schema","require","WellknownDidIssuerEntities","DidConfigurationResourceEntity"]}
|
package/package.json
CHANGED
|
@@ -1,45 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.wellknown-did-issuer",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.cts",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
7
19
|
"veramo": {
|
|
8
20
|
"pluginInterfaces": {
|
|
9
21
|
"IWellknownDidIssuer": "./src/types/IWellKnownDidIssuer.ts"
|
|
10
22
|
}
|
|
11
23
|
},
|
|
12
24
|
"scripts": {
|
|
13
|
-
"build": "
|
|
14
|
-
"build:clean": "tsc --build --clean && tsc --build"
|
|
25
|
+
"build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json"
|
|
15
26
|
},
|
|
16
27
|
"dependencies": {
|
|
17
|
-
"@sphereon/ssi-sdk.
|
|
18
|
-
"@sphereon/ssi-sdk.
|
|
19
|
-
"@sphereon/ssi-
|
|
28
|
+
"@sphereon/ssi-sdk.core": "^0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
29
|
+
"@sphereon/ssi-sdk.credential-store": "^0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
30
|
+
"@sphereon/ssi-sdk.data-store": "^0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
31
|
+
"@sphereon/ssi-types": "^0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
20
32
|
"@sphereon/wellknown-dids-client": "^0.1.3",
|
|
21
33
|
"@veramo/data-store": "4.2.0",
|
|
22
34
|
"@veramo/utils": "4.2.0",
|
|
23
35
|
"class-validator": "^0.14.1",
|
|
24
36
|
"debug": "^4.3.5",
|
|
25
37
|
"did-jwt-vc": "3.1.3",
|
|
26
|
-
"typeorm": "^0.3.
|
|
38
|
+
"typeorm": "^0.3.22",
|
|
27
39
|
"uuid": "^9.0.1"
|
|
28
40
|
},
|
|
29
41
|
"devDependencies": {
|
|
30
|
-
"@sphereon/ssi-sdk.agent-config": "0.33.
|
|
42
|
+
"@sphereon/ssi-sdk.agent-config": "^0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
31
43
|
"@types/express": "^4.17.21",
|
|
32
44
|
"@types/uuid": "^9.0.8",
|
|
45
|
+
"@veramo/did-manager": "4.2.0",
|
|
33
46
|
"@veramo/remote-client": "4.2.0",
|
|
34
47
|
"@veramo/remote-server": "4.2.0",
|
|
35
48
|
"did-resolver": "^4.1.0",
|
|
36
49
|
"express": "^4.19.2",
|
|
37
50
|
"nock": "^13.5.4",
|
|
38
|
-
"typescript": "5.
|
|
51
|
+
"typescript": "5.8.3"
|
|
39
52
|
},
|
|
40
53
|
"files": [
|
|
41
|
-
"dist
|
|
42
|
-
"src
|
|
54
|
+
"dist",
|
|
55
|
+
"src",
|
|
43
56
|
"README.md",
|
|
44
57
|
"plugin.schema.json",
|
|
45
58
|
"LICENSE"
|
|
@@ -59,6 +72,5 @@
|
|
|
59
72
|
"Well-Known DIDs",
|
|
60
73
|
"Verifiable Credential"
|
|
61
74
|
],
|
|
62
|
-
"
|
|
63
|
-
"gitHead": "c575bdd6642bda761881f0152e0a70ddc82d7f61"
|
|
75
|
+
"gitHead": "1fbb8be0256ec8dbc1b52d860b7bfd09d12f0d00"
|
|
64
76
|
}
|
|
@@ -9,7 +9,9 @@ import {
|
|
|
9
9
|
} from '@sphereon/wellknown-dids-client'
|
|
10
10
|
import { IAgentPlugin, IIdentifier, VerifiableCredential } from '@veramo/core'
|
|
11
11
|
import { OrPromise } from '@veramo/utils'
|
|
12
|
+
// @ts-ignore
|
|
12
13
|
import { normalizeCredential } from 'did-jwt-vc'
|
|
14
|
+
// @ts-ignore
|
|
13
15
|
import { Service } from 'did-resolver/lib/resolver'
|
|
14
16
|
import { Connection } from 'typeorm'
|
|
15
17
|
import { v4 as uuidv4 } from 'uuid'
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { DomainLinkageCredential, IDidConfigurationResource } from '@sphereon/wellknown-dids-client';
|
|
2
|
-
import { IAgentPlugin } from '@veramo/core';
|
|
3
|
-
import { OrPromise } from '@veramo/utils';
|
|
4
|
-
import { Connection } from 'typeorm';
|
|
5
|
-
import { IAddLinkedDomainsServiceArgs, IGetDidConfigurationResourceArgs, IIssueDomainLinkageCredentialArgs, ISaveDidConfigurationResourceArgs, IWellKnownDidIssuer, IWellKnownDidIssuerOptionsArgs, RequiredContext } from '../types/IWellKnownDidIssuer';
|
|
6
|
-
/**
|
|
7
|
-
* {@inheritDoc IWellKnownDidIssuer}
|
|
8
|
-
*/
|
|
9
|
-
export declare class WellKnownDidIssuer implements IAgentPlugin {
|
|
10
|
-
private dbConnection;
|
|
11
|
-
readonly schema: any;
|
|
12
|
-
readonly methods: IWellKnownDidIssuer;
|
|
13
|
-
private readonly credentialIssuances;
|
|
14
|
-
private readonly didConfigurationResourceRelations;
|
|
15
|
-
constructor(dbConnection: OrPromise<Connection>, args?: IWellKnownDidIssuerOptionsArgs);
|
|
16
|
-
/** {@inheritDoc IWellKnownDidIssuer.registerSignatureVerification} */
|
|
17
|
-
private registerCredentialIssuance;
|
|
18
|
-
/** {@inheritDoc IWellKnownDidIssuer.removeSignatureVerification} */
|
|
19
|
-
private removeCredentialIssuance;
|
|
20
|
-
/** {@inheritDoc IWellKnownDidIssuer.issueDidConfigurationResource} */
|
|
21
|
-
private issueDidConfigurationResource;
|
|
22
|
-
/** {@inheritDoc IWellKnownDidIssuer.saveDidConfigurationResource} */
|
|
23
|
-
saveDidConfigurationResource(args: ISaveDidConfigurationResourceArgs, context: RequiredContext): Promise<void>;
|
|
24
|
-
/** {@inheritDoc IWellKnownDidIssuer.getDidConfigurationResource} */
|
|
25
|
-
getDidConfigurationResource(args: IGetDidConfigurationResourceArgs, context: RequiredContext): Promise<IDidConfigurationResource>;
|
|
26
|
-
/** {@inheritDoc IWellKnownDidIssuer.issueDomainLinkageCredential} */
|
|
27
|
-
issueDomainLinkageCredential(args: IIssueDomainLinkageCredentialArgs, context: RequiredContext): Promise<DomainLinkageCredential>;
|
|
28
|
-
/** {@inheritDoc IWellKnownDidIssuer.addLinkedDomainsService} */
|
|
29
|
-
addLinkedDomainsService(args: IAddLinkedDomainsServiceArgs, context: RequiredContext): Promise<void>;
|
|
30
|
-
private getCredentialIssuance;
|
|
31
|
-
private saveDomainLinkageCredential;
|
|
32
|
-
private normalizeCredential;
|
|
33
|
-
private mapIssuances;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=WellKnownDidIssuer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WellKnownDidIssuer.d.ts","sourceRoot":"","sources":["../../src/agent/WellKnownDidIssuer.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EAI1B,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,YAAY,EAAqC,MAAM,cAAc,CAAA;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAEhC,iCAAiC,EAGjC,iCAAiC,EACjC,mBAAmB,EACnB,8BAA8B,EAC9B,eAAe,EAChB,MAAM,8BAA8B,CAAA;AAGrC;;GAEG;AACH,qBAAa,kBAAmB,YAAW,YAAY;IAgBnD,OAAO,CAAC,YAAY;IAftB,QAAQ,CAAC,MAAM,MAA+B;IAC9C,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAQpC;IAED,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAkC;IACtE,OAAO,CAAC,QAAQ,CAAC,iCAAiC,CAAiB;gBAGzD,YAAY,EAAE,SAAS,CAAC,UAAU,CAAC,EAC3C,IAAI,CAAC,EAAE,8BAA8B;IAKvC,sEAAsE;YACxD,0BAA0B;IAQxC,oEAAoE;YACtD,wBAAwB;IAItC,sEAAsE;YACxD,6BAA6B;IAsC3C,qEAAqE;IACxD,4BAA4B,CAAC,IAAI,EAAE,iCAAiC,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAY3H,oEAAoE;IACvD,2BAA2B,CAAC,IAAI,EAAE,gCAAgC,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAa9I,qEAAqE;IACxD,4BAA4B,CAAC,IAAI,EAAE,iCAAiC,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA0C9I,gEAAgE;IACnD,uBAAuB,CAAC,IAAI,EAAE,4BAA4B,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;YAoCnG,qBAAqB;YAQrB,2BAA2B;IAiBzC,OAAO,CAAC,mBAAmB;YAIb,YAAY;CAY3B"}
|
|
@@ -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":";;;;;;;;;;;;AAAA,iFAAiH;AACjH,mDAAgE;AAChE,2EAMwC;AAGxC,2CAAgD;AAGhD,+BAAmC;AACnC,+FAAiJ;AACjJ,oCAAiC;AAajC,qEAA6D;AAE7D;;GAEG;AACH,MAAa,kBAAkB;IAe7B,YACU,YAAmC,EAC3C,IAAqC;QAD7B,iBAAY,GAAZ,YAAY,CAAuB;QAfpC,WAAM,GAAG,cAAM,CAAC,qBAAqB,CAAA;QACrC,YAAO,GAAwB;YACtC,uBAAuB,EAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC;YAChE,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC;YACxE,6BAA6B,EAAE,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5E,4BAA4B,EAAE,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1E,0BAA0B,EAAE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC;YACtE,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClE,4BAA4B,EAAE,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC;SAC3E,CAAA;QAGgB,sCAAiC,GAAG,CAAC,YAAY,CAAC,CAAA;QAMjE,IAAI,CAAC,mBAAmB,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAA;IACrE,CAAC;IAED,sEAAsE;IACxD,0BAA0B,CAAC,IAAkC,EA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AO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,gCAAmB,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAA;IACtF,CAAC;IAEa,YAAY,CAAC,SAAmD;;YAC5E,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,CAAO,QAA2C,EAAE,EAAE;gBACnF,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,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2CAA2C,CAAA;AAE1F;;GAEG;AACH,QAAA,MAAM,MAAM,KAAmC,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAA;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,cAAc,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"}
|