types

package
v0.0.0-...-6cf2bb1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeMarketPriceUpdated = "market_price_updated"
	EventTypeOracleUpdatedPrice = "oracle_updated_price"
	EventTypeNoValidPrices      = "no_valid_prices"

	AttributeValueCategory = ModuleName
	AttributeMarketID      = "market_id"
	AttributeMarketPrice   = "market_price"
	AttributeOracle        = "oracle"
	AttributeExpiry        = "expiry"
)

Pricefeed module event types

View Source
const (
	// ModuleName The name that will be used throughout the module
	ModuleName = "pricefeed"

	// StoreKey Top level store key where all module items will be stored
	StoreKey = ModuleName

	// RouterKey Top level router key
	RouterKey = ModuleName

	// QuerierRoute is the querier route for gov
	QuerierRoute = ModuleName

	// DefaultParamspace default namestore
	DefaultParamspace = ModuleName
)
View Source
const (
	// TypeMsgPostPrice type of PostPrice msg
	TypeMsgPostPrice = "post_price"

	// MaxExpiry defines the max expiry time defined as UNIX time (9999-12-31 23:59:59 +0000 UTC)
	MaxExpiry = 253402300799
)
View Source
const (
	// QueryGetParams command for params query
	QueryGetParams = "parameters"
	// QueryMarkets command for assets query
	QueryMarkets = "markets"
	// QueryOracles command for oracles query
	QueryOracles = "oracles"
	// QueryRawPrices command for raw price queries
	QueryRawPrices = "rawprices"
	// QueryPrice command for price queries
	QueryPrice = "price"
	// QueryPrices command for quering all prices
	QueryPrices = "prices"
)

Variables

View Source
var (
	// ErrEmptyInput error for empty input
	ErrEmptyInput = sdkerrors.Register(ModuleName, 2, "input must not be empty")
	// ErrExpired error for posted price messages with expired price
	ErrExpired = sdkerrors.Register(ModuleName, 3, "price is expired")
	// ErrNoValidPrice error for posted price messages with expired price
	ErrNoValidPrice = sdkerrors.Register(ModuleName, 4, "all input prices are expired")
	// ErrInvalidMarket error for posted price messages for invalid markets
	ErrInvalidMarket = sdkerrors.Register(ModuleName, 5, "market does not exist")
	// ErrInvalidOracle error for posted price messages for invalid oracles
	ErrInvalidOracle = sdkerrors.Register(ModuleName, 6, "oracle does not exist or not authorized")
	// ErrAssetNotFound error for not found asset
	ErrAssetNotFound = sdkerrors.Register(ModuleName, 7, "asset not found")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// CurrentPricePrefix prefix for the current price of an asset
	CurrentPricePrefix = []byte{0x00}

	// RawPriceFeedPrefix prefix for the raw pricefeed of an asset
	RawPriceFeedPrefix = []byte{0x01}
)
View Source
var (
	KeyMarkets     = []byte("Markets")
	DefaultMarkets = []Market{}
)

Parameter keys

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthStore        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStore          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStore = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func CurrentPriceKey

func CurrentPriceKey(marketID string) []byte

CurrentPriceKey returns the prefix for the current price

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable Key declaration for parameters

func RawPriceIteratorKey

func RawPriceIteratorKey(marketID string) []byte

RawPriceIteratorKey returns the prefix for the raw price for a single market

func RawPriceKey

func RawPriceKey(marketID string, oracleAddr sdk.AccAddress) []byte

RawPriceKey returns the prefix for the raw price

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers all the necessary types and interfaces for the governance module.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type CurrentPrice

type CurrentPrice struct {
	MarketID string                                 `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
	Price    github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
}

CurrentPrice defines a current price for a particular market in the pricefeed module.

func NewCurrentPrice

func NewCurrentPrice(marketID string, price sdk.Dec) CurrentPrice

NewCurrentPrice returns an instance of CurrentPrice

func (*CurrentPrice) Descriptor

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

func (*CurrentPrice) Equal

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

func (*CurrentPrice) GetMarketID

func (m *CurrentPrice) GetMarketID() string

func (*CurrentPrice) Marshal

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

func (*CurrentPrice) MarshalTo

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

func (*CurrentPrice) MarshalToSizedBuffer

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

func (*CurrentPrice) ProtoMessage

func (*CurrentPrice) ProtoMessage()

func (*CurrentPrice) Reset

func (m *CurrentPrice) Reset()

func (*CurrentPrice) Size

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

func (*CurrentPrice) String

func (m *CurrentPrice) String() string

func (*CurrentPrice) Unmarshal

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

func (*CurrentPrice) VerboseEqual

func (this *CurrentPrice) VerboseEqual(that interface{}) error

func (*CurrentPrice) XXX_DiscardUnknown

func (m *CurrentPrice) XXX_DiscardUnknown()

func (*CurrentPrice) XXX_Marshal

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

func (*CurrentPrice) XXX_Merge

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

func (*CurrentPrice) XXX_Size

func (m *CurrentPrice) XXX_Size() int

func (*CurrentPrice) XXX_Unmarshal

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

type CurrentPriceResponse

type CurrentPriceResponse struct {
	MarketID string                                 `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
	Price    github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
}

