# types
import "github.com/rocket-pool/rocketpool-go/types"
# Index
- Constants
- Variables
- type MinipoolDeposit
- type MinipoolStatus
- type ProposalState
- type ValidatorPubkey
- func BytesToValidatorPubkey(value []byte) ValidatorPubkey
- func HexToValidatorPubkey(value string) (ValidatorPubkey, error)
- func (v ValidatorPubkey) Bytes() []byte
- func (v ValidatorPubkey) Hex() string
- func (v ValidatorPubkey) MarshalJSON() ([]byte, error)
- func (v ValidatorPubkey) String() string
- func (v *ValidatorPubkey) UnmarshalJSON(data []byte) error
- type ValidatorSignature
- func BytesToValidatorSignature(value []byte) ValidatorSignature
- func HexToValidatorSignature(value string) (ValidatorSignature, error)
- func (v ValidatorSignature) Bytes() []byte
- func (v ValidatorSignature) Hex() string
- func (v ValidatorSignature) MarshalJSON() ([]byte, error)
- func (v ValidatorSignature) String() string
- func (v *ValidatorSignature) UnmarshalJSON(data []byte) error
# Constants
Validator pubkey
const ValidatorPubkeyLength = 48 // bytes
Validator signature
const ValidatorSignatureLength = 96 // bytes
# Variables
var MinipoolDepositTypes = []string{"None", "Full", "Half", "Empty"}
var MinipoolStatuses = []string{"Initialized", "Prelaunch", "Staking", "Withdrawable", "Dissolved"}
var ProposalStates = []string{"Pending", "Active", "Cancelled", "Defeated", "Succeeded", "Expired", "Executed"}
# type MinipoolDeposit (opens new window)
Minipool deposit types
type MinipoolDeposit uint8
const (
None MinipoolDeposit = iota
Full
Half
Empty
)
# func StringToMinipoolDeposit (opens new window)
func StringToMinipoolDeposit(value string) (MinipoolDeposit, error)
# func (MinipoolDeposit) MarshalJSON (opens new window)
func (d MinipoolDeposit) MarshalJSON() ([]byte, error)
JSON encoding
# func (MinipoolDeposit) String (opens new window)
func (d MinipoolDeposit) String() string
String conversion
# func (*MinipoolDeposit) UnmarshalJSON (opens new window)
func (d *MinipoolDeposit) UnmarshalJSON(data []byte) error
# type MinipoolStatus (opens new window)
Minipool statuses
type MinipoolStatus uint8
const (
Initialized MinipoolStatus = iota
Prelaunch
Staking
Withdrawable
Dissolved
)
# func StringToMinipoolStatus (opens new window)
func StringToMinipoolStatus(value string) (MinipoolStatus, error)
# func (MinipoolStatus) MarshalJSON (opens new window)
func (s MinipoolStatus) MarshalJSON() ([]byte, error)
JSON encoding
# func (MinipoolStatus) String (opens new window)
func (s MinipoolStatus) String() string
String conversion
# func (*MinipoolStatus) UnmarshalJSON (opens new window)
func (s *MinipoolStatus) UnmarshalJSON(data []byte) error
# type ProposalState (opens new window)
DAO proposal states
type ProposalState uint8
const (
Pending ProposalState = iota
Active
Cancelled
Defeated
Succeeded
Expired
Executed
)
# func StringToProposalState (opens new window)
func StringToProposalState(value string) (ProposalState, error)
# func (ProposalState) MarshalJSON (opens new window)
func (s ProposalState) MarshalJSON() ([]byte, error)
JSON encoding
# func (ProposalState) String (opens new window)
func (s ProposalState) String() string
String conversion
# func (*ProposalState) UnmarshalJSON (opens new window)
func (s *ProposalState) UnmarshalJSON(data []byte) error
# type ValidatorPubkey (opens new window)
type ValidatorPubkey [ValidatorPubkeyLength]byte
# func BytesToValidatorPubkey (opens new window)
func BytesToValidatorPubkey(value []byte) ValidatorPubkey
# func HexToValidatorPubkey (opens new window)
func HexToValidatorPubkey(value string) (ValidatorPubkey, error)
# func (ValidatorPubkey) Bytes (opens new window)
func (v ValidatorPubkey) Bytes() []byte
Bytes conversion
# func (ValidatorPubkey) Hex (opens new window)
func (v ValidatorPubkey) Hex() string
String conversion
# func (ValidatorPubkey) MarshalJSON (opens new window)
func (v ValidatorPubkey) MarshalJSON() ([]byte, error)
JSON encoding
# func (ValidatorPubkey) String (opens new window)
func (v ValidatorPubkey) String() string
# func (*ValidatorPubkey) UnmarshalJSON (opens new window)
func (v *ValidatorPubkey) UnmarshalJSON(data []byte) error
# type ValidatorSignature (opens new window)
type ValidatorSignature [ValidatorSignatureLength]byte
# func BytesToValidatorSignature (opens new window)
func BytesToValidatorSignature(value []byte) ValidatorSignature
# func HexToValidatorSignature (opens new window)
func HexToValidatorSignature(value string) (ValidatorSignature, error)
# func (ValidatorSignature) Bytes (opens new window)
func (v ValidatorSignature) Bytes() []byte
Bytes conversion
# func (ValidatorSignature) Hex (opens new window)
func (v ValidatorSignature) Hex() string
String conversion
# func (ValidatorSignature) MarshalJSON (opens new window)
func (v ValidatorSignature) MarshalJSON() ([]byte, error)
JSON encoding
# func (ValidatorSignature) String (opens new window)
func (v ValidatorSignature) String() string
# func (*ValidatorSignature) UnmarshalJSON (opens new window)
func (v *ValidatorSignature) UnmarshalJSON(data []byte) error