types

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeCreateRewardsPlan    = "create_rewards_plan"
	EventTypeEditRewardsPlan      = "edit_rewards_plan"
	EventTypeSetWithdrawAddress   = "set_withdraw_address"
	EventTypeRewards              = "rewards"
	EventTypeCommission           = "commission"
	EventTypeWithdrawRewards      = "withdraw_rewards"
	EventTypeWithdrawCommission   = "withdraw_commission"
	EventTypeTerminateRewardsPlan = "terminate_rewards_plan"

	AttributeKeyRewardsPlanID      = "rewards_plan_id"
	AttributeKeyWithdrawAddress    = "withdraw_address"
	AttributeKeyDelegationType     = "delegation_type"
	AttributeKeyDelegationTargetID = "delegation_target_id"
	AttributeKeyRemainingRewards   = "remaining_rewards"

	// AttributeKeyAmountPerPool represents the amount of rewards per pool (per denom).
	// See https://github.com/initia-labs/initia/blob/v0.2.10/x/distribution/types/events.go#L3-L6
	// for the reference of these attributes.
	AttributeKeyAmountPerPool = "amount_per_pool"

	// AttributeKeyPool represents the rewards pool's name (denom). Note that
	// the meaning of the name "pool" is different from the restaking pool.
	AttributeKeyPool = "pool"
)
View Source
const (
	ModuleName = "rewards"
	StoreKey   = ModuleName

	// RewardsPoolName is the account name of global rewards pool where rewards
	// are moved from each rewards plan's rewards pool and distributed to
	// delegators later.
	RewardsPoolName = "rewards_pool"
)
View Source
const MaxRewardsPlanDescriptionLength = 1000

MaxRewardsPlanDescriptionLength is the maximum length of a rewards plan description.

View Source
const USDTicker = "USD"

Variables

View Source
var (
	ErrEmptyDelegationDistInfo = errors.Register(ModuleName, 2, "no delegation distribution info")
	ErrNoOperatorCommission    = errors.Register(ModuleName, 3, "no operator commission to withdraw")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ParamsKey = collections.NewPrefix(0x01)

	NextRewardsPlanIDKey           = collections.NewPrefix(0xa1)
	RewardsPlanKeyPrefix           = collections.NewPrefix(0xa2)
	LastRewardsAllocationTimeKey   = collections.NewPrefix(0xa3)
	DelegatorWithdrawAddrKeyPrefix = collections.NewPrefix(0xa4)

	PoolDelegatorStartingInfoKeyPrefix       = collections.NewPrefix(0xb1)
	PoolHistoricalRewardsKeyPrefix           = collections.NewPrefix(0xb2)
	PoolCurrentRewardsKeyPrefix              = collections.NewPrefix(0xb3)
	PoolOutstandingRewardsKeyPrefix          = collections.NewPrefix(0xb4)
	PoolServiceTotalDelegatorSharesKeyPrefix = collections.NewPrefix(0xb5)

	OperatorAccumulatedCommissionKeyPrefix = collections.NewPrefix(0xc1)
	OperatorDelegatorStartingInfoKeyPrefix = collections.NewPrefix(0xc2)
	OperatorHistoricalRewardsKeyPrefix     = collections.NewPrefix(0xc3)
	OperatorCurrentRewardsKeyPrefix        = collections.NewPrefix(0xc4)
	OperatorOutstandingRewardsKeyPrefix    = collections.NewPrefix(0xc5)

	ServiceDelegatorStartingInfoKeyPrefix = collections.NewPrefix(0xd1)
	ServiceHistoricalRewardsKeyPrefix     = collections.NewPrefix(0xd2)
	ServiceCurrentRewardsKeyPrefix        = collections.NewPrefix(0xd3)
	ServiceOutstandingRewardsKeyPrefix    = collections.NewPrefix(0xd4)
)
View Source
var (
	ErrInvalidLengthMessages        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessages          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthModels        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModels          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModels = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var AminoCdc = codec.NewLegacyAmino()

AminoCdc references the global x/rewards module codec. Note, the codec should ONLY be used in certain instances of tests and for JSON encoding as Amino is still used for that purpose.

The actual codec used for serialization should be provided to x/rewards and defined at the application level.

Functions

func GetRewardsPoolAddress

func GetRewardsPoolAddress(planID uint64) sdk.AccAddress

GetRewardsPoolAddress generates a rewards pool address from plan id.

func ParseRewardsPlanID

func ParseRewardsPlanID(value string) (uint64, error)

ParseRewardsPlanID tries parsing the given value as a rewards plan id

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
	HasAccount(ctx context.Context, addr sdk.AccAddress) bool
	SetAccount(ctx context.Context, acc sdk.AccountI)
	AddressCodec() address.Codec
	GetModuleAddress(moduleName string) sdk.AccAddress
	GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI
	SetModuleAccount(ctx context.Context, macc sdk.ModuleAccountI)
}

type AccumulatedCommission

type AccumulatedCommission struct {
	Commissions DecPools `protobuf:"bytes,1,rep,name=commissions,proto3,castrepeated=DecPools" json:"commissions"`
}

AccumulatedCommission represents accumulated commission for a delegation target kept as a running counter, can be withdrawn at any time.

func InitialAccumulatedCommission

func InitialAccumulatedCommission() AccumulatedCommission

InitialAccumulatedCommission returns the initial accumulated commission (zero)

func (*AccumulatedCommission) Descriptor

func (*AccumulatedCommission) Descriptor() ([]byte, []int)

func (*AccumulatedCommission) Marshal

func (m *AccumulatedCommission) Marshal() (dAtA []byte, err error)

func (*AccumulatedCommission) MarshalTo

func (m *AccumulatedCommission) MarshalTo(dAtA []byte) (int, error)

func (*AccumulatedCommission) MarshalToSizedBuffer

func (m *AccumulatedCommission) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccumulatedCommission) ProtoMessage

func (*AccumulatedCommission) ProtoMessage()

func (*AccumulatedCommission) Reset

func (m *AccumulatedCommission) Reset()

func (*AccumulatedCommission) Size

func (m *AccumulatedCommission) Size() (n int)

func (*AccumulatedCommission) String

func (m *AccumulatedCommission) String() string

func (*AccumulatedCommission) Unmarshal

func (m *AccumulatedCommission) Unmarshal(dAtA []byte) error

func (*AccumulatedCommission) XXX_DiscardUnknown

func (m *AccumulatedCommission) XXX_DiscardUnknown()

func (*AccumulatedCommission) XXX_Marshal

func (m *AccumulatedCommission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccumulatedCommission) XXX_Merge

func (m *AccumulatedCommission) XXX_Merge(src proto.Message)

func (*AccumulatedCommission) XXX_Size

func (m *AccumulatedCommission) XXX_Size() int

func (*AccumulatedCommission) XXX_Unmarshal

func (m *AccumulatedCommission) XXX_Unmarshal(b []byte) error

type AssetsKeeper

type AssetsKeeper interface {
	GetAsset(ctx context.Context, denom string) (assetstypes.Asset, error)
}

type BankKeeper

type BankKeeper interface {
	GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins
	SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx context.Context, moduleName string, addr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx context.Context, addr sdk.AccAddress, moduleName string, amt sdk.Coins) error
	BlockedAddr(addr sdk.AccAddress) bool
}

type CommunityPoolKeeper

type CommunityPoolKeeper interface {
	FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error
}

type CurrentRewards

type CurrentRewards struct {
	Rewards ServicePools `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=ServicePools" json:"rewards" yaml:"rewards"`
	Period  uint64       `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
}

CurrentRewards represents current rewards and current period for a delegation target kept as a running counter and incremented each block as long as the delegation target's tokens remain constant.

func NewCurrentRewards

func NewCurrentRewards(rewards ServicePools, period uint64) CurrentRewards

NewCurrentRewards creates a new current rewards

func (*CurrentRewards) Descriptor

func (*CurrentRewards) Descriptor() ([]byte, []int)

func (*CurrentRewards) Marshal

func (m *CurrentRewards) Marshal() (dAtA []byte, err error)

func (*CurrentRewards) MarshalTo

func (m *CurrentRewards) MarshalTo(dAtA []byte) (int, error)

func (*CurrentRewards) MarshalToSizedBuffer

func (m *CurrentRewards) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CurrentRewards) ProtoMessage

func (*CurrentRewards) ProtoMessage()

func (*CurrentRewards) Reset

func (m *CurrentRewards) Reset()

func (*CurrentRewards) Size

func (m *CurrentRewards) Size() (n int)

func (*CurrentRewards) String

func (m *CurrentRewards) String() string

func (*CurrentRewards) Unmarshal

func (m *CurrentRewards) Unmarshal(dAtA []byte) error

func (*CurrentRewards) XXX_DiscardUnknown

func (m *CurrentRewards) XXX_DiscardUnknown()

func (*CurrentRewards) XXX_Marshal

func (m *CurrentRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CurrentRewards) XXX_Merge

func (m *CurrentRewards) XXX_Merge(src proto.Message)

func (*CurrentRewards) XXX_Size

func (m *CurrentRewards) XXX_Size() int

func (*CurrentRewards) XXX_Unmarshal

func (m *CurrentRewards) XXX_Unmarshal(b []byte) error

type CurrentRewardsRecord

type CurrentRewardsRecord struct {
	// delegation_target_id is the ID of the delegation target.
	DelegationTargetID uint32 `protobuf:"varint,1,opt,name=delegation_target_id,json=delegationTargetId,proto3" json:"delegation_target_id,omitempty"`
	// rewards defines the current rewards of the delegation target.
	Rewards CurrentRewards `protobuf:"bytes,2,opt,name=rewards,proto3" json:"rewards"`
}

CurrentRewardsRecord is used for import / export via genesis json.

func (*CurrentRewardsRecord) Descriptor

func (*CurrentRewardsRecord) Descriptor() ([]byte, []int)

func (*CurrentRewardsRecord) Marshal

func (m *CurrentRewardsRecord) Marshal() (dAtA []byte, err error)

func (*CurrentRewardsRecord) MarshalTo

func (m *CurrentRewardsRecord) MarshalTo(dAtA []byte) (int, error)

func (*CurrentRewardsRecord) MarshalToSizedBuffer

func (m *CurrentRewardsRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CurrentRewardsRecord) ProtoMessage

func (*CurrentRewardsRecord) ProtoMessage()

func (*CurrentRewardsRecord) Reset

func (m *CurrentRewardsRecord) Reset()

func (*CurrentRewardsRecord) Size

func (m *CurrentRewardsRecord) Size() (n int)

func (*CurrentRewardsRecord) String

func (m *CurrentRewardsRecord) String() string

func (*CurrentRewardsRecord) Unmarshal

func (m *CurrentRewardsRecord) Unmarshal(dAtA []byte) error

func (*CurrentRewardsRecord) XXX_DiscardUnknown

func (m *CurrentRewardsRecord) XXX_DiscardUnknown()

func (*CurrentRewardsRecord) XXX_Marshal

func (m *CurrentRewardsRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CurrentRewardsRecord) XXX_Merge

func (m *CurrentRewardsRecord) XXX_Merge(src proto.Message)

func (*CurrentRewardsRecord) XXX_Size

func (m *CurrentRewardsRecord) XXX_Size() int

func (*CurrentRewardsRecord) XXX_Unmarshal

func (m *CurrentRewardsRecord) XXX_Unmarshal(b []byte) error

type DecPool

type DecPool struct {
	Denom    string                                      `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"`
	DecCoins github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 149-byte string literal not displayed */
}

DecPool is a DecCoins wrapper with denom which represents the rewards pool for the given denom. It is used to represent the rewards associated with the denom.

func NewDecPool

func NewDecPool(denom string, coins sdk.DecCoins) DecPool

NewDecPool return new pool instance

func (DecPool) Add

func (pool DecPool) Add(poolB DecPool) DecPool

Add adds amounts of two pool coins with same denom.

func (*DecPool) Descriptor

func (*DecPool) Descriptor() ([]byte, []int)

func (DecPool) IsEmpty

func (pool DecPool) IsEmpty() bool

IsEmpty returns wether the pool coins are empty or not

func (DecPool) IsEqual

func (pool DecPool) IsEqual(other DecPool) bool

IsEqual returns true if the two sets of DecPools have the same value.

func (*DecPool) Marshal

func (m *DecPool) Marshal() (dAtA []byte, err error)

func (*DecPool) MarshalTo

func (m *DecPool) MarshalTo(dAtA []byte) (int, error)

func (*DecPool) MarshalToSizedBuffer

func (m *DecPool) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DecPool) ProtoMessage

func (*DecPool) ProtoMessage()

func (*DecPool) Reset

func (m *DecPool) Reset()

func (*DecPool) Size

func (m *DecPool) Size() (n int)

func (*DecPool) String

func (m *DecPool) String() string

func (DecPool) Sub

func (pool DecPool) Sub(poolB DecPool) DecPool

Sub subtracts amounts of two pool coins with same denom.

func (DecPool) TruncateDecimal

func (pool DecPool) TruncateDecimal() (Pool, DecPool)

TruncateDecimal returns a DecPool with a DecPool for truncated decimal and a DecPool for the change. Note, the change may be zero.

func (*DecPool) Unmarshal

func (m *DecPool) Unmarshal(dAtA []byte) error

func (*DecPool) XXX_DiscardUnknown

func (m *DecPool) XXX_DiscardUnknown()

func (*DecPool) XXX_Marshal

func (m *DecPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DecPool) XXX_Merge

func (m *DecPool) XXX_Merge(src proto.Message)

func (*DecPool) XXX_Size

func (m *DecPool) XXX_Size() int

func (*DecPool) XXX_Unmarshal

func (m *DecPool) XXX_Unmarshal(b []byte) error

type DecPools

type DecPools []DecPool

DecPools defines denom and sdk.DecCoins wrapper to represents rewards pools for multi-token staking

func NewDecPoolsFromPools

func NewDecPoolsFromPools(pools Pools) DecPools

NewDecPoolsFromPools create DecPools from Pools

func (DecPools) Add

func (pools DecPools) Add(poolsB ...DecPool) DecPools

Add adds two sets of DecPools

func (DecPools) CoinsAmount

func (pools DecPools) CoinsAmount() sdk.DecCoins

CoinsAmount returns the total amount of coins in the DecPools

func (DecPools) CoinsOf

func (pools DecPools) CoinsOf(denom string) sdk.DecCoins

CoinsOf returns the Coins of a denom from DecPools

func (DecPools) Intersect

func (pools DecPools) Intersect(poolsB DecPools) DecPools

Intersect will return a new set of pools which contains the minimum pool Coins for common denoms found in both `pools` and `poolsB`. For denoms not common to both `pools` and `poolsB` the minimum is considered to be 0, thus they are not added to the final set. In other words, trim any denom amount from pool which exceeds that of poolB, such that (pool.Intersect(poolB)).IsLTE(poolB).

func (DecPools) IsAnyNegative

func (pools DecPools) IsAnyNegative() bool

IsAnyNegative returns true if there is at least one coin whose amount is negative; returns false otherwise. It returns false if the DecPools set is empty too.

func (DecPools) IsEmpty

func (pools DecPools) IsEmpty() bool

IsZero returns whether all pools are empty

func (DecPools) IsEqual

func (pools DecPools) IsEqual(poolsB DecPools) bool

IsEqual returns true if the two sets of DecPools have the same value.

func (DecPools) Len

func (pools DecPools) Len() int

Len implements sort.Interface for DecPools

func (DecPools) Less

func (pools DecPools) Less(i, j int) bool

Less implements sort.Interface for DecPools

func (DecPools) SafeSub

func (pools DecPools) SafeSub(poolsB DecPools) (DecPools, bool)

SafeSub performs the same arithmetic as Sub but returns a boolean if any negative DecPool coins amount was returned.

func (DecPools) Sort

func (pools DecPools) Sort() DecPools

Sort is a helper function to sort the set of p in-place

func (DecPools) String

func (pools DecPools) String() string

String implements the Stringer interface for DecPools. It returns a human-readable representation of DecPools.

func (DecPools) Sub

func (pools DecPools) Sub(poolsB DecPools) DecPools

Sub subtracts a set of DecPools from another (adds the inverse).

func (DecPools) Sum

func (pools DecPools) Sum() (coins sdk.DecCoins)

Sum returns sum of pool tokens

func (DecPools) Swap

func (pools DecPools) Swap(i, j int)

Swap implements sort.Interface for DecPools

func (DecPools) TruncateDecimal

func (pools DecPools) TruncateDecimal() (truncatedDecPools Pools, changeDecPools DecPools)

TruncateDecimal returns the pools with truncated decimals and returns the change. Note, it will not return any zero-amount pools in either the truncated or change pools.

type DelegationDelegatorReward

type DelegationDelegatorReward struct {
	DelegationType     types1.DelegationType `` /* 146-byte string literal not displayed */
	DelegationTargetID uint32                `protobuf:"varint,2,opt,name=delegation_target_id,json=delegationTargetId,proto3" json:"delegation_target_id,omitempty"`
	Reward             DecPools              `protobuf:"bytes,3,rep,name=reward,proto3,castrepeated=DecPools" json:"reward"`
}

DelegationDelegatorReward represents the properties of a delegator's delegation reward. The delegator address implicit in the within the query request.

func NewDelegationDelegatorReward

func NewDelegationDelegatorReward(
	delType restakingtypes.DelegationType, targetID uint32, rewards DecPools,
) DelegationDelegatorReward

NewDelegationDelegatorReward creates a new delegation delegator reward

func (*DelegationDelegatorReward) Descriptor

func (*DelegationDelegatorReward) Descriptor() ([]byte, []int)

func (*DelegationDelegatorReward) Marshal

func (m *DelegationDelegatorReward) Marshal() (dAtA []byte, err error)

func (*DelegationDelegatorReward) MarshalTo

func (m *DelegationDelegatorReward) MarshalTo(dAtA []byte) (int, error)

func (*DelegationDelegatorReward) MarshalToSizedBuffer

func (m *DelegationDelegatorReward) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DelegationDelegatorReward) ProtoMessage

func (*DelegationDelegatorReward) ProtoMessage()

func (*DelegationDelegatorReward) Reset

func (m *DelegationDelegatorReward) Reset()

func (*DelegationDelegatorReward) Size

func (m *DelegationDelegatorReward) Size() (n int)

func (*DelegationDelegatorReward) String

func (m *DelegationDelegatorReward) String() string

func (*DelegationDelegatorReward) Unmarshal

func (m *DelegationDelegatorReward) Unmarshal(dAtA []byte) error

func (*DelegationDelegatorReward) XXX_DiscardUnknown

func (m *DelegationDelegatorReward) XXX_DiscardUnknown()

func (*DelegationDelegatorReward) XXX_Marshal

func (m *DelegationDelegatorReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DelegationDelegatorReward) XXX_Merge

func (m *DelegationDelegatorReward) XXX_Merge(src proto.Message)

func (*DelegationDelegatorReward) XXX_Size

func (m *DelegationDelegatorReward) XXX_Size() int

func (*DelegationDelegatorReward) XXX_Unmarshal

func (m *DelegationDelegatorReward) XXX_Unmarshal(b []byte) error

type DelegationTypeRecords

type DelegationTypeRecords struct {
	// outstanding_rewards defines the outstanding rewards of all delegation
	// targets with the same delegation type at genesis.
	OutstandingRewards []OutstandingRewardsRecord `protobuf:"bytes,1,rep,name=outstanding_rewards,json=outstandingRewards,proto3" json:"outstanding_rewards"`
	// historical_rewards defines the historical rewards of all delegation targets
	// with the same delegation type at genesis.
	HistoricalRewards []HistoricalRewardsRecord `protobuf:"bytes,2,rep,name=historical_rewards,json=historicalRewards,proto3" json:"historical_rewards"`
	// current_rewards defines the current rewards of all delegation targets with
	// the same delegation type at genesis.
	CurrentRewards []CurrentRewardsRecord `protobuf:"bytes,3,rep,name=current_rewards,json=currentRewards,proto3" json:"current_rewards"`
	// delegator_starting_infos defines the delegator starting infos of all
	// delegation targets with the same delegation type at genesis.
	DelegatorStartingInfos []DelegatorStartingInfoRecord `protobuf:"bytes,4,rep,name=delegator_starting_infos,json=delegatorStartingInfos,proto3" json:"delegator_starting_infos"`
}