CurrentPriceResponse defines a current price for a particular market in the pricefeed module.

func NewCurrentPriceResponse

func NewCurrentPriceResponse(marketID string, price sdk.Dec) CurrentPriceResponse

NewCurrentPriceResponse returns an instance of CurrentPriceResponse

func (*CurrentPriceResponse) Descriptor

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

func (*CurrentPriceResponse) Equal

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

func (*CurrentPriceResponse) GetMarketID

func (m *CurrentPriceResponse) GetMarketID() string

func (*CurrentPriceResponse) Marshal

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

func (*CurrentPriceResponse) MarshalTo

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

func (*CurrentPriceResponse) MarshalToSizedBuffer

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

func (*CurrentPriceResponse) ProtoMessage

func (*CurrentPriceResponse) ProtoMessage()

func (*CurrentPriceResponse) Reset

func (m *CurrentPriceResponse) Reset()

func (*CurrentPriceResponse) Size

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

func (*CurrentPriceResponse) String

func (m *CurrentPriceResponse) String() string

func (*CurrentPriceResponse) Unmarshal

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

func (*CurrentPriceResponse) VerboseEqual

func (this *CurrentPriceResponse) VerboseEqual(that interface{}) error

func (*CurrentPriceResponse) XXX_DiscardUnknown

func (m *CurrentPriceResponse) XXX_DiscardUnknown()

func (*CurrentPriceResponse) XXX_Marshal

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

func (*CurrentPriceResponse) XXX_Merge

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

func (*CurrentPriceResponse) XXX_Size

func (m *CurrentPriceResponse) XXX_Size() int

func (*CurrentPriceResponse) XXX_Unmarshal

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

type CurrentPriceResponses

type CurrentPriceResponses []CurrentPriceResponse

CurrentPriceResponses is a slice of CurrentPriceResponse

type CurrentPrices

type CurrentPrices []CurrentPrice

CurrentPrices is a slice of CurrentPrice

type GenesisState

type GenesisState struct {
	// params defines all the paramaters of the module.
	Params       Params       `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	PostedPrices PostedPrices `protobuf:"bytes,2,rep,name=posted_prices,json=postedPrices,proto3,castrepeated=PostedPrices" json:"posted_prices"`
}

GenesisState defines the pricefeed module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState defines default GenesisState for pricefeed

func NewGenesisState

func NewGenesisState(p Params, pp []PostedPrice) GenesisState

NewGenesisState creates a new genesis state for the pricefeed module

func (*GenesisState) Descriptor

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

func (*GenesisState) Equal

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPostedPrices

func (m *GenesisState) GetPostedPrices() PostedPrices

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic validation of genesis data returning an error for any failed validation criteria.

func (*GenesisState) VerboseEqual

func (this *GenesisState) VerboseEqual(that interface{}) error

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type Market

type Market struct {
	MarketID   string                                          `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
	BaseAsset  string                                          `protobuf:"bytes,2,opt,name=base_asset,json=baseAsset,proto3" json:"base_asset,omitempty"`
	QuoteAsset string                                          `protobuf:"bytes,3,opt,name=quote_asset,json=quoteAsset,proto3" json:"quote_asset,omitempty"`
	Oracles    []github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,rep,name=oracles,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"oracles,omitempty"`
	Active     bool                                            `protobuf:"varint,5,opt,name=active,proto3" json:"active,omitempty"`
}

Market defines an asset in the pricefeed.

func NewMarket

func NewMarket(id, base, quote string, oracles []sdk.AccAddress, active bool) Market

NewMarket returns a new Market

func (*Market) Descriptor

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

func (*Market) Equal

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

func (*Market) GetActive

func (m *Market) GetActive() bool

func (*Market) GetBaseAsset

func (m *Market) GetBaseAsset() string

func (*Market) GetMarketID

func (m *Market) GetMarketID() string

func (*Market) GetOracles

func (*Market) GetQuoteAsset

func (m *Market) GetQuoteAsset() string

func (*Market) Marshal

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

func (*Market) MarshalTo

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

func (*Market) MarshalToSizedBuffer

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

func (*Market) ProtoMessage

func (*Market) ProtoMessage()

func (*Market) Reset

func (m *Market) Reset()

func (*Market) Size

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

func (*Market) String

func (m *Market) String() string

func (Market) ToMarketResponse

func (m Market) ToMarketResponse() MarketResponse

ToMarketResponse returns a new MarketResponse from a Market

func (*Market) Unmarshal

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

func (Market) Validate

func (m Market) Validate() error

Validate performs a basic validation of the market params

func (*Market) VerboseEqual

func (this *Market) VerboseEqual(that interface{}) error

func (*Market) XXX_DiscardUnknown

func (m *Market) XXX_DiscardUnknown()

func (*Market) XXX_Marshal

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

func (*Market) XXX_Merge

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

func (*Market) XXX_Size

func (m *Market) XXX_Size() int

func (*Market) XXX_Unmarshal

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

type MarketResponse

type MarketResponse struct {
	MarketID   string   `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
	BaseAsset  string   `protobuf:"bytes,2,opt,name=base_asset,json=baseAsset,proto3" json:"base_asset,omitempty"`
	QuoteAsset string   `protobuf:"bytes,3,opt,name=quote_asset,json=quoteAsset,proto3" json:"quote_asset,omitempty"`
	Oracles    []string `protobuf:"bytes,4,rep,name=oracles,proto3" json:"oracles,omitempty"`
	Active     bool     `protobuf:"varint,5,opt,name=active,proto3" json:"active,omitempty"`
}

