Skip to content

types

go
import "github.com/rocket-pool/rocketpool-go/types"

Index

Constants

Validator pubkey

go
const ValidatorPubkeyLength = 48 // bytes

Validator signature

go
const ValidatorSignatureLength = 96 // bytes

Variables

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

type MinipoolDeposit

Minipool deposit types

go
type MinipoolDeposit uint8
go
const (
    None MinipoolDeposit = iota
    Full
    Half
    Empty
)

func StringToMinipoolDeposit

go
func StringToMinipoolDeposit(value string) (MinipoolDeposit, error)

func (MinipoolDeposit) MarshalJSON

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

JSON encoding

func (MinipoolDeposit) String

go
func (d MinipoolDeposit) String() string

String conversion

func (*MinipoolDeposit) UnmarshalJSON

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

type MinipoolStatus

Minipool statuses

go
type MinipoolStatus uint8
go
const (
    Initialized MinipoolStatus = iota
    Prelaunch
    Staking
    Withdrawable
    Dissolved
)

func StringToMinipoolStatus

go
func StringToMinipoolStatus(value string) (MinipoolStatus, error)

func (MinipoolStatus) MarshalJSON

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

JSON encoding

func (MinipoolStatus) String

go
func (s MinipoolStatus) String() string

String conversion

func (*MinipoolStatus) UnmarshalJSON

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

type ProposalState

DAO proposal states

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

func StringToProposalState

go
func StringToProposalState(value string) (ProposalState, error)

func (ProposalState) MarshalJSON

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

JSON encoding

func (ProposalState) String

go
func (s ProposalState) String() string

String conversion

func (*ProposalState) UnmarshalJSON

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

type ValidatorPubkey

go
type ValidatorPubkey [ValidatorPubkeyLength]byte

func BytesToValidatorPubkey

go
func BytesToValidatorPubkey(value []byte) ValidatorPubkey

func HexToValidatorPubkey

go
func HexToValidatorPubkey(value string) (ValidatorPubkey, error)

func (ValidatorPubkey) Bytes

go
func (v ValidatorPubkey) Bytes() []byte

Bytes conversion

func (ValidatorPubkey) Hex

go
func (v ValidatorPubkey) Hex() string

String conversion

func (ValidatorPubkey) MarshalJSON

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

JSON encoding

func (ValidatorPubkey) String

go
func (v ValidatorPubkey) String() string

func (*ValidatorPubkey) UnmarshalJSON

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

type ValidatorSignature

go
type ValidatorSignature [ValidatorSignatureLength]byte

func BytesToValidatorSignature

go
func BytesToValidatorSignature(value []byte) ValidatorSignature

func HexToValidatorSignature

go
func HexToValidatorSignature(value string) (ValidatorSignature, error)

func (ValidatorSignature) Bytes

go
func (v ValidatorSignature) Bytes() []byte

Bytes conversion

func (ValidatorSignature) Hex

go
func (v ValidatorSignature) Hex() string

String conversion

func (ValidatorSignature) MarshalJSON

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

JSON encoding

func (ValidatorSignature) String

go
func (v ValidatorSignature) String() string

func (*ValidatorSignature) UnmarshalJSON

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