Documentation ¶
Index ¶
- Constants
- func ClassesPID() protocol.ID
- func EventsPID() protocol.ID
- func HeadersPID() protocol.ID
- func StateDiffPID() protocol.ID
- func TransactionsPID() protocol.ID
- type Client
- func (c *Client) RequestBlockHeaders(ctx context.Context, req *spec.BlockHeadersRequest) (iter.Seq[*spec.BlockHeadersResponse], error)
- func (c *Client) RequestClasses(ctx context.Context, req *spec.ClassesRequest) (iter.Seq[*spec.ClassesResponse], error)
- func (c *Client) RequestEvents(ctx context.Context, req *spec.EventsRequest) (iter.Seq[*spec.EventsResponse], error)
- func (c *Client) RequestStateDiffs(ctx context.Context, req *spec.StateDiffsRequest) (iter.Seq[*spec.StateDiffsResponse], error)
- func (c *Client) RequestTransactions(ctx context.Context, req *spec.TransactionsRequest) (iter.Seq[*spec.TransactionsResponse], error)
- type Handler
- func (h *Handler) ClassesHandler(stream network.Stream)
- func (h *Handler) Close()
- func (h *Handler) EventsHandler(stream network.Stream)
- func (h *Handler) HeadersHandler(stream network.Stream)
- func (h *Handler) StateDiffHandler(stream network.Stream)
- func (h *Handler) TransactionsHandler(stream network.Stream)
- type NewStreamFunc
Constants ¶
View Source
const Prefix = "/starknet"
Variables ¶
This section is empty.
Functions ¶
func ClassesPID ¶ added in v0.12.0
func HeadersPID ¶ added in v0.12.0
func StateDiffPID ¶ added in v0.12.0
func TransactionsPID ¶ added in v0.7.0
Types ¶
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 ¶ added in v0.7.0
func (c *Client) RequestBlockHeaders( ctx context.Context, req *spec.BlockHeadersRequest, ) (iter.Seq[*spec.BlockHeadersResponse], error)
func (*Client) RequestClasses ¶ added in v0.12.0
func (c *Client) RequestClasses(ctx context.Context, req *spec.ClassesRequest) (iter.Seq[*spec.ClassesResponse], error)
func (*Client) RequestEvents ¶ added in v0.7.0
func (c *Client) RequestEvents(ctx context.Context, req *spec.EventsRequest) (iter.Seq[*spec.EventsResponse], error)
func (*Client) RequestStateDiffs ¶ added in v0.12.0
func (c *Client) RequestStateDiffs(ctx context.Context, req *spec.StateDiffsRequest) (iter.Seq[*spec.StateDiffsResponse], error)
func (*Client) RequestTransactions ¶ added in v0.7.0
func (c *Client) RequestTransactions(ctx context.Context, req *spec.TransactionsRequest) (iter.Seq[*spec.TransactionsResponse], error)
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(bcReader blockchain.Reader, log utils.SimpleLogger) *Handler
func (*Handler) ClassesHandler ¶ added in v0.12.0
func (*Handler) EventsHandler ¶ added in v0.7.0
func (*Handler) HeadersHandler ¶ added in v0.12.0
func (*Handler) StateDiffHandler ¶ added in v0.12.0
func (*Handler) TransactionsHandler ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.