Skip to content

Commit

Permalink
Less sophisticated, easier to follow
Browse files Browse the repository at this point in the history
  • Loading branch information
expede committed Oct 18, 2023
1 parent 42fb59c commit 343e9f2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,14 @@ During validation of a UCAN delegation chain, the [canonical CID] of each UCAN d

``` js
// Pseudocode
const delegators = invocation.prf.map(proof => proof.iss)

const proofs = invocation.prf
const delegators = new Set(proofs.map(proof => proof.iss))

proofs.forEach(delegation => {
invocation.prf.forEach(delegation => {
// Is the proof in the revocation store?
store.lookup(delegation).then(revocation => {

// Is the revocation issuer in this proof chain?
if (delegators.has(revocation.iss)) {
if (delegators.includes(revocation.iss)) {
throw new Error("Revoked")
}
})
Expand Down

0 comments on commit 343e9f2

Please sign in to comment.