Documentation
¶
Index ¶
- Constants
- Variables
- type API
- func (api API) GetBalance(address string) (amount decimal.Decimal, err error)
- func (api API) GetCommunityPoolAmount() (amount decimal.Decimal, err error)
- func (api API) GetDelegatorValidatorStake(delegator string, validator string) (amount decimal.Decimal, err error)
- func (api API) GetInflation() (amount decimal.Decimal, err error)
- func (api API) GetProposals() (proposals ProposalsResult, err error)
- func (api API) GetStake(address string) (amount decimal.Decimal, err error)
- func (api API) GetStakingPool() (sp StakingPool, err error)
- func (api API) GetTotalSupply() (amount decimal.Decimal, err error)
- func (api API) GetUnbonding(address string) (amount decimal.Decimal, err error)
- func (api API) GetValidators() (items []Validator, err error)
- func (api API) ProposalTallyResult(id uint64) (result ProposalTallyResult, err error)
- type AmountResult
- type CommunityPool
- type DelegatorValidatorStakeResult
- type Inflation
- type ProposalProposer
- type ProposalTallyResult
- type ProposalVotersResult
- type ProposalsResult
- type StakeResult
- type StakingPool
- type Supply
- type UnbondingResult
- type Validator
- type Validators
Constants ¶
View Source
const ( DepositPeriodProposalStatus = "PROPOSAL_STATUS_DEPOSIT_PERIOD" VotingPeriodProposalStatus = "PROPOSAL_STATUS_VOTING_PERIOD" PassedProposalStatus = "PROPOSAL_STATUS_PASSED" RejectedProposalStatus = "PROPOSAL_STATUS_REJECTED" FailedProposalStatus = "PROPOSAL_STATUS_FAILED" )
Variables ¶
View Source
var PrecisionDiv = decimal.New(1, precision)
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (API) GetBalance ¶
func (API) GetCommunityPoolAmount ¶
func (API) GetDelegatorValidatorStake ¶
func (API) GetProposals ¶
func (api API) GetProposals() (proposals ProposalsResult, err error)
func (API) GetStakingPool ¶
func (api API) GetStakingPool() (sp StakingPool, err error)
func (API) GetUnbonding ¶
func (API) GetValidators ¶
func (API) ProposalTallyResult ¶
func (api API) ProposalTallyResult(id uint64) (result ProposalTallyResult, err error)
type AmountResult ¶
type CommunityPool ¶
type DelegatorValidatorStakeResult ¶
type DelegatorValidatorStakeResult struct {
DelegationResponse struct {
Delegation struct {
DelegatorAddress string `json:"delegator_address"`
ValidatorAddress string `json:"validator_address"`
Shares decimal.Decimal `json:"shares"`
} `json:"delegation"`
Balance struct {
Denom string `json:"denom"`
Amount decimal.Decimal `json:"amount"`
} `json:"balance"`
} `json:"delegation_response"`
}
type ProposalProposer ¶
type ProposalTallyResult ¶
type ProposalVotersResult ¶
type ProposalsResult ¶
type ProposalsResult struct {
Proposals []struct {
Content struct {
Type string `json:"@type"`
Title string `json:"title"`
Description string `json:"description"`
} `json:"content"`
ProposalID uint64 `json:"proposal_id,string"`
Status string `json:"status"`
FinalTallyResult struct {
Yes int64 `json:"yes,string"`
Abstain int64 `json:"abstain,string"`
No int64 `json:"no,string"`
NoWithVeto int64 `json:"no_with_veto,string"`
} `json:"final_tally_result"`
SubmitTime time.Time `json:"submit_time"`
DepositEndTime time.Time `json:"deposit_end_time"`
TotalDeposit []struct {
Amount decimal.Decimal `json:"amount"`
} `json:"total_deposit"`
VotingStartTime time.Time `json:"voting_start_time"`
VotingEndTime time.Time `json:"voting_end_time"`
} `json:"proposals"`
}
type StakeResult ¶
type StakingPool ¶
type UnbondingResult ¶
type Validator ¶
type Validator struct {
OperatorAddress string `json:"operator_address"`
ConsensusPubkey struct {
Type string `json:"@type"`
Key string `json:"key"`
} `json:"consensus_pubkey"`
Tokens uint64 `json:"tokens,string"`
Description struct {
Moniker string `json:"moniker"`
Identity string `json:"identity"`
Website string `json:"website"`
Details string `json:"details"`
} `json:"description"`
UnbondingHeight uint64 `json:"unbonding_height,string"`
UnbondingTime time.Time `json:"unbonding_time"`
Commission struct {
CommissionRates struct {
Rate decimal.Decimal `json:"rate"`
MaxRate decimal.Decimal `json:"max_rate"`
MaxChangeRate decimal.Decimal `json:"max_change_rate"`
} `json:"commission_rates"`
} `json:"commission"`
MaxChangeRate decimal.Decimal `json:"max_change_rate"`
}
type Validators ¶
type Validators struct {
Validators []Validator `json:"validators"`
}
Click to show internal directories.
Click to hide internal directories.