Skip to content

Commit

Permalink
Add linkedDomain context
Browse files Browse the repository at this point in the history
  • Loading branch information
DaevMithran committed Oct 17, 2024
1 parent 2d527e2 commit 8e90568
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/services/identity/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import { jwtDecode } from 'jwt-decode';
import type { ICheqdCreateLinkedResourceArgs } from '@cheqd/did-provider-cheqd';
import type { TPublicKeyEd25519 } from '@cheqd/did-provider-cheqd';
import { SupportedKeyTypes } from '@veramo/utils';
import LinkedDomainContext from '../../static/contexts/identity_foundation_did_configutation.json' assert { type: 'json' };

// dynamic import to avoid circular dependency
const VeridaResolver =
Expand Down Expand Up @@ -151,7 +152,12 @@ export class Veramo {
plugins.push(
new CredentialPlugin(),
new CredentialIssuerLD({
contextMaps: [LdDefaultContexts],
contextMaps: [
LdDefaultContexts,
{
'https://identity.foundation/.well-known/did-configuration/v1': LinkedDomainContext,
},
],
suites: [
new VeramoJsonWebSignature2020(),
new VeramoEd25519Signature2018(),
Expand Down
12 changes: 12 additions & 0 deletions src/static/contexts/identity_foundation_did_configutation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"@context": [
{
"@version": 1.1,
"@protected": true,
"LinkedDomains": "https://identity.foundation/.well-known/resources/did-configuration/#LinkedDomains",
"DomainLinkageCredential": "https://identity.foundation/.well-known/resources/did-configuration/#DomainLinkageCredential",
"origin": "https://identity.foundation/.well-known/resources/did-configuration/#origin",
"linked_dids": "https://identity.foundation/.well-known/resources/did-configuration/#linked_dids"
}
]
}

0 comments on commit 8e90568

Please sign in to comment.