MarketResponse defines an asset in the pricefeed.

func NewMarketResponse

func NewMarketResponse(id, base, quote string, oracles []sdk.AccAddress, active bool) MarketResponse

NewMarketResponse returns a new MarketResponse

func (*MarketResponse) Descriptor

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

func (*MarketResponse) Equal

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

func (*MarketResponse) GetActive

func (m *MarketResponse) GetActive() bool

func (*MarketResponse) GetBaseAsset

func (m *MarketResponse) GetBaseAsset() string

func (*MarketResponse) GetMarketID

func (m *MarketResponse) GetMarketID() string

func (*MarketResponse) GetOracles

func (m *MarketResponse) GetOracles() []string

func (*MarketResponse) GetQuoteAsset

func (m *MarketResponse) GetQuoteAsset() string

func (*MarketResponse) Marshal

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

func (*MarketResponse) MarshalTo

func (m *MarketResponse) MarshalTo(dAtA []byte) (int, 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) VerboseEqual

func (this *MarketResponse) VerboseEqual(that interface{}) 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 MarketResponses

type MarketResponses []MarketResponse

MarketResponses is a slice of MarketResponse

type Markets

type Markets []Market

Markets is a slice of Market

func (Markets) Validate

func (ms Markets) Validate() error

Validate checks if all the markets are valid and there are no duplicated entries.

type MsgClient

