@startuml

skinparam backgroundColor transparent

'Lets define some common colors globally
!$C_PRT = "#118888"
!$C_ARG = "#daa520"
!$C_VAR = "#daa520"

'Ensure messages are not too wide
skinparam maxMessageSize 200
skinparam wrapWidth 300


!function params($p)
!return "<color " + $C_ARG + ">"+ $p + "</color>"
!endfunction

skinparam sequenceMessageAlign center

skinparam BoxPadding 100

autonumber "<b>(000)"

title Status List Verification Process

participant i as "(Q)EAA Provider"
participant rs as "Provider Resource server/CDN"
participant v as "Relying Party or Wallet"

loop Upon revocation
i -> rs : Update status list with latest info
end loop

i --> v : Receive Presentation\nwith (Q)EAAsl\n(for instance via OID4VCI)


v -> v : Verify Presentation Signature
loop for every (Q)EAA
v -> v : Verify individual (Q)EAA signatures
v -> v : Check credential payload/schema
v -> v : Check for one or more statusList entries

loop for every status list entry
v -> rs : HTTP GET: status list URI from the status list value in the VC
rs -> v : HTTP 200: status list token/vc
v -> v : Check signatures of the status list token/vc,\nmatching issuer against issuer of (Q)EAA
v -> v : (BitstringStatusList) Match purpose of StatusList2021 with purpose in VC
v -> v : Decompress bitstring
v -> v : Lookup status list index from (Q)EAA in bitstring
v -> v : In case of 1 return validation 'failure',\n in case of 0 return 'success'
end loop
end loop
v -> v : Return overall verification status results
v -> v : <logic how to handle verification failures>

@enduml
