types

package
v1.0.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: LGPL-3.0 Imports: 33 Imported by: 1

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AttributeValueCategory = ModuleName
	AttributeValueReceiver = "receiver"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "claims"

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

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

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

	// Query endpoints supported by the minting querier
	QueryParameters = "parameters"
)

nolint

View Source
const (
	DefaultParamSpace = ModuleName
)

default paramspace for params keeper

View Source
const (
	TypeMsgClaims = "claims"
)

Variables

View Source
var (
	ErrInvalidLengthClaims        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowClaims          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupClaims = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrCalculateRewards                        = errorsmod.Register(ModuleName, 2, "error while calculating rewards")
	ErrSendCoins                               = errorsmod.Register(ModuleName, 3, "error while sending coins")
	ErrUpdateNodeHistoricalEmissionOnLastClaim = errorsmod.Register(ModuleName, 4, "error while updating node historical emission on last claim")
	ErrHolderNotFound                          = errorsmod.Register(ModuleName, 5, "holder not found")
	ErrZeroRewards                             = errorsmod.Register(ModuleName, 6, "zero rewards")
	ErrFirstEpoch                              = errorsmod.Register(ModuleName, 7, "current epoch is the first epoch")
)
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 (
	// use for the keeper store
	ParamsKey  = []byte{0x00}
	FeePoolKey = []byte{0x01} // key for global distribution state
)
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 (
	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 (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamTable for mint module

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec required for EIP-712

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateGenesis

func ValidateGenesis(gs *GenesisState) error

ValidateGenesis validates the provided staking genesis state to ensure the expected invariants holds. (i.e. params in correct bounds, no duplicate validators)

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress

	// TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862
	SetModuleAccount(sdk.Context, types.ModuleAccountI)
	GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI
}

AccountKeeper defines the contract required for account APIs.

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToAccount(
		ctx sdk.Context,
		senderModule string,
		recipientAddr sdk.AccAddress,
		amt sdk.Coins,
	) error
	SendCoinsFromModuleToModule(
		ctx sdk.Context,
		senderModule, recipientModule string,
		amt sdk.Coins,
	) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error

	MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error

	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetSupply(ctx sdk.Context, denom string) sdk.Coin
}

BankKeeper defines the contract needed to be fulfilled for banking and supply dependencies.

type CaptainsKeeper

type CaptainsKeeper interface {
	GetParams(ctx sdk.Context) captainnodetypes.Params

	GetNodesByOwner(ctx sdk.Context, owner sdk.AccAddress) (nodes []captainnodetypes.Node)

	// GetCurrentEpoch return the current epoch id.
	GetCurrentEpoch(ctx sdk.Context) uint64

	// CalcNodeCumulativeEmissionByEpoch returns the cumulative emission of the node by the end of epoch.
	CalcNodeCumulativeEmissionByEpoch(ctx sdk.Context, epochID uint64, nodeID string) sdk.Dec

	// GetNodeClaimedEmission returns the historical emission the last time user claimed.
	GetNodeClaimedEmission(ctx sdk.Context, nodeID string) sdk.Dec

	// UpdateGlobalAndNodeClaimedEmission updates the node_historical_emission_on_last_claim.
	UpdateGlobalAndNodeClaimedEmission(ctx sdk.Context, nodeID string) error
}

type DistrKeeper

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

DistrKeeper defines the contract needed to be fulfilled for distribution keeper

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState define the claims module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState gets raw genesis raw message for testing

func NewGenesisState

func NewGenesisState(params Params) *GenesisState

NewGenesisState constructs a GenesisState

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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) 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 MintKeeper

type MintKeeper interface {
	GetMinter(ctx sdk.Context) minttypes.Minter
}

type MsgClaims

