Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ParamKeyTable() paramstypes.KeyTable
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- 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)
- type AccountKeeper
- type BankKeeper
- type DistrKeeper
- type Exchange
- func (*Exchange) Descriptor() ([]byte, []int)
- func (m *Exchange) GetFrom() string
- func (m *Exchange) GetTo() string
- func (m *Exchange) Marshal() (dAtA []byte, err error)
- func (m *Exchange) MarshalTo(dAtA []byte) (int, error)
- func (m *Exchange) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Exchange) ProtoMessage()
- func (m *Exchange) Reset()
- func (m *Exchange) Size() (n int)
- func (m *Exchange) String() string
- func (m *Exchange) Unmarshal(dAtA []byte) error
- func (m *Exchange) XXX_DiscardUnknown()
- func (m *Exchange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Exchange) XXX_Merge(src proto.Message)
- func (m *Exchange) XXX_Size() int
- func (m *Exchange) XXX_Unmarshal(b []byte) error
- 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 (g 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 MsgExchange
- func (*MsgExchange) Descriptor() ([]byte, []int)
- func (this *MsgExchange) Equal(that interface{}) bool
- func (m *MsgExchange) GetAmount() types.Coin
- func (m *MsgExchange) GetFrom() string
- func (m *MsgExchange) GetRequester() string
- func (msg MsgExchange) GetSignBytes() []byte
- func (msg MsgExchange) GetSigners() []sdk.AccAddress
- func (m *MsgExchange) GetTo() string
- func (m *MsgExchange) Marshal() (dAtA []byte, err error)
- func (m *MsgExchange) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgExchange) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgExchange) ProtoMessage()
- func (m *MsgExchange) Reset()
- func (msg MsgExchange) Route() string
- func (m *MsgExchange) Size() (n int)
- func (m *MsgExchange) String() string
- func (msg MsgExchange) Type() string
- func (m *MsgExchange) Unmarshal(dAtA []byte) error
- func (msg MsgExchange) ValidateBasic() error
- func (m *MsgExchange) XXX_DiscardUnknown()
- func (m *MsgExchange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgExchange) XXX_Merge(src proto.Message)
- func (m *MsgExchange) XXX_Size() int
- func (m *MsgExchange) XXX_Unmarshal(b []byte) error
- type MsgExchangeResponse
- func (*MsgExchangeResponse) Descriptor() ([]byte, []int)
- func (m *MsgExchangeResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgExchangeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgExchangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgExchangeResponse) ProtoMessage()
- func (m *MsgExchangeResponse) Reset()
- func (m *MsgExchangeResponse) Size() (n int)
- func (m *MsgExchangeResponse) String() string
- func (m *MsgExchangeResponse) Unmarshal(dAtA []byte) error
- func (m *MsgExchangeResponse) XXX_DiscardUnknown()
- func (m *MsgExchangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgExchangeResponse) XXX_Merge(src proto.Message)
- func (m *MsgExchangeResponse) XXX_Size() int
- func (m *MsgExchangeResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type OracleKeeper
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetExchangeRates() []Exchange
- 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 (p *Params) ParamSetPairs() paramstypes.ParamSetPairs
- 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 (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 QueryRateRequest
- func (*QueryRateRequest) Descriptor() ([]byte, []int)
- func (m *QueryRateRequest) GetFrom() string
- func (m *QueryRateRequest) GetTo() string
- func (m *QueryRateRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryRateRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRateRequest) ProtoMessage()
- func (m *QueryRateRequest) Reset()
- func (m *QueryRateRequest) Size() (n int)
- func (m *QueryRateRequest) String() string
- func (m *QueryRateRequest) Unmarshal(dAtA []byte) error
- func (m *QueryRateRequest) XXX_DiscardUnknown()
- func (m *QueryRateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRateRequest) XXX_Merge(src proto.Message)
- func (m *QueryRateRequest) XXX_Size() int
- func (m *QueryRateRequest) XXX_Unmarshal(b []byte) error
- type QueryRateResponse
- func (*QueryRateResponse) Descriptor() ([]byte, []int)
- func (m *QueryRateResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryRateResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryRateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryRateResponse) ProtoMessage()
- func (m *QueryRateResponse) Reset()
- func (m *QueryRateResponse) Size() (n int)
- func (m *QueryRateResponse) String() string
- func (m *QueryRateResponse) Unmarshal(dAtA []byte) error
- func (m *QueryRateResponse) XXX_DiscardUnknown()
- func (m *QueryRateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRateResponse) XXX_Merge(src proto.Message)
- func (m *QueryRateResponse) XXX_Size() int
- func (m *QueryRateResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( AttributeKeyRequester = "requester" AttributeKeyAmount = "amount" AttributeKeyExchangeDenom = "exchange_denom" )
const ( // ModuleName is the name of the module. ModuleName = "coinswap" // ModuleVersion defines the current module version ModuleVersion = 1 // StoreKey to be used when creating the KVStore. StoreKey = ModuleName DefaultParamspace = ModuleName QuerierRoute = ModuleName QueryParams = "params" QueryRate = "rate" )
const ( DefaultFromExchange = "minigeo" DefaultToExchange = "loki" )
const (
EventTypeExchange = "exchange"
)
const RouterKey = ModuleName
RouterKey is the name of the coinswap module
Variables ¶
var ( ErrInvalidExchangeDenom = sdkerrors.New(ModuleName, 111, "unsupported exchange denomination") ErrExchangeDenomMissmatch = sdkerrors.New(ModuleName, 112, "exchange denomination does not match the amount provided") )
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 ( 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 (
InitialRateStoreKey = []byte("InitialRateStore") // key initial rate store
)
var KeyExchangeRates = []byte("ExchangeRates")
var ( // ModuleCdc references the global x/ibc-transfer module codec. Note, the codec // should ONLY be used in certain instances of tests and for JSON encoding. // // The actual codec used for serialization should be provided to x/ibc-transfer and // defined at the application level. ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) )
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramstypes.KeyTable
ParamKeyTable param table for coinswap module.
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the oracle module interfaces to protobuf Any.
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the module's concrete types on the codec.
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)
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI
}
AccountKeeper defines the expected account keeper.
type BankKeeper ¶
type BankKeeper interface { GetSupply(ctx sdk.Context, denom string) (supply sdk.Coin) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error }
BankKeeper defines the expected supply Keeper.
type DistrKeeper ¶
type DistrKeeper interface { GetFeePool(ctx sdk.Context) (feePool distrtypes.FeePool) SetFeePool(ctx sdk.Context, feePool distrtypes.FeePool) FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error }
type Exchange ¶
type Exchange struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` RateMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */ }
func (*Exchange) Descriptor ¶
func (*Exchange) MarshalToSizedBuffer ¶
func (*Exchange) ProtoMessage ¶
func (*Exchange) ProtoMessage()
func (*Exchange) XXX_DiscardUnknown ¶
func (m *Exchange) XXX_DiscardUnknown()
func (*Exchange) XXX_Marshal ¶
func (*Exchange) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` InitialRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ }
GenesisState defines the oracle module's 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 (g GenesisState) Validate() 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 MsgClient ¶
type MsgClient interface {
Exchange(ctx context.Context, in *MsgExchange, opts ...grpc.CallOption) (*MsgExchangeResponse, 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 MsgExchange ¶
type MsgExchange struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` Requester string `protobuf:"bytes,4,opt,name=requester,proto3" json:"requester,omitempty"` }
func NewMsgExchange ¶
func NewMsgExchange(from string, to string, amt sdk.Coin, requester sdk.AccAddress) *MsgExchange
func (*MsgExchange) Descriptor ¶
func (*MsgExchange) Descriptor() ([]byte, []int)
func (*MsgExchange) Equal ¶
func (this *MsgExchange) Equal(that interface{}) bool
func (*MsgExchange) GetAmount ¶
func (m *MsgExchange) GetAmount() types.Coin
func (*MsgExchange) GetFrom ¶
func (m *MsgExchange) GetFrom() string
func (*MsgExchange) GetRequester ¶
func (m *MsgExchange) GetRequester() string
func (MsgExchange) GetSignBytes ¶
func (msg MsgExchange) GetSignBytes() []byte
func (MsgExchange) GetSigners ¶
func (msg MsgExchange) GetSigners() []sdk.AccAddress
func (*MsgExchange) GetTo ¶
func (m *MsgExchange) GetTo() string
func (*MsgExchange) Marshal ¶
func (m *MsgExchange) Marshal() (dAtA []byte, err error)
func (*MsgExchange) MarshalToSizedBuffer ¶
func (m *MsgExchange) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgExchange) ProtoMessage ¶
func (*MsgExchange) ProtoMessage()
func (*MsgExchange) Reset ¶
func (m *MsgExchange) Reset()
func (MsgExchange) Route ¶
func (msg MsgExchange) Route() string
Route returns the route of MsgExchange - "coinswap" (sdk.Msg interface).
func (*MsgExchange) Size ¶
func (m *MsgExchange) Size() (n int)
func (*MsgExchange) String ¶
func (m *MsgExchange) String() string
func (MsgExchange) Type ¶
func (msg MsgExchange) Type() string
Type returns the message type of MsgExchange (sdk.Msg interface).
func (*MsgExchange) Unmarshal ¶
func (m *MsgExchange) Unmarshal(dAtA []byte) error
func (MsgExchange) ValidateBasic ¶
func (msg MsgExchange) ValidateBasic() error
ValidateBasic checks whether the given MsgExchange instance (sdk.Msg interface).
func (*MsgExchange) XXX_DiscardUnknown ¶
func (m *MsgExchange) XXX_DiscardUnknown()
func (*MsgExchange) XXX_Marshal ¶
func (m *MsgExchange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgExchange) XXX_Merge ¶
func (m *MsgExchange) XXX_Merge(src proto.Message)
func (*MsgExchange) XXX_Size ¶
func (m *MsgExchange) XXX_Size() int
func (*MsgExchange) XXX_Unmarshal ¶
func (m *MsgExchange) XXX_Unmarshal(b []byte) error
type MsgExchangeResponse ¶
type MsgExchangeResponse struct { }
func (*MsgExchangeResponse) Descriptor ¶
func (*MsgExchangeResponse) Descriptor() ([]byte, []int)
func (*MsgExchangeResponse) Marshal ¶
func (m *MsgExchangeResponse) Marshal() (dAtA []byte, err error)
func (*MsgExchangeResponse) MarshalTo ¶
func (m *MsgExchangeResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgExchangeResponse) MarshalToSizedBuffer ¶
func (m *MsgExchangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgExchangeResponse) ProtoMessage ¶
func (*MsgExchangeResponse) ProtoMessage()
func (*MsgExchangeResponse) Reset ¶
func (m *MsgExchangeResponse) Reset()
func (*MsgExchangeResponse) Size ¶
func (m *MsgExchangeResponse) Size() (n int)
func (*MsgExchangeResponse) String ¶
func (m *MsgExchangeResponse) String() string
func (*MsgExchangeResponse) Unmarshal ¶
func (m *MsgExchangeResponse) Unmarshal(dAtA []byte) error
func (*MsgExchangeResponse) XXX_DiscardUnknown ¶
func (m *MsgExchangeResponse) XXX_DiscardUnknown()
func (*MsgExchangeResponse) XXX_Marshal ¶
func (m *MsgExchangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgExchangeResponse) XXX_Merge ¶
func (m *MsgExchangeResponse) XXX_Merge(src proto.Message)
func (*MsgExchangeResponse) XXX_Size ¶
func (m *MsgExchangeResponse) XXX_Size() int
func (*MsgExchangeResponse) XXX_Unmarshal ¶
func (m *MsgExchangeResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface {
Exchange(context.Context, *MsgExchange) (*MsgExchangeResponse, error)
}
MsgServer is the server API for Msg service.
type OracleKeeper ¶
type OracleKeeper interface { GetAccumulatedPaymentsForData(ctx sdk.Context) (payments oracletypes.AccumulatedPaymentsForData) SetAccumulatedPaymentsForData(ctx sdk.Context, payments oracletypes.AccumulatedPaymentsForData) }
type Params ¶
type Params struct {
ExchangeRates []Exchange `protobuf:"bytes,1,rep,name=exchange_rates,json=exchangeRates,proto3" json:"exchange_rates"`
}
func DefaultParams ¶
func DefaultParams() Params
func (*Params) Descriptor ¶
func (*Params) GetExchangeRates ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramstypes.ParamSetPairs
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 { // Counts queries the number of data sources, oracle scripts, and requests. Rate(ctx context.Context, in *QueryRateRequest, opts ...grpc.CallOption) (*QueryRateResponse, error) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 { }
QueryCountsRequest is request type for the Query/Count 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"`
}
QueryCountsResponse is response type for the Query/Count 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 QueryRateRequest ¶
type QueryRateRequest struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` }
QueryCountsRequest is request type for the Query/Count RPC method.
func (*QueryRateRequest) Descriptor ¶
func (*QueryRateRequest) Descriptor() ([]byte, []int)
func (*QueryRateRequest) GetFrom ¶
func (m *QueryRateRequest) GetFrom() string
func (*QueryRateRequest) GetTo ¶
func (m *QueryRateRequest) GetTo() string
func (*QueryRateRequest) Marshal ¶
func (m *QueryRateRequest) Marshal() (dAtA []byte, err error)
func (*QueryRateRequest) MarshalToSizedBuffer ¶
func (m *QueryRateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRateRequest) ProtoMessage ¶
func (*QueryRateRequest) ProtoMessage()
func (*QueryRateRequest) Reset ¶
func (m *QueryRateRequest) Reset()
func (*QueryRateRequest) Size ¶
func (m *QueryRateRequest) Size() (n int)
func (*QueryRateRequest) String ¶
func (m *QueryRateRequest) String() string
func (*QueryRateRequest) Unmarshal ¶
func (m *QueryRateRequest) Unmarshal(dAtA []byte) error
func (*QueryRateRequest) XXX_DiscardUnknown ¶
func (m *QueryRateRequest) XXX_DiscardUnknown()
func (*QueryRateRequest) XXX_Marshal ¶
func (m *QueryRateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRateRequest) XXX_Merge ¶
func (m *QueryRateRequest) XXX_Merge(src proto.Message)
func (*QueryRateRequest) XXX_Size ¶
func (m *QueryRateRequest) XXX_Size() int
func (*QueryRateRequest) XXX_Unmarshal ¶
func (m *QueryRateRequest) XXX_Unmarshal(b []byte) error
type QueryRateResponse ¶
type QueryRateResponse struct { Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` InitialRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */ }
QueryCountsResponse is response type for the Query/Count RPC method.
func (*QueryRateResponse) Descriptor ¶
func (*QueryRateResponse) Descriptor() ([]byte, []int)
func (*QueryRateResponse) Marshal ¶
func (m *QueryRateResponse) Marshal() (dAtA []byte, err error)
func (*QueryRateResponse) MarshalTo ¶
func (m *QueryRateResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryRateResponse) MarshalToSizedBuffer ¶
func (m *QueryRateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryRateResponse) ProtoMessage ¶
func (*QueryRateResponse) ProtoMessage()
func (*QueryRateResponse) Reset ¶
func (m *QueryRateResponse) Reset()
func (*QueryRateResponse) Size ¶
func (m *QueryRateResponse) Size() (n int)
func (*QueryRateResponse) String ¶
func (m *QueryRateResponse) String() string
func (*QueryRateResponse) Unmarshal ¶
func (m *QueryRateResponse) Unmarshal(dAtA []byte) error
func (*QueryRateResponse) XXX_DiscardUnknown ¶
func (m *QueryRateResponse) XXX_DiscardUnknown()
func (*QueryRateResponse) XXX_Marshal ¶
func (m *QueryRateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRateResponse) XXX_Merge ¶
func (m *QueryRateResponse) XXX_Merge(src proto.Message)
func (*QueryRateResponse) XXX_Size ¶
func (m *QueryRateResponse) XXX_Size() int
func (*QueryRateResponse) XXX_Unmarshal ¶
func (m *QueryRateResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Counts queries the number of data sources, oracle scripts, and requests. Rate(context.Context, *QueryRateRequest) (*QueryRateResponse, error) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Exchange ¶
func (*UnimplementedMsgServer) Exchange(ctx context.Context, req *MsgExchange) (*MsgExchangeResponse, 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) Rate ¶
func (*UnimplementedQueryServer) Rate(ctx context.Context, req *QueryRateRequest) (*QueryRateResponse, error)