feeder

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feeder

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

func New

func New(client *feeder.Client) *Feeder

func (*Feeder) BlockByNumber

func (f *Feeder) BlockByNumber(ctx context.Context, blockNumber uint64) (*core.Block, error)

BlockByNumber gets the block for a given block number from the feeder, then adapts it to the core.Block type.

func (*Feeder) BlockLatest added in v0.3.0

func (f *Feeder) BlockLatest(ctx context.Context) (*core.Block, error)

BlockLatest gets the latest block from the feeder, then adapts it to the core.Block type.

func (*Feeder) BlockPending added in v0.4.0

func (f *Feeder) BlockPending(ctx context.Context) (*core.Block, error)

BlockPending gets the pending block from the feeder, then adapts it to the core.Block type.

func (*Feeder) Class

func (f *Feeder) Class(ctx context.Context, classHash *felt.Felt) (core.Class, error)

Class gets the class for a given class hash from the feeder, then adapts it to the core.Class type.

func (*Feeder) PreConfirmedBlockByNumber added in v0.15.0

func (f *Feeder) PreConfirmedBlockByNumber(ctx context.Context, blockNumber uint64) (core.PreConfirmed, error)

PreConfirmedWithBlockByNumber gets both pending state update and pending block from the feeder, then adapts them to the core.PreConfirmed and list of transaction hashes types respectively

func (*Feeder) StateUpdate

func (f *Feeder) StateUpdate(ctx context.Context, blockNumber uint64) (*core.StateUpdate, error)

StateUpdate gets the state update for a given block number from the feeder, then adapts it to the core.StateUpdate type.

func (*Feeder) StateUpdatePending added in v0.4.0

func (f *Feeder) StateUpdatePending(ctx context.Context) (*core.StateUpdate, error)

StateUpdatePending gets the state update for the pending block from the feeder, then adapts it to the core.StateUpdate type.

func (*Feeder) StateUpdatePendingWithBlock added in v0.6.1

func (f *Feeder) StateUpdatePendingWithBlock(ctx context.Context) (*core.StateUpdate, *core.Block, error)

StateUpdatePendingWithBlock gets both pending state update and pending block from the feeder, then adapts them to the core.StateUpdate and core.Block types respectively

func (*Feeder) StateUpdateWithBlock added in v0.6.1

func (f *Feeder) StateUpdateWithBlock(ctx context.Context, blockNumber uint64) (*core.StateUpdate, *core.Block, error)

StateUpdateWithBlock gets both state update and block for a given block number from the feeder, then adapts them to the core.StateUpdate and core.Block types respectively

func (*Feeder) Transaction

func (f *Feeder) Transaction(ctx context.Context, transactionHash *felt.Felt) (core.Transaction, error)

Transaction gets the transaction for a given transaction hash from the feeder, then adapts it to the appropriate core.Transaction types.

Jump to

Keyboard shortcuts

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