OpenPay (3 crates, ~13k LOC, 175 tests) op-connect sub-merchant onboarding + KYB + split-payments + payouts + 1099-K op-3ds2 3DS2.3 SCA processor (AReq/ARes/CReq/CRes/RReq/RRes + exemptions) op-tax US/EU/UK/AU/CA/IN tax with Avalara/Stripe/CCH/Vertex/TaxJar adapters Smart Byte (3 crates, ~7k LOC, 57 tests) smart-byte-libp2p libp2p transport (kad/gossipsub/mdns/autonat/relay/dcutr/identify/ping/req_resp) smart-byte-crdt LWW/GCounter/PnCounter/OrSet/LwwMap/RgaList/2P-Set + HLC + vector clock + Automerge/Yjs interop smart-byte-keri-witness KERI key-rotation cycle + witness layer + watchers + recovery + delegation EOC (3 crates, ~8k LOC, 108 tests) eoc-tools function-calling across Anthropic/OpenAI/Google/Mistral/Cohere + parallel exec + sandbox eoc-multimodal vision (CLIP/SigLIP/ColPali) + audio (Whisper/MMS) + video sampling + modality router eoc-spec-decode vanilla + SpS-with-temp + lookahead speculative decoding + EAGLE/Medusa stubs All three workspaces compile cleanly. Forbidden-unsafe, no unwrap outside tests. Co-Authored-By: Claude Opus 4.7 <[email protected]>
46 lines
1.8 KiB
Rust
46 lines
1.8 KiB
Rust
//! Smart Byte networking: libp2p transport.
|
|
//!
|
|
//! This crate is the second transport for Smart Byte alongside
|
|
//! [`smart-byte-net`] (which wraps Iroh). It exposes the same conceptual
|
|
//! shape — publish an [`Envelope`](smart_byte_core::Envelope) on a
|
|
//! topic, subscribe to a topic, fetch an envelope by its
|
|
//! [`Said`](smart_byte_core::Said) — but does so over libp2p's broader
|
|
//! protocol surface:
|
|
//!
|
|
//! * **Transports:** TCP + QUIC.
|
|
//! * **Security:** Noise (XX handshake).
|
|
//! * **Stream multiplexer:** Yamux.
|
|
//! * **Peer / content discovery:** Kademlia DHT, mDNS (LAN).
|
|
//! * **Publish / subscribe:** Gossipsub.
|
|
//! * **NAT traversal:** AutoNAT + Circuit Relay v2 + DCUtR hole-punch.
|
|
//! * **Liveness + identification:** identify + ping.
|
|
//! * **Direct fetch:** request-response with a CBOR envelope codec.
|
|
//!
|
|
//! Operators choose between the two transports based on deployment
|
|
//! shape. Iroh is the lower-friction QUIC + hole-punching path; libp2p
|
|
//! is the broader-interop path that connects Smart Byte to the existing
|
|
//! P2P ecosystem (IPFS, Filecoin, Ethereum, Substrate, …).
|
|
|
|
#![forbid(unsafe_code)]
|
|
|
|
pub mod behaviour;
|
|
pub mod codec;
|
|
pub mod discovery;
|
|
pub mod error;
|
|
pub mod event;
|
|
pub mod identity;
|
|
pub mod node;
|
|
pub mod relay;
|
|
pub mod transport;
|
|
|
|
pub use behaviour::{SmartByteBehaviour, SmartByteBehaviourEvent};
|
|
pub use codec::{EnvelopeCodec, EnvelopeRequest, EnvelopeResponse};
|
|
pub use error::{Error, Result};
|
|
pub use event::{NodeEvent, run};
|
|
pub use identity::{load_or_create_keypair, load_keypair, save_keypair};
|
|
pub use node::{Libp2pNode, NodeConfig};
|
|
|
|
// Re-export the libp2p surface callers most commonly need so they do
|
|
// not have to depend on `libp2p` directly.
|
|
pub use libp2p::{Multiaddr, PeerId, identity::Keypair};
|
|
pub use libp2p::gossipsub::{Config as GossipsubConfig, MessageId};
|