---
# System prepended metadata

title: Keri indirect mode incomming event processing
tags: [core workflow]

---

# Keri indirect mode incomming event processing

###### tags: `core workflow`

```plantuml
@startuml
	start
    :get all events for identifier;
    if (ICP present) then (yes)
        repeat :Other event present;
            fork
                :Receipt or multisig?;
                :enough receipts present?;
            fork again
                :Other event?;
            endfork
            :Apply to state;
            if (Out of order) then (no)
                if (Duplicity?) then (yes)
                    :Invalid state;
                    stop
                else (no)
                endif
            else (yes)
            endif
            :Mutable state;
        repeat while (More events present) is (yes) not (no)
        :Final state return;
        stop
    else (no)
    :Invalid state;
    stop
@enduml
```