Documentation ¶
Index ¶
- Constants
- type Account
- type AccountBalance
- type AccountBalanceHistory
- type CoinInput
- type CoinOutput
- type ConsensusEvent
- type Cookbook
- type Delegation
- type DelegatorRewardAmount
- type Deposit
- type DepositParams
- type DistributionParams
- type DoubleInputParam
- type DoubleKeyValue
- type DoubleParam
- type DoubleSignEvidence
- type DoubleSignVote
- type DoubleWeightRange
- type EntriesList
- type EventCompleteExecution
- type Execution
- type Genesis
- type GovParams
- type IntWeightRange
- type Item
- type ItemInput
- type ItemModifyOutput
- type ItemOutput
- type ItemRecord
- type LongInputParam
- type LongKeyValue
- type LongParam
- type MintParams
- type Pool
- type Proposal
- type ProposalStakingPoolSnapshot
- type ProposalUpdate
- type ProposalValidatorStatusSnapshot
- type Recipe
- type Redelegation
- type SlashingParams
- type StakingParams
- type StringInputParam
- type StringKeyValue
- type StringParam
- type TallyParams
- type TallyResult
- type Token
- type TokenPrice
- type TokenUnit
- type UnbondingDelegation
- type Validator
- type ValidatorCommission
- type ValidatorCommissionAmount
- type ValidatorDescription
- type ValidatorSigningInfo
- type ValidatorStatus
- type ValidatorVotingPower
- type Vote
- type VotingParams
- type WeightedOutputs
Constants ¶
const ( ProposalStatusInvalid = "PROPOSAL_STATUS_INVALID" ProposalStatusPassed = "PROPOSAL_STATUS_PASSED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalance ¶
AccountBalance represents the balance of an account at a given height
func NewAccountBalance ¶
func NewAccountBalance(address string, balance sdk.Coins, height int64) AccountBalance
NewAccountBalance allows to build a new AccountBalance instance
type AccountBalanceHistory ¶
type AccountBalanceHistory struct { Account string Balance []sdk.Coin Delegations []sdk.Coin Redelegations []sdk.Coin Unbonding []sdk.Coin Commission []sdk.DecCoin Reward []sdk.DecCoin Timestamp time.Time }
AccountBalanceHistory contains the information of a given balance at a specific height
func NewAccountBalanceHistory ¶
func NewAccountBalanceHistory( account string, balance, delegations, redelegations, unbonding []sdk.Coin, commission, reward []sdk.DecCoin, timestamp time.Time, ) AccountBalanceHistory
NewAccountBalanceHistory allows to build a new AccountBalanceHistory instance
type CoinOutput ¶
type CoinOutput struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Coin sdk.Coin `protobuf:"bytes,2,opt,name=coin,proto3" json:"coin"` Program string `protobuf:"bytes,3,opt,name=program,proto3" json:"program,omitempty"` }
CoinOutput models the continuum of valid outcomes for coin generation in recipes
type ConsensusEvent ¶
type ConsensusEvent struct { Height int64 `json:"height"` Round int32 `json:"round"` Step string `json:"step"` }
ConsensusEvent represents a consensus event
func NewConsensusEvent ¶
func NewConsensusEvent(height int64, round int32, step string) *ConsensusEvent
NewConsensusEvent allows to easily build a new ConsensusEvent object
func (ConsensusEvent) Equal ¶
func (c ConsensusEvent) Equal(other ConsensusEvent) bool
Equal tells whether c and other contain the same data
type Cookbook ¶
type Cookbook struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` NodeVersion uint64 `protobuf:"varint,3,opt,name=nodeVersion,proto3" json:"nodeVersion,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` Developer string `protobuf:"bytes,6,opt,name=developer,proto3" json:"developer,omitempty"` Version string `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"` SupportEmail string `protobuf:"bytes,8,opt,name=supportEmail,proto3" json:"supportEmail,omitempty"` Enabled bool `protobuf:"varint,9,opt,name=enabled,proto3" json:"enabled,omitempty"` }
type definitions for recipe and cookbook live here
type Delegation ¶
type Delegation struct { DelegatorAddress string ValidatorOperAddr string Amount sdk.Coin Height int64 }
Delegation represents a single delegation made from a delegator to a specific validator at a specific height (and timestamp) containing a given amount of tokens
func NewDelegation ¶
func NewDelegation(delegator string, validatorOperAddr string, amount sdk.Coin, height int64) Delegation
NewDelegation creates a new Delegation instance containing the given data
type DelegatorRewardAmount ¶
type DelegatorRewardAmount struct { ValidatorOperAddr string DelegatorAddress string WithdrawAddress string Amount []sdk.DecCoin Height int64 }
DelegatorRewardAmount contains the data of a delegator commission amount
func NewDelegatorRewardAmount ¶
func NewDelegatorRewardAmount( delegator, valOperAddr, withdrawAddress string, amount sdk.DecCoins, height int64, ) DelegatorRewardAmount
NewDelegatorRewardAmount allows to build a new DelegatorRewardAmount instance
type DepositParams ¶
type DepositParams struct { MinDeposit sdk.Coins `json:"min_deposit,omitempty" yaml:"min_deposit"` MaxDepositPeriod int64 `json:"max_deposit_period,omitempty" yaml:"max_deposit_period"` }
DepositParams contains the data of the deposit parameters of the x/gov module
func NewDepositParam ¶
func NewDepositParam(d govtypes.DepositParams) DepositParams
NewDepositParam allows to build a new DepositParams
type DistributionParams ¶
type DistributionParams struct { distrtypes.Params Height int64 }
DistributionParams represents the parameters of the x/distribution module
func NewDistributionParams ¶
func NewDistributionParams(params distrtypes.Params, height int64) *DistributionParams
NewDistributionParams allows to build a new DistributionParams instance
type DoubleInputParam ¶
type DoubleInputParam struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The minimum legal value of this parameter. MinValue sdk.Dec `protobuf:"bytes,2,opt,name=minValue,proto3,customtype=github.com/cosmos/cosmos-sdk/t.Dec" json:"minValue"` // The maximum legal value of this parameter. MaxValue sdk.Dec `protobuf:"bytes,3,opt,name=maxValue,proto3,customtype=github.com/cosmos/cosmos-sdk/t.Dec" json:"maxValue"` }
DoubleInputParam describes the bounds on an item input/output parameter of type float64
type DoubleKeyValue ¶
type DoubleParam ¶
type DoubleParam struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` WeightRanges []DoubleWeightRange `protobuf:"bytes,2,rep,name=weightRanges,proto3" json:"weightRanges"` // When program is not empty, weightRanges is ignored Program string `protobuf:"bytes,3,opt,name=program,proto3" json:"program,omitempty"` }
DoubleParam describes the bounds on an item input/output parameter of type float64
type DoubleSignEvidence ¶
type DoubleSignEvidence struct { VoteA DoubleSignVote VoteB DoubleSignVote Height int64 }
DoubleSignEvidence represent a double sign evidence on each tendermint block
func NewDoubleSignEvidence ¶
func NewDoubleSignEvidence(height int64, voteA DoubleSignVote, voteB DoubleSignVote) DoubleSignEvidence
NewDoubleSignEvidence return a new DoubleSignEvidence object
type DoubleSignVote ¶
type DoubleSignVote struct { BlockID string ValidatorAddress string Signature string Type int Height int64 Round int32 ValidatorIndex int32 }
DoubleSignVote represents a double vote which is included inside a DoubleSignEvidence
func NewDoubleSignVote ¶
func NewDoubleSignVote( roundType int, height int64, round int32, blockID string, validatorAddress string, validatorIndex int32, signature string, ) DoubleSignVote
NewDoubleSignVote allows to create a new DoubleSignVote instance
type DoubleWeightRange ¶
type DoubleWeightRange struct { Lower sdk.Dec `protobuf:"bytes,1,opt,name=lower,proto3,customtype=github.com/cosmos/cosmos-sdk/t.Dec" json:"lower"` Upper sdk.Dec `protobuf:"bytes,2,opt,name=upper,proto3,customtype=github.com/cosmos/cosmos-sdk/t.Dec" json:"upper"` Weight uint64 `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty"` }
DoubleWeightRange describes weight range that produce double value
type EntriesList ¶
type EntriesList struct { CoinOutputs []CoinOutput `protobuf:"bytes,1,rep,name=coinOutputs,proto3" json:"coinOutputs"` ItemOutputs []ItemOutput `protobuf:"bytes,2,rep,name=itemOutputs,proto3" json:"itemOutputs"` ItemModifyOutputs []ItemModifyOutput `protobuf:"bytes,3,rep,name=itemModifyOutputs,proto3" json:"itemModifyOutputs"` }
EntriesList is a struct to keep list of items and coins
type EventCompleteExecution ¶
type EventCompleteExecution struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` BurnCoins sdk.Coins `protobuf:"bytes,3,rep,name=burnCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"burnCoins"` PayCoins sdk.Coins `protobuf:"bytes,4,rep,name=payCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"payCoins"` TransferCoins sdk.Coins `protobuf:"bytes,5,rep,name=transferCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"transferCoins"` FeeCoins sdk.Coins `protobuf:"bytes,6,rep,name=feeCoins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"feeCoins"` CoinOutputs sdk.Coins `protobuf:"bytes,7,rep,name=coinOutputs,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coinOutputs"` MintItems []Item `protobuf:"bytes,8,rep,name=mintItems,proto3" json:"mintItems"` ModifyItems []Item `protobuf:"bytes,9,rep,name=modifyItems,proto3" json:"modifyItems"` }
type Execution ¶
type Execution struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` RecipeID string `protobuf:"bytes,3,opt,name=recipeID,proto3" json:"recipeID,omitempty"` CookbookID string `protobuf:"bytes,4,opt,name=cookbookID,proto3" json:"cookbookID,omitempty"` RecipeVersion string `protobuf:"bytes,5,opt,name=recipeVersion,proto3" json:"recipeVersion,omitempty"` NodeVersion uint64 `protobuf:"varint,6,opt,name=nodeVersion,proto3" json:"nodeVersion,omitempty"` BlockHeight int64 `protobuf:"varint,7,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` ItemInputs []ItemRecord `protobuf:"bytes,8,rep,name=itemInputs,proto3" json:"itemInputs"` CoinInputs sdk.Coins `protobuf:"bytes,9,rep,name=coinInputs,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coinInputs"` CoinOutputs sdk.Coins `protobuf:"bytes,10,rep,name=coinOutputs,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coinOutputs"` ItemOutputIDs []string `protobuf:"bytes,11,rep,name=itemOutputIDs,proto3" json:"itemOutputIDs,omitempty"` ItemModifyOutputIDs []string `protobuf:"bytes,12,rep,name=itemModifyOutputIDs,proto3" json:"itemModifyOutputIDs,omitempty"` }
Execution proto definition - used to create the response you'd see from the chain
type Genesis ¶
Genesis contains the useful information about the genesis
func NewGenesis ¶
NewGenesis allows to build a new Genesis instance
type GovParams ¶
type GovParams struct { DepositParams DepositParams `json:"deposit_params" yaml:"deposit_params"` VotingParams VotingParams `json:"voting_params" yaml:"voting_params"` TallyParams TallyParams `json:"tally_params" yaml:"tally_params"` Height int64 `json:"height" ymal:"height"` }
GovParams contains the data of the x/gov module parameters
func NewGovParams ¶
func NewGovParams(votingParams VotingParams, depositParams DepositParams, tallyParams TallyParams, height int64) *GovParams
NewGovParams allows to build a new GovParams instance
type IntWeightRange ¶
type IntWeightRange struct { Lower int64 `protobuf:"varint,1,opt,name=lower,proto3" json:"lower,omitempty"` Upper int64 `protobuf:"varint,2,opt,name=upper,proto3" json:"upper,omitempty"` Weight uint64 `protobuf:"varint,3,opt,name=weight,proto3" json:"weight,omitempty"` }
IntWeightRange describes weight range that produce int value
type Item ¶
type Item struct { Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` CookbookID string `protobuf:"bytes,2,opt,name=cookbookID,proto3" json:"cookbookID,omitempty"` ID string `protobuf:"bytes,3,opt,name=ID,proto3" json:"ID,omitempty"` NodeVersion uint64 `protobuf:"varint,4,opt,name=nodeVersion,proto3" json:"nodeVersion,omitempty"` Doubles []DoubleKeyValue `protobuf:"bytes,5,rep,name=doubles,proto3" json:"doubles"` Longs []LongKeyValue `protobuf:"bytes,6,rep,name=longs,proto3" json:"longs"` Strings []StringKeyValue `protobuf:"bytes,7,rep,name=strings,proto3" json:"strings"` MutableStrings []StringKeyValue `protobuf:"bytes,8,rep,name=mutableStrings,proto3" json:"mutableStrings"` Tradeable bool `protobuf:"varint,9,opt,name=tradeable,proto3" json:"tradeable,omitempty"` LastUpdate int64 `protobuf:"varint,10,opt,name=lastUpdate,proto3" json:"lastUpdate,omitempty"` TransferFee []sdk.Coin `protobuf:"bytes,11,rep,name=transferFee,proto3" json:"transferFee"` // The percentage of a trade sale retained by the cookbook owner. In the range (0.0, 1.0). TradePercentage sdk.Dec `protobuf:"bytes,12,opt,name=tradePercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"tradePercentage"` }
type ItemInput ¶
type ItemInput struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Doubles []DoubleInputParam `protobuf:"bytes,2,rep,name=doubles,proto3" json:"doubles"` Longs []LongInputParam `protobuf:"bytes,3,rep,name=longs,proto3" json:"longs"` Strings []StringInputParam `protobuf:"bytes,4,rep,name=strings,proto3" json:"strings"` }
ItemInput is a struct for describing an input item
type ItemModifyOutput ¶
type ItemModifyOutput struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ItemInputRef string `protobuf:"bytes,2,opt,name=itemInputRef,proto3" json:"itemInputRef,omitempty"` Doubles []DoubleParam `protobuf:"bytes,3,rep,name=doubles,proto3" json:"doubles"` Longs []LongParam `protobuf:"bytes,4,rep,name=longs,proto3" json:"longs"` Strings []StringParam `protobuf:"bytes,5,rep,name=strings,proto3" json:"strings"` // defines a list of mutable strings whose value can be customized by the user MutableStrings []StringKeyValue `protobuf:"bytes,6,rep,name=mutableStrings,proto3" json:"mutableStrings"` TransferFee []sdk.Coin `protobuf:"bytes,7,rep,name=transferFee,proto3" json:"transferFee"` // The percentage of a trade sale retained by the cookbook owner. In the range (0.0, 1.0). TradePercentage sdk.Dec `protobuf:"bytes,8,opt,name=tradePercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"tradePercentage"` // quantity defines the maximum amount of these items that can be created. A 0 value indicates an infinite supply Quantity uint64 `protobuf:"varint,9,opt,name=quantity,proto3" json:"quantity,omitempty"` AmountMinted uint64 `protobuf:"varint,10,opt,name=amountMinted,proto3" json:"amountMinted,omitempty"` Tradeable bool `protobuf:"varint,11,opt,name=tradeable,proto3" json:"tradeable,omitempty"` }
ItemModifyOutput describes what is modified from item input
type ItemOutput ¶
type ItemOutput struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Doubles []DoubleParam `protobuf:"bytes,2,rep,name=doubles,proto3" json:"doubles"` Longs []LongParam `protobuf:"bytes,3,rep,name=longs,proto3" json:"longs"` Strings []StringParam `protobuf:"bytes,4,rep,name=strings,proto3" json:"strings"` // defines a list of mutable strings whose value can be customized by the user MutableStrings []StringKeyValue `protobuf:"bytes,5,rep,name=mutableStrings,proto3" json:"mutableStrings"` TransferFee []sdk.Coin `protobuf:"bytes,6,rep,name=transferFee,proto3" json:"transferFee"` // The percentage of a trade sale retained by the cookbook owner. In the range (0.0, 1.0). TradePercentage sdk.Dec `protobuf:"bytes,7,opt,name=tradePercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"tradePercentage"` // quantity defines the maximum amount of these items that can be created. A 0 value indicates an infinite supply Quantity uint64 `protobuf:"varint,8,opt,name=quantity,proto3" json:"quantity,omitempty"` AmountMinted uint64 `protobuf:"varint,9,opt,name=amountMinted,proto3" json:"amountMinted,omitempty"` Tradeable bool `protobuf:"varint,10,opt,name=tradeable,proto3" json:"tradeable,omitempty"` }
ItemOutput models the continuum of valid outcomes for item generation in recipes
type ItemRecord ¶
type ItemRecord struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Doubles []DoubleKeyValue `protobuf:"bytes,2,rep,name=doubles,proto3" json:"doubles"` Longs []LongKeyValue `protobuf:"bytes,3,rep,name=longs,proto3" json:"longs"` Strings []StringKeyValue `protobuf:"bytes,4,rep,name=strings,proto3" json:"strings"` }
type LongInputParam ¶
type LongInputParam struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The minimum legal value of this parameter. MinValue int64 `protobuf:"varint,2,opt,name=minValue,proto3" json:"minValue,omitempty"` // The maximum legal value of this parameter. MaxValue int64 `protobuf:"varint,3,opt,name=maxValue,proto3" json:"maxValue,omitempty"` }
LongInputParam describes the bounds on an item input/output parameter of type int64
type LongKeyValue ¶
type LongParam ¶
type LongParam struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` WeightRanges []IntWeightRange `protobuf:"bytes,2,rep,name=weightRanges,proto3" json:"weightRanges"` // When program is not empty, weightRanges is ignored Program string `protobuf:"bytes,3,opt,name=program,proto3" json:"program,omitempty"` }
LongParam describes the bounds on an item input/output parameter of type int64
type MintParams ¶
MintParams represents the x/mint parameters
func NewMintParams ¶
func NewMintParams(params minttypes.Params, height int64) *MintParams
NewMintParams allows to build a new MintParams instance
type Proposal ¶
type Proposal struct { ProposalRoute string ProposalType string ProposalID uint64 Content govtypes.Content Status string SubmitTime time.Time DepositEndTime time.Time VotingStartTime time.Time VotingEndTime time.Time Proposer string }
Proposal represents a single governance proposal
func NewProposal ¶
func NewProposal( proposalID uint64, proposalRoute string, proposalType string, content govtypes.Content, status string, submitTime time.Time, depositEndTime time.Time, votingStartTime time.Time, votingEndTime time.Time, proposer string, ) Proposal
NewProposal return a new Proposal instance
type ProposalStakingPoolSnapshot ¶
ProposalStakingPoolSnapshot contains the data about a single staking pool snapshot to be associated with a proposal
func NewProposalStakingPoolSnapshot ¶
func NewProposalStakingPoolSnapshot(proposalID uint64, pool *Pool) ProposalStakingPoolSnapshot
NewProposalStakingPoolSnapshot returns a new ProposalStakingPoolSnapshot instance
type ProposalUpdate ¶
type ProposalUpdate struct { ProposalID uint64 Status string VotingStartTime time.Time VotingEndTime time.Time }
ProposalUpdate contains the data that should be used when updating a governance proposal
func NewProposalUpdate ¶
func NewProposalUpdate( proposalID uint64, status string, votingStartTime, votingEndTime time.Time, ) ProposalUpdate
NewProposalUpdate allows to build a new ProposalUpdate instance
type ProposalValidatorStatusSnapshot ¶
type ProposalValidatorStatusSnapshot struct { ProposalID uint64 ValidatorConsAddress string ValidatorVotingPower int64 ValidatorStatus int ValidatorJailed bool Height int64 }
ProposalValidatorStatusSnapshot represents a single snapshot of the status of a validator associated with a single proposal
func NewProposalValidatorStatusSnapshot ¶
func NewProposalValidatorStatusSnapshot( proposalID uint64, validatorConsAddr string, validatorVotingPower int64, validatorStatus int, validatorJailed bool, height int64, ) ProposalValidatorStatusSnapshot
NewProposalValidatorStatusSnapshot returns a new ProposalValidatorStatusSnapshot instance
type Recipe ¶
type Recipe struct { CookbookID string `protobuf:"bytes,1,opt,name=cookbookID,proto3" json:"cookbookID,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` NodeVersion uint64 `protobuf:"varint,3,opt,name=nodeVersion,proto3" json:"nodeVersion,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` CoinInputs []CoinInput `protobuf:"bytes,7,rep,name=coinInputs,proto3" json:"coinInputs"` ItemInputs []ItemInput `protobuf:"bytes,8,rep,name=itemInputs,proto3" json:"itemInputs"` Entries EntriesList `protobuf:"bytes,9,opt,name=entries,proto3" json:"entries"` Outputs []WeightedOutputs `protobuf:"bytes,10,rep,name=outputs,proto3" json:"outputs"` BlockInterval int64 `protobuf:"varint,11,opt,name=blockInterval,proto3" json:"blockInterval,omitempty"` CostPerBlock sdk.Coin `protobuf:"bytes,12,opt,name=costPerBlock,proto3" json:"costPerBlock"` Enabled bool `protobuf:"varint,13,opt,name=enabled,proto3" json:"enabled,omitempty"` ExtraInfo string `protobuf:"bytes,14,opt,name=extraInfo,proto3" json:"extraInfo,omitempty"` }
type Redelegation ¶
type Redelegation struct { DelegatorAddress string SrcValidator string DstValidator string Amount sdk.Coin CompletionTime time.Time Height int64 }
Redelegation represents a single re-delegations
func NewRedelegation ¶
func NewRedelegation( delegator string, srcValidator, dstValidator string, amount sdk.Coin, completionTime time.Time, height int64, ) Redelegation
NewRedelegation build a new Redelegation object
func (Redelegation) Equal ¶
func (r Redelegation) Equal(s Redelegation) bool
Equal returns true iff r and s contain the same data
type SlashingParams ¶
type SlashingParams struct { slashingtypes.Params Height int64 }
SlashingParams represents the parameters of the slashing module at a given height
func NewSlashingParams ¶
func NewSlashingParams(params slashingtypes.Params, height int64) *SlashingParams
NewSlashingParams allows to build a new SlashingParams instance
type StakingParams ¶
type StakingParams struct { stakingtypes.Params Height int64 }
StakingParams represents the parameters of the x/staking module
func NewStakingParams ¶
func NewStakingParams(params stakingtypes.Params, height int64) StakingParams
NewStakingParams returns a new StakingParams instance
type StringInputParam ¶
type StringInputParam struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The value of the parameter Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
StringInputParam describes the bounds on an item input/output parameter of type string
type StringKeyValue ¶
type StringKeyValue struct { Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` }
StringKeyValue describes string key/value set
type StringParam ¶
type StringParam struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // When program is not empty, value is ignored Program string `protobuf:"bytes,3,opt,name=program,proto3" json:"program,omitempty"` }
StringParam describes an item input/output parameter of type string
type TallyParams ¶
type TallyParams struct { Quorum sdk.Dec `json:"quorum,omitempty"` Threshold sdk.Dec `json:"threshold,omitempty"` VetoThreshold sdk.Dec `json:"veto_threshold,omitempty" yaml:"veto_threshold"` }
TallyParams contains the tally parameters of the x/gov module
func NewTallyParams ¶
func NewTallyParams(t govtypes.TallyParams) TallyParams
NewTallyParams allows to build a new TallyParams instance
type TallyResult ¶
type TallyResult struct { ProposalID uint64 Yes string Abstain string No string NoWithVeto string Height int64 }
TallyResult contains the data about the final results of a proposal
func NewTallyResult ¶
func NewTallyResult( proposalID uint64, yes string, abstain string, no string, noWithVeto string, height int64, ) TallyResult
NewTallyResult return a new TallyResult instance
type TokenPrice ¶
TokenPrice represents the price at a given moment in time of a token unit
func NewTokenPrice ¶
NewTokenPrice returns a new TokenPrice instance containing the given data
type TokenUnit ¶
type TokenUnit struct { Denom string `yaml:"denom"` Exponent int `yaml:"exponent"` Aliases []string `yaml:"aliases,omitempty"` PriceID string `yaml:"price_id,omitempty"` }
TokenUnit represents a unit of a token
type UnbondingDelegation ¶
type UnbondingDelegation struct { DelegatorAddress string ValidatorOperAddr string Amount sdk.Coin CompletionTimestamp time.Time Height int64 }
UnbondingDelegation represents a single unbonding delegation
func NewUnbondingDelegation ¶
func NewUnbondingDelegation( delegator string, validatorOperAddr string, amount sdk.Coin, completionTimestamp time.Time, height int64, ) UnbondingDelegation
NewUnbondingDelegation allows to create a new UnbondingDelegation instance
func (UnbondingDelegation) Equal ¶
func (u UnbondingDelegation) Equal(v UnbondingDelegation) bool
Equal returns true iff u and v contain the same data
type Validator ¶
type Validator interface { GetConsAddr() string GetConsPubKey() string GetOperator() string GetSelfDelegateAddress() string GetMaxChangeRate() *sdk.Dec GetMaxRate() *sdk.Dec GetHeight() int64 }
Validator represents a single validator. This is defined as an interface so that we can use the SDK types as well as database types properly.
type ValidatorCommission ¶
type ValidatorCommission struct { ValAddress string Commission *sdk.Dec MinSelfDelegation *sdk.Int Height int64 }
ValidatorCommission contains the data of a validator commission at a given height
func NewValidatorCommission ¶
func NewValidatorCommission( valAddress string, rate *sdk.Dec, minSelfDelegation *sdk.Int, height int64, ) ValidatorCommission
NewValidatorCommission return a new validator commission instance
type ValidatorCommissionAmount ¶
type ValidatorCommissionAmount struct { ValidatorOperAddr string ValidatorSelfDelegateAddr string Amount []sdk.DecCoin Height int64 }
ValidatorCommissionAmount represents the commission amount for a specific validator
func NewValidatorCommissionAmount ¶
func NewValidatorCommissionAmount( valOperAddr, valSelfDelegateAddress string, amount sdk.DecCoins, height int64, ) ValidatorCommissionAmount
NewValidatorCommissionAmount allows to build a new ValidatorCommissionAmount instance
type ValidatorDescription ¶
type ValidatorDescription struct { OperatorAddress string Description stakingtypes.Description AvatarURL string // URL of the avatar to be used. Will be [do-no-modify] if it shouldn't be edited Height int64 }
ValidatorDescription contains the description of a validator and timestamp do the description get changed
func NewValidatorDescription ¶
func NewValidatorDescription( opAddr string, description stakingtypes.Description, avatarURL string, height int64, ) ValidatorDescription
NewValidatorDescription return a new ValidatorDescription object
type ValidatorSigningInfo ¶
type ValidatorSigningInfo struct { ValidatorAddress string StartHeight int64 IndexOffset int64 JailedUntil time.Time Tombstoned bool MissedBlocksCounter int64 Height int64 }
ValidatorSigningInfo contains the signing info of a validator at a given height
func NewValidatorSigningInfo ¶
func NewValidatorSigningInfo( validatorAddress string, startHeight int64, indexOffset int64, jailedUntil time.Time, tombstoned bool, missedBlocksCounter int64, height int64, ) ValidatorSigningInfo
ValidatorSigningInfo allows to build a new ValidatorSigningInfo
func (ValidatorSigningInfo) Equal ¶
func (v ValidatorSigningInfo) Equal(w ValidatorSigningInfo) bool
Equal tells whether v and w represent the same rows
type ValidatorStatus ¶
type ValidatorStatus struct { ConsensusAddress string ConsensusPubKey string Status int Jailed bool Tombstoned bool Height int64 }
ValidatorStatus represents the current state for the specified validator at the specific height
func NewValidatorStatus ¶
func NewValidatorStatus(valConsAddr, pubKey string, status int, jailed bool, tombstoned bool, height int64) ValidatorStatus
NewValidatorStatus creates a new ValidatorVotingPower
type ValidatorVotingPower ¶
ValidatorVotingPower represents the voting power of a validator at a specific block height
func NewValidatorVotingPower ¶
func NewValidatorVotingPower(address string, votingPower int64, height int64) ValidatorVotingPower
NewValidatorVotingPower creates a new ValidatorVotingPower
type Vote ¶
type Vote struct { ProposalID uint64 Voter string Option govtypes.VoteOption Height int64 }
Vote contains the data of a single proposal vote
type VotingParams ¶
type VotingParams struct {
VotingPeriod int64 `json:"voting_period,omitempty" yaml:"voting_period"`
}
VotingParams contains the voting parameters of the x/gov module
func NewVotingParams ¶
func NewVotingParams(v govtypes.VotingParams) VotingParams
NewVotingParams allows to build a new VotingParams instance
type WeightedOutputs ¶
type WeightedOutputs struct { EntryIDs []string `protobuf:"bytes,1,rep,name=entryIDs,proto3" json:"entryIDs,omitempty"` Weight uint64 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` }
WeightedOutputs is to make structs which is using weight to be based on