@startuml
skinparam ParticipantPadding 20
skinparam BoxPadding 20
title Libindy anoncreds
scale 0.9
box "Issuer" #LightBlue
participant "Walleted Issuer" as IW
actor Issuer as I
endbox
box "Prover"
actor Prover as P
participant "Walleted Prover" as PW
endbox
actor Verifier as V
participant "Ledger" as L
note over IW, L #white
dashed arrows: a value from Ledger may be cached (in wallet?)
bold text: anoncreds libindy API call
red: internal communication with walleted entity
green: submit/get to/from secure wallet
blue: submit/get to/from Ledger
black: communication between Issuer/Prover/Verifier
endnote
=== Create Claim Definition ==
I -> IW: 1. indy_issuer_create_and_store_claim_def
IW -[#green]> IW: store keys
IW -> I:
I-[#blue]>L: send CLAIM_DEF txn
L-[#blue]>I:
I -> IW: 2. indy_wallet_set_seq_no_for_value
IW -[#green]> IW: update claim_def seq_no
=== Create Revocation Registry ==
I -> IW: 3. indy_issuer_create_and_store_revoc_reg
IW -[#green]> IW: get keys
IW -[#green]> IW: store revoc reg
IW -> I:
I-[#blue]>L: send REVOC_REG txn
L-[#blue]>I:
I -> IW: 4. indy_wallet_set_seq_no_for_value
IW -[#green]> IW: update revpc_reg seq_no
=== Create Master secret ==
P -> PW: 5.indy_prover_create_master_secret
PW -[#green]> PW: store master secret
=== Send Claim Offer ==
I -[#black]> P: send claim offer
P -> PW: 6. indy_prover_store_claim_offer
PW -[#green]> PW: store claim offers
=== Show Claim Offers in UI ==
P -> PW: 7.indy_prover_get_claim_offers
PW -[#green]> PW: get claim offers
PW -> P:
P -> P: show on UI
=== Request and Issue Claims ==
P -[#blue]-> L: send GET_CLAIM_DEF req
L -[#blue]-> P:
P -> PW: 8.indy_prover_create_and_store_claim_req
PW -[#green]> PW: get master secret
PW -[#green]> PW: store claim_req
PW -> P:
P -[#black]> I: send claim request
I -> IW: 9. indy_issuer_create_claim
IW -[#green]> IW: get keys
IW -[#green]> IW: get revoc reg
IW -> I: ,
I -[#blue]> L: send REVOC_REG_UPDATE txn
I -[#black]> P: send claim
P -> PW: 10.indy_prover_store_claim
PW -[#green]> PW: get claim request
PW -[#green]> PW: store claim
=== Show Claims on UI ==
P -> PW: 11. indy_prover_get_claims
PW -[#green]> PW: get claims
PW -> P:
P -> P: show on UI
=== Present Claim to 3d Party (proof request)==
V -[#black]> P: send proof request
|||
P -> PW: 12.indy_prover_get_claims_for_proof_req
PW -> P:
P -> P: show on UI
P -> P: select claims for the proof
|||
P -[#blue]-> L: send GET_SCHEMA req
L -[#blue]-> P:
P -[#blue]-> L: send GET_CLAIM_DEF req
L -[#blue]-> P:
P -[#blue]-> L: send GET_REVOC_REG req
L -[#blue]-> P:
|||
P -> PW: 13.indy_prover_create_proof
PW -[#green]> PW: get claim
PW -> P:
|||
P -[#black]> V: send proof
|||
V -[#blue]-> L: send GET_SCHEMA req
L -[#blue]-> V:
V -[#blue]-> L: send GET_CLAIM_DEF req
L -[#blue]-> V:
V -[#blue]-> L: send GET_REVOC_REG req
L -[#blue]-> V:
|||
V -> V: 14. indy_verifier_verify_proof
=== Revoke Claims ==
I -> IW: 15. indy_issuer_revoke_claim
IW -[#green]> IW: get keys
IW -[#green]> IW: get revoc reg
IW -> I:
I -[#blue]> L: send REVOC_REG_UPDATE txn
@enduml