Documentation
¶
Index ¶
- type AddDepositAddressRequest
- type Assignment
- type BatchValidatorAssignmentParams
- type CreateUserParams
- type Deposit
- type DepositDataInfo
- type DepositDataRequestParams
- type DepositDataResponse
- type DepositDetails
- type EthereumResponse
- type PageParams
- type PageResult
- type PoolRewardInfo
- type PoolRewardInfoList
- type PooledStakingInfo
- type PooledStakingInfoList
- type PooledWithdrawRequestInfo
- type Response
- type Reward
- type RewardList
- type SendTransactionRequestParams
- type SendTransactionResponse
- type StakingService
- func (stakingService *StakingService) AddDepositAddress(uid string, depositaddresses []string) (result *string, code uint, msg string, err error)
- func (stakingService *StakingService) AnnuallyRewards(uid string, startTime int64, endTime int64) (result *RewardList, code uint, msg string, err error)
- func (stakingService *StakingService) AssignDepositedValidators(txHash string, validatorAssignmentParams ValidatorAssignmentParams) (result *[]UserValidators, code uint, msg string, err error)
- func (stakingService *StakingService) BatchAssignDepositedValidators(batchValidatorAssignmentParams BatchValidatorAssignmentParams) (result *[]UserValidators, code uint, msg string, err error)
- func (stakingService *StakingService) CreateUser(uid string, depositaddresses []string) (result *User, code uint, msg string, err error)
- func (stakingService *StakingService) DailyRewards(uid string, startTime int64, endTime int64) (result *RewardList, code uint, msg string, err error)
- func (stakingService *StakingService) DeleteUser(uid string) (result *string, code uint, msg string, err error)
- func (stakingService *StakingService) DepositData(depositDataRequestParams DepositDataRequestParams) (result *DepositDataResponse, code uint, msg string, err error)
- func (stakingService *StakingService) GetDepositDetails(txHash string) (result *DepositDetails, code uint, msg string, err error)
- func (stakingService *StakingService) GetPoolRewards(date *string, limit *uint) (result *PoolRewardInfoList, code uint, msg string, err error)
- func (stakingService *StakingService) GetPooledStakingInfo() (result *PooledStakingInfoList, code uint, msg string, err error)
- func (stakingService *StakingService) GetTransactionHistory(userAddress string, txType, pageNum, pageSize int64) (result *PageResult[TransactionList], code uint, msg string, err error)
- func (stakingService *StakingService) GetUnusedKeys() (result *uint64, code uint, msg string, err error)
- func (stakingService *StakingService) GetUserDetails(uid string) (result *UserDetails, code uint, msg string, err error)
- func (stakingService *StakingService) GetUserPooledStakingInfo(address string) (result *UserPooledStakingInfo, code uint, msg string, err error)
- func (stakingService *StakingService) GetUserWithdrawPossible(userAddress string) (result *WithdrawPossibleBlock, code uint, msg string, err error)
- func (stakingService *StakingService) GetWithdrawRequestInfo(requestID uint64) (result *PooledWithdrawRequestInfo, code uint, msg string, err error)
- func (stakingService *StakingService) ListDeposits(pageNum, pageSize uint) (result *PageResult[Deposit], code uint, msg string, err error)
- func (stakingService *StakingService) ListUsers(pageNum, pageSize uint) (result *PageResult[User], code uint, msg string, err error)
- func (stakingService *StakingService) ManualDepositBroker(txHash string) (result *string, code uint, msg string, err error)
- func (stakingService *StakingService) ManualDepositBrokerUser(txHash string) (result *string, code uint, msg string, err error)
- func (stakingService *StakingService) MonthlyRewards(uid string, startTime int64, endTime int64) (result *RewardList, code uint, msg string, err error)
- func (stakingService *StakingService) QuarterlyRewards(uid string, startTime int64, endTime int64) (result *RewardList, code uint, msg string, err error)
- func (stakingService *StakingService) SendTransaction(sendTransactionRequestParams SendTransactionRequestParams) (result *SendTransactionResponse, code uint, msg string, err error)
- func (stakingService *StakingService) ValidatorExit(pubkey string, validatorExitParam ValidatorExitParam) (result *ValidatorExitRes, code uint, msg string, err error)
- func (stakingService *StakingService) ValidatorList(validatorListRequestParam ValidatorListRequestParam) (result *PageResult[ValidatorDetail], code uint, msg string, err error)
- type TransactionInfo
- type TransactionList
- type User
- type UserDetails
- type UserPooledStakingInfo
- type UserValidators
- type Validator
- type ValidatorAssignmentParams
- type ValidatorDetail
- type ValidatorDetailList
- type ValidatorExitParam
- type ValidatorExitRes
- type ValidatorList
- type ValidatorListRequestParam
- type WithdrawPossibleBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddDepositAddressRequest ¶
type AddDepositAddressRequest struct {
DepositAddresses []string `json:"deposit_addresses"`
}
type Assignment ¶
type BatchValidatorAssignmentParams ¶
type BatchValidatorAssignmentParams struct { Assignments []Assignment `json:"assignments"` TxHashs []string `json:"tx_hashs"` }
type CreateUserParams ¶
type Deposit ¶
type Deposit struct { ID uint64 `json:"id"` BrokerID uint64 `json:"brokerId"` FromAddress string `json:"fromAddress"` ContractAddress string `json:"contractAddress"` TxHash string `json:"txHash"` ChainName string `json:"chainName"` BlockHeight uint64 `json:"blockHeight"` Slot uint64 `json:"slot"` BlockTime uint64 `json:"blockTime"` }
type DepositDataInfo ¶
type DepositDataResponse ¶
type DepositDataResponse struct { Network string `json:"network"` Protocol string `json:"protocol"` Period string `json:"period"` Ethereum *EthereumResponse `json:"ethereum"` }
type DepositDetails ¶
type DepositDetails struct { Deposit Validators ValidatorDetailList `json:"validators"` }
type EthereumResponse ¶
type EthereumResponse struct { ContractAddress string `json:"contractAddress"` EstimatedGas uint64 `json:"estimatedGas"` UnsignedTransaction string `json:"unsignedTransaction"` DepositData []*DepositDataInfo `json:"depositData"` }
type PageParams ¶
type PageResult ¶
type PoolRewardInfo ¶
type PoolRewardInfoList ¶
type PoolRewardInfoList []PoolRewardInfo
type PooledStakingInfo ¶
type PooledStakingInfoList ¶
type PooledStakingInfoList []PooledStakingInfo
type Reward ¶
type Reward struct { Date string `json:"date"` TotalCount int64 `json:"totalCount"` ActiveCount int64 `json:"activeCount"` ExitCount int64 `json:"exitCount"` Balance string `json:"balance"` Principal string `json:"principal"` Apr string `json:"apr"` CumulativeRewards string `json:"cumulativeRewards"` CumulativeStaking string `json:"cumulativeStaking"` CumulativeGasFee string `json:"cumulativeGasFee"` Rewards string `json:"rewards"` Staking string `json:"staking"` GasFee string `json:"gasFee"` Withdrawal string `json:"withdrawal"` Rate string `json:"rate"` }
type RewardList ¶
type RewardList []Reward
type SendTransactionRequestParams ¶
type SendTransactionRequestParams struct {
SignedTransaction string `json:"signedTransaction"`
}
type SendTransactionResponse ¶
type SendTransactionResponse struct {
TxHash string `json:"txHash"`
}
type StakingService ¶
type StakingService struct {
// contains filtered or unexported fields
}
func NewStakingService ¶
func NewStakingService(baseURL, privateKey, address string) (*StakingService, error)
func (*StakingService) AddDepositAddress ¶
func (*StakingService) AnnuallyRewards ¶
func (stakingService *StakingService) AnnuallyRewards(uid string, startTime int64, endTime int64) (result *RewardList, code uint, msg string, err error)
func (*StakingService) AssignDepositedValidators ¶
func (stakingService *StakingService) AssignDepositedValidators(txHash string, validatorAssignmentParams ValidatorAssignmentParams) (result *[]UserValidators, code uint, msg string, err error)
func (*StakingService) BatchAssignDepositedValidators ¶
func (stakingService *StakingService) BatchAssignDepositedValidators(batchValidatorAssignmentParams BatchValidatorAssignmentParams) (result *[]UserValidators, code uint, msg string, err error)
func (*StakingService) CreateUser ¶
func (*StakingService) DailyRewards ¶
func (stakingService *StakingService) DailyRewards(uid string, startTime int64, endTime int64) (result *RewardList, code uint, msg string, err error)
func (*StakingService) DeleteUser ¶
func (*StakingService) DepositData ¶
func (stakingService *StakingService) DepositData(depositDataRequestParams DepositDataRequestParams) (result *DepositDataResponse, code uint, msg string, err error)
func (*StakingService) GetDepositDetails ¶
func (stakingService *StakingService) GetDepositDetails(txHash string) (result *DepositDetails, code uint, msg string, err error)
func (*StakingService) GetPoolRewards ¶
func (stakingService *StakingService) GetPoolRewards(date *string, limit *uint) (result *PoolRewardInfoList, code uint, msg string, err error)
func (*StakingService) GetPooledStakingInfo ¶
func (stakingService *StakingService) GetPooledStakingInfo() (result *PooledStakingInfoList, code uint, msg string, err error)
func (*StakingService) GetTransactionHistory ¶
func (stakingService *StakingService) GetTransactionHistory(userAddress string, txType, pageNum, pageSize int64) (result *PageResult[TransactionList], code uint, msg string, err error)
func (*StakingService) GetUnusedKeys ¶
func (stakingService *StakingService) GetUnusedKeys() (result *uint64, code uint, msg string, err error)
func (*StakingService) GetUserDetails ¶
func (stakingService *StakingService) GetUserDetails(uid string) (result *UserDetails, code uint, msg string, err error)
func (*StakingService) GetUserPooledStakingInfo ¶
func (stakingService *StakingService) GetUserPooledStakingInfo(address string) (result *UserPooledStakingInfo, code uint, msg string, err error)
func (*StakingService) GetUserWithdrawPossible ¶
func (stakingService *StakingService) GetUserWithdrawPossible(userAddress string) (result *WithdrawPossibleBlock, code uint, msg string, err error)
func (*StakingService) GetWithdrawRequestInfo ¶
func (stakingService *StakingService) GetWithdrawRequestInfo(requestID uint64) (result *PooledWithdrawRequestInfo, code uint, msg string, err error)
func (*StakingService) ListDeposits ¶
func (stakingService *StakingService) ListDeposits(pageNum, pageSize uint) (result *PageResult[Deposit], code uint, msg string, err error)
func (*StakingService) ListUsers ¶
func (stakingService *StakingService) ListUsers(pageNum, pageSize uint) (result *PageResult[User], code uint, msg string, err error)
func (*StakingService) ManualDepositBroker ¶
func (*StakingService) ManualDepositBrokerUser ¶
func (*StakingService) MonthlyRewards ¶
func (stakingService *StakingService) MonthlyRewards(uid string, startTime int64, endTime int64) (result *RewardList, code uint, msg string, err error)
func (*StakingService) QuarterlyRewards ¶
func (stakingService *StakingService) QuarterlyRewards(uid string, startTime int64, endTime int64) (result *RewardList, code uint, msg string, err error)
func (*StakingService) SendTransaction ¶
func (stakingService *StakingService) SendTransaction(sendTransactionRequestParams SendTransactionRequestParams) (result *SendTransactionResponse, code uint, msg string, err error)
func (*StakingService) ValidatorExit ¶
func (stakingService *StakingService) ValidatorExit(pubkey string, validatorExitParam ValidatorExitParam) (result *ValidatorExitRes, code uint, msg string, err error)
func (*StakingService) ValidatorList ¶
func (stakingService *StakingService) ValidatorList(validatorListRequestParam ValidatorListRequestParam) (result *PageResult[ValidatorDetail], code uint, msg string, err error)
type TransactionInfo ¶
type TransactionList ¶
type TransactionList []*TransactionInfo
type UserDetails ¶
type UserDetails struct { User DepositAddresses []string `json:"depositAddresses"` Validators ValidatorDetailList `json:"validators"` }
type UserPooledStakingInfo ¶
type UserValidators ¶
type UserValidators struct { UID string `json:"uid"` Validators ValidatorList `json:"validators"` }
type ValidatorAssignmentParams ¶
type ValidatorAssignmentParams struct {
Assignments []Assignment `json:"assignments"`
}
type ValidatorDetail ¶
type ValidatorDetailList ¶
type ValidatorDetailList []ValidatorDetail
type ValidatorExitParam ¶
type ValidatorExitRes ¶
type ValidatorExitRes struct {
Signature string `json:"signature"`
}
type ValidatorList ¶
type ValidatorList []Validator
type ValidatorListRequestParam ¶
type ValidatorListRequestParam struct { Uid string `form:"uid"` PageParams }
type WithdrawPossibleBlock ¶
type WithdrawPossibleBlock struct {
CanWithdrawBlock string `json:"can_withdraw_block"`
}
Click to show internal directories.
Click to hide internal directories.