Expand description
Local KEL watcher for libkeri.
A watcher follows another identifier’s KEL as that identifier’s witnesses
serve it, and tells its owner when the KEL reaches a state the owner is
waiting for. Its first use is delegation approval: a delegate waits for its
delegator to anchor the delegate’s seal in a fully witnessed event, then
completes the delegated event (Habery::complete_delegation).
This replaces both approaches keripy has used. In keripy 1.1 (Sealer)
the delegate asked the delegator before going to its witnesses; in 1.2 and
later (Anchorer) the delegate witnesses first and the delegator writes
the authorizer seal into its own database when it confirms. Here neither
side writes approval state for the other. The delegate trusts only the
delegator’s KEL as the delegator’s witnesses serve it.
The core is sans-IO, following libkeri’s memory model (no threads, locks
or async). DelegationWatch::next_request says what to fetch, the owner
fetches it however it likes and hands the body to
DelegationWatch::feed together with its Habery. The http feature
adds an async driver on libkeri-http (http::wait_for_approval).
Modules§
- http
- Async driver for
DelegationWatchover libkeri-http.
Structs§
- Delegation
Watch - Waits for the delegator of a local delegated identifier to approve its
event at
sn, by following the delegator’s KEL through the delegator’s witnesses (keripy: app/delegating.py Anchorer.processUnanchoredEscrow, but without the delegator or delegate writing the seal for the other). - Request
- A fetch the owner should perform: an HTTP GET of
url. - Source
- One witness of the watched identifier and the URL it was resolved at.
Enums§
- Outcome
- What a fed response changed.
- Watch
Error
Functions§
- witness_
oobi_ url - The witness OOBI URL for
aidat witnesswitserved frombase({base}/oobi/{aid}/witness/{wit}). keripy (1.1, 1.2, main) and libkeri-witness serve the full KEL there once its last event is fully witnessed. - witness_
sources - The witnesses of
aidas this Habery knows them: the witness list fromaid’s current key state, each with thehttpURL learned from its OOBI. Witnesses without a known URL are skipped.