sync

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const Prefix = "/starknet"

Variables

This section is empty.

Functions

func ClassesPID

func ClassesPID() protocol.ID

func EventsPID

func EventsPID() protocol.ID

func HeadersPID

func HeadersPID() protocol.ID

func StateDiffPID

func StateDiffPID() protocol.ID

func TransactionsPID

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

func (c *Client) RequestBlockHeaders(
	ctx context.Context, req *gen.BlockHeadersRequest,
) (iter.Seq[*gen.BlockHeadersResponse], error)

func (*Client) RequestClasses

func (c *Client) RequestClasses(ctx context.Context, req *gen.ClassesRequest) (iter.Seq[*gen.ClassesResponse], error)

func (*Client) RequestEvents

func (c *Client) RequestEvents(ctx context.Context, req *gen.EventsRequest) (iter.Seq[*gen.EventsResponse], error)

func (*Client) RequestStateDiffs

func (c *Client) RequestStateDiffs(ctx context.Context, req *gen.StateDiffsRequest) (iter.Seq[*gen.StateDiffsResponse], error)

func (*Client) RequestTransactions

func (c *Client) RequestTransactions(ctx context.Context, req *gen.TransactionsRequest) (iter.Seq[*gen.TransactionsResponse], error)

type NewStreamFunc

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

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) Run

func (s *Service) Run(ctx context.Context)

func (*Service) WithListener

func (s *Service) WithListener(l junoSync.EventListener)

Jump to

Keyboard shortcuts

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