From 6531292ceb2ff72f01f2c9133a4abb3e99890bbc Mon Sep 17 00:00:00 2001 From: James Chartrand Date: Mon, 20 Jan 2025 10:36:50 -0500 Subject: [PATCH] add did:web test tenant --- src/config.js | 10 +++++++++- src/test-fixtures/did/.well-known/did.json | 16 ++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/test-fixtures/did/.well-known/did.json diff --git a/src/config.js b/src/config.js index e879666..7dcc7b6 100644 --- a/src/config.js +++ b/src/config.js @@ -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 = {} @@ -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 diff --git a/src/test-fixtures/did/.well-known/did.json b/src/test-fixtures/did/.well-known/did.json new file mode 100644 index 0000000..9760d2e --- /dev/null +++ b/src/test-fixtures/did/.well-known/did.json @@ -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" + } + ] +} \ No newline at end of file