Skip to content

Commit 7de8b59

Browse files
docs: update keriox_core README with feature flags and abstractions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 700f0ba commit 7de8b59

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

keriox_core/README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,35 @@ To use this library, a third-party key provider that derives public-private key
1010

1111
## Available Features
1212

13+
- `storage-redb` *(default)*: enables [redb](https://github.com/cberner/redb) as the persistent storage backend. Without this feature, an in-memory `MemoryDatabase` is available for testing or plugging in custom backends.
1314
- `query`: enables query messages and their processing logic.
1415
- `oobi`: provides events and logic for the [oobi discovery mechanism](https://weboftrust.github.io/ietf-oobi/draft-ssmith-oobi.html).
15-
- `mailbox`: enables the storing of messages intended for other identifiers and provide them to recipient later. This feature is meant for witnesses and watchers.
16+
- `oobi-manager`: high-level OOBI management. Implies `oobi`, `query`, and `storage-redb`.
17+
- `mailbox`: enables the storing of messages intended for other identifiers and provides them to recipients later. This feature is meant for witnesses and watchers. Implies `query` and `storage-redb`.
18+
19+
## Architecture
20+
21+
### NotificationBus
22+
23+
`NotificationBus` is a pluggable dispatch abstraction for event notifications. The default implementation dispatches in-process, but custom implementations (e.g. SQS for serverless environments) can be injected:
24+
25+
```rust
26+
// Use the default in-process dispatch:
27+
let bus = NotificationBus::new();
28+
29+
// Or provide a custom dispatch:
30+
let bus = NotificationBus::from_dispatch(my_custom_dispatch);
31+
```
32+
33+
You can also pass an existing bus to `default_escrow_bus` via `Some(bus)` to share a single dispatch across escrows.
34+
35+
### EscrowSet
36+
37+
`EscrowSet<D>` is a named struct (replacing the previous anonymous tuple) returned by `default_escrow_bus`. It provides typed access to each escrow:
38+
39+
- `out_of_order` -- events received before their dependencies
40+
- `partially_signed` -- events awaiting additional signatures
41+
- `partially_witnessed` -- events awaiting additional witness receipts
42+
- `delegation` -- delegated events awaiting approval
43+
- `duplicitous` -- detected duplicitous events
1644

0 commit comments

Comments
 (0)