Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func RewardsKey(address string) []byte
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParams) ValidateBasic() error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetEnabled() bool
- func (m *Params) GetRewardPerDeposit() types.Coin
- func (m *Params) GetRewardPerWithdraw() types.Coin
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryRewardStatsRequest
- func (*QueryRewardStatsRequest) Descriptor() ([]byte, []int)
- func (m *QueryRewardStatsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryRewardStatsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRewardStatsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRewardStatsRequest) ProtoMessage()
- func (m *QueryRewardStatsRequest) Reset()
- func (m *QueryRewardStatsRequest) Size() (n int)
- func (m *QueryRewardStatsRequest) String() string
- func (m *QueryRewardStatsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryRewardStatsRequest) XXX_DiscardUnknown()
- func (m *QueryRewardStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRewardStatsRequest) XXX_Merge(src proto.Message)
- func (m *QueryRewardStatsRequest) XXX_Size() int
- func (m *QueryRewardStatsRequest) XXX_Unmarshal(b []byte) error
- type QueryRewardStatsResponse
- func (*QueryRewardStatsResponse) Descriptor() ([]byte, []int)
- func (m *QueryRewardStatsResponse) GetRewardStats() *RewardStats
- func (m *QueryRewardStatsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryRewardStatsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRewardStatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRewardStatsResponse) ProtoMessage()
- func (m *QueryRewardStatsResponse) Reset()
- func (m *QueryRewardStatsResponse) Size() (n int)
- func (m *QueryRewardStatsResponse) String() string
- func (m *QueryRewardStatsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryRewardStatsResponse) XXX_DiscardUnknown()
- func (m *QueryRewardStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRewardStatsResponse) XXX_Merge(src proto.Message)
- func (m *QueryRewardStatsResponse) XXX_Size() int
- func (m *QueryRewardStatsResponse) XXX_Unmarshal(b []byte) error
- type QueryRewardsRequest
- func (*QueryRewardsRequest) Descriptor() ([]byte, []int)
- func (m *QueryRewardsRequest) GetAddress() string
- func (m *QueryRewardsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryRewardsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRewardsRequest) ProtoMessage()
- func (m *QueryRewardsRequest) Reset()
- func (m *QueryRewardsRequest) Size() (n int)
- func (m *QueryRewardsRequest) String() string
- func (m *QueryRewardsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryRewardsRequest) XXX_DiscardUnknown()
- func (m *QueryRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRewardsRequest) XXX_Merge(src proto.Message)
- func (m *QueryRewardsRequest) XXX_Size() int
- func (m *QueryRewardsRequest) XXX_Unmarshal(b []byte) error
- type QueryRewardsResponse
- func (*QueryRewardsResponse) Descriptor() ([]byte, []int)
- func (m *QueryRewardsResponse) GetRewards() *Rewards
- func (m *QueryRewardsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryRewardsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRewardsResponse) ProtoMessage()
- func (m *QueryRewardsResponse) Reset()
- func (m *QueryRewardsResponse) Size() (n int)
- func (m *QueryRewardsResponse) String() string
- func (m *QueryRewardsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryRewardsResponse) XXX_DiscardUnknown()
- func (m *QueryRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRewardsResponse) XXX_Merge(src proto.Message)
- func (m *QueryRewardsResponse) XXX_Size() int
- func (m *QueryRewardsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type RewardStats
- func (*RewardStats) Descriptor() ([]byte, []int)
- func (m *RewardStats) GetAddressCount() uint64
- func (m *RewardStats) GetTotalRewardAmount() types.Coin
- func (m *RewardStats) GetTxCount() uint64
- func (m *RewardStats) Marshal() (dAtA []byte, err error)
- func (m *RewardStats) MarshalTo(dAtA []byte) (int, error)
- func (m *RewardStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RewardStats) ProtoMessage()
- func (m *RewardStats) Reset()
- func (m *RewardStats) Size() (n int)
- func (m *RewardStats) String() string
- func (m *RewardStats) Unmarshal(dAtA []byte) error
- func (m *RewardStats) XXX_DiscardUnknown()
- func (m *RewardStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RewardStats) XXX_Merge(src proto.Message)
- func (m *RewardStats) XXX_Size() int
- func (m *RewardStats) XXX_Unmarshal(b []byte) error
- type Rewards
- func (*Rewards) Descriptor() ([]byte, []int)
- func (m *Rewards) GetAddress() string
- func (m *Rewards) GetDepositCount() uint64
- func (m *Rewards) GetDepositReward() types.Coin
- func (m *Rewards) GetTotalAmount() types.Coin
- func (m *Rewards) GetWithdrawCount() uint64
- func (m *Rewards) GetWithdrawReward() types.Coin
- func (m *Rewards) Marshal() (dAtA []byte, err error)
- func (m *Rewards) MarshalTo(dAtA []byte) (int, error)
- func (m *Rewards) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Rewards) ProtoMessage()
- func (m *Rewards) Reset()
- func (m *Rewards) Size() (n int)
- func (m *Rewards) String() string
- func (m *Rewards) Unmarshal(dAtA []byte) error
- func (m *Rewards) XXX_DiscardUnknown()
- func (m *Rewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Rewards) XXX_Merge(src proto.Message)
- func (m *Rewards) XXX_Size() int
- func (m *Rewards) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) RewardStats(ctx context.Context, req *QueryRewardStatsRequest) (*QueryRewardStatsResponse, error)
- func (*UnimplementedQueryServer) Rewards(ctx context.Context, req *QueryRewardsRequest) (*QueryRewardsResponse, error)
Constants ¶
const ( // ModuleName defines the module name ModuleName = "incentive" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey defines the module's message routing key RouterKey = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_incentive" )
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( ErrDepositIncentiveNotEnabled = errorsmod.Register(ModuleName, 1001, "incentive not enabled for deposit") ErrWithdrawIncentiveNotEnabled = errorsmod.Register(ModuleName, 1002, "incentive not enabled for withdrawal") ErrInvalidParams = errorsmod.Register(ModuleName, 1003, "invalid params") )
x/incentive module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthIncentive = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowIncentive = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupIncentive = fmt.Errorf("proto: unexpected end of group") )
var ( ParamsStoreKey = []byte{0x1} RewardStatsKey = []byte{0x11} // key for total reward statistics RewardsKeyPrefix = []byte{0x12} // prefix for each key to the rewards )
var ( // default reward per deposit tx via btc bridge DefaultRewardPerDeposit = sdk.NewInt64Coin("uside", 100000000) // 100SIDE // default reward per withdrawal tx via btc bridge DefaultRewardPerWithdraw = sdk.NewInt64Coin("uside", 100000000) // 100SIDE )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var Msg_serviceDesc = _Msg_serviceDesc
var Query_serviceDesc = _Query_serviceDesc
Functions ¶
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
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 RewardsKey ¶
Types ¶
type BankKeeper ¶
type BankKeeper interface {
SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins
SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
SendCoinsFromModuleToModule(ctx context.Context, senderModule, recipientModule string, amt sdk.Coins) error
SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
SetDenomMetaData(ctx context.Context, denomMetaData banktype.Metadata)
MintCoins(ctx context.Context, moduleName string, amounts sdk.Coins) error
BurnCoins(ctx context.Context, moduleName string, amounts sdk.Coins) error
HasSupply(ctx context.Context, denom string) bool
GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
}
BankKeeper defines the expected interface needed to retrieve account balances.
type GenesisState ¶
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
GenesisState defines the incentive module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state
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) 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 MsgClient ¶
type MsgClient interface {
// UpdateParams defines a governance operation for updating the x/incentive module
// parameters. The authority defaults to the x/gov module account.
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶
type MsgServer interface {
// UpdateParams defines a governance operation for updating the x/incentive module
// parameters. The authority defaults to the x/gov module account.
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, 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/incentive parameters to be updated.
//
// NOTE: All parameters must be supplied.
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}
MsgUpdateParams is the Msg/UpdateParams request type.
Since: cosmos-sdk 0.47
func (*MsgUpdateParams) Descriptor ¶
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶
func (m *MsgUpdateParams) GetParams() Params
func (*MsgUpdateParams) Marshal ¶
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err 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 performs basic MsgUpdateParams message validation.
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 Msg/UpdateParams response type.
Since: cosmos-sdk 0.47
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 {
// Indicates if the incentive mechanism is enabled
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// Reward per deposit tx via btc bridge
RewardPerDeposit types.Coin `protobuf:"bytes,2,opt,name=reward_per_deposit,json=rewardPerDeposit,proto3" json:"reward_per_deposit"`
// Reward per withdrawal tx via btc bridge
RewardPerWithdraw types.Coin `protobuf:"bytes,3,opt,name=reward_per_withdraw,json=rewardPerWithdraw,proto3" json:"reward_per_withdraw"`
}
Params defines the parameters for the module.
func (*Params) Descriptor ¶
func (*Params) GetEnabled ¶
func (*Params) GetRewardPerDeposit ¶
func (*Params) GetRewardPerWithdraw ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface {
// Params queries the parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// Rewards queries the rewards of the given address.
Rewards(ctx context.Context, in *QueryRewardsRequest, opts ...grpc.CallOption) (*QueryRewardsResponse, error)
// RewardStats queries total reward statistics.
RewardStats(ctx context.Context, in *QueryRewardStatsRequest, opts ...grpc.CallOption) (*QueryRewardStatsResponse, 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 QueryParamsRequest ¶
type QueryParamsRequest struct {
}
QueryParamsRequest is request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
// params holds all the parameters of this module.
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse is response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
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 QueryRewardStatsRequest ¶
type QueryRewardStatsRequest struct {
}
QueryRewardStatsRequest is request type for the Query/RewardStats RPC method.
func (*QueryRewardStatsRequest) Descriptor ¶
func (*QueryRewardStatsRequest) Descriptor() ([]byte, []int)
func (*QueryRewardStatsRequest) Marshal ¶
func (m *QueryRewardStatsRequest) Marshal() (dAtA []byte, err error)
func (*QueryRewardStatsRequest) MarshalTo ¶
func (m *QueryRewardStatsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryRewardStatsRequest) MarshalToSizedBuffer ¶
func (m *QueryRewardStatsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRewardStatsRequest) ProtoMessage ¶
func (*QueryRewardStatsRequest) ProtoMessage()
func (*QueryRewardStatsRequest) Reset ¶
func (m *QueryRewardStatsRequest) Reset()
func (*QueryRewardStatsRequest) Size ¶
func (m *QueryRewardStatsRequest) Size() (n int)
func (*QueryRewardStatsRequest) String ¶
func (m *QueryRewardStatsRequest) String() string
func (*QueryRewardStatsRequest) Unmarshal ¶
func (m *QueryRewardStatsRequest) Unmarshal(dAtA []byte) error
func (*QueryRewardStatsRequest) XXX_DiscardUnknown ¶
func (m *QueryRewardStatsRequest) XXX_DiscardUnknown()
func (*QueryRewardStatsRequest) XXX_Marshal ¶
func (m *QueryRewardStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRewardStatsRequest) XXX_Merge ¶
func (m *QueryRewardStatsRequest) XXX_Merge(src proto.Message)
func (*QueryRewardStatsRequest) XXX_Size ¶
func (m *QueryRewardStatsRequest) XXX_Size() int
func (*QueryRewardStatsRequest) XXX_Unmarshal ¶
func (m *QueryRewardStatsRequest) XXX_Unmarshal(b []byte) error
type QueryRewardStatsResponse ¶
type QueryRewardStatsResponse struct {
RewardStats *RewardStats `protobuf:"bytes,1,opt,name=reward_stats,json=rewardStats,proto3" json:"reward_stats,omitempty"`
}
QueryRewardStatsResponse is response type for the Query/RewardStats RPC method.
func (*QueryRewardStatsResponse) Descriptor ¶
func (*QueryRewardStatsResponse) Descriptor() ([]byte, []int)
func (*QueryRewardStatsResponse) GetRewardStats ¶
func (m *QueryRewardStatsResponse) GetRewardStats() *RewardStats
func (*QueryRewardStatsResponse) Marshal ¶
func (m *QueryRewardStatsResponse) Marshal() (dAtA []byte, err error)
func (*QueryRewardStatsResponse) MarshalTo ¶
func (m *QueryRewardStatsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryRewardStatsResponse) MarshalToSizedBuffer ¶
func (m *QueryRewardStatsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRewardStatsResponse) ProtoMessage ¶
func (*QueryRewardStatsResponse) ProtoMessage()
func (*QueryRewardStatsResponse) Reset ¶
func (m *QueryRewardStatsResponse) Reset()
func (*QueryRewardStatsResponse) Size ¶
func (m *QueryRewardStatsResponse) Size() (n int)
func (*QueryRewardStatsResponse) String ¶
func (m *QueryRewardStatsResponse) String() string
func (*QueryRewardStatsResponse) Unmarshal ¶
func (m *QueryRewardStatsResponse) Unmarshal(dAtA []byte) error
func (*QueryRewardStatsResponse) XXX_DiscardUnknown ¶
func (m *QueryRewardStatsResponse) XXX_DiscardUnknown()
func (*QueryRewardStatsResponse) XXX_Marshal ¶
func (m *QueryRewardStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRewardStatsResponse) XXX_Merge ¶
func (m *QueryRewardStatsResponse) XXX_Merge(src proto.Message)
func (*QueryRewardStatsResponse) XXX_Size ¶
func (m *QueryRewardStatsResponse) XXX_Size() int
func (*QueryRewardStatsResponse) XXX_Unmarshal ¶
func (m *QueryRewardStatsResponse) XXX_Unmarshal(b []byte) error
type QueryRewardsRequest ¶
type QueryRewardsRequest struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}
QueryRewardsRequest is request type for the Query/Rewards RPC method.
func (*QueryRewardsRequest) Descriptor ¶
func (*QueryRewardsRequest) Descriptor() ([]byte, []int)
func (*QueryRewardsRequest) GetAddress ¶
func (m *QueryRewardsRequest) GetAddress() string
func (*QueryRewardsRequest) Marshal ¶
func (m *QueryRewardsRequest) Marshal() (dAtA []byte, err error)
func (*QueryRewardsRequest) MarshalTo ¶
func (m *QueryRewardsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryRewardsRequest) MarshalToSizedBuffer ¶
func (m *QueryRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRewardsRequest) ProtoMessage ¶
func (*QueryRewardsRequest) ProtoMessage()
func (*QueryRewardsRequest) Reset ¶
func (m *QueryRewardsRequest) Reset()
func (*QueryRewardsRequest) Size ¶
func (m *QueryRewardsRequest) Size() (n int)
func (*QueryRewardsRequest) String ¶
func (m *QueryRewardsRequest) String() string
func (*QueryRewardsRequest) Unmarshal ¶
func (m *QueryRewardsRequest) Unmarshal(dAtA []byte) error
func (*QueryRewardsRequest) XXX_DiscardUnknown ¶
func (m *QueryRewardsRequest) XXX_DiscardUnknown()
func (*QueryRewardsRequest) XXX_Marshal ¶
func (m *QueryRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRewardsRequest) XXX_Merge ¶
func (m *QueryRewardsRequest) XXX_Merge(src proto.Message)
func (*QueryRewardsRequest) XXX_Size ¶
func (m *QueryRewardsRequest) XXX_Size() int
func (*QueryRewardsRequest) XXX_Unmarshal ¶
func (m *QueryRewardsRequest) XXX_Unmarshal(b []byte) error
type QueryRewardsResponse ¶
type QueryRewardsResponse struct {
Rewards *Rewards `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards,omitempty"`
}
QueryRewardsResponse is response type for the Query/Rewards RPC method.
func (*QueryRewardsResponse) Descriptor ¶
func (*QueryRewardsResponse) Descriptor() ([]byte, []int)
func (*QueryRewardsResponse) GetRewards ¶
func (m *QueryRewardsResponse) GetRewards() *Rewards
func (*QueryRewardsResponse) Marshal ¶
func (m *QueryRewardsResponse) Marshal() (dAtA []byte, err error)
func (*QueryRewardsResponse) MarshalTo ¶
func (m *QueryRewardsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryRewardsResponse) MarshalToSizedBuffer ¶
func (m *QueryRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRewardsResponse) ProtoMessage ¶
func (*QueryRewardsResponse) ProtoMessage()
func (*QueryRewardsResponse) Reset ¶
func (m *QueryRewardsResponse) Reset()
func (*QueryRewardsResponse) Size ¶
func (m *QueryRewardsResponse) Size() (n int)
func (*QueryRewardsResponse) String ¶
func (m *QueryRewardsResponse) String() string
func (*QueryRewardsResponse) Unmarshal ¶
func (m *QueryRewardsResponse) Unmarshal(dAtA []byte) error
func (*QueryRewardsResponse) XXX_DiscardUnknown ¶
func (m *QueryRewardsResponse) XXX_DiscardUnknown()
func (*QueryRewardsResponse) XXX_Marshal ¶
func (m *QueryRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRewardsResponse) XXX_Merge ¶
func (m *QueryRewardsResponse) XXX_Merge(src proto.Message)
func (*QueryRewardsResponse) XXX_Size ¶
func (m *QueryRewardsResponse) XXX_Size() int
func (*QueryRewardsResponse) XXX_Unmarshal ¶
func (m *QueryRewardsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface {
// Params queries the parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// Rewards queries the rewards of the given address.
Rewards(context.Context, *QueryRewardsRequest) (*QueryRewardsResponse, error)
// RewardStats queries total reward statistics.
RewardStats(context.Context, *QueryRewardStatsRequest) (*QueryRewardStatsResponse, error)
}
QueryServer is the server API for Query service.
type RewardStats ¶
type RewardStats struct {
AddressCount uint64 `protobuf:"varint,1,opt,name=address_count,json=addressCount,proto3" json:"address_count,omitempty"`
TxCount uint64 `protobuf:"varint,2,opt,name=tx_count,json=txCount,proto3" json:"tx_count,omitempty"`
TotalRewardAmount types.Coin `protobuf:"bytes,3,opt,name=total_reward_amount,json=totalRewardAmount,proto3" json:"total_reward_amount"`
}
Reward Statistics
func (*RewardStats) Descriptor ¶
func (*RewardStats) Descriptor() ([]byte, []int)
func (*RewardStats) GetAddressCount ¶
func (m *RewardStats) GetAddressCount() uint64
func (*RewardStats) GetTotalRewardAmount ¶
func (m *RewardStats) GetTotalRewardAmount() types.Coin
func (*RewardStats) GetTxCount ¶
func (m *RewardStats) GetTxCount() uint64
func (*RewardStats) Marshal ¶
func (m *RewardStats) Marshal() (dAtA []byte, err error)
func (*RewardStats) MarshalToSizedBuffer ¶
func (m *RewardStats) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RewardStats) ProtoMessage ¶
func (*RewardStats) ProtoMessage()
func (*RewardStats) Reset ¶
func (m *RewardStats) Reset()
func (*RewardStats) Size ¶
func (m *RewardStats) Size() (n int)
func (*RewardStats) String ¶
func (m *RewardStats) String() string
func (*RewardStats) Unmarshal ¶
func (m *RewardStats) Unmarshal(dAtA []byte) error
func (*RewardStats) XXX_DiscardUnknown ¶
func (m *RewardStats) XXX_DiscardUnknown()
func (*RewardStats) XXX_Marshal ¶
func (m *RewardStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RewardStats) XXX_Merge ¶
func (m *RewardStats) XXX_Merge(src proto.Message)
func (*RewardStats) XXX_Size ¶
func (m *RewardStats) XXX_Size() int
func (*RewardStats) XXX_Unmarshal ¶
func (m *RewardStats) XXX_Unmarshal(b []byte) error
type Rewards ¶
type Rewards struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
DepositCount uint64 `protobuf:"varint,2,opt,name=deposit_count,json=depositCount,proto3" json:"deposit_count,omitempty"`
WithdrawCount uint64 `protobuf:"varint,3,opt,name=withdraw_count,json=withdrawCount,proto3" json:"withdraw_count,omitempty"`
DepositReward types.Coin `protobuf:"bytes,4,opt,name=deposit_reward,json=depositReward,proto3" json:"deposit_reward"`
WithdrawReward types.Coin `protobuf:"bytes,5,opt,name=withdraw_reward,json=withdrawReward,proto3" json:"withdraw_reward"`
TotalAmount types.Coin `protobuf:"bytes,6,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount"`
}
Rewards
func (*Rewards) Descriptor ¶
func (*Rewards) GetAddress ¶
func (*Rewards) GetDepositCount ¶
func (*Rewards) GetDepositReward ¶
func (*Rewards) GetTotalAmount ¶
func (*Rewards) GetWithdrawCount ¶
func (*Rewards) GetWithdrawReward ¶
func (*Rewards) MarshalToSizedBuffer ¶
func (*Rewards) ProtoMessage ¶
func (*Rewards) ProtoMessage()
func (*Rewards) XXX_DiscardUnknown ¶
func (m *Rewards) XXX_DiscardUnknown()
func (*Rewards) XXX_Marshal ¶
func (*Rewards) XXX_Unmarshal ¶
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct {
}
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct {
}
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) RewardStats ¶
func (*UnimplementedQueryServer) RewardStats(ctx context.Context, req *QueryRewardStatsRequest) (*QueryRewardStatsResponse, error)
func (*UnimplementedQueryServer) Rewards ¶
func (*UnimplementedQueryServer) Rewards(ctx context.Context, req *QueryRewardsRequest) (*QueryRewardsResponse, error)