Skip to main content

Crate qualia_peer

Crate qualia_peer 

Source
Expand description

Qualia Peer Runtime facade.

This crate is the application replacement for libp2p. It does not import libp2p. It enables core-db qdnf only (no libp2p-compat, gpu-runtime, wgsl-forge, privacy-he, zk-culling, or profile_target_1024). Default qualia-core-db is Native Independent (libp2p-compat is LIG-only). Packages remain open.

Application API: PeerHost::pair, PeerHost::exchange_protected, and PeerHost::clinical_session. The 64-byte vertical slice (two_peer_ipc_exchange) is an example, not the application API.

Structs§

CapabilityVersion
Pinned capability identity: SHA-384 transcript digest plus generation.
ClinicalSession
Session-owned clinical tables. Not a public patient index.
ControllerIdentity
CredentialScope
Clinician / mission credential bound to one org, purpose and generation.
HostAdmission
Aggregate admission owner for one host process.
InventoryEntry
One public networking entry. Names match the application-facing surface.
IpcEndpoint
One end of a same-device IPC pair.
LeaseTable
Libp2pCoupling
One remaining libp2p (or gossipsub-class) coupling isolated behind LIG.
LinkId
Epoch-scoped 128-bit QLink selector.
NativePeer
NymSimulatedBearer
Deterministic, zero-heap in-memory simulated Nym mixnet bearer. Used for pure integration testing of the QSession handshake over Nym.
ObservedLocator
Adapter-observed bearer locator. Never taken from a claimed payload field.
OperationId
Local operation identity. Survives path change; never recycled while live.
PeerBuilder
PeerHost
Host builder for a bounded native peer cell.
RedactedDashboard
Redacted operational counts. No patient / clinician identifier fields.
ReservationHandle
Owner-issued reservation. Not Copy: a copied token cannot be mutated to reclaim a different amount.
ReservationLedger
ResourceBudget
ScopeEpoch
Scope / cell epoch binding for leases and caches.
ServiceId
SessionBinding
Application session binding. Fields are private; Active requires a permit.

Enums§

Plane
Identifier fabric planes. A verified route is not a NaturalAgent.
PolicyOutcome
QPolicy decision. Only Allow with a current grant handle admits service traffic.
QdnfError
Typed protocol / runtime outcome. Display is diagnostic only; wire codes are the as u16 discriminants below.
SessionState

Constants§

AUTHORISED_IPC_MTU
Local-ipc MTU that fits 4096 + AEAD overhead + QFrame header.
AUTHORISED_PAYLOAD_CAP
Authorised application payload ceiling (E04.5 / P2).
AUTHORISED_ROUNDTRIP_CAP
Protected round-trip size. Equals AUTHORISED_PAYLOAD_CAP on local-ipc.
CELL_BYTES_DEFAULT
Default per-peer cell when the caller does not specify a budget.
NYM_SPHINX_MTU
Sphinx maximum payload size for standard Nym packets (1,024 bytes).

Traits§

Bearer

Functions§

active_session_count
active-session count.
admit_capability_generation
Anti-rollback: an offered generation older than min is StaleGeneration.
admit_scoped_credential
Admit a scoped credential against the live revocation generation.
authorised_ipc_stream_exchange
Two peers constructed through one host owner exchange authorised protected data.
authorised_ipc_stream_exchange_in
Same protected path, with the caller’s cell budget and bearer MTU.
cargo_toml_depends_on_libp2p
True only if this crate’s Cargo.toml names a libp2p crate or feature. Package description / comments mentioning libp2p do not count.
decapsulate_nym
Decapsulate a Nym Sphinx payload envelope into a QFrame and sender locator.
denied_op_count
denied-op count.
encapsulate_nym
Encapsulate a QFrame into a Nym Sphinx payload envelope.
extra_identity_multiplies_host_budget
Extra DIDs/controllers cannot multiply the host byte cap.
implicit_dns_ip_fallback
This crate’s QPR path does not fall back to DNS or IP sockets.
ipc_pair
Construct a connected IPC pair with boot-scoped locators 0x01 and 0x02.
libp2p_imported
This crate does not import libp2p.
native_independent_daemon_proven
Default daemons compile without libp2p. LIG remains an explicit feature.
native_ipc_stream_exchange
Two-peer native stream without libp2p, IP, or DNS. Protected QPR path.
negotiate_capability
Admit a peer only when generation is current and the pinned digest matches.
pair_ipc_cells
Two native peers over local-ipc-v1, admitted from one HostAdmission.
patient_identifiers_on_dashboard
Dashboard APIs do not surface patient identifiers.
pin_capability_version
Pin a capability to a version digest. Empty id or generation 0 is rejected.
public_entry_points
Public QPR entry points. None of these import or call libp2p.
realistic_device_study_executed
Realistic-user/device study (E20.6) has not been executed.
redacted_dashboard
Build a dashboard from counts only. Callers never pass patient ids.
remaining_libp2p_couplings
Isolated LIG couplings. Not the Native Independent proven predicate.
revoked_credential_count
revoked-credential count.
safe_failure
Fail closed with a typed code. untrusted is not copied into the error.
two_peer_ipc_exchange
Run A↔B native exchange and return payload bytes copied at B.
universal_org_superuser
There is no organisation-wide superuser in this slice.
verify_update_bytes
Signed update metadata: exact SHA-384 of the bytes. No signed flag.