Documentation
¶
Index ¶
- Constants
- type Account
- type AccountResp
- type AnnualProvisionsResp
- type BankBalance
- type BankBalancesResp
- type BaseAccount
- type BaseVestingAccount
- type DelegationsResp
- type DelegatorReward
- type DelegatorRewardResp
- type DelegatorTotal
- type HTTPClient
- func (client *HTTPClient) Account(accountAddress string) (*cosmosapp_interface.Account, error)
- func (client *HTTPClient) AnnualProvisions() (coin.DecCoin, error)
- func (client *HTTPClient) Balances(accountAddress string) (coin.Coins, error)
- func (client *HTTPClient) BondedBalance(accountAddress string) (coin.Coins, error)
- func (client *HTTPClient) Commission(validatorAddress string) (coin.DecCoins, error)
- func (client *HTTPClient) Delegation(delegator string, validator string) (*cosmosapp_interface.DelegationResponse, error)
- func (client *HTTPClient) ProposalById(id string) (cosmosapp_interface.Proposal, error)
- func (client *HTTPClient) ProposalTally(id string) (cosmosapp_interface.Tally, error)
- func (client *HTTPClient) Proposals() ([]cosmosapp_interface.Proposal, error)
- func (client *HTTPClient) RedelegatingBalance(accountAddress string) (coin.Coins, error)
- func (client *HTTPClient) TotalBondedBalance() (coin.Coin, error)
- func (client *HTTPClient) TotalRewards(accountAddress string) (coin.DecCoins, error)
- func (client *HTTPClient) UnbondingBalance(accountAddress string) (coin.Coins, error)
- func (client *HTTPClient) Validator(validatorAddress string) (*cosmosapp_interface.Validator, error)
- type Pagination
- type ProposalResp
- type ProposalsResp
- type TallyResp
- type UnbondingEntry
- type UnbondingResp
- type UnbondingResponse
- type ValidatorCommission
- type ValidatorCommissionResp
- type ValidatorCommissions
- type ValidatorResp
- type ValidatorsResp
Constants ¶
View Source
const ERR_CODE_ACCOUNT_NOT_FOUND = 2
View Source
const ERR_CODE_ACCOUNT_NO_DELEGATION = 5
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// Common fields
Type string `json:"@type"`
// Module account
MaybeName *string `json:"name"`
MaybeBaseAccount *BaseAccount `json:"base_account"`
MaybePermissions []string `json:"permissions"`
// Vesting account common fields
MaybeBaseVestingAccount *BaseVestingAccount `json:"base_vesting_account"`
// Continuous vesting account
MaybeStartTime *string `json:"start_time"`
// Periodic vesting account
MaybeVestingPeriods []cosmosapp_interface.VestingPeriod `json:"vesting_periods"`
// User account
MaybeAddress *string `json:"address"`
MaybePubKey *cosmosapp_interface.PubKey `json:"pub_key"`
MaybeAccountNumber *string `json:"account_number"`
MaybeSequence *string `json:"sequence"`
}
type AccountResp ¶
type AccountResp struct {
Account Account
}
type AnnualProvisionsResp ¶
type AnnualProvisionsResp struct {
AnnualProvisions string `json:"annual_provisions"`
}
type BankBalance ¶
type BankBalancesResp ¶
type BankBalancesResp struct {
BankBalanceResponses []BankBalance `json:"balances"`
Pagination Pagination `json:"pagination"`
}
type BaseAccount ¶
type BaseAccount struct {
Address string `json:"address"`
MaybePubKey *cosmosapp_interface.PubKey `json:"pub_key"`
AccountNumber string `json:"account_number"`
Sequence string `json:"sequence"`
}
type BaseVestingAccount ¶
type BaseVestingAccount struct {
BaseAccount BaseAccount `json:"base_account"`
OriginalVesting []cosmosapp_interface.VestingBalance `json:"original_vesting"`
DelegatedFree []cosmosapp_interface.VestingBalance `json:"delegated_free"`
DelegatedVesting []cosmosapp_interface.VestingBalance `json:"delegated_vesting"`
EndTime string `json:"end_time"`
}
type DelegationsResp ¶
type DelegationsResp struct {
MaybeDelegationResponses []cosmosapp_interface.DelegationResponse `json:"delegation_responses"`
MaybePagination *Pagination `json:"pagination"`
// On error
MaybeCode *int `json:"code"`
MaybeMessage *string `json:"message"`
}
type DelegatorReward ¶
type DelegatorReward struct {
ValidatorAddress string `json:"validator_address"`
Reward []DelegatorTotal `json:"reward"`
}
type DelegatorRewardResp ¶
type DelegatorRewardResp struct {
Rewards []DelegatorReward `json:"rewards"`
Total []DelegatorTotal `json:"total"`
}
type DelegatorTotal ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(rpcUrl string, bondingDenom string) *HTTPClient
NewHTTPClient returns a new HTTPClient for tendermint request
func NewInsecureHTTPClient ¶
func NewInsecureHTTPClient(rpcUrl string, bondingDenom string) *HTTPClient
func (*HTTPClient) Account ¶
func (client *HTTPClient) Account(accountAddress string) (*cosmosapp_interface.Account, error)
func (*HTTPClient) AnnualProvisions ¶
func (client *HTTPClient) AnnualProvisions() (coin.DecCoin, error)
func (*HTTPClient) Balances ¶
func (client *HTTPClient) Balances(accountAddress string) (coin.Coins, error)
func (*HTTPClient) BondedBalance ¶
func (client *HTTPClient) BondedBalance(accountAddress string) (coin.Coins, error)
func (*HTTPClient) Commission ¶
func (client *HTTPClient) Commission(validatorAddress string) (coin.DecCoins, error)
func (*HTTPClient) Delegation ¶
func (client *HTTPClient) Delegation( delegator string, validator string, ) (*cosmosapp_interface.DelegationResponse, error)
func (*HTTPClient) ProposalById ¶
func (client *HTTPClient) ProposalById(id string) (cosmosapp_interface.Proposal, error)
func (*HTTPClient) ProposalTally ¶
func (client *HTTPClient) ProposalTally(id string) (cosmosapp_interface.Tally, error)
func (*HTTPClient) Proposals ¶
func (client *HTTPClient) Proposals() ([]cosmosapp_interface.Proposal, error)
func (*HTTPClient) RedelegatingBalance ¶
func (client *HTTPClient) RedelegatingBalance(accountAddress string) (coin.Coins, error)
func (*HTTPClient) TotalBondedBalance ¶
func (client *HTTPClient) TotalBondedBalance() (coin.Coin, error)
func (*HTTPClient) TotalRewards ¶
func (client *HTTPClient) TotalRewards(accountAddress string) (coin.DecCoins, error)
func (*HTTPClient) UnbondingBalance ¶
func (client *HTTPClient) UnbondingBalance(accountAddress string) (coin.Coins, error)
func (*HTTPClient) Validator ¶
func (client *HTTPClient) Validator(validatorAddress string) (*cosmosapp_interface.Validator, error)
type Pagination ¶
type ProposalResp ¶
type ProposalResp struct {
Proposal cosmosapp_interface.Proposal `json:"proposal"`
}
type ProposalsResp ¶
type ProposalsResp struct {
MaybeProposalsResponse []cosmosapp_interface.Proposal `json:"proposals"`
MaybePagination *Pagination `json:"pagination"`
// On error
MaybeCode *int `json:"code"`
MaybeMessage *string `json:"message"`
}
type TallyResp ¶
type TallyResp struct {
Tally cosmosapp_interface.Tally `json:"tally"`
}
type UnbondingEntry ¶
type UnbondingResp ¶
type UnbondingResp struct {
UnbondingResponses []UnbondingResponse `json:"unbonding_responses"`
Pagination Pagination `json:"pagination"`
}
type UnbondingResponse ¶
type UnbondingResponse struct {
DelegatorAddress string `json:"delegator_address"`
ValidatorAddress string `json:"validator_address"`
Entries []UnbondingEntry `json:"entries"`
}
type ValidatorCommission ¶
type ValidatorCommissionResp ¶
type ValidatorCommissionResp struct {
Commissions ValidatorCommissions `json:"commission"`
}
type ValidatorCommissions ¶
type ValidatorCommissions struct {
Commission []ValidatorCommission `json:"commission"`
}
type ValidatorResp ¶
type ValidatorResp struct {
Validator cosmosapp_interface.Validator `json:"validator"`
}
type ValidatorsResp ¶
type ValidatorsResp struct {
MaybeValidatorResponse []cosmosapp_interface.Validator `json:"validators"`
MaybePagination *Pagination `json:"pagination"`
// On error
MaybeCode *int `json:"code"`
MaybeMessage *string `json:"message"`
}
Click to show internal directories.
Click to hide internal directories.