Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- 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)
- func WriteMarketMapToFile(config MarketMap, path string) error
- type ClientWrapper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetLastUpdated() uint64
- func (m *GenesisState) GetMarketMap() MarketMap
- 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) ValidateBasic() 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 LastUpdatedRequest
- func (*LastUpdatedRequest) Descriptor() ([]byte, []int)
- func (m *LastUpdatedRequest) Marshal() (dAtA []byte, err error)
- func (m *LastUpdatedRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *LastUpdatedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LastUpdatedRequest) ProtoMessage()
- func (m *LastUpdatedRequest) Reset()
- func (m *LastUpdatedRequest) Size() (n int)
- func (m *LastUpdatedRequest) String() string
- func (m *LastUpdatedRequest) Unmarshal(dAtA []byte) error
- func (m *LastUpdatedRequest) XXX_DiscardUnknown()
- func (m *LastUpdatedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LastUpdatedRequest) XXX_Merge(src proto.Message)
- func (m *LastUpdatedRequest) XXX_Size() int
- func (m *LastUpdatedRequest) XXX_Unmarshal(b []byte) error
- type LastUpdatedResponse
- func (*LastUpdatedResponse) Descriptor() ([]byte, []int)
- func (m *LastUpdatedResponse) GetLastUpdated() uint64
- func (m *LastUpdatedResponse) Marshal() (dAtA []byte, err error)
- func (m *LastUpdatedResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *LastUpdatedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LastUpdatedResponse) ProtoMessage()
- func (m *LastUpdatedResponse) Reset()
- func (m *LastUpdatedResponse) Size() (n int)
- func (m *LastUpdatedResponse) String() string
- func (m *LastUpdatedResponse) Unmarshal(dAtA []byte) error
- func (m *LastUpdatedResponse) XXX_DiscardUnknown()
- func (m *LastUpdatedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LastUpdatedResponse) XXX_Merge(src proto.Message)
- func (m *LastUpdatedResponse) XXX_Size() int
- func (m *LastUpdatedResponse) XXX_Unmarshal(b []byte) error
- type Market
- func (*Market) Descriptor() ([]byte, []int)
- func (m *Market) Equal(other Market) bool
- func (m *Market) GetProviderConfigs() []ProviderConfig
- func (m *Market) GetTicker() Ticker
- func (m *Market) Marshal() (dAtA []byte, err error)
- func (m *Market) MarshalTo(dAtA []byte) (int, error)
- func (m *Market) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Market) ProtoMessage()
- func (m *Market) Reset()
- func (m *Market) Size() (n int)
- func (m *Market) String() string
- func (m *Market) Unmarshal(dAtA []byte) error
- func (m *Market) ValidateBasic() error
- func (m *Market) XXX_DiscardUnknown()
- func (m *Market) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Market) XXX_Merge(src proto.Message)
- func (m *Market) XXX_Size() int
- func (m *Market) XXX_Unmarshal(b []byte) error
- type MarketAlreadyExistsError
- type MarketDoesNotExistsError
- type MarketIsEnabledError
- type MarketMap
- func (*MarketMap) Descriptor() ([]byte, []int)
- func (mm *MarketMap) Equal(other MarketMap) bool
- func (m *MarketMap) GetMarkets() map[string]Market
- func (mm *MarketMap) GetValidSubset() (MarketMap, error)
- func (m *MarketMap) Marshal() (dAtA []byte, err error)
- func (m *MarketMap) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketMap) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketMap) ProtoMessage()
- func (m *MarketMap) Reset()
- func (m *MarketMap) Size() (n int)
- func (mm *MarketMap) String() string
- func (m *MarketMap) Unmarshal(dAtA []byte) error
- func (mm *MarketMap) ValidateBasic() error
- func (m *MarketMap) XXX_DiscardUnknown()
- func (m *MarketMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketMap) XXX_Merge(src proto.Message)
- func (m *MarketMap) XXX_Size() int
- func (m *MarketMap) XXX_Unmarshal(b []byte) error
- type MarketMapHooks
- type MarketMapHooksWrapper
- type MarketMapRequest
- func (*MarketMapRequest) Descriptor() ([]byte, []int)
- func (m *MarketMapRequest) Marshal() (dAtA []byte, err error)
- func (m *MarketMapRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketMapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketMapRequest) ProtoMessage()
- func (m *MarketMapRequest) Reset()
- func (m *MarketMapRequest) Size() (n int)
- func (m *MarketMapRequest) String() string
- func (m *MarketMapRequest) Unmarshal(dAtA []byte) error
- func (m *MarketMapRequest) XXX_DiscardUnknown()
- func (m *MarketMapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketMapRequest) XXX_Merge(src proto.Message)
- func (m *MarketMapRequest) XXX_Size() int
- func (m *MarketMapRequest) XXX_Unmarshal(b []byte) error
- type MarketMapResponse
- func (*MarketMapResponse) Descriptor() ([]byte, []int)
- func (m *MarketMapResponse) GetChainId() string
- func (m *MarketMapResponse) GetLastUpdated() uint64
- func (m *MarketMapResponse) GetMarketMap() MarketMap
- func (m *MarketMapResponse) Marshal() (dAtA []byte, err error)
- func (m *MarketMapResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketMapResponse) ProtoMessage()
- func (m *MarketMapResponse) Reset()
- func (m *MarketMapResponse) Size() (n int)
- func (m *MarketMapResponse) String() string
- func (m *MarketMapResponse) Unmarshal(dAtA []byte) error
- func (m *MarketMapResponse) XXX_DiscardUnknown()
- func (m *MarketMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketMapResponse) XXX_Merge(src proto.Message)
- func (m *MarketMapResponse) XXX_Size() int
- func (m *MarketMapResponse) XXX_Unmarshal(b []byte) error
- type MarketRequest
- func (*MarketRequest) Descriptor() ([]byte, []int)
- func (m *MarketRequest) GetCurrencyPair() types.CurrencyPair
- func (m *MarketRequest) Marshal() (dAtA []byte, err error)
- func (m *MarketRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketRequest) ProtoMessage()
- func (m *MarketRequest) Reset()
- func (m *MarketRequest) Size() (n int)
- func (m *MarketRequest) String() string
- func (m *MarketRequest) Unmarshal(dAtA []byte) error
- func (m *MarketRequest) XXX_DiscardUnknown()
- func (m *MarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketRequest) XXX_Merge(src proto.Message)
- func (m *MarketRequest) XXX_Size() int
- func (m *MarketRequest) XXX_Unmarshal(b []byte) error
- type MarketResponse
- func (*MarketResponse) Descriptor() ([]byte, []int)
- func (m *MarketResponse) GetMarket() Market
- func (m *MarketResponse) Marshal() (dAtA []byte, err error)
- func (m *MarketResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketResponse) ProtoMessage()
- func (m *MarketResponse) Reset()
- func (m *MarketResponse) Size() (n int)
- func (m *MarketResponse) String() string
- func (m *MarketResponse) Unmarshal(dAtA []byte) error
- func (m *MarketResponse) XXX_DiscardUnknown()
- func (m *MarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketResponse) XXX_Merge(src proto.Message)
- func (m *MarketResponse) XXX_Size() int
- func (m *MarketResponse) XXX_Unmarshal(b []byte) error
- type MarketValidationHook
- type MarketValidationHooks
- type MarketsRequest
- func (*MarketsRequest) Descriptor() ([]byte, []int)
- func (m *MarketsRequest) Marshal() (dAtA []byte, err error)
- func (m *MarketsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketsRequest) ProtoMessage()
- func (m *MarketsRequest) Reset()
- func (m *MarketsRequest) Size() (n int)
- func (m *MarketsRequest) String() string
- func (m *MarketsRequest) Unmarshal(dAtA []byte) error
- func (m *MarketsRequest) XXX_DiscardUnknown()
- func (m *MarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketsRequest) XXX_Merge(src proto.Message)
- func (m *MarketsRequest) XXX_Size() int
- func (m *MarketsRequest) XXX_Unmarshal(b []byte) error
- type MarketsResponse
- func (*MarketsResponse) Descriptor() ([]byte, []int)
- func (m *MarketsResponse) GetMarkets() []Market
- func (m *MarketsResponse) Marshal() (dAtA []byte, err error)
- func (m *MarketsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketsResponse) ProtoMessage()
- func (m *MarketsResponse) Reset()
- func (m *MarketsResponse) Size() (n int)
- func (m *MarketsResponse) String() string
- func (m *MarketsResponse) Unmarshal(dAtA []byte) error
- func (m *MarketsResponse) XXX_DiscardUnknown()
- func (m *MarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketsResponse) XXX_Merge(src proto.Message)
- func (m *MarketsResponse) XXX_Size() int
- func (m *MarketsResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgCreateMarkets
- func (*MsgCreateMarkets) Descriptor() ([]byte, []int)
- func (m *MsgCreateMarkets) GetAuthority() string
- func (m *MsgCreateMarkets) GetCreateMarkets() []Market
- func (m *MsgCreateMarkets) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateMarkets) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateMarkets) ProtoMessage()
- func (m *MsgCreateMarkets) Reset()
- func (m *MsgCreateMarkets) Size() (n int)
- func (m *MsgCreateMarkets) String() string
- func (m *MsgCreateMarkets) Unmarshal(dAtA []byte) error
- func (m *MsgCreateMarkets) ValidateBasic() error
- func (m *MsgCreateMarkets) XXX_DiscardUnknown()
- func (m *MsgCreateMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateMarkets) XXX_Merge(src proto.Message)
- func (m *MsgCreateMarkets) XXX_Size() int
- func (m *MsgCreateMarkets) XXX_Unmarshal(b []byte) error
- type MsgCreateMarketsResponse
- func (*MsgCreateMarketsResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateMarketsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateMarketsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateMarketsResponse) ProtoMessage()
- func (m *MsgCreateMarketsResponse) Reset()
- func (m *MsgCreateMarketsResponse) Size() (n int)
- func (m *MsgCreateMarketsResponse) String() string
- func (m *MsgCreateMarketsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateMarketsResponse) XXX_DiscardUnknown()
- func (m *MsgCreateMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateMarketsResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateMarketsResponse) XXX_Size() int
- func (m *MsgCreateMarketsResponse) XXX_Unmarshal(b []byte) error
- type MsgParams
- func (*MsgParams) Descriptor() ([]byte, []int)
- func (m *MsgParams) GetAuthority() string
- func (m *MsgParams) GetParams() Params
- func (m *MsgParams) Marshal() (dAtA []byte, err error)
- func (m *MsgParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgParams) ProtoMessage()
- func (m *MsgParams) Reset()
- func (m *MsgParams) Size() (n int)
- func (m *MsgParams) String() string
- func (m *MsgParams) Unmarshal(dAtA []byte) error
- func (m *MsgParams) ValidateBasic() error
- func (m *MsgParams) XXX_DiscardUnknown()
- func (m *MsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgParams) XXX_Merge(src proto.Message)
- func (m *MsgParams) XXX_Size() int
- func (m *MsgParams) XXX_Unmarshal(b []byte) error
- type MsgParamsResponse
- func (*MsgParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgParamsResponse) ProtoMessage()
- func (m *MsgParamsResponse) Reset()
- func (m *MsgParamsResponse) Size() (n int)
- func (m *MsgParamsResponse) String() string
- func (m *MsgParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgParamsResponse) XXX_DiscardUnknown()
- func (m *MsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgParamsResponse) XXX_Size() int
- func (m *MsgParamsResponse) XXX_Unmarshal(b []byte) error
- type MsgRemoveMarketAuthorities
- func (*MsgRemoveMarketAuthorities) Descriptor() ([]byte, []int)
- func (m *MsgRemoveMarketAuthorities) GetAdmin() string
- func (m *MsgRemoveMarketAuthorities) GetRemoveAddresses() []string
- func (m *MsgRemoveMarketAuthorities) Marshal() (dAtA []byte, err error)
- func (m *MsgRemoveMarketAuthorities) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRemoveMarketAuthorities) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRemoveMarketAuthorities) ProtoMessage()
- func (m *MsgRemoveMarketAuthorities) Reset()
- func (m *MsgRemoveMarketAuthorities) Size() (n int)
- func (m *MsgRemoveMarketAuthorities) String() string
- func (m *MsgRemoveMarketAuthorities) Unmarshal(dAtA []byte) error
- func (m *MsgRemoveMarketAuthorities) ValidateBasic() error
- func (m *MsgRemoveMarketAuthorities) XXX_DiscardUnknown()
- func (m *MsgRemoveMarketAuthorities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRemoveMarketAuthorities) XXX_Merge(src proto.Message)
- func (m *MsgRemoveMarketAuthorities) XXX_Size() int
- func (m *MsgRemoveMarketAuthorities) XXX_Unmarshal(b []byte) error
- type MsgRemoveMarketAuthoritiesResponse
- func (*MsgRemoveMarketAuthoritiesResponse) Descriptor() ([]byte, []int)
- func (m *MsgRemoveMarketAuthoritiesResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRemoveMarketAuthoritiesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRemoveMarketAuthoritiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRemoveMarketAuthoritiesResponse) ProtoMessage()
- func (m *MsgRemoveMarketAuthoritiesResponse) Reset()
- func (m *MsgRemoveMarketAuthoritiesResponse) Size() (n int)
- func (m *MsgRemoveMarketAuthoritiesResponse) String() string
- func (m *MsgRemoveMarketAuthoritiesResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRemoveMarketAuthoritiesResponse) XXX_DiscardUnknown()
- func (m *MsgRemoveMarketAuthoritiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRemoveMarketAuthoritiesResponse) XXX_Merge(src proto.Message)
- func (m *MsgRemoveMarketAuthoritiesResponse) XXX_Size() int
- func (m *MsgRemoveMarketAuthoritiesResponse) XXX_Unmarshal(b []byte) error
- type MsgRemoveMarkets
- func (*MsgRemoveMarkets) Descriptor() ([]byte, []int)
- func (m *MsgRemoveMarkets) GetAuthority() string
- func (m *MsgRemoveMarkets) GetMarkets() []string
- func (m *MsgRemoveMarkets) Marshal() (dAtA []byte, err error)
- func (m *MsgRemoveMarkets) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRemoveMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRemoveMarkets) ProtoMessage()
- func (m *MsgRemoveMarkets) Reset()
- func (m *MsgRemoveMarkets) Size() (n int)
- func (m *MsgRemoveMarkets) String() string
- func (m *MsgRemoveMarkets) Unmarshal(dAtA []byte) error
- func (m *MsgRemoveMarkets) ValidateBasic() error
- func (m *MsgRemoveMarkets) XXX_DiscardUnknown()
- func (m *MsgRemoveMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRemoveMarkets) XXX_Merge(src proto.Message)
- func (m *MsgRemoveMarkets) XXX_Size() int
- func (m *MsgRemoveMarkets) XXX_Unmarshal(b []byte) error
- type MsgRemoveMarketsResponse
- func (*MsgRemoveMarketsResponse) Descriptor() ([]byte, []int)
- func (m *MsgRemoveMarketsResponse) GetDeletedMarkets() []string
- func (m *MsgRemoveMarketsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRemoveMarketsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRemoveMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRemoveMarketsResponse) ProtoMessage()
- func (m *MsgRemoveMarketsResponse) Reset()
- func (m *MsgRemoveMarketsResponse) Size() (n int)
- func (m *MsgRemoveMarketsResponse) String() string
- func (m *MsgRemoveMarketsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRemoveMarketsResponse) XXX_DiscardUnknown()
- func (m *MsgRemoveMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRemoveMarketsResponse) XXX_Merge(src proto.Message)
- func (m *MsgRemoveMarketsResponse) XXX_Size() int
- func (m *MsgRemoveMarketsResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgUpdateMarkets
- func (*MsgUpdateMarkets) Descriptor() ([]byte, []int)
- func (m *MsgUpdateMarkets) GetAuthority() string
- func (m *MsgUpdateMarkets) GetUpdateMarkets() []Market
- func (m *MsgUpdateMarkets) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateMarkets) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateMarkets) ProtoMessage()
- func (m *MsgUpdateMarkets) Reset()
- func (m *MsgUpdateMarkets) Size() (n int)
- func (m *MsgUpdateMarkets) String() string
- func (m *MsgUpdateMarkets) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateMarkets) ValidateBasic() error
- func (m *MsgUpdateMarkets) XXX_DiscardUnknown()
- func (m *MsgUpdateMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateMarkets) XXX_Merge(src proto.Message)
- func (m *MsgUpdateMarkets) XXX_Size() int
- func (m *MsgUpdateMarkets) XXX_Unmarshal(b []byte) error
- type MsgUpdateMarketsResponse
- func (*MsgUpdateMarketsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateMarketsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateMarketsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateMarketsResponse) ProtoMessage()
- func (m *MsgUpdateMarketsResponse) Reset()
- func (m *MsgUpdateMarketsResponse) Size() (n int)
- func (m *MsgUpdateMarketsResponse) String() string
- func (m *MsgUpdateMarketsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateMarketsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateMarketsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateMarketsResponse) XXX_Size() int
- func (m *MsgUpdateMarketsResponse) XXX_Unmarshal(b []byte) error
- type MsgUpsertMarkets
- func (*MsgUpsertMarkets) Descriptor() ([]byte, []int)
- func (m *MsgUpsertMarkets) GetAuthority() string
- func (m *MsgUpsertMarkets) GetMarkets() []Market
- func (m *MsgUpsertMarkets) Marshal() (dAtA []byte, err error)
- func (m *MsgUpsertMarkets) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpsertMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpsertMarkets) ProtoMessage()
- func (m *MsgUpsertMarkets) Reset()
- func (m *MsgUpsertMarkets) Size() (n int)
- func (m *MsgUpsertMarkets) String() string
- func (m *MsgUpsertMarkets) Unmarshal(dAtA []byte) error
- func (m *MsgUpsertMarkets) ValidateBasic() error
- func (m *MsgUpsertMarkets) XXX_DiscardUnknown()
- func (m *MsgUpsertMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpsertMarkets) XXX_Merge(src proto.Message)
- func (m *MsgUpsertMarkets) XXX_Size() int
- func (m *MsgUpsertMarkets) XXX_Unmarshal(b []byte) error
- type MsgUpsertMarketsResponse
- func (*MsgUpsertMarketsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpsertMarketsResponse) GetMarketUpdates() map[string]booldeprecated
- func (m *MsgUpsertMarketsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpsertMarketsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpsertMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpsertMarketsResponse) ProtoMessage()
- func (m *MsgUpsertMarketsResponse) Reset()
- func (m *MsgUpsertMarketsResponse) Size() (n int)
- func (m *MsgUpsertMarketsResponse) String() string
- func (m *MsgUpsertMarketsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpsertMarketsResponse) XXX_DiscardUnknown()
- func (m *MsgUpsertMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpsertMarketsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpsertMarketsResponse) XXX_Size() int
- func (m *MsgUpsertMarketsResponse) XXX_Unmarshal(b []byte) error
- type MultiMarketMapHooks
- func (mh MultiMarketMapHooks) AfterMarketCreated(ctx sdk.Context, market Market) error
- func (mh MultiMarketMapHooks) AfterMarketGenesis(ctx sdk.Context, markets map[string]Market) error
- func (mh MultiMarketMapHooks) AfterMarketRemoved(ctx sdk.Context, key string) error
- func (mh MultiMarketMapHooks) AfterMarketUpdated(ctx sdk.Context, market Market) error
- type NoopMarketMapHooks
- func (n *NoopMarketMapHooks) AfterMarketCreated(_ sdk.Context, _ Market) error
- func (n *NoopMarketMapHooks) AfterMarketGenesis(_ sdk.Context, _ map[string]Market) error
- func (n *NoopMarketMapHooks) AfterMarketRemoved(_ sdk.Context, _ string) error
- func (n *NoopMarketMapHooks) AfterMarketUpdated(_ sdk.Context, _ Market) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetAdmin() string
- func (m *Params) GetMarketAuthorities() []string
- 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) ValidateBasic() 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 ParamsRequest
- func (*ParamsRequest) Descriptor() ([]byte, []int)
- func (m *ParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *ParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ParamsRequest) ProtoMessage()
- func (m *ParamsRequest) Reset()
- func (m *ParamsRequest) Size() (n int)
- func (m *ParamsRequest) String() string
- func (m *ParamsRequest) Unmarshal(dAtA []byte) error
- func (m *ParamsRequest) XXX_DiscardUnknown()
- func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ParamsRequest) XXX_Merge(src proto.Message)
- func (m *ParamsRequest) XXX_Size() int
- func (m *ParamsRequest) XXX_Unmarshal(b []byte) error
- type ParamsResponse
- func (*ParamsResponse) Descriptor() ([]byte, []int)
- func (m *ParamsResponse) GetParams() Params
- func (m *ParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *ParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ParamsResponse) ProtoMessage()
- func (m *ParamsResponse) Reset()
- func (m *ParamsResponse) Size() (n int)
- func (m *ParamsResponse) String() string
- func (m *ParamsResponse) Unmarshal(dAtA []byte) error
- func (m *ParamsResponse) XXX_DiscardUnknown()
- func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ParamsResponse) XXX_Merge(src proto.Message)
- func (m *ParamsResponse) XXX_Size() int
- func (m *ParamsResponse) XXX_Unmarshal(b []byte) error
- type ProviderConfig
- func (*ProviderConfig) Descriptor() ([]byte, []int)
- func (pc *ProviderConfig) Equal(other ProviderConfig) bool
- func (m *ProviderConfig) GetInvert() bool
- func (m *ProviderConfig) GetMetadata_JSON() string
- func (m *ProviderConfig) GetName() string
- func (m *ProviderConfig) GetNormalizeByPair() *types.CurrencyPair
- func (m *ProviderConfig) GetOffChainTicker() string
- func (m *ProviderConfig) Marshal() (dAtA []byte, err error)
- func (m *ProviderConfig) MarshalTo(dAtA []byte) (int, error)
- func (m *ProviderConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProviderConfig) ProtoMessage()
- func (m *ProviderConfig) Reset()
- func (m *ProviderConfig) Size() (n int)
- func (m *ProviderConfig) String() string
- func (m *ProviderConfig) Unmarshal(dAtA []byte) error
- func (pc *ProviderConfig) ValidateBasic() error
- func (m *ProviderConfig) XXX_DiscardUnknown()
- func (m *ProviderConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProviderConfig) XXX_Merge(src proto.Message)
- func (m *ProviderConfig) XXX_Size() int
- func (m *ProviderConfig) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type Ticker
- func (*Ticker) Descriptor() ([]byte, []int)
- func (t *Ticker) Equal(other Ticker) bool
- func (m *Ticker) GetCurrencyPair() types.CurrencyPair
- func (m *Ticker) GetDecimals() uint64
- func (m *Ticker) GetEnabled() bool
- func (m *Ticker) GetMetadata_JSON() string
- func (m *Ticker) GetMinProviderCount() uint64
- func (m *Ticker) Marshal() (dAtA []byte, err error)
- func (m *Ticker) MarshalTo(dAtA []byte) (int, error)
- func (m *Ticker) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Ticker) ProtoMessage()
- func (m *Ticker) Reset()
- func (m *Ticker) Size() (n int)
- func (t Ticker) String() string
- func (m *Ticker) Unmarshal(dAtA []byte) error
- func (t *Ticker) ValidateBasic() error
- func (m *Ticker) XXX_DiscardUnknown()
- func (m *Ticker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ticker) XXX_Merge(src proto.Message)
- func (m *Ticker) XXX_Size() int
- func (m *Ticker) XXX_Unmarshal(b []byte) error
- type TickerString
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) CreateMarkets(ctx context.Context, req *MsgCreateMarkets) (*MsgCreateMarketsResponse, error)
- func (*UnimplementedMsgServer) RemoveMarketAuthorities(ctx context.Context, req *MsgRemoveMarketAuthorities) (*MsgRemoveMarketAuthoritiesResponse, error)
- func (*UnimplementedMsgServer) RemoveMarkets(ctx context.Context, req *MsgRemoveMarkets) (*MsgRemoveMarketsResponse, error)
- func (*UnimplementedMsgServer) UpdateMarkets(ctx context.Context, req *MsgUpdateMarkets) (*MsgUpdateMarketsResponse, error)
- func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgParams) (*MsgParamsResponse, error)
- func (*UnimplementedMsgServer) UpsertMarkets(ctx context.Context, req *MsgUpsertMarkets) (*MsgUpsertMarketsResponse, error)
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) LastUpdated(ctx context.Context, req *LastUpdatedRequest) (*LastUpdatedResponse, error)
- func (*UnimplementedQueryServer) Market(ctx context.Context, req *MarketRequest) (*MarketResponse, error)
- func (*UnimplementedQueryServer) MarketMap(ctx context.Context, req *MarketMapRequest) (*MarketMapResponse, error)
- func (*UnimplementedQueryServer) Markets(ctx context.Context, req *MarketsRequest) (*MarketsResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *ParamsRequest) (*ParamsResponse, error)
Constants ¶
const ( EventTypeCreateMarket = "create_market" EventTypeUpdateMarket = "update_market" AttributeKeyCurrencyPair = "currency_pair" AttributeKeyDecimals = "decimals" AttributeKeyMinProviderCount = "min_provider_count" AttributeKeyMetadata = "metadata" )
const ( // ModuleName defines the canonical name identifying the module. ModuleName = "marketmap" // StoreKey holds the unique key used to access the module keeper's KVStore. StoreKey = ModuleName )
const ( // DefaultMaxDecimals is the maximum number of decimals allowed for a ticker. DefaultMaxDecimals = 36 // DefaultMinProviderCount is the minimum number of providers required for a // ticker to be considered valid. DefaultMinProviderCount = 1 // MaxMetadataJSONFieldLength is the maximum length of the MetadataJSON field (in bytes). MaxMetadataJSONFieldLength = 16384 )
Variables ¶
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 ( // LastUpdatedPrefix is the key prefix for the lastUpdated height. LastUpdatedPrefix = collections.NewPrefix(1) // MarketsPrefix is the key prefix for Markets. MarketsPrefix = collections.NewPrefix(2) // ParamsPrefix is the key prefix of the module Params. ParamsPrefix = collections.NewPrefix(3) // TickersCodec is the collections.KeyCodec value used for the markets map. TickersCodec = codec.NewStringKeyCodec[TickerString]() // LastUpdatedCodec is the collections.KeyCodec value used for the lastUpdated value. LastUpdatedCodec = codec.KeyToValueCodec[uint64](codec.NewUint64Key[uint64]()) )
var ( ErrInvalidLengthMarket = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMarket = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMarket = 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") )
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the x/marketmap messages + message service w/ the InterfaceRegistry (registry).
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the necessary x/marketmap interfaces (messages) on the cdc. These types are used for amino serialization.
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 WriteMarketMapToFile ¶
WriteMarketMapToFile writes a market map configuration to a file at the given path.
Types ¶
type ClientWrapper ¶
type ClientWrapper interface { QueryClient }
type GenesisState ¶
type GenesisState struct { // MarketMap defines the global set of market configurations for all providers // and markets. MarketMap MarketMap `protobuf:"bytes,1,opt,name=market_map,json=marketMap,proto3" json:"market_map"` // LastUpdated is the last block height that the market map was updated. // This field can be used as an optimization for clients checking if there // is a new update to the map. LastUpdated uint64 `protobuf:"varint,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` // Params are the parameters for the x/marketmap module. Params Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params"` }
GenesisState defines the x/marketmap module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState returns the default genesis of the marketmap module.
func NewGenesisState ¶
func NewGenesisState( marketMap MarketMap, lastUpdated uint64, params Params, ) GenesisState
NewGenesisState returns an instance of GenesisState.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetLastUpdated ¶
func (m *GenesisState) GetLastUpdated() uint64
func (*GenesisState) GetMarketMap ¶
func (m *GenesisState) GetMarketMap() MarketMap
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) ValidateBasic ¶
func (gs *GenesisState) ValidateBasic() error
ValidateBasic performs basic validation on the GenesisState.
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 LastUpdatedRequest ¶
type LastUpdatedRequest struct { }
LastUpdatedRequest is the request type for the Query/LastUpdated RPC method.
func (*LastUpdatedRequest) Descriptor ¶
func (*LastUpdatedRequest) Descriptor() ([]byte, []int)
func (*LastUpdatedRequest) Marshal ¶
func (m *LastUpdatedRequest) Marshal() (dAtA []byte, err error)
func (*LastUpdatedRequest) MarshalTo ¶
func (m *LastUpdatedRequest) MarshalTo(dAtA []byte) (int, error)
func (*LastUpdatedRequest) MarshalToSizedBuffer ¶
func (m *LastUpdatedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LastUpdatedRequest) ProtoMessage ¶
func (*LastUpdatedRequest) ProtoMessage()
func (*LastUpdatedRequest) Reset ¶
func (m *LastUpdatedRequest) Reset()
func (*LastUpdatedRequest) Size ¶
func (m *LastUpdatedRequest) Size() (n int)
func (*LastUpdatedRequest) String ¶
func (m *LastUpdatedRequest) String() string
func (*LastUpdatedRequest) Unmarshal ¶
func (m *LastUpdatedRequest) Unmarshal(dAtA []byte) error
func (*LastUpdatedRequest) XXX_DiscardUnknown ¶
func (m *LastUpdatedRequest) XXX_DiscardUnknown()
func (*LastUpdatedRequest) XXX_Marshal ¶
func (m *LastUpdatedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LastUpdatedRequest) XXX_Merge ¶
func (m *LastUpdatedRequest) XXX_Merge(src proto.Message)
func (*LastUpdatedRequest) XXX_Size ¶
func (m *LastUpdatedRequest) XXX_Size() int
func (*LastUpdatedRequest) XXX_Unmarshal ¶
func (m *LastUpdatedRequest) XXX_Unmarshal(b []byte) error
type LastUpdatedResponse ¶
type LastUpdatedResponse struct {
LastUpdated uint64 `protobuf:"varint,1,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
}
LastUpdatedResponse is the response type for the Query/LastUpdated RPC method.
func (*LastUpdatedResponse) Descriptor ¶
func (*LastUpdatedResponse) Descriptor() ([]byte, []int)
func (*LastUpdatedResponse) GetLastUpdated ¶
func (m *LastUpdatedResponse) GetLastUpdated() uint64
func (*LastUpdatedResponse) Marshal ¶
func (m *LastUpdatedResponse) Marshal() (dAtA []byte, err error)
func (*LastUpdatedResponse) MarshalTo ¶
func (m *LastUpdatedResponse) MarshalTo(dAtA []byte) (int, error)
func (*LastUpdatedResponse) MarshalToSizedBuffer ¶
func (m *LastUpdatedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LastUpdatedResponse) ProtoMessage ¶
func (*LastUpdatedResponse) ProtoMessage()
func (*LastUpdatedResponse) Reset ¶
func (m *LastUpdatedResponse) Reset()
func (*LastUpdatedResponse) Size ¶
func (m *LastUpdatedResponse) Size() (n int)
func (*LastUpdatedResponse) String ¶
func (m *LastUpdatedResponse) String() string
func (*LastUpdatedResponse) Unmarshal ¶
func (m *LastUpdatedResponse) Unmarshal(dAtA []byte) error
func (*LastUpdatedResponse) XXX_DiscardUnknown ¶
func (m *LastUpdatedResponse) XXX_DiscardUnknown()
func (*LastUpdatedResponse) XXX_Marshal ¶
func (m *LastUpdatedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LastUpdatedResponse) XXX_Merge ¶
func (m *LastUpdatedResponse) XXX_Merge(src proto.Message)
func (*LastUpdatedResponse) XXX_Size ¶
func (m *LastUpdatedResponse) XXX_Size() int
func (*LastUpdatedResponse) XXX_Unmarshal ¶
func (m *LastUpdatedResponse) XXX_Unmarshal(b []byte) error
type Market ¶
type Market struct { // Ticker represents a price feed for a given asset pair i.e. BTC/USD. The // price feed is scaled to a number of decimal places and has a minimum number // of providers required to consider the ticker valid. Ticker Ticker `protobuf:"bytes,1,opt,name=ticker,proto3" json:"ticker"` // ProviderConfigs is the list of provider-specific configs for this Market. ProviderConfigs []ProviderConfig `protobuf:"bytes,2,rep,name=provider_configs,json=providerConfigs,proto3" json:"provider_configs"` }
Market encapsulates a Ticker and its provider-specific configuration.
func (*Market) Descriptor ¶
func (*Market) GetProviderConfigs ¶
func (m *Market) GetProviderConfigs() []ProviderConfig
func (*Market) MarshalToSizedBuffer ¶
func (*Market) ProtoMessage ¶
func (*Market) ProtoMessage()
func (*Market) ValidateBasic ¶
ValidateBasic performs stateless validation of a Market.
func (*Market) XXX_DiscardUnknown ¶
func (m *Market) XXX_DiscardUnknown()
func (*Market) XXX_Marshal ¶
func (*Market) XXX_Unmarshal ¶
type MarketAlreadyExistsError ¶
type MarketAlreadyExistsError struct {
// contains filtered or unexported fields
}
MarketAlreadyExistsError is an error indicating the given Market exists in state.
func NewMarketAlreadyExistsError ¶
func NewMarketAlreadyExistsError(ticker TickerString) MarketAlreadyExistsError
func (MarketAlreadyExistsError) Error ¶
func (e MarketAlreadyExistsError) Error() string
Error returns the error string for MarketAlreadyExistsError.
type MarketDoesNotExistsError ¶
type MarketDoesNotExistsError struct {
// contains filtered or unexported fields
}
MarketDoesNotExistsError is an error indicating the given Market does not exist in state.
func NewMarketDoesNotExistsError ¶
func NewMarketDoesNotExistsError(ticker TickerString) MarketDoesNotExistsError
func (MarketDoesNotExistsError) Error ¶
func (e MarketDoesNotExistsError) Error() string
Error returns the error string for MarketDoesNotExistsError.
type MarketIsEnabledError ¶
type MarketIsEnabledError struct {
// contains filtered or unexported fields
}
MarketIsEnabledError is an error indicating the given Market does not exist in state.
func NewMarketIsEnabledError ¶
func NewMarketIsEnabledError(ticker TickerString) MarketIsEnabledError
func (MarketIsEnabledError) Error ¶
func (e MarketIsEnabledError) Error() string
Error returns the error string for MarketIsEnabledError.
type MarketMap ¶
type MarketMap struct { // Markets is the full list of tickers and their associated configurations // to be stored on-chain. Markets map[string]Market `` /* 145-byte string literal not displayed */ }
MarketMap maps ticker strings to their Markets.
func ReadMarketMapFromFile ¶
ReadMarketMapFromFile reads a market map configuration from a file at the given path.
func (*MarketMap) Descriptor ¶
func (*MarketMap) GetMarkets ¶
func (*MarketMap) GetValidSubset ¶
GetValidSubset outputs a MarketMap which contains the maximal valid subset of this MarketMap.
In particular, this will eliminate anything which would otherwise cause a failure in ValidateBasic. The resulting MarketMap should be able to pass ValidateBasic.
func (*MarketMap) MarshalToSizedBuffer ¶
func (*MarketMap) ProtoMessage ¶
func (*MarketMap) ProtoMessage()
func (*MarketMap) ValidateBasic ¶
ValidateBasic validates the market map configuration and its expected configuration.
In particular, this will 1. Ensure that the market map is valid (ValidateBasic). This ensures that each of the provider's markets are supported by the market map. 2. Ensure that each provider config has a valid corresponding ticker. 3. Ensure that all normalization markets are enabled.
func (*MarketMap) XXX_DiscardUnknown ¶
func (m *MarketMap) XXX_DiscardUnknown()
func (*MarketMap) XXX_Marshal ¶
func (*MarketMap) XXX_Unmarshal ¶
type MarketMapHooks ¶
type MarketMapHooks interface { // AfterMarketCreated is called after CreateMarket is called. AfterMarketCreated(ctx sdk.Context, market Market) error // AfterMarketUpdated is called after UpdateMarket is called. AfterMarketUpdated(ctx sdk.Context, market Market) error // AfterMarketGenesis is called after x/marketmap init genesis. AfterMarketGenesis(ctx sdk.Context, tickers map[string]Market) error // AfterMarketRemoved is called after a market is removed. AfterMarketRemoved(ctx sdk.Context, key string) error }
MarketMapHooks is the interface that defines the hooks that can be integrated by other modules.
type MarketMapHooksWrapper ¶
type MarketMapHooksWrapper struct{ MarketMapHooks }
MarketMapHooksWrapper is a wrapper for modules to inject MarketMapHooks using depinject.
type MarketMapRequest ¶
type MarketMapRequest struct { }
MarketMapRequest is the query request for the MarketMap query. It takes no arguments.
func (*MarketMapRequest) Descriptor ¶
func (*MarketMapRequest) Descriptor() ([]byte, []int)
func (*MarketMapRequest) Marshal ¶
func (m *MarketMapRequest) Marshal() (dAtA []byte, err error)
func (*MarketMapRequest) MarshalToSizedBuffer ¶
func (m *MarketMapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketMapRequest) ProtoMessage ¶
func (*MarketMapRequest) ProtoMessage()
func (*MarketMapRequest) Reset ¶
func (m *MarketMapRequest) Reset()
func (*MarketMapRequest) Size ¶
func (m *MarketMapRequest) Size() (n int)
func (*MarketMapRequest) String ¶
func (m *MarketMapRequest) String() string
func (*MarketMapRequest) Unmarshal ¶
func (m *MarketMapRequest) Unmarshal(dAtA []byte) error
func (*MarketMapRequest) XXX_DiscardUnknown ¶
func (m *MarketMapRequest) XXX_DiscardUnknown()
func (*MarketMapRequest) XXX_Marshal ¶
func (m *MarketMapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketMapRequest) XXX_Merge ¶
func (m *MarketMapRequest) XXX_Merge(src proto.Message)
func (*MarketMapRequest) XXX_Size ¶
func (m *MarketMapRequest) XXX_Size() int
func (*MarketMapRequest) XXX_Unmarshal ¶
func (m *MarketMapRequest) XXX_Unmarshal(b []byte) error
type MarketMapResponse ¶
type MarketMapResponse struct { // MarketMap defines the global set of market configurations for all providers // and markets. MarketMap MarketMap `protobuf:"bytes,1,opt,name=market_map,json=marketMap,proto3" json:"market_map"` // LastUpdated is the last block height that the market map was updated. // This field can be used as an optimization for clients checking if there // is a new update to the map. LastUpdated uint64 `protobuf:"varint,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` // ChainId is the chain identifier for the market map. ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` }
MarketMapResponse is the query response for the MarketMap query.
func (*MarketMapResponse) Descriptor ¶
func (*MarketMapResponse) Descriptor() ([]byte, []int)
func (*MarketMapResponse) GetChainId ¶
func (m *MarketMapResponse) GetChainId() string
func (*MarketMapResponse) GetLastUpdated ¶
func (m *MarketMapResponse) GetLastUpdated() uint64
func (*MarketMapResponse) GetMarketMap ¶
func (m *MarketMapResponse) GetMarketMap() MarketMap
func (*MarketMapResponse) Marshal ¶
func (m *MarketMapResponse) Marshal() (dAtA []byte, err error)
func (*MarketMapResponse) MarshalTo ¶
func (m *MarketMapResponse) MarshalTo(dAtA []byte) (int, error)
func (*MarketMapResponse) MarshalToSizedBuffer ¶
func (m *MarketMapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketMapResponse) ProtoMessage ¶
func (*MarketMapResponse) ProtoMessage()
func (*MarketMapResponse) Reset ¶
func (m *MarketMapResponse) Reset()
func (*MarketMapResponse) Size ¶
func (m *MarketMapResponse) Size() (n int)
func (*MarketMapResponse) String ¶
func (m *MarketMapResponse) String() string
func (*MarketMapResponse) Unmarshal ¶
func (m *MarketMapResponse) Unmarshal(dAtA []byte) error
func (*MarketMapResponse) XXX_DiscardUnknown ¶
func (m *MarketMapResponse) XXX_DiscardUnknown()
func (*MarketMapResponse) XXX_Marshal ¶
func (m *MarketMapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketMapResponse) XXX_Merge ¶
func (m *MarketMapResponse) XXX_Merge(src proto.Message)
func (*MarketMapResponse) XXX_Size ¶
func (m *MarketMapResponse) XXX_Size() int
func (*MarketMapResponse) XXX_Unmarshal ¶
func (m *MarketMapResponse) XXX_Unmarshal(b []byte) error
type MarketRequest ¶
type MarketRequest struct { // CurrencyPair is the currency pair associated with the market being // requested. CurrencyPair types.CurrencyPair `protobuf:"bytes,1,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair"` }
MarketRequest is the query request for the Market query. It takes the currency pair of the market as an argument.
func (*MarketRequest) Descriptor ¶
func (*MarketRequest) Descriptor() ([]byte, []int)
func (*MarketRequest) GetCurrencyPair ¶
func (m *MarketRequest) GetCurrencyPair() types.CurrencyPair
func (*MarketRequest) Marshal ¶
func (m *MarketRequest) Marshal() (dAtA []byte, err error)
func (*MarketRequest) MarshalToSizedBuffer ¶
func (m *MarketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketRequest) ProtoMessage ¶
func (*MarketRequest) ProtoMessage()
func (*MarketRequest) Reset ¶
func (m *MarketRequest) Reset()
func (*MarketRequest) Size ¶
func (m *MarketRequest) Size() (n int)
func (*MarketRequest) String ¶
func (m *MarketRequest) String() string
func (*MarketRequest) Unmarshal ¶
func (m *MarketRequest) Unmarshal(dAtA []byte) error
func (*MarketRequest) XXX_DiscardUnknown ¶
func (m *MarketRequest) XXX_DiscardUnknown()
func (*MarketRequest) XXX_Marshal ¶
func (m *MarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketRequest) XXX_Merge ¶
func (m *MarketRequest) XXX_Merge(src proto.Message)
func (*MarketRequest) XXX_Size ¶
func (m *MarketRequest) XXX_Size() int
func (*MarketRequest) XXX_Unmarshal ¶
func (m *MarketRequest) XXX_Unmarshal(b []byte) error
type MarketResponse ¶
type MarketResponse struct { // Market is the configuration of a single market to be price-fetched for. Market Market `protobuf:"bytes,1,opt,name=market,proto3" json:"market"` }
MarketResponse is the query response for the Market query.
func (*MarketResponse) Descriptor ¶
func (*MarketResponse) Descriptor() ([]byte, []int)
func (*MarketResponse) GetMarket ¶
func (m *MarketResponse) GetMarket() Market
func (*MarketResponse) Marshal ¶
func (m *MarketResponse) Marshal() (dAtA []byte, err error)
func (*MarketResponse) MarshalToSizedBuffer ¶
func (m *MarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketResponse) ProtoMessage ¶
func (*MarketResponse) ProtoMessage()
func (*MarketResponse) Reset ¶
func (m *MarketResponse) Reset()
func (*MarketResponse) Size ¶
func (m *MarketResponse) Size() (n int)
func (*MarketResponse) String ¶
func (m *MarketResponse) String() string
func (*MarketResponse) Unmarshal ¶
func (m *MarketResponse) Unmarshal(dAtA []byte) error
func (*MarketResponse) XXX_DiscardUnknown ¶
func (m *MarketResponse) XXX_DiscardUnknown()
func (*MarketResponse) XXX_Marshal ¶
func (m *MarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketResponse) XXX_Merge ¶
func (m *MarketResponse) XXX_Merge(src proto.Message)
func (*MarketResponse) XXX_Size ¶
func (m *MarketResponse) XXX_Size() int
func (*MarketResponse) XXX_Unmarshal ¶
func (m *MarketResponse) XXX_Unmarshal(b []byte) error
type MarketValidationHook ¶
MarketValidationHook is a hook that is called for stateful validation of a market before some keeper operation is performed on it.
func DefaultDeleteMarketValidationHook ¶
func DefaultDeleteMarketValidationHook() MarketValidationHook
DefaultDeleteMarketValidationHook returns the default DeleteMarketValidationHook for x/marketmap. This hook checks: - if the given market is enabled - error - if the given market is disabled - return nil.
type MarketValidationHooks ¶
type MarketValidationHooks []MarketValidationHook
MarketValidationHooks is a type alias for an array of MarketValidationHook.
func DefaultDeleteMarketValidationHooks ¶
func DefaultDeleteMarketValidationHooks() MarketValidationHooks
DefaultDeleteMarketValidationHooks returns the default DeleteMarketValidationHook as an array.
func (MarketValidationHooks) ValidateMarket ¶
func (h MarketValidationHooks) ValidateMarket(ctx context.Context, market Market) error
ValidateMarket calls all validation hooks for the given market.
type MarketsRequest ¶
type MarketsRequest struct { }
MarketsRequest is the query request for the Market query.
func (*MarketsRequest) Descriptor ¶
func (*MarketsRequest) Descriptor() ([]byte, []int)
func (*MarketsRequest) Marshal ¶
func (m *MarketsRequest) Marshal() (dAtA []byte, err error)
func (*MarketsRequest) MarshalToSizedBuffer ¶
func (m *MarketsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketsRequest) ProtoMessage ¶
func (*MarketsRequest) ProtoMessage()
func (*MarketsRequest) Reset ¶
func (m *MarketsRequest) Reset()
func (*MarketsRequest) Size ¶
func (m *MarketsRequest) Size() (n int)
func (*MarketsRequest) String ¶
func (m *MarketsRequest) String() string
func (*MarketsRequest) Unmarshal ¶
func (m *MarketsRequest) Unmarshal(dAtA []byte) error
func (*MarketsRequest) XXX_DiscardUnknown ¶
func (m *MarketsRequest) XXX_DiscardUnknown()
func (*MarketsRequest) XXX_Marshal ¶
func (m *MarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketsRequest) XXX_Merge ¶
func (m *MarketsRequest) XXX_Merge(src proto.Message)
func (*MarketsRequest) XXX_Size ¶
func (m *MarketsRequest) XXX_Size() int
func (*MarketsRequest) XXX_Unmarshal ¶
func (m *MarketsRequest) XXX_Unmarshal(b []byte) error
type MarketsResponse ¶
type MarketsResponse struct { // Markets is a sorted list of all markets in the module. Markets []Market `protobuf:"bytes,1,rep,name=markets,proto3" json:"markets"` }
MarketsResponse is the query response for the Markets query.
func (*MarketsResponse) Descriptor ¶
func (*MarketsResponse) Descriptor() ([]byte, []int)
func (*MarketsResponse) GetMarkets ¶
func (m *MarketsResponse) GetMarkets() []Market
func (*MarketsResponse) Marshal ¶
func (m *MarketsResponse) Marshal() (dAtA []byte, err error)
func (*MarketsResponse) MarshalToSizedBuffer ¶
func (m *MarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketsResponse) ProtoMessage ¶
func (*MarketsResponse) ProtoMessage()
func (*MarketsResponse) Reset ¶
func (m *MarketsResponse) Reset()
func (*MarketsResponse) Size ¶
func (m *MarketsResponse) Size() (n int)
func (*MarketsResponse) String ¶
func (m *MarketsResponse) String() string
func (*MarketsResponse) Unmarshal ¶
func (m *MarketsResponse) Unmarshal(dAtA []byte) error
func (*MarketsResponse) XXX_DiscardUnknown ¶
func (m *MarketsResponse) XXX_DiscardUnknown()
func (*MarketsResponse) XXX_Marshal ¶
func (m *MarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketsResponse) XXX_Merge ¶
func (m *MarketsResponse) XXX_Merge(src proto.Message)
func (*MarketsResponse) XXX_Size ¶
func (m *MarketsResponse) XXX_Size() int
func (*MarketsResponse) XXX_Unmarshal ¶
func (m *MarketsResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // CreateMarkets creates markets from the given message. CreateMarkets(ctx context.Context, in *MsgCreateMarkets, opts ...grpc.CallOption) (*MsgCreateMarketsResponse, error) // UpdateMarkets updates markets from the given message. UpdateMarkets(ctx context.Context, in *MsgUpdateMarkets, opts ...grpc.CallOption) (*MsgUpdateMarketsResponse, error) // UpdateParams defines a method for updating the x/marketmap module // parameters. UpdateParams(ctx context.Context, in *MsgParams, opts ...grpc.CallOption) (*MsgParamsResponse, error) // RemoveMarketAuthorities defines a method for removing market authorities // from the x/marketmap module. the signer must be the admin. RemoveMarketAuthorities(ctx context.Context, in *MsgRemoveMarketAuthorities, opts ...grpc.CallOption) (*MsgRemoveMarketAuthoritiesResponse, error) // UpsertMarkets wraps both Create / Update markets into a single message. // Specifically if a market does not exist it will be created, otherwise it // will be updated. The response will be a map between ticker -> updated. UpsertMarkets(ctx context.Context, in *MsgUpsertMarkets, opts ...grpc.CallOption) (*MsgUpsertMarketsResponse, error) // RemoveMarkets removes the given markets from the marketmap if: // - they exist in the map // - they are disabled RemoveMarkets(ctx context.Context, in *MsgRemoveMarkets, opts ...grpc.CallOption) (*MsgRemoveMarketsResponse, 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 MsgCreateMarkets ¶
type MsgCreateMarkets struct { // Authority is the signer of this transaction. This authority must be // authorized by the module to execute the message. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // CreateMarkets is the list of all markets to be created for the given // transaction. CreateMarkets []Market `protobuf:"bytes,2,rep,name=create_markets,json=createMarkets,proto3" json:"create_markets"` }
MsgCreateMarkets defines a message carrying a payload for creating markets in the x/marketmap module.
func (*MsgCreateMarkets) Descriptor ¶
func (*MsgCreateMarkets) Descriptor() ([]byte, []int)
func (*MsgCreateMarkets) GetAuthority ¶
func (m *MsgCreateMarkets) GetAuthority() string
func (*MsgCreateMarkets) GetCreateMarkets ¶
func (m *MsgCreateMarkets) GetCreateMarkets() []Market
func (*MsgCreateMarkets) Marshal ¶
func (m *MsgCreateMarkets) Marshal() (dAtA []byte, err error)
func (*MsgCreateMarkets) MarshalToSizedBuffer ¶
func (m *MsgCreateMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateMarkets) ProtoMessage ¶
func (*MsgCreateMarkets) ProtoMessage()
func (*MsgCreateMarkets) Reset ¶
func (m *MsgCreateMarkets) Reset()
func (*MsgCreateMarkets) Size ¶
func (m *MsgCreateMarkets) Size() (n int)
func (*MsgCreateMarkets) String ¶
func (m *MsgCreateMarkets) String() string
func (*MsgCreateMarkets) Unmarshal ¶
func (m *MsgCreateMarkets) Unmarshal(dAtA []byte) error
func (*MsgCreateMarkets) ValidateBasic ¶
func (m *MsgCreateMarkets) ValidateBasic() error
ValidateBasic determines whether the information in the message is formatted correctly, specifically whether the signer is a valid acc-address.
func (*MsgCreateMarkets) XXX_DiscardUnknown ¶
func (m *MsgCreateMarkets) XXX_DiscardUnknown()
func (*MsgCreateMarkets) XXX_Marshal ¶
func (m *MsgCreateMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateMarkets) XXX_Merge ¶
func (m *MsgCreateMarkets) XXX_Merge(src proto.Message)
func (*MsgCreateMarkets) XXX_Size ¶
func (m *MsgCreateMarkets) XXX_Size() int
func (*MsgCreateMarkets) XXX_Unmarshal ¶
func (m *MsgCreateMarkets) XXX_Unmarshal(b []byte) error
type MsgCreateMarketsResponse ¶
type MsgCreateMarketsResponse struct { }
MsgUpdateMarketMapResponse is the response message for MsgUpdateMarketMap.
func (*MsgCreateMarketsResponse) Descriptor ¶
func (*MsgCreateMarketsResponse) Descriptor() ([]byte, []int)
func (*MsgCreateMarketsResponse) Marshal ¶
func (m *MsgCreateMarketsResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreateMarketsResponse) MarshalTo ¶
func (m *MsgCreateMarketsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateMarketsResponse) MarshalToSizedBuffer ¶
func (m *MsgCreateMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateMarketsResponse) ProtoMessage ¶
func (*MsgCreateMarketsResponse) ProtoMessage()
func (*MsgCreateMarketsResponse) Reset ¶
func (m *MsgCreateMarketsResponse) Reset()
func (*MsgCreateMarketsResponse) Size ¶
func (m *MsgCreateMarketsResponse) Size() (n int)
func (*MsgCreateMarketsResponse) String ¶
func (m *MsgCreateMarketsResponse) String() string
func (*MsgCreateMarketsResponse) Unmarshal ¶
func (m *MsgCreateMarketsResponse) Unmarshal(dAtA []byte) error
func (*MsgCreateMarketsResponse) XXX_DiscardUnknown ¶
func (m *MsgCreateMarketsResponse) XXX_DiscardUnknown()
func (*MsgCreateMarketsResponse) XXX_Marshal ¶
func (m *MsgCreateMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateMarketsResponse) XXX_Merge ¶
func (m *MsgCreateMarketsResponse) XXX_Merge(src proto.Message)
func (*MsgCreateMarketsResponse) XXX_Size ¶
func (m *MsgCreateMarketsResponse) XXX_Size() int
func (*MsgCreateMarketsResponse) XXX_Unmarshal ¶
func (m *MsgCreateMarketsResponse) XXX_Unmarshal(b []byte) error
type MsgParams ¶
type MsgParams struct { // Params defines the new parameters for the x/marketmap module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // Authority defines the authority that is updating the x/marketmap module // parameters. Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` }
MsgParams defines the Msg/Params request type. It contains the new parameters for the x/marketmap module.
func (*MsgParams) Descriptor ¶
func (*MsgParams) GetAuthority ¶
func (*MsgParams) MarshalToSizedBuffer ¶
func (*MsgParams) ProtoMessage ¶
func (*MsgParams) ProtoMessage()
func (*MsgParams) ValidateBasic ¶
ValidateBasic determines whether the information in the message is formatted correctly, specifically whether the signer is a valid acc-address.
func (*MsgParams) XXX_DiscardUnknown ¶
func (m *MsgParams) XXX_DiscardUnknown()
func (*MsgParams) XXX_Marshal ¶
func (*MsgParams) XXX_Unmarshal ¶
type MsgParamsResponse ¶
type MsgParamsResponse struct { }
MsgParamsResponse defines the Msg/Params response type.
func (*MsgParamsResponse) Descriptor ¶
func (*MsgParamsResponse) Descriptor() ([]byte, []int)
func (*MsgParamsResponse) Marshal ¶
func (m *MsgParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgParamsResponse) MarshalTo ¶
func (m *MsgParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgParamsResponse) ProtoMessage ¶
func (*MsgParamsResponse) ProtoMessage()
func (*MsgParamsResponse) Reset ¶
func (m *MsgParamsResponse) Reset()
func (*MsgParamsResponse) Size ¶
func (m *MsgParamsResponse) Size() (n int)
func (*MsgParamsResponse) String ¶
func (m *MsgParamsResponse) String() string
func (*MsgParamsResponse) Unmarshal ¶
func (m *MsgParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgParamsResponse) XXX_DiscardUnknown()
func (*MsgParamsResponse) XXX_Marshal ¶
func (m *MsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgParamsResponse) XXX_Merge ¶
func (m *MsgParamsResponse) XXX_Merge(src proto.Message)
func (*MsgParamsResponse) XXX_Size ¶
func (m *MsgParamsResponse) XXX_Size() int
func (*MsgParamsResponse) XXX_Unmarshal ¶
func (m *MsgParamsResponse) XXX_Unmarshal(b []byte) error
type MsgRemoveMarketAuthorities ¶
type MsgRemoveMarketAuthorities struct { // RemoveAddresses is the list of addresses to remove. RemoveAddresses []string `protobuf:"bytes,1,rep,name=remove_addresses,json=removeAddresses,proto3" json:"remove_addresses,omitempty"` // Admin defines the authority that is the x/marketmap // Admin account. This account is set in the module parameters. Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` }
MsgRemoveMarketAuthorities defines the Msg/RemoveMarketAuthoritiesResponse request type. It contains the new addresses to remove from the list of authorities
func (*MsgRemoveMarketAuthorities) Descriptor ¶
func (*MsgRemoveMarketAuthorities) Descriptor() ([]byte, []int)
func (*MsgRemoveMarketAuthorities) GetAdmin ¶
func (m *MsgRemoveMarketAuthorities) GetAdmin() string
func (*MsgRemoveMarketAuthorities) GetRemoveAddresses ¶
func (m *MsgRemoveMarketAuthorities) GetRemoveAddresses() []string
func (*MsgRemoveMarketAuthorities) Marshal ¶
func (m *MsgRemoveMarketAuthorities) Marshal() (dAtA []byte, err error)
func (*MsgRemoveMarketAuthorities) MarshalTo ¶
func (m *MsgRemoveMarketAuthorities) MarshalTo(dAtA []byte) (int, error)
func (*MsgRemoveMarketAuthorities) MarshalToSizedBuffer ¶
func (m *MsgRemoveMarketAuthorities) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRemoveMarketAuthorities) ProtoMessage ¶
func (*MsgRemoveMarketAuthorities) ProtoMessage()
func (*MsgRemoveMarketAuthorities) Reset ¶
func (m *MsgRemoveMarketAuthorities) Reset()
func (*MsgRemoveMarketAuthorities) Size ¶
func (m *MsgRemoveMarketAuthorities) Size() (n int)
func (*MsgRemoveMarketAuthorities) String ¶
func (m *MsgRemoveMarketAuthorities) String() string
func (*MsgRemoveMarketAuthorities) Unmarshal ¶
func (m *MsgRemoveMarketAuthorities) Unmarshal(dAtA []byte) error
func (*MsgRemoveMarketAuthorities) ValidateBasic ¶
func (m *MsgRemoveMarketAuthorities) ValidateBasic() error
ValidateBasic determines whether the information in the message is formatted correctly, specifically whether the signer is a valid acc-address.
func (*MsgRemoveMarketAuthorities) XXX_DiscardUnknown ¶
func (m *MsgRemoveMarketAuthorities) XXX_DiscardUnknown()
func (*MsgRemoveMarketAuthorities) XXX_Marshal ¶
func (m *MsgRemoveMarketAuthorities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRemoveMarketAuthorities) XXX_Merge ¶
func (m *MsgRemoveMarketAuthorities) XXX_Merge(src proto.Message)
func (*MsgRemoveMarketAuthorities) XXX_Size ¶
func (m *MsgRemoveMarketAuthorities) XXX_Size() int
func (*MsgRemoveMarketAuthorities) XXX_Unmarshal ¶
func (m *MsgRemoveMarketAuthorities) XXX_Unmarshal(b []byte) error
type MsgRemoveMarketAuthoritiesResponse ¶
type MsgRemoveMarketAuthoritiesResponse struct { }
MsgRemoveMarketAuthoritiesResponse defines the Msg/RemoveMarketAuthoritiesResponse response type.
func (*MsgRemoveMarketAuthoritiesResponse) Descriptor ¶
func (*MsgRemoveMarketAuthoritiesResponse) Descriptor() ([]byte, []int)
func (*MsgRemoveMarketAuthoritiesResponse) Marshal ¶
func (m *MsgRemoveMarketAuthoritiesResponse) Marshal() (dAtA []byte, err error)
func (*MsgRemoveMarketAuthoritiesResponse) MarshalTo ¶
func (m *MsgRemoveMarketAuthoritiesResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRemoveMarketAuthoritiesResponse) MarshalToSizedBuffer ¶
func (m *MsgRemoveMarketAuthoritiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRemoveMarketAuthoritiesResponse) ProtoMessage ¶
func (*MsgRemoveMarketAuthoritiesResponse) ProtoMessage()
func (*MsgRemoveMarketAuthoritiesResponse) Reset ¶
func (m *MsgRemoveMarketAuthoritiesResponse) Reset()
func (*MsgRemoveMarketAuthoritiesResponse) Size ¶
func (m *MsgRemoveMarketAuthoritiesResponse) Size() (n int)
func (*MsgRemoveMarketAuthoritiesResponse) String ¶
func (m *MsgRemoveMarketAuthoritiesResponse) String() string
func (*MsgRemoveMarketAuthoritiesResponse) Unmarshal ¶
func (m *MsgRemoveMarketAuthoritiesResponse) Unmarshal(dAtA []byte) error
func (*MsgRemoveMarketAuthoritiesResponse) XXX_DiscardUnknown ¶
func (m *MsgRemoveMarketAuthoritiesResponse) XXX_DiscardUnknown()
func (*MsgRemoveMarketAuthoritiesResponse) XXX_Marshal ¶
func (m *MsgRemoveMarketAuthoritiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRemoveMarketAuthoritiesResponse) XXX_Merge ¶
func (m *MsgRemoveMarketAuthoritiesResponse) XXX_Merge(src proto.Message)
func (*MsgRemoveMarketAuthoritiesResponse) XXX_Size ¶
func (m *MsgRemoveMarketAuthoritiesResponse) XXX_Size() int
func (*MsgRemoveMarketAuthoritiesResponse) XXX_Unmarshal ¶
func (m *MsgRemoveMarketAuthoritiesResponse) XXX_Unmarshal(b []byte) error
type MsgRemoveMarkets ¶
type MsgRemoveMarkets struct { // Authority is the signer of this transaction. This authority must be // authorized by the module to execute the message. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Markets is the list of markets to remove. Markets []string `protobuf:"bytes,2,rep,name=markets,proto3" json:"markets,omitempty"` }
MsgRemoveMarkets defines the Msg/RemoveMarkets request type. It contains the new markets to be removed from the market map.
func (*MsgRemoveMarkets) Descriptor ¶
func (*MsgRemoveMarkets) Descriptor() ([]byte, []int)
func (*MsgRemoveMarkets) GetAuthority ¶
func (m *MsgRemoveMarkets) GetAuthority() string
func (*MsgRemoveMarkets) GetMarkets ¶
func (m *MsgRemoveMarkets) GetMarkets() []string
func (*MsgRemoveMarkets) Marshal ¶
func (m *MsgRemoveMarkets) Marshal() (dAtA []byte, err error)
func (*MsgRemoveMarkets) MarshalToSizedBuffer ¶
func (m *MsgRemoveMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRemoveMarkets) ProtoMessage ¶
func (*MsgRemoveMarkets) ProtoMessage()
func (*MsgRemoveMarkets) Reset ¶
func (m *MsgRemoveMarkets) Reset()
func (*MsgRemoveMarkets) Size ¶
func (m *MsgRemoveMarkets) Size() (n int)
func (*MsgRemoveMarkets) String ¶
func (m *MsgRemoveMarkets) String() string
func (*MsgRemoveMarkets) Unmarshal ¶
func (m *MsgRemoveMarkets) Unmarshal(dAtA []byte) error
func (*MsgRemoveMarkets) ValidateBasic ¶
func (m *MsgRemoveMarkets) ValidateBasic() error
ValidateBasic determines whether the information in the message is formatted correctly, specifically whether the signer is a valid acc-address.
func (*MsgRemoveMarkets) XXX_DiscardUnknown ¶
func (m *MsgRemoveMarkets) XXX_DiscardUnknown()
func (*MsgRemoveMarkets) XXX_Marshal ¶
func (m *MsgRemoveMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRemoveMarkets) XXX_Merge ¶
func (m *MsgRemoveMarkets) XXX_Merge(src proto.Message)
func (*MsgRemoveMarkets) XXX_Size ¶
func (m *MsgRemoveMarkets) XXX_Size() int
func (*MsgRemoveMarkets) XXX_Unmarshal ¶
func (m *MsgRemoveMarkets) XXX_Unmarshal(b []byte) error
type MsgRemoveMarketsResponse ¶
type MsgRemoveMarketsResponse struct { // DeletedMarkets is the list of markets that were removed. DeletedMarkets []string `protobuf:"bytes,1,rep,name=deleted_markets,json=deletedMarkets,proto3" json:"deleted_markets,omitempty"` }
MsgRemoveMarketsResponse defines the Msg/MsgRemoveMarketsResponse response type.
func (*MsgRemoveMarketsResponse) Descriptor ¶
func (*MsgRemoveMarketsResponse) Descriptor() ([]byte, []int)
func (*MsgRemoveMarketsResponse) GetDeletedMarkets ¶
func (m *MsgRemoveMarketsResponse) GetDeletedMarkets() []string
func (*MsgRemoveMarketsResponse) Marshal ¶
func (m *MsgRemoveMarketsResponse) Marshal() (dAtA []byte, err error)
func (*MsgRemoveMarketsResponse) MarshalTo ¶
func (m *MsgRemoveMarketsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRemoveMarketsResponse) MarshalToSizedBuffer ¶
func (m *MsgRemoveMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRemoveMarketsResponse) ProtoMessage ¶
func (*MsgRemoveMarketsResponse) ProtoMessage()
func (*MsgRemoveMarketsResponse) Reset ¶
func (m *MsgRemoveMarketsResponse) Reset()
func (*MsgRemoveMarketsResponse) Size ¶
func (m *MsgRemoveMarketsResponse) Size() (n int)
func (*MsgRemoveMarketsResponse) String ¶
func (m *MsgRemoveMarketsResponse) String() string
func (*MsgRemoveMarketsResponse) Unmarshal ¶
func (m *MsgRemoveMarketsResponse) Unmarshal(dAtA []byte) error
func (*MsgRemoveMarketsResponse) XXX_DiscardUnknown ¶
func (m *MsgRemoveMarketsResponse) XXX_DiscardUnknown()
func (*MsgRemoveMarketsResponse) XXX_Marshal ¶
func (m *MsgRemoveMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRemoveMarketsResponse) XXX_Merge ¶
func (m *MsgRemoveMarketsResponse) XXX_Merge(src proto.Message)
func (*MsgRemoveMarketsResponse) XXX_Size ¶
func (m *MsgRemoveMarketsResponse) XXX_Size() int
func (*MsgRemoveMarketsResponse) XXX_Unmarshal ¶
func (m *MsgRemoveMarketsResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // CreateMarkets creates markets from the given message. CreateMarkets(context.Context, *MsgCreateMarkets) (*MsgCreateMarketsResponse, error) // UpdateMarkets updates markets from the given message. UpdateMarkets(context.Context, *MsgUpdateMarkets) (*MsgUpdateMarketsResponse, error) // UpdateParams defines a method for updating the x/marketmap module // parameters. UpdateParams(context.Context, *MsgParams) (*MsgParamsResponse, error) // RemoveMarketAuthorities defines a method for removing market authorities // from the x/marketmap module. the signer must be the admin. RemoveMarketAuthorities(context.Context, *MsgRemoveMarketAuthorities) (*MsgRemoveMarketAuthoritiesResponse, error) // UpsertMarkets wraps both Create / Update markets into a single message. // Specifically if a market does not exist it will be created, otherwise it // will be updated. The response will be a map between ticker -> updated. UpsertMarkets(context.Context, *MsgUpsertMarkets) (*MsgUpsertMarketsResponse, error) // RemoveMarkets removes the given markets from the marketmap if: // - they exist in the map // - they are disabled RemoveMarkets(context.Context, *MsgRemoveMarkets) (*MsgRemoveMarketsResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateMarkets ¶
type MsgUpdateMarkets struct { // Authority is the signer of this transaction. This authority must be // authorized by the module to execute the message. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // UpdateMarkets is the list of all markets to be updated for the given // transaction. UpdateMarkets []Market `protobuf:"bytes,2,rep,name=update_markets,json=updateMarkets,proto3" json:"update_markets"` }
MsgUpdateMarkets defines a message carrying a payload for updating the x/marketmap module.
func (*MsgUpdateMarkets) Descriptor ¶
func (*MsgUpdateMarkets) Descriptor() ([]byte, []int)
func (*MsgUpdateMarkets) GetAuthority ¶
func (m *MsgUpdateMarkets) GetAuthority() string
func (*MsgUpdateMarkets) GetUpdateMarkets ¶
func (m *MsgUpdateMarkets) GetUpdateMarkets() []Market
func (*MsgUpdateMarkets) Marshal ¶
func (m *MsgUpdateMarkets) Marshal() (dAtA []byte, err error)
func (*MsgUpdateMarkets) MarshalToSizedBuffer ¶
func (m *MsgUpdateMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateMarkets) ProtoMessage ¶
func (*MsgUpdateMarkets) ProtoMessage()
func (*MsgUpdateMarkets) Reset ¶
func (m *MsgUpdateMarkets) Reset()
func (*MsgUpdateMarkets) Size ¶
func (m *MsgUpdateMarkets) Size() (n int)
func (*MsgUpdateMarkets) String ¶
func (m *MsgUpdateMarkets) String() string
func (*MsgUpdateMarkets) Unmarshal ¶
func (m *MsgUpdateMarkets) Unmarshal(dAtA []byte) error
func (*MsgUpdateMarkets) ValidateBasic ¶
func (m *MsgUpdateMarkets) ValidateBasic() error
ValidateBasic determines whether the information in the message is formatted correctly, specifically whether the signer is a valid acc-address.
func (*MsgUpdateMarkets) XXX_DiscardUnknown ¶
func (m *MsgUpdateMarkets) XXX_DiscardUnknown()
func (*MsgUpdateMarkets) XXX_Marshal ¶
func (m *MsgUpdateMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateMarkets) XXX_Merge ¶
func (m *MsgUpdateMarkets) XXX_Merge(src proto.Message)
func (*MsgUpdateMarkets) XXX_Size ¶
func (m *MsgUpdateMarkets) XXX_Size() int
func (*MsgUpdateMarkets) XXX_Unmarshal ¶
func (m *MsgUpdateMarkets) XXX_Unmarshal(b []byte) error
type MsgUpdateMarketsResponse ¶
type MsgUpdateMarketsResponse struct { }
MsgUpdateMarketsResponse is the response message for MsgUpdateMarkets.
func (*MsgUpdateMarketsResponse) Descriptor ¶
func (*MsgUpdateMarketsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateMarketsResponse) Marshal ¶
func (m *MsgUpdateMarketsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateMarketsResponse) MarshalTo ¶
func (m *MsgUpdateMarketsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateMarketsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateMarketsResponse) ProtoMessage ¶
func (*MsgUpdateMarketsResponse) ProtoMessage()
func (*MsgUpdateMarketsResponse) Reset ¶
func (m *MsgUpdateMarketsResponse) Reset()
func (*MsgUpdateMarketsResponse) Size ¶
func (m *MsgUpdateMarketsResponse) Size() (n int)
func (*MsgUpdateMarketsResponse) String ¶
func (m *MsgUpdateMarketsResponse) String() string
func (*MsgUpdateMarketsResponse) Unmarshal ¶
func (m *MsgUpdateMarketsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateMarketsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateMarketsResponse) XXX_DiscardUnknown()
func (*MsgUpdateMarketsResponse) XXX_Marshal ¶
func (m *MsgUpdateMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateMarketsResponse) XXX_Merge ¶
func (m *MsgUpdateMarketsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateMarketsResponse) XXX_Size ¶
func (m *MsgUpdateMarketsResponse) XXX_Size() int
func (*MsgUpdateMarketsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateMarketsResponse) XXX_Unmarshal(b []byte) error
type MsgUpsertMarkets ¶
type MsgUpsertMarkets struct { // Authority is the signer of this transaction. This authority must be // authorized by the module to execute the message. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // CreateMarkets is the list of all markets to be created for the given // transaction. Markets []Market `protobuf:"bytes,2,rep,name=markets,proto3" json:"markets"` }
MsgUpsertMarkets defines a message carrying a payload for performing market upserts (update or create if does not exist) in the x/marketmap module.
func (*MsgUpsertMarkets) Descriptor ¶
func (*MsgUpsertMarkets) Descriptor() ([]byte, []int)
func (*MsgUpsertMarkets) GetAuthority ¶
func (m *MsgUpsertMarkets) GetAuthority() string
func (*MsgUpsertMarkets) GetMarkets ¶
func (m *MsgUpsertMarkets) GetMarkets() []Market
func (*MsgUpsertMarkets) Marshal ¶
func (m *MsgUpsertMarkets) Marshal() (dAtA []byte, err error)
func (*MsgUpsertMarkets) MarshalToSizedBuffer ¶
func (m *MsgUpsertMarkets) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpsertMarkets) ProtoMessage ¶
func (*MsgUpsertMarkets) ProtoMessage()
func (*MsgUpsertMarkets) Reset ¶
func (m *MsgUpsertMarkets) Reset()
func (*MsgUpsertMarkets) Size ¶
func (m *MsgUpsertMarkets) Size() (n int)
func (*MsgUpsertMarkets) String ¶
func (m *MsgUpsertMarkets) String() string
func (*MsgUpsertMarkets) Unmarshal ¶
func (m *MsgUpsertMarkets) Unmarshal(dAtA []byte) error
func (*MsgUpsertMarkets) ValidateBasic ¶
func (m *MsgUpsertMarkets) ValidateBasic() error
ValidateBasic asserts that the authority address in the upsert-markets message is formatted correctly. If also verifies that all markets w/in the message are valid, if no markets are present it returns an error.
func (*MsgUpsertMarkets) XXX_DiscardUnknown ¶
func (m *MsgUpsertMarkets) XXX_DiscardUnknown()
func (*MsgUpsertMarkets) XXX_Marshal ¶
func (m *MsgUpsertMarkets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpsertMarkets) XXX_Merge ¶
func (m *MsgUpsertMarkets) XXX_Merge(src proto.Message)
func (*MsgUpsertMarkets) XXX_Size ¶
func (m *MsgUpsertMarkets) XXX_Size() int
func (*MsgUpsertMarkets) XXX_Unmarshal ¶
func (m *MsgUpsertMarkets) XXX_Unmarshal(b []byte) error
type MsgUpsertMarketsResponse ¶
type MsgUpsertMarketsResponse struct { // UpdatedMarkets is a map between the ticker and whether the market was // updated. // Deprecated: This field will be empty in all responses. MarketUpdates map[string]bool `` // Deprecated: Do not use. /* 189-byte string literal not displayed */ }
MsgUpsertMarketsResponse is the response from the UpsertMarkets API in the x/marketmap module.
func (*MsgUpsertMarketsResponse) Descriptor ¶
func (*MsgUpsertMarketsResponse) Descriptor() ([]byte, []int)
func (*MsgUpsertMarketsResponse) GetMarketUpdates
deprecated
func (m *MsgUpsertMarketsResponse) GetMarketUpdates() map[string]bool
Deprecated: Do not use.
func (*MsgUpsertMarketsResponse) Marshal ¶
func (m *MsgUpsertMarketsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpsertMarketsResponse) MarshalTo ¶
func (m *MsgUpsertMarketsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpsertMarketsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpsertMarketsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpsertMarketsResponse) ProtoMessage ¶
func (*MsgUpsertMarketsResponse) ProtoMessage()
func (*MsgUpsertMarketsResponse) Reset ¶
func (m *MsgUpsertMarketsResponse) Reset()
func (*MsgUpsertMarketsResponse) Size ¶
func (m *MsgUpsertMarketsResponse) Size() (n int)
func (*MsgUpsertMarketsResponse) String ¶
func (m *MsgUpsertMarketsResponse) String() string
func (*MsgUpsertMarketsResponse) Unmarshal ¶
func (m *MsgUpsertMarketsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpsertMarketsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpsertMarketsResponse) XXX_DiscardUnknown()
func (*MsgUpsertMarketsResponse) XXX_Marshal ¶
func (m *MsgUpsertMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpsertMarketsResponse) XXX_Merge ¶
func (m *MsgUpsertMarketsResponse) XXX_Merge(src proto.Message)
func (*MsgUpsertMarketsResponse) XXX_Size ¶
func (m *MsgUpsertMarketsResponse) XXX_Size() int
func (*MsgUpsertMarketsResponse) XXX_Unmarshal ¶
func (m *MsgUpsertMarketsResponse) XXX_Unmarshal(b []byte) error
type MultiMarketMapHooks ¶
type MultiMarketMapHooks []MarketMapHooks
MultiMarketMapHooks defines an array of MarketMapHooks which can be executed in sequence.
func (MultiMarketMapHooks) AfterMarketCreated ¶
func (mh MultiMarketMapHooks) AfterMarketCreated(ctx sdk.Context, market Market) error
AfterMarketCreated calls all AfterMarketCreated hooks registered to the MultiMarketMapHooks.
func (MultiMarketMapHooks) AfterMarketGenesis ¶
AfterMarketGenesis calls all AfterMarketGenesis hooks registered to the MultiMarketMapHooks.
func (MultiMarketMapHooks) AfterMarketRemoved ¶
func (mh MultiMarketMapHooks) AfterMarketRemoved(ctx sdk.Context, key string) error
AfterMarketRemoved calls all AfterMarketRemoved hooks registered to the MultiMarketMapHooks.
func (MultiMarketMapHooks) AfterMarketUpdated ¶
func (mh MultiMarketMapHooks) AfterMarketUpdated(ctx sdk.Context, market Market) error
AfterMarketUpdated calls all AfterMarketUpdated hooks registered to the MultiMarketMapHooks.
type NoopMarketMapHooks ¶
type NoopMarketMapHooks struct{}
NoopMarketMapHooks defines market map hooks that are a no-op.
func (*NoopMarketMapHooks) AfterMarketCreated ¶
func (n *NoopMarketMapHooks) AfterMarketCreated(_ sdk.Context, _ Market) error
func (*NoopMarketMapHooks) AfterMarketGenesis ¶
func (*NoopMarketMapHooks) AfterMarketRemoved ¶
func (n *NoopMarketMapHooks) AfterMarketRemoved(_ sdk.Context, _ string) error
func (*NoopMarketMapHooks) AfterMarketUpdated ¶
func (n *NoopMarketMapHooks) AfterMarketUpdated(_ sdk.Context, _ Market) error
type Params ¶
type Params struct { // MarketAuthorities is the list of authority accounts that are able to // control updating the marketmap. MarketAuthorities []string `protobuf:"bytes,1,rep,name=market_authorities,json=marketAuthorities,proto3" json:"market_authorities,omitempty"` // Admin is an address that can remove addresses from the MarketAuthorities // list. Only governance can add to the MarketAuthorities or change the Admin. Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` }
Params defines the parameters for the x/marketmap module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns default marketmap parameters.
func (*Params) Descriptor ¶
func (*Params) GetMarketAuthorities ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) ValidateBasic ¶
ValidateBasic performs stateless validation of the Params.
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type ParamsRequest ¶
type ParamsRequest struct { }
ParamsRequest is the request type for the Query/Params RPC method.
func (*ParamsRequest) Descriptor ¶
func (*ParamsRequest) Descriptor() ([]byte, []int)
func (*ParamsRequest) Marshal ¶
func (m *ParamsRequest) Marshal() (dAtA []byte, err error)
func (*ParamsRequest) MarshalToSizedBuffer ¶
func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ParamsRequest) ProtoMessage ¶
func (*ParamsRequest) ProtoMessage()
func (*ParamsRequest) Reset ¶
func (m *ParamsRequest) Reset()
func (*ParamsRequest) Size ¶
func (m *ParamsRequest) Size() (n int)
func (*ParamsRequest) String ¶
func (m *ParamsRequest) String() string
func (*ParamsRequest) Unmarshal ¶
func (m *ParamsRequest) Unmarshal(dAtA []byte) error
func (*ParamsRequest) XXX_DiscardUnknown ¶
func (m *ParamsRequest) XXX_DiscardUnknown()
func (*ParamsRequest) XXX_Marshal ¶
func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ParamsRequest) XXX_Merge ¶
func (m *ParamsRequest) XXX_Merge(src proto.Message)
func (*ParamsRequest) XXX_Size ¶
func (m *ParamsRequest) XXX_Size() int
func (*ParamsRequest) XXX_Unmarshal ¶
func (m *ParamsRequest) XXX_Unmarshal(b []byte) error
type ParamsResponse ¶
type ParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
ParamsResponse is the response type for the Query/Params RPC method.
func (*ParamsResponse) Descriptor ¶
func (*ParamsResponse) Descriptor() ([]byte, []int)
func (*ParamsResponse) GetParams ¶
func (m *ParamsResponse) GetParams() Params
func (*ParamsResponse) Marshal ¶
func (m *ParamsResponse) Marshal() (dAtA []byte, err error)
func (*ParamsResponse) MarshalToSizedBuffer ¶
func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ParamsResponse) ProtoMessage ¶
func (*ParamsResponse) ProtoMessage()
func (*ParamsResponse) Reset ¶
func (m *ParamsResponse) Reset()
func (*ParamsResponse) Size ¶
func (m *ParamsResponse) Size() (n int)
func (*ParamsResponse) String ¶
func (m *ParamsResponse) String() string
func (*ParamsResponse) Unmarshal ¶
func (m *ParamsResponse) Unmarshal(dAtA []byte) error
func (*ParamsResponse) XXX_DiscardUnknown ¶
func (m *ParamsResponse) XXX_DiscardUnknown()
func (*ParamsResponse) XXX_Marshal ¶
func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ParamsResponse) XXX_Merge ¶
func (m *ParamsResponse) XXX_Merge(src proto.Message)
func (*ParamsResponse) XXX_Size ¶
func (m *ParamsResponse) XXX_Size() int
func (*ParamsResponse) XXX_Unmarshal ¶
func (m *ParamsResponse) XXX_Unmarshal(b []byte) error
type ProviderConfig ¶
type ProviderConfig struct { // Name corresponds to the name of the provider for which the configuration is // being set. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // OffChainTicker is the off-chain representation of the ticker i.e. BTC/USD. // The off-chain ticker is unique to a given provider and is used to fetch the // price of the ticker from the provider. OffChainTicker string `protobuf:"bytes,2,opt,name=off_chain_ticker,json=offChainTicker,proto3" json:"off_chain_ticker,omitempty"` // NormalizeByPair is the currency pair for this ticker to be normalized by. // For example, if the desired Ticker is BTC/USD, this market could be reached // using: OffChainTicker = BTC/USDT NormalizeByPair = USDT/USD This field is // optional and nullable. NormalizeByPair *types.CurrencyPair `protobuf:"bytes,3,opt,name=normalize_by_pair,json=normalizeByPair,proto3" json:"normalize_by_pair,omitempty"` // Invert is a boolean indicating if the BASE and QUOTE of the market should // be inverted. i.e. BASE -> QUOTE, QUOTE -> BASE Invert bool `protobuf:"varint,4,opt,name=invert,proto3" json:"invert,omitempty"` // MetadataJSON is a string of JSON that encodes any extra configuration // for the given provider config. Metadata_JSON string `protobuf:"bytes,15,opt,name=metadata_JSON,json=metadataJSON,proto3" json:"metadata_JSON,omitempty"` }
func (*ProviderConfig) Descriptor ¶
func (*ProviderConfig) Descriptor() ([]byte, []int)
func (*ProviderConfig) Equal ¶
func (pc *ProviderConfig) Equal(other ProviderConfig) bool
Equal returns true iff the ProviderConfig is equal to the given ProviderConfig.
func (*ProviderConfig) GetInvert ¶
func (m *ProviderConfig) GetInvert() bool
func (*ProviderConfig) GetMetadata_JSON ¶
func (m *ProviderConfig) GetMetadata_JSON() string
func (*ProviderConfig) GetName ¶
func (m *ProviderConfig) GetName() string
func (*ProviderConfig) GetNormalizeByPair ¶
func (m *ProviderConfig) GetNormalizeByPair() *types.CurrencyPair
func (*ProviderConfig) GetOffChainTicker ¶
func (m *ProviderConfig) GetOffChainTicker() string
func (*ProviderConfig) Marshal ¶
func (m *ProviderConfig) Marshal() (dAtA []byte, err error)
func (*ProviderConfig) MarshalToSizedBuffer ¶
func (m *ProviderConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProviderConfig) ProtoMessage ¶
func (*ProviderConfig) ProtoMessage()
func (*ProviderConfig) Reset ¶
func (m *ProviderConfig) Reset()
func (*ProviderConfig) Size ¶
func (m *ProviderConfig) Size() (n int)
func (*ProviderConfig) String ¶
func (m *ProviderConfig) String() string
func (*ProviderConfig) Unmarshal ¶
func (m *ProviderConfig) Unmarshal(dAtA []byte) error
func (*ProviderConfig) ValidateBasic ¶
func (pc *ProviderConfig) ValidateBasic() error
ValidateBasic performs basic validation on a ProviderConfig.
func (*ProviderConfig) XXX_DiscardUnknown ¶
func (m *ProviderConfig) XXX_DiscardUnknown()
func (*ProviderConfig) XXX_Marshal ¶
func (m *ProviderConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProviderConfig) XXX_Merge ¶
func (m *ProviderConfig) XXX_Merge(src proto.Message)
func (*ProviderConfig) XXX_Size ¶
func (m *ProviderConfig) XXX_Size() int
func (*ProviderConfig) XXX_Unmarshal ¶
func (m *ProviderConfig) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // MarketMap returns the full market map stored in the x/marketmap // module. NOTE: the value returned by this query is not safe for on-chain // code. MarketMap(ctx context.Context, in *MarketMapRequest, opts ...grpc.CallOption) (*MarketMapResponse, error) // Market returns all stored in the x/marketmap // module as a sorted list. Markets(ctx context.Context, in *MarketsRequest, opts ...grpc.CallOption) (*MarketsResponse, error) // Market returns a market stored in the x/marketmap // module. Market(ctx context.Context, in *MarketRequest, opts ...grpc.CallOption) (*MarketResponse, error) // LastUpdated returns the last height the market map was updated at. LastUpdated(ctx context.Context, in *LastUpdatedRequest, opts ...grpc.CallOption) (*LastUpdatedResponse, error) // Params returns the current x/marketmap module parameters. Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, 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 QueryServer ¶
type QueryServer interface { // MarketMap returns the full market map stored in the x/marketmap // module. NOTE: the value returned by this query is not safe for on-chain // code. MarketMap(context.Context, *MarketMapRequest) (*MarketMapResponse, error) // Market returns all stored in the x/marketmap // module as a sorted list. Markets(context.Context, *MarketsRequest) (*MarketsResponse, error) // Market returns a market stored in the x/marketmap // module. Market(context.Context, *MarketRequest) (*MarketResponse, error) // LastUpdated returns the last height the market map was updated at. LastUpdated(context.Context, *LastUpdatedRequest) (*LastUpdatedResponse, error) // Params returns the current x/marketmap module parameters. Params(context.Context, *ParamsRequest) (*ParamsResponse, error) }
QueryServer is the server API for Query service.
type Ticker ¶
type Ticker struct { // CurrencyPair is the currency pair for this ticker. CurrencyPair types.CurrencyPair `protobuf:"bytes,1,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair"` // Decimals is the number of decimal places for the ticker. The number of // decimal places is used to convert the price to a human-readable format. Decimals uint64 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` // MinProviderCount is the minimum number of providers required to consider // the ticker valid. MinProviderCount uint64 `protobuf:"varint,3,opt,name=min_provider_count,json=minProviderCount,proto3" json:"min_provider_count,omitempty"` // Enabled is the flag that denotes if the Ticker is enabled for price // fetching by an oracle. Enabled bool `protobuf:"varint,14,opt,name=enabled,proto3" json:"enabled,omitempty"` // MetadataJSON is a string of JSON that encodes any extra configuration // for the given ticker. Metadata_JSON string `protobuf:"bytes,15,opt,name=metadata_JSON,json=metadataJSON,proto3" json:"metadata_JSON,omitempty"` }
Ticker represents a price feed for a given asset pair i.e. BTC/USD. The price feed is scaled to a number of decimal places and has a minimum number of providers required to consider the ticker valid.
func NewTicker ¶
NewTicker returns a new Ticker instance. A Ticker represents a price feed for a given asset pair i.e. BTC/USD. The price feed is scaled to a number of decimal places and has a minimum number of providers required to consider the ticker valid.
func (*Ticker) Descriptor ¶
func (*Ticker) GetCurrencyPair ¶
func (m *Ticker) GetCurrencyPair() types.CurrencyPair
func (*Ticker) GetDecimals ¶
func (*Ticker) GetEnabled ¶
func (*Ticker) GetMetadata_JSON ¶
func (*Ticker) GetMinProviderCount ¶
func (*Ticker) MarshalToSizedBuffer ¶
func (*Ticker) ProtoMessage ¶
func (*Ticker) ProtoMessage()
func (*Ticker) ValidateBasic ¶
ValidateBasic performs basic validation on the Ticker.
func (*Ticker) XXX_DiscardUnknown ¶
func (m *Ticker) XXX_DiscardUnknown()
func (*Ticker) XXX_Marshal ¶
func (*Ticker) XXX_Unmarshal ¶
type TickerString ¶
type TickerString string
TickerString is the key used to identify unique pairs of Base/Quote with corresponding PathsConfig objects--or in other words AggregationConfigs. The TickerString is identical to Slinky's CurrencyPair.String() output in that it is `Base` and `Quote` joined by `/` i.e. `$BASE/$QUOTE`.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) CreateMarkets ¶
func (*UnimplementedMsgServer) CreateMarkets(ctx context.Context, req *MsgCreateMarkets) (*MsgCreateMarketsResponse, error)
func (*UnimplementedMsgServer) RemoveMarketAuthorities ¶
func (*UnimplementedMsgServer) RemoveMarketAuthorities(ctx context.Context, req *MsgRemoveMarketAuthorities) (*MsgRemoveMarketAuthoritiesResponse, error)
func (*UnimplementedMsgServer) RemoveMarkets ¶
func (*UnimplementedMsgServer) RemoveMarkets(ctx context.Context, req *MsgRemoveMarkets) (*MsgRemoveMarketsResponse, error)
func (*UnimplementedMsgServer) UpdateMarkets ¶
func (*UnimplementedMsgServer) UpdateMarkets(ctx context.Context, req *MsgUpdateMarkets) (*MsgUpdateMarketsResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgParams) (*MsgParamsResponse, error)
func (*UnimplementedMsgServer) UpsertMarkets ¶
func (*UnimplementedMsgServer) UpsertMarkets(ctx context.Context, req *MsgUpsertMarkets) (*MsgUpsertMarketsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) LastUpdated ¶
func (*UnimplementedQueryServer) LastUpdated(ctx context.Context, req *LastUpdatedRequest) (*LastUpdatedResponse, error)
func (*UnimplementedQueryServer) Market ¶
func (*UnimplementedQueryServer) Market(ctx context.Context, req *MarketRequest) (*MarketResponse, error)
func (*UnimplementedQueryServer) MarketMap ¶
func (*UnimplementedQueryServer) MarketMap(ctx context.Context, req *MarketMapRequest) (*MarketMapResponse, error)
func (*UnimplementedQueryServer) Markets ¶
func (*UnimplementedQueryServer) Markets(ctx context.Context, req *MarketsRequest) (*MarketsResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *ParamsRequest) (*ParamsResponse, error)