rpc

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChainID            = method[NoParams, felt.Felt]{/* contains filtered or unexported fields */}
	SpecVersion        = method[NoParams, string]{/* contains filtered or unexported fields */}
	BlockHashAndNumber = method[NoParams, rpcv10.BlockHashAndNumber]{
						// contains filtered or unexported fields
	}
	BlockWithReceipts = method[BlockWithReceiptsParams, rpcv10.BlockWithReceipts]{
						// contains filtered or unexported fields
	}
	StateUpdate  = method[BlockParams, rpcv10.StateUpdate]{/* contains filtered or unexported fields */}
	Class        = method[ClassParams, rpcv10.Class]{/* contains filtered or unexported fields */}
	CompiledCasm = method[ClassHashParams, rpcv10.CompiledCasmResponse]{
					// contains filtered or unexported fields
	}
)

Functions

func IsError

func IsError(err error, want *jsonrpc.Error) bool

Types

type BlockParams

type BlockParams struct {
	BlockNumber uint64
}

type BlockWithReceiptsParams

type BlockWithReceiptsParams struct {
	BlockNumber uint64
}

Proof facts are part of the INVOKE v3 transaction hash; the remote omits them unless asked.

type ClassHashParams

type ClassHashParams struct {
	ClassHash *felt.ClassHash
}

type ClassParams

type ClassParams struct {
	BlockNumber uint64
	ClassHash   *felt.ClassHash
}

type Client

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

func New

func New(
	ctx context.Context,
	clientURL *url.URL,
	initialTimeouts *timeout.Timeouts,
	logger log.StructuredLogger,
	opts ...Option,
) (*Client, error)

func (*Client) Call

func (c *Client) Call[P params, R any](ctx context.Context, m method[P, R], p P) (*R, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Name

func (c *Client) Name() string

func (*Client) SetTimeouts

func (c *Client) SetTimeouts(timeouts []time.Duration, fixed bool)

func (*Client) Timeouts

func (c *Client) Timeouts() string

type EventListener

type EventListener interface {
	OnResponse(method, outcome string, took time.Duration)
}

type NoParams

type NoParams struct{}

type Option

type Option func(*options)

func WithListener

func WithListener(l EventListener) Option

func WithMaxRetries

func WithMaxRetries(num int) Option

func WithMaxWait

func WithMaxWait(d time.Duration) Option

func WithMinWait

func WithMinWait(d time.Duration) Option

func WithUserAgent

func WithUserAgent(ua string) Option

type SelectiveListener

type SelectiveListener struct {
	OnResponseCb func(method, outcome string, took time.Duration)
}

func (*SelectiveListener) OnResponse

func (l *SelectiveListener) OnResponse(method, outcome string, took time.Duration)

Directories

Path Synopsis
Package testutils serves feeder test data through Juno's own JSON-RPC stack.
Package testutils serves feeder test data through Juno's own JSON-RPC stack.

Jump to

Keyboard shortcuts

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