Versions in this module Expand all Collapse all v0 v0.137.0 Oct 24, 2025 Changes in this version + const MessageTypeBlock + const MessageTypeBlockRangeRequest + const MessageTypeBlockRequest + const MessageTypeBlockTxs + const MessageTypeBlockTxsRequest + const MessageTypeDone + const MessageTypeLastBlockAndTxsInRange + const MessageTypeNextBlockAndTxsInRange + const MessageTypeVotes + const MessageTypeVotesRequest + const ProtocolId + const ProtocolName + var StateBlock = protocol.NewState(2, "Block") + var StateBlockRange = protocol.NewState(5, "BlockRange") + var StateBlockTxs = protocol.NewState(3, "BlockTxs") + var StateDone = protocol.NewState(6, "Done") + var StateIdle = protocol.NewState(1, "Idle") + var StateMap = protocol.StateMap + var StateVotes = protocol.NewState(4, "Votes") + func NewMsgFromCbor(msgType uint, data []byte) (protocol.Message, error) + type BlockRangeRequestFunc func(CallbackContext, pcommon.Point, pcommon.Point) error + type BlockRequestFunc func(CallbackContext, uint64, []byte) (protocol.Message, error) + type BlockTxsRequestFunc func(CallbackContext, uint64, []byte, [8]byte) (protocol.Message, error) + type CallbackContext struct + Client *Client + ConnectionId connection.ConnectionId + Server *Server + type Client struct + func NewClient(protoOptions protocol.ProtocolOptions, cfg *Config) *Client + func (c *Client) BlockRangeRequest(start pcommon.Point, end pcommon.Point) ([]protocol.Message, error) + func (c *Client) BlockRequest(slot uint64, hash []byte) (protocol.Message, error) + func (c *Client) BlockTxsRequest(slot uint64, hash []byte, txBitmap [8]byte) (protocol.Message, error) + func (c *Client) Start() + func (c *Client) Stop() error + func (c *Client) VotesRequest(voteIds []MsgVotesRequestVoteId) (protocol.Message, error) + type Config struct + BlockRangeRequestFunc BlockRangeRequestFunc + BlockRequestFunc BlockRequestFunc + BlockTxsRequestFunc BlockTxsRequestFunc + Timeout time.Duration + VotesRequestFunc VotesRequestFunc + func NewConfig(options ...LeiosFetchOptionFunc) Config + type LeiosFetch struct + Client *Client + Server *Server + func New(protoOptions protocol.ProtocolOptions, cfg *Config) *LeiosFetch + type LeiosFetchOptionFunc func(*Config) + func WithBlockRangeRequestFunc(blockRangeRequestFunc BlockRangeRequestFunc) LeiosFetchOptionFunc + func WithBlockRequestFunc(blockRequestFunc BlockRequestFunc) LeiosFetchOptionFunc + func WithBlockTxsRequestFunc(blockTxsRequestFunc BlockTxsRequestFunc) LeiosFetchOptionFunc + func WithTimeout(timeout time.Duration) LeiosFetchOptionFunc + func WithVotesRequestFunc(votesRequestFunc VotesRequestFunc) LeiosFetchOptionFunc + type MsgBlock struct + BlockRaw cbor.RawMessage + func NewMsgBlock(block cbor.RawMessage) *MsgBlock + type MsgBlockRangeRequest struct + End pcommon.Point + Start pcommon.Point + func NewMsgBlockRangeRequest(start pcommon.Point, end pcommon.Point) *MsgBlockRangeRequest + type MsgBlockRequest struct + Hash []byte + Slot uint64 + func NewMsgBlockRequest(slot uint64, hash []byte) *MsgBlockRequest + type MsgBlockTxs struct + TxsRaw []cbor.RawMessage + func NewMsgBlockTxs(txs []cbor.RawMessage) *MsgBlockTxs + type MsgBlockTxsRequest struct + Hash []byte + Slot uint64 + TxBitmap [8]byte + func NewMsgBlockTxsRequest(slot uint64, hash []byte, txBitmap [8]byte) *MsgBlockTxsRequest + type MsgDone struct + func NewMsgDone() *MsgDone + type MsgLastBlockAndTxsInRange struct + BlockRaw cbor.RawMessage + TxsRaw []cbor.RawMessage + func NewMsgLastBlockAndTxsInRange(block cbor.RawMessage, txs []cbor.RawMessage) *MsgLastBlockAndTxsInRange + type MsgNextBlockAndTxsInRange struct + BlockRaw cbor.RawMessage + TxsRaw []cbor.RawMessage + func NewMsgNextBlockAndTxsInRange(block cbor.RawMessage, txs []cbor.RawMessage) *MsgNextBlockAndTxsInRange + type MsgVotes struct + VotesRaw []cbor.RawMessage + func NewMsgVotes(votes []cbor.RawMessage) *MsgVotes + type MsgVotesRequest struct + VoteIds []MsgVotesRequestVoteId + func NewMsgVotesRequest(voteIds []MsgVotesRequestVoteId) *MsgVotesRequest + type MsgVotesRequestVoteId struct + Slot uint64 + VoteIssuerId []byte + type Server struct + func NewServer(protoOptions protocol.ProtocolOptions, cfg *Config) *Server + type VotesRequestFunc func(CallbackContext, []MsgVotesRequestVoteId) (protocol.Message, error)