Versions in this module Expand all Collapse all v0 v0.6.5 Jun 10, 2025 Changes in this version + func AcceptableProtocols(chainHash string) []string + func ValidateALPNProtocol(protocol string) error + type Config struct + ChainHash string + IsBuilder bool + MaxBuilderSlots int + type JAMNPRegistry struct + func NewJAMNPRegistry() *JAMNPRegistry + func (r *JAMNPRegistry) GetHandler(kind StreamKind) (StreamHandler, error) + func (r *JAMNPRegistry) RegisterHandler(kind StreamKind, handler StreamHandler) + func (r *JAMNPRegistry) ValidateKind(kindByte byte) error + type Manager struct + Registry *JAMNPRegistry + func NewManager(config Config) (*Manager, error) + func (m *Manager) GetProtocols() []string + func (m *Manager) OnConnection(conn TransportConn) *ProtocolConn + func (m *Manager) ValidateConnection(tlsState tls.ConnectionState) error + type ProtocolConn struct + Registry *JAMNPRegistry + TConn TransportConn + func NewProtocolConn(tConn TransportConn, registry *JAMNPRegistry) *ProtocolConn + func (pc *ProtocolConn) AcceptStream() error + func (pc *ProtocolConn) Close() error + func (pc *ProtocolConn) OpenStream(ctx context.Context, kind StreamKind) (quic.Stream, error) + type ProtocolID struct + ChainHash string + IsBuilder bool + Version string + func NewProtocolID(chainHash string, isBuilder bool) *ProtocolID + func ParseProtocolID(protocol string) (*ProtocolID, error) + func (p *ProtocolID) String() string + type StreamHandler interface + HandleStream func(ctx context.Context, stream quic.Stream, peerKey ed25519.PublicKey) error + type StreamKind byte + const StreamKindAssuranceDist + const StreamKindAuditAnnouncement + const StreamKindAuditShardRequest + const StreamKindBlockAnnouncement + const StreamKindBlockRequest + const StreamKindJudgmentPublish + const StreamKindPreimageAnnounce + const StreamKindPreimageRequest + const StreamKindSafroleTicketDist + const StreamKindSafroleTicketSubmit + const StreamKindSegmentRequest + const StreamKindSegmentRequestJust + const StreamKindShardDist + const StreamKindStateRequest + const StreamKindWorkPackageShare + const StreamKindWorkPackageSubmit + const StreamKindWorkReportDist + const StreamKindWorkReportRequest + func (k StreamKind) IsUniquePersistent() bool + type TransportConn interface + AcceptStream func() (quic.Stream, error) + Close func() error + Context func() context.Context + OpenStream func(ctx context.Context) (quic.Stream, error) + PeerKey func() ed25519.PublicKey + QConn func() quic.Connection