Documentation ¶
Index ¶
- type ExitElection
- type Handler
- func (h *Handler) HandleGetGasPrice(c *gin.Context)
- func (h *Handler) HandleGetPoolData(c *gin.Context)
- func (h *Handler) HandleGetUnstakePoolData(c *gin.Context)
- func (h *Handler) HandleGetUnstakingLeftSeconds(c *gin.Context)
- func (h *Handler) HandleGetWithdrawRemainingTime(c *gin.Context)
- func (h *Handler) HandlePostExitElectionList(c *gin.Context)
- func (h *Handler) HandlePostNodeInfo(c *gin.Context)
- func (h *Handler) HandlePostProof(c *gin.Context)
- func (h *Handler) HandlePostProposeElectionList(c *gin.Context)
- func (h *Handler) HandlePostPubkeyDetail(c *gin.Context)
- func (h *Handler) HandlePostPubkeyStatusList(c *gin.Context)
- func (h *Handler) HandlePostRewardInfo(c *gin.Context)
- func (h *Handler) HandlePostUnstakingPlanExist(c *gin.Context)
- func (h *Handler) HandlePostUploadUnstakingPlan(c *gin.Context)
- type ProposeElection
- type ReqExitElectionList
- type ReqNodeInfo
- type ReqProof
- type ReqProposeElectionList
- type ReqPubkeyDetail
- type ReqPubkeyStatusList
- type ReqRewardInfo
- type ReqUnstakingPlanExist
- type ReqUploadUnstakingPlan
- type ReqWithdrawRemainingTime
- type ResPubkey
- type ResReward
- type RspExitElectionList
- type RspGasPrice
- type RspNodeInfo
- type RspPoolData
- type RspProof
- type RspProposeElectionList
- type RspPubkeyDetail
- type RspPubkeyStatusList
- type RspRewardInfo
- type RspUnstakePoolData
- type RspUnstakingLeftSeconds
- type RspUnstakingPlanExist
- type RspWithdrawRemainingTime
- type SlashEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExitElection ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) HandleGetGasPrice ¶
@Summary gas price @Description gas price @Tags v1 @Produce json @Success 200 {object} utils.Rsp{data=RspGasPrice} @Router /v1/gasPrice [get]
func (*Handler) HandleGetPoolData ¶
@Summary pool data @Description pool data @Tags v1 @Produce json @Success 200 {object} utils.Rsp{data=RspPoolData} @Router /v1/poolData [get]
func (*Handler) HandleGetUnstakePoolData ¶
@Summary unstake pool data @Description unstake pool data @Tags v1 @Produce json @Success 200 {object} utils.Rsp{data=RspUnstakePoolData} @Router /v1/unstakePoolData [get]
func (*Handler) HandleGetUnstakingLeftSeconds ¶
@Summary staker unstaking left seconds @Description unstaking left seconds @Tags v1 @Produce json @Success 200 {object} utils.Rsp{data=RspUnstakingLeftSeconds} @Router /v1/staker/unstakingLeftSeconds [get]
func (*Handler) HandleGetWithdrawRemainingTime ¶
@Summary staker withdraw remaining time @Description staker withdraw remaining time @Tags v1 @Accept json @Produce json @Param param body ReqWithdrawRemainingTime true "staker address" @Success 200 {object} utils.Rsp{data=RspWithdrawRemainingTime} @Router /v1/staker/withdrawRemainingTime [post]
func (*Handler) HandlePostExitElectionList ¶
@Summary exit election list @Description exit election list @Tags v1 @Accept json @Produce json @Param param body ReqExitElectionList true "election list" @Success 200 {object} utils.Rsp{data=RspExitElectionList} @Router /v1/exitElectionList [post]
func (*Handler) HandlePostNodeInfo ¶
@Summary node info @Description node info @Tags v1 @Accept json @Produce json @Param param body ReqNodeInfo true "node info" @Success 200 {object} utils.Rsp{data=RspNodeInfo} @Router /v1/nodeInfo [post]
func (*Handler) HandlePostProof ¶
@Summary get proof of claim @Description proof @Tags v1 @Accept json @Produce json @Param param body ReqProof true "proof" @Success 200 {object} utils.Rsp{data=RspProof} @Router /v1/proof [post]
func (*Handler) HandlePostProposeElectionList ¶
@Summary propose election list @Description propose election list @Tags v1 @Accept json @Produce json @Param param body ReqProposeElectionList true "election list" @Success 200 {object} utils.Rsp{data=RspProposeElectionList} @Router /v1/proposeElectionList [post]
func (*Handler) HandlePostPubkeyDetail ¶
@Summary pubkey detail @Description pubkey detail @Tags v1 @Accept json @Produce json @Param param body ReqPubkeyDetail true "pubkey detail" @Success 200 {object} utils.Rsp{data=RspPubkeyDetail} @Router /v1/pubkeyDetail [post]
func (*Handler) HandlePostPubkeyStatusList ¶
@Summary pubkey status list @Description pubkey status list @Tags v1 @Accept json @Produce json @Param param body ReqPubkeyStatusList true "pubkey status list" @Success 200 {object} utils.Rsp{data=RspPubkeyStatusList} @Router /v1/pubkeyStatusList [post]
func (*Handler) HandlePostRewardInfo ¶
@Summary reward info @Description reward info @Tags v1 @Accept json @Produce json @Param param body ReqRewardInfo true "reward info" @Success 200 {object} utils.Rsp{data=RspRewardInfo} @Router /v1/rewardInfo [post]
func (*Handler) HandlePostUnstakingPlanExist ¶
@Summary unstaking plan exit @Description staker unstaking plan exit @Tags v1 @Accept json @Produce json @Param param body ReqUnstakingPlanExist true "unstaking plan exist" @Success 200 {object} utils.Rsp{data=RspUnstakingPlanExist} @Router /v1/staker/unstakingPlanExist [post]
func (*Handler) HandlePostUploadUnstakingPlan ¶
@Summary unstaking plan @Description staker unstaking plan @Tags v1 @Accept json @Produce json @Param param body ReqUploadUnstakingPlan true "unstaking plan" @Success 200 {object} utils.Rsp{} @Router /v1/staker/uploadUnstakingPlan [post]
type ProposeElection ¶
type ReqExitElectionList ¶
type ReqNodeInfo ¶
type ReqProposeElectionList ¶
type ReqPubkeyDetail ¶
type ReqPubkeyStatusList ¶
type ReqPubkeyStatusList struct {
PubkeyList []string `json:"pubkeyList"` //hex string list
}
type ReqRewardInfo ¶
type ReqUnstakingPlanExist ¶
type ReqUnstakingPlanExist struct {
StakerAddress string `json:"stakerAddress"` //hex string
}
type ReqUploadUnstakingPlan ¶
type ReqWithdrawRemainingTime ¶
type ReqWithdrawRemainingTime struct {
StakerAddress string `json:"stakerAddress"` //hex string
}
type RspExitElectionList ¶
type RspExitElectionList struct { ElectionTotalCount uint64 `json:"electionTotalCount"` ElectionList []ExitElection `json:"electionList"` }
type RspGasPrice ¶
type RspNodeInfo ¶
type RspNodeInfo struct { TotalCount int64 `json:"totalCount"` PendingCount int64 `json:"pendingCount"` ActiveCount int64 `json:"activeCount"` ExitedCount int64 `json:"exitedCount"` SlashCount int64 `json:"slashCount"` SelfDepositedEth string `json:"selfDepositedEth"` SelfRewardEth string `json:"selfRewardEth"` TotalManagedEth string `json:"totalManagedEth"` EthPrice float64 `json:"ethPrice"` List []ResPubkey `json:"pubkeyList"` }
type RspPoolData ¶
type RspPoolData struct { DepositedEth string `json:"depositedEth"` //staker principal + validator principal MintedREth string `json:"mintedREth"` StakedEth string `json:"stakedEth"` // matched number * 32 + solo unmatched number * 4 + trust unmatched number * 1 PoolEth string `json:"poolEth"` // staker principal + validator principal + reward UnmatchedEth string `json:"unmatchedEth"` // userdeposit balance MatchedValidators uint64 `json:"matchedValidators"` // staked waiting actived StakeApr float64 `json:"stakeApr"` ValidatorApr float64 `json:"validatorApr"` EthPrice float64 `json:"ethPrice"` AllEth string `json:"allEth"` // staker principal + validator principal + reward }
type RspProposeElectionList ¶
type RspProposeElectionList struct { ElectionTotalCount uint64 `json:"electionTotalCount"` ElectionList []ProposeElection `json:"electionList"` }
type RspPubkeyDetail ¶
type RspPubkeyDetail struct { Status uint8 `json:"status"` CurrentBalance string `json:"currentBalance"` DepositBalance string `json:"depositBalance"` NodeDepositAmount string `json:"nodeDepositAmount"` EffectiveBalance string `json:"effectiveBalance"` Last24hRewardEth string `json:"last24hRewardEth"` Apr float64 `json:"apr"` EthPrice float64 `json:"ethPrice"` EligibleEpoch uint64 `json:"eligibleEpoch"` EligibleDays uint64 `json:"eligibleDays"` ActiveEpoch uint64 `json:"activeEpoch"` ActiveDays uint64 `json:"activeDays"` ChartXData []uint64 `json:"chartXData"` ChartYData []string `json:"chartYData"` TotalCount int64 `json:"totalCount"` TotalSlashAmount string `json:"totalSlashAmount"` SlashEventList []SlashEvent `json:"slashEventList"` }
type RspPubkeyStatusList ¶
type RspRewardInfo ¶
type RspRewardInfo struct { TotalCount int64 `json:"totalCount"` TotalStakedEth string `json:"totalStakedEth"` LastEraRewardEth string `json:"lastEraRewardEth"` EthPrice float64 `json:"ethPrice"` ChartXData []uint64 `json:"chartXData"` ChartYData []string `json:"chartYData"` List []ResReward `json:"rewardList"` }
type RspUnstakePoolData ¶
type RspUnstakingLeftSeconds ¶
type RspUnstakingLeftSeconds struct {
LeftSeconds uint64 `json:"leftSeconds"` // staked waiting actived
}
type RspUnstakingPlanExist ¶
type RspUnstakingPlanExist struct {
Exist bool `json:"exist"`
}
type RspWithdrawRemainingTime ¶
type RspWithdrawRemainingTime struct {
RemainingSeconds uint64 `json:"remainingSeconds"` // staked waiting actived
}