DelegationTypeRecords groups various genesis records under the same type of delegation target.

func NewDelegationTypeRecords

func NewDelegationTypeRecords(
	outstandingRewards []OutstandingRewardsRecord, historicalRewards []HistoricalRewardsRecord,
	currentRewards []CurrentRewardsRecord, delegatorStartingInfos []DelegatorStartingInfoRecord,
) DelegationTypeRecords

func (*DelegationTypeRecords) Descriptor

func (*DelegationTypeRecords) Descriptor() ([]byte, []int)

func (*DelegationTypeRecords) GetCurrentRewards

func (m *DelegationTypeRecords) GetCurrentRewards() []CurrentRewardsRecord

func (*DelegationTypeRecords) GetDelegatorStartingInfos

func (m *DelegationTypeRecords) GetDelegatorStartingInfos() []DelegatorStartingInfoRecord

func (*DelegationTypeRecords) GetHistoricalRewards

func (m *DelegationTypeRecords) GetHistoricalRewards() []HistoricalRewardsRecord

func (*DelegationTypeRecords) GetOutstandingRewards

func (m *DelegationTypeRecords) GetOutstandingRewards() []OutstandingRewardsRecord

func (*DelegationTypeRecords) Marshal

func (m *DelegationTypeRecords) Marshal() (dAtA []byte, err error)

func (*DelegationTypeRecords) MarshalTo

func (m *DelegationTypeRecords) MarshalTo(dAtA []byte) (int, error)

func (*DelegationTypeRecords) MarshalToSizedBuffer

func (m *DelegationTypeRecords) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DelegationTypeRecords) ProtoMessage

func (*DelegationTypeRecords) ProtoMessage()

func (*DelegationTypeRecords) Reset

func (m *DelegationTypeRecords) Reset()

func (*DelegationTypeRecords) Size

func (m *DelegationTypeRecords) Size() (n int)

func (*DelegationTypeRecords) String

func (m *DelegationTypeRecords) String() string

func (*DelegationTypeRecords) Unmarshal

func (m *DelegationTypeRecords) Unmarshal(dAtA []byte) error

func (*DelegationTypeRecords) XXX_DiscardUnknown

func (m *DelegationTypeRecords) XXX_DiscardUnknown()

func (*DelegationTypeRecords) XXX_Marshal

func (m *DelegationTypeRecords) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DelegationTypeRecords) XXX_Merge

func (m *DelegationTypeRecords) XXX_Merge(src proto.Message)

func (*DelegationTypeRecords) XXX_Size

func (m *DelegationTypeRecords) XXX_Size() int

func (*DelegationTypeRecords) XXX_Unmarshal

func (m *DelegationTypeRecords) XXX_Unmarshal(b []byte) error

type DelegatorStartingInfo

type DelegatorStartingInfo struct {
	PreviousPeriod uint64                                      `` /* 127-byte string literal not displayed */
	Stakes         github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 126-byte string literal not displayed */
	Height         uint64                                      `protobuf:"varint,3,opt,name=height,proto3" json:"creation_height" yaml:"creation_height"`
}

DelegatorStartingInfo represents the starting info for a delegator reward period. It tracks the previous delegation target period, the delegation's amount of staking token, and the creation height (to check later on if any slashes have occurred). NOTE: Even though validators are slashed to whole staking tokens, the delegators within the validator may be left with less than a full token, thus sdk.Dec is used.

func NewDelegatorStartingInfo

func NewDelegatorStartingInfo(previousPeriod uint64, stakes sdk.DecCoins, height uint64) DelegatorStartingInfo

NewDelegatorStartingInfo creates a new delegator starting info

func (*DelegatorStartingInfo) Descriptor

func (*DelegatorStartingInfo) Descriptor() ([]byte, []int)

func (*DelegatorStartingInfo) Marshal

func (m *DelegatorStartingInfo) Marshal() (dAtA []byte, err error)

func (*DelegatorStartingInfo) MarshalTo

func (m *DelegatorStartingInfo) MarshalTo(dAtA []byte) (int, error)

func (*DelegatorStartingInfo) MarshalToSizedBuffer

func (m *DelegatorStartingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DelegatorStartingInfo) ProtoMessage

func (*DelegatorStartingInfo) ProtoMessage()

func (*DelegatorStartingInfo) Reset

func (m *DelegatorStartingInfo) Reset()

func (*DelegatorStartingInfo) Size

func (m *DelegatorStartingInfo) Size() (n int)

func (*DelegatorStartingInfo) String

func (m *DelegatorStartingInfo) String() string

func (*DelegatorStartingInfo) Unmarshal

func (m *DelegatorStartingInfo) Unmarshal(dAtA []byte) error

func (*DelegatorStartingInfo) XXX_DiscardUnknown

func (m *DelegatorStartingInfo) XXX_DiscardUnknown()

func (*DelegatorStartingInfo) XXX_Marshal

func (m *DelegatorStartingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DelegatorStartingInfo) XXX_Merge

func (m *DelegatorStartingInfo) XXX_Merge(src proto.Message)

func (*DelegatorStartingInfo) XXX_Size

func (m *DelegatorStartingInfo) XXX_Size() int

func (*DelegatorStartingInfo) XXX_Unmarshal

func (m *DelegatorStartingInfo) XXX_Unmarshal(b []byte) error

type DelegatorStartingInfoRecord

type DelegatorStartingInfoRecord struct {
	// delegator_address is the address of the delegator.
	DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"`
	// delegation_target_id is the ID of the delegation target.
	DelegationTargetID uint32 `protobuf:"varint,2,opt,name=delegation_target_id,json=delegationTargetId,proto3" json:"delegation_target_id,omitempty"`
	// starting_info defines the starting info of a delegator.
	StartingInfo DelegatorStartingInfo `protobuf:"bytes,3,opt,name=starting_info,json=startingInfo,proto3" json:"starting_info"`
}

DelegatorStartingInfoRecord used for import / export via genesis json.

func (*DelegatorStartingInfoRecord) Descriptor

func (*DelegatorStartingInfoRecord) Descriptor() ([]byte, []int)

func (*DelegatorStartingInfoRecord) Marshal

func (m *DelegatorStartingInfoRecord) Marshal() (dAtA []byte, err error)

func (*DelegatorStartingInfoRecord) MarshalTo

func (m *DelegatorStartingInfoRecord) MarshalTo(dAtA []byte) (int, error)

func (*DelegatorStartingInfoRecord) MarshalToSizedBuffer

func (m *DelegatorStartingInfoRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DelegatorStartingInfoRecord) ProtoMessage

func (*DelegatorStartingInfoRecord) ProtoMessage()

func (*DelegatorStartingInfoRecord) Reset

func (m *DelegatorStartingInfoRecord) Reset()

func (*DelegatorStartingInfoRecord) Size

func (m *DelegatorStartingInfoRecord) Size() (n int)

func (*DelegatorStartingInfoRecord) String

func (m *DelegatorStartingInfoRecord) String() string

func (*DelegatorStartingInfoRecord) Unmarshal

func (m *DelegatorStartingInfoRecord) Unmarshal(dAtA []byte) error

func (*DelegatorStartingInfoRecord) XXX_DiscardUnknown

func (m *DelegatorStartingInfoRecord) XXX_DiscardUnknown()

func (*DelegatorStartingInfoRecord) XXX_Marshal

func (m *DelegatorStartingInfoRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DelegatorStartingInfoRecord) XXX_Merge

func (m *DelegatorStartingInfoRecord) XXX_Merge(src proto.Message)

func (*DelegatorStartingInfoRecord) XXX_Size

func (m *DelegatorStartingInfoRecord) XXX_Size() int

func (*DelegatorStartingInfoRecord) XXX_Unmarshal

func (m *DelegatorStartingInfoRecord) XXX_Unmarshal(b []byte) error

type DelegatorWithdrawInfo

type DelegatorWithdrawInfo struct {
	// delegator_address is the address of the delegator.
	DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"`
	// withdraw_address is the address to withdraw the delegation rewards to.
	WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"`
}

DelegatorWithdrawInfo is the address for where delegation rewards are withdrawn to by default this struct is only used at genesis to feed in default withdraw addresses.

func (*DelegatorWithdrawInfo) Descriptor

func (*DelegatorWithdrawInfo) Descriptor() ([]byte, []int)

func (*DelegatorWithdrawInfo) Marshal

func (m *DelegatorWithdrawInfo) Marshal() (dAtA []byte, err error)

func (*DelegatorWithdrawInfo) MarshalTo

func (m *DelegatorWithdrawInfo) MarshalTo(dAtA []byte) (int, error)

func (*DelegatorWithdrawInfo) MarshalToSizedBuffer

func (m *DelegatorWithdrawInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DelegatorWithdrawInfo) ProtoMessage

func (*DelegatorWithdrawInfo) ProtoMessage()

func (*DelegatorWithdrawInfo) Reset

func (m *DelegatorWithdrawInfo) Reset()

func (*DelegatorWithdrawInfo) Size

func (m *DelegatorWithdrawInfo) Size() (n int)

func (*DelegatorWithdrawInfo) String

func (m *DelegatorWithdrawInfo) String() string

func (*DelegatorWithdrawInfo) Unmarshal

func (m *DelegatorWithdrawInfo) Unmarshal(dAtA []byte) error

func (*DelegatorWithdrawInfo) XXX_DiscardUnknown

func (m *DelegatorWithdrawInfo) XXX_DiscardUnknown()

func (*DelegatorWithdrawInfo) XXX_Marshal

func (m *DelegatorWithdrawInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DelegatorWithdrawInfo) XXX_Merge

func (m *DelegatorWithdrawInfo) XXX_Merge(src proto.Message)

func (*DelegatorWithdrawInfo) XXX_Size

func (m *DelegatorWithdrawInfo) XXX_Size() int

func (*DelegatorWithdrawInfo) XXX_Unmarshal

func (m *DelegatorWithdrawInfo) XXX_Unmarshal(b []byte) error

type Distribution

type Distribution struct {
	// DelegationType is the type of delegation target which this distribution
	// parameters are for. It can be one of DELEGATION_TYPE_POOL and
	// DELEGATION_TYPE_OPERATOR.
	DelegationType types1.DelegationType `` /* 146-byte string literal not displayed */
	// Weight is the rewards distribution weight among other types of delegation
	// targets.
	Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"`
	// Type is one of basic/weighted/egalitarian distributions.
	Type *types2.Any `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}

Distribution represents distribution parameters for restaking pools/operators.

func NewBasicOperatorsDistribution

func NewBasicOperatorsDistribution(weight uint32) Distribution

NewBasicOperatorsDistribution creates a new basic operators distribution

func NewBasicPoolsDistribution

func NewBasicPoolsDistribution(weight uint32) Distribution

NewBasicPoolsDistribution creates a new basic pools distribution

func NewDistribution

func NewDistribution(delegationType restakingtypes.DelegationType, weight uint32, distributionType DistributionType) Distribution

NewDistribution creates a new distribution instance

func NewEgalitarianOperatorsDistribution

func NewEgalitarianOperatorsDistribution(weight uint32) Distribution

NewEgalitarianOperatorsDistribution creates a new egalitarian operators distribution

func NewEgalitarianPoolsDistribution

func NewEgalitarianPoolsDistribution(weight uint32) Distribution

NewEgalitarianPoolsDistribution creates a new egalitarian pools distribution

func NewWeightedOperatorsDistribution

func NewWeightedOperatorsDistribution(weight uint32, weights []DistributionWeight) Distribution

NewWeightedOperatorsDistribution creates a new weighted operators distribution

func NewWeightedPoolsDistribution

func NewWeightedPoolsDistribution(weight uint32, weights []DistributionWeight) Distribution

NewWeightedPoolsDistribution creates a new weighted pools distribution

func (*Distribution) Descriptor

func (*Distribution) Descriptor() ([]byte, []int)

func (*Distribution) Equal

func (this *Distribution) Equal(that interface{}) bool

func (*Distribution) Marshal

func (m *Distribution) Marshal() (dAtA []byte, err error)

func (*Distribution) MarshalTo

func (m *Distribution) MarshalTo(dAtA []byte) (int, error)

func (*Distribution) MarshalToSizedBuffer

func (m *Distribution) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Distribution) ProtoMessage

func (*Distribution) ProtoMessage()

func (*Distribution) Reset

func (m *Distribution) Reset()

func (*Distribution) Size

func (m *Distribution) Size() (n int)

func (*Distribution) String

func (m *Distribution) String() string

func (*Distribution) Unmarshal

func (m *Distribution) Unmarshal(dAtA []byte) error

func (*Distribution) UnpackInterfaces

func (d *Distribution) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements codectypes.UnpackInterfacesMessage

func (*Distribution) XXX_DiscardUnknown

func (m *Distribution) XXX_DiscardUnknown()

func (*Distribution) XXX_Marshal

func (m *Distribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Distribution) XXX_Merge

func (m *Distribution) XXX_Merge(src proto.Message)

func (*Distribution) XXX_Size

func (m *Distribution) XXX_Size() int

func (*Distribution) XXX_Unmarshal

func (m *Distribution) XXX_Unmarshal(b []byte) error

type DistributionType

type DistributionType interface {
	proto.Message

	Validate() error
	// contains filtered or unexported methods
}

DistributionType represents a generic distribution type

func GetDistributionType

func GetDistributionType(unpacker codectypes.AnyUnpacker, distr Distribution) (DistributionType, error)

GetDistributionType returns the distribution type from the distribution

type DistributionTypeBasic

type DistributionTypeBasic struct {
}

DistributionTypeBasic represents the simplest form of distribution. Rewards are allocated to entities based on their delegation values. For example, if there are three operators with delegation values of $1000, $1500, and $2000, their rewards will be distributed in a 2:3:4 ratio.

func (*DistributionTypeBasic) Descriptor

func (*DistributionTypeBasic) Descriptor() ([]byte, []int)

func (*DistributionTypeBasic) Marshal

func (m *DistributionTypeBasic) Marshal() (dAtA []byte, err error)

func (*DistributionTypeBasic) MarshalTo

func (m *DistributionTypeBasic) MarshalTo(dAtA []byte) (int, error)

func (*DistributionTypeBasic) MarshalToSizedBuffer

func (m *DistributionTypeBasic) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DistributionTypeBasic) ProtoMessage

func (*DistributionTypeBasic) ProtoMessage()

func (*DistributionTypeBasic) Reset

func (m *DistributionTypeBasic) Reset()

func (*DistributionTypeBasic) Size

func (m *DistributionTypeBasic) Size() (n int)

func (*DistributionTypeBasic) String

func (m *DistributionTypeBasic) String() string

func (*DistributionTypeBasic) Unmarshal

func (m *DistributionTypeBasic) Unmarshal(dAtA []byte) error

func (DistributionTypeBasic) Validate

func (t DistributionTypeBasic) Validate() error

Validate checks the distribution for validity

func (*DistributionTypeBasic) XXX_DiscardUnknown

func (m *DistributionTypeBasic) XXX_DiscardUnknown()

func (*DistributionTypeBasic) XXX_Marshal

func (m *DistributionTypeBasic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DistributionTypeBasic) XXX_Merge

func (m *DistributionTypeBasic) XXX_Merge(src proto.Message)

func (*DistributionTypeBasic) XXX_Size

func (m *DistributionTypeBasic) XXX_Size() int

func (*DistributionTypeBasic) XXX_Unmarshal

func (m *DistributionTypeBasic) XXX_Unmarshal(b []byte) error

type DistributionTypeEgalitarian

type DistributionTypeEgalitarian struct {
}

DistributionTypeEgalitarian is a distribution method where all entities receive an equal share of rewards(a.k.a. egalitarian method).

func (*DistributionTypeEgalitarian) Descriptor

func (*DistributionTypeEgalitarian) Descriptor() ([]byte, []int)

func (*DistributionTypeEgalitarian) Marshal

func (m *DistributionTypeEgalitarian) Marshal() (dAtA []byte, err error)

func (*DistributionTypeEgalitarian) MarshalTo

func (m *DistributionTypeEgalitarian) MarshalTo(dAtA []byte) (int, error)

func (*DistributionTypeEgalitarian) MarshalToSizedBuffer

func (m *DistributionTypeEgalitarian) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DistributionTypeEgalitarian) ProtoMessage

func (*DistributionTypeEgalitarian) ProtoMessage()

func (*DistributionTypeEgalitarian) Reset

func (m *DistributionTypeEgalitarian) Reset()

func (*DistributionTypeEgalitarian) Size

func (m *DistributionTypeEgalitarian) Size() (n int)

func (*DistributionTypeEgalitarian) String

func (m *DistributionTypeEgalitarian) String() string

func (*DistributionTypeEgalitarian) Unmarshal

func (m *DistributionTypeEgalitarian) Unmarshal(dAtA []byte) error

func (DistributionTypeEgalitarian) Validate

func (t DistributionTypeEgalitarian) Validate() error

Validate checks the distribution for validity

func (*DistributionTypeEgalitarian) XXX_DiscardUnknown

func (m *DistributionTypeEgalitarian) XXX_DiscardUnknown()

func (*DistributionTypeEgalitarian) XXX_Marshal

func (m *DistributionTypeEgalitarian) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DistributionTypeEgalitarian) XXX_Merge

func (m *DistributionTypeEgalitarian) XXX_Merge(src proto.Message)

func (*DistributionTypeEgalitarian) XXX_Size

func (m *DistributionTypeEgalitarian) XXX_Size() int

func (*DistributionTypeEgalitarian) XXX_Unmarshal

func (m *DistributionTypeEgalitarian) XXX_Unmarshal(b []byte) error

type DistributionTypeWeighted

type DistributionTypeWeighted struct {
	Weights []DistributionWeight `protobuf:"bytes,1,rep,name=weights,proto3" json:"weights"`
}

DistributionTypeWeighted is a type of distribution where the reward weights for each entity are explicitly defined. Only the specified delegation targets will receive rewards.

func (*DistributionTypeWeighted) Descriptor

func (*DistributionTypeWeighted) Descriptor() ([]byte, []int)

func (*DistributionTypeWeighted) Marshal

func (m *DistributionTypeWeighted) Marshal() (dAtA []byte, err error)

func (*DistributionTypeWeighted) MarshalTo

func (m *DistributionTypeWeighted) MarshalTo(dAtA []byte) (int, error)

func (*DistributionTypeWeighted) MarshalToSizedBuffer

func (m *DistributionTypeWeighted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DistributionTypeWeighted) ProtoMessage

func (*DistributionTypeWeighted) ProtoMessage()

func (*DistributionTypeWeighted) Reset

func (m *DistributionTypeWeighted) Reset()

func (*DistributionTypeWeighted) Size

func (m *DistributionTypeWeighted) Size() (n int)

func (*DistributionTypeWeighted) String

func (m *DistributionTypeWeighted) String() string

func (*DistributionTypeWeighted) Unmarshal

func (m *DistributionTypeWeighted) Unmarshal(dAtA []byte) error

func (DistributionTypeWeighted) Validate

func (t DistributionTypeWeighted) Validate() error

Validate checks the distribution for validity

func (*DistributionTypeWeighted) XXX_DiscardUnknown

func (m *DistributionTypeWeighted) XXX_DiscardUnknown()

func (*DistributionTypeWeighted) XXX_Marshal

func (m *DistributionTypeWeighted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DistributionTypeWeighted) XXX_Merge

func (m *DistributionTypeWeighted) XXX_Merge(src proto.Message)

func (*DistributionTypeWeighted) XXX_Size

func (m *DistributionTypeWeighted) XXX_Size() int

func (*DistributionTypeWeighted) XXX_Unmarshal

func (m *DistributionTypeWeighted) XXX_Unmarshal(b []byte) error

type DistributionWeight

type DistributionWeight struct {
	DelegationTargetID uint32 `protobuf:"varint,1,opt,name=delegation_target_id,json=delegationTargetId,proto3" json:"delegation_target_id,omitempty"`
	Weight             uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"`
}

DistributionWeight defines a delegation target and its assigned weight.

