Documentation
¶
Index ¶
- Constants
- Variables
- type Account
- type Change
- type Client
- type Content
- type ContinuousVestingAccount
- type DelayedVestingAccount
- type Delegation
- type DelegationBalance
- type DelegationResponse
- type FinalTallyResult
- type MockClient
- func (conn *MockClient) Account(accountAddress string) (*Account, error)
- func (conn *MockClient) AnnualProvisions() (coin.DecCoin, error)
- func (conn *MockClient) Balances(accountAddress string) (coin.Coins, error)
- func (conn *MockClient) BondedBalance(accountAddress string) (coin.Coins, error)
- func (conn *MockClient) Commission(validatorAddress string) (coin.DecCoins, error)
- func (conn *MockClient) Delegation(delegator string, validator string) (*DelegationResponse, error)
- func (conn *MockClient) ProposalById(id string) (Proposal, error)
- func (conn *MockClient) ProposalTally(id string) (Tally, error)
- func (conn *MockClient) Proposals() ([]Proposal, error)
- func (conn *MockClient) RedelegatingBalance(accountAddress string) (coin.Coins, error)
- func (conn *MockClient) TotalBondedBalance() (coin.Coin, error)
- func (conn *MockClient) TotalRewards(accountAddress string) (coin.DecCoins, error)
- func (conn *MockClient) UnbondingBalance(accountAddress string) (coin.Coins, error)
- func (conn *MockClient) Validator(validatorAddress string) (*Validator, error)
- type ModuleAccount
- type PeriodicVestingAccount
- type Proposal
- type PubKey
- type Tally
- type TotalDeposit
- type Validator
- type ValidatorCommission
- type ValidatorCommissionRates
- type ValidatorDescription
- type VestingBalance
- type VestingPeriod
Constants ¶
View Source
const ACCOUNT_BASE = "/cosmos.auth.v1beta1.BaseAccount"
View Source
const ACCOUNT_MODULE = "/cosmos.auth.v1beta1.ModuleAccount"
View Source
const ACCOUNT_VESTING_CONTINUOUS = "/cosmos.vesting.v1beta1.ContinuousVestingAccount"
View Source
const ACCOUNT_VESTING_DELAYED = "/cosmos.vesting.v1beta1.DelayedVestingAccount"
View Source
const ACCOUNT_VESTING_PERIODIC = "/cosmos.vesting.v1beta1.PeriodicVestingAccount"
Variables ¶
View Source
var ErrAccountNoDelegation = errors.New("account has no delegation")
View Source
var ErrAccountNotFound = errors.New("account not found")
View Source
var ErrProposalNotFound = errors.New("proposal not found")
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
Type string `json:"type"`
Address string `json:"address"`
MaybePubkey *PubKey `json:"pubkey"`
AccountNumber string `json:"account_number"`
Sequence string `json:"sequence"`
MaybeModuleAccount *ModuleAccount `json:"module_account"`
MaybeDelayedVestingAccount *DelayedVestingAccount `json:"delayed_vesting_account"`
MaybeContinuousVestingAccount *ContinuousVestingAccount `json:"continuous_vesting_account"`
MaybePeriodicVestingAccount *PeriodicVestingAccount `json:"periodic_vesting_account"`
}
type Client ¶
type Client interface {
Account(accountAddress string) (*Account, error)
Balances(accountAddress string) (coin.Coins, error)
BondedBalance(accountAddress string) (coin.Coins, error)
RedelegatingBalance(accountAddress string) (coin.Coins, error)
UnbondingBalance(accountAddress string) (coin.Coins, error)
TotalRewards(accountAddress string) (coin.DecCoins, error)
Commission(validatorAddress string) (coin.DecCoins, error)
Validator(validatorAddress string) (*Validator, error)
Delegation(delegator string, validator string) (*DelegationResponse, error)
TotalBondedBalance() (coin.Coin, error)
AnnualProvisions() (coin.DecCoin, error)
Proposals() ([]Proposal, error)
ProposalById(id string) (Proposal, error)
ProposalTally(id string) (Tally, error)
}
type ContinuousVestingAccount ¶
type ContinuousVestingAccount struct {
OriginalVesting []VestingBalance `json:"original_vesting"`
DelegatedFree []VestingBalance `json:"delegated_free"`
DelegatedVesting []VestingBalance `json:"delegated_vesting"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
}
type DelayedVestingAccount ¶
type DelayedVestingAccount struct {
OriginalVesting []VestingBalance `json:"original_vesting"`
DelegatedFree []VestingBalance `json:"delegated_free"`
DelegatedVesting []VestingBalance `json:"delegated_vesting"`
EndTime string `json:"end_time"`
}
type Delegation ¶
type DelegationBalance ¶
type DelegationResponse ¶
type DelegationResponse struct {
Delegation Delegation `json:"delegation"`
Balance DelegationBalance `json:"balance"`
}
type FinalTallyResult ¶
type MockClient ¶
func NewMockClient ¶
func NewMockClient() *MockClient
func (*MockClient) Account ¶
func (conn *MockClient) Account(accountAddress string) (*Account, error)
func (*MockClient) AnnualProvisions ¶
func (conn *MockClient) AnnualProvisions() (coin.DecCoin, error)
func (*MockClient) Balances ¶
func (conn *MockClient) Balances(accountAddress string) (coin.Coins, error)
func (*MockClient) BondedBalance ¶
func (conn *MockClient) BondedBalance(accountAddress string) (coin.Coins, error)
func (*MockClient) Commission ¶
func (conn *MockClient) Commission(validatorAddress string) (coin.DecCoins, error)
func (*MockClient) Delegation ¶
func (conn *MockClient) Delegation(delegator string, validator string) (*DelegationResponse, error)
func (*MockClient) ProposalById ¶
func (conn *MockClient) ProposalById(id string) (Proposal, error)
func (*MockClient) ProposalTally ¶
func (conn *MockClient) ProposalTally(id string) (Tally, error)
func (*MockClient) Proposals ¶
func (conn *MockClient) Proposals() ([]Proposal, error)
func (*MockClient) RedelegatingBalance ¶
func (conn *MockClient) RedelegatingBalance(accountAddress string) (coin.Coins, error)
func (*MockClient) TotalBondedBalance ¶
func (conn *MockClient) TotalBondedBalance() (coin.Coin, error)
func (*MockClient) TotalRewards ¶
func (conn *MockClient) TotalRewards(accountAddress string) (coin.DecCoins, error)
func (*MockClient) UnbondingBalance ¶
func (conn *MockClient) UnbondingBalance(accountAddress string) (coin.Coins, error)
type ModuleAccount ¶
type PeriodicVestingAccount ¶
type PeriodicVestingAccount struct {
OriginalVesting []VestingBalance `json:"original_vesting"`
DelegatedFree []VestingBalance `json:"delegated_free"`
DelegatedVesting []VestingBalance `json:"delegated_vesting"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
VestingPeriods []VestingPeriod `json:"vesting_periods"`
}
type Proposal ¶
type Proposal struct {
ProposalID string `json:"proposal_id"`
Content Content `json:"content"`
Status string `json:"status"`
FinalTallyResult FinalTallyResult `json:"final_tally_result"`
SubmitTime string `json:"submit_time"`
DepositEndTime string `json:"deposit_end_time"`
TotalDeposit []TotalDeposit `json:"total_deposit"`
VotingStartTime string `json:"voting_start_time"`
VotingEndTime string `json:"voting_end_time"`
}
type TotalDeposit ¶
type Validator ¶
type Validator struct {
OperatorAddress string `json:"operator_address"`
ConsensusPubkey PubKey `json:"consensus_pubkey"`
Jailed bool `json:"jailed"`
Status string `json:"status"`
Tokens string `json:"tokens"`
Description ValidatorDescription `json:"description"`
UnbondingHeight string `json:"unbonding_height"`
UnbondingTime string `json:"unbonding_time"`
Commission ValidatorCommission `json:"commission"`
MinSelfDelegation string `json:"min_self_delegation"`
}
type ValidatorCommission ¶
type ValidatorCommission struct {
CommissionRates ValidatorCommissionRates `json:"commission_rates"`
UpdateTime string `json:"update_time"`
}
type ValidatorDescription ¶
type VestingBalance ¶
type VestingPeriod ¶
type VestingPeriod struct {
Amount []VestingBalance `json:"amount"`
Length string `json:"length"`
}
Click to show internal directories.
Click to hide internal directories.