Expand description
Single-owner KERI state for the witness.
All libkeri state lives in one libkeri::Habery owned by a dedicated OS
thread. HTTP handlers never touch it directly: they send a Command over a
channel and await the reply. Because exactly one thread ever holds the
state, there are no locks, so there is nothing to deadlock on.
The Habery is opened on the owner thread, and a plain thread (not a tokio task) is used because libkeri is synchronous and does blocking work (LMDB, signing, Argon2 stretching) that must not stall the async runtime.
Structsยง
- Actor
Handle - Cheap, cloneable handle used by HTTP handlers to talk to the actor.
- Witness
Actor ๐ - State owned by the actor thread. Only ever accessed from that one thread.
Enumsยง
- Actor
Error - Error returned by the actor, mapped to an HTTP status by the server.
- Command ๐
- Work the actor can perform. Each variant carries its own reply channel.
- Receipt
Outcome - Outcome of submitting an event to
/receipts(keripyReceiptEnd.on_post).
Constantsยง
- QUEUE_
DEPTH ๐ - Max queued commands before handlers wait (backpressure).
Functionsยง
- spawn
- Spawn the owner thread, open the witness Habery on it, and return a handle plus the witness AID once initialization has finished.
- witness_
salt ๐ - Returns the 16-byte salt for a known witness alias, matching keripy demo salts.
Type Aliasesยง
- Reply ๐