diff --git a/examples/fetch-key-hkp.js b/examples/fetch-key-hkp.js index ef36df2..b8aed23 100644 --- a/examples/fetch-key-hkp.js +++ b/examples/fetch-key-hkp.js @@ -7,8 +7,17 @@ const main = async () => { // Process it to extract the UIDs and their claims const obj = await doip.keys.process(key) - // Log the claims of the first UID - console.log(obj.users[0].claims) + // Process every claim for every user + obj.users.forEach(async user => { + user.claims.forEach(async claim => { + // Match the claim + await claim.match() + + // Verify the claim + await claim.verify() + console.log(claim) + }) + }) } main() \ No newline at end of file diff --git a/examples/verify-claim.js b/examples/verify-claim.js index c62eb2d..6f2613c 100644 --- a/examples/verify-claim.js +++ b/examples/verify-claim.js @@ -5,10 +5,10 @@ const main = async () => { const claim = new doip.Claim("dns:doip.rocks", "3637202523e7c1309ab79e99ef2dc5827b445f4b") // Match it to candidate service providers - claim.match(); + claim.match() // Verify the claim - await claim.verify(); + await claim.verify() // Log the claims of the first UID console.log(claim)