Documentation
¶
Index ¶
- Constants
- func ClassesPID() protocol.ID
- func EventsPID() protocol.ID
- func HeadersPID() protocol.ID
- func StateDiffPID() protocol.ID
- func TransactionsPID() protocol.ID
- type BlockBody
- type BlockFetcher
- type Client
- func (c *Client) RequestBlockHeaders(ctx context.Context, req *header.BlockHeadersRequest) (iter.Seq[*header.BlockHeadersResponse], error)
- func (c *Client) RequestClasses(ctx context.Context, req *syncclass.ClassesRequest) (iter.Seq[*syncclass.ClassesResponse], error)
- func (c *Client) RequestEvents(ctx context.Context, req *event.EventsRequest) (iter.Seq[*event.EventsResponse], error)
- func (c *Client) RequestStateDiffs(ctx context.Context, req *state.StateDiffsRequest) (iter.Seq[*state.StateDiffsResponse], error)
- func (c *Client) RequestTransactions(ctx context.Context, req *synctransaction.TransactionsRequest) (iter.Seq[*synctransaction.TransactionsResponse], error)
- type NewStreamFunc
- type Service
Constants ¶
View Source
const Prefix = "/starknet"
Variables ¶
This section is empty.
Functions ¶
func ClassesPID ¶
func HeadersPID ¶
func StateDiffPID ¶
func TransactionsPID ¶
Types ¶
type BlockBody ¶ added in v0.15.3
type BlockBody struct {
Block *core.Block
StateUpdate *core.StateUpdate
NewClasses map[felt.Felt]core.ClassDefinition
Commitments *core.BlockCommitments
Err error
}
BlockBody is used to mange all the different parts of the blocks require to store the block in the blockchain.Store()
type BlockFetcher ¶ added in v0.15.8
type BlockFetcher struct {
// contains filtered or unexported fields
}
func NewBlockFetcher ¶ added in v0.15.8
func NewBlockFetcher( bc *blockchain.Blockchain, h host.Host, n *utils.Network, log utils.SimpleLogger, ) BlockFetcher
func (*BlockFetcher) ProcessBlock ¶ added in v0.15.8
func (*BlockFetcher) WithListener ¶ added in v0.15.8
func (s *BlockFetcher) WithListener(l junoSync.EventListener)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(newStream NewStreamFunc, snNetwork *utils.Network, log utils.SimpleLogger) *Client
func (*Client) RequestBlockHeaders ¶
func (c *Client) RequestBlockHeaders( ctx context.Context, req *header.BlockHeadersRequest, ) (iter.Seq[*header.BlockHeadersResponse], error)
func (*Client) RequestClasses ¶
func (c *Client) RequestClasses(ctx context.Context, req *syncclass.ClassesRequest) (iter.Seq[*syncclass.ClassesResponse], error)
func (*Client) RequestEvents ¶
func (c *Client) RequestEvents(ctx context.Context, req *event.EventsRequest) (iter.Seq[*event.EventsResponse], error)
func (*Client) RequestStateDiffs ¶
func (c *Client) RequestStateDiffs(ctx context.Context, req *state.StateDiffsRequest) (iter.Seq[*state.StateDiffsResponse], error)
func (*Client) RequestTransactions ¶
func (c *Client) RequestTransactions( ctx context.Context, req *synctransaction.TransactionsRequest, ) (iter.Seq[*synctransaction.TransactionsResponse], error)
type NewStreamFunc ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New( bc *blockchain.Blockchain, log utils.SimpleLogger, blockFetcher *BlockFetcher, ) *Service
func (*Service) WithListener ¶
func (s *Service) WithListener(l junoSync.EventListener)
Click to show internal directories.
Click to hide internal directories.