Documentation ¶
Index ¶
- type AccAddress
- type Address
- type Balance
- type Dec
- type Delegation
- type DelegationResponse
- type Int
- type PageResponse
- type QueryDelegationResponse
- type QueryRedelegationsResponse
- type QueryUnbondingDelegationResponse
- type Redelegation
- type RedelegationEntry
- type RedelegationEntryResponse
- type RedelegationResponse
- type Tx
- type TxResponse
- type UnbondingDelegation
- type UnbondingDelegationEntry
- type ValAddress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccAddress ¶
type AccAddress = sdk.AccAddress
AccAddress is an alias to the AccAddress type from Cosmos-SDK.
type Dec ¶
type Dec struct {
// contains filtered or unexported fields
}
NOTE: never use new(Dec) or else we will panic unmarshalling into the nil embedded big.Int
type Delegation ¶
type Delegation struct { // delegator_address is the bech32-encoded address of the delegator. DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` // validator_address is the bech32-encoded address of the validator. ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` Shares Dec `protobuf:"bytes,3,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"shares"` }
Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator.
type DelegationResponse ¶
type DelegationResponse struct { Delegation Delegation `protobuf:"bytes,1,opt,name=delegation,proto3" json:"delegation"` Balance sdk.Coin `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"` }
DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses.
type PageResponse ¶
type PageResponse struct { // next_key is the key to be passed to PageRequest.key to // query the next page most efficiently. It will be empty if // there are no more results. NextKey []byte `protobuf:"bytes,1,opt,name=next_key,json=nextKey,proto3" json:"next_key,omitempty"` // total is total number of results available if PageRequest.count_total // was set, its value is undefined otherwise Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` }
PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest.
message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }
type QueryDelegationResponse ¶
type QueryDelegationResponse struct { // delegation_responses defines the delegation info of a delegation. DelegationResponse *DelegationResponse `protobuf:"bytes,1,opt,name=delegation_response,json=delegationResponse,proto3" json:"delegation_response,omitempty"` }
QueryDelegationResponse is response type for the Query/Delegation RPC method.
type QueryRedelegationsResponse ¶
type QueryRedelegationsResponse struct { RedelegationResponses []RedelegationResponse `protobuf:"bytes,1,rep,name=redelegation_responses,json=redelegationResponses,proto3" json:"redelegation_responses"` // pagination defines the pagination in the response. Pagination *PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryRedelegationsResponse is response type for the Query/Redelegations RPC method.
type QueryUnbondingDelegationResponse ¶
type QueryUnbondingDelegationResponse struct { // unbond defines the unbonding information of a delegation. Unbond UnbondingDelegation `protobuf:"bytes,1,opt,name=unbond,proto3" json:"unbond"` }
QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method.
type Redelegation ¶
type Redelegation struct { // delegator_address is the bech32-encoded address of the delegator. DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` // validator_src_address is the validator redelegation source operator address. ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty"` // validator_dst_address is the validator redelegation destination operator address. ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty"` // entries are the redelegation entries. Entries []RedelegationEntry `protobuf:"bytes,4,rep,name=entries,proto3" json:"entries"` }
Redelegation contains the list of a particular delegator's redelegating bonds from a particular source validator to a particular destination validator.
type RedelegationEntry ¶
type RedelegationEntry struct { // creation_height defines the height which the redelegation took place. CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` // completion_time defines the unix time for redelegation completion. CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"` // initial_balance defines the initial balance when redelegation started. InitialBalance Int `` /* 143-byte string literal not displayed */ SharesDst Dec `` /* 128-byte string literal not displayed */ }
RedelegationEntry defines a redelegation object with relevant metadata.
type RedelegationEntryResponse ¶
type RedelegationEntryResponse struct { RedelegationEntry RedelegationEntry `protobuf:"bytes,1,opt,name=redelegation_entry,json=redelegationEntry,proto3" json:"redelegation_entry"` Balance Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` }
RedelegationEntryResponse is equivalent to a RedelegationEntry except that it contains a balance in addition to shares which is more suitable for client responses.
type RedelegationResponse ¶
type RedelegationResponse struct { Redelegation Redelegation `protobuf:"bytes,1,opt,name=redelegation,proto3" json:"redelegation"` Entries []RedelegationEntryResponse `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"` }
RedelegationResponse is equivalent to a Redelegation except that its entries contain a balance in addition to shares which is more suitable for client responses.
type TxResponse ¶
type TxResponse = sdk.TxResponse
TxResponse is an alias to the TxResponse type from Cosmos-SDK.
type UnbondingDelegation ¶
type UnbondingDelegation struct { // delegator_address is the bech32-encoded address of the delegator. DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` // validator_address is the bech32-encoded address of the validator. ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // entries are the unbonding delegation entries. Entries []UnbondingDelegationEntry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries"` }
UnbondingDelegation stores all of a single delegator's unbonding bonds for a single validator in an time-ordered list.
type UnbondingDelegationEntry ¶
type UnbondingDelegationEntry struct { // creation_height is the height which the unbonding took place. CreationHeight int64 `protobuf:"varint,1,opt,name=creation_height,json=creationHeight,proto3" json:"creation_height,omitempty"` // completion_time is the unix time for unbonding completion. CompletionTime time.Time `protobuf:"bytes,2,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"` // initial_balance defines the tokens initially scheduled to receive at completion. InitialBalance Int `` /* 143-byte string literal not displayed */ // balance defines the tokens to receive at completion. Balance Int `protobuf:"bytes,4,opt,name=balance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"balance"` }
UnbondingDelegationEntry defines an unbonding object with relevant metadata.
type ValAddress ¶
type ValAddress = sdk.ValAddress
ValAddress is an alias to the ValAddress type from Cosmos-SDK.