sn2core

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: 12 Imported by: ? modules, 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 ErrPreConfirmedIdentifierMismatch = errors.New("pre_confirmed block identifier mismatch")

ErrPreConfirmedIdentifierMismatch is returned by AdaptPreConfirmedWithDelta when the delta's block identifier does not match the current pre_confirmed's. Callers should treat this as a signal to drop the delta and re-fetch a full block on the next poll.

Functions

func AdaptBlock

func AdaptBlock(response *starknet.Block, sig []*felt.Felt) (*core.Block, error)

func AdaptCompiledClass added in v0.9.3

func AdaptCompiledClass(compiledClass *starknet.CasmClass) (*core.CasmClass, error)

func AdaptDeclareTransaction

func AdaptDeclareTransaction(t *starknet.Transaction) *core.DeclareTransaction

func AdaptDeployAccountTransaction

func AdaptDeployAccountTransaction(t *starknet.Transaction) *core.DeployAccountTransaction

func AdaptDeployTransaction

func AdaptDeployTransaction(t *starknet.Transaction) *core.DeployTransaction

todo(rdr): return by value

func AdaptDeprecatedCairoClass added in v0.15.9

func AdaptDeprecatedCairoClass(
	response *starknet.DeprecatedCairoClass,
) (core.ClassDefinition, error)

todo(rdr): We know the right type here which is a deprecated cairo class, why use polymorphism.

func AdaptEvent

func AdaptEvent(response *starknet.Event) *core.Event

func AdaptExecutionResources

func AdaptExecutionResources(response *starknet.ExecutionResources) *core.ExecutionResources

func AdaptInvokeTransaction

func AdaptInvokeTransaction(t *starknet.Transaction) *core.InvokeTransaction

func AdaptL1HandlerTransaction

func AdaptL1HandlerTransaction(t *starknet.Transaction) *core.L1HandlerTransaction

func AdaptL1ToL2Message

func AdaptL1ToL2Message(response *starknet.L1ToL2Message) *core.L1ToL2Message

func AdaptL2ToL1Message

func AdaptL2ToL1Message(response *starknet.L2ToL1Message) *core.L2ToL1Message

func AdaptPreConfirmedBlock added in v0.15.0

func AdaptPreConfirmedBlock(
	response *starknet.PreConfirmedBlock,
	number uint64,
) (pending.PreConfirmed, error)

AdaptPreConfirmedBlock adapts a pre_confirmed block into a pending.PreConfirmed. It is assumed that `starknet.PreConfirmedBlock` is valid.

func AdaptPreConfirmedWithDelta added in v0.16.1

func AdaptPreConfirmedWithDelta(
	current *pending.PreConfirmed,
	delta *starknet.PreConfirmedDeltaUpdate,
) (pending.PreConfirmed, error)

AdaptPreConfirmedWithDelta returns a new pre_confirmed produced by applying delta on top of current; current is not modified.

Returns ErrPreConfirmedIdentifierMismatch if current.BlockIdentifier differs from delta.BlockIdentifier.

func AdaptSegmentLengths added in v0.11.0

func AdaptSegmentLengths(l starknet.SegmentLengths) core.SegmentLengths

func AdaptSierraClass added in v0.15.9

func AdaptSierraClass(
	response *starknet.SierraClass,
	compiledClass *starknet.CasmClass,
) (*core.SierraClass, error)

func AdaptStateDiff added in v0.15.0

func AdaptStateDiff(response *starknet.StateDiff) (core.StateDiff, error)

func AdaptStateUpdate

func AdaptStateUpdate(response *starknet.StateUpdate) (*core.StateUpdate, error)

func AdaptTransaction

func AdaptTransaction(transaction *starknet.Transaction) (core.Transaction, error)

func AdaptTransactionReceipt

func AdaptTransactionReceipt(response *starknet.TransactionReceipt) *core.TransactionReceipt

Types

This section is empty.

Jump to

Keyboard shortcuts

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