types

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address felt.Felt

func AddressFromString

func AddressFromString(addrStr string) Address

func (*Address) Felt

func (a *Address) Felt() *felt.Felt

func (Address) MarshalJSON

func (a Address) MarshalJSON() ([]byte, error)

func (*Address) String

func (a *Address) String() string

func (*Address) UnmarshalJSON

func (a *Address) UnmarshalJSON(data []byte) error

type AttestInfo

type AttestInfo struct {
	TargetBlock     BlockNumber
	TargetBlockHash BlockHash
	WindowStart     BlockNumber
	WindowEnd       BlockNumber
}

Used by the validator to keep track of the starknet attestation window

type Balance

type Balance big.Int

STRK balance represented in Wei

func NewBalance added in v0.2.7

func NewBalance(low, high *felt.Felt) Balance

func (*Balance) BigFloat added in v0.2.7

func (b *Balance) BigFloat() *big.Float

func (*Balance) Strk added in v0.2.7

func (b *Balance) Strk() float64

Returns the balance (represented in Wei) as a Strk unit as a float64. If it doesn't fit +Inf is returned

func (*Balance) Text added in v0.2.7

func (b *Balance) Text(base int) string

type BlockHash

type BlockHash felt.Felt

func (*BlockHash) Felt

func (b *BlockHash) Felt() *felt.Felt

func (*BlockHash) String

func (b *BlockHash) String() string

type BlockNumber

type BlockNumber uint64

func (*BlockNumber) Uint64

func (b *BlockNumber) Uint64() uint64

Delete this method

type DoAttest added in v0.2.4

type DoAttest struct {
	BlockHash BlockHash
}

Represents an event for the dispatcher to invoke an attest transaction

type EpochInfo

type EpochInfo struct {
	StakerAddress Address         `json:"staker_address"`
	Stake         uint128.Uint128 `json:"stake"`
	EpochLen      uint64          `json:"epoch_len"`
	EpochId       uint64          `json:"epoch_id"`
	StartingBlock BlockNumber     `json:"current_epoch_starting_block"`
}

Used by the validator to keep track of the current epoch info

func (*EpochInfo) String

func (e *EpochInfo) String() string

type PrepareAttest added in v0.2.4

type PrepareAttest struct {
	BlockHash BlockHash
}

Represents an event for the dispatcher to prepare for the next attest

type Retries

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

func NewRetries

func NewRetries() Retries

Return a new Retries type set to infinite

func RetriesFromString

func RetriesFromString(s string) (Retries, error)

func (*Retries) IsZero

func (r *Retries) IsZero() bool

func (*Retries) Set

func (r *Retries) Set(val uint64)

func (*Retries) String

func (r *Retries) String() string

func (*Retries) Sub

func (r *Retries) Sub()

type ValidationContracts

type ValidationContracts struct {
	Staking Address
	Attest  Address
}

func ValidationContractsFromAddresses

func ValidationContractsFromAddresses(ca *config.ContractAddresses) ValidationContracts

func (*ValidationContracts) String

func (c *ValidationContracts) String() string

Jump to

Keyboard shortcuts

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