func NewDistributionWeight

func NewDistributionWeight(targetID, weight uint32) DistributionWeight

NewDistributionWeight creates a new distribution weight

func (*DistributionWeight) Descriptor

func (*DistributionWeight) Descriptor() ([]byte, []int)

func (*DistributionWeight) Marshal

func (m *DistributionWeight) Marshal() (dAtA []byte, err error)

func (*DistributionWeight) MarshalTo

func (m *DistributionWeight) MarshalTo(dAtA []byte) (int, error)

func (*DistributionWeight) MarshalToSizedBuffer

func (m *DistributionWeight) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DistributionWeight) ProtoMessage

func (*DistributionWeight) ProtoMessage()

func (*DistributionWeight) Reset

func (m *DistributionWeight) Reset()

func (*DistributionWeight) Size

func (m *DistributionWeight) Size() (n int)

func (*DistributionWeight) String

func (m *DistributionWeight) String() string

func (*DistributionWeight) Unmarshal

func (m *DistributionWeight) Unmarshal(dAtA []byte) error

func (*DistributionWeight) XXX_DiscardUnknown

func (m *DistributionWeight) XXX_DiscardUnknown()

func (*DistributionWeight) XXX_Marshal

func (m *DistributionWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DistributionWeight) XXX_Merge

func (m *DistributionWeight) XXX_Merge(src proto.Message)

func (*DistributionWeight) XXX_Size

func (m *DistributionWeight) XXX_Size() int

func (*DistributionWeight) XXX_Unmarshal

func (m *DistributionWeight) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	// Params defines the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// NextRewardsPlanID represents the id to be used when creating the next
	// rewards plan.
	NextRewardsPlanID uint64 `protobuf:"varint,2,opt,name=next_rewards_plan_id,json=nextRewardsPlanId,proto3" json:"next_rewards_plan_id,omitempty"`
	// RewardsPlans defines the list of rewards plans.
	RewardsPlans []RewardsPlan `protobuf:"bytes,3,rep,name=rewards_plans,json=rewardsPlans,proto3" json:"rewards_plans"`
	// last_rewards_allocation_time is the last time rewards were allocated.
	LastRewardsAllocationTime *time.Time `` /* 148-byte string literal not displayed */
	// delegator_withdraw_infos defines the delegator withdraw infos at genesis.
	DelegatorWithdrawInfos []DelegatorWithdrawInfo `protobuf:"bytes,5,rep,name=delegator_withdraw_infos,json=delegatorWithdrawInfos,proto3" json:"delegator_withdraw_infos"`
	// pools_records defines a group of genesis records of all pools at genesis.
	PoolsRecords DelegationTypeRecords `protobuf:"bytes,6,opt,name=pools_records,json=poolsRecords,proto3" json:"pools_records"`
	// operators_records defines a group of genesis records of all operators at
	// genesis.
	OperatorsRecords DelegationTypeRecords `protobuf:"bytes,7,opt,name=operators_records,json=operatorsRecords,proto3" json:"operators_records"`
	// services_records defines a group of genesis records of all services at
	// genesis.
	ServicesRecords DelegationTypeRecords `protobuf:"bytes,8,opt,name=services_records,json=servicesRecords,proto3" json:"services_records"`
	// operator_accumulated_commissions defines the accumulated commissions of all
	// operators at genesis.
	OperatorAccumulatedCommissions []OperatorAccumulatedCommissionRecord `` /* 143-byte string literal not displayed */
	// pool_service_total_delegator_shares defines the total delegator shares at
	// genesis.
	PoolServiceTotalDelegatorShares []PoolServiceTotalDelegatorShares `` /* 151-byte string literal not displayed */
}

GenesisState defines the module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state.

func NewGenesisState

func NewGenesisState(
	params Params,
	nextRewardsPlanID uint64,
	rewardsPlans []RewardsPlan,
	lastRewardsAllocationTime *time.Time,
	delegatorWithdrawInfos []DelegatorWithdrawInfo,
	poolsRecords,
	operatorsRecords,
	servicesRecords DelegationTypeRecords,
	operatorAccumulatedCommissionRecords []OperatorAccumulatedCommissionRecord,
	poolServiceTotalDelShares []PoolServiceTotalDelegatorShares,
) *GenesisState

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetDelegatorWithdrawInfos

func (m *GenesisState) GetDelegatorWithdrawInfos() []DelegatorWithdrawInfo

func (*GenesisState) GetLastRewardsAllocationTime

func (m *GenesisState) GetLastRewardsAllocationTime() *time.Time

func (*GenesisState) GetNextRewardsPlanID

func (m *GenesisState) GetNextRewardsPlanID() uint64

func (*GenesisState) GetOperatorAccumulatedCommissions

func (m *GenesisState) GetOperatorAccumulatedCommissions() []OperatorAccumulatedCommissionRecord

func (*GenesisState) GetOperatorsRecords

func (m *GenesisState) GetOperatorsRecords() DelegationTypeRecords

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPoolServiceTotalDelegatorShares

func (m *GenesisState) GetPoolServiceTotalDelegatorShares() []PoolServiceTotalDelegatorShares

func (*GenesisState) GetPoolsRecords

func (m *GenesisState) GetPoolsRecords() DelegationTypeRecords

func (*GenesisState) GetRewardsPlans

func (m *GenesisState) GetRewardsPlans() []RewardsPlan

func (*GenesisState) GetServicesRecords

func (m *GenesisState) GetServicesRecords() DelegationTypeRecords

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (*GenesisState) Validate

func (genState *GenesisState) Validate(unpacker codectypes.AnyUnpacker) error

Validate checks that the genesis state is valid.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type HistoricalRewards

type HistoricalRewards struct {
	CumulativeRewardRatios ServicePools `` /* 177-byte string literal not displayed */
	ReferenceCount         uint32       `` /* 127-byte string literal not displayed */
}

HistoricalRewards represents historical rewards for a delegation target. Height is implicit within the store key. Cumulative reward ratio is the sum from the zeroeth period until this period of rewards / tokens, per the spec. The reference count indicates the number of objects which might need to reference this historical entry at any point. ReferenceCount =

  number of outstanding delegations which ended the associated period (and
  might need to read that record)
+ number of slashes which ended the associated period (and might need to
read that record)
+ one per validator for the zeroeth period, set on initialization

func NewHistoricalRewards

func NewHistoricalRewards(cumulativeRewardRatios ServicePools, referenceCount uint32) HistoricalRewards

NewHistoricalRewards creates a new historical rewards

func (*HistoricalRewards) Descriptor

func (*HistoricalRewards) Descriptor() ([]byte, []int)

func (*HistoricalRewards) Marshal

func (m *HistoricalRewards) Marshal() (dAtA []byte, err error)

func (*HistoricalRewards) MarshalTo

func (m *HistoricalRewards) MarshalTo(dAtA []byte) (int, error)

func (*HistoricalRewards) MarshalToSizedBuffer

func (m *HistoricalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HistoricalRewards) ProtoMessage

func (*HistoricalRewards) ProtoMessage()

func (*HistoricalRewards) Reset

func (m *HistoricalRewards) Reset()

func (*HistoricalRewards) Size

func (m *HistoricalRewards) Size() (n int)

func (*HistoricalRewards) String

func (m *HistoricalRewards) String() string

func (*HistoricalRewards) Unmarshal

func (m *HistoricalRewards) Unmarshal(dAtA []byte) error

func (*HistoricalRewards) XXX_DiscardUnknown

func (m *HistoricalRewards) XXX_DiscardUnknown()

func (*HistoricalRewards) XXX_Marshal

func (m *HistoricalRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HistoricalRewards) XXX_Merge

func (m *HistoricalRewards) XXX_Merge(src proto.Message)

func (*HistoricalRewards) XXX_Size

func (m *HistoricalRewards) XXX_Size() int

func (*HistoricalRewards) XXX_Unmarshal

func (m *HistoricalRewards) XXX_Unmarshal(b []byte) error

type HistoricalRewardsRecord

type HistoricalRewardsRecord struct {
	// delegation_target_id is the ID of the delegation target.
	DelegationTargetID uint32 `protobuf:"varint,1,opt,name=delegation_target_id,json=delegationTargetId,proto3" json:"delegation_target_id,omitempty"`
	// period defines the period the historical rewards apply to.
	Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
	// rewards defines the historical rewards of the delegation target.
	Rewards HistoricalRewards `protobuf:"bytes,3,opt,name=rewards,proto3" json:"rewards"`
}

HistoricalRewardsRecord is used for import / export via genesis json.

func (*HistoricalRewardsRecord) Descriptor

func (*HistoricalRewardsRecord) Descriptor() ([]byte, []int)

func (*HistoricalRewardsRecord) Marshal

func (m *HistoricalRewardsRecord) Marshal() (dAtA []byte, err error)

func (*HistoricalRewardsRecord) MarshalTo

func (m *HistoricalRewardsRecord) MarshalTo(dAtA []byte) (int, error)

func (*HistoricalRewardsRecord) MarshalToSizedBuffer

func (m *HistoricalRewardsRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*HistoricalRewardsRecord) ProtoMessage

func (*HistoricalRewardsRecord) ProtoMessage()

func (*HistoricalRewardsRecord) Reset

func (m *HistoricalRewardsRecord) Reset()

func (*HistoricalRewardsRecord) Size

func (m *HistoricalRewardsRecord) Size() (n int)

func (*HistoricalRewardsRecord) String

func (m *HistoricalRewardsRecord) String() string

func (*HistoricalRewardsRecord) Unmarshal

func (m *HistoricalRewardsRecord) Unmarshal(dAtA []byte) error

func (*HistoricalRewardsRecord) XXX_DiscardUnknown

func (m *HistoricalRewardsRecord) XXX_DiscardUnknown()

func (*HistoricalRewardsRecord) XXX_Marshal

func (m *HistoricalRewardsRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*HistoricalRewardsRecord) XXX_Merge

func (m *HistoricalRewardsRecord) XXX_Merge(src proto.Message)

func (*HistoricalRewardsRecord) XXX_Size

func (m *HistoricalRewardsRecord) XXX_Size() int

func (*HistoricalRewardsRecord) XXX_Unmarshal

func (m *HistoricalRewardsRecord) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// CreateRewardsPlan defines the operation for creating a new
	// rewards plan.
	CreateRewardsPlan(ctx context.Context, in *MsgCreateRewardsPlan, opts ...grpc.CallOption) (*MsgCreateRewardsPlanResponse, error)
	// EditRewardsPlan defines the operation to edit an existing
	// rewards plan.
	EditRewardsPlan(ctx context.Context, in *MsgEditRewardsPlan, opts ...grpc.CallOption) (*MsgEditRewardsPlanResponse, error)
	// SetWithdrawAddress defines a method to change the withdraw address
	// for a delegator(or an operator, when withdrawing commission).
	SetWithdrawAddress(ctx context.Context, in *MsgSetWithdrawAddress, opts ...grpc.CallOption) (*MsgSetWithdrawAddressResponse, error)
	// WithdrawDelegatorReward defines a method to withdraw rewards of delegator
	// from a single delegation target.
	WithdrawDelegatorReward(ctx context.Context, in *MsgWithdrawDelegatorReward, opts ...grpc.CallOption) (*MsgWithdrawDelegatorRewardResponse, error)
	// WithdrawOperatorCommission defines a method to withdraw the
	// full commission to the operator.
	WithdrawOperatorCommission(ctx context.Context, in *MsgWithdrawOperatorCommission, opts ...grpc.CallOption) (*MsgWithdrawOperatorCommissionResponse, error)
	// UpdateParams defines a (governance) operation for updating the module
	// parameters.
	// The authority defaults to the x/gov module account.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgCreateRewardsPlan

type MsgCreateRewardsPlan struct {
	// Sender is the address of the user creating the rewards plan
	Sender      string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	ServiceID   uint32 `protobuf:"varint,3,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// Amount is the amount of rewards to be distributed.
	Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
	// StartTime is the starting time of the plan.
	StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	// EndTime is the ending time of the plan.
	EndTime time.Time `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"`
	// PoolsDistribution is the rewards distribution parameters for pools.
	PoolsDistribution Distribution `protobuf:"bytes,7,opt,name=pools_distribution,json=poolsDistribution,proto3" json:"pools_distribution"`
	// OperatorsDistribution is the rewards distribution parameters for operators.
	OperatorsDistribution Distribution `protobuf:"bytes,8,opt,name=operators_distribution,json=operatorsDistribution,proto3" json:"operators_distribution"`
	// UsersDistribution is the rewards distribution parameters for users who
	// delegated directly to the service.
	UsersDistribution UsersDistribution `protobuf:"bytes,9,opt,name=users_distribution,json=usersDistribution,proto3" json:"users_distribution"`
	// FeeAmount represents the fees that are going to be paid to create the
	// rewards plan. These should always be greater or equals of any of the coins
	// specified inside the RewardsPlanCreationFee field of the modules params.
	// If no fees are specified inside the module parameters, this field can be
	// omitted.
	FeeAmount github_com_cosmos_cosmos_sdk_types.Coins `` /* 133-byte string literal not displayed */
}

MsgCreateRewardsPlan defines the message structure for the CreateRewardsPlan gRPC service method. It allows an account to create a new rewards plan. It requires a sender address as well as the details of the plan to be created.

func NewMsgCreateRewardsPlan

func NewMsgCreateRewardsPlan(
	serviceID uint32,
	description string,
	amt sdk.Coins,
	startTime,
	endTime time.Time,
	poolsDistribution Distribution,
	operatorsDistribution Distribution,
	usersDistribution UsersDistribution,
	feeAmount sdk.Coins,
	sender string,
) *MsgCreateRewardsPlan

NewMsgCreateRewardsPlan creates a new MsgCreateRewardsPlan instance

func (*MsgCreateRewardsPlan) Descriptor

func (*MsgCreateRewardsPlan) Descriptor() ([]byte, []int)

func (*MsgCreateRewardsPlan) GetSignBytes

func (m *MsgCreateRewardsPlan) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgCreateRewardsPlan) GetSigners

func (m *MsgCreateRewardsPlan) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgCreateRewardsPlan) Marshal

func (m *MsgCreateRewardsPlan) Marshal() (dAtA []byte, err error)

func (*MsgCreateRewardsPlan) MarshalTo

func (m *MsgCreateRewardsPlan) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateRewardsPlan) MarshalToSizedBuffer

func (m *MsgCreateRewardsPlan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateRewardsPlan) ProtoMessage

func (*MsgCreateRewardsPlan) ProtoMessage()

func (*MsgCreateRewardsPlan) Reset

func (m *MsgCreateRewardsPlan) Reset()

func (*MsgCreateRewardsPlan) Size

func (m *MsgCreateRewardsPlan) Size() (n int)

func (*MsgCreateRewardsPlan) String

func (m *MsgCreateRewardsPlan) String() string

func (*MsgCreateRewardsPlan) Unmarshal

func (m *MsgCreateRewardsPlan) Unmarshal(dAtA []byte) error

func (*MsgCreateRewardsPlan) UnpackInterfaces

func (m *MsgCreateRewardsPlan) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements codectypes.UnpackInterfacesMessage

func (*MsgCreateRewardsPlan) ValidateBasic

func (m *MsgCreateRewardsPlan) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgCreateRewardsPlan) XXX_DiscardUnknown

func (m *MsgCreateRewardsPlan) XXX_DiscardUnknown()

func (*MsgCreateRewardsPlan) XXX_Marshal

func (m *MsgCreateRewardsPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateRewardsPlan) XXX_Merge

func (m *MsgCreateRewardsPlan) XXX_Merge(src proto.Message)

func (*MsgCreateRewardsPlan) XXX_Size

func (m *MsgCreateRewardsPlan) XXX_Size() int

func (*MsgCreateRewardsPlan) XXX_Unmarshal

func (m *MsgCreateRewardsPlan) XXX_Unmarshal(b []byte) error

type MsgCreateRewardsPlanResponse

type MsgCreateRewardsPlanResponse struct {
	// NewRewardsPlanID is the ID of the newly created rewards plan
	NewRewardsPlanID uint64 `protobuf:"varint,1,opt,name=new_rewards_plan_id,json=newRewardsPlanId,proto3" json:"new_rewards_plan_id,omitempty"`
}

MsgCreateRewardsPlanResponse is the return value of MsgCreateRewardsPlan. It returns the newly created plan ID.

func (*MsgCreateRewardsPlanResponse) Descriptor

func (*MsgCreateRewardsPlanResponse) Descriptor() ([]byte, []int)

func (*MsgCreateRewardsPlanResponse) GetNewRewardsPlanID

func (m *MsgCreateRewardsPlanResponse) GetNewRewardsPlanID() uint64

func (*MsgCreateRewardsPlanResponse) Marshal

func (m *MsgCreateRewardsPlanResponse) Marshal() (dAtA []byte, err error)

func (*MsgCreateRewardsPlanResponse) MarshalTo

func (m *MsgCreateRewardsPlanResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateRewardsPlanResponse) MarshalToSizedBuffer

func (m *MsgCreateRewardsPlanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateRewardsPlanResponse) ProtoMessage

func (*MsgCreateRewardsPlanResponse) ProtoMessage()

func (*MsgCreateRewardsPlanResponse) Reset

func (m *MsgCreateRewardsPlanResponse) Reset()

func (*MsgCreateRewardsPlanResponse) Size

func (m *MsgCreateRewardsPlanResponse) Size() (n int)

func (*MsgCreateRewardsPlanResponse) String

func (*MsgCreateRewardsPlanResponse) Unmarshal

func (m *MsgCreateRewardsPlanResponse) Unmarshal(dAtA []byte) error

func (*MsgCreateRewardsPlanResponse) XXX_DiscardUnknown

func (m *MsgCreateRewardsPlanResponse) XXX_DiscardUnknown()

func (*MsgCreateRewardsPlanResponse) XXX_Marshal

func (m *MsgCreateRewardsPlanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateRewardsPlanResponse) XXX_Merge

func (m *MsgCreateRewardsPlanResponse) XXX_Merge(src proto.Message)

func (*MsgCreateRewardsPlanResponse) XXX_Size

func (m *MsgCreateRewardsPlanResponse) XXX_Size() int

func (*MsgCreateRewardsPlanResponse) XXX_Unmarshal

func (m *MsgCreateRewardsPlanResponse) XXX_Unmarshal(b []byte) error

type MsgEditRewardsPlan

type MsgEditRewardsPlan struct {
	// Sender is the address of the user editing the rewards plan.
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ID is the ID of the rewards plan to be edited.
	ID          uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Amount is the amount of rewards to be distributed.
	Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
	// StartTime is the starting time of the plan.
	StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	// EndTime is the ending time of the plan.
	EndTime time.Time `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"`
	// PoolsDistribution is the rewards distribution parameters for pools.
	PoolsDistribution Distribution `protobuf:"bytes,7,opt,name=pools_distribution,json=poolsDistribution,proto3" json:"pools_distribution"`
	// OperatorsDistribution is the rewards distribution parameters for operators.
	OperatorsDistribution Distribution `protobuf:"bytes,8,opt,name=operators_distribution,json=operatorsDistribution,proto3" json:"operators_distribution"`
	// UsersDistribution is the rewards distribution parameters for users who
	// delegated directly to the service.
	UsersDistribution UsersDistribution `protobuf:"bytes,9,opt,name=users_distribution,json=usersDistribution,proto3" json:"users_distribution"`
}

MsgEditRewardsPlan defines the message structure for the EditRewardsPlan gRPC service method. It allows an account to edit a previously created rewards plan.

func NewMsgEditRewardsPlan

func NewMsgEditRewardsPlan(
	id uint64,
	description string,
	amount sdk.Coins,
	startTime,
	endTime time.Time,
	poolsDistribution Distribution,
	operatorsDistribution Distribution,
	usersDistribution UsersDistribution,
	sender string,
) *MsgEditRewardsPlan

NewMsgEditRewardsPlan creates a new MsgEditRewardsPlan instance.

func (*MsgEditRewardsPlan) Descriptor

func (*MsgEditRewardsPlan) Descriptor() ([]byte, []int)

func (*MsgEditRewardsPlan) GetSignBytes

func (m *MsgEditRewardsPlan) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgEditRewardsPlan) GetSigners

