Skip to main content

Crate saorsa_core

Crate saorsa_core 

Source
Expand description

§Saorsa Core

A next-generation peer-to-peer networking foundation built in Rust.

§Features

  • QUIC-based transport with NAT traversal
  • IPv4-first with simple addressing
  • Kademlia DHT for distributed routing
  • Post-quantum cryptography (ML-DSA-65, ML-KEM-768)

Re-exports§

pub use dht_lookup::CandidateInsertion;
pub use dht_lookup::IterativeLookup;
pub use dht_lookup::LookupConfig;
pub use dht_lookup::LookupError;
pub use dht_lookup::LookupKey;
pub use dht_lookup::LookupNode;
pub use dht_lookup::LookupPeerState;
pub use dht_lookup::LookupProgress;
pub use dht_lookup::LookupQuery;
pub use dht_lookup::LookupQueryOutcome;
pub use dht_lookup::LookupRunError;
pub use dht_lookup::LookupTermination;
pub use dht_lookup::collect_after_first_with_grace;
pub use dht_lookup::run_iterative_lookup;
pub use dht_lookup::xor_distance;
pub use identity::peer_id::PeerId;

Modules§

client_routing
Portable client routing report and witnessed-close-group policy. Client-side peer report selection and witness normalization. Transport I/O, node admission, and routing maintenance remain outside this module.
dht_lookup
Transport-independent iterative DHT lookup, shared by native and browser clients. Transport-independent Kademlia iterative lookup scheduling.
identity
User identity and privacy system (public — accessed via path by saorsa-node). Cryptographic Identity Module
signed_address
Portable signed address publications and locally verified provenance. Portable owner-signed address publications. Forward the original signed record; filtering and reachability normalization belong to derived views.

Structs§

AdaptiveDhtConfig
Configuration for the AdaptiveDHT layer
Bytes
Payload type accepted by P2PNode::send_message, re-exported so callers need not depend on the bytes crate to name it. A cheaply cloneable and sliceable chunk of contiguous memory.
CachedCloseGroupPeer
A peer in the persisted close group cache.
CloseGroupCache
Persisted close group snapshot with trust scores.
DHTNode
DHT node representation for network operations.
IPDiversityConfig
Configuration for IP diversity enforcement at two tiers: exact IP and subnet.
MlDsa65
ML-DSA-65 implementation using FIPS-certified algorithm
MultiAddr
Composable, self-describing network address with an optional PeerId suffix.
NodeConfig
Configuration for a P2P node
P2PNode
Main P2P network node that manages connections, routing, and communication
RejectedSupplementalAddress
A supplemental endpoint that could not be registered.
ResponderView
One responder’s self-inclusive closest-K view.
SupplementalAddressRegistration
Result of replacing the node’s supplemental address registration.
TransportAddressRecord
One address in the extensible V2 address plane.
TrustEngine
Local trust engine based on direct peer observations.
TrustRecord
A single peer’s trust record for serialization.
WebRtcCertificateHash
A stable SHA-256 DTLS-certificate digest encoded as a multiaddr certhash value.
WebRtcDirectAddr
Validated WebRTC Direct endpoint carried by TransportAddr.
WitnessedCloseGroup
Witnessed close-group selection result for a target key.

Enums§

AddressType
Address classification for priority ordering and staleness eviction.
DhtNetworkEvent
DHT network events
KnownReachability
A reachability class understood by this implementation.
KnownTransport
A transport understood by this implementation.
NodeMode
Operating mode of a P2P node.
P2PEvent
Network events that can occur in the P2P system
PeerRouteKind
Coarse classification of the route by which a peer’s traffic reached us.
SupplementalAddressRejection
Reasons a supplemental endpoint can be rejected.
TrustEvent
Trust-relevant events for peer scoring.

Constants§

MAX_TRANSPORT_ADDRESS_PAYLOAD
Maximum encoded address payload accepted from the network.
MAX_TRANSPORT_ADDRESS_RECORDS
Maximum number of records accepted in one complete address set.

Type Aliases§

Key
DHT key type (256 bits).