starknet

package
v0.12.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const Prefix = "/starknet"

Variables

This section is empty.

Functions

func ClassesPID added in v0.12.0

func ClassesPID() protocol.ID

func EventsPID added in v0.7.0

func EventsPID() protocol.ID

func HeadersPID added in v0.12.0

func HeadersPID() protocol.ID

func StateDiffPID added in v0.12.0

func StateDiffPID() protocol.ID

func TransactionsPID added in v0.7.0

func TransactionsPID() protocol.ID

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 (h *Handler) ClassesHandler(stream network.Stream)

func (*Handler) Close added in v0.12.0

func (h *Handler) Close()

func (*Handler) EventsHandler added in v0.7.0

func (h *Handler) EventsHandler(stream network.Stream)

func (*Handler) HeadersHandler added in v0.12.0

func (h *Handler) HeadersHandler(stream network.Stream)

func (*Handler) StateDiffHandler added in v0.12.0

func (h *Handler) StateDiffHandler(stream network.Stream)

func (*Handler) TransactionsHandler added in v0.7.0

func (h *Handler) TransactionsHandler(stream network.Stream)

type NewStreamFunc

type NewStreamFunc func(ctx context.Context, pids ...protocol.ID) (network.Stream, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL