types

package
v0.15.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "pricefeed"

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

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

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

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_pricefeed"
)
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 DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

View Source
const (
	ProposalTypeAddOracle = "AddOracle"
)

Variables

View Source
var (
	ErrSample = sdkerrors.Register(ModuleName, 1100, "Sample error")
	// 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")
	// ErrInvalidPair error for posted price messages for invalid markets
	ErrInvalidPair = sdkerrors.Register(ModuleName, 5, "Pair 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")
	// ErrNoValidTWAP error for not found asset
	ErrNoValidTWAP = sdkerrors.Register(ModuleName, 8, "TWA price not found")
)

x/pricefeed module sentinel errors

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 (
	ErrInvalidLengthGov        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGov          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInvalidLengthState        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowState          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group")
)

Parameter keys

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

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable Key declaration for parameters

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgHandler added in v0.1.0

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

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

func RegisterMsgHandlerClient added in v0.1.0

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

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

func RegisterMsgHandlerFromEndpoint added in v0.1.0

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

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

func RegisterMsgHandlerServer added in v0.1.0

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.

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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type ActivePairMarshaler added in v0.5.2

type ActivePairMarshaler struct {
	IsActive bool `protobuf:"varint,1,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
}

ActivePairMarshaler is a codec.ProtoMarshaler for the "IsActive" status of a pair in the ActivePairState sdk.KVStore.

func (*ActivePairMarshaler) Descriptor added in v0.5.2

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

func (*ActivePairMarshaler) Equal added in v0.5.2

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

func (*ActivePairMarshaler) GetIsActive added in v0.5.2

func (m *ActivePairMarshaler) GetIsActive() bool

func (*ActivePairMarshaler) Marshal added in v0.5.2

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

func (*ActivePairMarshaler) MarshalTo added in v0.5.2

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

func (*ActivePairMarshaler) MarshalToSizedBuffer added in v0.5.2

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

func (*ActivePairMarshaler) ProtoMessage added in v0.5.2

func (*ActivePairMarshaler) ProtoMessage()

func (*ActivePairMarshaler) Reset added in v0.5.2

func (m *ActivePairMarshaler) Reset()

func (*ActivePairMarshaler) Size added in v0.5.2

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

func (*ActivePairMarshaler) String added in v0.5.2

func (m *ActivePairMarshaler) String() string

func (*ActivePairMarshaler) Unmarshal added in v0.5.2

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

func (*ActivePairMarshaler) VerboseEqual added in v0.15.0

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

func (*ActivePairMarshaler) XXX_DiscardUnknown added in v0.5.2

func (m *ActivePairMarshaler) XXX_DiscardUnknown()

func (*ActivePairMarshaler) XXX_Marshal added in v0.5.2

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

func (*ActivePairMarshaler) XXX_Merge added in v0.5.2

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

func (*ActivePairMarshaler) XXX_Size added in v0.5.2

func (m *ActivePairMarshaler) XXX_Size() int

func (*ActivePairMarshaler) XXX_Unmarshal added in v0.5.2

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

type AddOracleProposal added in v0.6.0

type AddOracleProposal struct {
	Title       string   `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Oracles     []string `protobuf:"bytes,3,rep,name=oracles,proto3" json:"oracles,omitempty" yaml:"oracles"`
	Pairs       []string `protobuf:"bytes,4,rep,name=pairs,proto3" json:"pairs,omitempty" yaml:"pairs"`
}

func NewAddOracleProposal added in v0.6.0

func NewAddOracleProposal(
	title string, description string, oracles []string, pairs []string,
) *AddOracleProposal

func (*AddOracleProposal) Descriptor added in v0.6.0

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

func (*AddOracleProposal) GetDescription added in v0.6.0

func (m *AddOracleProposal) GetDescription() string

func (*AddOracleProposal) GetOracles added in v0.6.0

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

func (*AddOracleProposal) GetPairs added in v0.6.0

func (m *AddOracleProposal) GetPairs() []string

func (*AddOracleProposal) GetTitle added in v0.6.0

func (m *AddOracleProposal) GetTitle() string

func (*AddOracleProposal) Marshal added in v0.6.0

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

func (*AddOracleProposal) MarshalTo added in v0.6.0

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

func (*AddOracleProposal) MarshalToSizedBuffer added in v0.6.0

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

func (*AddOracleProposal) ProposalRoute added in v0.6.0

func (m *AddOracleProposal) ProposalRoute() string

func (*AddOracleProposal) ProposalType added in v0.6.0

func (m *AddOracleProposal) ProposalType() string

func (*AddOracleProposal) ProtoMessage added in v0.6.0

func (*AddOracleProposal) ProtoMessage()

func (*AddOracleProposal) Reset added in v0.6.0

func (m *AddOracleProposal) Reset()

func (*AddOracleProposal) Size added in v0.6.0

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

func (*AddOracleProposal) String added in v0.6.0

func (m *AddOracleProposal) String() string

func (*AddOracleProposal) Unmarshal added in v0.6.0

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

func (*AddOracleProposal) Validate added in v0.6.0

func (m *AddOracleProposal) Validate() error

func (*AddOracleProposal) ValidateBasic added in v0.6.0

func (m *AddOracleProposal) ValidateBasic() error

func (*AddOracleProposal) XXX_DiscardUnknown added in v0.6.0

func (m *AddOracleProposal) XXX_DiscardUnknown()

func (*AddOracleProposal) XXX_Marshal added in v0.6.0

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

func (*AddOracleProposal) XXX_Merge added in v0.6.0

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

func (*AddOracleProposal) XXX_Size added in v0.6.0

func (m *AddOracleProposal) XXX_Size() int

func (*AddOracleProposal) XXX_Unmarshal added in v0.6.0

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

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type CurrentPrice

type CurrentPrice struct {
	PairID string                                 `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_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 the current price for an asset pair in the pricefeed module.

func NewCurrentPrice

func NewCurrentPrice(token0 string, token1 string, price sdk.Dec) CurrentPrice

NewCurrentPrice returns an instance of CurrentPrice Args:

token0 (string):
token1 (string):
price (sdk.Dec): Price in units of token1 / token0

Returns:

CurrentPrice: Price for the asset pair.

func (*CurrentPrice) Descriptor

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

func (*CurrentPrice) Equal

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

func (*CurrentPrice) GetPairID

func (m *CurrentPrice) GetPairID() 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 {
	PairID string `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	// most current price of the trading pair
	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"`
	// twap of the trading pair
	Twap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=twap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"twap"`
}

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

func (*CurrentPriceResponse) Descriptor

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

func (*CurrentPriceResponse) Equal

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

func (*CurrentPriceResponse) GetPairID

func (m *CurrentPriceResponse) GetPairID() 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 CurrentTWAP added in v0.1.0

type CurrentTWAP struct {
	PairID      string                                 `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	Numerator   github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=numerator,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"numerator"`
	Denominator github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=denominator,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"denominator"`
	Price       github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
}

CurrentTWAP states defines the numerator and denominator for the TWAP calculation

func (*CurrentTWAP) Descriptor added in v0.1.0

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

func (*CurrentTWAP) Equal added in v0.1.0

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

func (*CurrentTWAP) GetPairID added in v0.1.0

func (m *CurrentTWAP) GetPairID() string

func (*CurrentTWAP) Marshal added in v0.1.0

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

func (*CurrentTWAP) MarshalTo added in v0.1.0

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

func (*CurrentTWAP) MarshalToSizedBuffer added in v0.1.0

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

func (*CurrentTWAP) ProtoMessage added in v0.1.0

func (*CurrentTWAP) ProtoMessage()

func (*CurrentTWAP) Reset added in v0.1.0

func (m *CurrentTWAP) Reset()

func (*CurrentTWAP) Size added in v0.1.0

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

func (*CurrentTWAP) String added in v0.1.0

func (m *CurrentTWAP) String() string

func (*CurrentTWAP) Unmarshal added in v0.1.0

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

func (*CurrentTWAP) VerboseEqual added in v0.1.0

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

func (*CurrentTWAP) XXX_DiscardUnknown added in v0.1.0

func (m *CurrentTWAP) XXX_DiscardUnknown()

func (*CurrentTWAP) XXX_Marshal added in v0.1.0

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

func (*CurrentTWAP) XXX_Merge added in v0.1.0

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

func (*CurrentTWAP) XXX_Size added in v0.1.0

func (m *CurrentTWAP) XXX_Size() int

func (*CurrentTWAP) XXX_Unmarshal added in v0.1.0

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

type EventOracleUpdatePrice added in v0.5.0

type EventOracleUpdatePrice struct {
	PairId    string                                 `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	Oracle    string                                 `protobuf:"bytes,2,opt,name=oracle,proto3" json:"oracle,omitempty"`
	PairPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
	Expiry    time.Time                              `protobuf:"bytes,4,opt,name=expiry,proto3,stdtime" json:"expiry"`
}

func (*EventOracleUpdatePrice) Descriptor added in v0.5.0

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

func (*EventOracleUpdatePrice) Equal added in v0.5.0

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

func (*EventOracleUpdatePrice) GetExpiry added in v0.5.0

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

func (*EventOracleUpdatePrice) GetOracle added in v0.5.0

func (m *EventOracleUpdatePrice) GetOracle() string

func (*EventOracleUpdatePrice) GetPairId added in v0.5.0

func (m *EventOracleUpdatePrice) GetPairId() string

func (*EventOracleUpdatePrice) Marshal added in v0.5.0

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

func (*EventOracleUpdatePrice) MarshalTo added in v0.5.0

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

func (*EventOracleUpdatePrice) MarshalToSizedBuffer added in v0.5.0

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

func (*EventOracleUpdatePrice) ProtoMessage added in v0.5.0

func (*EventOracleUpdatePrice) ProtoMessage()

func (*EventOracleUpdatePrice) Reset added in v0.5.0

func (m *EventOracleUpdatePrice) Reset()

func (*EventOracleUpdatePrice) Size added in v0.5.0

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

func (*EventOracleUpdatePrice) String added in v0.5.0

func (m *EventOracleUpdatePrice) String() string

func (*EventOracleUpdatePrice) Unmarshal added in v0.5.0

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

func (*EventOracleUpdatePrice) VerboseEqual added in v0.5.0

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

func (*EventOracleUpdatePrice) XXX_DiscardUnknown added in v0.5.0

func (m *EventOracleUpdatePrice) XXX_DiscardUnknown()

func (*EventOracleUpdatePrice) XXX_Marshal added in v0.5.0

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

func (*EventOracleUpdatePrice) XXX_Merge added in v0.5.0

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

func (*EventOracleUpdatePrice) XXX_Size added in v0.5.0

func (m *EventOracleUpdatePrice) XXX_Size() int

func (*EventOracleUpdatePrice) XXX_Unmarshal added in v0.5.0

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

type EventPairPriceUpdated added in v0.5.0

type EventPairPriceUpdated struct {
	PairId    string                                 `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	PairPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
}

func (*EventPairPriceUpdated) Descriptor added in v0.5.0

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

func (*EventPairPriceUpdated) Equal added in v0.5.0

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

func (*EventPairPriceUpdated) GetPairId added in v0.5.0

func (m *EventPairPriceUpdated) GetPairId() string

func (*EventPairPriceUpdated) Marshal added in v0.5.0

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

func (*EventPairPriceUpdated) MarshalTo added in v0.5.0

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

func (*EventPairPriceUpdated) MarshalToSizedBuffer added in v0.5.0

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

func (*EventPairPriceUpdated) ProtoMessage added in v0.5.0

func (*EventPairPriceUpdated) ProtoMessage()

func (*EventPairPriceUpdated) Reset added in v0.5.0

func (m *EventPairPriceUpdated) Reset()

func (*EventPairPriceUpdated) Size added in v0.5.0

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

func (*EventPairPriceUpdated) String added in v0.5.0

func (m *EventPairPriceUpdated) String() string

func (*EventPairPriceUpdated) Unmarshal added in v0.5.0

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

func (*EventPairPriceUpdated) VerboseEqual added in v0.5.0

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

func (*EventPairPriceUpdated) XXX_DiscardUnknown added in v0.5.0

func (m *EventPairPriceUpdated) XXX_DiscardUnknown()

func (*EventPairPriceUpdated) XXX_Marshal added in v0.5.0

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

func (*EventPairPriceUpdated) XXX_Merge added in v0.5.0

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

func (*EventPairPriceUpdated) XXX_Size added in v0.5.0

func (m *EventPairPriceUpdated) XXX_Size() int

func (*EventPairPriceUpdated) XXX_Unmarshal added in v0.5.0

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

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"`
	GenesisOracles []string     `protobuf:"bytes,3,rep,name=genesis_oracles,json=genesisOracles,proto3" json:"genesis_oracles,omitempty"`
}

GenesisState defines the pricefeed module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func GetGenesisStateFromAppState added in v0.14.0

func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState

func NewGenesisState

func NewGenesisState(p Params, postedPrices []PostedPrice) *GenesisState

NewGenesisState creates a new genesis state for the pricefeed module

func (*GenesisState) Descriptor

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

func (*GenesisState) GetGenesisOracles added in v0.5.2

func (m *GenesisState) GetGenesisOracles() []string

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 genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type Market added in v0.6.0

type Market struct {
	PairID  string   `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	Oracles []string `protobuf:"bytes,2,rep,name=oracles,proto3" json:"oracles,omitempty"`
	Active  bool     `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"`
}

Market defines an asset in the pricefeed.

func NewMarket added in v0.6.0

func NewMarket(pair common.AssetPair, oracles []sdk.AccAddress, active bool) Market

func (*Market) Descriptor added in v0.6.0

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

func (*Market) Equal added in v0.6.0

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

func (*Market) GetActive added in v0.6.0

func (m *Market) GetActive() bool

func (*Market) GetOracles added in v0.6.0

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

func (*Market) GetPairID added in v0.6.0

func (m *Market) GetPairID() string

func (*Market) Marshal added in v0.6.0

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

func (*Market) MarshalTo added in v0.6.0

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

func (*Market) MarshalToSizedBuffer added in v0.6.0

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

func (*Market) ProtoMessage added in v0.6.0

func (*Market) ProtoMessage()

func (*Market) Reset added in v0.6.0

func (m *Market) Reset()

func (*Market) Size added in v0.6.0

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

func (*Market) String added in v0.6.0

func (m *Market) String() string

func (*Market) Unmarshal added in v0.6.0

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

func (*Market) VerboseEqual added in v0.6.0

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

func (*Market) XXX_DiscardUnknown added in v0.6.0

func (m *Market) XXX_DiscardUnknown()

func (*Market) XXX_Marshal added in v0.6.0

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

func (*Market) XXX_Merge added in v0.6.0

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

func (*Market) XXX_Size added in v0.6.0

func (m *Market) XXX_Size() int

func (*Market) XXX_Unmarshal added in v0.6.0

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

type Markets added in v0.6.0

type Markets []Market

Markets defines the markets

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 {
	// From: address of oracle
	Oracle string `protobuf:"bytes,1,opt,name=oracle,proto3" json:"oracle,omitempty"`
	// Token0: denominator unit of the price, a.k.a. quote asset
	Token0 string `protobuf:"bytes,2,opt,name=token0,proto3" json:"token0,omitempty"`
	// Token1: numerator unit of price, a.k.a. base asset
	Token1 string `protobuf:"bytes,3,opt,name=token1,proto3" json:"token1,omitempty"`
	// Price: Price of the trading pair in units of token1 / token0.
	Price  github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
	Expiry time.Time                              `protobuf:"bytes,5,opt,name=expiry,proto3,stdtime" json:"expiry"`
}

MsgPostPrice represents a method for creating a new post price

func NewMsgPostPrice

func NewMsgPostPrice(creator string, token0 string, token1 string, price sdk.Dec, expiry time.Time) *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

func (*MsgPostPrice) GetSigners

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

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

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

func (*MsgPostPrice) Unmarshal

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

func (*MsgPostPrice) ValidateBasic

func (msg *MsgPostPrice) ValidateBasic() error

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 OraclesMarshaler added in v0.5.2

type OraclesMarshaler struct {
	Oracles []github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,rep,name=oracles,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"oracles,omitempty"`
}

OraclesMarshaler is a codec.ProtoMarshaler for an oracles array in the OraclesState sdk.KVStore.

func (*OraclesMarshaler) Descriptor added in v0.5.2

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

func (*OraclesMarshaler) Equal added in v0.5.2

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

func (*OraclesMarshaler) GetOracles added in v0.5.2

func (*OraclesMarshaler) Marshal added in v0.5.2

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

func (*OraclesMarshaler) MarshalTo added in v0.5.2

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

func (*OraclesMarshaler) MarshalToSizedBuffer added in v0.5.2

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

func (*OraclesMarshaler) ProtoMessage added in v0.5.2

func (*OraclesMarshaler) ProtoMessage()

func (*OraclesMarshaler) Reset added in v0.5.2

func (m *OraclesMarshaler) Reset()

func (*OraclesMarshaler) Size added in v0.5.2

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

func (*OraclesMarshaler) String added in v0.5.2

func (m *OraclesMarshaler) String() string

func (*OraclesMarshaler) Unmarshal added in v0.5.2

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

func (*OraclesMarshaler) VerboseEqual added in v0.15.0

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

func (*OraclesMarshaler) XXX_DiscardUnknown added in v0.5.2

func (m *OraclesMarshaler) XXX_DiscardUnknown()

func (*OraclesMarshaler) XXX_Marshal added in v0.5.2

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

func (*OraclesMarshaler) XXX_Merge added in v0.5.2

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

func (*OraclesMarshaler) XXX_Size added in v0.5.2

func (m *OraclesMarshaler) XXX_Size() int

func (*OraclesMarshaler) XXX_Unmarshal added in v0.5.2

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

type Params

type Params struct {
	// Pairs is the list of valid trading pairs for the module.
	// Add new trading pairs
	Pairs []common.AssetPair `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"`
	// amount of time to look back for TWAP calculations
	TwapLookbackWindow time.Duration `` /* 157-byte string literal not displayed */
}

Params defines the parameters for the x/pricefeed module.

func DefaultParams

func DefaultParams() Params

DefaultParams default params for pricefeed

func NewParams

func NewParams(
	pairs common.AssetPairs,
	twapLookbackWindow time.Duration,
) 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) GetPairs

func (m *Params) GetPairs() []common.AssetPair

func (*Params) GetTwapLookbackWindow added in v0.12.0

func (m *Params) GetTwapLookbackWindow() time.Duration

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 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 {
	PairID string                                 `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	Oracle string                                 `protobuf:"bytes,2,opt,name=oracle,proto3" json:"oracle,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"`
}

PostedPrice defines a price for an asset pair posted by a specific oracle.

func NewPostedPrice

func NewPostedPrice(pair common.AssetPair, 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) GetOracle added in v0.5.2

func (m *PostedPrice) GetOracle() string

func (*PostedPrice) GetPairID

func (m *PostedPrice) GetPairID() string

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 {
	PairID        string                                 `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_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 'PairID' posted by a specific oracle.

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

func (m *PostedPriceResponse) GetOracleAddress() string

func (*PostedPriceResponse) GetPairID

func (m *PostedPriceResponse) GetPairID() 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 PriceSnapshot added in v0.12.0

type PriceSnapshot struct {
	// the token pair
	PairId string `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	// the median prices of all oracles
	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"`
	// milliseconds since unix epoch
	TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
}

a snapshot of the pricefeed oracle's median price at a given point in time

func (*PriceSnapshot) Descriptor added in v0.12.0

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

func (*PriceSnapshot) Equal added in v0.12.0

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

func (*PriceSnapshot) GetPairId added in v0.12.0

func (m *PriceSnapshot) GetPairId() string

func (*PriceSnapshot) GetTimestampMs added in v0.12.0

func (m *PriceSnapshot) GetTimestampMs() int64

func (*PriceSnapshot) Marshal added in v0.12.0

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

func (*PriceSnapshot) MarshalTo added in v0.12.0

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

func (*PriceSnapshot) MarshalToSizedBuffer added in v0.12.0

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

func (*PriceSnapshot) ProtoMessage added in v0.12.0

func (*PriceSnapshot) ProtoMessage()

func (*PriceSnapshot) Reset added in v0.12.0

func (m *PriceSnapshot) Reset()

func (*PriceSnapshot) Size added in v0.12.0

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

func (*PriceSnapshot) String added in v0.12.0

func (m *PriceSnapshot) String() string

func (*PriceSnapshot) Unmarshal added in v0.12.0

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

func (*PriceSnapshot) VerboseEqual added in v0.12.0

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

func (*PriceSnapshot) XXX_DiscardUnknown added in v0.12.0

func (m *PriceSnapshot) XXX_DiscardUnknown()

func (*PriceSnapshot) XXX_Marshal added in v0.12.0

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

func (*PriceSnapshot) XXX_Merge added in v0.12.0

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

func (*PriceSnapshot) XXX_Size added in v0.12.0

func (m *PriceSnapshot) XXX_Size() int

func (*PriceSnapshot) XXX_Unmarshal added in v0.12.0

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

type QueryClient

type QueryClient interface {
	// QueryParams queries all parameters of the pricefeed module.
	QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// QueryPrice queries price details for a pair
	QueryPrice(ctx context.Context, in *QueryPriceRequest, opts ...grpc.CallOption) (*QueryPriceResponse, error)
	// QueryPrices queries all prices
	QueryPrices(ctx context.Context, in *QueryPricesRequest, opts ...grpc.CallOption) (*QueryPricesResponse, error)
	// QueryRawPrices queries all raw prices for an asset pair
	QueryRawPrices(ctx context.Context, in *QueryRawPricesRequest, opts ...grpc.CallOption) (*QueryRawPricesResponse, error)
	// QueryOracles queries all oracles for an asset pair
	QueryOracles(ctx context.Context, in *QueryOraclesRequest, opts ...grpc.CallOption) (*QueryOraclesResponse, error)
	// QueryMarkets queries all markets
	QueryMarkets(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 added in v0.6.0

type QueryMarketsRequest struct {
}

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

func (*QueryMarketsRequest) Descriptor added in v0.6.0

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

func (*QueryMarketsRequest) Equal added in v0.6.0

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

func (*QueryMarketsRequest) Marshal added in v0.6.0

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

func (*QueryMarketsRequest) MarshalTo added in v0.6.0

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

func (*QueryMarketsRequest) MarshalToSizedBuffer added in v0.6.0

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

func (*QueryMarketsRequest) ProtoMessage added in v0.6.0

func (*QueryMarketsRequest) ProtoMessage()

func (*QueryMarketsRequest) Reset added in v0.6.0

func (m *QueryMarketsRequest) Reset()

func (*QueryMarketsRequest) Size added in v0.6.0

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

func (*QueryMarketsRequest) String added in v0.6.0

func (m *QueryMarketsRequest) String() string

func (*QueryMarketsRequest) Unmarshal added in v0.6.0

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

func (*QueryMarketsRequest) VerboseEqual added in v0.6.0

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

func (*QueryMarketsRequest) XXX_DiscardUnknown added in v0.6.0

func (m *QueryMarketsRequest) XXX_DiscardUnknown()

func (*QueryMarketsRequest) XXX_Marshal added in v0.6.0

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

func (*QueryMarketsRequest) XXX_Merge added in v0.6.0

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

func (*QueryMarketsRequest) XXX_Size added in v0.6.0

func (m *QueryMarketsRequest) XXX_Size() int

func (*QueryMarketsRequest) XXX_Unmarshal added in v0.6.0

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

type QueryMarketsResponse added in v0.6.0

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

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

func (*QueryMarketsResponse) Descriptor added in v0.6.0

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

func (*QueryMarketsResponse) Equal added in v0.6.0

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

func (*QueryMarketsResponse) Marshal added in v0.6.0

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

func (*QueryMarketsResponse) MarshalTo added in v0.6.0

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

func (*QueryMarketsResponse) MarshalToSizedBuffer added in v0.6.0

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

func (*QueryMarketsResponse) ProtoMessage added in v0.6.0

func (*QueryMarketsResponse) ProtoMessage()

func (*QueryMarketsResponse) Reset added in v0.6.0

func (m *QueryMarketsResponse) Reset()

func (*QueryMarketsResponse) Size added in v0.6.0

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

func (*QueryMarketsResponse) String added in v0.6.0

func (m *QueryMarketsResponse) String() string

func (*QueryMarketsResponse) Unmarshal added in v0.6.0

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

func (*QueryMarketsResponse) VerboseEqual added in v0.6.0

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

func (*QueryMarketsResponse) XXX_DiscardUnknown added in v0.6.0

func (m *QueryMarketsResponse) XXX_DiscardUnknown()

func (*QueryMarketsResponse) XXX_Marshal added in v0.6.0

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

func (*QueryMarketsResponse) XXX_Merge added in v0.6.0

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

func (*QueryMarketsResponse) XXX_Size added in v0.6.0

func (m *QueryMarketsResponse) XXX_Size() int

func (*QueryMarketsResponse) XXX_Unmarshal added in v0.6.0

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

type QueryOraclesRequest

type QueryOraclesRequest struct {
	PairId string `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_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 {
	PairId string `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_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 {
	PairId string `protobuf:"bytes,1,opt,name=pair_id,json=pairId,proto3" json:"pair_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 {
	// QueryParams queries all parameters of the pricefeed module.
	QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// QueryPrice queries price details for a pair
	QueryPrice(context.Context, *QueryPriceRequest) (*QueryPriceResponse, error)
	// QueryPrices queries all prices
	QueryPrices(context.Context, *QueryPricesRequest) (*QueryPricesResponse, error)
	// QueryRawPrices queries all raw prices for an asset pair
	QueryRawPrices(context.Context, *QueryRawPricesRequest) (*QueryRawPricesResponse, error)
	// QueryOracles queries all oracles for an asset pair
	QueryOracles(context.Context, *QueryOraclesRequest) (*QueryOraclesResponse, error)
	// QueryMarkets queries all markets
	QueryMarkets(context.Context, *QueryMarketsRequest) (*QueryMarketsResponse, error)
}

QueryServer is the server API for Query service.

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) QueryMarkets added in v0.6.0

func (*UnimplementedQueryServer) QueryOracles added in v0.5.2

func (*UnimplementedQueryServer) QueryParams added in v0.5.2

func (*UnimplementedQueryServer) QueryPrice added in v0.5.2

func (*UnimplementedQueryServer) QueryPrices added in v0.5.2

func (*UnimplementedQueryServer) QueryRawPrices added in v0.5.2

Jump to

Keyboard shortcuts

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