func (m *MsgEditRewardsPlan) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgEditRewardsPlan) Marshal

func (m *MsgEditRewardsPlan) Marshal() (dAtA []byte, err error)

func (*MsgEditRewardsPlan) MarshalTo

func (m *MsgEditRewardsPlan) MarshalTo(dAtA []byte) (int, error)

func (*MsgEditRewardsPlan) MarshalToSizedBuffer

func (m *MsgEditRewardsPlan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEditRewardsPlan) ProtoMessage

func (*MsgEditRewardsPlan) ProtoMessage()

func (*MsgEditRewardsPlan) Reset

func (m *MsgEditRewardsPlan) Reset()

func (*MsgEditRewardsPlan) Size

func (m *MsgEditRewardsPlan) Size() (n int)

func (*MsgEditRewardsPlan) String

func (m *MsgEditRewardsPlan) String() string

func (*MsgEditRewardsPlan) Unmarshal

func (m *MsgEditRewardsPlan) Unmarshal(dAtA []byte) error

func (*MsgEditRewardsPlan) UnpackInterfaces

func (m *MsgEditRewardsPlan) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements codectypes.UnpackInterfacesMessage

func (*MsgEditRewardsPlan) ValidateBasic

func (m *MsgEditRewardsPlan) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgEditRewardsPlan) XXX_DiscardUnknown

func (m *MsgEditRewardsPlan) XXX_DiscardUnknown()

func (*MsgEditRewardsPlan) XXX_Marshal

func (m *MsgEditRewardsPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEditRewardsPlan) XXX_Merge

func (m *MsgEditRewardsPlan) XXX_Merge(src proto.Message)

func (*MsgEditRewardsPlan) XXX_Size

func (m *MsgEditRewardsPlan) XXX_Size() int

func (*MsgEditRewardsPlan) XXX_Unmarshal

func (m *MsgEditRewardsPlan) XXX_Unmarshal(b []byte) error

type MsgEditRewardsPlanResponse

type MsgEditRewardsPlanResponse struct {
}

MsgEditRewardsPlanResponse is the return value of MsgEditRewardsPlan.

func (*MsgEditRewardsPlanResponse) Descriptor

func (*MsgEditRewardsPlanResponse) Descriptor() ([]byte, []int)

func (*MsgEditRewardsPlanResponse) Marshal

func (m *MsgEditRewardsPlanResponse) Marshal() (dAtA []byte, err error)

func (*MsgEditRewardsPlanResponse) MarshalTo

func (m *MsgEditRewardsPlanResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgEditRewardsPlanResponse) MarshalToSizedBuffer

func (m *MsgEditRewardsPlanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEditRewardsPlanResponse) ProtoMessage

func (*MsgEditRewardsPlanResponse) ProtoMessage()

func (*MsgEditRewardsPlanResponse) Reset

func (m *MsgEditRewardsPlanResponse) Reset()

func (*MsgEditRewardsPlanResponse) Size

func (m *MsgEditRewardsPlanResponse) Size() (n int)

func (*MsgEditRewardsPlanResponse) String

func (m *MsgEditRewardsPlanResponse) String() string

func (*MsgEditRewardsPlanResponse) Unmarshal

func (m *MsgEditRewardsPlanResponse) Unmarshal(dAtA []byte) error

func (*MsgEditRewardsPlanResponse) XXX_DiscardUnknown

func (m *MsgEditRewardsPlanResponse) XXX_DiscardUnknown()

func (*MsgEditRewardsPlanResponse) XXX_Marshal

func (m *MsgEditRewardsPlanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEditRewardsPlanResponse) XXX_Merge

func (m *MsgEditRewardsPlanResponse) XXX_Merge(src proto.Message)

func (*MsgEditRewardsPlanResponse) XXX_Size

func (m *MsgEditRewardsPlanResponse) XXX_Size() int

func (*MsgEditRewardsPlanResponse) XXX_Unmarshal

func (m *MsgEditRewardsPlanResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// CreateRewardsPlan defines the operation for creating a new
	// rewards plan.
	CreateRewardsPlan(context.Context, *MsgCreateRewardsPlan) (*MsgCreateRewardsPlanResponse, error)
	// EditRewardsPlan defines the operation to edit an existing
	// rewards plan.
	EditRewardsPlan(context.Context, *MsgEditRewardsPlan) (*MsgEditRewardsPlanResponse, error)
	// SetWithdrawAddress defines a method to change the withdraw address
	// for a delegator(or an operator, when withdrawing commission).
	SetWithdrawAddress(context.Context, *MsgSetWithdrawAddress) (*MsgSetWithdrawAddressResponse, error)
	// WithdrawDelegatorReward defines a method to withdraw rewards of delegator
	// from a single delegation target.
	WithdrawDelegatorReward(context.Context, *MsgWithdrawDelegatorReward) (*MsgWithdrawDelegatorRewardResponse, error)
	// WithdrawOperatorCommission defines a method to withdraw the
	// full commission to the operator.
	WithdrawOperatorCommission(context.Context, *MsgWithdrawOperatorCommission) (*MsgWithdrawOperatorCommissionResponse, error)
	// UpdateParams defines a (governance) operation for updating the module
	// parameters.
	// The authority defaults to the x/gov module account.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSetWithdrawAddress

type MsgSetWithdrawAddress struct {
	Sender          string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"`
}

MsgSetWithdrawAddress sets the withdraw address for a delegator(or an operator when withdrawing commission).

func NewMsgSetWithdrawAddress

func NewMsgSetWithdrawAddress(withdrawAddress string, sender string) *MsgSetWithdrawAddress

NewMsgSetWithdrawAddress creates a new NewMsgSetWithdrawAddress instance

func (*MsgSetWithdrawAddress) Descriptor

func (*MsgSetWithdrawAddress) Descriptor() ([]byte, []int)

func (*MsgSetWithdrawAddress) GetSignBytes

func (m *MsgSetWithdrawAddress) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgSetWithdrawAddress) GetSigners

func (m *MsgSetWithdrawAddress) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgSetWithdrawAddress) Marshal

func (m *MsgSetWithdrawAddress) Marshal() (dAtA []byte, err error)

func (*MsgSetWithdrawAddress) MarshalTo

func (m *MsgSetWithdrawAddress) MarshalTo(dAtA []byte) (int, error)

func (*MsgSetWithdrawAddress) MarshalToSizedBuffer

func (m *MsgSetWithdrawAddress) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSetWithdrawAddress) ProtoMessage

func (*MsgSetWithdrawAddress) ProtoMessage()

func (*MsgSetWithdrawAddress) Reset

func (m *MsgSetWithdrawAddress) Reset()

func (*MsgSetWithdrawAddress) Size

func (m *MsgSetWithdrawAddress) Size() (n int)

func (*MsgSetWithdrawAddress) String

func (m *MsgSetWithdrawAddress) String() string

func (*MsgSetWithdrawAddress) Unmarshal

func (m *MsgSetWithdrawAddress) Unmarshal(dAtA []byte) error

func (*MsgSetWithdrawAddress) ValidateBasic

func (m *MsgSetWithdrawAddress) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgSetWithdrawAddress) XXX_DiscardUnknown

func (m *MsgSetWithdrawAddress) XXX_DiscardUnknown()

func (*MsgSetWithdrawAddress) XXX_Marshal

func (m *MsgSetWithdrawAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSetWithdrawAddress) XXX_Merge

func (m *MsgSetWithdrawAddress) XXX_Merge(src proto.Message)

func (*MsgSetWithdrawAddress) XXX_Size

func (m *MsgSetWithdrawAddress) XXX_Size() int

func (*MsgSetWithdrawAddress) XXX_Unmarshal

func (m *MsgSetWithdrawAddress) XXX_Unmarshal(b []byte) error

type MsgSetWithdrawAddressResponse

type MsgSetWithdrawAddressResponse struct {
}

MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type.

func (*MsgSetWithdrawAddressResponse) Descriptor

func (*MsgSetWithdrawAddressResponse) Descriptor() ([]byte, []int)

func (*MsgSetWithdrawAddressResponse) Marshal

func (m *MsgSetWithdrawAddressResponse) Marshal() (dAtA []byte, err error)

func (*MsgSetWithdrawAddressResponse) MarshalTo

func (m *MsgSetWithdrawAddressResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSetWithdrawAddressResponse) MarshalToSizedBuffer

func (m *MsgSetWithdrawAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSetWithdrawAddressResponse) ProtoMessage

func (*MsgSetWithdrawAddressResponse) ProtoMessage()

func (*MsgSetWithdrawAddressResponse) Reset

func (m *MsgSetWithdrawAddressResponse) Reset()

func (*MsgSetWithdrawAddressResponse) Size

func (m *MsgSetWithdrawAddressResponse) Size() (n int)

func (*MsgSetWithdrawAddressResponse) String

func (*MsgSetWithdrawAddressResponse) Unmarshal

func (m *MsgSetWithdrawAddressResponse) Unmarshal(dAtA []byte) error

func (*MsgSetWithdrawAddressResponse) XXX_DiscardUnknown

func (m *MsgSetWithdrawAddressResponse) XXX_DiscardUnknown()

func (*MsgSetWithdrawAddressResponse) XXX_Marshal

func (m *MsgSetWithdrawAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSetWithdrawAddressResponse) XXX_Merge

func (m *MsgSetWithdrawAddressResponse) XXX_Merge(src proto.Message)

func (*MsgSetWithdrawAddressResponse) XXX_Size

func (m *MsgSetWithdrawAddressResponse) XXX_Size() int

func (*MsgSetWithdrawAddressResponse) XXX_Unmarshal

func (m *MsgSetWithdrawAddressResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateParams

type MsgUpdateParams struct {
	// Authority is the address that controls the module (defaults to x/gov unless
	// overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Params define the parameters to update.
	//
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams defines the message structure for the UpdateParams gRPC service method. It allows the authority to update the module parameters.

func (*MsgUpdateParams) Descriptor

func (*MsgUpdateParams) Descriptor() ([]byte, []int)

func (*MsgUpdateParams) Marshal

func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)

func (*MsgUpdateParams) MarshalTo

func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateParams) MarshalToSizedBuffer

func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

func (m *MsgUpdateParams) Size() (n int)

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateParams) XXX_Merge

func (m *MsgUpdateParams) XXX_Merge(src proto.Message)

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse is the return value of MsgUpdateParams.

func (*MsgUpdateParamsResponse) Descriptor

func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateParamsResponse) Marshal

func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateParamsResponse) MarshalTo

func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

func (m *MsgUpdateParamsResponse) Size() (n int)

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateParamsResponse) XXX_Merge

func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error

type MsgWithdrawDelegatorReward

type MsgWithdrawDelegatorReward struct {
	DelegatorAddress   string                `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"`
	DelegationType     types1.DelegationType `` /* 146-byte string literal not displayed */
	DelegationTargetID uint32                `protobuf:"varint,3,opt,name=delegation_target_id,json=delegationTargetId,proto3" json:"delegation_target_id,omitempty"`
}

MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator from a single delegation target.

func NewMsgWithdrawDelegatorReward

func NewMsgWithdrawDelegatorReward(
	delegationType restakingtypes.DelegationType,
	targetID uint32,
	delegatorAddress string,
) *MsgWithdrawDelegatorReward

NewMsgWithdrawDelegatorReward creates a new MsgWithdrawDelegatorReward instance

func (*MsgWithdrawDelegatorReward) Descriptor

func (*MsgWithdrawDelegatorReward) Descriptor() ([]byte, []int)

func (*MsgWithdrawDelegatorReward) GetSignBytes

func (m *MsgWithdrawDelegatorReward) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgWithdrawDelegatorReward) GetSigners

func (m *MsgWithdrawDelegatorReward) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgWithdrawDelegatorReward) Marshal

func (m *MsgWithdrawDelegatorReward) Marshal() (dAtA []byte, err error)

func (*MsgWithdrawDelegatorReward) MarshalTo

func (m *MsgWithdrawDelegatorReward) MarshalTo(dAtA []byte) (int, error)

func (*MsgWithdrawDelegatorReward) MarshalToSizedBuffer

func (m *MsgWithdrawDelegatorReward) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgWithdrawDelegatorReward) ProtoMessage

func (*MsgWithdrawDelegatorReward) ProtoMessage()

func (*MsgWithdrawDelegatorReward) Reset

func (m *MsgWithdrawDelegatorReward) Reset()

func (*MsgWithdrawDelegatorReward) Size

func (m *MsgWithdrawDelegatorReward) Size() (n int)

func (*MsgWithdrawDelegatorReward) String

func (m *MsgWithdrawDelegatorReward) String() string

func (*MsgWithdrawDelegatorReward) Unmarshal

func (m *MsgWithdrawDelegatorReward) Unmarshal(dAtA []byte) error

func (*MsgWithdrawDelegatorReward) ValidateBasic

func (m *MsgWithdrawDelegatorReward) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgWithdrawDelegatorReward) XXX_DiscardUnknown

func (m *MsgWithdrawDelegatorReward) XXX_DiscardUnknown()

func (*MsgWithdrawDelegatorReward) XXX_Marshal

func (m *MsgWithdrawDelegatorReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgWithdrawDelegatorReward) XXX_Merge

func (m *MsgWithdrawDelegatorReward) XXX_Merge(src proto.Message)

func (*MsgWithdrawDelegatorReward) XXX_Size

func (m *MsgWithdrawDelegatorReward) XXX_Size() int

func (*MsgWithdrawDelegatorReward) XXX_Unmarshal

func (m *MsgWithdrawDelegatorReward) XXX_Unmarshal(b []byte) error

type MsgWithdrawDelegatorRewardResponse

type MsgWithdrawDelegatorRewardResponse struct {
	Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type.

func (*MsgWithdrawDelegatorRewardResponse) Descriptor

func (*MsgWithdrawDelegatorRewardResponse) Descriptor() ([]byte, []int)

func (*MsgWithdrawDelegatorRewardResponse) GetAmount

func (*MsgWithdrawDelegatorRewardResponse) Marshal

func (m *MsgWithdrawDelegatorRewardResponse) Marshal() (dAtA []byte, err error)

func (*MsgWithdrawDelegatorRewardResponse) MarshalTo

func (m *MsgWithdrawDelegatorRewardResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgWithdrawDelegatorRewardResponse) MarshalToSizedBuffer

func (m *MsgWithdrawDelegatorRewardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgWithdrawDelegatorRewardResponse) ProtoMessage

func (*MsgWithdrawDelegatorRewardResponse) ProtoMessage()

func (*MsgWithdrawDelegatorRewardResponse) Reset

func (*MsgWithdrawDelegatorRewardResponse) Size

func (*MsgWithdrawDelegatorRewardResponse) String

func (*MsgWithdrawDelegatorRewardResponse) Unmarshal

func (m *MsgWithdrawDelegatorRewardResponse) Unmarshal(dAtA []byte) error

func (*MsgWithdrawDelegatorRewardResponse) XXX_DiscardUnknown

func (m *MsgWithdrawDelegatorRewardResponse) XXX_DiscardUnknown()

func (*MsgWithdrawDelegatorRewardResponse) XXX_Marshal

func (m *MsgWithdrawDelegatorRewardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgWithdrawDelegatorRewardResponse) XXX_Merge

func (*MsgWithdrawDelegatorRewardResponse) XXX_Size

func (*MsgWithdrawDelegatorRewardResponse) XXX_Unmarshal

func (m *MsgWithdrawDelegatorRewardResponse) XXX_Unmarshal(b []byte) error

type MsgWithdrawOperatorCommission

type MsgWithdrawOperatorCommission struct {
	Sender     string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	OperatorID uint32 `protobuf:"varint,2,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty"`
}

MsgWithdrawOperatorCommission withdraws the full commission to the operator.

func NewMsgWithdrawOperatorCommission

func NewMsgWithdrawOperatorCommission(operatorID uint32, senderAddress string) *MsgWithdrawOperatorCommission

NewMsgWithdrawOperatorCommission creates a new MsgWithdrawOperatorCommission instance

func (*MsgWithdrawOperatorCommission) Descriptor

func (*MsgWithdrawOperatorCommission) Descriptor() ([]byte, []int)

func (*MsgWithdrawOperatorCommission) GetSignBytes

func (m *MsgWithdrawOperatorCommission) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgWithdrawOperatorCommission) GetSigners

func (m *MsgWithdrawOperatorCommission) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgWithdrawOperatorCommission) Marshal

func (m *MsgWithdrawOperatorCommission) Marshal() (dAtA []byte, err error)

func (*MsgWithdrawOperatorCommission) MarshalTo

func (m *MsgWithdrawOperatorCommission) MarshalTo(dAtA []byte) (int, error)

func (*MsgWithdrawOperatorCommission) MarshalToSizedBuffer

func (m *MsgWithdrawOperatorCommission) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgWithdrawOperatorCommission) ProtoMessage

func (*MsgWithdrawOperatorCommission) ProtoMessage()

func (*MsgWithdrawOperatorCommission) Reset

func (m *MsgWithdrawOperatorCommission) Reset()

func (*MsgWithdrawOperatorCommission) Size

func (m *MsgWithdrawOperatorCommission) Size() (n int)

func (*MsgWithdrawOperatorCommission) String

func (*MsgWithdrawOperatorCommission) Unmarshal

func (m *MsgWithdrawOperatorCommission) Unmarshal(dAtA []byte) error

func (*MsgWithdrawOperatorCommission) ValidateBasic

func (m *MsgWithdrawOperatorCommission) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgWithdrawOperatorCommission) XXX_DiscardUnknown

func (m *MsgWithdrawOperatorCommission) XXX_DiscardUnknown()

func (*MsgWithdrawOperatorCommission) XXX_Marshal

func (m *MsgWithdrawOperatorCommission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgWithdrawOperatorCommission) XXX_Merge

func (m *MsgWithdrawOperatorCommission) XXX_Merge(src proto.Message)

func (*MsgWithdrawOperatorCommission) XXX_Size

func (m *MsgWithdrawOperatorCommission) XXX_Size() int

func (*MsgWithdrawOperatorCommission) XXX_Unmarshal

func (m *MsgWithdrawOperatorCommission) XXX_Unmarshal(b []byte) error

type MsgWithdrawOperatorCommissionResponse

type MsgWithdrawOperatorCommissionResponse struct {
	// Since: cosmos-sdk 0.46
	Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

MsgWithdrawOperatorCommissionResponse defines the Msg/WithdrawOperatorCommission response type.

func (*MsgWithdrawOperatorCommissionResponse) Descriptor

func (*MsgWithdrawOperatorCommissionResponse) Descriptor() ([]byte, []int)

func (*MsgWithdrawOperatorCommissionResponse) GetAmount

func (*MsgWithdrawOperatorCommissionResponse) Marshal

func (m *MsgWithdrawOperatorCommissionResponse) Marshal() (dAtA []byte, err error)

func (*MsgWithdrawOperatorCommissionResponse) MarshalTo

func (m *MsgWithdrawOperatorCommissionResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgWithdrawOperatorCommissionResponse) MarshalToSizedBuffer

func (m *MsgWithdrawOperatorCommissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgWithdrawOperatorCommissionResponse) ProtoMessage

func (*MsgWithdrawOperatorCommissionResponse) ProtoMessage()

func (*MsgWithdrawOperatorCommissionResponse) Reset

func (*MsgWithdrawOperatorCommissionResponse) Size

func (*MsgWithdrawOperatorCommissionResponse) String

func (*MsgWithdrawOperatorCommissionResponse) Unmarshal

func (m *MsgWithdrawOperatorCommissionResponse) Unmarshal(dAtA []byte) error

func (*MsgWithdrawOperatorCommissionResponse) XXX_DiscardUnknown

func (m *MsgWithdrawOperatorCommissionResponse) XXX_DiscardUnknown()

func (*MsgWithdrawOperatorCommissionResponse) XXX_Marshal

func (m *MsgWithdrawOperatorCommissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgWithdrawOperatorCommissionResponse) XXX_Merge

func (*MsgWithdrawOperatorCommissionResponse) XXX_Size

func (*MsgWithdrawOperatorCommissionResponse) XXX_Unmarshal

func (m *MsgWithdrawOperatorCommissionResponse) XXX_Unmarshal(b []byte) error

type OperatorAccumulatedCommissionRecord

type OperatorAccumulatedCommissionRecord struct {
	OperatorID uint32 `protobuf:"varint,1,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty"`
	// accumulated is the accumulated commission of an operator.
	Accumulated AccumulatedCommission `protobuf:"bytes,2,opt,name=accumulated,proto3" json:"accumulated"`
}

func (*OperatorAccumulatedCommissionRecord) Descriptor

func (*OperatorAccumulatedCommissionRecord) Descriptor() ([]byte, []int)

func (*OperatorAccumulatedCommissionRecord) Marshal

func (m *OperatorAccumulatedCommissionRecord) Marshal() (dAtA []byte, err error)

func (*OperatorAccumulatedCommissionRecord) MarshalTo

func (m *OperatorAccumulatedCommissionRecord) MarshalTo(dAtA []byte) (int, error)

func (*OperatorAccumulatedCommissionRecord) MarshalToSizedBuffer

func (m *OperatorAccumulatedCommissionRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OperatorAccumulatedCommissionRecord) ProtoMessage

func (*OperatorAccumulatedCommissionRecord) ProtoMessage()

func (*OperatorAccumulatedCommissionRecord) Reset

func (*OperatorAccumulatedCommissionRecord) Size

func (*OperatorAccumulatedCommissionRecord) String

func (*OperatorAccumulatedCommissionRecord) Unmarshal

func (m *OperatorAccumulatedCommissionRecord) Unmarshal(dAtA []byte) error

func (*OperatorAccumulatedCommissionRecord) XXX_DiscardUnknown

func (m *OperatorAccumulatedCommissionRecord) XXX_DiscardUnknown()

func (*OperatorAccumulatedCommissionRecord) XXX_Marshal

func (m *OperatorAccumulatedCommissionRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OperatorAccumulatedCommissionRecord) XXX_Merge

func (*OperatorAccumulatedCommissionRecord) XXX_Size

func (*OperatorAccumulatedCommissionRecord) XXX_Unmarshal

func (m *OperatorAccumulatedCommissionRecord) XXX_Unmarshal(b []byte) error

type OperatorsKeeper

type OperatorsKeeper interface {
	GetOperator(ctx context.Context, operatorID uint32) (operatorstypes.Operator, bool, error)
	GetOperators(ctx context.Context) ([]operatorstypes.Operator, error)
	IterateOperators(ctx context.Context, cb func(operator operatorstypes.Operator) (stop bool, err error)) error
	GetOperatorParams(ctx context.Context, operatorID uint32) (operatorstypes.OperatorParams, error)
}

type OracleKeeper

type OracleKeeper interface {
	GetPriceWithNonceForCurrencyPair(ctx sdk.Context, cp connecttypes.CurrencyPair) (oracletypes.QuotePriceWithNonce, error)
	GetDecimalsForCurrencyPair(ctx sdk.Context, cp connecttypes.CurrencyPair) (decimals uint64, err error)
}

type OutstandingRewards

type OutstandingRewards struct {
	Rewards DecPools `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=DecPools" json:"rewards" yaml:"rewards"`
}

OutstandingRewards represents outstanding (un-withdrawn) rewards for a delegation target inexpensive to track, allows simple sanity checks.

func (*OutstandingRewards) Descriptor

func (*OutstandingRewards) Descriptor() ([]byte, []int)

func (*OutstandingRewards) Marshal

func (m *OutstandingRewards) Marshal() (dAtA []byte, err error)

func (*OutstandingRewards) MarshalTo

func (m *OutstandingRewards) MarshalTo(dAtA []byte) (int, error)

func (*OutstandingRewards) MarshalToSizedBuffer

func (m *OutstandingRewards) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OutstandingRewards) ProtoMessage

func (*OutstandingRewards) ProtoMessage()

func (*OutstandingRewards) Reset

func (m *OutstandingRewards) Reset()

func (*OutstandingRewards) Size

func (m *OutstandingRewards) Size() (n int)

func (*OutstandingRewards) String

func (m *OutstandingRewards) String() string

func (*OutstandingRewards) Unmarshal

func (m *OutstandingRewards) Unmarshal(dAtA []byte) error

func (*OutstandingRewards) XXX_DiscardUnknown

func (m *OutstandingRewards) XXX_DiscardUnknown()

func (*OutstandingRewards) XXX_Marshal

func (m *OutstandingRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OutstandingRewards) XXX_Merge

func (m *OutstandingRewards) XXX_Merge(src proto.Message)

func (*OutstandingRewards) XXX_Size

func (m *OutstandingRewards) XXX_Size() int

func (*OutstandingRewards) XXX_Unmarshal

func (m *OutstandingRewards) XXX_Unmarshal(b []byte) error

type OutstandingRewardsRecord

type OutstandingRewardsRecord struct {
	// delegation_target_id is the ID of the delegation target.
	DelegationTargetID uint32 `protobuf:"varint,1,opt,name=delegation_target_id,json=delegationTargetId,proto3" json:"delegation_target_id,omitempty"`
	// outstanding_rewards represents the outstanding rewards of the delegation
	// target.
	OutstandingRewards DecPools `` /* 127-byte string literal not displayed */
}

OutstandingRewardsRecord is used for import/export via genesis json.

func (*OutstandingRewardsRecord) Descriptor

func (*OutstandingRewardsRecord) Descriptor() ([]byte, []int)

func (*OutstandingRewardsRecord) Marshal

func (m *OutstandingRewardsRecord) Marshal() (dAtA []byte, err error)

func (*OutstandingRewardsRecord) MarshalTo

func (m *OutstandingRewardsRecord) MarshalTo(dAtA []byte) (int, error)

func (*OutstandingRewardsRecord) MarshalToSizedBuffer

func (m *OutstandingRewardsRecord) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OutstandingRewardsRecord) ProtoMessage

func (*OutstandingRewardsRecord) ProtoMessage()

func (*OutstandingRewardsRecord) Reset

func (m *OutstandingRewardsRecord) Reset()

func (*OutstandingRewardsRecord) Size

func (m *OutstandingRewardsRecord) Size() (n int)

func (*OutstandingRewardsRecord) String

func (m *OutstandingRewardsRecord) String() string

func (*OutstandingRewardsRecord) Unmarshal

func (m *OutstandingRewardsRecord) Unmarshal(dAtA []byte) error

func (*OutstandingRewardsRecord) XXX_DiscardUnknown

func (m *OutstandingRewardsRecord) XXX_DiscardUnknown()

func (*OutstandingRewardsRecord) XXX_Marshal

func (m *OutstandingRewardsRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OutstandingRewardsRecord) XXX_Merge

func (m *OutstandingRewardsRecord) XXX_Merge(src proto.Message)

func (*OutstandingRewardsRecord) XXX_Size

func (m *OutstandingRewardsRecord) XXX_Size() int

func (*OutstandingRewardsRecord) XXX_Unmarshal

func (m *OutstandingRewardsRecord) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	// RewardsPlanCreationFee represents the fee that an account must pay in
	// order to create a rewards plan.
	// The fee is drawn from the MsgCreateRewardsPlan sender's account and
	// transferred to the community pool.
	RewardsPlanCreationFee github_com_cosmos_cosmos_sdk_types.Coins `` /* 175-byte string literal not displayed */
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns default Params

func NewParams

func NewParams(rewardsPlanCreationFee sdk.Coins) Params

NewParams creates a new Params object

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (*Params) Validate

func (p *Params) Validate() error

Validate checks that the parameters have valid values.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type Pool

type Pool struct {
	Denom string                                   `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"`
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins" yaml:"coins"`
}

Pool is a Coins wrapper with denom which represents the rewards pool for the given denom. It is used to represent the rewards associated with the denom.

func NewPool

func NewPool(denom string, coins sdk.Coins) Pool

NewPool return new pool instance

func (Pool) Add

func (pool Pool) Add(poolB Pool) Pool

Add adds amounts of two pool coins with same denom.

func (*Pool) Descriptor

func (*Pool) Descriptor() ([]byte, []int)

func (Pool) IsEmpty

func (pool Pool) IsEmpty() bool

IsEmpty returns wether the pool coins are empty or not

func (Pool) IsEqual

func (pool Pool) IsEqual(other Pool) bool

IsEqual returns true if the two sets of Pools have the same value.

func (*Pool) Marshal

func (m *Pool) Marshal() (dAtA []byte, err error)

func (*Pool) MarshalTo

func (m *Pool) MarshalTo(dAtA []byte) (int, error)

func (*Pool) MarshalToSizedBuffer

func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Pool) ProtoMessage

func (*Pool) ProtoMessage()

func (*Pool) Reset

func (m *Pool) Reset()

func (*Pool) Size

func (m *Pool) Size() (n int)

func (*Pool) String

func (m *Pool) String() string

func (Pool) Sub

func (pool Pool) Sub(poolB Pool) Pool

Sub subtracts amounts of two pool coins with same denom.

func (*Pool) Unmarshal

func (m *Pool) Unmarshal(dAtA []byte) error

func (*Pool) XXX_DiscardUnknown

func (m *Pool) XXX_DiscardUnknown()

func (*Pool) XXX_Marshal

func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pool) XXX_Merge

func (m *Pool) XXX_Merge(src proto.Message)

func (*Pool) XXX_Size

func (m *Pool) XXX_Size() int

func (*Pool) XXX_Unmarshal

func (m *Pool) XXX_Unmarshal(b []byte) error

type PoolServiceTotalDelegatorShares

type PoolServiceTotalDelegatorShares struct {
	PoolID    uint32                                      `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	ServiceID uint32                                      `protobuf:"varint,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	Shares    github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,3,rep,name=shares,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"shares"`
}

PoolServiceTotalDelegatorShares represents the total delegator shares for a pool-service pair.

func NewPoolServiceTotalDelegatorShares

func NewPoolServiceTotalDelegatorShares(poolID, serviceID uint32, shares sdk.DecCoins) PoolServiceTotalDelegatorShares

NewPoolServiceTotalDelegatorShares creates a new pool service total delegator shares

func (*PoolServiceTotalDelegatorShares) Descriptor

func (*PoolServiceTotalDelegatorShares) Descriptor() ([]byte, []int)

func (*PoolServiceTotalDelegatorShares) Marshal

func (m *PoolServiceTotalDelegatorShares) Marshal() (dAtA []byte, err error)

func (*PoolServiceTotalDelegatorShares) MarshalTo

func (m *PoolServiceTotalDelegatorShares) MarshalTo(dAtA []byte) (int, error)

func (*PoolServiceTotalDelegatorShares) MarshalToSizedBuffer

func (m *PoolServiceTotalDelegatorShares) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PoolServiceTotalDelegatorShares) ProtoMessage

func (*PoolServiceTotalDelegatorShares) ProtoMessage()

func (*PoolServiceTotalDelegatorShares) Reset

func (*PoolServiceTotalDelegatorShares) Size

func (m *PoolServiceTotalDelegatorShares) Size() (n int)

func (*PoolServiceTotalDelegatorShares) String

func (*PoolServiceTotalDelegatorShares) Unmarshal

func (m *PoolServiceTotalDelegatorShares) Unmarshal(dAtA []byte) error

func (PoolServiceTotalDelegatorShares) Validate

func (shares PoolServiceTotalDelegatorShares) Validate() error

Validate validates the pool service total delegator shares

func (*PoolServiceTotalDelegatorShares) XXX_DiscardUnknown

func (m *PoolServiceTotalDelegatorShares) XXX_DiscardUnknown()

func (*PoolServiceTotalDelegatorShares) XXX_Marshal

func (m *PoolServiceTotalDelegatorShares) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PoolServiceTotalDelegatorShares) XXX_Merge

func (m *PoolServiceTotalDelegatorShares) XXX_Merge(src proto.Message)

func (*PoolServiceTotalDelegatorShares) XXX_Size

func (m *PoolServiceTotalDelegatorShares) XXX_Size() int

func (*PoolServiceTotalDelegatorShares) XXX_Unmarshal

func (m *PoolServiceTotalDelegatorShares) XXX_Unmarshal(b []byte) error

type Pools

type Pools []Pool

Pools defines denom and sdk.Coins wrapper to represents rewards pools for multi-token staking

func NewPools

func NewPools(pools ...Pool) Pools

NewPools creates a new Pools instance

func (Pools) Add

func (pools Pools) Add(poolsB ...Pool) Pools

Add adds two sets of Pools

func (Pools) CoinsOf

func (pools Pools) CoinsOf(denom string) sdk.Coins

CoinsOf returns the Coins of a denom from Pools

func (Pools) IsAnyNegative

func (pools Pools) IsAnyNegative() bool

IsAnyNegative returns true if there is at least one coin whose amount is negative; returns false otherwise. It returns false if the Pools set is empty too.

func (Pools) IsEmpty

func (pools Pools) IsEmpty() bool

IsZero returns whether all pools are empty

func (Pools) IsEqual

func (pools Pools) IsEqual(poolsB Pools) bool

IsEqual returns true if the two sets of Pools have the same value.

func (Pools) Len

func (pools Pools) Len() int

Len implements sort.Interface for Pools

func (Pools) Less

func (pools Pools) Less(i, j int) bool

Less implements sort.Interface for Pools

func (Pools) SafeSub

func (pools Pools) SafeSub(poolsB Pools) (Pools, bool)

SafeSub performs the same arithmetic as Sub but returns a boolean if any negative Pool coins amount was returned.

func (Pools) Sort

func (pools Pools) Sort() Pools

Sort is a helper function to sort the set of p in-place

func (Pools) String

func (pools Pools) String() string

String implements the Stringer interface for Pools. It returns a human-readable representation of Pools.

func (Pools) Sub

func (pools Pools) Sub(poolsB Pools) Pools

Sub subtracts a set of Pools from another (adds the inverse).

func (Pools) Sum

func (pools Pools) Sum() (coins sdk.Coins)

Sum returns sum of pool tokens

func (Pools) Swap

func (pools Pools) Swap(i, j int)

Swap implements sort.Interface for Pools

type PoolsKeeper

type PoolsKeeper interface {
	GetPool(ctx context.Context, poolID uint32) (poolstypes.Pool, bool, error)
	GetPools(ctx context.Context) ([]poolstypes.Pool, error)
	IteratePools(ctx context.Context, cb func(pool poolstypes.Pool) (stop bool, err error)) error
}

type QueryClient

type QueryClient interface {
	// Params defines a gRPC query method that returns the parameters of the
	// module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// RewardsPlans queries all rewards plans.
	RewardsPlans(ctx context.Context, in *QueryRewardsPlansRequest, opts ...grpc.CallOption) (*QueryRewardsPlansResponse, error)
	// RewardsPlan queries a specific rewards plan by its ID.
	RewardsPlan(ctx context.Context, in *QueryRewardsPlanRequest, opts ...grpc.CallOption) (*QueryRewardsPlanResponse, error)
	// PoolOutstandingRewards queries rewards of a pool.
	PoolOutstandingRewards(ctx context.Context, in *QueryPoolOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryPoolOutstandingRewardsResponse, error)
	// OperatorOutstandingRewards queries rewards of an operator.
	OperatorOutstandingRewards(ctx context.Context, in *QueryOperatorOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryOperatorOutstandingRewardsResponse, error)
	// ServiceOutstandingRewards queries rewards of a service.
	ServiceOutstandingRewards(ctx context.Context, in *QueryServiceOutstandingRewardsRequest, opts ...grpc.CallOption) (*QueryServiceOutstandingRewardsResponse, error)
	// OperatorCommission queries accumulated commission for an operator.
	OperatorCommission(ctx context.Context, in *QueryOperatorCommissionRequest, opts ...grpc.CallOption) (*QueryOperatorCommissionResponse, error)
	// PoolDelegationRewards queries the total rewards accrued by a pool
	// delegation.
	PoolDelegationRewards(ctx context.Context, in *QueryPoolDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryPoolDelegationRewardsResponse, error)
	// OperatorDelegationRewards queries the total rewards accrued by a operator
	// delegation.
	OperatorDelegationRewards(ctx context.Context, in *QueryOperatorDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryOperatorDelegationRewardsResponse, error)
	// ServiceDelegationRewards queries the total rewards accrued by a service
	// delegation.
	ServiceDelegationRewards(ctx context.Context, in *QueryServiceDelegationRewardsRequest, opts ...grpc.CallOption) (*QueryServiceDelegationRewardsResponse, error)
	// DelegatorTotalRewards queries the total rewards accrued by a single
	// delegator
	DelegatorTotalRewards(ctx context.Context, in *QueryDelegatorTotalRewardsRequest, opts ...grpc.CallOption) (*QueryDelegatorTotalRewardsResponse, error)
	// DelegatorWithdrawAddress queries withdraw address of a delegator.
	DelegatorWithdrawAddress(ctx context.Context, in *QueryDelegatorWithdrawAddressRequest, opts ...grpc.CallOption) (*QueryDelegatorWithdrawAddressResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryDelegatorTotalRewardsRequest

type QueryDelegatorTotalRewardsRequest struct {
	// delegator_address defines the delegator address to query for.
	DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"`
}

QueryDelegatorTotalRewardsRequest is the request type for the Query/DelegatorTotalRewards RPC method.

func NewQueryDelegatorTotalRewardsRequest

func NewQueryDelegatorTotalRewardsRequest(delegator string) *QueryDelegatorTotalRewardsRequest

func (*QueryDelegatorTotalRewardsRequest) Descriptor

func (*QueryDelegatorTotalRewardsRequest) Descriptor() ([]byte, []int)

func (*QueryDelegatorTotalRewardsRequest) Marshal

func (m *QueryDelegatorTotalRewardsRequest) Marshal() (dAtA []byte, err error)

func (*QueryDelegatorTotalRewardsRequest) MarshalTo

func (m *QueryDelegatorTotalRewardsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryDelegatorTotalRewardsRequest) MarshalToSizedBuffer

func (m *QueryDelegatorTotalRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDelegatorTotalRewardsRequest) ProtoMessage

func (*QueryDelegatorTotalRewardsRequest) ProtoMessage()

func (*QueryDelegatorTotalRewardsRequest) Reset

func (*QueryDelegatorTotalRewardsRequest) Size

func (m *QueryDelegatorTotalRewardsRequest) Size() (n int)

func (*QueryDelegatorTotalRewardsRequest) String

func (*QueryDelegatorTotalRewardsRequest) Unmarshal

func (m *QueryDelegatorTotalRewardsRequest) Unmarshal(dAtA []byte) error

func (*QueryDelegatorTotalRewardsRequest) XXX_DiscardUnknown

func (m *QueryDelegatorTotalRewardsRequest) XXX_DiscardUnknown()

func (*QueryDelegatorTotalRewardsRequest) XXX_Marshal

func (m *QueryDelegatorTotalRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDelegatorTotalRewardsRequest) XXX_Merge

func (*QueryDelegatorTotalRewardsRequest) XXX_Size

func (m *QueryDelegatorTotalRewardsRequest) XXX_Size() int

func (*QueryDelegatorTotalRewardsRequest) XXX_Unmarshal

func (m *QueryDelegatorTotalRewardsRequest) XXX_Unmarshal(b []byte) error

type QueryDelegatorTotalRewardsResponse

type QueryDelegatorTotalRewardsResponse struct {
	// rewards defines all the rewards accrued by a delegator.
	Rewards []DelegationDelegatorReward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards"`
	// total defines the sum of all the rewards.
	Total DecPools `protobuf:"bytes,2,rep,name=total,proto3,castrepeated=DecPools" json:"total"`
}

QueryDelegatorTotalRewardsResponse is the response type for the Query/DelegatorTotalRewards RPC method.

func (*QueryDelegatorTotalRewardsResponse) Descriptor

func (*QueryDelegatorTotalRewardsResponse) Descriptor() ([]byte, []int)

func (*QueryDelegatorTotalRewardsResponse) Marshal

func (m *QueryDelegatorTotalRewardsResponse) Marshal() (dAtA []byte, err error)

func (*QueryDelegatorTotalRewardsResponse) MarshalTo

func (m *QueryDelegatorTotalRewardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryDelegatorTotalRewardsResponse) MarshalToSizedBuffer

func (m *QueryDelegatorTotalRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDelegatorTotalRewardsResponse) ProtoMessage

func (*QueryDelegatorTotalRewardsResponse) ProtoMessage()

func (*QueryDelegatorTotalRewardsResponse) Reset

func (*QueryDelegatorTotalRewardsResponse) Size

func (*QueryDelegatorTotalRewardsResponse) String

func (*QueryDelegatorTotalRewardsResponse) Unmarshal

func (m *QueryDelegatorTotalRewardsResponse) Unmarshal(dAtA []byte) error

func (*QueryDelegatorTotalRewardsResponse) XXX_DiscardUnknown

func (m *QueryDelegatorTotalRewardsResponse) XXX_DiscardUnknown()

func (*QueryDelegatorTotalRewardsResponse) XXX_Marshal

func (m *QueryDelegatorTotalRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDelegatorTotalRewardsResponse) XXX_Merge

func (*QueryDelegatorTotalRewardsResponse) XXX_Size

func (*QueryDelegatorTotalRewardsResponse) XXX_Unmarshal

func (m *QueryDelegatorTotalRewardsResponse) XXX_Unmarshal(b []byte) error

type QueryDelegatorWithdrawAddressRequest

type QueryDelegatorWithdrawAddressRequest struct {
	// delegator_address defines the delegator address to query for.
	DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"`
}

QueryDelegatorWithdrawAddressRequest is the request type for the Query/DelegatorWithdrawAddress RPC method.

func NewQueryDelegatorWithdrawAddressRequest

func NewQueryDelegatorWithdrawAddressRequest(delegator string) *QueryDelegatorWithdrawAddressRequest

func (*QueryDelegatorWithdrawAddressRequest) Descriptor

func (*QueryDelegatorWithdrawAddressRequest) Descriptor() ([]byte, []int)

func (*QueryDelegatorWithdrawAddressRequest) Marshal

func (m *QueryDelegatorWithdrawAddressRequest) Marshal() (dAtA []byte, err error)

func (*QueryDelegatorWithdrawAddressRequest) MarshalTo

func (m *QueryDelegatorWithdrawAddressRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryDelegatorWithdrawAddressRequest) MarshalToSizedBuffer

func (m *QueryDelegatorWithdrawAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDelegatorWithdrawAddressRequest) ProtoMessage

func (*QueryDelegatorWithdrawAddressRequest) ProtoMessage()

func (*QueryDelegatorWithdrawAddressRequest) Reset

func (*QueryDelegatorWithdrawAddressRequest) Size

func (*QueryDelegatorWithdrawAddressRequest) String

func (*QueryDelegatorWithdrawAddressRequest) Unmarshal

func (m *QueryDelegatorWithdrawAddressRequest) Unmarshal(dAtA []byte) error

func (*QueryDelegatorWithdrawAddressRequest) XXX_DiscardUnknown

func (m *QueryDelegatorWithdrawAddressRequest) XXX_DiscardUnknown()

func (*QueryDelegatorWithdrawAddressRequest) XXX_Marshal

func (m *QueryDelegatorWithdrawAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDelegatorWithdrawAddressRequest) XXX_Merge

func (*QueryDelegatorWithdrawAddressRequest) XXX_Size

func (*QueryDelegatorWithdrawAddressRequest) XXX_Unmarshal

func (m *QueryDelegatorWithdrawAddressRequest) XXX_Unmarshal(b []byte) error

type QueryDelegatorWithdrawAddressResponse

type QueryDelegatorWithdrawAddressResponse struct {
	// withdraw_address defines the delegator address to query for.
	WithdrawAddress string `protobuf:"bytes,1,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"`
}

QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method.

func (*QueryDelegatorWithdrawAddressResponse) Descriptor

func (*QueryDelegatorWithdrawAddressResponse) Descriptor() ([]byte, []int)

func (*QueryDelegatorWithdrawAddressResponse) Marshal

func (m *QueryDelegatorWithdrawAddressResponse) Marshal() (dAtA []byte, err error)

func (*QueryDelegatorWithdrawAddressResponse) MarshalTo

func (m *QueryDelegatorWithdrawAddressResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryDelegatorWithdrawAddressResponse) MarshalToSizedBuffer

func (m *QueryDelegatorWithdrawAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage

func (*QueryDelegatorWithdrawAddressResponse) ProtoMessage()

func (*QueryDelegatorWithdrawAddressResponse) Reset

func (*QueryDelegatorWithdrawAddressResponse) Size

func (*QueryDelegatorWithdrawAddressResponse) String

func (*QueryDelegatorWithdrawAddressResponse) Unmarshal

func (m *QueryDelegatorWithdrawAddressResponse) Unmarshal(dAtA []byte) error

func (*QueryDelegatorWithdrawAddressResponse) XXX_DiscardUnknown

func (m *QueryDelegatorWithdrawAddressResponse) XXX_DiscardUnknown()

func (*QueryDelegatorWithdrawAddressResponse) XXX_Marshal

func (m *QueryDelegatorWithdrawAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryDelegatorWithdrawAddressResponse) XXX_Merge

func (*QueryDelegatorWithdrawAddressResponse) XXX_Size

func (*QueryDelegatorWithdrawAddressResponse) XXX_Unmarshal

func (m *QueryDelegatorWithdrawAddressResponse) XXX_Unmarshal(b []byte) error

type QueryOperatorCommissionRequest

type QueryOperatorCommissionRequest struct {
	// operator_id defines the validator address to query for.
	OperatorId uint32 `protobuf:"varint,1,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty"`
}

QueryOperatorCommissionRequest is the request type for the Query/OperatorCommission RPC method

func NewQueryOperatorCommissionRequest

func NewQueryOperatorCommissionRequest(operatorID uint32) *QueryOperatorCommissionRequest

NewQueryOperatorCommissionRequest creates a new instance of QueryOperatorCommissionRequest.

func (*QueryOperatorCommissionRequest) Descriptor

func (*QueryOperatorCommissionRequest) Descriptor() ([]byte, []int)

func (*QueryOperatorCommissionRequest) Marshal

func (m *QueryOperatorCommissionRequest) Marshal() (dAtA []byte, err error)

func (*QueryOperatorCommissionRequest) MarshalTo

func (m *QueryOperatorCommissionRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryOperatorCommissionRequest) MarshalToSizedBuffer

func (m *QueryOperatorCommissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryOperatorCommissionRequest) ProtoMessage

func (*QueryOperatorCommissionRequest) ProtoMessage()

func (*QueryOperatorCommissionRequest) Reset

func (m *QueryOperatorCommissionRequest) Reset()

func (*QueryOperatorCommissionRequest) Size

func (m *QueryOperatorCommissionRequest) Size() (n int)

func (*QueryOperatorCommissionRequest) String

func (*QueryOperatorCommissionRequest) Unmarshal

func (m *QueryOperatorCommissionRequest) Unmarshal(dAtA []byte) error

func (*QueryOperatorCommissionRequest) XXX_DiscardUnknown

func (m *QueryOperatorCommissionRequest) XXX_DiscardUnknown()

func (*QueryOperatorCommissionRequest) XXX_Marshal

func (m *QueryOperatorCommissionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryOperatorCommissionRequest) XXX_Merge

func (m *QueryOperatorCommissionRequest) XXX_Merge(src proto.Message)

func (*QueryOperatorCommissionRequest) XXX_Size

func (m *QueryOperatorCommissionRequest) XXX_Size() int

func (*QueryOperatorCommissionRequest) XXX_Unmarshal

func (m *QueryOperatorCommissionRequest) XXX_Unmarshal(b []byte) error

type QueryOperatorCommissionResponse

type QueryOperatorCommissionResponse struct {
	// commission defines the commission the operator received.
	Commission AccumulatedCommission `protobuf:"bytes,1,opt,name=commission,proto3" json:"commission"`
}

QueryOperatorCommissionResponse is the response type for the Query/OperatorCommission RPC method

func (*QueryOperatorCommissionResponse) Descriptor

func (*QueryOperatorCommissionResponse) Descriptor() ([]byte, []int)

func (*QueryOperatorCommissionResponse) Marshal

func (m *QueryOperatorCommissionResponse) Marshal() (dAtA []byte, err error)

func (*QueryOperatorCommissionResponse) MarshalTo

func (m *QueryOperatorCommissionResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryOperatorCommissionResponse) MarshalToSizedBuffer

func (m *QueryOperatorCommissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryOperatorCommissionResponse) ProtoMessage

func (*QueryOperatorCommissionResponse) ProtoMessage()

func (*QueryOperatorCommissionResponse) Reset

func (*QueryOperatorCommissionResponse) Size

func (m *QueryOperatorCommissionResponse) Size() (n int)

func (*QueryOperatorCommissionResponse) String

func (*QueryOperatorCommissionResponse) Unmarshal

func (m *QueryOperatorCommissionResponse) Unmarshal(dAtA []byte) error

func (*QueryOperatorCommissionResponse) XXX_DiscardUnknown

func (m *QueryOperatorCommissionResponse) XXX_DiscardUnknown()

func (*QueryOperatorCommissionResponse) XXX_Marshal

func (m *QueryOperatorCommissionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryOperatorCommissionResponse) XXX_Merge

func (m *QueryOperatorCommissionResponse) XXX_Merge(src proto.Message)

func (*QueryOperatorCommissionResponse) XXX_Size

func (m *QueryOperatorCommissionResponse) XXX_Size() int

func (*QueryOperatorCommissionResponse) XXX_Unmarshal

func (m *QueryOperatorCommissionResponse) XXX_Unmarshal(b []byte) error

type QueryOperatorDelegationRewardsRequest

type QueryOperatorDelegationRewardsRequest struct {
	// delegator_address defines the delegator address to query for.
	DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"`
	// operator_id defines the operator ID to query for.
	OperatorId uint32 `protobuf:"varint,2,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty"`
}

QueryOperatorDelegationRewardsRequest is the request type for the Query/OperatorDelegationRewards RPC method.

func NewQueryOperatorDelegationRewardsRequest

func NewQueryOperatorDelegationRewardsRequest(operatorID uint32, delegator string) *QueryOperatorDelegationRewardsRequest

NewQueryOperatorDelegationRewardsRequest creates a new instance of QueryOperatorDelegationRewardsRequest.

func (*QueryOperatorDelegationRewardsRequest) Descriptor

func (*QueryOperatorDelegationRewardsRequest) Descriptor() ([]byte, []int)

func (*QueryOperatorDelegationRewardsRequest) Marshal

func (m *QueryOperatorDelegationRewardsRequest) Marshal() (dAtA []byte, err error)

func (*QueryOperatorDelegationRewardsRequest) MarshalTo

func (m *QueryOperatorDelegationRewardsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryOperatorDelegationRewardsRequest) MarshalToSizedBuffer

func (m *QueryOperatorDelegationRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryOperatorDelegationRewardsRequest) ProtoMessage

func (*QueryOperatorDelegationRewardsRequest) ProtoMessage()

func (*QueryOperatorDelegationRewardsRequest) Reset

func (*QueryOperatorDelegationRewardsRequest) Size

func (*QueryOperatorDelegationRewardsRequest) String

func (*QueryOperatorDelegationRewardsRequest) Unmarshal

func (m *QueryOperatorDelegationRewardsRequest) Unmarshal(dAtA []byte) error

func (*QueryOperatorDelegationRewardsRequest) XXX_DiscardUnknown

func (m *QueryOperatorDelegationRewardsRequest) XXX_DiscardUnknown()

func (*QueryOperatorDelegationRewardsRequest) XXX_Marshal

func (m *QueryOperatorDelegationRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryOperatorDelegationRewardsRequest) XXX_Merge

func (*QueryOperatorDelegationRewardsRequest) XXX_Size

func (*QueryOperatorDelegationRewardsRequest) XXX_Unmarshal

func (m *QueryOperatorDelegationRewardsRequest) XXX_Unmarshal(b []byte) error

type QueryOperatorDelegationRewardsResponse

type QueryOperatorDelegationRewardsResponse struct {
	// rewards defines the rewards accrued by a delegation.
	Rewards DecPools `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=DecPools" json:"rewards"`
}

QueryOperatorDelegationRewardsResponse is the response type for the Query/OperatorDelegationRewards RPC method.

func (*QueryOperatorDelegationRewardsResponse) Descriptor

func (*QueryOperatorDelegationRewardsResponse) Descriptor() ([]byte, []int)

func (*QueryOperatorDelegationRewardsResponse) Marshal

func (m *QueryOperatorDelegationRewardsResponse) Marshal() (dAtA []byte, err error)

func (*QueryOperatorDelegationRewardsResponse) MarshalTo

func (m *QueryOperatorDelegationRewardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryOperatorDelegationRewardsResponse) MarshalToSizedBuffer

func (m *QueryOperatorDelegationRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryOperatorDelegationRewardsResponse) ProtoMessage

func (*QueryOperatorDelegationRewardsResponse) Reset

func (*QueryOperatorDelegationRewardsResponse) Size

func (*QueryOperatorDelegationRewardsResponse) String

func (*QueryOperatorDelegationRewardsResponse) Unmarshal

func (m *QueryOperatorDelegationRewardsResponse) Unmarshal(dAtA []byte) error

func (*QueryOperatorDelegationRewardsResponse) XXX_DiscardUnknown

func (m *QueryOperatorDelegationRewardsResponse) XXX_DiscardUnknown()

func (*QueryOperatorDelegationRewardsResponse) XXX_Marshal

func (m *QueryOperatorDelegationRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryOperatorDelegationRewardsResponse) XXX_Merge

func (*QueryOperatorDelegationRewardsResponse) XXX_Size

func (*QueryOperatorDelegationRewardsResponse) XXX_Unmarshal

func (m *QueryOperatorDelegationRewardsResponse) XXX_Unmarshal(b []byte) error

type QueryOperatorOutstandingRewardsRequest

type QueryOperatorOutstandingRewardsRequest struct {
	// operator_id defines the operator ID to query for.
	OperatorId uint32 `protobuf:"varint,1,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty"`
}

QueryOperatorOutstandingRewardsRequest is the request type for the Query/OperatorOutstandingRewards RPC method.

func NewQueryOperatorOutstandingRewardsRequest

func NewQueryOperatorOutstandingRewardsRequest(operatorID uint32) *QueryOperatorOutstandingRewardsRequest

NewQueryOperatorOutstandingRewardsRequest creates a new instance of QueryOperatorOutstandingRewardsRequest.

func (*QueryOperatorOutstandingRewardsRequest) Descriptor

func (*QueryOperatorOutstandingRewardsRequest) Descriptor() ([]byte, []int)

func (*QueryOperatorOutstandingRewardsRequest) Marshal

func (m *QueryOperatorOutstandingRewardsRequest) Marshal() (dAtA []byte, err error)

func (*QueryOperatorOutstandingRewardsRequest) MarshalTo

func (m *QueryOperatorOutstandingRewardsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryOperatorOutstandingRewardsRequest) MarshalToSizedBuffer

func (m *QueryOperatorOutstandingRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryOperatorOutstandingRewardsRequest) ProtoMessage

func (*QueryOperatorOutstandingRewardsRequest) Reset

func (*QueryOperatorOutstandingRewardsRequest) Size

func (*QueryOperatorOutstandingRewardsRequest) String

func (*QueryOperatorOutstandingRewardsRequest) Unmarshal

func (m *QueryOperatorOutstandingRewardsRequest) Unmarshal(dAtA []byte) error

func (*QueryOperatorOutstandingRewardsRequest) XXX_DiscardUnknown

func (m *QueryOperatorOutstandingRewardsRequest) XXX_DiscardUnknown()

func (*QueryOperatorOutstandingRewardsRequest) XXX_Marshal

func (m *QueryOperatorOutstandingRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryOperatorOutstandingRewardsRequest) XXX_Merge

func (*QueryOperatorOutstandingRewardsRequest) XXX_Size

func (*QueryOperatorOutstandingRewardsRequest) XXX_Unmarshal

func (m *QueryOperatorOutstandingRewardsRequest) XXX_Unmarshal(b []byte) error

type QueryOperatorOutstandingRewardsResponse

type QueryOperatorOutstandingRewardsResponse struct {
	Rewards OutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards"`
}

QueryOperatorOutstandingRewardsResponse is the response type for the Query/OperatorOutstandingRewards RPC method.

func (*QueryOperatorOutstandingRewardsResponse) Descriptor

func (*QueryOperatorOutstandingRewardsResponse) Descriptor() ([]byte, []int)

func (*QueryOperatorOutstandingRewardsResponse) Marshal

func (m *QueryOperatorOutstandingRewardsResponse) Marshal() (dAtA []byte, err error)

func (*QueryOperatorOutstandingRewardsResponse) MarshalTo

func (m *QueryOperatorOutstandingRewardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryOperatorOutstandingRewardsResponse) MarshalToSizedBuffer

func (m *QueryOperatorOutstandingRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryOperatorOutstandingRewardsResponse) ProtoMessage

func (*QueryOperatorOutstandingRewardsResponse) Reset

func (*QueryOperatorOutstandingRewardsResponse) Size

func (*QueryOperatorOutstandingRewardsResponse) String

func (*QueryOperatorOutstandingRewardsResponse) Unmarshal

func (m *QueryOperatorOutstandingRewardsResponse) Unmarshal(dAtA []byte) error

func (*QueryOperatorOutstandingRewardsResponse) XXX_DiscardUnknown

func (m *QueryOperatorOutstandingRewardsResponse) XXX_DiscardUnknown()

func (*QueryOperatorOutstandingRewardsResponse) XXX_Marshal

func (m *QueryOperatorOutstandingRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryOperatorOutstandingRewardsResponse) XXX_Merge

func (*QueryOperatorOutstandingRewardsResponse) XXX_Size

func (*QueryOperatorOutstandingRewardsResponse) XXX_Unmarshal

func (m *QueryOperatorOutstandingRewardsResponse) XXX_Unmarshal(b []byte) error

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

func (*QueryParamsRequest) Descriptor() ([]byte, []int)

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

func (*QueryParamsResponse) Descriptor() ([]byte, []int)

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryPoolDelegationRewardsRequest

type QueryPoolDelegationRewardsRequest struct {
	// delegator_address defines the delegator address to query for.
	DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"`
	// pool_id defines the pool ID to query for.
	PoolId uint32 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
}

QueryPoolDelegationRewardsRequest is the request type for the Query/PoolDelegationRewards RPC method.

func NewQueryPoolDelegationRewardsRequest

func NewQueryPoolDelegationRewardsRequest(poolID uint32, delegator string) *QueryPoolDelegationRewardsRequest

NewQueryPoolDelegationRewardsRequest creates a new instance of QueryPoolDelegationRewardsRequest.

func (*QueryPoolDelegationRewardsRequest) Descriptor

func (*QueryPoolDelegationRewardsRequest) Descriptor() ([]byte, []int)

func (*QueryPoolDelegationRewardsRequest) Marshal

func (m *QueryPoolDelegationRewardsRequest) Marshal() (dAtA []byte, err error)

func (*QueryPoolDelegationRewardsRequest) MarshalTo

func (m *QueryPoolDelegationRewardsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryPoolDelegationRewardsRequest) MarshalToSizedBuffer

func (m *QueryPoolDelegationRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPoolDelegationRewardsRequest) ProtoMessage

func (*QueryPoolDelegationRewardsRequest) ProtoMessage()

func (*QueryPoolDelegationRewardsRequest) Reset

func (*QueryPoolDelegationRewardsRequest) Size

func (m *QueryPoolDelegationRewardsRequest) Size() (n int)

func (*QueryPoolDelegationRewardsRequest) String

func (*QueryPoolDelegationRewardsRequest) Unmarshal

func (m *QueryPoolDelegationRewardsRequest) Unmarshal(dAtA []byte) error

func (*QueryPoolDelegationRewardsRequest) XXX_DiscardUnknown

func (m *QueryPoolDelegationRewardsRequest) XXX_DiscardUnknown()

func (*QueryPoolDelegationRewardsRequest) XXX_Marshal

func (m *QueryPoolDelegationRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPoolDelegationRewardsRequest) XXX_Merge

func (*QueryPoolDelegationRewardsRequest) XXX_Size

func (m *QueryPoolDelegationRewardsRequest) XXX_Size() int

func (*QueryPoolDelegationRewardsRequest) XXX_Unmarshal

func (m *QueryPoolDelegationRewardsRequest) XXX_Unmarshal(b []byte) error

type QueryPoolDelegationRewardsResponse

type QueryPoolDelegationRewardsResponse struct {
	// rewards defines the rewards accrued by a delegation.
	Rewards DecPools `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=DecPools" json:"rewards"`
}

QueryPoolDelegationRewardsResponse is the response type for the Query/PoolDelegationRewards RPC method.

func (*QueryPoolDelegationRewardsResponse) Descriptor

func (*QueryPoolDelegationRewardsResponse) Descriptor() ([]byte, []int)

func (*QueryPoolDelegationRewardsResponse) Marshal

func (m *QueryPoolDelegationRewardsResponse) Marshal() (dAtA []byte, err error)

func (*QueryPoolDelegationRewardsResponse) MarshalTo

func (m *QueryPoolDelegationRewardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPoolDelegationRewardsResponse) MarshalToSizedBuffer

func (m *QueryPoolDelegationRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPoolDelegationRewardsResponse) ProtoMessage

func (*QueryPoolDelegationRewardsResponse) ProtoMessage()

func (*QueryPoolDelegationRewardsResponse) Reset

func (*QueryPoolDelegationRewardsResponse) Size

func (*QueryPoolDelegationRewardsResponse) String

func (*QueryPoolDelegationRewardsResponse) Unmarshal

func (m *QueryPoolDelegationRewardsResponse) Unmarshal(dAtA []byte) error

func (*QueryPoolDelegationRewardsResponse) XXX_DiscardUnknown

func (m *QueryPoolDelegationRewardsResponse) XXX_DiscardUnknown()

func (*QueryPoolDelegationRewardsResponse) XXX_Marshal

func (m *QueryPoolDelegationRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPoolDelegationRewardsResponse) XXX_Merge

func (*QueryPoolDelegationRewardsResponse) XXX_Size

func (*QueryPoolDelegationRewardsResponse) XXX_Unmarshal

func (m *QueryPoolDelegationRewardsResponse) XXX_Unmarshal(b []byte) error

type QueryPoolOutstandingRewardsRequest

type QueryPoolOutstandingRewardsRequest struct {
	// pool_id defines the pool ID to query for.
	PoolId uint32 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
}

QueryPoolOutstandingRewardsRequest is the request type for the Query/PoolOutstandingRewards RPC method.

func NewQueryPoolOutstandingRewardsRequest

func NewQueryPoolOutstandingRewardsRequest(poolID uint32) *QueryPoolOutstandingRewardsRequest

NewQueryPoolOutstandingRewardsRequest creates a new instance of QueryPoolOutstandingRewardsRequest.

func (*QueryPoolOutstandingRewardsRequest) Descriptor

func (*QueryPoolOutstandingRewardsRequest) Descriptor() ([]byte, []int)

func (*QueryPoolOutstandingRewardsRequest) Marshal

func (m *QueryPoolOutstandingRewardsRequest) Marshal() (dAtA []byte, err error)

func (*QueryPoolOutstandingRewardsRequest) MarshalTo

func (m *QueryPoolOutstandingRewardsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryPoolOutstandingRewardsRequest) MarshalToSizedBuffer

func (m *QueryPoolOutstandingRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPoolOutstandingRewardsRequest) ProtoMessage

func (*QueryPoolOutstandingRewardsRequest) ProtoMessage()

func (*QueryPoolOutstandingRewardsRequest) Reset

func (*QueryPoolOutstandingRewardsRequest) Size

func (*QueryPoolOutstandingRewardsRequest) String

func (*QueryPoolOutstandingRewardsRequest) Unmarshal

func (m *QueryPoolOutstandingRewardsRequest) Unmarshal(dAtA []byte) error

func (*QueryPoolOutstandingRewardsRequest) XXX_DiscardUnknown

func (m *QueryPoolOutstandingRewardsRequest) XXX_DiscardUnknown()

func (*QueryPoolOutstandingRewardsRequest) XXX_Marshal

func (m *QueryPoolOutstandingRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPoolOutstandingRewardsRequest) XXX_Merge

func (*QueryPoolOutstandingRewardsRequest) XXX_Size

func (*QueryPoolOutstandingRewardsRequest) XXX_Unmarshal

func (m *QueryPoolOutstandingRewardsRequest) XXX_Unmarshal(b []byte) error

type QueryPoolOutstandingRewardsResponse

type QueryPoolOutstandingRewardsResponse struct {
	Rewards OutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards"`
}

QueryPoolOutstandingRewardsResponse is the response type for the Query/PoolOutstandingRewards RPC method.

func (*QueryPoolOutstandingRewardsResponse) Descriptor

func (*QueryPoolOutstandingRewardsResponse) Descriptor() ([]byte, []int)

func (*QueryPoolOutstandingRewardsResponse) Marshal

func (m *QueryPoolOutstandingRewardsResponse) Marshal() (dAtA []byte, err error)

func (*QueryPoolOutstandingRewardsResponse) MarshalTo

func (m *QueryPoolOutstandingRewardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPoolOutstandingRewardsResponse) MarshalToSizedBuffer

func (m *QueryPoolOutstandingRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPoolOutstandingRewardsResponse) ProtoMessage

func (*QueryPoolOutstandingRewardsResponse) ProtoMessage()

func (*QueryPoolOutstandingRewardsResponse) Reset

func (*QueryPoolOutstandingRewardsResponse) Size

func (*QueryPoolOutstandingRewardsResponse) String

func (*QueryPoolOutstandingRewardsResponse) Unmarshal

func (m *QueryPoolOutstandingRewardsResponse) Unmarshal(dAtA []byte) error

func (*QueryPoolOutstandingRewardsResponse) XXX_DiscardUnknown

func (m *QueryPoolOutstandingRewardsResponse) XXX_DiscardUnknown()

func (*QueryPoolOutstandingRewardsResponse) XXX_Marshal

func (m *QueryPoolOutstandingRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPoolOutstandingRewardsResponse) XXX_Merge

func (*QueryPoolOutstandingRewardsResponse) XXX_Size

func (*QueryPoolOutstandingRewardsResponse) XXX_Unmarshal

func (m *QueryPoolOutstandingRewardsResponse) XXX_Unmarshal(b []byte) error

type QueryRewardsPlanRequest

type QueryRewardsPlanRequest struct {
	PlanId uint64 `protobuf:"varint,1,opt,name=plan_id,json=planId,proto3" json:"plan_id,omitempty"`
}

QueryRewardsPlanRequest is the request type for the Query/RewardsPlan RPC method.

func NewQueryRewardsPlanRequest

func NewQueryRewardsPlanRequest(planID uint64) *QueryRewardsPlanRequest

NewQueryRewardsPlanRequest creates a new instance of QueryRewardsPlanRequest.

func (*QueryRewardsPlanRequest) Descriptor

func (*QueryRewardsPlanRequest) Descriptor() ([]byte, []int)

func (*QueryRewardsPlanRequest) Marshal

func (m *QueryRewardsPlanRequest) Marshal() (dAtA []byte, err error)

func (*QueryRewardsPlanRequest) MarshalTo

func (m *QueryRewardsPlanRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryRewardsPlanRequest) MarshalToSizedBuffer

func (m *QueryRewardsPlanRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRewardsPlanRequest) ProtoMessage

func (*QueryRewardsPlanRequest) ProtoMessage()

func (*QueryRewardsPlanRequest) Reset

func (m *QueryRewardsPlanRequest) Reset()

func (*QueryRewardsPlanRequest) Size

func (m *QueryRewardsPlanRequest) Size() (n int)

func (*QueryRewardsPlanRequest) String

func (m *QueryRewardsPlanRequest) String() string

func (*QueryRewardsPlanRequest) Unmarshal

func (m *QueryRewardsPlanRequest) Unmarshal(dAtA []byte) error

func (*QueryRewardsPlanRequest) XXX_DiscardUnknown

func (m *QueryRewardsPlanRequest) XXX_DiscardUnknown()

func (*QueryRewardsPlanRequest) XXX_Marshal

func (m *QueryRewardsPlanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRewardsPlanRequest) XXX_Merge

func (m *QueryRewardsPlanRequest) XXX_Merge(src proto.Message)

func (*QueryRewardsPlanRequest) XXX_Size

func (m *QueryRewardsPlanRequest) XXX_Size() int

func (*QueryRewardsPlanRequest) XXX_Unmarshal

func (m *QueryRewardsPlanRequest) XXX_Unmarshal(b []byte) error

type QueryRewardsPlanResponse

type QueryRewardsPlanResponse struct {
	RewardsPlan RewardsPlan `protobuf:"bytes,2,opt,name=rewards_plan,json=rewardsPlan,proto3" json:"rewards_plan"`
}

QueryRewardsPlanResponse is the response type for the Query/RewardsPlan RPC method.

func (*QueryRewardsPlanResponse) Descriptor

func (*QueryRewardsPlanResponse) Descriptor() ([]byte, []int)

func (*QueryRewardsPlanResponse) Marshal

func (m *QueryRewardsPlanResponse) Marshal() (dAtA []byte, err error)

func (*QueryRewardsPlanResponse) MarshalTo

func (m *QueryRewardsPlanResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryRewardsPlanResponse) MarshalToSizedBuffer

func (m *QueryRewardsPlanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRewardsPlanResponse) ProtoMessage

func (*QueryRewardsPlanResponse) ProtoMessage()

func (*QueryRewardsPlanResponse) Reset

func (m *QueryRewardsPlanResponse) Reset()

func (*QueryRewardsPlanResponse) Size

func (m *QueryRewardsPlanResponse) Size() (n int)

func (*QueryRewardsPlanResponse) String

func (m *QueryRewardsPlanResponse) String() string

func (*QueryRewardsPlanResponse) Unmarshal

func (m *QueryRewardsPlanResponse) Unmarshal(dAtA []byte) error

func (*QueryRewardsPlanResponse) XXX_DiscardUnknown

func (m *QueryRewardsPlanResponse) XXX_DiscardUnknown()

func (*QueryRewardsPlanResponse) XXX_Marshal

func (m *QueryRewardsPlanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRewardsPlanResponse) XXX_Merge

func (m *QueryRewardsPlanResponse) XXX_Merge(src proto.Message)

func (*QueryRewardsPlanResponse) XXX_Size

func (m *QueryRewardsPlanResponse) XXX_Size() int

func (*QueryRewardsPlanResponse) XXX_Unmarshal

func (m *QueryRewardsPlanResponse) XXX_Unmarshal(b []byte) error

type QueryRewardsPlansRequest

type QueryRewardsPlansRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRewardsPlansRequest is the request type for the Query/RewardsPlans RPC method.

func NewQueryRewardsPlansRequest

func NewQueryRewardsPlansRequest(pagination *query.PageRequest) *QueryRewardsPlansRequest

NewQueryRewardsPlansRequest creates a new instance of QueryRewardsPlansRequest.

func (*QueryRewardsPlansRequest) Descriptor

func (*QueryRewardsPlansRequest) Descriptor() ([]byte, []int)

func (*QueryRewardsPlansRequest) Marshal

func (m *QueryRewardsPlansRequest) Marshal() (dAtA []byte, err error)

func (*QueryRewardsPlansRequest) MarshalTo

func (m *QueryRewardsPlansRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryRewardsPlansRequest) MarshalToSizedBuffer

func (m *QueryRewardsPlansRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRewardsPlansRequest) ProtoMessage

func (*QueryRewardsPlansRequest) ProtoMessage()

func (*QueryRewardsPlansRequest) Reset

func (m *QueryRewardsPlansRequest) Reset()

func (*QueryRewardsPlansRequest) Size

func (m *QueryRewardsPlansRequest) Size() (n int)

func (*QueryRewardsPlansRequest) String

func (m *QueryRewardsPlansRequest) String() string

func (*QueryRewardsPlansRequest) Unmarshal

func (m *QueryRewardsPlansRequest) Unmarshal(dAtA []byte) error

func (*QueryRewardsPlansRequest) XXX_DiscardUnknown

func (m *QueryRewardsPlansRequest) XXX_DiscardUnknown()

func (*QueryRewardsPlansRequest) XXX_Marshal

func (m *QueryRewardsPlansRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRewardsPlansRequest) XXX_Merge

func (m *QueryRewardsPlansRequest) XXX_Merge(src proto.Message)

func (*QueryRewardsPlansRequest) XXX_Size

func (m *QueryRewardsPlansRequest) XXX_Size() int

func (*QueryRewardsPlansRequest) XXX_Unmarshal

func (m *QueryRewardsPlansRequest) XXX_Unmarshal(b []byte) error

type QueryRewardsPlansResponse

type QueryRewardsPlansResponse struct {
	RewardsPlans []RewardsPlan `protobuf:"bytes,1,rep,name=rewards_plans,json=rewardsPlans,proto3" json:"rewards_plans"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRewardsPlansResponse is the response type for the Query/RewardsPlans RPC method.

func (*QueryRewardsPlansResponse) Descriptor

func (*QueryRewardsPlansResponse) Descriptor() ([]byte, []int)

func (*QueryRewardsPlansResponse) Marshal

func (m *QueryRewardsPlansResponse) Marshal() (dAtA []byte, err error)

func (*QueryRewardsPlansResponse) MarshalTo

func (m *QueryRewardsPlansResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryRewardsPlansResponse) MarshalToSizedBuffer

func (m *QueryRewardsPlansResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRewardsPlansResponse) ProtoMessage

func (*QueryRewardsPlansResponse) ProtoMessage()

func (*QueryRewardsPlansResponse) Reset

func (m *QueryRewardsPlansResponse) Reset()

func (*QueryRewardsPlansResponse) Size

func (m *QueryRewardsPlansResponse) Size() (n int)

func (*QueryRewardsPlansResponse) String

func (m *QueryRewardsPlansResponse) String() string

func (*QueryRewardsPlansResponse) Unmarshal

func (m *QueryRewardsPlansResponse) Unmarshal(dAtA []byte) error

func (*QueryRewardsPlansResponse) XXX_DiscardUnknown

func (m *QueryRewardsPlansResponse) XXX_DiscardUnknown()

func (*QueryRewardsPlansResponse) XXX_Marshal

func (m *QueryRewardsPlansResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRewardsPlansResponse) XXX_Merge

func (m *QueryRewardsPlansResponse) XXX_Merge(src proto.Message)

func (*QueryRewardsPlansResponse) XXX_Size

func (m *QueryRewardsPlansResponse) XXX_Size() int

func (*QueryRewardsPlansResponse) XXX_Unmarshal

func (m *QueryRewardsPlansResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Params defines a gRPC query method that returns the parameters of the
	// module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// RewardsPlans queries all rewards plans.
	RewardsPlans(context.Context, *QueryRewardsPlansRequest) (*QueryRewardsPlansResponse, error)
	// RewardsPlan queries a specific rewards plan by its ID.
	RewardsPlan(context.Context, *QueryRewardsPlanRequest) (*QueryRewardsPlanResponse, error)
	// PoolOutstandingRewards queries rewards of a pool.
	PoolOutstandingRewards(context.Context, *QueryPoolOutstandingRewardsRequest) (*QueryPoolOutstandingRewardsResponse, error)
	// OperatorOutstandingRewards queries rewards of an operator.
	OperatorOutstandingRewards(context.Context, *QueryOperatorOutstandingRewardsRequest) (*QueryOperatorOutstandingRewardsResponse, error)
	// ServiceOutstandingRewards queries rewards of a service.
	ServiceOutstandingRewards(context.Context, *QueryServiceOutstandingRewardsRequest) (*QueryServiceOutstandingRewardsResponse, error)
	// OperatorCommission queries accumulated commission for an operator.
	OperatorCommission(context.Context, *QueryOperatorCommissionRequest) (*QueryOperatorCommissionResponse, error)
	// PoolDelegationRewards queries the total rewards accrued by a pool
	// delegation.
	PoolDelegationRewards(context.Context, *QueryPoolDelegationRewardsRequest) (*QueryPoolDelegationRewardsResponse, error)
	// OperatorDelegationRewards queries the total rewards accrued by a operator
	// delegation.
	OperatorDelegationRewards(context.Context, *QueryOperatorDelegationRewardsRequest) (*QueryOperatorDelegationRewardsResponse, error)
	// ServiceDelegationRewards queries the total rewards accrued by a service
	// delegation.
	ServiceDelegationRewards(context.Context, *QueryServiceDelegationRewardsRequest) (*QueryServiceDelegationRewardsResponse, error)
	// DelegatorTotalRewards queries the total rewards accrued by a single
	// delegator
	DelegatorTotalRewards(context.Context, *QueryDelegatorTotalRewardsRequest) (*QueryDelegatorTotalRewardsResponse, error)
	// DelegatorWithdrawAddress queries withdraw address of a delegator.
	DelegatorWithdrawAddress(context.Context, *QueryDelegatorWithdrawAddressRequest) (*QueryDelegatorWithdrawAddressResponse, error)
}

QueryServer is the server API for Query service.

type QueryServiceDelegationRewardsRequest

type QueryServiceDelegationRewardsRequest struct {
	// delegator_address defines the delegator address to query for.
	DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"`
	// service_id defines the service ID to query for.
	ServiceId uint32 `protobuf:"varint,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
}

QueryServiceDelegationRewardsRequest is the request type for the Query/ServiceDelegationRewards RPC method.

func NewQueryServiceDelegationRewardsRequest

func NewQueryServiceDelegationRewardsRequest(serviceID uint32, delegator string) *QueryServiceDelegationRewardsRequest

NewQueryServiceDelegationRewardsRequest creates a new instance of QueryServiceDelegationRewardsRequest.

func (*QueryServiceDelegationRewardsRequest) Descriptor

func (*QueryServiceDelegationRewardsRequest) Descriptor() ([]byte, []int)

func (*QueryServiceDelegationRewardsRequest) Marshal

func (m *QueryServiceDelegationRewardsRequest) Marshal() (dAtA []byte, err error)

func (*QueryServiceDelegationRewardsRequest) MarshalTo

func (m *QueryServiceDelegationRewardsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryServiceDelegationRewardsRequest) MarshalToSizedBuffer

func (m *QueryServiceDelegationRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryServiceDelegationRewardsRequest) ProtoMessage

func (*QueryServiceDelegationRewardsRequest) ProtoMessage()

func (*QueryServiceDelegationRewardsRequest) Reset

func (*QueryServiceDelegationRewardsRequest) Size

func (*QueryServiceDelegationRewardsRequest) String

func (*QueryServiceDelegationRewardsRequest) Unmarshal

func (m *QueryServiceDelegationRewardsRequest) Unmarshal(dAtA []byte) error

func (*QueryServiceDelegationRewardsRequest) XXX_DiscardUnknown

func (m *QueryServiceDelegationRewardsRequest) XXX_DiscardUnknown()

func (*QueryServiceDelegationRewardsRequest) XXX_Marshal

func (m *QueryServiceDelegationRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryServiceDelegationRewardsRequest) XXX_Merge

func (*QueryServiceDelegationRewardsRequest) XXX_Size

func (*QueryServiceDelegationRewardsRequest) XXX_Unmarshal

func (m *QueryServiceDelegationRewardsRequest) XXX_Unmarshal(b []byte) error

type QueryServiceDelegationRewardsResponse

type QueryServiceDelegationRewardsResponse struct {
	// rewards defines the rewards accrued by a delegation.
	Rewards DecPools `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=DecPools" json:"rewards"`
}

QueryServiceDelegationRewardsResponse is the response type for the Query/ServiceDelegationRewards RPC method.

func (*QueryServiceDelegationRewardsResponse) Descriptor

func (*QueryServiceDelegationRewardsResponse) Descriptor() ([]byte, []int)

func (*QueryServiceDelegationRewardsResponse) Marshal

func (m *QueryServiceDelegationRewardsResponse) Marshal() (dAtA []byte, err error)

func (*QueryServiceDelegationRewardsResponse) MarshalTo

func (m *QueryServiceDelegationRewardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryServiceDelegationRewardsResponse) MarshalToSizedBuffer

func (m *QueryServiceDelegationRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryServiceDelegationRewardsResponse) ProtoMessage

func (*QueryServiceDelegationRewardsResponse) ProtoMessage()

func (*QueryServiceDelegationRewardsResponse) Reset

func (*QueryServiceDelegationRewardsResponse) Size

func (*QueryServiceDelegationRewardsResponse) String

func (*QueryServiceDelegationRewardsResponse) Unmarshal

func (m *QueryServiceDelegationRewardsResponse) Unmarshal(dAtA []byte) error

func (*QueryServiceDelegationRewardsResponse) XXX_DiscardUnknown

func (m *QueryServiceDelegationRewardsResponse) XXX_DiscardUnknown()

func (*QueryServiceDelegationRewardsResponse) XXX_Marshal

func (m *QueryServiceDelegationRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryServiceDelegationRewardsResponse) XXX_Merge

func (*QueryServiceDelegationRewardsResponse) XXX_Size

func (*QueryServiceDelegationRewardsResponse) XXX_Unmarshal

func (m *QueryServiceDelegationRewardsResponse) XXX_Unmarshal(b []byte) error

type QueryServiceOutstandingRewardsRequest

type QueryServiceOutstandingRewardsRequest struct {
	// service_id defines the service ID to query for.
	ServiceId uint32 `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
}

QueryServiceOutstandingRewardsRequest is the request type for the Query/ServiceOutstandingRewards RPC method.

func NewQueryServiceOutstandingRewardsRequest

func NewQueryServiceOutstandingRewardsRequest(serviceID uint32) *QueryServiceOutstandingRewardsRequest

NewQueryServiceOutstandingRewardsRequest creates a new instance of QueryServiceOutstandingRewardsRequest.

func (*QueryServiceOutstandingRewardsRequest) Descriptor

func (*QueryServiceOutstandingRewardsRequest) Descriptor() ([]byte, []int)

func (*QueryServiceOutstandingRewardsRequest) Marshal

func (m *QueryServiceOutstandingRewardsRequest) Marshal() (dAtA []byte, err error)

func (*QueryServiceOutstandingRewardsRequest) MarshalTo

func (m *QueryServiceOutstandingRewardsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryServiceOutstandingRewardsRequest) MarshalToSizedBuffer

func (m *QueryServiceOutstandingRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryServiceOutstandingRewardsRequest) ProtoMessage

func (*QueryServiceOutstandingRewardsRequest) ProtoMessage()

func (*QueryServiceOutstandingRewardsRequest) Reset

func (*QueryServiceOutstandingRewardsRequest) Size

func (*QueryServiceOutstandingRewardsRequest) String

func (*QueryServiceOutstandingRewardsRequest) Unmarshal

func (m *QueryServiceOutstandingRewardsRequest) Unmarshal(dAtA []byte) error

func (*QueryServiceOutstandingRewardsRequest) XXX_DiscardUnknown

func (m *QueryServiceOutstandingRewardsRequest) XXX_DiscardUnknown()

func (*QueryServiceOutstandingRewardsRequest) XXX_Marshal

func (m *QueryServiceOutstandingRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryServiceOutstandingRewardsRequest) XXX_Merge

func (*QueryServiceOutstandingRewardsRequest) XXX_Size

func (*QueryServiceOutstandingRewardsRequest) XXX_Unmarshal

func (m *QueryServiceOutstandingRewardsRequest) XXX_Unmarshal(b []byte) error

type QueryServiceOutstandingRewardsResponse

type QueryServiceOutstandingRewardsResponse struct {
	Rewards OutstandingRewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards"`
}

QueryServiceOutstandingRewardsResponse is the response type for the Query/ServiceOutstandingRewards RPC method.

func (*QueryServiceOutstandingRewardsResponse) Descriptor

func (*QueryServiceOutstandingRewardsResponse) Descriptor() ([]byte, []int)

func (*QueryServiceOutstandingRewardsResponse) Marshal

func (m *QueryServiceOutstandingRewardsResponse) Marshal() (dAtA []byte, err error)

func (*QueryServiceOutstandingRewardsResponse) MarshalTo

func (m *QueryServiceOutstandingRewardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryServiceOutstandingRewardsResponse) MarshalToSizedBuffer

func (m *QueryServiceOutstandingRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryServiceOutstandingRewardsResponse) ProtoMessage

func (*QueryServiceOutstandingRewardsResponse) Reset

func (*QueryServiceOutstandingRewardsResponse) Size

func (*QueryServiceOutstandingRewardsResponse) String

func (*QueryServiceOutstandingRewardsResponse) Unmarshal

func (m *QueryServiceOutstandingRewardsResponse) Unmarshal(dAtA []byte) error

func (*QueryServiceOutstandingRewardsResponse) XXX_DiscardUnknown

func (m *QueryServiceOutstandingRewardsResponse) XXX_DiscardUnknown()

func (*QueryServiceOutstandingRewardsResponse) XXX_Marshal

func (m *QueryServiceOutstandingRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryServiceOutstandingRewardsResponse) XXX_Merge

func (*QueryServiceOutstandingRewardsResponse) XXX_Size

func (*QueryServiceOutstandingRewardsResponse) XXX_Unmarshal

func (m *QueryServiceOutstandingRewardsResponse) XXX_Unmarshal(b []byte) error

type RestakingKeeper

type RestakingKeeper interface {
	HasOperatorJoinedService(ctx context.Context, operatorID uint32, serviceID uint32) (bool, error)
	CanOperatorValidateService(ctx context.Context, serviceID uint32, operatorID uint32) (bool, error)
	IsServiceSecuredByPool(ctx context.Context, serviceID uint32, poolID uint32) (bool, error)
	GetRestakableDenoms(ctx context.Context) ([]string, error)
	GetPoolDelegation(ctx context.Context, poolID uint32, userAddress string) (restakingtypes.Delegation, bool, error)
	GetOperatorDelegation(ctx context.Context, operatorID uint32, userAddress string) (restakingtypes.Delegation, bool, error)
	GetServiceDelegation(ctx context.Context, serviceID uint32, userAddress string) (restakingtypes.Delegation, bool, error)
	GetDelegationForTarget(ctx context.Context, target restakingtypes.DelegationTarget, delegator string) (restakingtypes.Delegation, bool, error)

	IterateUserPoolDelegations(ctx context.Context, userAddress string, cb func(del restakingtypes.Delegation) (stop bool, err error)) error
	IterateAllPoolDelegations(ctx context.Context, cb func(del restakingtypes.Delegation) (stop bool, err error)) error

	IterateUserOperatorDelegations(ctx context.Context, userAddress string, cb func(del restakingtypes.Delegation) (stop bool, err error)) error
	IterateAllOperatorDelegations(ctx context.Context, cb func(del restakingtypes.Delegation) (stop bool, err error)) error

	IterateUserServiceDelegations(ctx context.Context, userAddress string, cb func(del restakingtypes.Delegation) (stop bool, err error)) error
	IterateServiceDelegations(ctx context.Context, serviceID uint32, cb func(del restakingtypes.Delegation) (stop bool, err error)) error
	IterateAllServiceDelegations(ctx context.Context, cb func(del restakingtypes.Delegation) (stop bool, err error)) error

	GetUserPreferences(ctx context.Context, userAddress string) (restakingtypes.UserPreferences, error)
	GetUserTrustedServicesIDs(ctx context.Context, userAddress string) ([]uint32, error)
}

type RewardsPlan

type RewardsPlan struct {
	// ID is the unique identifier of the plan.
	ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Description is the description of the plan.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// ServiceID is the service ID which the plan is related to.
	ServiceID uint32 `protobuf:"varint,3,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// AmountPerDay is the amount of rewards to be distributed, per day.
	// The rewards amount for every block will be calculated based on this.
	AmountPerDay github_com_cosmos_cosmos_sdk_types.Coins `` /* 143-byte string literal not displayed */
	// StartTime is the starting time of the plan.
	StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	// EndTime is the ending time of the plan.
	EndTime time.Time `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"`
	// RewardsPool is the address where rewards to be distributed are stored.
	// If the rewards pool doesn't have enough funds to be distributed, then
	// the rewards allocation for this plan will be skipped.
	RewardsPool string `protobuf:"bytes,7,opt,name=rewards_pool,json=rewardsPool,proto3" json:"rewards_pool,omitempty"`
	// PoolsDistribution is the rewards distribution parameters for pools.
	PoolsDistribution Distribution `protobuf:"bytes,8,opt,name=pools_distribution,json=poolsDistribution,proto3" json:"pools_distribution"`
	// OperatorsDistribution is the rewards distribution parameters for operators.
	OperatorsDistribution Distribution `protobuf:"bytes,9,opt,name=operators_distribution,json=operatorsDistribution,proto3" json:"operators_distribution"`
	// UsersDistribution is the rewards distribution parameters for users.
	UsersDistribution UsersDistribution `protobuf:"bytes,10,opt,name=users_distribution,json=usersDistribution,proto3" json:"users_distribution"`
}

RewardsPlan represents a rewards allocation plan.

func NewRewardsPlan

func NewRewardsPlan(
	id uint64,
	description string,
	serviceID uint32,
	amtPerDay sdk.Coins,
	startTime,
	endTime time.Time,
	poolsDistribution Distribution,
	operatorsDistribution Distribution,
	usersDistribution UsersDistribution,
) RewardsPlan

NewRewardsPlan creates a new rewards plan.

func (*RewardsPlan) Descriptor

func (*RewardsPlan) Descriptor() ([]byte, []int)

func (*RewardsPlan) Equal

func (this *RewardsPlan) Equal(that interface{}) bool

func (RewardsPlan) IsActiveAt

func (plan RewardsPlan) IsActiveAt(t time.Time) bool

IsActiveAt returns true if the plan is active at the given time.

func (*RewardsPlan) Marshal

func (m *RewardsPlan) Marshal() (dAtA []byte, err error)

func (*RewardsPlan) MarshalTo

func (m *RewardsPlan) MarshalTo(dAtA []byte) (int, error)

func (*RewardsPlan) MarshalToSizedBuffer

func (m *RewardsPlan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (RewardsPlan) MustGetRewardsPoolAddress

func (plan RewardsPlan) MustGetRewardsPoolAddress(addressCodec coreaddress.Codec) sdk.AccAddress

MustGetRewardsPoolAddress returns the rewards pool address.

func (*RewardsPlan) ProtoMessage

func (*RewardsPlan) ProtoMessage()

func (*RewardsPlan) Reset

func (m *RewardsPlan) Reset()

func (*RewardsPlan) Size

func (m *RewardsPlan) Size() (n int)

func (*RewardsPlan) String

func (m *RewardsPlan) String() string

func (*RewardsPlan) Unmarshal

func (m *RewardsPlan) Unmarshal(dAtA []byte) error

func (RewardsPlan) Validate

func (plan RewardsPlan) Validate(unpacker codectypes.AnyUnpacker) error

Validate checks the plan for validity.

func (*RewardsPlan) XXX_DiscardUnknown

func (m *RewardsPlan) XXX_DiscardUnknown()

func (*RewardsPlan) XXX_Marshal

func (m *RewardsPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RewardsPlan) XXX_Merge

func (m *RewardsPlan) XXX_Merge(src proto.Message)

func (*RewardsPlan) XXX_Size

func (m *RewardsPlan) XXX_Size() int

func (*RewardsPlan) XXX_Unmarshal

func (m *RewardsPlan) XXX_Unmarshal(b []byte) error

type ServicePool

type ServicePool struct {
	ServiceID uint32   `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	DecPools  DecPools `protobuf:"bytes,2,rep,name=dec_pools,json=decPools,proto3,castrepeated=DecPools" json:"dec_pools"`
}

ServicePool represents the rewards pool for a service.

func NewServicePool

func NewServicePool(serviceID uint32, pools DecPools) ServicePool

NewServicePool return new ServicePool instance

func (ServicePool) Add

func (pool ServicePool) Add(poolB ServicePool) ServicePool

Add adds amounts of two ServicePool with same service ID.

func (*ServicePool) Descriptor

func (*ServicePool) Descriptor() ([]byte, []int)

func (ServicePool) IsEmpty

func (pool ServicePool) IsEmpty() bool

IsEmpty returns whether the pool coins are empty or not

func (*ServicePool) Marshal

func (m *ServicePool) Marshal() (dAtA []byte, err error)

func (*ServicePool) MarshalTo

func (m *ServicePool) MarshalTo(dAtA []byte) (int, error)

func (*ServicePool) MarshalToSizedBuffer

func (m *ServicePool) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServicePool) ProtoMessage

func (*ServicePool) ProtoMessage()

func (*ServicePool) Reset

func (m *ServicePool) Reset()

func (*ServicePool) Size

func (m *ServicePool) Size() (n int)

func (*ServicePool) String

func (m *ServicePool) String() string

func (*ServicePool) Unmarshal

func (m *ServicePool) Unmarshal(dAtA []byte) error

func (*ServicePool) XXX_DiscardUnknown

func (m *ServicePool) XXX_DiscardUnknown()

func (*ServicePool) XXX_Marshal

func (m *ServicePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServicePool) XXX_Merge

func (m *ServicePool) XXX_Merge(src proto.Message)

func (*ServicePool) XXX_Size

func (m *ServicePool) XXX_Size() int

func (*ServicePool) XXX_Unmarshal

func (m *ServicePool) XXX_Unmarshal(b []byte) error

type ServicePools

type ServicePools []ServicePool

ServicePools defines denom and sdk.DecCoins wrapper to represents rewards pools for multi-token staking

func (ServicePools) Add

func (pools ServicePools) Add(poolsB ...ServicePool) ServicePools

Add adds two sets of ServicePools

func (ServicePools) IsAnyNegative

func (pools ServicePools) IsAnyNegative() bool

IsAnyNegative returns true if there is at least one coin whose amount is negative; returns false otherwise. It returns false if the ServicePools set is empty too.

func (ServicePools) SafeSub

func (pools ServicePools) SafeSub(poolsB ServicePools) (ServicePools, bool)

SafeSub performs the same arithmetic as Sub but returns a boolean if any negative ServicePool coins amount was returned.

func (ServicePools) String

func (pools ServicePools) String() string

String implements the Stringer interface for ServicePools. It returns a human-readable representation of ServicePools.

func (ServicePools) Sub

func (pools ServicePools) Sub(poolsB ServicePools) ServicePools

Sub subtracts a set of ServicePools from another (adds the inverse).

type ServicesKeeper

type ServicesKeeper interface {
	GetService(ctx context.Context, serviceID uint32) (servicestypes.Service, bool, error)
	GetServiceParams(ctx context.Context, serviceID uint32) (servicestypes.ServiceParams, error)
	IterateServices(ctx context.Context, cb func(service servicestypes.Service) (stop bool, err error)) error
}

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateRewardsPlan

func (*UnimplementedMsgServer) EditRewardsPlan

func (*UnimplementedMsgServer) SetWithdrawAddress

func (*UnimplementedMsgServer) UpdateParams

func (*UnimplementedMsgServer) WithdrawDelegatorReward

func (*UnimplementedMsgServer) WithdrawOperatorCommission

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) OperatorCommission

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) RewardsPlan

func (*UnimplementedQueryServer) RewardsPlans

type UsersDistribution

type UsersDistribution struct {
	// Weight is the rewards distribution weight among other types of delegation
	// targets.
	Weight uint32 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty"`
	// Type defines the rewards distribution method. Currently only the basic
	// distribution is allowed.
	Type *types2.Any `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
}

Distribution represents distribution parameters for delegators who directly staked their tokens to the service.

func NewBasicUsersDistribution

func NewBasicUsersDistribution(weight uint32) UsersDistribution

NewBasicUsersDistribution creates a new basic users distribution

func NewUsersDistribution

func NewUsersDistribution(weight uint32, distributionType UsersDistributionType) UsersDistribution

func (*UsersDistribution) Descriptor

func (*UsersDistribution) Descriptor() ([]byte, []int)

func (*UsersDistribution) Equal

func (this *UsersDistribution) Equal(that interface{}) bool

func (*UsersDistribution) Marshal

func (m *UsersDistribution) Marshal() (dAtA []byte, err error)

func (*UsersDistribution) MarshalTo

func (m *UsersDistribution) MarshalTo(dAtA []byte) (int, error)

func (*UsersDistribution) MarshalToSizedBuffer

func (m *UsersDistribution) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UsersDistribution) ProtoMessage

func (*UsersDistribution) ProtoMessage()

func (*UsersDistribution) Reset

func (m *UsersDistribution) Reset()

func (*UsersDistribution) Size

func (m *UsersDistribution) Size() (n int)

func (*UsersDistribution) String

func (m *UsersDistribution) String() string

func (*UsersDistribution) Unmarshal

func (m *UsersDistribution) Unmarshal(dAtA []byte) error

func (*UsersDistribution) UnpackInterfaces

func (u *UsersDistribution) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements codectypes.UnpackInterfacesMessage

func (*UsersDistribution) XXX_DiscardUnknown

func (m *UsersDistribution) XXX_DiscardUnknown()

func (*UsersDistribution) XXX_Marshal

func (m *UsersDistribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UsersDistribution) XXX_Merge

func (m *UsersDistribution) XXX_Merge(src proto.Message)

func (*UsersDistribution) XXX_Size

func (m *UsersDistribution) XXX_Size() int

func (*UsersDistribution) XXX_Unmarshal

func (m *UsersDistribution) XXX_Unmarshal(b []byte) error

type UsersDistributionType

type UsersDistributionType interface {
	proto.Message

	Validate() error
	// contains filtered or unexported methods
}

UsersDistributionType represents a generic users distribution type

func GetUsersDistributionType

func GetUsersDistributionType(unpacker codectypes.AnyUnpacker, distr UsersDistribution) (UsersDistributionType, error)

GetUsersDistributionType returns the users distribution type from the distribution

type UsersDistributionTypeBasic

type UsersDistributionTypeBasic struct {
}

UsersDistributionTypeBasic represents the simplest form of distribution. Rewards are allocated to entities based on their delegation values. For example, if there are three users with delegation values of $1000, $1500, and $2000, their rewards will be distributed in a 2:3:4 ratio.

func (*UsersDistributionTypeBasic) Descriptor

func (*UsersDistributionTypeBasic) Descriptor() ([]byte, []int)

func (*UsersDistributionTypeBasic) Marshal

func (m *UsersDistributionTypeBasic) Marshal() (dAtA []byte, err error)

func (*UsersDistributionTypeBasic) MarshalTo

func (m *UsersDistributionTypeBasic) MarshalTo(dAtA []byte) (int, error)

func (*UsersDistributionTypeBasic) MarshalToSizedBuffer

func (m *UsersDistributionTypeBasic) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UsersDistributionTypeBasic) ProtoMessage

func (*UsersDistributionTypeBasic) ProtoMessage()

func (*UsersDistributionTypeBasic) Reset

func (m *UsersDistributionTypeBasic) Reset()

func (*UsersDistributionTypeBasic) Size

func (m *UsersDistributionTypeBasic) Size() (n int)

func (*UsersDistributionTypeBasic) String

func (m *UsersDistributionTypeBasic) String() string

func (*UsersDistributionTypeBasic) Unmarshal

func (m *UsersDistributionTypeBasic) Unmarshal(dAtA []byte) error

func (UsersDistributionTypeBasic) Validate

func (t UsersDistributionTypeBasic) Validate() error

Validate checks the users distribution for validity

func (*UsersDistributionTypeBasic) XXX_DiscardUnknown

func (m *UsersDistributionTypeBasic) XXX_DiscardUnknown()

func (*UsersDistributionTypeBasic) XXX_Marshal

func (m *UsersDistributionTypeBasic) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UsersDistributionTypeBasic) XXX_Merge

func (m *UsersDistributionTypeBasic) XXX_Merge(src proto.Message)

func (*UsersDistributionTypeBasic) XXX_Size

func (m *UsersDistributionTypeBasic) XXX_Size() int

func (*UsersDistributionTypeBasic) XXX_Unmarshal

func (m *UsersDistributionTypeBasic) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL