From 62c6081a91861f9884c0447ce46d7d29e757982a Mon Sep 17 00:00:00 2001 From: "David I. Lehn" Date: Wed, 14 Aug 2024 02:14:01 -0400 Subject: [PATCH] Fixes. - Add static DID Document to loader. - Fix typos. --- examples/rt.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/rt.js b/examples/rt.js index 4cd67ab1..08442f4b 100644 --- a/examples/rt.js +++ b/examples/rt.js @@ -124,7 +124,7 @@ async function main({credential, documentLoader}) { } // setup example for did:web - //const VP_DID = 'did:web:example.org:issuer:123'; + const VP_DID = 'did:web:example.org:issuer:123'; const VP_DID_URL = 'https://example.org/issuer/123'; //const VP_DID_DOC_URL = VP_DID_URL + '/did.json'; @@ -137,8 +137,8 @@ async function main({credential, documentLoader}) { verificationKeyPair: vpEcdsaKeyPair }); const didWebKey = vpMethodFor({purpose: 'assertionMethod'}); - vcEcdsaKeyPair.id = didWebKey.id; - vcEcdsaKeyPair.controller = vpDidDocument.id; + vpEcdsaKeyPair.id = didWebKey.id; + vpEcdsaKeyPair.controller = vpDidDocument.id; // setup VP ecdsa-rdfc-2019 signing suite const vpSigningSuite = new DataIntegrityProof({ signer: vpEcdsaKeyPair.signer(), @@ -146,6 +146,10 @@ async function main({credential, documentLoader}) { cryptosuite: ecdsaRdfc2019Cryptosuite }); + // add static resources + loader.addStatic(VP_DID, vpDidDocument); + //loader.addStatic(VP_DID_DOC_URL, vpDidDocument); + // add static verification method result // FIXME // The document loader usually would send did:web URLs to did-method-web