Documentation ¶
Index ¶
- type Client
- func (cli *Client) CreateValidator(count int, withdrawalAddr string) (*CreateValidatorResponse, error)
- func (cli *Client) ExitValidators(pubkeys []string) (*GetValidatorsResponse, error)
- func (cli *Client) Get(path string, response any) error
- func (cli *Client) GetValidator(validator string) (*GetValidatorResponse, error)
- func (cli *Client) GetValidatorsByWithdrawAddress(withdrawAddress string) (*GetValidatorsResponse, error)
- func (cli *Client) GetValidatorsByWithdrawAddressAndStatus(withdrawAddress string, status Status) (*GetValidatorsResponse, error)
- func (cli *Client) Post(path string, requestBody any, response any) error
- func (cli *Client) Send(method string, path string, requestBody any, response any) error
- type CreateValidatorRequest
- type CreateValidatorResponse
- type DepositData
- type Error
- type ErrorInner
- type Event
- type ExitMessage
- type ExitValidatorsPubkeyRequest
- type ExitValidatorsRequest
- type GetValidatorResponse
- type GetValidatorsResponse
- type Meta
- type OnDemandExit
- type StakingRequest
- type StakingRequestMeta
- type StakingTransactionMeta
- type Status
- type StatusEstimates
- type StatusHistory
- type ValidatorData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) CreateValidator ¶
func (cli *Client) CreateValidator(count int, withdrawalAddr string) (*CreateValidatorResponse, error)
func (*Client) ExitValidators ¶
func (cli *Client) ExitValidators(pubkeys []string) (*GetValidatorsResponse, error)
func (*Client) GetValidator ¶
func (cli *Client) GetValidator(validator string) (*GetValidatorResponse, error)
func (*Client) GetValidatorsByWithdrawAddress ¶
func (cli *Client) GetValidatorsByWithdrawAddress(withdrawAddress string) (*GetValidatorsResponse, error)
func (*Client) GetValidatorsByWithdrawAddressAndStatus ¶
func (cli *Client) GetValidatorsByWithdrawAddressAndStatus(withdrawAddress string, status Status) (*GetValidatorsResponse, error)
type CreateValidatorRequest ¶
type CreateValidatorResponse ¶
type CreateValidatorResponse struct { Data []ValidatorData `json:"data"` Meta Meta `json:"meta"` }
type DepositData ¶
type DepositData struct { DepositDataRoot string `json:"deposit_data_root"` DepositMessageRoot string `json:"deposit_message_root"` ForkVersion string `json:"fork_version"` Signature string `json:"signature"` FigmentSignature string `json:"figment_signature"` DepositCLIVersion string `json:"deposit_cli_version"` Amount int64 `json:"amount"` }
type Error ¶
type Error struct {
Error ErrorInner `json:"error"`
}
type ErrorInner ¶
type ErrorInner struct {
Message string `json:"message"`
}
type ExitMessage ¶
type ExitValidatorsRequest ¶
type GetValidatorResponse ¶
type GetValidatorResponse struct {
Data ValidatorData `json:"data"`
}
type GetValidatorsResponse ¶
type GetValidatorsResponse struct {
Data []ValidatorData `json:"data"`
}
type Meta ¶
type Meta struct { StakingRequest StakingRequestMeta `json:"staking_request"` StakingTransaction StakingTransactionMeta `json:"staking_transaction"` }
type OnDemandExit ¶
type StakingRequest ¶
type StakingRequestMeta ¶
type StakingTransactionMeta ¶
type StakingTransactionMeta struct { From string `json:"from"` To string `json:"to"` AmountWei string `json:"amount_wei"` ContractCallData string `json:"contract_call_data"` UnsignedTransactionHashed string `json:"unsigned_transaction_hashed"` UnsignedTransactionSerialized string `json:"unsigned_transaction_serialized"` MaxGasWei string `json:"max_gas_wei"` }
type Status ¶
type Status string
const ( Provisioned Status = "provisioned" FundingRequested Status = "funding_requested" DepositedNotFinalized Status = "deposited_not_finalized" Deposited Status = "deposited" PendingInitialized Status = "pending_initialized" PendingQueued Status = "pending_queued" ActiveExiting Status = "active_exiting" ActiveOngoing Status = "active_ongoing" ActiveSlashed Status = "active_slashed" ExitedSlashed Status = "exited_slashed" ExitedUnslashed Status = "exited_unslashed" WithdrawalDone Status = "withdrawal_done" WithdrawalPossible Status = "withdrawal_possible" )
type StatusEstimates ¶
type StatusHistory ¶
type StatusHistory struct {
Events []Event `json:"events"`
}
type ValidatorData ¶
type ValidatorData struct { Network string `json:"network"` Pubkey string `json:"pubkey"` Status Status `json:"status"` WithdrawalAddress string `json:"withdrawal_address"` WithdrawalCredentials string `json:"withdrawal_credentials"` NetFeePayoutAddress string `json:"net_fee_payout_address"` FeeRecipientAddress string `json:"fee_recipient_address"` Region string `json:"region"` DepositData DepositData `json:"deposit_data"` StatusHistory StatusHistory `json:"status_history"` StatusEstimates StatusEstimates `json:"status_estimates"` OnDemandExit OnDemandExit `json:"on_demand_exit"` ExitMessage ExitMessage `json:"exit_message"` StakingRequest StakingRequest `json:"staking_request"` }
Define the struct to match the JSON structure
Click to show internal directories.
Click to hide internal directories.