type MsgClient interface {
	// PostPrice defines a method for creating a new post price
	PostPrice(ctx context.Context, in *MsgPostPrice, opts ...grpc.CallOption) (*MsgPostPriceResponse, 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 MsgPostPrice

type MsgPostPrice struct {
	// address of client
	From     string                                 `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	MarketID string                                 `protobuf:"bytes,2,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
	Price    github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
	Expiry   time.Time                              `protobuf:"bytes,4,opt,name=expiry,proto3,stdtime" json:"expiry"`
}

MsgPostPrice represents a method for creating a new post price

func NewMsgPostPrice

func NewMsgPostPrice(from string, marketID string, price sdk.Dec, expiry time.Time) *MsgPostPrice

NewMsgPostPrice returns a new MsgPostPrice

func (*MsgPostPrice) Descriptor

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

func (*MsgPostPrice) Equal

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

func (MsgPostPrice) GetSignBytes

func (msg MsgPostPrice) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgPostPrice) GetSigners

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

GetSigners Implements Msg.

func (*MsgPostPrice) Marshal

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

func (*MsgPostPrice) MarshalTo

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

func (*MsgPostPrice) MarshalToSizedBuffer

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

func (*MsgPostPrice) ProtoMessage

func (*MsgPostPrice) ProtoMessage()

func (*MsgPostPrice) Reset

func (m *MsgPostPrice) Reset()

func (MsgPostPrice) Route

func (msg MsgPostPrice) Route() string

Route Implements Msg.

func (*MsgPostPrice) Size

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

func (*MsgPostPrice) String

func (m *MsgPostPrice) String() string

func (MsgPostPrice) Type

func (msg MsgPostPrice) Type() string

Type Implements Msg

func (*MsgPostPrice) Unmarshal

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

func (MsgPostPrice) ValidateBasic

func (msg MsgPostPrice) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

func (*MsgPostPrice) VerboseEqual

func (this *MsgPostPrice) VerboseEqual(that interface{}) error

func (*MsgPostPrice) XXX_DiscardUnknown

func (m *MsgPostPrice) XXX_DiscardUnknown()

func (*MsgPostPrice) XXX_Marshal

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

func (*MsgPostPrice) XXX_Merge

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

func (*MsgPostPrice) XXX_Size

func (m *MsgPostPrice) XXX_Size() int

func (*MsgPostPrice) XXX_Unmarshal

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

type MsgPostPriceResponse

type MsgPostPriceResponse struct {
}

MsgPostPriceResponse defines the Msg/PostPrice response type.

func (*MsgPostPriceResponse) Descriptor

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

func (*MsgPostPriceResponse) Equal

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

func (*MsgPostPriceResponse) Marshal

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

func (*MsgPostPriceResponse) MarshalTo

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

func (*MsgPostPriceResponse) MarshalToSizedBuffer

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

func (*MsgPostPriceResponse) ProtoMessage

func (*MsgPostPriceResponse) ProtoMessage()

func (*MsgPostPriceResponse) Reset

func (m *MsgPostPriceResponse) Reset()

func (*MsgPostPriceResponse) Size

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

func (*MsgPostPriceResponse) String

func (m *MsgPostPriceResponse) String() string

func (*MsgPostPriceResponse) Unmarshal

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

func (*MsgPostPriceResponse) VerboseEqual

func (this *MsgPostPriceResponse) VerboseEqual(that interface{}) error

func (*MsgPostPriceResponse) XXX_DiscardUnknown

func (m *MsgPostPriceResponse) XXX_DiscardUnknown()

func (*MsgPostPriceResponse) XXX_Marshal

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

func (*MsgPostPriceResponse) XXX_Merge

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

func (*MsgPostPriceResponse) XXX_Size

func (m *MsgPostPriceResponse) XXX_Size() int

func (*MsgPostPriceResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// PostPrice defines a method for creating a new post price
	PostPrice(context.Context, *MsgPostPrice) (*MsgPostPriceResponse, error)
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
	Markets Markets `protobuf:"bytes,1,rep,name=markets,proto3,castrepeated=Markets" json:"markets"`
}

Params defines the parameters for the pricefeed module.

func DefaultParams

func DefaultParams() Params

DefaultParams default params for pricefeed

func NewParams

func NewParams(markets []Market) Params

NewParams creates a new AssetParams object

func (*Params) Descriptor

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

func (*Params) Equal

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

func (*Params) GetMarkets

func (m *Params) GetMarkets() Markets

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of pricefeed module's parameters.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate ensure that params have valid values

func (*Params) VerboseEqual

func (this *Params) VerboseEqual(that interface{}) error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type PostedPrice

type PostedPrice struct {
	MarketID      string                                        `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
	OracleAddress github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 155-byte string literal not displayed */
	Price         github_com_cosmos_cosmos_sdk_types.Dec        `protobuf:"bytes,3,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
	Expiry        time.Time                                     `protobuf:"bytes,4,opt,name=expiry,proto3,stdtime" json:"expiry"`
}

PostedPrice defines a price for market posted by a specific oracle.

func NewPostedPrice

func NewPostedPrice(marketID string, oracle sdk.AccAddress, price sdk.Dec, expiry time.Time) PostedPrice

NewPostedPrice returns a new PostedPrice

func (*PostedPrice) Descriptor

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

func (*PostedPrice) Equal

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

func (*PostedPrice) GetExpiry

func (m *PostedPrice) GetExpiry() time.Time

func (*PostedPrice) GetMarketID

func (m *PostedPrice) GetMarketID() string

func (*PostedPrice) GetOracleAddress

func (*PostedPrice) Marshal

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

func (*PostedPrice) MarshalTo

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

func (*PostedPrice) MarshalToSizedBuffer

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

func (*PostedPrice) ProtoMessage

func (*PostedPrice) ProtoMessage()

func (*PostedPrice) Reset

func (m *PostedPrice) Reset()

func (*PostedPrice) Size

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

func (*PostedPrice) String

func (m *PostedPrice) String() string

func (*PostedPrice) Unmarshal

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

func (PostedPrice) Validate

func (pp PostedPrice) Validate() error

Validate performs a basic check of a PostedPrice params.

func (*PostedPrice) VerboseEqual

func (this *PostedPrice) VerboseEqual(that interface{}) error

func (*PostedPrice) XXX_DiscardUnknown

func (m *PostedPrice) XXX_DiscardUnknown()

func (*PostedPrice) XXX_Marshal

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

func (*PostedPrice) XXX_Merge

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

func (*PostedPrice) XXX_Size

func (m *PostedPrice) XXX_Size() int

func (*PostedPrice) XXX_Unmarshal

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

type PostedPriceResponse

type PostedPriceResponse struct {
	MarketID      string                                 `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
	OracleAddress string                                 `protobuf:"bytes,2,opt,name=oracle_address,json=oracleAddress,proto3" json:"oracle_address,omitempty"`
	Price         github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
	Expiry        time.Time                              `protobuf:"bytes,4,opt,name=expiry,proto3,stdtime" json:"expiry"`
}

PostedPriceResponse defines a price for market posted by a specific oracle.

func NewPostedPriceResponse

func NewPostedPriceResponse(marketID string, oracle sdk.AccAddress, price sdk.Dec, expiry time.Time) PostedPriceResponse

NewPostedPrice returns a new PostedPrice

func (*PostedPriceResponse) Descriptor

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

func (*PostedPriceResponse) Equal

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

func (*PostedPriceResponse) GetExpiry

func (m *PostedPriceResponse) GetExpiry() time.Time

func (*PostedPriceResponse) GetMarketID

func (m *PostedPriceResponse) GetMarketID() string

func (*PostedPriceResponse) GetOracleAddress

func (m *PostedPriceResponse) GetOracleAddress() string

func (*PostedPriceResponse) Marshal

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

func (*PostedPriceResponse) MarshalTo

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

func (*PostedPriceResponse) MarshalToSizedBuffer

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

func (*PostedPriceResponse) ProtoMessage

func (*PostedPriceResponse) ProtoMessage()

func (*PostedPriceResponse) Reset

func (m *PostedPriceResponse) Reset()

func (*PostedPriceResponse) Size

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

func (*PostedPriceResponse) String

func (m *PostedPriceResponse) String() string

func (*PostedPriceResponse) Unmarshal

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

func (*PostedPriceResponse) VerboseEqual

func (this *PostedPriceResponse) VerboseEqual(that interface{}) error

func (*PostedPriceResponse) XXX_DiscardUnknown

func (m *PostedPriceResponse) XXX_DiscardUnknown()

func (*PostedPriceResponse) XXX_Marshal

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

func (*PostedPriceResponse) XXX_Merge

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

func (*PostedPriceResponse) XXX_Size

func (m *PostedPriceResponse) XXX_Size() int

func (*PostedPriceResponse) XXX_Unmarshal

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

type PostedPriceResponses

type PostedPriceResponses []PostedPriceResponse

PostedPriceResponses is a slice of PostedPriceResponse

type PostedPrices

type PostedPrices []PostedPrice

PostedPrices is a slice of PostedPrice

func (PostedPrices) Validate

func (pps PostedPrices) Validate() error

Validate checks if all the posted prices are valid and there are no duplicated entries.

type QueryClient

type QueryClient interface {
	// Params queries all parameters of the pricefeed module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Price queries price details based on a market
	Price(ctx context.Context, in *QueryPriceRequest, opts ...grpc.CallOption) (*QueryPriceResponse, error)
	// Prices queries all prices
	Prices(ctx context.Context, in *QueryPricesRequest, opts ...grpc.CallOption) (*QueryPricesResponse, error)
	// RawPrices queries all raw prices based on a market
	RawPrices(ctx context.Context, in *QueryRawPricesRequest, opts ...grpc.CallOption) (*QueryRawPricesResponse, error)
	// Oracles queries all oracles based on a market
	Oracles(ctx context.Context, in *QueryOraclesRequest, opts ...grpc.CallOption) (*QueryOraclesResponse, error)
	// Markets queries all markets
	Markets(ctx context.Context, in *QueryMarketsRequest, opts ...grpc.CallOption) (*QueryMarketsResponse, 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 QueryMarketsRequest

type QueryMarketsRequest struct {
}

QueryMarketsRequest is the request type for the Query/Markets RPC method.

func (*QueryMarketsRequest) Descriptor

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

func (*QueryMarketsRequest) Equal

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

func (*QueryMarketsRequest) Marshal

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

func (*QueryMarketsRequest) MarshalTo

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

func (*QueryMarketsRequest) MarshalToSizedBuffer

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

func (*QueryMarketsRequest) ProtoMessage

func (*QueryMarketsRequest) ProtoMessage()

func (*QueryMarketsRequest) Reset

func (m *QueryMarketsRequest) Reset()

func (*QueryMarketsRequest) Size

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

func (*QueryMarketsRequest) String

func (m *QueryMarketsRequest) String() string

func (*QueryMarketsRequest) Unmarshal

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

func (*QueryMarketsRequest) VerboseEqual

func (this *QueryMarketsRequest) VerboseEqual(that interface{}) error

func (*QueryMarketsRequest) XXX_DiscardUnknown

func (m *QueryMarketsRequest) XXX_DiscardUnknown()

func (*QueryMarketsRequest) XXX_Marshal

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

func (*QueryMarketsRequest) XXX_Merge

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

func (*QueryMarketsRequest) XXX_Size

func (m *QueryMarketsRequest) XXX_Size() int

func (*QueryMarketsRequest) XXX_Unmarshal

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

type QueryMarketsResponse

type QueryMarketsResponse struct {
	// List of markets
	Markets MarketResponses `protobuf:"bytes,1,rep,name=markets,proto3,castrepeated=MarketResponses" json:"markets"`
}

QueryMarketsResponse is the response type for the Query/Markets RPC method.

func (*QueryMarketsResponse) Descriptor

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

func (*QueryMarketsResponse) Equal

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

func (*QueryMarketsResponse) Marshal

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

func (*QueryMarketsResponse) MarshalTo

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

func (*QueryMarketsResponse) MarshalToSizedBuffer

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

func (*QueryMarketsResponse) ProtoMessage

func (*QueryMarketsResponse) ProtoMessage()

func (*QueryMarketsResponse) Reset

func (m *QueryMarketsResponse) Reset()

func (*QueryMarketsResponse) Size

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

func (*QueryMarketsResponse) String

func (m *QueryMarketsResponse) String() string

func (*QueryMarketsResponse) Unmarshal

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

func (*QueryMarketsResponse) VerboseEqual

func (this *QueryMarketsResponse) VerboseEqual(that interface{}) error

func (*QueryMarketsResponse) XXX_DiscardUnknown

func (m *QueryMarketsResponse) XXX_DiscardUnknown()

func (*QueryMarketsResponse) XXX_Marshal

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

func (*QueryMarketsResponse) XXX_Merge

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

func (*QueryMarketsResponse) XXX_Size

func (m *QueryMarketsResponse) XXX_Size() int

func (*QueryMarketsResponse) XXX_Unmarshal

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

type QueryOraclesRequest

type QueryOraclesRequest struct {
	MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
}

QueryOraclesRequest is the request type for the Query/Oracles RPC method.

func (*QueryOraclesRequest) Descriptor

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

func (*QueryOraclesRequest) Equal

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

func (*QueryOraclesRequest) Marshal

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

func (*QueryOraclesRequest) MarshalTo

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

func (*QueryOraclesRequest) MarshalToSizedBuffer

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

func (*QueryOraclesRequest) ProtoMessage

func (*QueryOraclesRequest) ProtoMessage()

func (*QueryOraclesRequest) Reset

func (m *QueryOraclesRequest) Reset()

func (*QueryOraclesRequest) Size

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

func (*QueryOraclesRequest) String

func (m *QueryOraclesRequest) String() string

func (*QueryOraclesRequest) Unmarshal

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

func (*QueryOraclesRequest) VerboseEqual

func (this *QueryOraclesRequest) VerboseEqual(that interface{}) error

func (*QueryOraclesRequest) XXX_DiscardUnknown

func (m *QueryOraclesRequest) XXX_DiscardUnknown()

func (*QueryOraclesRequest) XXX_Marshal

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

func (*QueryOraclesRequest) XXX_Merge

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

func (*QueryOraclesRequest) XXX_Size

func (m *QueryOraclesRequest) XXX_Size() int

func (*QueryOraclesRequest) XXX_Unmarshal

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

type QueryOraclesResponse

type QueryOraclesResponse struct {
	// List of oracle addresses
	Oracles []string `protobuf:"bytes,1,rep,name=oracles,proto3" json:"oracles,omitempty"`
}

QueryOraclesResponse is the response type for the Query/Oracles RPC method.

func (*QueryOraclesResponse) Descriptor

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

func (*QueryOraclesResponse) Equal

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

func (*QueryOraclesResponse) Marshal

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

func (*QueryOraclesResponse) MarshalTo

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

func (*QueryOraclesResponse) MarshalToSizedBuffer

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

func (*QueryOraclesResponse) ProtoMessage

func (*QueryOraclesResponse) ProtoMessage()

func (*QueryOraclesResponse) Reset

func (m *QueryOraclesResponse) Reset()

func (*QueryOraclesResponse) Size

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

func (*QueryOraclesResponse) String

func (m *QueryOraclesResponse) String() string

func (*QueryOraclesResponse) Unmarshal

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

func (*QueryOraclesResponse) VerboseEqual

func (this *QueryOraclesResponse) VerboseEqual(that interface{}) error

func (*QueryOraclesResponse) XXX_DiscardUnknown

func (m *QueryOraclesResponse) XXX_DiscardUnknown()

func (*QueryOraclesResponse) XXX_Marshal

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

func (*QueryOraclesResponse) XXX_Merge

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

func (*QueryOraclesResponse) XXX_Size

func (m *QueryOraclesResponse) XXX_Size() int

func (*QueryOraclesResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest defines the request type for querying x/pricefeed parameters.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Equal

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) VerboseEqual

func (this *QueryParamsRequest) VerboseEqual(that interface{}) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse defines the response type for querying x/pricefeed parameters.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) Equal

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

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) VerboseEqual

func (this *QueryParamsResponse) VerboseEqual(that interface{}) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryPriceRequest

type QueryPriceRequest struct {
	MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
}

QueryPriceRequest is the request type for the Query/PriceRequest RPC method.

func (*QueryPriceRequest) Descriptor

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

func (*QueryPriceRequest) Equal

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

func (*QueryPriceRequest) Marshal

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

func (*QueryPriceRequest) MarshalTo

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

func (*QueryPriceRequest) MarshalToSizedBuffer

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

func (*QueryPriceRequest) ProtoMessage

func (*QueryPriceRequest) ProtoMessage()

func (*QueryPriceRequest) Reset

func (m *QueryPriceRequest) Reset()

func (*QueryPriceRequest) Size

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

func (*QueryPriceRequest) String

func (m *QueryPriceRequest) String() string

func (*QueryPriceRequest) Unmarshal

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

func (*QueryPriceRequest) VerboseEqual

func (this *QueryPriceRequest) VerboseEqual(that interface{}) error

func (*QueryPriceRequest) XXX_DiscardUnknown

func (m *QueryPriceRequest) XXX_DiscardUnknown()

func (*QueryPriceRequest) XXX_Marshal

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

func (*QueryPriceRequest) XXX_Merge

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

func (*QueryPriceRequest) XXX_Size

func (m *QueryPriceRequest) XXX_Size() int

func (*QueryPriceRequest) XXX_Unmarshal

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

type QueryPriceResponse

type QueryPriceResponse struct {
	Price CurrentPriceResponse `protobuf:"bytes,1,opt,name=price,proto3" json:"price"`
}

QueryPriceResponse is the response type for the Query/Prices RPC method.

func (*QueryPriceResponse) Descriptor

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

func (*QueryPriceResponse) Equal

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

func (*QueryPriceResponse) Marshal

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

func (*QueryPriceResponse) MarshalTo

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

func (*QueryPriceResponse) MarshalToSizedBuffer

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

func (*QueryPriceResponse) ProtoMessage

func (*QueryPriceResponse) ProtoMessage()

func (*QueryPriceResponse) Reset

func (m *QueryPriceResponse) Reset()

func (*QueryPriceResponse) Size

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

func (*QueryPriceResponse) String

func (m *QueryPriceResponse) String() string

func (*QueryPriceResponse) Unmarshal

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

func (*QueryPriceResponse) VerboseEqual

func (this *QueryPriceResponse) VerboseEqual(that interface{}) error

func (*QueryPriceResponse) XXX_DiscardUnknown

func (m *QueryPriceResponse) XXX_DiscardUnknown()

func (*QueryPriceResponse) XXX_Marshal

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

func (*QueryPriceResponse) XXX_Merge

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

func (*QueryPriceResponse) XXX_Size

func (m *QueryPriceResponse) XXX_Size() int

func (*QueryPriceResponse) XXX_Unmarshal

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

type QueryPricesRequest

type QueryPricesRequest struct {
}

QueryPricesRequest is the request type for the Query/Prices RPC method.

func (*QueryPricesRequest) Descriptor

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

func (*QueryPricesRequest) Equal

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

func (*QueryPricesRequest) Marshal

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

func (*QueryPricesRequest) MarshalTo

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

func (*QueryPricesRequest) MarshalToSizedBuffer

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

func (*QueryPricesRequest) ProtoMessage

func (*QueryPricesRequest) ProtoMessage()

func (*QueryPricesRequest) Reset

func (m *QueryPricesRequest) Reset()

func (*QueryPricesRequest) Size

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

func (*QueryPricesRequest) String

func (m *QueryPricesRequest) String() string

func (*QueryPricesRequest) Unmarshal

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

func (*QueryPricesRequest) VerboseEqual

func (this *QueryPricesRequest) VerboseEqual(that interface{}) error

func (*QueryPricesRequest) XXX_DiscardUnknown

func (m *QueryPricesRequest) XXX_DiscardUnknown()

func (*QueryPricesRequest) XXX_Marshal

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

func (*QueryPricesRequest) XXX_Merge

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

func (*QueryPricesRequest) XXX_Size

func (m *QueryPricesRequest) XXX_Size() int

func (*QueryPricesRequest) XXX_Unmarshal

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

type QueryPricesResponse

type QueryPricesResponse struct {
	Prices CurrentPriceResponses `protobuf:"bytes,1,rep,name=prices,proto3,castrepeated=CurrentPriceResponses" json:"prices"`
}

QueryPricesResponse is the response type for the Query/Prices RPC method.

func (*QueryPricesResponse) Descriptor

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

func (*QueryPricesResponse) Equal

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

func (*QueryPricesResponse) Marshal

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

func (*QueryPricesResponse) MarshalTo

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

func (*QueryPricesResponse) MarshalToSizedBuffer

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

func (*QueryPricesResponse) ProtoMessage

func (*QueryPricesResponse) ProtoMessage()

func (*QueryPricesResponse) Reset

func (m *QueryPricesResponse) Reset()

func (*QueryPricesResponse) Size

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

func (*QueryPricesResponse) String

func (m *QueryPricesResponse) String() string

func (*QueryPricesResponse) Unmarshal

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

func (*QueryPricesResponse) VerboseEqual

func (this *QueryPricesResponse) VerboseEqual(that interface{}) error

func (*QueryPricesResponse) XXX_DiscardUnknown

func (m *QueryPricesResponse) XXX_DiscardUnknown()

func (*QueryPricesResponse) XXX_Marshal

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

func (*QueryPricesResponse) XXX_Merge

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

func (*QueryPricesResponse) XXX_Size

func (m *QueryPricesResponse) XXX_Size() int

func (*QueryPricesResponse) XXX_Unmarshal

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

type QueryRawPricesRequest

type QueryRawPricesRequest struct {
	MarketId string `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"`
}

QueryRawPricesRequest is the request type for the Query/RawPrices RPC method.

func (*QueryRawPricesRequest) Descriptor

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

func (*QueryRawPricesRequest) Equal

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

func (*QueryRawPricesRequest) Marshal

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

func (*QueryRawPricesRequest) MarshalTo

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

func (*QueryRawPricesRequest) MarshalToSizedBuffer

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

func (*QueryRawPricesRequest) ProtoMessage

func (*QueryRawPricesRequest) ProtoMessage()

func (*QueryRawPricesRequest) Reset

func (m *QueryRawPricesRequest) Reset()

func (*QueryRawPricesRequest) Size

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

func (*QueryRawPricesRequest) String

func (m *QueryRawPricesRequest) String() string

func (*QueryRawPricesRequest) Unmarshal

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

func (*QueryRawPricesRequest) VerboseEqual

func (this *QueryRawPricesRequest) VerboseEqual(that interface{}) error

func (*QueryRawPricesRequest) XXX_DiscardUnknown

func (m *QueryRawPricesRequest) XXX_DiscardUnknown()

func (*QueryRawPricesRequest) XXX_Marshal

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

func (*QueryRawPricesRequest) XXX_Merge

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

func (*QueryRawPricesRequest) XXX_Size

func (m *QueryRawPricesRequest) XXX_Size() int

func (*QueryRawPricesRequest) XXX_Unmarshal

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

type QueryRawPricesResponse

type QueryRawPricesResponse struct {
	RawPrices PostedPriceResponses `protobuf:"bytes,1,rep,name=raw_prices,json=rawPrices,proto3,castrepeated=PostedPriceResponses" json:"raw_prices"`
}

QueryRawPricesResponse is the response type for the Query/RawPrices RPC method.

func (*QueryRawPricesResponse) Descriptor

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

func (*QueryRawPricesResponse) Equal

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

func (*QueryRawPricesResponse) Marshal

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

func (*QueryRawPricesResponse) MarshalTo

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

func (*QueryRawPricesResponse) MarshalToSizedBuffer

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

func (*QueryRawPricesResponse) ProtoMessage

func (*QueryRawPricesResponse) ProtoMessage()

func (*QueryRawPricesResponse) Reset

func (m *QueryRawPricesResponse) Reset()

func (*QueryRawPricesResponse) Size

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

func (*QueryRawPricesResponse) String

func (m *QueryRawPricesResponse) String() string

func (*QueryRawPricesResponse) Unmarshal

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

func (*QueryRawPricesResponse) VerboseEqual

func (this *QueryRawPricesResponse) VerboseEqual(that interface{}) error

func (*QueryRawPricesResponse) XXX_DiscardUnknown

func (m *QueryRawPricesResponse) XXX_DiscardUnknown()

func (*QueryRawPricesResponse) XXX_Marshal

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

func (*QueryRawPricesResponse) XXX_Merge

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

func (*QueryRawPricesResponse) XXX_Size

func (m *QueryRawPricesResponse) XXX_Size() int

func (*QueryRawPricesResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params queries all parameters of the pricefeed module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Price queries price details based on a market
	Price(context.Context, *QueryPriceRequest) (*QueryPriceResponse, error)
	// Prices queries all prices
	Prices(context.Context, *QueryPricesRequest) (*QueryPricesResponse, error)
	// RawPrices queries all raw prices based on a market
	RawPrices(context.Context, *QueryRawPricesRequest) (*QueryRawPricesResponse, error)
	// Oracles queries all oracles based on a market
	Oracles(context.Context, *QueryOraclesRequest) (*QueryOraclesResponse, error)
	// Markets queries all markets
	Markets(context.Context, *QueryMarketsRequest) (*QueryMarketsResponse, error)
}

QueryServer is the server API for Query service.

type QueryWithMarketIDParams

type QueryWithMarketIDParams struct {
	MarketID string
}

QueryWithMarketIDParams fields for querying information from a specific market

func NewQueryWithMarketIDParams

func NewQueryWithMarketIDParams(marketID string) QueryWithMarketIDParams

NewQueryWithMarketIDParams creates a new instance of QueryWithMarketIDParams

type SortDecs

type SortDecs []sdk.Dec

SortDecs provides the interface needed to sort sdk.Dec slices

func (SortDecs) Len

func (a SortDecs) Len() int

func (SortDecs) Less

func (a SortDecs) Less(i, j int) bool

func (SortDecs) Swap

func (a SortDecs) Swap(i, j int)

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) PostPrice

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Markets

func (*UnimplementedQueryServer) Oracles

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Price

func (*UnimplementedQueryServer) Prices

func (*UnimplementedQueryServer) RawPrices

Jump to

Keyboard shortcuts

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