feeder

package
v0.15.7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultTimeouts = "5s"
)

Variables

View Source
var ErrDeprecatedCompiledClass = errors.New("deprecated compiled class")

Functions

func ExponentialBackoff

func ExponentialBackoff(wait time.Duration) time.Duration

func HTTPTimeoutsSettings added in v0.14.4

func HTTPTimeoutsSettings(w http.ResponseWriter, r *http.Request, client *Client)

func NopBackoff

func NopBackoff(d time.Duration) time.Duration

func ParseTimeouts added in v0.14.3

func ParseTimeouts(value string) ([]time.Duration, bool, error)

ParseTimeouts parses a comma-separated string of duration values into a slice of time.Duration. Returns: - the parsed timeout values - if a fixed or dynamic timeouts should be used - an error in case the string cannot be parsed

Types

type Backoff

type Backoff func(wait time.Duration) time.Duration

type Client

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

func NewClient

func NewClient(clientURL string) *Client

func NewTestClient

func NewTestClient(t testing.TB, network *utils.Network) *Client

NewTestClient returns a client and a function to close a test server.

func (*Client) Block

func (c *Client) Block(ctx context.Context, blockID string) (*starknet.Block, error)

func (*Client) BlockTrace added in v0.7.2

func (c *Client) BlockTrace(ctx context.Context, blockHash string) (*starknet.BlockTrace, error)

func (*Client) ClassDefinition

func (c *Client) ClassDefinition(ctx context.Context, classHash *felt.Felt) (*starknet.ClassDefinition, error)

func (*Client) CompiledClassDefinition added in v0.3.1

func (c *Client) CompiledClassDefinition(ctx context.Context, classHash *felt.Felt) (*starknet.CompiledClass, error)

func (*Client) FeeTokenAddresses added in v0.15.7

func (c *Client) FeeTokenAddresses(ctx context.Context) (starknet.FeeTokenAddresses, error)

func (*Client) PreConfirmedBlock added in v0.15.0

func (c *Client) PreConfirmedBlock(ctx context.Context, blockNumber string) (*starknet.PreConfirmedBlock, error)

func (*Client) PublicKey added in v0.8.0

func (c *Client) PublicKey(ctx context.Context) (*felt.Felt, error)

func (*Client) Signature added in v0.6.0

func (c *Client) Signature(ctx context.Context, blockID string) (*starknet.Signature, error)

func (*Client) StateUpdate

func (c *Client) StateUpdate(ctx context.Context, blockID string) (*starknet.StateUpdate, error)

func (*Client) StateUpdateWithBlock added in v0.6.0

func (c *Client) StateUpdateWithBlock(ctx context.Context, blockID string) (*starknet.StateUpdateWithBlock, error)

func (*Client) Transaction

func (c *Client) Transaction(ctx context.Context, transactionHash *felt.Felt) (*starknet.TransactionStatus, error)

func (*Client) WithAPIKey added in v0.9.2

func (c *Client) WithAPIKey(key string) *Client

func (*Client) WithBackoff

func (c *Client) WithBackoff(b Backoff) *Client

func (*Client) WithListener added in v0.8.2

func (c *Client) WithListener(l EventListener) *Client

func (*Client) WithLogger

func (c *Client) WithLogger(log utils.SimpleLogger) *Client

func (*Client) WithMaxRetries

func (c *Client) WithMaxRetries(num int) *Client

func (*Client) WithMaxWait

func (c *Client) WithMaxWait(d time.Duration) *Client

func (*Client) WithMinWait

func (c *Client) WithMinWait(d time.Duration) *Client

func (*Client) WithTimeouts added in v0.14.3

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

func (*Client) WithUserAgent added in v0.6.0

func (c *Client) WithUserAgent(ua string) *Client

type EventListener added in v0.8.2

type EventListener interface {
	OnResponse(urlPath string, status int, took time.Duration)
}

type SelectiveListener added in v0.8.2

type SelectiveListener struct {
	OnResponseCb func(urlPath string, status int, took time.Duration)
}

func (*SelectiveListener) OnResponse added in v0.8.2

func (l *SelectiveListener) OnResponse(urlPath string, status int, took time.Duration)

type Timeouts added in v0.14.3

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

func (*Timeouts) DecreaseTimeout added in v0.14.3

func (t *Timeouts) DecreaseTimeout()

func (*Timeouts) GetCurrentTimeout added in v0.14.3

func (t *Timeouts) GetCurrentTimeout() time.Duration

func (*Timeouts) IncreaseTimeout added in v0.14.3

func (t *Timeouts) IncreaseTimeout()

func (*Timeouts) String added in v0.14.3

func (t *Timeouts) String() string

Jump to

Keyboard shortcuts

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