generated from digitalcredentials/isomorphic-lib-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
805f3c6
commit 7654148
Showing
6 changed files
with
65 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const knownDidRegistries = [ | ||
{ | ||
name: 'DCC Pilot Registry', | ||
url: 'https://digitalcredentials.github.io/issuer-registry/registry.json' | ||
}, | ||
{ | ||
name: 'DCC Sandbox Registry', | ||
url: 'https://digitalcredentials.github.io/sandbox-registry/registry.json' | ||
}, | ||
{ | ||
name: 'DCC Community Registry', | ||
url: 'https://digitalcredentials.github.io/community-registry/registry.json' | ||
}, | ||
{ | ||
name: 'DCC Registry', | ||
url: 'https://digitalcredentials.github.io/dcc-registry/registry.json' | ||
} | ||
] | ||
|
||
export default knownDidRegistries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { getConfig } from './config.js' | ||
/** | ||
* Returns the names of any known DID registries in which the VC's issuer appears. | ||
* | ||
* @returns A list of names of DID registries the issuer appears in. | ||
*/ | ||
export function getRelevantRegistryNames({ issuer }) { | ||
const { registries } = getConfig() | ||
const issuerDid = typeof issuer === 'string' ? issuer : issuer.id | ||
const issuerInfo = registries.didEntry(issuerDid) | ||
// See if the issuer DID appears in any of the known registries | ||
// If yes, assemble a list of registries it appears in | ||
return issuerInfo?.inRegistries | ||
? Array.from(issuerInfo.inRegistries).map((r) => r.name) | ||
: null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters