types

package
v1.17.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// The type of event generated when a reward program is created
	EventTypeRewardProgramCreated string = "reward_program_created"
	// The type of event generated when a reward program is started
	EventTypeRewardProgramStarted string = "reward_program_started"
	// The type of event generated when a reward program is ended
	EventTypeRewardProgramFinished string = "reward_program_finished"
	// The type of event generated when a reward program is started
	EventTypeRewardProgramExpired string = "reward_program_expired"
	// The type of event generated when a reward program is ended
	EventTypeRewardProgramEnded string = "reward_program_ended"
	// The type of event generated when a address claims rewards
	EventTypeClaimRewards string = "claim_rewards"
	// The type of event generated when a address claims all their rewards
	EventTypeClaimAllRewards string = "claim_all_rewards"

	AttributeKeyRewardProgramID     string = "reward_program_id"
	AttributeKeyRewardProgramIDs    string = "reward_program_ids"
	AttributeKeyRewardsClaimAddress string = "rewards_claim_address"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "reward"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	RewardIDKeyLength   = 8
	ClaimPeriodIDLength = 8
)
View Source
const (
	MaxDescriptionLength int = 10000
	MaxTitleLength       int = 140
	DayInSeconds         int = 60 * 60 * 24
)

Constants pertaining to a RewardProgram object

View Source
const (
	ActionTypeDelegate = "ActionDelegate"
	ActionTypeTransfer = "ActionTransfer"
	ActionTypeVote     = "ActionVote"
)
View Source
const DefaultStartingRewardProgramID uint64 = 1

DefaultStartingRewardProgramID is 1

Variables

View Source
var (
	ErrIterateAllRewardAccountStates  = cerrs.Register(ModuleName, 2, "error iterating all reward account states")
	ErrRewardProgramNotFound          = cerrs.Register(ModuleName, 3, "reward program not found")
	ErrEndRewardProgramNotAuthorized  = cerrs.Register(ModuleName, 4, "not authorized to end the reward program")
	ErrEndrewardProgramIncorrectState = cerrs.Register(ModuleName, 5, "unable to end a reward program that is finished or expired")
)

x/rewards module errors

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 (
	RewardProgramKeyPrefix                 = []byte{0x01}
	RewardProgramIDKey                     = []byte{0x02}
	ClaimPeriodRewardDistributionKeyPrefix = []byte{0x03}
	AccountStateAddressLookupKeyPrefix     = []byte{0x04}
	AccountStateKeyPrefix                  = []byte{0x05}
)
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 (
	ErrInvalidLengthReward        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReward          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupReward = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// moving to protoCodec since this is a new module and should not use the
	// amino codec..someone to double verify
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
View Source
var QueryRewardProgramsRequest_QueryType_name = map[int32]string{
	0: "QUERY_TYPE_UNSPECIFIED",
	1: "QUERY_TYPE_ALL",
	2: "QUERY_TYPE_PENDING",
	3: "QUERY_TYPE_ACTIVE",
	4: "QUERY_TYPE_OUTSTANDING",
	5: "QUERY_TYPE_FINISHED",
}
View Source
var QueryRewardProgramsRequest_QueryType_value = map[string]int32{
	"QUERY_TYPE_UNSPECIFIED": 0,
	"QUERY_TYPE_ALL":         1,
	"QUERY_TYPE_PENDING":     2,
	"QUERY_TYPE_ACTIVE":      3,
	"QUERY_TYPE_OUTSTANDING": 4,
	"QUERY_TYPE_FINISHED":    5,
}
View Source
var RewardAccountState_ClaimStatus_name = map[int32]string{
	0: "CLAIM_STATUS_UNSPECIFIED",
	1: "CLAIM_STATUS_UNCLAIMABLE",
	2: "CLAIM_STATUS_CLAIMABLE",
	3: "CLAIM_STATUS_CLAIMED",
	4: "CLAIM_STATUS_EXPIRED",
}
View Source
var RewardAccountState_ClaimStatus_value = map[string]int32{
	"CLAIM_STATUS_UNSPECIFIED": 0,
	"CLAIM_STATUS_UNCLAIMABLE": 1,
	"CLAIM_STATUS_CLAIMABLE":   2,
	"CLAIM_STATUS_CLAIMED":     3,
	"CLAIM_STATUS_EXPIRED":     4,
}
View Source
var RewardProgram_State_name = map[int32]string{
	0: "STATE_UNSPECIFIED",
	1: "STATE_PENDING",
	2: "STATE_STARTED",
	3: "STATE_FINISHED",
	4: "STATE_EXPIRED",
}
View Source
var RewardProgram_State_value = map[string]int32{
	"STATE_UNSPECIFIED": 0,
	"STATE_PENDING":     1,
	"STATE_STARTED":     2,
	"STATE_FINISHED":    3,
	"STATE_EXPIRED":     4,
}

Functions

func CalculateEndTimeMax

func CalculateEndTimeMax(programStartTime time.Time, claimPeriodSeconds, numberOfClaimPeriods uint64, maxRolloverPeriods uint64) time.Time

CalculateEndTimeMax returns the latest time that a program can end (in UTC). end time max = programStartTime + claimPeriodSeconds * (numberOfClaimPeriods + maxRolloverPeriods).

func CalculateExpectedEndTime

func CalculateExpectedEndTime(programStartTime time.Time, claimPeriodSeconds, numberOfClaimPeriods uint64) time.Time

CalculateExpectedEndTime returns the expected end time (in UTC). expected end time = programStartTime + claimPeriodSeconds * numberOfClaimPeriods.

func GetActionCount

func GetActionCount(actionCounter []*ActionCounter, actionType string) uint64

GetActionCount convenience method to find NumberOfActions for a given action type from a ActionCounter Slice

func GetAllRewardAccountByAddressAndRewardsIDPartialKey

func GetAllRewardAccountByAddressAndRewardsIDPartialKey(addr sdk.AccAddress, rewardID uint64) []byte

GetAllRewardAccountByAddressAndRewardsIDPartialKey returns the key to iterate over all AccountStateAddressLookup by address and rewards id

func GetAllRewardAccountByAddressPartialKey

func GetAllRewardAccountByAddressPartialKey(addr sdk.AccAddress) []byte

GetAllRewardAccountByAddressPartialKey returns the key to iterate over all AccountStateAddressLookup by address

func GetAllRewardAccountStateKey

func GetAllRewardAccountStateKey() []byte

GetAllRewardAccountStateKey returns the key to iterate over all AccountStates

func GetClaimPeriodRewardDistributionKey

func GetClaimPeriodRewardDistributionKey(claimID uint64, rewardID uint64) []byte

GetClaimPeriodRewardDistributionKey returns claim period reward distribution key

func GetRewardAccountStateAddressLookupKey

func GetRewardAccountStateAddressLookupKey(addr sdk.AccAddress, rewardID uint64, rewardClaimPeriodID uint64) []byte

GetRewardAccountStateAddressLookupKey facilitates lookup of AccountState via address

func GetRewardAccountStateClaimPeriodKey

func GetRewardAccountStateClaimPeriodKey(rewardID uint64, rewardClaimPeriodID uint64) []byte

GetRewardAccountStateClaimPeriodKey converts a reward program id and claim period into a prefix for iterating

func GetRewardAccountStateKey

func GetRewardAccountStateKey(rewardID uint64, rewardClaimPeriodID uint64, addr sdk.AccAddress) []byte

GetRewardAccountStateKey converts a reward program id, claim period id, and address into an AccountStateKey

func GetRewardProgramIDBytes

func GetRewardProgramIDBytes(rewardprogramID uint64) (rewardprogramIDBz []byte)

GetRewardProgramIDBytes returns the byte representation of the rewardprogramID

func GetRewardProgramIDFromBytes

func GetRewardProgramIDFromBytes(bz []byte) (rewardprogramID uint64)

GetRewardProgramIDFromBytes returns rewardprogramID in uint64 format from a byte array

func GetRewardProgramKey

func GetRewardProgramKey(id uint64) []byte

GetRewardProgramKey converts a name into key format.

func GetRewardProgramRewardAccountStateKey

func GetRewardProgramRewardAccountStateKey(rewardID uint64) []byte

GetRewardProgramRewardAccountStateKey returns the key to iterate over all RewardAccountStates for a RewardProgram

func MustAccAddressFromBech32

func MustAccAddressFromBech32(s string) sdk.AccAddress

MustAccAddressFromBech32 converts a Bech32 address to sdk.AccAddress Panics on error

func Percent

func Percent(percent int64, all int64) int64

Percent calculate percentage but take off any decimal points

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

ignoring RegisterLegacyAminoCodec registers all the necessary types and interfaces for the double check

func RegisterMsgHandler

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

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

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

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

func RegisterMsgHandlerFromEndpoint

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

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

func RegisterMsgHandlerServer

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.

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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func TimeOnOrAfter

func TimeOnOrAfter(day1 time.Time, day2 time.Time) bool

TimeOnOrAfter compares day1 with day2 and returns true if the time of day2 is on or after the time of day1 ignoring time part.

Types

type ABCIEvent

type ABCIEvent struct {
	Type       string
	Attributes map[string][]byte
}

func (*ABCIEvent) MatchesAttribute

func (ec *ABCIEvent) MatchesAttribute(name string, value []byte) bool

MatchesAttribute returns true if this ABCIEvent has an attribute that matches the provided key and value. The value is only compared if this ABCIEvent's attribute has a value.

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
}

AccountKeeper defines the contract needed for AccountKeeper related APIs. Interface provides support to use non-sdk AccountKeeper for AnteHandler's decorators.

type ActionBuilder

type ActionBuilder interface {
	// GetEventCriteria returns the event criteria for this action.
	GetEventCriteria() *EventCriteria
	// AddEvent adds an event to this builder in preparation for checking events against the criteria.
	AddEvent(eventType string, attributes *map[string][]byte) error
	// CanBuild returns true if this builder has enough event information for an evaluation result.
	CanBuild() bool
	// BuildAction builds the action and returns an EvaluationResult.
	// This should only be called when CanBuild returns true.
	// This should return an error if CanBuild is false or some other error is encountered.
	BuildAction() (EvaluationResult, error)
	// Reset clears out any previous event data, returning the builder to it's initial state.
	Reset()
}

ActionBuilder defines functions used to collect events to check against specific actions.

type ActionCounter

type ActionCounter struct {
	// The type of action performed.
	ActionType string `protobuf:"bytes,1,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"`
	// The number of times this action has been performed
	NumberOfActions uint64 `protobuf:"varint,2,opt,name=number_of_actions,json=numberOfActions,proto3" json:"number_of_actions,omitempty"`
}

ActionCounter is a key-value pair that maps action type to the number of times it was performed.

func IncrementActionCount

func IncrementActionCount(actionCounter []*ActionCounter, actionType string) []*ActionCounter

IncrementActionCount convenience method to increment NumberOfActions for a given action type by 1(for now) and return an ActionCounter Slice if action type not found will create one and append to slice and return slice.

func (*ActionCounter) Descriptor

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

func (*ActionCounter) Equal

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

func (*ActionCounter) GetActionType

func (m *ActionCounter) GetActionType() string

func (*ActionCounter) GetNumberOfActions

func (m *ActionCounter) GetNumberOfActions() uint64

func (*ActionCounter) Marshal

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

func (*ActionCounter) MarshalTo

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

func (*ActionCounter) MarshalToSizedBuffer

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

func (*ActionCounter) ProtoMessage

func (*ActionCounter) ProtoMessage()

func (*ActionCounter) Reset

func (m *ActionCounter) Reset()

func (*ActionCounter) Size

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

func (*ActionCounter) String

func (m *ActionCounter) String() string

func (*ActionCounter) Unmarshal

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

func (*ActionCounter) XXX_DiscardUnknown

func (m *ActionCounter) XXX_DiscardUnknown()

func (*ActionCounter) XXX_Marshal

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

func (*ActionCounter) XXX_Merge

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

func (*ActionCounter) XXX_Size

func (m *ActionCounter) XXX_Size() int

func (*ActionCounter) XXX_Unmarshal

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

type ActionDelegate

type ActionDelegate struct {
	// Minimum number of successful delegates.
	MinimumActions uint64 `protobuf:"varint,1,opt,name=minimum_actions,json=minimumActions,proto3" json:"minimum_actions,omitempty"`
	// Maximum number of successful delegates.
	MaximumActions uint64 `protobuf:"varint,2,opt,name=maximum_actions,json=maximumActions,proto3" json:"maximum_actions,omitempty"`
	// Minimum amount that the user must have currently delegated on the validator.
	MinimumDelegationAmount *types.Coin `` /* 132-byte string literal not displayed */
	// Maximum amount that the user must have currently delegated on the validator.
	MaximumDelegationAmount *types.Coin `` /* 132-byte string literal not displayed */
	// Minimum percentile that can be below the validator's power ranking.
	MinimumActiveStakePercentile github_com_cosmos_cosmos_sdk_types.Dec `` /* 189-byte string literal not displayed */
	// Maximum percentile that can be below the validator's power ranking.
	MaximumActiveStakePercentile github_com_cosmos_cosmos_sdk_types.Dec `` /* 189-byte string literal not displayed */
}

ActionDelegate represents the delegate action and its required eligibility criteria.

func NewActionDelegate

func NewActionDelegate() ActionDelegate

func (*ActionDelegate) ActionType

func (ad *ActionDelegate) ActionType() string

func (*ActionDelegate) Descriptor

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

func (*ActionDelegate) Equal

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

func (*ActionDelegate) Evaluate

func (ad *ActionDelegate) Evaluate(ctx sdk.Context, provider KeeperProvider, _ RewardAccountState, event EvaluationResult) bool

func (*ActionDelegate) GetBuilder

func (ad *ActionDelegate) GetBuilder() ActionBuilder

func (*ActionDelegate) GetMaximumActions

func (m *ActionDelegate) GetMaximumActions() uint64

func (*ActionDelegate) GetMaximumActiveStakePercentile

func (ad *ActionDelegate) GetMaximumActiveStakePercentile() sdk.Dec

GetMaximumActiveStakePercentile returns this action's maximum active stake percentile or zero if not defined.

func (*ActionDelegate) GetMaximumDelegationAmount

func (m *ActionDelegate) GetMaximumDelegationAmount() *types.Coin

func (*ActionDelegate) GetMinimumActions

func (m *ActionDelegate) GetMinimumActions() uint64

func (*ActionDelegate) GetMinimumActiveStakePercentile

func (ad *ActionDelegate) GetMinimumActiveStakePercentile() sdk.Dec

GetMinimumActiveStakePercentile returns this action's minimum active stake percentile or zero if not defined.

func (*ActionDelegate) GetMinimumDelegationAmount

func (m *ActionDelegate) GetMinimumDelegationAmount() *types.Coin

func (*ActionDelegate) Marshal

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

func (*ActionDelegate) MarshalTo

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

func (*ActionDelegate) MarshalToSizedBuffer

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

func (*ActionDelegate) PostEvaluate

func (*ActionDelegate) PreEvaluate

func (*ActionDelegate) ProtoMessage

func (*ActionDelegate) ProtoMessage()

func (*ActionDelegate) Reset

func (m *ActionDelegate) Reset()

func (*ActionDelegate) Size

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

func (*ActionDelegate) String

func (m *ActionDelegate) String() string

func (*ActionDelegate) Unmarshal

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

func (*ActionDelegate) Validate

func (ad *ActionDelegate) Validate() error

func (*ActionDelegate) XXX_DiscardUnknown

func (m *ActionDelegate) XXX_DiscardUnknown()

func (*ActionDelegate) XXX_Marshal

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

func (*ActionDelegate) XXX_Merge

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

func (*ActionDelegate) XXX_Size

func (m *ActionDelegate) XXX_Size() int

func (*ActionDelegate) XXX_Unmarshal

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

type ActionTransfer

type ActionTransfer struct {
	// Minimum number of successful transfers.
	MinimumActions uint64 `protobuf:"varint,1,opt,name=minimum_actions,json=minimumActions,proto3" json:"minimum_actions,omitempty"`
	// Maximum number of successful transfers.
	MaximumActions uint64 `protobuf:"varint,2,opt,name=maximum_actions,json=maximumActions,proto3" json:"maximum_actions,omitempty"`
	// Minimum delegation amount the account must have across all validators, for the transfer action to be counted.
	MinimumDelegationAmount types.Coin `protobuf:"bytes,3,opt,name=minimum_delegation_amount,json=minimumDelegationAmount,proto3" json:"minimum_delegation_amount"`
}

ActionTransfer represents the transfer action and its required eligibility criteria.

func NewActionTransfer

func NewActionTransfer() ActionTransfer

func (*ActionTransfer) ActionType

func (at *ActionTransfer) ActionType() string

func (*ActionTransfer) Descriptor

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

func (*ActionTransfer) Equal

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

func (*ActionTransfer) Evaluate

func (at *ActionTransfer) Evaluate(ctx sdk.Context, provider KeeperProvider, _ RewardAccountState, event EvaluationResult) bool

func (*ActionTransfer) GetBuilder

func (at *ActionTransfer) GetBuilder() ActionBuilder

func (*ActionTransfer) GetMaximumActions

func (m *ActionTransfer) GetMaximumActions() uint64

func (*ActionTransfer) GetMinimumActions

func (m *ActionTransfer) GetMinimumActions() uint64

func (*ActionTransfer) GetMinimumDelegationAmount

func (m *ActionTransfer) GetMinimumDelegationAmount() types.Coin

func (*ActionTransfer) Marshal

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

func (*ActionTransfer) MarshalTo

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

func (*ActionTransfer) MarshalToSizedBuffer

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

func (*ActionTransfer) PostEvaluate

func (at *ActionTransfer) PostEvaluate(_ sdk.Context, _ KeeperProvider, state RewardAccountState, evaluationResult EvaluationResult) (bool, EvaluationResult)

func (*ActionTransfer) PreEvaluate

func (*ActionTransfer) ProtoMessage

func (*ActionTransfer) ProtoMessage()

func (*ActionTransfer) Reset

func (m *ActionTransfer) Reset()

func (*ActionTransfer) Size

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

func (*ActionTransfer) String

func (m *ActionTransfer) String() string

func (*ActionTransfer) Unmarshal

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

func (*ActionTransfer) Validate

func (at *ActionTransfer) Validate() error

func (*ActionTransfer) XXX_DiscardUnknown

func (m *ActionTransfer) XXX_DiscardUnknown()

func (*ActionTransfer) XXX_Marshal

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

func (*ActionTransfer) XXX_Merge

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

func (*ActionTransfer) XXX_Size

func (m *ActionTransfer) XXX_Size() int

func (*ActionTransfer) XXX_Unmarshal

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

type ActionVote

type ActionVote struct {
	// Minimum number of successful votes.
	MinimumActions uint64 `protobuf:"varint,1,opt,name=minimum_actions,json=minimumActions,proto3" json:"minimum_actions,omitempty"`
	// Maximum number of successful votes.
	MaximumActions uint64 `protobuf:"varint,2,opt,name=maximum_actions,json=maximumActions,proto3" json:"maximum_actions,omitempty"`
	// Minimum delegation amount the account must have across all validators, for the vote action to be counted.
	MinimumDelegationAmount types.Coin `protobuf:"bytes,3,opt,name=minimum_delegation_amount,json=minimumDelegationAmount,proto3" json:"minimum_delegation_amount"`
	// Positive multiplier that is applied to the shares awarded by the vote action when conditions
	// are met(for now the only condition is the current vote is a validator vote). A value of zero will behave the same
	// as one
	ValidatorMultiplier uint64 `protobuf:"varint,4,opt,name=validator_multiplier,json=validatorMultiplier,proto3" json:"validator_multiplier,omitempty"`
}

ActionVote represents the voting action and its required eligibility criteria.

func NewActionVote

func NewActionVote() ActionVote

func (*ActionVote) ActionType

func (atd *ActionVote) ActionType() string

func (*ActionVote) Descriptor

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

func (*ActionVote) Equal

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

func (*ActionVote) Evaluate

func (atd *ActionVote) Evaluate(ctx sdk.Context, provider KeeperProvider, _ RewardAccountState, event EvaluationResult) bool

func (*ActionVote) GetBuilder

func (atd *ActionVote) GetBuilder() ActionBuilder

func (*ActionVote) GetMaximumActions

func (m *ActionVote) GetMaximumActions() uint64

func (*ActionVote) GetMinimumActions

func (m *ActionVote) GetMinimumActions() uint64

func (*ActionVote) GetMinimumDelegationAmount

func (m *ActionVote) GetMinimumDelegationAmount() types.Coin

func (*ActionVote) GetValidatorMultiplier

func (m *ActionVote) GetValidatorMultiplier() uint64

func (*ActionVote) Marshal

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

func (*ActionVote) MarshalTo

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

func (*ActionVote) MarshalToSizedBuffer

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

func (*ActionVote) PostEvaluate

func (atd *ActionVote) PostEvaluate(ctx sdk.Context, provider KeeperProvider, state RewardAccountState, evaluationResult EvaluationResult) (bool, EvaluationResult)

func (*ActionVote) PreEvaluate

func (atd *ActionVote) PreEvaluate(_ sdk.Context, _ KeeperProvider, _ RewardAccountState) bool

func (*ActionVote) ProtoMessage

func (*ActionVote) ProtoMessage()

func (*ActionVote) Reset

func (m *ActionVote) Reset()

func (*ActionVote) Size

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

func (*ActionVote) String

func (m *ActionVote) String() string

func (*ActionVote) Unmarshal

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

func (*ActionVote) Validate

func (atd *ActionVote) Validate() error

func (*ActionVote) XXX_DiscardUnknown

func (m *ActionVote) XXX_DiscardUnknown()

func (*ActionVote) XXX_Marshal

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

func (*ActionVote) XXX_Merge

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

func (*ActionVote) XXX_Size

func (m *ActionVote) XXX_Size() int

func (*ActionVote) XXX_Unmarshal

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

type ClaimPeriodRewardDistribution

type ClaimPeriodRewardDistribution struct {
	// The claim period id.
	ClaimPeriodId uint64 `protobuf:"varint,1,opt,name=claim_period_id,json=claimPeriodId,proto3" json:"claim_period_id,omitempty"`
	// The id of the reward program that this reward belongs to.
	RewardProgramId uint64 `protobuf:"varint,2,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"`
	// The sum of all the granted rewards for this claim period.
	TotalRewardsPoolForClaimPeriod types.Coin `` /* 149-byte string literal not displayed */
	// The final allocated rewards for this claim period.
	RewardsPool types.Coin `protobuf:"bytes,4,opt,name=rewards_pool,json=rewardsPool,proto3" json:"rewards_pool"`
	// The total number of granted shares for this claim period.
	TotalShares int64 `protobuf:"varint,5,opt,name=total_shares,json=totalShares,proto3" json:"total_shares,omitempty"`
	// A flag representing if the claim period for this reward has ended.
	ClaimPeriodEnded bool `protobuf:"varint,6,opt,name=claim_period_ended,json=claimPeriodEnded,proto3" json:"claim_period_ended,omitempty"`
}

ClaimPeriodRewardDistribution, this is updated at the end of every claim period.

func NewClaimPeriodRewardDistribution

func NewClaimPeriodRewardDistribution(claimPeriodID uint64, rewardProgramID uint64, rewardsPool, totalRewardsPoolForClaimPeriod sdk.Coin, totalShares int64, claimPeriodEnded bool) ClaimPeriodRewardDistribution

func (*ClaimPeriodRewardDistribution) Descriptor

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

func (*ClaimPeriodRewardDistribution) Equal

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

func (*ClaimPeriodRewardDistribution) GetClaimPeriodEnded

func (m *ClaimPeriodRewardDistribution) GetClaimPeriodEnded() bool

func (*ClaimPeriodRewardDistribution) GetClaimPeriodId

func (m *ClaimPeriodRewardDistribution) GetClaimPeriodId() uint64

func (*ClaimPeriodRewardDistribution) GetRewardProgramId

func (m *ClaimPeriodRewardDistribution) GetRewardProgramId() uint64

func (*ClaimPeriodRewardDistribution) GetRewardsPool

func (m *ClaimPeriodRewardDistribution) GetRewardsPool() types.Coin

func (*ClaimPeriodRewardDistribution) GetTotalRewardsPoolForClaimPeriod

func (m *ClaimPeriodRewardDistribution) GetTotalRewardsPoolForClaimPeriod() types.Coin

func (*ClaimPeriodRewardDistribution) GetTotalShares

func (m *ClaimPeriodRewardDistribution) GetTotalShares() int64

func (*ClaimPeriodRewardDistribution) Marshal

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

func (*ClaimPeriodRewardDistribution) MarshalTo

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

func (*ClaimPeriodRewardDistribution) MarshalToSizedBuffer

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

func (*ClaimPeriodRewardDistribution) ProtoMessage

func (*ClaimPeriodRewardDistribution) ProtoMessage()

func (*ClaimPeriodRewardDistribution) Reset

func (m *ClaimPeriodRewardDistribution) Reset()

func (*ClaimPeriodRewardDistribution) Size

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

func (*ClaimPeriodRewardDistribution) String

func (*ClaimPeriodRewardDistribution) Unmarshal

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

func (*ClaimPeriodRewardDistribution) Validate

func (erd *ClaimPeriodRewardDistribution) Validate() error

func (*ClaimPeriodRewardDistribution) XXX_DiscardUnknown

func (m *ClaimPeriodRewardDistribution) XXX_DiscardUnknown()

func (*ClaimPeriodRewardDistribution) XXX_Marshal

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

func (*ClaimPeriodRewardDistribution) XXX_Merge

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

func (*ClaimPeriodRewardDistribution) XXX_Size

func (m *ClaimPeriodRewardDistribution) XXX_Size() int

func (*ClaimPeriodRewardDistribution) XXX_Unmarshal

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

type ClaimedRewardPeriodDetail

type ClaimedRewardPeriodDetail struct {
	// claim period id
	ClaimPeriodId uint64 `protobuf:"varint,1,opt,name=claim_period_id,json=claimPeriodId,proto3" json:"claim_period_id,omitempty"`
	// total shares accumulated for claim period
	TotalShares uint64 `protobuf:"varint,2,opt,name=total_shares,json=totalShares,proto3" json:"total_shares,omitempty"`
	// total rewards for claim period
	ClaimPeriodReward types.Coin `protobuf:"bytes,3,opt,name=claim_period_reward,json=claimPeriodReward,proto3" json:"claim_period_reward"`
}

ClaimedRewardPeriodDetail is information regarding an addresses' shares and reward for a claim period.

func (*ClaimedRewardPeriodDetail) Descriptor

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

func (*ClaimedRewardPeriodDetail) Equal

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

func (*ClaimedRewardPeriodDetail) GetClaimPeriodId

func (m *ClaimedRewardPeriodDetail) GetClaimPeriodId() uint64

func (*ClaimedRewardPeriodDetail) GetClaimPeriodReward

func (m *ClaimedRewardPeriodDetail) GetClaimPeriodReward() types.Coin

func (*ClaimedRewardPeriodDetail) GetTotalShares

func (m *ClaimedRewardPeriodDetail) GetTotalShares() uint64

func (*ClaimedRewardPeriodDetail) Marshal

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

func (*ClaimedRewardPeriodDetail) MarshalTo

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

func (*ClaimedRewardPeriodDetail) MarshalToSizedBuffer

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

func (*ClaimedRewardPeriodDetail) ProtoMessage

func (*ClaimedRewardPeriodDetail) ProtoMessage()

func (*ClaimedRewardPeriodDetail) Reset

func (m *ClaimedRewardPeriodDetail) Reset()

func (*ClaimedRewardPeriodDetail) Size

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

func (*ClaimedRewardPeriodDetail) String

func (m *ClaimedRewardPeriodDetail) String() string

func (*ClaimedRewardPeriodDetail) Unmarshal

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

func (*ClaimedRewardPeriodDetail) XXX_DiscardUnknown

func (m *ClaimedRewardPeriodDetail) XXX_DiscardUnknown()

func (*ClaimedRewardPeriodDetail) XXX_Marshal

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

func (*ClaimedRewardPeriodDetail) XXX_Merge

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

func (*ClaimedRewardPeriodDetail) XXX_Size

func (m *ClaimedRewardPeriodDetail) XXX_Size() int

func (*ClaimedRewardPeriodDetail) XXX_Unmarshal

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

type DelegateActionBuilder

type DelegateActionBuilder struct {
	Validator sdk.ValAddress
	Delegator sdk.AccAddress
}

func (*DelegateActionBuilder) AddEvent

func (b *DelegateActionBuilder) AddEvent(eventType string, attributes *map[string][]byte) error

func (*DelegateActionBuilder) BuildAction

func (b *DelegateActionBuilder) BuildAction() (EvaluationResult, error)

func (*DelegateActionBuilder) CanBuild

func (b *DelegateActionBuilder) CanBuild() bool

func (*DelegateActionBuilder) GetEventCriteria

func (b *DelegateActionBuilder) GetEventCriteria() *EventCriteria

func (*DelegateActionBuilder) Reset

func (b *DelegateActionBuilder) Reset()

type EvaluationResult

type EvaluationResult struct {
	EventTypeToSearch string
	AttributeKey      string
	Shares            int64
	Address           sdk.AccAddress // shares to attribute to this address
	Validator         sdk.ValAddress // Address of the validator
	Delegator         sdk.AccAddress // Address of the delegator
	Recipient         sdk.AccAddress // Address of the recipient of the Action, specifically Transfer
}

type EventCriteria

type EventCriteria struct {
	Events map[string]ABCIEvent
}

func NewEventCriteria

func NewEventCriteria(events []ABCIEvent) *EventCriteria

NewEventCriteria Performs a shallow copy of the map We are assuming this takes ownership of events

func (*EventCriteria) MatchesEvent

func (ec *EventCriteria) MatchesEvent(eventType string) bool

MatchesEvent returns true if this EventCriteria's events contains the provided event type or if this EventCriteria's doesn't have any events.

type GenesisState

type GenesisState struct {
	// Reward program id is the next auto incremented id to be assigned to the next created reward program
	RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"`
	// Reward programs to initially start with.
	RewardPrograms []RewardProgram `protobuf:"bytes,2,rep,name=reward_programs,json=rewardPrograms,proto3" json:"reward_programs"`
	// Claim period reward distributions to initially start with.
	ClaimPeriodRewardDistributions []ClaimPeriodRewardDistribution `` /* 145-byte string literal not displayed */
	// Reward account states to initially start with.
	RewardAccountStates []RewardAccountState `protobuf:"bytes,4,rep,name=reward_account_states,json=rewardAccountStates,proto3" json:"reward_account_states"`
}

GenesisState defines the reward module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default reward genesis state

func NewGenesisState

func NewGenesisState(
	rewardProgramID uint64,
	rewardProgram []RewardProgram,
	claimPeriodRewardDistributions []ClaimPeriodRewardDistribution,
	rewardAccountStates []RewardAccountState,
) *GenesisState

func (*GenesisState) Descriptor

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

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 (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 KeeperProvider

type KeeperProvider interface {
	GetStakingKeeper() StakingKeeper
	GetAccountKeeper() AccountKeeper
}

type MsgClaimAllRewardsRequest

type MsgClaimAllRewardsRequest struct {
	// reward address and signer of msg to send claimed rewards to.
	RewardAddress string `protobuf:"bytes,1,opt,name=reward_address,json=rewardAddress,proto3" json:"reward_address,omitempty"`
}

MsgClaimRewardsResponse is the request type for claiming rewards from all reward programs RPC

func NewMsgClaimAllRewardsRequest

func NewMsgClaimAllRewardsRequest(
	rewardAddress string,
) *MsgClaimAllRewardsRequest

NewMsgClaimRewardsRequest creates a new claim all request

func (*MsgClaimAllRewardsRequest) Descriptor

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

func (*MsgClaimAllRewardsRequest) GetRewardAddress

func (m *MsgClaimAllRewardsRequest) GetRewardAddress() string

func (MsgClaimAllRewardsRequest) GetSigners

func (msg MsgClaimAllRewardsRequest) GetSigners() []sdk.AccAddress

GetSigners indicates that the message must have been signed by the parent.

func (*MsgClaimAllRewardsRequest) Marshal

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

func (*MsgClaimAllRewardsRequest) MarshalTo

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

func (*MsgClaimAllRewardsRequest) MarshalToSizedBuffer

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

func (*MsgClaimAllRewardsRequest) ProtoMessage

func (*MsgClaimAllRewardsRequest) ProtoMessage()

func (*MsgClaimAllRewardsRequest) Reset

func (m *MsgClaimAllRewardsRequest) Reset()

func (*MsgClaimAllRewardsRequest) Size

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

func (*MsgClaimAllRewardsRequest) String

func (m *MsgClaimAllRewardsRequest) String() string

func (*MsgClaimAllRewardsRequest) Unmarshal

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

func (MsgClaimAllRewardsRequest) ValidateBasic

func (msg MsgClaimAllRewardsRequest) ValidateBasic() error

ValidateBasic runs stateless validation checks on the message.

func (*MsgClaimAllRewardsRequest) XXX_DiscardUnknown

func (m *MsgClaimAllRewardsRequest) XXX_DiscardUnknown()

func (*MsgClaimAllRewardsRequest) XXX_Marshal

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

func (*MsgClaimAllRewardsRequest) XXX_Merge

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

func (*MsgClaimAllRewardsRequest) XXX_Size

func (m *MsgClaimAllRewardsRequest) XXX_Size() int

func (*MsgClaimAllRewardsRequest) XXX_Unmarshal

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

type MsgClaimAllRewardsResponse

type MsgClaimAllRewardsResponse struct {
	// total rewards claimed for all eligible claim periods in all programs.
	TotalRewardClaim []types.Coin `protobuf:"bytes,1,rep,name=total_reward_claim,json=totalRewardClaim,proto3" json:"total_reward_claim"`
	// details about acquired rewards from a reward program.
	ClaimDetails []*RewardProgramClaimDetail `protobuf:"bytes,2,rep,name=claim_details,json=claimDetails,proto3" json:"claim_details,omitempty"`
}

MsgClaimRewardsResponse is the response type for claiming rewards from all reward programs RPC

func (*MsgClaimAllRewardsResponse) Descriptor

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

func (*MsgClaimAllRewardsResponse) Equal

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

func (*MsgClaimAllRewardsResponse) GetClaimDetails

func (m *MsgClaimAllRewardsResponse) GetClaimDetails() []*RewardProgramClaimDetail

func (*MsgClaimAllRewardsResponse) GetTotalRewardClaim

func (m *MsgClaimAllRewardsResponse) GetTotalRewardClaim() []types.Coin

func (*MsgClaimAllRewardsResponse) Marshal

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

func (*MsgClaimAllRewardsResponse) MarshalTo

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

func (*MsgClaimAllRewardsResponse) MarshalToSizedBuffer

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

func (*MsgClaimAllRewardsResponse) ProtoMessage

func (*MsgClaimAllRewardsResponse) ProtoMessage()

func (*MsgClaimAllRewardsResponse) Reset

func (m *MsgClaimAllRewardsResponse) Reset()

func (*MsgClaimAllRewardsResponse) Size

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

func (*MsgClaimAllRewardsResponse) String

func (m *MsgClaimAllRewardsResponse) String() string

func (*MsgClaimAllRewardsResponse) Unmarshal

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

func (*MsgClaimAllRewardsResponse) XXX_DiscardUnknown

func (m *MsgClaimAllRewardsResponse) XXX_DiscardUnknown()

func (*MsgClaimAllRewardsResponse) XXX_Marshal

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

func (*MsgClaimAllRewardsResponse) XXX_Merge

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

func (*MsgClaimAllRewardsResponse) XXX_Size

func (m *MsgClaimAllRewardsResponse) XXX_Size() int

func (*MsgClaimAllRewardsResponse) XXX_Unmarshal

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

type MsgClaimRewardsRequest

type MsgClaimRewardsRequest struct {
	// reward program id to claim rewards.
	RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"`
	// reward address and signer of msg to send claimed rewards to.
	RewardAddress string `protobuf:"bytes,2,opt,name=reward_address,json=rewardAddress,proto3" json:"reward_address,omitempty"`
}

MsgClaimRewardsRequest is the request type for claiming reward from reward program RPC

func NewMsgClaimRewardsRequest

func NewMsgClaimRewardsRequest(
	rewardProgramID uint64,
	rewardAddress string,
) *MsgClaimRewardsRequest

NewMsgClaimRewardsRequest creates a new reward claim request

func (*MsgClaimRewardsRequest) Descriptor

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

func (*MsgClaimRewardsRequest) GetRewardAddress

func (m *MsgClaimRewardsRequest) GetRewardAddress() string

func (*MsgClaimRewardsRequest) GetRewardProgramId

func (m *MsgClaimRewardsRequest) GetRewardProgramId() uint64

func (MsgClaimRewardsRequest) GetSigners

func (msg MsgClaimRewardsRequest) GetSigners() []sdk.AccAddress

GetSigners indicates that the message must have been signed by the parent.

func (*MsgClaimRewardsRequest) Marshal

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

func (*MsgClaimRewardsRequest) MarshalTo

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

func (*MsgClaimRewardsRequest) MarshalToSizedBuffer

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

func (*MsgClaimRewardsRequest) ProtoMessage

func (*MsgClaimRewardsRequest) ProtoMessage()

func (*MsgClaimRewardsRequest) Reset

func (m *MsgClaimRewardsRequest) Reset()

func (*MsgClaimRewardsRequest) Size

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

func (*MsgClaimRewardsRequest) String

func (m *MsgClaimRewardsRequest) String() string

func (*MsgClaimRewardsRequest) Unmarshal

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

func (MsgClaimRewardsRequest) ValidateBasic

func (msg MsgClaimRewardsRequest) ValidateBasic() error

ValidateBasic runs stateless validation checks on the message.

func (*MsgClaimRewardsRequest) XXX_DiscardUnknown

func (m *MsgClaimRewardsRequest) XXX_DiscardUnknown()

func (*MsgClaimRewardsRequest) XXX_Marshal

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

func (*MsgClaimRewardsRequest) XXX_Merge

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

func (*MsgClaimRewardsRequest) XXX_Size

func (m *MsgClaimRewardsRequest) XXX_Size() int

func (*MsgClaimRewardsRequest) XXX_Unmarshal

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

type MsgClaimRewardsResponse

type MsgClaimRewardsResponse struct {
	// details about acquired rewards from reward program.
	ClaimDetails RewardProgramClaimDetail `protobuf:"bytes,1,opt,name=claim_details,json=claimDetails,proto3" json:"claim_details"`
}

MsgClaimRewardsResponse is the response type for claiming reward from reward program RPC

func (*MsgClaimRewardsResponse) Descriptor

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

func (*MsgClaimRewardsResponse) Equal

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

func (*MsgClaimRewardsResponse) GetClaimDetails

func (*MsgClaimRewardsResponse) Marshal

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

func (*MsgClaimRewardsResponse) MarshalTo

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

func (*MsgClaimRewardsResponse) MarshalToSizedBuffer

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

func (*MsgClaimRewardsResponse) ProtoMessage

func (*MsgClaimRewardsResponse) ProtoMessage()

func (*MsgClaimRewardsResponse) Reset

func (m *MsgClaimRewardsResponse) Reset()

func (*MsgClaimRewardsResponse) Size

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

func (*MsgClaimRewardsResponse) String

func (m *MsgClaimRewardsResponse) String() string

func (*MsgClaimRewardsResponse) Unmarshal

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

func (*MsgClaimRewardsResponse) XXX_DiscardUnknown

func (m *MsgClaimRewardsResponse) XXX_DiscardUnknown()

func (*MsgClaimRewardsResponse) XXX_Marshal

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

func (*MsgClaimRewardsResponse) XXX_Merge

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

func (*MsgClaimRewardsResponse) XXX_Size

func (m *MsgClaimRewardsResponse) XXX_Size() int

func (*MsgClaimRewardsResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// CreateRewardProgram is the RPC endpoint for creating a rewards program
	CreateRewardProgram(ctx context.Context, in *MsgCreateRewardProgramRequest, opts ...grpc.CallOption) (*MsgCreateRewardProgramResponse, error)
	// EndRewardProgram is the RPC endpoint for ending a rewards program
	EndRewardProgram(ctx context.Context, in *MsgEndRewardProgramRequest, opts ...grpc.CallOption) (*MsgEndRewardProgramResponse, error)
	// ClaimRewards is the RPC endpoint for claiming rewards belonging to completed claim periods of a reward program
	ClaimRewards(ctx context.Context, in *MsgClaimRewardsRequest, opts ...grpc.CallOption) (*MsgClaimRewardsResponse, error)
	// ClaimAllRewards is the RPC endpoint for claiming rewards for completed claim periods of every reward program for
	// the signer of the tx.
	ClaimAllRewards(ctx context.Context, in *MsgClaimAllRewardsRequest, opts ...grpc.CallOption) (*MsgClaimAllRewardsResponse, 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 MsgCreateRewardProgramRequest

type MsgCreateRewardProgramRequest struct {
	// title for the reward program.
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// description for the reward program.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// provider address for the reward program funds and signer of message.
	DistributeFromAddress string `` /* 126-byte string literal not displayed */
	// total reward pool for the reward program.
	TotalRewardPool types.Coin `protobuf:"bytes,4,opt,name=total_reward_pool,json=totalRewardPool,proto3" json:"total_reward_pool"`
	// maximum amount of funds an address can be rewarded per claim period.
	MaxRewardPerClaimAddress types.Coin `` /* 129-byte string literal not displayed */
	// start time of the reward program.
	ProgramStartTime time.Time `` /* 155-byte string literal not displayed */
	// number of claim periods the reward program runs for.
	ClaimPeriods uint64 `protobuf:"varint,7,opt,name=claim_periods,json=claimPeriods,proto3" json:"claim_periods,omitempty"`
	// number of days a claim period will exist.
	ClaimPeriodDays uint64 `protobuf:"varint,8,opt,name=claim_period_days,json=claimPeriodDays,proto3" json:"claim_period_days,omitempty"`
	// maximum number of claim periods a reward program can rollover.
	MaxRolloverClaimPeriods uint64 `` /* 135-byte string literal not displayed */
	// number of days before a reward program will expire after it has ended.
	ExpireDays uint64 `protobuf:"varint,10,opt,name=expire_days,json=expireDays,proto3" json:"expire_days,omitempty"`
	// actions that count towards the reward.
	QualifyingActions []QualifyingAction `protobuf:"bytes,11,rep,name=qualifying_actions,json=qualifyingActions,proto3" json:"qualifying_actions"`
}

MsgCreateRewardProgramRequest is the request type for creating a reward program RPC

func NewMsgCreateRewardProgramRequest

func NewMsgCreateRewardProgramRequest(
	title string,
	description string,
	distributeFromAddress string,
	totalRewardPool sdk.Coin,
	maxRewardPerClaimAddress sdk.Coin,
	programStartTime time.Time,
	claimPeriods uint64,
	claimPeriodDays uint64,
	maxRolloverClaimPeriods uint64,
	expireDays uint64,
	qualifyingAction []QualifyingAction,
) *MsgCreateRewardProgramRequest

NewMsgCreateRewardProgramRequest creates a new create reward program request

func (*MsgCreateRewardProgramRequest) Descriptor

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

func (*MsgCreateRewardProgramRequest) Equal

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

func (*MsgCreateRewardProgramRequest) GetClaimPeriodDays

func (m *MsgCreateRewardProgramRequest) GetClaimPeriodDays() uint64

func (*MsgCreateRewardProgramRequest) GetClaimPeriods

func (m *MsgCreateRewardProgramRequest) GetClaimPeriods() uint64

func (*MsgCreateRewardProgramRequest) GetDescription

func (m *MsgCreateRewardProgramRequest) GetDescription() string

func (*MsgCreateRewardProgramRequest) GetDistributeFromAddress

func (m *MsgCreateRewardProgramRequest) GetDistributeFromAddress() string

func (*MsgCreateRewardProgramRequest) GetExpireDays

func (m *MsgCreateRewardProgramRequest) GetExpireDays() uint64

func (*MsgCreateRewardProgramRequest) GetMaxRewardPerClaimAddress

func (m *MsgCreateRewardProgramRequest) GetMaxRewardPerClaimAddress() types.Coin

func (*MsgCreateRewardProgramRequest) GetMaxRolloverClaimPeriods

func (m *MsgCreateRewardProgramRequest) GetMaxRolloverClaimPeriods() uint64

func (*MsgCreateRewardProgramRequest) GetProgramStartTime

func (m *MsgCreateRewardProgramRequest) GetProgramStartTime() time.Time

func (*MsgCreateRewardProgramRequest) GetQualifyingActions

func (m *MsgCreateRewardProgramRequest) GetQualifyingActions() []QualifyingAction

func (MsgCreateRewardProgramRequest) GetSigners

func (msg MsgCreateRewardProgramRequest) GetSigners() []sdk.AccAddress

GetSigners indicates that the message must have been signed by the parent.

func (*MsgCreateRewardProgramRequest) GetTitle

func (m *MsgCreateRewardProgramRequest) GetTitle() string

func (*MsgCreateRewardProgramRequest) GetTotalRewardPool

func (m *MsgCreateRewardProgramRequest) GetTotalRewardPool() types.Coin

func (*MsgCreateRewardProgramRequest) Marshal

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

func (*MsgCreateRewardProgramRequest) MarshalTo

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

func (*MsgCreateRewardProgramRequest) MarshalToSizedBuffer

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

func (*MsgCreateRewardProgramRequest) ProtoMessage

func (*MsgCreateRewardProgramRequest) ProtoMessage()

func (*MsgCreateRewardProgramRequest) Reset

func (m *MsgCreateRewardProgramRequest) Reset()

func (*MsgCreateRewardProgramRequest) Size

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

func (*MsgCreateRewardProgramRequest) String

func (*MsgCreateRewardProgramRequest) Unmarshal

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

func (MsgCreateRewardProgramRequest) ValidateBasic

func (msg MsgCreateRewardProgramRequest) ValidateBasic() error

ValidateBasic runs stateless validation checks on the message.

func (*MsgCreateRewardProgramRequest) XXX_DiscardUnknown

func (m *MsgCreateRewardProgramRequest) XXX_DiscardUnknown()

func (*MsgCreateRewardProgramRequest) XXX_Marshal

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

func (*MsgCreateRewardProgramRequest) XXX_Merge

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

func (*MsgCreateRewardProgramRequest) XXX_Size

func (m *MsgCreateRewardProgramRequest) XXX_Size() int

func (*MsgCreateRewardProgramRequest) XXX_Unmarshal

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

type MsgCreateRewardProgramResponse

type MsgCreateRewardProgramResponse struct {
	// reward program id that is generated on creation.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

MsgCreateRewardProgramResponse is the response type for creating a reward program RPC

func (*MsgCreateRewardProgramResponse) Descriptor

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

func (*MsgCreateRewardProgramResponse) GetId

func (*MsgCreateRewardProgramResponse) Marshal

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

func (*MsgCreateRewardProgramResponse) MarshalTo

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

func (*MsgCreateRewardProgramResponse) MarshalToSizedBuffer

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

func (*MsgCreateRewardProgramResponse) ProtoMessage

func (*MsgCreateRewardProgramResponse) ProtoMessage()

func (*MsgCreateRewardProgramResponse) Reset

func (m *MsgCreateRewardProgramResponse) Reset()

func (*MsgCreateRewardProgramResponse) Size

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

func (*MsgCreateRewardProgramResponse) String

func (*MsgCreateRewardProgramResponse) Unmarshal

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

func (*MsgCreateRewardProgramResponse) XXX_DiscardUnknown

func (m *MsgCreateRewardProgramResponse) XXX_DiscardUnknown()

func (*MsgCreateRewardProgramResponse) XXX_Marshal

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

func (*MsgCreateRewardProgramResponse) XXX_Merge

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

func (*MsgCreateRewardProgramResponse) XXX_Size

func (m *MsgCreateRewardProgramResponse) XXX_Size() int

func (*MsgCreateRewardProgramResponse) XXX_Unmarshal

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

type MsgEndRewardProgramRequest

type MsgEndRewardProgramRequest struct {
	// reward program id to end.
	RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"`
	// owner of the reward program that funds were distributed from.
	ProgramOwnerAddress string `protobuf:"bytes,2,opt,name=program_owner_address,json=programOwnerAddress,proto3" json:"program_owner_address,omitempty"`
}

MsgEndRewardProgramRequest is the request type for ending a reward program RPC

func NewMsgEndRewardProgramRequest

func NewMsgEndRewardProgramRequest(
	rewardProgramID uint64,
	programOwnerAddress string) *MsgEndRewardProgramRequest

NewMsgEndRewardProgramRequest ends a reward program request

func (*MsgEndRewardProgramRequest) Descriptor

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

func (*MsgEndRewardProgramRequest) Equal

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

func (*MsgEndRewardProgramRequest) GetProgramOwnerAddress

func (m *MsgEndRewardProgramRequest) GetProgramOwnerAddress() string

func (*MsgEndRewardProgramRequest) GetRewardProgramId

func (m *MsgEndRewardProgramRequest) GetRewardProgramId() uint64

func (MsgEndRewardProgramRequest) GetSigners

func (msg MsgEndRewardProgramRequest) GetSigners() []sdk.AccAddress

GetSigners indicates that the message must have been signed by the parent.

func (*MsgEndRewardProgramRequest) Marshal

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

func (*MsgEndRewardProgramRequest) MarshalTo

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

func (*MsgEndRewardProgramRequest) MarshalToSizedBuffer

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

func (*MsgEndRewardProgramRequest) ProtoMessage

func (*MsgEndRewardProgramRequest) ProtoMessage()

func (*MsgEndRewardProgramRequest) Reset

func (m *MsgEndRewardProgramRequest) Reset()

func (*MsgEndRewardProgramRequest) Size

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

func (*MsgEndRewardProgramRequest) String

func (m *MsgEndRewardProgramRequest) String() string

func (*MsgEndRewardProgramRequest) Unmarshal

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

func (MsgEndRewardProgramRequest) ValidateBasic

func (msg MsgEndRewardProgramRequest) ValidateBasic() error

ValidateBasic runs stateless validation checks on the message.

func (*MsgEndRewardProgramRequest) XXX_DiscardUnknown

func (m *MsgEndRewardProgramRequest) XXX_DiscardUnknown()

func (*MsgEndRewardProgramRequest) XXX_Marshal

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

func (*MsgEndRewardProgramRequest) XXX_Merge

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

func (*MsgEndRewardProgramRequest) XXX_Size

func (m *MsgEndRewardProgramRequest) XXX_Size() int

func (*MsgEndRewardProgramRequest) XXX_Unmarshal

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

type MsgEndRewardProgramResponse

type MsgEndRewardProgramResponse struct {
}

MsgEndRewardProgramResponse is the response type for ending a reward program RPC

func (*MsgEndRewardProgramResponse) Descriptor

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

func (*MsgEndRewardProgramResponse) Marshal

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

func (*MsgEndRewardProgramResponse) MarshalTo

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

func (*MsgEndRewardProgramResponse) MarshalToSizedBuffer

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

func (*MsgEndRewardProgramResponse) ProtoMessage

func (*MsgEndRewardProgramResponse) ProtoMessage()

func (*MsgEndRewardProgramResponse) Reset

func (m *MsgEndRewardProgramResponse) Reset()

func (*MsgEndRewardProgramResponse) Size

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

func (*MsgEndRewardProgramResponse) String

func (m *MsgEndRewardProgramResponse) String() string

func (*MsgEndRewardProgramResponse) Unmarshal

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

func (*MsgEndRewardProgramResponse) XXX_DiscardUnknown

func (m *MsgEndRewardProgramResponse) XXX_DiscardUnknown()

func (*MsgEndRewardProgramResponse) XXX_Marshal

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

func (*MsgEndRewardProgramResponse) XXX_Merge

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

func (*MsgEndRewardProgramResponse) XXX_Size

func (m *MsgEndRewardProgramResponse) XXX_Size() int

func (*MsgEndRewardProgramResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// CreateRewardProgram is the RPC endpoint for creating a rewards program
	CreateRewardProgram(context.Context, *MsgCreateRewardProgramRequest) (*MsgCreateRewardProgramResponse, error)
	// EndRewardProgram is the RPC endpoint for ending a rewards program
	EndRewardProgram(context.Context, *MsgEndRewardProgramRequest) (*MsgEndRewardProgramResponse, error)
	// ClaimRewards is the RPC endpoint for claiming rewards belonging to completed claim periods of a reward program
	ClaimRewards(context.Context, *MsgClaimRewardsRequest) (*MsgClaimRewardsResponse, error)
	// ClaimAllRewards is the RPC endpoint for claiming rewards for completed claim periods of every reward program for
	// the signer of the tx.
	ClaimAllRewards(context.Context, *MsgClaimAllRewardsRequest) (*MsgClaimAllRewardsResponse, error)
}

MsgServer is the server API for Msg service.

type QualifyingAction

type QualifyingAction struct {
	// type of action to process
	//
	// Types that are valid to be assigned to Type:
	//	*QualifyingAction_Delegate
	//	*QualifyingAction_Transfer
	//	*QualifyingAction_Vote
	Type isQualifyingAction_Type `protobuf_oneof:"type"`
}

QualifyingAction can be one of many action types.

func (*QualifyingAction) Descriptor

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

func (*QualifyingAction) Equal

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

func (*QualifyingAction) GetDelegate

func (m *QualifyingAction) GetDelegate() *ActionDelegate

func (*QualifyingAction) GetRewardAction

func (qa *QualifyingAction) GetRewardAction(ctx sdk.Context) (RewardAction, error)

GetRewardAction returns the reward action for this qualifying action. An error is returned if the action is of an unexpected type.

func (*QualifyingAction) GetTransfer

func (m *QualifyingAction) GetTransfer() *ActionTransfer

func (*QualifyingAction) GetType

func (m *QualifyingAction) GetType() isQualifyingAction_Type

func (*QualifyingAction) GetVote

func (m *QualifyingAction) GetVote() *ActionVote

func (*QualifyingAction) Marshal

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

func (*QualifyingAction) MarshalTo

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

func (*QualifyingAction) MarshalToSizedBuffer

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

func (*QualifyingAction) ProtoMessage

func (*QualifyingAction) ProtoMessage()

func (*QualifyingAction) Reset

func (m *QualifyingAction) Reset()

func (*QualifyingAction) Size

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

func (*QualifyingAction) String

func (m *QualifyingAction) String() string

func (*QualifyingAction) Unmarshal

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

func (*QualifyingAction) Validate

func (qa *QualifyingAction) Validate() (isValid error)

func (*QualifyingAction) XXX_DiscardUnknown

func (m *QualifyingAction) XXX_DiscardUnknown()

func (*QualifyingAction) XXX_Marshal

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

func (*QualifyingAction) XXX_Merge

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

func (*QualifyingAction) XXX_OneofWrappers

func (*QualifyingAction) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*QualifyingAction) XXX_Size

func (m *QualifyingAction) XXX_Size() int

func (*QualifyingAction) XXX_Unmarshal

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

type QualifyingAction_Delegate

type QualifyingAction_Delegate struct {
	Delegate *ActionDelegate `protobuf:"bytes,1,opt,name=delegate,proto3,oneof" json:"delegate,omitempty"`
}

func (*QualifyingAction_Delegate) Equal

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

func (*QualifyingAction_Delegate) MarshalTo

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

func (*QualifyingAction_Delegate) MarshalToSizedBuffer

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

func (*QualifyingAction_Delegate) Size

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

type QualifyingAction_Transfer

type QualifyingAction_Transfer struct {
	Transfer *ActionTransfer `protobuf:"bytes,2,opt,name=transfer,proto3,oneof" json:"transfer,omitempty"`
}

func (*QualifyingAction_Transfer) Equal

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

func (*QualifyingAction_Transfer) MarshalTo

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

func (*QualifyingAction_Transfer) MarshalToSizedBuffer

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

func (*QualifyingAction_Transfer) Size

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

type QualifyingAction_Vote

type QualifyingAction_Vote struct {
	Vote *ActionVote `protobuf:"bytes,3,opt,name=vote,proto3,oneof" json:"vote,omitempty"`
}

func (*QualifyingAction_Vote) Equal

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

func (*QualifyingAction_Vote) MarshalTo

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

func (*QualifyingAction_Vote) MarshalToSizedBuffer

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

func (*QualifyingAction_Vote) Size

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

type QualifyingActions

type QualifyingActions struct {
	// The actions that count towards the reward.
	QualifyingActions []QualifyingAction `protobuf:"bytes,1,rep,name=qualifying_actions,json=qualifyingActions,proto3" json:"qualifying_actions"`
}

QualifyingActions contains a list of QualifyingActions.

func (*QualifyingActions) Descriptor

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

func (*QualifyingActions) GetQualifyingActions

func (m *QualifyingActions) GetQualifyingActions() []QualifyingAction

func (*QualifyingActions) Marshal

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

func (*QualifyingActions) MarshalTo

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

func (*QualifyingActions) MarshalToSizedBuffer

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

func (*QualifyingActions) ProtoMessage

func (*QualifyingActions) ProtoMessage()

func (*QualifyingActions) Reset

func (m *QualifyingActions) Reset()

func (*QualifyingActions) Size

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

func (*QualifyingActions) String

func (m *QualifyingActions) String() string

func (*QualifyingActions) Unmarshal

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

func (*QualifyingActions) XXX_DiscardUnknown

func (m *QualifyingActions) XXX_DiscardUnknown()

func (*QualifyingActions) XXX_Marshal

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

func (*QualifyingActions) XXX_Merge

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

func (*QualifyingActions) XXX_Size

func (m *QualifyingActions) XXX_Size() int

func (*QualifyingActions) XXX_Unmarshal

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

type QueryClaimPeriodRewardDistributionsByIDRequest

type QueryClaimPeriodRewardDistributionsByIDRequest struct {
	// The reward program that the claim period reward distribution belongs to.
	RewardId uint64 `protobuf:"varint,1,opt,name=reward_id,json=rewardId,proto3" json:"reward_id,omitempty"`
	// The claim period that the claim period reward distribution was created for.
	ClaimPeriodId uint64 `protobuf:"varint,2,opt,name=claim_period_id,json=claimPeriodId,proto3" json:"claim_period_id,omitempty"`
}

QueryClaimPeriodRewardDistributionsByIDRequest queries for a single ClaimPeriodRewardDistribution

func (*QueryClaimPeriodRewardDistributionsByIDRequest) Descriptor

func (*QueryClaimPeriodRewardDistributionsByIDRequest) GetClaimPeriodId

func (*QueryClaimPeriodRewardDistributionsByIDRequest) GetRewardId

func (*QueryClaimPeriodRewardDistributionsByIDRequest) Marshal

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

func (*QueryClaimPeriodRewardDistributionsByIDRequest) MarshalTo

func (*QueryClaimPeriodRewardDistributionsByIDRequest) MarshalToSizedBuffer

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

func (*QueryClaimPeriodRewardDistributionsByIDRequest) ProtoMessage

func (*QueryClaimPeriodRewardDistributionsByIDRequest) Reset

func (*QueryClaimPeriodRewardDistributionsByIDRequest) Size

func (*QueryClaimPeriodRewardDistributionsByIDRequest) String

func (*QueryClaimPeriodRewardDistributionsByIDRequest) Unmarshal

func (*QueryClaimPeriodRewardDistributionsByIDRequest) XXX_DiscardUnknown

func (m *QueryClaimPeriodRewardDistributionsByIDRequest) XXX_DiscardUnknown()

func (*QueryClaimPeriodRewardDistributionsByIDRequest) XXX_Marshal

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

func (*QueryClaimPeriodRewardDistributionsByIDRequest) XXX_Merge

func (*QueryClaimPeriodRewardDistributionsByIDRequest) XXX_Size

func (*QueryClaimPeriodRewardDistributionsByIDRequest) XXX_Unmarshal

type QueryClaimPeriodRewardDistributionsByIDResponse

type QueryClaimPeriodRewardDistributionsByIDResponse struct {
	// The ClaimPeriodRewardDistribution object that was queried for.
	ClaimPeriodRewardDistribution *ClaimPeriodRewardDistribution `` /* 152-byte string literal not displayed */
}

QueryClaimPeriodRewardDistributionsByIDResponse returns the requested ClaimPeriodRewardDistribution

func (*QueryClaimPeriodRewardDistributionsByIDResponse) Descriptor

func (*QueryClaimPeriodRewardDistributionsByIDResponse) GetClaimPeriodRewardDistribution

func (*QueryClaimPeriodRewardDistributionsByIDResponse) Marshal

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

func (*QueryClaimPeriodRewardDistributionsByIDResponse) MarshalTo

func (*QueryClaimPeriodRewardDistributionsByIDResponse) MarshalToSizedBuffer

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

func (*QueryClaimPeriodRewardDistributionsByIDResponse) ProtoMessage

func (*QueryClaimPeriodRewardDistributionsByIDResponse) Reset

func (*QueryClaimPeriodRewardDistributionsByIDResponse) Size

func (*QueryClaimPeriodRewardDistributionsByIDResponse) String

func (*QueryClaimPeriodRewardDistributionsByIDResponse) Unmarshal

func (*QueryClaimPeriodRewardDistributionsByIDResponse) XXX_DiscardUnknown

func (m *QueryClaimPeriodRewardDistributionsByIDResponse) XXX_DiscardUnknown()

func (*QueryClaimPeriodRewardDistributionsByIDResponse) XXX_Marshal

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

func (*QueryClaimPeriodRewardDistributionsByIDResponse) XXX_Merge

func (*QueryClaimPeriodRewardDistributionsByIDResponse) XXX_Size

func (*QueryClaimPeriodRewardDistributionsByIDResponse) XXX_Unmarshal

type QueryClaimPeriodRewardDistributionsRequest

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

QueryClaimPeriodRewardDistributionsRequest queries for all the ClaimPeriodRewardDistributions with pagination.

func (*QueryClaimPeriodRewardDistributionsRequest) Descriptor

func (*QueryClaimPeriodRewardDistributionsRequest) GetPagination

func (*QueryClaimPeriodRewardDistributionsRequest) Marshal

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

func (*QueryClaimPeriodRewardDistributionsRequest) MarshalTo

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

func (*QueryClaimPeriodRewardDistributionsRequest) MarshalToSizedBuffer

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

func (*QueryClaimPeriodRewardDistributionsRequest) ProtoMessage

func (*QueryClaimPeriodRewardDistributionsRequest) Reset

func (*QueryClaimPeriodRewardDistributionsRequest) Size

func (*QueryClaimPeriodRewardDistributionsRequest) String

func (*QueryClaimPeriodRewardDistributionsRequest) Unmarshal

func (*QueryClaimPeriodRewardDistributionsRequest) XXX_DiscardUnknown

func (m *QueryClaimPeriodRewardDistributionsRequest) XXX_DiscardUnknown()

func (*QueryClaimPeriodRewardDistributionsRequest) XXX_Marshal

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

func (*QueryClaimPeriodRewardDistributionsRequest) XXX_Merge

func (*QueryClaimPeriodRewardDistributionsRequest) XXX_Size

func (*QueryClaimPeriodRewardDistributionsRequest) XXX_Unmarshal

type QueryClaimPeriodRewardDistributionsResponse

type QueryClaimPeriodRewardDistributionsResponse struct {
	// List of all ClaimPeriodRewardDistribution objects queried for.
	ClaimPeriodRewardDistributions []ClaimPeriodRewardDistribution `` /* 145-byte string literal not displayed */
	// pagination defines an optional pagination for the response.
	Pagination *query.PageResponse `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryClaimPeriodRewardDistributionsResponse returns the list of paginated ClaimPeriodRewardDistributions

func (*QueryClaimPeriodRewardDistributionsResponse) Descriptor

func (*QueryClaimPeriodRewardDistributionsResponse) GetClaimPeriodRewardDistributions

func (m *QueryClaimPeriodRewardDistributionsResponse) GetClaimPeriodRewardDistributions() []ClaimPeriodRewardDistribution

func (*QueryClaimPeriodRewardDistributionsResponse) GetPagination

func (*QueryClaimPeriodRewardDistributionsResponse) Marshal

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

func (*QueryClaimPeriodRewardDistributionsResponse) MarshalTo

func (*QueryClaimPeriodRewardDistributionsResponse) MarshalToSizedBuffer

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

func (*QueryClaimPeriodRewardDistributionsResponse) ProtoMessage

func (*QueryClaimPeriodRewardDistributionsResponse) Reset

func (*QueryClaimPeriodRewardDistributionsResponse) Size

func (*QueryClaimPeriodRewardDistributionsResponse) String

func (*QueryClaimPeriodRewardDistributionsResponse) Unmarshal

func (*QueryClaimPeriodRewardDistributionsResponse) XXX_DiscardUnknown

func (m *QueryClaimPeriodRewardDistributionsResponse) XXX_DiscardUnknown()

func (*QueryClaimPeriodRewardDistributionsResponse) XXX_Marshal

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

func (*QueryClaimPeriodRewardDistributionsResponse) XXX_Merge

func (*QueryClaimPeriodRewardDistributionsResponse) XXX_Size

func (*QueryClaimPeriodRewardDistributionsResponse) XXX_Unmarshal

type QueryClient

type QueryClient interface {
	// RewardProgramByID returns a reward program matching the ID.
	RewardProgramByID(ctx context.Context, in *QueryRewardProgramByIDRequest, opts ...grpc.CallOption) (*QueryRewardProgramByIDResponse, error)
	// RewardPrograms returns a list of reward programs matching the query type.
	RewardPrograms(ctx context.Context, in *QueryRewardProgramsRequest, opts ...grpc.CallOption) (*QueryRewardProgramsResponse, error)
	// ClaimPeriodRewardDistributions returns a list of claim period reward distributions matching the claim_status.
	ClaimPeriodRewardDistributions(ctx context.Context, in *QueryClaimPeriodRewardDistributionsRequest, opts ...grpc.CallOption) (*QueryClaimPeriodRewardDistributionsResponse, error)
	// ClaimPeriodRewardDistributionsByID returns a claim period reward distribution matching the ID.
	ClaimPeriodRewardDistributionsByID(ctx context.Context, in *QueryClaimPeriodRewardDistributionsByIDRequest, opts ...grpc.CallOption) (*QueryClaimPeriodRewardDistributionsByIDResponse, error)
	// RewardDistributionsByAddress returns a list of reward claims belonging to the account and matching the claim
	// status.
	RewardDistributionsByAddress(ctx context.Context, in *QueryRewardDistributionsByAddressRequest, opts ...grpc.CallOption) (*QueryRewardDistributionsByAddressResponse, 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 QueryRewardDistributionsByAddressRequest

type QueryRewardDistributionsByAddressRequest struct {
	// The address that the claim belongs to.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// The status that the reward account must have.
	ClaimStatus RewardAccountState_ClaimStatus `` /* 152-byte string literal not displayed */
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRewardDistributionsByAddressRequest queries for reward claims by address that match the claim_status.

func (*QueryRewardDistributionsByAddressRequest) Descriptor

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

func (*QueryRewardDistributionsByAddressRequest) GetAddress

func (*QueryRewardDistributionsByAddressRequest) GetClaimStatus

func (*QueryRewardDistributionsByAddressRequest) GetPagination

func (*QueryRewardDistributionsByAddressRequest) Marshal

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

func (*QueryRewardDistributionsByAddressRequest) MarshalTo

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

func (*QueryRewardDistributionsByAddressRequest) MarshalToSizedBuffer

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

func (*QueryRewardDistributionsByAddressRequest) ProtoMessage

func (*QueryRewardDistributionsByAddressRequest) Reset

func (*QueryRewardDistributionsByAddressRequest) Size

func (*QueryRewardDistributionsByAddressRequest) String

func (*QueryRewardDistributionsByAddressRequest) Unmarshal

func (*QueryRewardDistributionsByAddressRequest) XXX_DiscardUnknown

func (m *QueryRewardDistributionsByAddressRequest) XXX_DiscardUnknown()

func (*QueryRewardDistributionsByAddressRequest) XXX_Marshal

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

func (*QueryRewardDistributionsByAddressRequest) XXX_Merge

func (*QueryRewardDistributionsByAddressRequest) XXX_Size

func (*QueryRewardDistributionsByAddressRequest) XXX_Unmarshal

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

type QueryRewardDistributionsByAddressResponse

type QueryRewardDistributionsByAddressResponse struct {
	// The address that the reward account belongs to.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// List of RewardAccounts queried for.
	RewardAccountState []RewardAccountResponse `protobuf:"bytes,2,rep,name=reward_account_state,json=rewardAccountState,proto3" json:"reward_account_state"`
	// pagination defines an optional pagination for the response.
	Pagination *query.PageResponse `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRewardDistributionsByAddressResponse returns the reward claims for an address that match the claim_status.

func (*QueryRewardDistributionsByAddressResponse) Descriptor

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

func (*QueryRewardDistributionsByAddressResponse) GetAddress

func (*QueryRewardDistributionsByAddressResponse) GetPagination

func (*QueryRewardDistributionsByAddressResponse) GetRewardAccountState

func (*QueryRewardDistributionsByAddressResponse) Marshal

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

func (*QueryRewardDistributionsByAddressResponse) MarshalTo

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

func (*QueryRewardDistributionsByAddressResponse) MarshalToSizedBuffer

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

func (*QueryRewardDistributionsByAddressResponse) ProtoMessage

func (*QueryRewardDistributionsByAddressResponse) Reset

func (*QueryRewardDistributionsByAddressResponse) Size

func (*QueryRewardDistributionsByAddressResponse) String

func (*QueryRewardDistributionsByAddressResponse) Unmarshal

func (*QueryRewardDistributionsByAddressResponse) XXX_DiscardUnknown

func (m *QueryRewardDistributionsByAddressResponse) XXX_DiscardUnknown()

func (*QueryRewardDistributionsByAddressResponse) XXX_Marshal

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

func (*QueryRewardDistributionsByAddressResponse) XXX_Merge

func (*QueryRewardDistributionsByAddressResponse) XXX_Size

func (*QueryRewardDistributionsByAddressResponse) XXX_Unmarshal

type QueryRewardProgramByIDRequest

type QueryRewardProgramByIDRequest struct {
	// The id of the reward program to query.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

QueryRewardProgramByIDRequest queries for the Reward Program with an identifier of id

func (*QueryRewardProgramByIDRequest) Descriptor

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

func (*QueryRewardProgramByIDRequest) GetId

func (*QueryRewardProgramByIDRequest) Marshal

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

func (*QueryRewardProgramByIDRequest) MarshalTo

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

func (*QueryRewardProgramByIDRequest) MarshalToSizedBuffer

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

func (*QueryRewardProgramByIDRequest) ProtoMessage

func (*QueryRewardProgramByIDRequest) ProtoMessage()

func (*QueryRewardProgramByIDRequest) Reset

func (m *QueryRewardProgramByIDRequest) Reset()

func (*QueryRewardProgramByIDRequest) Size

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

func (*QueryRewardProgramByIDRequest) String

func (*QueryRewardProgramByIDRequest) Unmarshal

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

func (*QueryRewardProgramByIDRequest) XXX_DiscardUnknown

func (m *QueryRewardProgramByIDRequest) XXX_DiscardUnknown()

func (*QueryRewardProgramByIDRequest) XXX_Marshal

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

func (*QueryRewardProgramByIDRequest) XXX_Merge

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

func (*QueryRewardProgramByIDRequest) XXX_Size

func (m *QueryRewardProgramByIDRequest) XXX_Size() int

func (*QueryRewardProgramByIDRequest) XXX_Unmarshal

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

type QueryRewardProgramByIDResponse

type QueryRewardProgramByIDResponse struct {
	// The reward program object that was queried for.
	RewardProgram *RewardProgram `protobuf:"bytes,1,opt,name=reward_program,json=rewardProgram,proto3" json:"reward_program,omitempty"`
}

QueryRewardProgramByIDResponse contains the requested RewardProgram

func (*QueryRewardProgramByIDResponse) Descriptor

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

func (*QueryRewardProgramByIDResponse) GetRewardProgram

func (m *QueryRewardProgramByIDResponse) GetRewardProgram() *RewardProgram

func (*QueryRewardProgramByIDResponse) Marshal

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

func (*QueryRewardProgramByIDResponse) MarshalTo

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

func (*QueryRewardProgramByIDResponse) MarshalToSizedBuffer

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

func (*QueryRewardProgramByIDResponse) ProtoMessage

func (*QueryRewardProgramByIDResponse) ProtoMessage()

func (*QueryRewardProgramByIDResponse) Reset

func (m *QueryRewardProgramByIDResponse) Reset()

func (*QueryRewardProgramByIDResponse) Size

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

func (*QueryRewardProgramByIDResponse) String

func (*QueryRewardProgramByIDResponse) Unmarshal

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

func (*QueryRewardProgramByIDResponse) XXX_DiscardUnknown

func (m *QueryRewardProgramByIDResponse) XXX_DiscardUnknown()

func (*QueryRewardProgramByIDResponse) XXX_Marshal

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

func (*QueryRewardProgramByIDResponse) XXX_Merge

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

func (*QueryRewardProgramByIDResponse) XXX_Size

func (m *QueryRewardProgramByIDResponse) XXX_Size() int

func (*QueryRewardProgramByIDResponse) XXX_Unmarshal

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

type QueryRewardProgramsRequest

type QueryRewardProgramsRequest struct {
	// A filter on the types of reward programs.
	QueryType QueryRewardProgramsRequest_QueryType `` /* 152-byte string literal not displayed */
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRewardProgramsRequest queries for all reward programs matching the query_type

func (*QueryRewardProgramsRequest) Descriptor

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

func (*QueryRewardProgramsRequest) GetPagination

func (m *QueryRewardProgramsRequest) GetPagination() *query.PageRequest

func (*QueryRewardProgramsRequest) GetQueryType

func (*QueryRewardProgramsRequest) Marshal

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

func (*QueryRewardProgramsRequest) MarshalTo

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

func (*QueryRewardProgramsRequest) MarshalToSizedBuffer

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

func (*QueryRewardProgramsRequest) ProtoMessage

func (*QueryRewardProgramsRequest) ProtoMessage()

func (*QueryRewardProgramsRequest) Reset

func (m *QueryRewardProgramsRequest) Reset()

func (*QueryRewardProgramsRequest) Size

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

func (*QueryRewardProgramsRequest) String

func (m *QueryRewardProgramsRequest) String() string

func (*QueryRewardProgramsRequest) Unmarshal

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

func (*QueryRewardProgramsRequest) XXX_DiscardUnknown

func (m *QueryRewardProgramsRequest) XXX_DiscardUnknown()

func (*QueryRewardProgramsRequest) XXX_Marshal

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

func (*QueryRewardProgramsRequest) XXX_Merge

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

func (*QueryRewardProgramsRequest) XXX_Size

func (m *QueryRewardProgramsRequest) XXX_Size() int

func (*QueryRewardProgramsRequest) XXX_Unmarshal

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

type QueryRewardProgramsRequest_QueryType

type QueryRewardProgramsRequest_QueryType int32

QueryType is the state of reward program to query

const (
	// unspecified type
	QueryRewardProgramsRequest_QUERY_TYPE_UNSPECIFIED QueryRewardProgramsRequest_QueryType = 0
	// all reward programs states
	QueryRewardProgramsRequest_QUERY_TYPE_ALL QueryRewardProgramsRequest_QueryType = 1
	// pending reward program state=
	QueryRewardProgramsRequest_QUERY_TYPE_PENDING QueryRewardProgramsRequest_QueryType = 2
	// active reward program state
	QueryRewardProgramsRequest_QUERY_TYPE_ACTIVE QueryRewardProgramsRequest_QueryType = 3
	// pending and active reward program states
	QueryRewardProgramsRequest_QUERY_TYPE_OUTSTANDING QueryRewardProgramsRequest_QueryType = 4
	// finished reward program state
	QueryRewardProgramsRequest_QUERY_TYPE_FINISHED QueryRewardProgramsRequest_QueryType = 5
)

func (QueryRewardProgramsRequest_QueryType) EnumDescriptor

func (QueryRewardProgramsRequest_QueryType) EnumDescriptor() ([]byte, []int)

func (QueryRewardProgramsRequest_QueryType) String

type QueryRewardProgramsResponse

type QueryRewardProgramsResponse struct {
	// List of RewardProgram objects matching the query_type.
	RewardPrograms []RewardProgram `protobuf:"bytes,1,rep,name=reward_programs,json=rewardPrograms,proto3" json:"reward_programs"`
	// pagination defines an optional pagination for the response.
	Pagination *query.PageResponse `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryRewardProgramsResponse contains the list of RewardPrograms matching the query

func (*QueryRewardProgramsResponse) Descriptor

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

func (*QueryRewardProgramsResponse) GetPagination

func (m *QueryRewardProgramsResponse) GetPagination() *query.PageResponse

func (*QueryRewardProgramsResponse) GetRewardPrograms

func (m *QueryRewardProgramsResponse) GetRewardPrograms() []RewardProgram

func (*QueryRewardProgramsResponse) Marshal

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

func (*QueryRewardProgramsResponse) MarshalTo

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

func (*QueryRewardProgramsResponse) MarshalToSizedBuffer

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

func (*QueryRewardProgramsResponse) ProtoMessage

func (*QueryRewardProgramsResponse) ProtoMessage()

func (*QueryRewardProgramsResponse) Reset

func (m *QueryRewardProgramsResponse) Reset()

func (*QueryRewardProgramsResponse) Size

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

func (*QueryRewardProgramsResponse) String

func (m *QueryRewardProgramsResponse) String() string

func (*QueryRewardProgramsResponse) Unmarshal

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

func (*QueryRewardProgramsResponse) XXX_DiscardUnknown

func (m *QueryRewardProgramsResponse) XXX_DiscardUnknown()

func (*QueryRewardProgramsResponse) XXX_Marshal

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

func (*QueryRewardProgramsResponse) XXX_Merge

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

func (*QueryRewardProgramsResponse) XXX_Size

func (m *QueryRewardProgramsResponse) XXX_Size() int

func (*QueryRewardProgramsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// RewardProgramByID returns a reward program matching the ID.
	RewardProgramByID(context.Context, *QueryRewardProgramByIDRequest) (*QueryRewardProgramByIDResponse, error)
	// RewardPrograms returns a list of reward programs matching the query type.
	RewardPrograms(context.Context, *QueryRewardProgramsRequest) (*QueryRewardProgramsResponse, error)
	// ClaimPeriodRewardDistributions returns a list of claim period reward distributions matching the claim_status.
	ClaimPeriodRewardDistributions(context.Context, *QueryClaimPeriodRewardDistributionsRequest) (*QueryClaimPeriodRewardDistributionsResponse, error)
	// ClaimPeriodRewardDistributionsByID returns a claim period reward distribution matching the ID.
	ClaimPeriodRewardDistributionsByID(context.Context, *QueryClaimPeriodRewardDistributionsByIDRequest) (*QueryClaimPeriodRewardDistributionsByIDResponse, error)
	// RewardDistributionsByAddress returns a list of reward claims belonging to the account and matching the claim
	// status.
	RewardDistributionsByAddress(context.Context, *QueryRewardDistributionsByAddressRequest) (*QueryRewardDistributionsByAddressResponse, error)
}

QueryServer is the server API for Query service.

type RewardAccountLookup

type RewardAccountLookup struct {
	Addr     sdk.Address
	RewardID uint64
	ClaimID  uint64
}

func ParseFilterLookUpKey

func ParseFilterLookUpKey(accountStateAddressLookupKey []byte, addr sdk.AccAddress) (RewardAccountLookup, error)

ParseFilterLookUpKey splits the provided key into a reward id and claim id and returns them in a RewardAccountLookup along with the provided address.

func ParseRewardAccountLookUpKey

func ParseRewardAccountLookUpKey(accountStateAddressLookupKey []byte, addr sdk.AccAddress) (RewardAccountLookup, error)

ParseRewardAccountLookUpKey parse key generated like via GetRewardAccountStateAddressLookupKey(address, rewardProgramId, claimPeriodId)

type RewardAccountResponse

type RewardAccountResponse struct {
	// The id of the reward program that this claim belongs to.
	RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"`
	// total rewards claimed for all eligible claim periods in program.
	TotalRewardClaim types.Coin `protobuf:"bytes,2,opt,name=total_reward_claim,json=totalRewardClaim,proto3" json:"total_reward_claim"`
	// The status of the claim.
	ClaimStatus RewardAccountState_ClaimStatus `` /* 152-byte string literal not displayed */
	// The claim period that the claim belongs to.
	ClaimId uint64 `protobuf:"varint,4,opt,name=claim_id,json=claimId,proto3" json:"claim_id,omitempty"`
}

RewardAccountResponse is an address' reward claim for a reward program's claim period.

func (*RewardAccountResponse) Descriptor

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

func (*RewardAccountResponse) Equal

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

func (*RewardAccountResponse) GetClaimId

func (m *RewardAccountResponse) GetClaimId() uint64

func (*RewardAccountResponse) GetClaimStatus

func (*RewardAccountResponse) GetRewardProgramId

func (m *RewardAccountResponse) GetRewardProgramId() uint64

func (*RewardAccountResponse) GetTotalRewardClaim

func (m *RewardAccountResponse) GetTotalRewardClaim() types.Coin

func (*RewardAccountResponse) Marshal

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

func (*RewardAccountResponse) MarshalTo

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

func (*RewardAccountResponse) MarshalToSizedBuffer

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

func (*RewardAccountResponse) ProtoMessage

func (*RewardAccountResponse) ProtoMessage()

func (*RewardAccountResponse) Reset

func (m *RewardAccountResponse) Reset()

func (*RewardAccountResponse) Size

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

func (*RewardAccountResponse) String

func (m *RewardAccountResponse) String() string

func (*RewardAccountResponse) Unmarshal

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

func (*RewardAccountResponse) XXX_DiscardUnknown

func (m *RewardAccountResponse) XXX_DiscardUnknown()

func (*RewardAccountResponse) XXX_Marshal

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

func (*RewardAccountResponse) XXX_Merge

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

func (*RewardAccountResponse) XXX_Size

func (m *RewardAccountResponse) XXX_Size() int

func (*RewardAccountResponse) XXX_Unmarshal

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

type RewardAccountState

type RewardAccountState struct {
	// The id of the reward program that this share belongs to.
	RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"`
	// The id of the claim period that the share belongs to.
	ClaimPeriodId uint64 `protobuf:"varint,2,opt,name=claim_period_id,json=claimPeriodId,proto3" json:"claim_period_id,omitempty"`
	// Owner of the reward account state.
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	// The number of actions performed by this account, mapped by action type.
	ActionCounter []*ActionCounter `protobuf:"bytes,4,rep,name=action_counter,json=actionCounter,proto3" json:"action_counter,omitempty"`
	// The amount of granted shares for the address in the reward program's claim period.
	SharesEarned uint64 `protobuf:"varint,5,opt,name=shares_earned,json=sharesEarned,proto3" json:"shares_earned,omitempty"`
	// The status of the claim.
	ClaimStatus RewardAccountState_ClaimStatus `` /* 152-byte string literal not displayed */
}

RewardAccountState contains state at the claim period level for a specific address.

func NewRewardAccountState

func NewRewardAccountState(rewardProgramID, rewardClaimPeriodID uint64, address string, shares uint64, actionCounter []*ActionCounter) RewardAccountState

func (*RewardAccountState) Descriptor

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

func (*RewardAccountState) Equal

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

func (*RewardAccountState) GetActionCounter

func (m *RewardAccountState) GetActionCounter() []*ActionCounter

func (*RewardAccountState) GetAddress

func (m *RewardAccountState) GetAddress() string

func (*RewardAccountState) GetClaimPeriodId

func (m *RewardAccountState) GetClaimPeriodId() uint64

func (*RewardAccountState) GetClaimStatus

func (*RewardAccountState) GetRewardProgramId

func (m *RewardAccountState) GetRewardProgramId() uint64

func (*RewardAccountState) GetSharesEarned

func (m *RewardAccountState) GetSharesEarned() uint64

func (*RewardAccountState) Marshal

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

func (*RewardAccountState) MarshalTo

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

func (*RewardAccountState) MarshalToSizedBuffer

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

func (*RewardAccountState) ProtoMessage

func (*RewardAccountState) ProtoMessage()

func (*RewardAccountState) Reset

func (m *RewardAccountState) Reset()

func (*RewardAccountState) Size

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

func (*RewardAccountState) String

func (m *RewardAccountState) String() string

func (*RewardAccountState) Unmarshal

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

func (*RewardAccountState) Validate

func (s *RewardAccountState) Validate() error

func (*RewardAccountState) XXX_DiscardUnknown

func (m *RewardAccountState) XXX_DiscardUnknown()

func (*RewardAccountState) XXX_Marshal

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

func (*RewardAccountState) XXX_Merge

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

func (*RewardAccountState) XXX_Size

func (m *RewardAccountState) XXX_Size() int

func (*RewardAccountState) XXX_Unmarshal

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

type RewardAccountState_ClaimStatus

type RewardAccountState_ClaimStatus int32

ClaimStatus is the state a claim is in

const (
	// undefined state
	RewardAccountState_CLAIM_STATUS_UNSPECIFIED RewardAccountState_ClaimStatus = 0
	// unclaimable status
	RewardAccountState_CLAIM_STATUS_UNCLAIMABLE RewardAccountState_ClaimStatus = 1
	// unclaimable claimable
	RewardAccountState_CLAIM_STATUS_CLAIMABLE RewardAccountState_ClaimStatus = 2
	// unclaimable claimed
	RewardAccountState_CLAIM_STATUS_CLAIMED RewardAccountState_ClaimStatus = 3
	// unclaimable expired
	RewardAccountState_CLAIM_STATUS_EXPIRED RewardAccountState_ClaimStatus = 4
)

func (RewardAccountState_ClaimStatus) EnumDescriptor

func (RewardAccountState_ClaimStatus) EnumDescriptor() ([]byte, []int)

func (RewardAccountState_ClaimStatus) String

type RewardAction

type RewardAction interface {
	// ActionType returns a string identifying this action type.
	ActionType() string
	// Evaluate returns true if this reward action satisfies the provided state and event.
	Evaluate(ctx sdk.Context, provider KeeperProvider, state RewardAccountState, evaluationResult EvaluationResult) bool
	// PreEvaluate returns true if this reward action is in a state that's ready for evaluation.
	PreEvaluate(ctx sdk.Context, provider KeeperProvider, state RewardAccountState) bool
	// PostEvaluate returns true if the all the action's post evaluation checks are met and allows the action to update the evaluation result as needed by the Action.
	PostEvaluate(ctx sdk.Context, provider KeeperProvider, state RewardAccountState, evaluationResult EvaluationResult) (bool, EvaluationResult)
	// GetBuilder returns a new ActionBuilder for this reward action.
	GetBuilder() ActionBuilder
}

RewardAction defines the interface that actions need to implement

type RewardProgram

type RewardProgram struct {
	// An integer to uniquely identify the reward program.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// Name to help identify the Reward Program.(MaxTitleLength=140)
	Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	// Short summary describing the Reward Program.(MaxDescriptionLength=10000)
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// address that provides funds for the total reward pool.
	DistributeFromAddress string `` /* 126-byte string literal not displayed */
	// The total amount of funding given to the RewardProgram.
	TotalRewardPool types.Coin `protobuf:"bytes,5,opt,name=total_reward_pool,json=totalRewardPool,proto3" json:"total_reward_pool"`
	// The remaining funds available to distribute after n claim periods have passed.
	RemainingPoolBalance types.Coin `protobuf:"bytes,6,opt,name=remaining_pool_balance,json=remainingPoolBalance,proto3" json:"remaining_pool_balance"`
	// The total amount of all funds claimed by participants for all past claim periods.
	ClaimedAmount types.Coin `protobuf:"bytes,7,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount"`
	// Maximum reward per claim period per address.
	MaxRewardByAddress types.Coin `protobuf:"bytes,8,opt,name=max_reward_by_address,json=maxRewardByAddress,proto3" json:"max_reward_by_address"`
	// Minimum amount of coins for a program to rollover.
	MinimumRolloverAmount types.Coin `protobuf:"bytes,9,opt,name=minimum_rollover_amount,json=minimumRolloverAmount,proto3" json:"minimum_rollover_amount"`
	// Number of seconds that a claim period lasts.
	ClaimPeriodSeconds uint64 `protobuf:"varint,10,opt,name=claim_period_seconds,json=claimPeriodSeconds,proto3" json:"claim_period_seconds,omitempty"`
	// Time that a RewardProgram should start and switch to STARTED state.
	ProgramStartTime time.Time `protobuf:"bytes,11,opt,name=program_start_time,json=programStartTime,proto3,stdtime" json:"program_start_time"`
	// Time that a RewardProgram is expected to end, based on data when it was setup.
	ExpectedProgramEndTime time.Time `` /* 130-byte string literal not displayed */
	// Time that a RewardProgram MUST end.
	ProgramEndTimeMax time.Time `protobuf:"bytes,13,opt,name=program_end_time_max,json=programEndTimeMax,proto3,stdtime" json:"program_end_time_max"`
	// Used internally to calculate and track the current claim period's ending time.
	ClaimPeriodEndTime time.Time `protobuf:"bytes,14,opt,name=claim_period_end_time,json=claimPeriodEndTime,proto3,stdtime" json:"claim_period_end_time"`
	// Time the RewardProgram switched to FINISHED state. Initially set as empty.
	ActualProgramEndTime time.Time `protobuf:"bytes,15,opt,name=actual_program_end_time,json=actualProgramEndTime,proto3,stdtime" json:"actual_program_end_time"`
	// Number of claim periods this program will run for.
	ClaimPeriods uint64 `protobuf:"varint,16,opt,name=claim_periods,json=claimPeriods,proto3" json:"claim_periods,omitempty"`
	// Current claim period of the RewardProgram. Uses 1-based indexing.
	CurrentClaimPeriod uint64 `protobuf:"varint,17,opt,name=current_claim_period,json=currentClaimPeriod,proto3" json:"current_claim_period,omitempty"`
	// maximum number of claim periods a reward program can rollover.
	MaxRolloverClaimPeriods uint64 `` /* 136-byte string literal not displayed */
	// Current state of the RewardProgram.
	State RewardProgram_State `protobuf:"varint,19,opt,name=state,proto3,enum=provenance.reward.v1.RewardProgram_State" json:"state,omitempty"`
	// Grace period after a RewardProgram FINISHED. It is the number of seconds until a RewardProgram enters the EXPIRED
	// state.
	ExpirationOffset uint64 `protobuf:"varint,20,opt,name=expiration_offset,json=expirationOffset,proto3" json:"expiration_offset,omitempty"`
	// Actions that count towards the reward.
	QualifyingActions []QualifyingAction `protobuf:"bytes,21,rep,name=qualifying_actions,json=qualifyingActions,proto3" json:"qualifying_actions"`
}

RewardProgram

func NewRewardProgram

func NewRewardProgram(
	title string,
	description string,
	id uint64,
	distributeFromAddress string,
	totalRewardPool sdk.Coin,
	maxRewardByAddress sdk.Coin,
	programStartTime time.Time,
	claimPeriodSeconds uint64,
	claimPeriods uint64,
	maxRolloverClaimPeriods uint64,
	rewardClaimExpirationOffset uint64,
	qualifyingActions []QualifyingAction,
) RewardProgram

func (*RewardProgram) Descriptor

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

func (*RewardProgram) Equal

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

func (*RewardProgram) GetActualProgramEndTime

func (m *RewardProgram) GetActualProgramEndTime() time.Time

func (*RewardProgram) GetClaimPeriodEndTime

func (m *RewardProgram) GetClaimPeriodEndTime() time.Time

func (*RewardProgram) GetClaimPeriodSeconds

func (m *RewardProgram) GetClaimPeriodSeconds() uint64

func (*RewardProgram) GetClaimPeriods

func (m *RewardProgram) GetClaimPeriods() uint64

func (*RewardProgram) GetClaimedAmount

func (m *RewardProgram) GetClaimedAmount() types.Coin

func (*RewardProgram) GetCurrentClaimPeriod

func (m *RewardProgram) GetCurrentClaimPeriod() uint64

func (*RewardProgram) GetDescription

func (m *RewardProgram) GetDescription() string

func (*RewardProgram) GetDistributeFromAddress

func (m *RewardProgram) GetDistributeFromAddress() string

func (*RewardProgram) GetExpectedProgramEndTime

func (m *RewardProgram) GetExpectedProgramEndTime() time.Time

func (*RewardProgram) GetExpirationOffset

func (m *RewardProgram) GetExpirationOffset() uint64

func (*RewardProgram) GetId

func (m *RewardProgram) GetId() uint64

func (*RewardProgram) GetMaxRewardByAddress

func (m *RewardProgram) GetMaxRewardByAddress() types.Coin

func (*RewardProgram) GetMaxRolloverClaimPeriods

func (m *RewardProgram) GetMaxRolloverClaimPeriods() uint64

func (*RewardProgram) GetMinimumRolloverAmount

func (m *RewardProgram) GetMinimumRolloverAmount() types.Coin

func (*RewardProgram) GetProgramEndTimeMax

func (m *RewardProgram) GetProgramEndTimeMax() time.Time

func (*RewardProgram) GetProgramStartTime

func (m *RewardProgram) GetProgramStartTime() time.Time

func (*RewardProgram) GetQualifyingActions

func (m *RewardProgram) GetQualifyingActions() []QualifyingAction

func (*RewardProgram) GetRemainingPoolBalance

func (m *RewardProgram) GetRemainingPoolBalance() types.Coin

func (*RewardProgram) GetState

func (m *RewardProgram) GetState() RewardProgram_State

func (*RewardProgram) GetTitle

func (m *RewardProgram) GetTitle() string

func (*RewardProgram) GetTotalRewardPool

func (m *RewardProgram) GetTotalRewardPool() types.Coin

func (*RewardProgram) IsEnding

func (rp *RewardProgram) IsEnding(ctx sdk.Context, programBalance sdk.Coin) bool

IsEnding returns if a reward program has ended for a running program

func (*RewardProgram) IsEndingClaimPeriod

func (rp *RewardProgram) IsEndingClaimPeriod(ctx sdk.Context) bool

IsEndingClaimPeriod returns if claim period has ended for a running reward program

func (*RewardProgram) IsExpiring

func (rp *RewardProgram) IsExpiring(ctx sdk.Context) bool

IsExpiring returns if reward program has expired for a finished reward program

func (*RewardProgram) IsStarting

func (rp *RewardProgram) IsStarting(ctx sdk.Context) bool

IsStarting checks the state of the reward program and determines if it has started

func (*RewardProgram) Marshal

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

func (*RewardProgram) MarshalTo

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

func (*RewardProgram) MarshalToSizedBuffer

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

func (*RewardProgram) MatchesState

func (rp *RewardProgram) MatchesState(states []RewardProgram_State) bool

MatchesState returns if a reward program is in one of the passed in states. It will return true if states is empty.

func (*RewardProgram) ProtoMessage

func (*RewardProgram) ProtoMessage()

func (*RewardProgram) Reset

func (m *RewardProgram) Reset()

func (*RewardProgram) Size

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

func (*RewardProgram) String

func (m *RewardProgram) String() string

func (*RewardProgram) Unmarshal

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

func (*RewardProgram) Validate

func (rp *RewardProgram) Validate() error

func (*RewardProgram) XXX_DiscardUnknown

func (m *RewardProgram) XXX_DiscardUnknown()

func (*RewardProgram) XXX_Marshal

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

func (*RewardProgram) XXX_Merge

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

func (*RewardProgram) XXX_Size

func (m *RewardProgram) XXX_Size() int

func (*RewardProgram) XXX_Unmarshal

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

type RewardProgramClaimDetail

type RewardProgramClaimDetail struct {
	// reward program id.
	RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"`
	// total rewards claimed for all eligible claim periods in program.
	TotalRewardClaim types.Coin `protobuf:"bytes,2,opt,name=total_reward_claim,json=totalRewardClaim,proto3" json:"total_reward_claim"`
	// claim period details.
	ClaimedRewardPeriodDetails []*ClaimedRewardPeriodDetail `` /* 143-byte string literal not displayed */
}

RewardProgramClaimDetail is the response object regarding an address's shares and reward for a reward program.

func (*RewardProgramClaimDetail) Descriptor

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

func (*RewardProgramClaimDetail) Equal

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

func (*RewardProgramClaimDetail) GetClaimedRewardPeriodDetails

func (m *RewardProgramClaimDetail) GetClaimedRewardPeriodDetails() []*ClaimedRewardPeriodDetail

func (*RewardProgramClaimDetail) GetRewardProgramId

func (m *RewardProgramClaimDetail) GetRewardProgramId() uint64

func (*RewardProgramClaimDetail) GetTotalRewardClaim

func (m *RewardProgramClaimDetail) GetTotalRewardClaim() types.Coin

func (*RewardProgramClaimDetail) Marshal

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

func (*RewardProgramClaimDetail) MarshalTo

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

func (*RewardProgramClaimDetail) MarshalToSizedBuffer

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

func (*RewardProgramClaimDetail) ProtoMessage

func (*RewardProgramClaimDetail) ProtoMessage()

func (*RewardProgramClaimDetail) Reset

func (m *RewardProgramClaimDetail) Reset()

func (*RewardProgramClaimDetail) Size

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

func (*RewardProgramClaimDetail) String

func (m *RewardProgramClaimDetail) String() string

func (*RewardProgramClaimDetail) Unmarshal

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

func (*RewardProgramClaimDetail) XXX_DiscardUnknown

func (m *RewardProgramClaimDetail) XXX_DiscardUnknown()

func (*RewardProgramClaimDetail) XXX_Marshal

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

func (*RewardProgramClaimDetail) XXX_Merge

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

func (*RewardProgramClaimDetail) XXX_Size

func (m *RewardProgramClaimDetail) XXX_Size() int

func (*RewardProgramClaimDetail) XXX_Unmarshal

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

type RewardProgram_State

type RewardProgram_State int32

State is the state of the reward program

const (
	// undefined program state
	RewardProgram_STATE_UNSPECIFIED RewardProgram_State = 0
	// pending state of reward program
	RewardProgram_STATE_PENDING RewardProgram_State = 1
	// started state of reward program
	RewardProgram_STATE_STARTED RewardProgram_State = 2
	// finished state of reward program
	RewardProgram_STATE_FINISHED RewardProgram_State = 3
	// expired state of reward program
	RewardProgram_STATE_EXPIRED RewardProgram_State = 4
)

func (RewardProgram_State) EnumDescriptor

func (RewardProgram_State) EnumDescriptor() ([]byte, []int)

func (RewardProgram_State) String

func (x RewardProgram_State) String() string

type StakingKeeper

type StakingKeeper interface {
	GetAllDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress) []stakingtypes.Delegation
	GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator
	GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) (power int64)
	GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool)
	GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool)
}

StakingKeeper defines a subset of methods implemented by the cosmos-sdk staking keeper

type TransferActionBuilder

type TransferActionBuilder struct {
	Sender    sdk.AccAddress
	Action    string
	Recipient sdk.AccAddress
}

func (*TransferActionBuilder) AddEvent

func (b *TransferActionBuilder) AddEvent(eventType string, attributes *map[string][]byte) error

func (*TransferActionBuilder) BuildAction

func (b *TransferActionBuilder) BuildAction() (EvaluationResult, error)

func (*TransferActionBuilder) CanBuild

func (b *TransferActionBuilder) CanBuild() bool

func (*TransferActionBuilder) GetEventCriteria

func (b *TransferActionBuilder) GetEventCriteria() *EventCriteria

func (*TransferActionBuilder) Reset

func (b *TransferActionBuilder) Reset()

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) ClaimAllRewards

func (*UnimplementedMsgServer) ClaimRewards

func (*UnimplementedMsgServer) CreateRewardProgram

func (*UnimplementedMsgServer) EndRewardProgram

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) RewardProgramByID

func (*UnimplementedQueryServer) RewardPrograms

type VoteActionBuilder

type VoteActionBuilder struct {
	Voter sdk.AccAddress
	Voted bool
}

func (*VoteActionBuilder) AddEvent

func (v *VoteActionBuilder) AddEvent(_ string, attributes *map[string][]byte) error

func (*VoteActionBuilder) BuildAction

func (v *VoteActionBuilder) BuildAction() (EvaluationResult, error)

func (*VoteActionBuilder) CanBuild

func (v *VoteActionBuilder) CanBuild() bool

func (*VoteActionBuilder) GetEventCriteria

func (v *VoteActionBuilder) GetEventCriteria() *EventCriteria

func (*VoteActionBuilder) Reset

func (v *VoteActionBuilder) Reset()

Jump to

Keyboard shortcuts

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