Expand description
iroh-http-core — Iroh QUIC endpoint, HTTP/1.1 via hyper, fetch and serve.
This crate owns the Iroh endpoint and wires HTTP/1.1 framing to QUIC streams via hyper. Nothing in here knows about JavaScript.
Re-exports§
pub use client::fetch;pub use client::raw_connect;pub use endpoint::CompressionOptions;pub use endpoint::parse_direct_addrs;pub use endpoint::ConnectionEvent;pub use endpoint::DiscoveryOptions;pub use endpoint::EndpointStats;pub use endpoint::IrohEndpoint;pub use endpoint::NetworkingOptions;pub use endpoint::NodeAddrInfo;pub use endpoint::NodeOptions;pub use endpoint::PathInfo;pub use endpoint::PeerStats;pub use endpoint::PoolOptions;pub use endpoint::StreamingOptions;pub use registry::get_endpoint;pub use registry::insert_endpoint;pub use registry::remove_endpoint;pub use server::respond;pub use server::serve;pub use server::serve_with_events;pub use server::ServeHandle;pub use server::ServerLimits;pub use session::session_accept;pub use session::session_close;pub use session::session_closed;pub use session::session_connect;pub use session::session_create_bidi_stream;pub use session::session_create_uni_stream;pub use session::session_max_datagram_size;pub use session::session_next_bidi_stream;pub use session::session_next_uni_stream;pub use session::session_ready;pub use session::session_recv_datagram;pub use session::session_remote_id;pub use session::session_send_datagram;pub use session::CloseInfo;pub use stream::BodyReader;pub use stream::HandleStore;pub use stream::StoreConfig;
Modules§
- client
- Outgoing HTTP request —
fetch()andraw_connect()implementation. - endpoint
- Iroh endpoint lifecycle — create, share, and close.
- registry
- Global endpoint registry shared by all FFI adapters.
- server
- Incoming HTTP request —
serve()implementation. - session
- Session — a QUIC connection to a single remote peer.
- stream
- Per-endpoint handle store and body channel types.
Structs§
- Core
Error - Structured error returned by core functions.
- FfiDuplex
Stream - Handles for the two sides of a full-duplex QUIC stream.
- FfiResponse
- Flat response-head struct that crosses the FFI boundary.
- Parsed
Node Addr - Parsed node address from a ticket string, bare node ID, or JSON address info.
- Request
Payload - Options passed to the JS serve callback per incoming request.
Enums§
- Error
Code - Machine-readable error codes for the FFI boundary.
Constants§
- ALPN
- ALPN for the HTTP/1.1-over-QUIC protocol (version 2 wire format).
- ALPN_
DUPLEX - ALPN for base + bidirectional streaming (duplex/raw_connect).
Functions§
- base32_
encode - Encode bytes as lowercase RFC 4648 base32 (no padding).
- generate_
secret_ key - Generate a fresh Ed25519 secret key. Returns 32 raw bytes, or
Errif the RNG panics. - node_
ticket - Generate a ticket string for the given endpoint.
- parse_
node_ addr - Parse a string that may be a bare node ID, a ticket string (JSON-encoded
NodeAddrInfo), or a JSON object withidandaddrsfields. - public_
key_ verify - Verify a 64-byte Ed25519 signature against a 32-byte public key.
Returns
trueon success,falseon any failure (including panics). - secret_
key_ sign - Sign arbitrary bytes with a 32-byte Ed25519 secret key.
Returns a 64-byte signature, or
Errif the underlying crypto panics.