Skip to content

Commit

Permalink
add did:web test tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
jchartrand committed Jan 20, 2025
1 parent d7f7233 commit 6531292
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const defaultLogLevel = 'silly'
const testSeed = 'z1AeiPT496wWmo9BG2QYXeTusgFSZPNG3T9wNeTtjrQ3rCB'
export const TEST_TENANT_NAME = 'testing'
export const SECOND_TEST_TENANT_NAME = 'test'
export const DID_WEB_TEST_TENANT_NAME = 'did-web-test'
const randomTenantName = 'random'
let DID_SEEDS = {}

Expand All @@ -27,7 +28,14 @@ async function parseTenantSeeds() {
didSeed: await decodeSeed(testSeed),
didMethod: 'key'
}
// also add in the random test key
// and add a test tenant for did:web
DID_SEEDS[DID_WEB_TEST_TENANT_NAME] = {
didSeed: await decodeSeed(testSeed),
didMethod: 'web',
didUrl:
'https://raw.githubusercontent.com/digitalcredentials/signing-service/refs/heads/jc-add-eddsa-2022/src/test-fixtures/did'
}
// and add in a random test key
const randomSeed = { didSeed: await generateSecretKeySeed() }
DID_SEEDS[randomTenantName] = await decodeSeed(randomSeed.didSeed)
const allEnvVars = process.env
Expand Down
16 changes: 16 additions & 0 deletions src/test-fixtures/did/.well-known/did.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/ed25519-2020/v1",
"https://w3id.org/security/suites/x25519-2020/v1"
],
"id": "did:web:raw.githubusercontent.com:digitalcredentials:signing-service:refs:heads:jc-add-eddsa-2022:src:test-fixtures:did",
"assertionMethod": [
{
"id": "did:web:raw.githubusercontent.com:digitalcredentials:signing-service:refs:heads:jc-add-eddsa-2022:src:test-fixtures:did#z6MkfGZKFTyxiH9HgFUHbPQigEWh8PtFaRkESt9oQLiTvhVq",
"type": "Ed25519VerificationKey2020",
"controller": "did:web:raw.githubusercontent.com:jchartrand:didWebTest:main",
"publicKeyMultibase": "z6MkfGZKFTyxiH9HgFUHbPQigEWh8PtFaRkESt9oQLiTvhVq"
}
]
}

0 comments on commit 6531292

Please sign in to comment.