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