Crate iroh_db

Crate iroh_db 

Source
Expand description

Rust-native, local-first distributed database built on iroh.

Local-first typed storage plus authenticated iroh synchronization.

Structs§

AuthorId
A cryptographic device identity, represented independently from the iroh adapter.
BackupOptions
Controls whether a closed-directory backup includes the separately encrypted local key vault.
BackupReport
Summary of a verified filesystem backup or restore.
BlobHash
The BLAKE3 content hash of any immutable iroh blob.
BlobRef
A domain-bound reference to an encrypted immutable blob manifest.
BlobStream
Lazy authenticated plaintext reader over independently encrypted chunks.
Blobs
Encrypted blob import and lazy streaming handle.
CapabilityCertificate
A signed endpoint-targeted capability certificate.
CapabilityId
The stable hash of a canonical capability certificate.
Change
A committed materialized-record change.
ChangeBatch
One atomic post-commit subscription event.
Collection
A handle to one strongly typed collection.
CollectionId
The stable identifier of a typed collection.
CommitBody
A decrypted atomic domain transaction.
CommitEnvelope
An immutable signed commit blob.
CommitHeader
Public authenticated metadata for an encrypted commit body.
CommitId
The content hash of an immutable commit blob.
ControlTransition
A signed, immutable, single-successor domain authority transition.
Cursor
An opaque, authenticated continuation position.
DeviceGroup
Application-facing label that groups device endpoints without changing protocol identity.
DomainDescriptor
A signed immutable domain genesis descriptor.
DomainId
An isolated authorization, encryption, replication, and transaction boundary.
DomainSeed
Sensitive bootstrap material for adding a new device to an encrypted domain.
Dot
The unique, deterministic identity of an operation in a domain.
EqualityFilter
A type-checked equality predicate over canonical visible field values.
FetchMetrics
Live, lock-free counters for one lazy multi-provider stream.
FetchOptions
Bounded remote streaming policy.
FetchScheduler
Process-local weighted transfer admission shared by blob engines.
FieldDescriptor
The stable replicated contract for one record field.
GossipSession
An active, lossy gossip subscription that can announce and act on sync hints.
GrowOnlySet
A set whose only operation is insertion.
Immutable
A write-once register that retains unequal concurrent initial values.
Invitation
A signed endpoint-targeted domain bootstrap payload.
InvitationSecret
A one-time offline invitation bearer secret.
InvitationTicket
An encrypted offline invitation envelope safe to store without its bearer secret.
IrohDb
A local-first embedded database with one default private domain.
IrohDbBuilder
Opens a database with the exact deterministic schema migrations understood by this application version.
IrohSigner
The iroh endpoint signing identity used by the database protocol.
LatencyMetrics
Aggregate latency evidence without high-cardinality labels.
Lww
A causal last-writer-wins register that never uses wall-clock time.
MigrationId
A stable identifier for one domain-local schema migration attempt.
MigrationReport
Progress from one complete pass over every registered local-domain migration.
MultiValue
A register retaining every causally maximal assignment.
Operation
One field or record operation in an atomic commit.
OperationalMetrics
Low-cardinality operational counters that never contain record or capability values.
OrSet
An add-wins observed-remove set.
OrderedList
A replicated growable ordered list with stable element dots.
Page
One stable page and an optional continuation cursor.
PermissionSet
A validated compact set of explicit permissions.
PnCounter
A state-based positive/negative counter with per-author components.
ProjectionReport
Result of copying an explicit current-state projection into independent domain history.
ProviderMetrics
Low-cardinality local quality observations for one provider slot.
Query
A type-checked local collection query.
RangeFilter
A type-checked ordered predicate over canonical visible field values.
SchemaActivation
The atomic publication marker for a complete staged migration.
SchemaDescriptor
A validated, versioned collection schema.
SchemaId
The stable hash of a canonical record schema.
SchemaStage
One bounded, invisible target record in a causal schema migration.
Snapshot
An immutable encrypted local snapshot and its verified state root.
SnapshotId
The content hash of an immutable snapshot blob.
Subscription
A bounded typed collection change stream.
SyncNode
A running iroh endpoint routing sync control and immutable blob protocols.
SyncReport
Result counters for one complete bidirectional reconciliation round.
Transaction
An atomic builder restricted to the database’s default domain.
TransactionId
A unique identifier for one domain-local transaction.
TypedField
Compile-time metadata for one strongly typed query field.
VerificationReport
Evidence from immutable-object and derived-state verification.
VersionVector
A canonical summary of the highest observed commit sequence for each author.

Enums§

BlobError
Encrypted manifest, chunk, streaming or storage failure.
BlobPriority
Application scheduling class for remote blob reads.
ChangeKind
The visible effect of a committed record mutation.
ConsistencyMode
A domain’s immutable replicated write policy.
CrdtError
A deterministic CRDT operation or merge failure.
CrdtKind
A built-in deterministic replicated-field strategy.
DbError
An embedded database operation failure.
MigrationError
A deterministic application schema migration failure.
OperationKind
The stable operation opcode applied by the materializer.
OrderDirection
Query result order for a typed field.
Permission
One independently grantable domain permission.
Predicate
A typed query predicate.
RangeOperator
One supported ordered comparison.
RecordError
A typed-record schema or canonical codec failure.
RemoteApply
Result of feeding one authenticated immutable commit into the local apply kernel.
SubscriptionError
Subscription receive failure.
SubscriptionEvent
One ordered subscription event.

Constants§

SYNC_ALPN
The sole iroh-db control-plane ALPN.

Traits§

FieldState
Canonical state codec and schema metadata for a replicated field.
IrohRecord
Strongly typed record contract generated by #[derive(IrohRecord)].
KeyProvider
Application-supplied durable device identity and encrypted domain-key storage.
Merge
Deterministically combines state from another replica.
RecordKey
Canonical application record identifier encoding.

Functions§

backup_closed
Creates an authenticated backup from a closed database using its default file key provider.
backup_closed_with_signer
Creates a closed-store backup authenticated by an application-managed key provider.
restore_backup
Verifies the embedded self-signature and every file before publishing a restore directory.
restore_backup_from
Restores only when the authenticated catalog signer matches the expected device.
staging_digest
Hashes a complete staging set in canonical source-key order.

Derive Macros§

IrohRecord
Generates the stable schema, canonical record codec and typed field metadata.