type MsgClaims struct {
	Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"`
	Sender   string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgClaims

func NewMsgClaims

func NewMsgClaims(sender sdk.AccAddress, receiver sdk.AccAddress) *MsgClaims

func (*MsgClaims) Descriptor

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

func (MsgClaims) GetSignBytes

func (msg MsgClaims) GetSignBytes() []byte

get the bytes for the message signer to sign on

func (MsgClaims) GetSigners

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

Return address that must sign over msg.GetSignBytes()

func (*MsgClaims) Marshal

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

func (*MsgClaims) MarshalTo

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

func (*MsgClaims) MarshalToSizedBuffer

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

func (*MsgClaims) ProtoMessage

func (*MsgClaims) ProtoMessage()

func (*MsgClaims) Reset

func (m *MsgClaims) Reset()

func (MsgClaims) Route

func (msg MsgClaims) Route() string

func (*MsgClaims) Size

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

func (*MsgClaims) String

func (m *MsgClaims) String() string

func (MsgClaims) Type

func (msg MsgClaims) Type() string

func (*MsgClaims) Unmarshal

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

func (MsgClaims) ValidateBasic

func (msg MsgClaims) ValidateBasic() error

quick validity check

func (*MsgClaims) XXX_DiscardUnknown

func (m *MsgClaims) XXX_DiscardUnknown()

func (*MsgClaims) XXX_Marshal

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

func (*MsgClaims) XXX_Merge

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

func (*MsgClaims) XXX_Size

func (m *MsgClaims) XXX_Size() int

func (*MsgClaims) XXX_Unmarshal

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

type MsgClaimsResponse

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

MsgClaimsResponse defines the Msg/Claims response type.

func (*MsgClaimsResponse) Descriptor

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

func (*MsgClaimsResponse) Marshal

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

func (*MsgClaimsResponse) MarshalTo

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

func (*MsgClaimsResponse) MarshalToSizedBuffer

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

func (*MsgClaimsResponse) ProtoMessage

func (*MsgClaimsResponse) ProtoMessage()

func (*MsgClaimsResponse) Reset

func (m *MsgClaimsResponse) Reset()

func (*MsgClaimsResponse) Size

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

func (*MsgClaimsResponse) String

func (m *MsgClaimsResponse) String() string

func (*MsgClaimsResponse) Unmarshal

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

func (*MsgClaimsResponse) XXX_DiscardUnknown

func (m *MsgClaimsResponse) XXX_DiscardUnknown()

func (*MsgClaimsResponse) XXX_Marshal

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

func (*MsgClaimsResponse) XXX_Merge

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

func (*MsgClaimsResponse) XXX_Size

func (m *MsgClaimsResponse) XXX_Size() int

func (*MsgClaimsResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// UpdateParams defines a governance operation for updating the x/claims
	// module parameters. The authority is defined in the keeper.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
	// Claims defines a method to withdraw the rewards
	Claims(ctx context.Context, in *MsgClaims, opts ...grpc.CallOption) (*MsgClaimsResponse, 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 MsgServer

type MsgServer interface {
	// UpdateParams defines a governance operation for updating the x/claims
	// module parameters. The authority is defined in the keeper.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
	// Claims defines a method to withdraw the rewards
	Claims(context.Context, *MsgClaims) (*MsgClaimsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

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

MsgUpdateParams is the Msg/UpdateParams request type.

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetSignBytes

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

GetSignBytes returns the raw bytes for a MsgUpdateParams message that the expected signer needs to sign.

func (*MsgUpdateParams) GetSigners

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

GetSigners returns the expected signers for a MsgUpdateParams message

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) ValidateBasic

func (m *MsgUpdateParams) ValidateBasic() error

ValidateBasic executes sanity validation on the provided data

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// enable_claims is the parameter to enable the claiming process
	EnableClaims bool `protobuf:"varint,1,opt,name=enable_claims,json=enableClaims,proto3" json:"enable_claims,omitempty"`
	// claims_denom is the denomination of the claimable coin
	ClaimsDenom string `protobuf:"bytes,2,opt,name=claims_denom,json=claimsDenom,proto3" json:"claims_denom,omitempty"`
}

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func (*Params) Descriptor

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

func (*Params) GetClaimsDenom

func (m *Params) GetClaimsDenom() string

func (*Params) GetEnableClaims

func (m *Params) GetEnableClaims() bool

func (*Params) GetParamSpace

func (p *Params) GetParamSpace() string

GetParamSpace implements params.ParamStruct

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) ValidateBasic

func (p Params) ValidateBasic() error

Validate returns err if the Params is invalid

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params queries the mint parameters
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// NodeTotalRewards queries the total rewards accrued by a delegation.
	NodeTotalRewards(ctx context.Context, in *QueryNodeTotalRewardsRequest, opts ...grpc.CallOption) (*QueryNodeTotalRewardsResponse, error)
	// HolderTotalRewards queries the total rewards accrued by a delegation.
	HolderTotalRewards(ctx context.Context, in *QueryHolderTotalRewardsRequest, opts ...grpc.CallOption) (*QueryHolderTotalRewardsResponse, 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 QueryHolderTotalRewardsRequest

type QueryHolderTotalRewardsRequest struct {
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
}

QueryHolderTotalRewardsRequest is request type for the Query/HolderTotalRewards RPC method

func (*QueryHolderTotalRewardsRequest) Descriptor

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

func (*QueryHolderTotalRewardsRequest) GetOwner

func (m *QueryHolderTotalRewardsRequest) GetOwner() string

func (*QueryHolderTotalRewardsRequest) Marshal

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

func (*QueryHolderTotalRewardsRequest) MarshalTo

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

func (*QueryHolderTotalRewardsRequest) MarshalToSizedBuffer

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

func (*QueryHolderTotalRewardsRequest) ProtoMessage

func (*QueryHolderTotalRewardsRequest) ProtoMessage()

func (*QueryHolderTotalRewardsRequest) Reset

func (m *QueryHolderTotalRewardsRequest) Reset()

func (*QueryHolderTotalRewardsRequest) Size

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

func (*QueryHolderTotalRewardsRequest) String

func (*QueryHolderTotalRewardsRequest) Unmarshal

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

func (*QueryHolderTotalRewardsRequest) XXX_DiscardUnknown

func (m *QueryHolderTotalRewardsRequest) XXX_DiscardUnknown()

func (*QueryHolderTotalRewardsRequest) XXX_Marshal

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

func (*QueryHolderTotalRewardsRequest) XXX_Merge

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

func (*QueryHolderTotalRewardsRequest) XXX_Size

func (m *QueryHolderTotalRewardsRequest) XXX_Size() int

func (*QueryHolderTotalRewardsRequest) XXX_Unmarshal

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

type QueryHolderTotalRewardsResponse

type QueryHolderTotalRewardsResponse struct {
	// rewards defines the rewards accrued by a delegation.
	Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"`
}

QueryHolderTotalRewardsResponse is response type for the Query/HolderTotalRewards RPC method

func (*QueryHolderTotalRewardsResponse) Descriptor

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

func (*QueryHolderTotalRewardsResponse) GetRewards

func (*QueryHolderTotalRewardsResponse) Marshal

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

func (*QueryHolderTotalRewardsResponse) MarshalTo

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

func (*QueryHolderTotalRewardsResponse) MarshalToSizedBuffer

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

func (*QueryHolderTotalRewardsResponse) ProtoMessage

func (*QueryHolderTotalRewardsResponse) ProtoMessage()

func (*QueryHolderTotalRewardsResponse) Reset

func (*QueryHolderTotalRewardsResponse) Size

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

func (*QueryHolderTotalRewardsResponse) String

func (*QueryHolderTotalRewardsResponse) Unmarshal

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

func (*QueryHolderTotalRewardsResponse) XXX_DiscardUnknown

func (m *QueryHolderTotalRewardsResponse) XXX_DiscardUnknown()

func (*QueryHolderTotalRewardsResponse) XXX_Marshal

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

func (*QueryHolderTotalRewardsResponse) XXX_Merge

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

func (*QueryHolderTotalRewardsResponse) XXX_Size

func (m *QueryHolderTotalRewardsResponse) XXX_Size() int

func (*QueryHolderTotalRewardsResponse) XXX_Unmarshal

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

type QueryNodeTotalRewardsRequest

type QueryNodeTotalRewardsRequest struct {
	NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
}

QueryNodeTotalRewardsRequest is request type for the Query/NodeTotalRewards RPC method

func (*QueryNodeTotalRewardsRequest) Descriptor

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

func (*QueryNodeTotalRewardsRequest) GetNodeId

func (m *QueryNodeTotalRewardsRequest) GetNodeId() string

func (*QueryNodeTotalRewardsRequest) Marshal

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

func (*QueryNodeTotalRewardsRequest) MarshalTo

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

func (*QueryNodeTotalRewardsRequest) MarshalToSizedBuffer

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

func (*QueryNodeTotalRewardsRequest) ProtoMessage

func (*QueryNodeTotalRewardsRequest) ProtoMessage()

func (*QueryNodeTotalRewardsRequest) Reset

func (m *QueryNodeTotalRewardsRequest) Reset()

func (*QueryNodeTotalRewardsRequest) Size

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

func (*QueryNodeTotalRewardsRequest) String

func (*QueryNodeTotalRewardsRequest) Unmarshal

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

func (*QueryNodeTotalRewardsRequest) XXX_DiscardUnknown

func (m *QueryNodeTotalRewardsRequest) XXX_DiscardUnknown()

func (*QueryNodeTotalRewardsRequest) XXX_Marshal

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

func (*QueryNodeTotalRewardsRequest) XXX_Merge

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

func (*QueryNodeTotalRewardsRequest) XXX_Size

func (m *QueryNodeTotalRewardsRequest) XXX_Size() int

func (*QueryNodeTotalRewardsRequest) XXX_Unmarshal

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

type QueryNodeTotalRewardsResponse

type QueryNodeTotalRewardsResponse struct {
	// rewards defines the rewards accrued by a delegation.
	Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"`
}

QueryNodeTotalRewardsResponse is response type for the Query/NodeTotalRewards RPC method

func (*QueryNodeTotalRewardsResponse) Descriptor

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

func (*QueryNodeTotalRewardsResponse) GetRewards

func (*QueryNodeTotalRewardsResponse) Marshal

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

func (*QueryNodeTotalRewardsResponse) MarshalTo

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

func (*QueryNodeTotalRewardsResponse) MarshalToSizedBuffer

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

func (*QueryNodeTotalRewardsResponse) ProtoMessage

func (*QueryNodeTotalRewardsResponse) ProtoMessage()

func (*QueryNodeTotalRewardsResponse) Reset

func (m *QueryNodeTotalRewardsResponse) Reset()

func (*QueryNodeTotalRewardsResponse) Size

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

func (*QueryNodeTotalRewardsResponse) String

func (*QueryNodeTotalRewardsResponse) Unmarshal

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

func (*QueryNodeTotalRewardsResponse) XXX_DiscardUnknown

func (m *QueryNodeTotalRewardsResponse) XXX_DiscardUnknown()

func (*QueryNodeTotalRewardsResponse) XXX_Marshal

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

func (*QueryNodeTotalRewardsResponse) XXX_Merge

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

func (*QueryNodeTotalRewardsResponse) XXX_Size

func (m *QueryNodeTotalRewardsResponse) XXX_Size() int

func (*QueryNodeTotalRewardsResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/Parameters RPC method

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params              `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	Res    *query.PageResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"`
}

QueryParamsResponse is response type for the Query/Parameters RPC method

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) GetRes

func (m *QueryParamsResponse) GetRes() *query.PageResponse

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params queries the mint parameters
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// NodeTotalRewards queries the total rewards accrued by a delegation.
	NodeTotalRewards(context.Context, *QueryNodeTotalRewardsRequest) (*QueryNodeTotalRewardsResponse, error)
	// HolderTotalRewards queries the total rewards accrued by a delegation.
	HolderTotalRewards(context.Context, *QueryHolderTotalRewardsRequest) (*QueryHolderTotalRewardsResponse, error)
}

QueryServer is the server API for Query service.

type StakingKeeper

type StakingKeeper interface {
	GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) (delegations []stakingtypes.Delegation)
	GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool)
	BondDenom(ctx sdk.Context) (res string)
	GetParams(ctx sdk.Context) stakingtypes.Params
}

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Claims

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) HolderTotalRewards

func (*UnimplementedQueryServer) NodeTotalRewards

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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