libp2p library
libp2p transport backed by QUIC.
This library provides a libp2p transport layer that
uses QUIC as the underlying protocol. It wraps QuicEndpoint with
libp2p-style dial/listen APIs, multiaddr parsing, and peer identity
handling.
Exports include:
- Libp2pQuicTransport — dial remote peers and listen on multiaddrs.
- Libp2pQuicConnection — a libp2p-friendly wrapper around QuicConnection.
- Multiaddr / MultiaddrComponent — parse and serialize multiaddrs such as
/ip4/127.0.0.1/udp/4433/quic-v1. - PeerId — base58/base36 encoding and decoding of libp2p peer identities.
- DCUtRStateMachine — Direct Connection Upgrade through Relay state machine.
Use this library when integrating with a libp2p network. For the underlying
QUIC primitives, import quic.dart. For the full stack, import quic_lib.dart.
See also:
quic_lib.dart— the full public API.quic.dart— QUIC transport primitives.
Classes
- DCUtRHandler
- Handler for producing and validating DCUtR messages.
- DCUtRMessage
- DCUtR (Direct Connection Upgrade through Relay) message.
- DCUtRStateMachine
- Finite state machine that tracks DCUtR handshake progress.
- DCUtRUdpCoordinator
- Coordinates DCUtR hole-punching over a UdpSocket.
- Libp2pCertificateGenerator
- Generates an ephemeral self-signed X.509 certificate with the libp2p TLS extension for use in libp2p QUIC handshakes.
- Libp2pExtension
- The libp2p TLS X.509 certificate extension.
- Libp2pQuicConnection
- A libp2p-friendly wrapper around a QUIC connection.
- Libp2pQuicTransport
- A libp2p transport backed by QUIC.
- Multiaddr
- A self-describing network address following the libp2p multiaddr format.
- MultiaddrComponent
- A single protocol/value pair within a Multiaddr.
- MultistreamSelect
- libp2p multistream-select / protocol negotiation.
- PeerId
- A libp2p PeerId represented as the raw multihash bytes of a public key.
- SignedKey
- A protobuf-encoded signed key used in the libp2p TLS extension.
- WebTransportConnectRequest
- Extended CONNECT request for WebTransport. Method: CONNECT, Protocol: :protocol = webtransport, :scheme, :authority, :path
- WebTransportSession
- Represents an active WebTransport session over HTTP/3.