types

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: GPL-3.0 Imports: 3 Imported by: 41

Documentation

Index

Constants

View Source
const ValidatorPubkeyLength = 48 // bytes

Validator pubkey

View Source
const ValidatorSignatureLength = 96 // bytes

Validator signature

Variables

View Source
var MinipoolDepositTypes = []string{"None", "Full", "Half", "Empty"}
View Source
var MinipoolStatuses = []string{"Initialized", "Prelaunch", "Staking", "Withdrawable", "Dissolved"}
View Source
var ProposalStates = []string{"Pending", "Active", "Cancelled", "Defeated", "Succeeded", "Expired", "Executed"}

Functions

This section is empty.

Types

type MinipoolDeposit

type MinipoolDeposit uint8

Minipool deposit types

const (
	None MinipoolDeposit = iota
	Full
	Half
	Empty
)

func StringToMinipoolDeposit

func StringToMinipoolDeposit(value string) (MinipoolDeposit, error)

func (MinipoolDeposit) MarshalJSON

func (d MinipoolDeposit) MarshalJSON() ([]byte, error)

JSON encoding

func (MinipoolDeposit) String

func (d MinipoolDeposit) String() string

String conversion

func (*MinipoolDeposit) UnmarshalJSON

func (d *MinipoolDeposit) UnmarshalJSON(data []byte) error

type MinipoolStatus

type MinipoolStatus uint8

Minipool statuses

const (
	Initialized MinipoolStatus = iota
	Prelaunch
	Staking
	Withdrawable
	Dissolved
)

func StringToMinipoolStatus

func StringToMinipoolStatus(value string) (MinipoolStatus, error)

func (MinipoolStatus) MarshalJSON

func (s MinipoolStatus) MarshalJSON() ([]byte, error)

JSON encoding

func (MinipoolStatus) String

func (s MinipoolStatus) String() string

String conversion

func (*MinipoolStatus) UnmarshalJSON

func (s *MinipoolStatus) UnmarshalJSON(data []byte) error

type ProposalState

type ProposalState uint8

DAO proposal states

const (
	Pending ProposalState = iota
	Active
	Cancelled
	Defeated
	Succeeded
	Expired
	Executed
)

func StringToProposalState

func StringToProposalState(value string) (ProposalState, error)

func (ProposalState) MarshalJSON

func (s ProposalState) MarshalJSON() ([]byte, error)

JSON encoding

func (ProposalState) String

func (s ProposalState) String() string

String conversion

func (*ProposalState) UnmarshalJSON

func (s *ProposalState) UnmarshalJSON(data []byte) error

type ValidatorPubkey

type ValidatorPubkey [ValidatorPubkeyLength]byte

func BytesToValidatorPubkey

func BytesToValidatorPubkey(value []byte) ValidatorPubkey

func HexToValidatorPubkey

func HexToValidatorPubkey(value string) (ValidatorPubkey, error)

func (ValidatorPubkey) Bytes

func (v ValidatorPubkey) Bytes() []byte

Bytes conversion

func (ValidatorPubkey) Hex

func (v ValidatorPubkey) Hex() string

String conversion

func (ValidatorPubkey) MarshalJSON

func (v ValidatorPubkey) MarshalJSON() ([]byte, error)

JSON encoding

func (ValidatorPubkey) String

func (v ValidatorPubkey) String() string

func (*ValidatorPubkey) UnmarshalJSON

func (v *ValidatorPubkey) UnmarshalJSON(data []byte) error

type ValidatorSignature

type ValidatorSignature [ValidatorSignatureLength]byte

func BytesToValidatorSignature

func BytesToValidatorSignature(value []byte) ValidatorSignature

func HexToValidatorSignature

func HexToValidatorSignature(value string) (ValidatorSignature, error)

func (ValidatorSignature) Bytes

func (v ValidatorSignature) Bytes() []byte

Bytes conversion

func (ValidatorSignature) Hex

func (v ValidatorSignature) Hex() string

String conversion

func (ValidatorSignature) MarshalJSON

func (v ValidatorSignature) MarshalJSON() ([]byte, error)

JSON encoding

func (ValidatorSignature) String

func (v ValidatorSignature) String() string

func (*ValidatorSignature) UnmarshalJSON

func (v *ValidatorSignature) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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