Documentation
¶
Index ¶
- type Feeder
- func (f *Feeder) BlockByNumber(ctx context.Context, blockNumber uint64) (*core.Block, error)
- func (f *Feeder) BlockHeaderLatest(ctx context.Context) (core.Header, error)
- func (f *Feeder) BlockLatest(ctx context.Context) (*core.Block, error)
- func (f *Feeder) Class(ctx context.Context, classHash *felt.Felt) (core.ClassDefinition, error)
- func (f *Feeder) PreConfirmedBlockByNumber(ctx context.Context, blockNumber uint64, blockIdentifier string, ...) (starknet.PreConfirmedUpdate, error)
- func (f *Feeder) PreConfirmedBlockLatest(ctx context.Context, blockIdentifier string, knownTransactionCount uint64) (starknet.PreConfirmedUpdate, uint64, error)
- func (f *Feeder) StateUpdate(ctx context.Context, blockNumber uint64) (*core.StateUpdate, error)
- func (f *Feeder) StateUpdateWithBlock(ctx context.Context, blockNumber uint64) (*core.StateUpdate, *core.Block, error)
- func (f *Feeder) Transaction(ctx context.Context, transactionHash *felt.Felt) (core.Transaction, error)deprecated
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 (*Feeder) BlockByNumber ¶
BlockByNumber gets the block for a given block number from the feeder, then adapts it to the core.Block type.
func (*Feeder) BlockHeaderLatest ¶ added in v0.15.22
BlockHeaderLatest gets only the block hash and number for the latest block from the feeder, using the headerOnly=true parameter to minimise bandwidth.
func (*Feeder) BlockLatest ¶ added in v0.3.0
BlockLatest gets the latest block from the feeder, then adapts it to the core.Block type.
func (*Feeder) Class ¶
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, blockIdentifier string, knownTransactionCount uint64, ) (starknet.PreConfirmedUpdate, error)
PreConfirmedBlockByNumber fetches the pre_confirmed block at the given height and returns a delta-aware update. blockIdentifier and knownTransactionCount tell the server what the caller already has so the server can return a no-change marker, only the transactions appended since knownTransactionCount, or the full block when the round identifier no longer matches. Set both to zero values to get a full block.
func (*Feeder) PreConfirmedBlockLatest ¶
func (f *Feeder) PreConfirmedBlockLatest( ctx context.Context, blockIdentifier string, knownTransactionCount uint64, ) (starknet.PreConfirmedUpdate, uint64, error)
PreConfirmedBlockLatest fetches whichever pre_confirmed block the sequencer is currently exposing as latest. The returned block number is the height the response describes.
func (*Feeder) StateUpdate ¶
StateUpdate gets the state update for a given block number from the feeder, then adapts it to the core.StateUpdate type.
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
deprecated
func (f *Feeder) Transaction(ctx context.Context, transactionHash *felt.Felt) (core.Transaction, error)
Deprecated: Transaction gets the transaction for a given transaction hash from the feeder, then adapts it to the appropriate core.Transaction types. Uses the old get_transaction endpoint; prefer get_transaction_status for status-only queries.