types

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 35 Imported by: 4

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName is the name of module for external use.
	ModuleName = "oracle"
	// StoreKey is the top-level store key for the oracle module.
	StoreKey = ModuleName
)

Variables

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 (
	// CurrencyPairKeyPrefix is the key-prefix under which currency-pair state is stored.
	CurrencyPairKeyPrefix = collections.NewPrefix(0)

	// CurrencyPairIDKeyPrefix is the key-prefix under which the next currency-pairID is stored.
	CurrencyPairIDKeyPrefix = collections.NewPrefix(1)

	// UniqueIndexCurrencyPairKeyPrefix is the key-prefix under which the unique index on
	// currency-pairs is stored.
	UniqueIndexCurrencyPairKeyPrefix = collections.NewPrefix(2)

	// IDIndexCurrencyPairKeyPrefix is the key-prefix under which a currency-pair index.
	// is stored.
	IDIndexCurrencyPairKeyPrefix = collections.NewPrefix(3)

	// NumRemovesKeyPrefix is the key-prefix under which the number of removed CPs is stored.
	NumRemovesKeyPrefix = collections.NewPrefix(4)

	// NumCPsKeyPrefix is the key-prefix under which the number CPs is stored.
	NumCPsKeyPrefix = collections.NewPrefix(5)

	// CounterCodec is the collections.KeyCodec value used for the counter values.
	CounterCodec = codec.KeyToValueCodec[uint64](codec.NewUint64Key[uint64]())
)
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 (
	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 RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the x/oracle messages + message service w/ the InterfaceRegistry (registry).

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/oracle interfaces (messages) on the cdc. These types are used for amino serialization.

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 CurrencyPairAlreadyExistsError

type CurrencyPairAlreadyExistsError struct {
	// contains filtered or unexported fields
}

func (CurrencyPairAlreadyExistsError) Error

type CurrencyPairGenesis

type CurrencyPairGenesis struct {
	// The CurrencyPair to be added to module state
	CurrencyPair types.CurrencyPair `protobuf:"bytes,1,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair"`
	// A genesis price if one exists (note this will be empty, unless it results
	// from forking the state of this module)
	CurrencyPairPrice *QuotePrice `protobuf:"bytes,2,opt,name=currency_pair_price,json=currencyPairPrice,proto3" json:"currency_pair_price,omitempty"`
	// nonce is the nonce (number of updates) for the CP (same case as above,
	// likely 0 unless it results from fork of module)
	Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// id is the ID of the CurrencyPair
	Id uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
}

CurrencyPairGenesis is the information necessary for initialization of a CurrencyPair.

func (*CurrencyPairGenesis) Descriptor

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

func (*CurrencyPairGenesis) GetCurrencyPair

func (m *CurrencyPairGenesis) GetCurrencyPair() types.CurrencyPair

func (*CurrencyPairGenesis) GetCurrencyPairPrice

func (m *CurrencyPairGenesis) GetCurrencyPairPrice() *QuotePrice

func (*CurrencyPairGenesis) GetId

func (m *CurrencyPairGenesis) GetId() uint64

func (*CurrencyPairGenesis) GetNonce

func (m *CurrencyPairGenesis) GetNonce() uint64

func (*CurrencyPairGenesis) Marshal

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

func (*CurrencyPairGenesis) MarshalTo

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

func (*CurrencyPairGenesis) MarshalToSizedBuffer

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

func (*CurrencyPairGenesis) ProtoMessage

func (*CurrencyPairGenesis) ProtoMessage()

func (*CurrencyPairGenesis) Reset

func (m *CurrencyPairGenesis) Reset()

func (*CurrencyPairGenesis) Size

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

func (*CurrencyPairGenesis) String

func (m *CurrencyPairGenesis) String() string

func (*CurrencyPairGenesis) Unmarshal

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

func (*CurrencyPairGenesis) ValidateBasic

func (cpg *CurrencyPairGenesis) ValidateBasic() error

ValidateBasic validates that the CurrencyPair is valid, and performs any necessary validation on the genesis QuotePrice for the CurrencyPair. This fails if the CurrencyPair is invalid, or if the QuotePrice is nil, but the Nonce is non-nil.

func (*CurrencyPairGenesis) XXX_DiscardUnknown

func (m *CurrencyPairGenesis) XXX_DiscardUnknown()

func (*CurrencyPairGenesis) XXX_Marshal

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

func (*CurrencyPairGenesis) XXX_Merge

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

func (*CurrencyPairGenesis) XXX_Size

func (m *CurrencyPairGenesis) XXX_Size() int

func (*CurrencyPairGenesis) XXX_Unmarshal

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

type CurrencyPairMapping

type CurrencyPairMapping struct {
	// ID is the unique identifier for this currency pair string.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// CurrencyPair is the human-readable representation of the currency pair.
	CurrencyPair types.CurrencyPair `protobuf:"bytes,2,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair"`
}

func (*CurrencyPairMapping) Descriptor

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

func (*CurrencyPairMapping) GetCurrencyPair

func (m *CurrencyPairMapping) GetCurrencyPair() types.CurrencyPair

func (*CurrencyPairMapping) GetId

func (m *CurrencyPairMapping) GetId() uint64

func (*CurrencyPairMapping) Marshal

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

func (*CurrencyPairMapping) MarshalTo

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

func (*CurrencyPairMapping) MarshalToSizedBuffer

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

func (*CurrencyPairMapping) ProtoMessage

func (*CurrencyPairMapping) ProtoMessage()

func (*CurrencyPairMapping) Reset

func (m *CurrencyPairMapping) Reset()

func (*CurrencyPairMapping) Size

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

func (*CurrencyPairMapping) String

func (m *CurrencyPairMapping) String() string

func (*CurrencyPairMapping) Unmarshal

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

func (*CurrencyPairMapping) XXX_DiscardUnknown

func (m *CurrencyPairMapping) XXX_DiscardUnknown()

func (*CurrencyPairMapping) XXX_Marshal

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

func (*CurrencyPairMapping) XXX_Merge

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

func (*CurrencyPairMapping) XXX_Size

func (m *CurrencyPairMapping) XXX_Size() int

func (*CurrencyPairMapping) XXX_Unmarshal

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

type CurrencyPairNotExistError

type CurrencyPairNotExistError struct {
	// contains filtered or unexported fields
}

func (CurrencyPairNotExistError) Error

type CurrencyPairState

type CurrencyPairState struct {
	// QuotePrice is the latest price for a currency-pair, notice this value can
	// be null in the case that no price exists for the currency-pair
	Price *QuotePrice `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"`
	// Nonce is the number of updates this currency-pair has received
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// ID is the ID of the CurrencyPair
	Id uint64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
}

CurrencyPairState represents the stateful information tracked by the x/oracle module per-currency-pair.

func NewCurrencyPairState

func NewCurrencyPairState(id, nonce uint64, quotePrice *QuotePrice) CurrencyPairState

NewCurrencyPairState returns a new CurrencyPairState given an ID, nonce, and QuotePrice.

func (*CurrencyPairState) Descriptor

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

func (*CurrencyPairState) GetId

func (m *CurrencyPairState) GetId() uint64

func (*CurrencyPairState) GetNonce

func (m *CurrencyPairState) GetNonce() uint64

func (*CurrencyPairState) GetPrice

func (m *CurrencyPairState) GetPrice() *QuotePrice

func (*CurrencyPairState) Marshal

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

func (*CurrencyPairState) MarshalTo

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

func (*CurrencyPairState) MarshalToSizedBuffer

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

func (*CurrencyPairState) ProtoMessage

func (*CurrencyPairState) ProtoMessage()

func (*CurrencyPairState) Reset

func (m *CurrencyPairState) Reset()

func (*CurrencyPairState) Size

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

func (*CurrencyPairState) String

func (m *CurrencyPairState) String() string

func (*CurrencyPairState) Unmarshal

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

func (*CurrencyPairState) ValidateBasic

func (cps *CurrencyPairState) ValidateBasic() error

ValidateBasic checks that the CurrencyPairState is valid, i.e. the nonce is zero if the QuotePrice is nil, and non-zero otherwise.

func (*CurrencyPairState) XXX_DiscardUnknown

func (m *CurrencyPairState) XXX_DiscardUnknown()

func (*CurrencyPairState) XXX_Marshal

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

func (*CurrencyPairState) XXX_Merge

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

func (*CurrencyPairState) XXX_Size

func (m *CurrencyPairState) XXX_Size() int

func (*CurrencyPairState) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// CurrencyPairGenesis is the set of CurrencyPairGeneses for the module. I.e
	// the starting set of CurrencyPairs for the module + information regarding
	// their latest update.
	CurrencyPairGenesis []CurrencyPairGenesis `protobuf:"bytes,1,rep,name=currency_pair_genesis,json=currencyPairGenesis,proto3" json:"currency_pair_genesis"`
	// NextID is the next ID to be used for a CurrencyPair
	NextId uint64 `protobuf:"varint,2,opt,name=next_id,json=nextId,proto3" json:"next_id,omitempty"`
}

GenesisState is the genesis-state for the x/oracle module, it takes a set of predefined CurrencyPairGeneses

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a default genesis state for the oracle module.

func GetGenesisStateFromAppState

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

GetGenesisStateFromAppState returns x/oracle GenesisState given raw application genesis state.

func NewGenesisState

func NewGenesisState(cpgs []CurrencyPairGenesis, nextID uint64) *GenesisState

NewGenesisState returns a new genesis-state from a set of CurrencyPairGeneses.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetCurrencyPairGenesis

func (m *GenesisState) GetCurrencyPairGenesis() []CurrencyPairGenesis

func (*GenesisState) GetNextId

func (m *GenesisState) GetNextId() uint64

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 validates the currency-pair geneses that the Genesis-State is composed of valid CurrencyPairGenesis, and that no ID for a currency-pair is repeated.

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 GetAllCurrencyPairsRequest

type GetAllCurrencyPairsRequest struct {
}

func (*GetAllCurrencyPairsRequest) Descriptor

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

func (*GetAllCurrencyPairsRequest) Marshal

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

func (*GetAllCurrencyPairsRequest) MarshalTo

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

func (*GetAllCurrencyPairsRequest) MarshalToSizedBuffer

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

func (*GetAllCurrencyPairsRequest) ProtoMessage

func (*GetAllCurrencyPairsRequest) ProtoMessage()

func (*GetAllCurrencyPairsRequest) Reset

func (m *GetAllCurrencyPairsRequest) Reset()

func (*GetAllCurrencyPairsRequest) Size

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

func (*GetAllCurrencyPairsRequest) String

func (m *GetAllCurrencyPairsRequest) String() string

func (*GetAllCurrencyPairsRequest) Unmarshal

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

func (*GetAllCurrencyPairsRequest) XXX_DiscardUnknown

func (m *GetAllCurrencyPairsRequest) XXX_DiscardUnknown()

func (*GetAllCurrencyPairsRequest) XXX_Marshal

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

func (*GetAllCurrencyPairsRequest) XXX_Merge

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

func (*GetAllCurrencyPairsRequest) XXX_Size

func (m *GetAllCurrencyPairsRequest) XXX_Size() int

func (*GetAllCurrencyPairsRequest) XXX_Unmarshal

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

type GetAllCurrencyPairsResponse

type GetAllCurrencyPairsResponse struct {
	CurrencyPairs []types.CurrencyPair `protobuf:"bytes,1,rep,name=currency_pairs,json=currencyPairs,proto3" json:"currency_pairs"`
}

GetAllCurrencyPairsResponse returns all CurrencyPairs that the module is currently tracking.

func (*GetAllCurrencyPairsResponse) Descriptor

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

func (*GetAllCurrencyPairsResponse) GetCurrencyPairs

func (m *GetAllCurrencyPairsResponse) GetCurrencyPairs() []types.CurrencyPair

func (*GetAllCurrencyPairsResponse) Marshal

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

func (*GetAllCurrencyPairsResponse) MarshalTo

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

func (*GetAllCurrencyPairsResponse) MarshalToSizedBuffer

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

func (*GetAllCurrencyPairsResponse) ProtoMessage

func (*GetAllCurrencyPairsResponse) ProtoMessage()

func (*GetAllCurrencyPairsResponse) Reset

func (m *GetAllCurrencyPairsResponse) Reset()

func (*GetAllCurrencyPairsResponse) Size

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

func (*GetAllCurrencyPairsResponse) String

func (m *GetAllCurrencyPairsResponse) String() string

func (*GetAllCurrencyPairsResponse) Unmarshal

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

func (*GetAllCurrencyPairsResponse) XXX_DiscardUnknown

func (m *GetAllCurrencyPairsResponse) XXX_DiscardUnknown()

func (*GetAllCurrencyPairsResponse) XXX_Marshal

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

func (*GetAllCurrencyPairsResponse) XXX_Merge

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

func (*GetAllCurrencyPairsResponse) XXX_Size

func (m *GetAllCurrencyPairsResponse) XXX_Size() int

func (*GetAllCurrencyPairsResponse) XXX_Unmarshal

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

type GetCurrencyPairMappingListRequest

type GetCurrencyPairMappingListRequest struct {
}

GetCurrencyPairMappingRequest is the GetCurrencyPairMapping request type.

func (*GetCurrencyPairMappingListRequest) Descriptor

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

func (*GetCurrencyPairMappingListRequest) Marshal

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

func (*GetCurrencyPairMappingListRequest) MarshalTo

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

func (*GetCurrencyPairMappingListRequest) MarshalToSizedBuffer

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

func (*GetCurrencyPairMappingListRequest) ProtoMessage

func (*GetCurrencyPairMappingListRequest) ProtoMessage()

func (*GetCurrencyPairMappingListRequest) Reset

func (*GetCurrencyPairMappingListRequest) Size

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

func (*GetCurrencyPairMappingListRequest) String

func (*GetCurrencyPairMappingListRequest) Unmarshal

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

func (*GetCurrencyPairMappingListRequest) XXX_DiscardUnknown

func (m *GetCurrencyPairMappingListRequest) XXX_DiscardUnknown()

func (*GetCurrencyPairMappingListRequest) XXX_Marshal

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

func (*GetCurrencyPairMappingListRequest) XXX_Merge

func (*GetCurrencyPairMappingListRequest) XXX_Size

func (m *GetCurrencyPairMappingListRequest) XXX_Size() int

func (*GetCurrencyPairMappingListRequest) XXX_Unmarshal

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

type GetCurrencyPairMappingListResponse

type GetCurrencyPairMappingListResponse struct {
	// mappings is a list of the id representing the currency pair
	// to the currency pair itself.
	Mappings []CurrencyPairMapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings"`
}

GetCurrencyPairMappingResponse is the GetCurrencyPairMapping response type.

func (*GetCurrencyPairMappingListResponse) Descriptor

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

func (*GetCurrencyPairMappingListResponse) GetMappings

func (*GetCurrencyPairMappingListResponse) Marshal

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

func (*GetCurrencyPairMappingListResponse) MarshalTo

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

func (*GetCurrencyPairMappingListResponse) MarshalToSizedBuffer

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

func (*GetCurrencyPairMappingListResponse) ProtoMessage

func (*GetCurrencyPairMappingListResponse) ProtoMessage()

func (*GetCurrencyPairMappingListResponse) Reset

func (*GetCurrencyPairMappingListResponse) Size

func (*GetCurrencyPairMappingListResponse) String

func (*GetCurrencyPairMappingListResponse) Unmarshal

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

func (*GetCurrencyPairMappingListResponse) XXX_DiscardUnknown

func (m *GetCurrencyPairMappingListResponse) XXX_DiscardUnknown()

func (*GetCurrencyPairMappingListResponse) XXX_Marshal

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

func (*GetCurrencyPairMappingListResponse) XXX_Merge

func (*GetCurrencyPairMappingListResponse) XXX_Size

func (*GetCurrencyPairMappingListResponse) XXX_Unmarshal

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

type GetCurrencyPairMappingRequest

type GetCurrencyPairMappingRequest struct {
}

GetCurrencyPairMappingRequest is the GetCurrencyPairMapping request type.

func (*GetCurrencyPairMappingRequest) Descriptor

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

func (*GetCurrencyPairMappingRequest) Marshal

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

func (*GetCurrencyPairMappingRequest) MarshalTo

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

func (*GetCurrencyPairMappingRequest) MarshalToSizedBuffer

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

func (*GetCurrencyPairMappingRequest) ProtoMessage

func (*GetCurrencyPairMappingRequest) ProtoMessage()

func (*GetCurrencyPairMappingRequest) Reset

func (m *GetCurrencyPairMappingRequest) Reset()

func (*GetCurrencyPairMappingRequest) Size

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

func (*GetCurrencyPairMappingRequest) String

func (*GetCurrencyPairMappingRequest) Unmarshal

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

func (*GetCurrencyPairMappingRequest) XXX_DiscardUnknown

func (m *GetCurrencyPairMappingRequest) XXX_DiscardUnknown()

func (*GetCurrencyPairMappingRequest) XXX_Marshal

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

func (*GetCurrencyPairMappingRequest) XXX_Merge

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

func (*GetCurrencyPairMappingRequest) XXX_Size

func (m *GetCurrencyPairMappingRequest) XXX_Size() int

func (*GetCurrencyPairMappingRequest) XXX_Unmarshal

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

type GetCurrencyPairMappingResponse

type GetCurrencyPairMappingResponse struct {
	// currency_pair_mapping is a mapping of the id representing the currency pair
	// to the currency pair itself.
	CurrencyPairMapping map[uint64]types.CurrencyPair `` /* 199-byte string literal not displayed */
}

GetCurrencyPairMappingResponse is the GetCurrencyPairMapping response type.

func (*GetCurrencyPairMappingResponse) Descriptor

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

func (*GetCurrencyPairMappingResponse) GetCurrencyPairMapping

func (m *GetCurrencyPairMappingResponse) GetCurrencyPairMapping() map[uint64]types.CurrencyPair

func (*GetCurrencyPairMappingResponse) Marshal

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

func (*GetCurrencyPairMappingResponse) MarshalTo

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

func (*GetCurrencyPairMappingResponse) MarshalToSizedBuffer

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

func (*GetCurrencyPairMappingResponse) ProtoMessage

func (*GetCurrencyPairMappingResponse) ProtoMessage()

func (*GetCurrencyPairMappingResponse) Reset

func (m *GetCurrencyPairMappingResponse) Reset()

func (*GetCurrencyPairMappingResponse) Size

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

func (*GetCurrencyPairMappingResponse) String

func (*GetCurrencyPairMappingResponse) Unmarshal

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

func (*GetCurrencyPairMappingResponse) XXX_DiscardUnknown

func (m *GetCurrencyPairMappingResponse) XXX_DiscardUnknown()

func (*GetCurrencyPairMappingResponse) XXX_Marshal

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

func (*GetCurrencyPairMappingResponse) XXX_Merge

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

func (*GetCurrencyPairMappingResponse) XXX_Size

func (m *GetCurrencyPairMappingResponse) XXX_Size() int

func (*GetCurrencyPairMappingResponse) XXX_Unmarshal

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

type GetPriceRequest

type GetPriceRequest struct {
	// CurrencyPair represents the pair that the user wishes to query.
	CurrencyPair types.CurrencyPair `protobuf:"bytes,1,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair"`
}

GetPriceRequest either takes a CurrencyPair, or an identifier for the CurrencyPair in the format base/quote.

func (*GetPriceRequest) Descriptor

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

func (*GetPriceRequest) GetCurrencyPair

func (m *GetPriceRequest) GetCurrencyPair() types.CurrencyPair

func (*GetPriceRequest) Marshal

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

func (*GetPriceRequest) MarshalTo

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

func (*GetPriceRequest) MarshalToSizedBuffer

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

func (*GetPriceRequest) ProtoMessage

func (*GetPriceRequest) ProtoMessage()

func (*GetPriceRequest) Reset

func (m *GetPriceRequest) Reset()

func (*GetPriceRequest) Size

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

func (*GetPriceRequest) String

func (m *GetPriceRequest) String() string

func (*GetPriceRequest) Unmarshal

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

func (*GetPriceRequest) XXX_DiscardUnknown

func (m *GetPriceRequest) XXX_DiscardUnknown()

func (*GetPriceRequest) XXX_Marshal

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

func (*GetPriceRequest) XXX_Merge

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

func (*GetPriceRequest) XXX_Size

func (m *GetPriceRequest) XXX_Size() int

func (*GetPriceRequest) XXX_Unmarshal

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

type GetPriceResponse

type GetPriceResponse struct {
	// QuotePrice represents the quote-price for the CurrencyPair given in
	// GetPriceRequest (possibly nil if no update has been made)
	Price *QuotePrice `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"`
	// nonce represents the nonce for the CurrencyPair if it exists in state
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// decimals represents the number of decimals that the quote-price is
	// represented in. For Pairs where ETHEREUM is the quote this will be 18,
	// otherwise it will be 8.
	Decimals uint64 `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"`
	// ID represents the identifier for the CurrencyPair.
	Id uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
}

GetPriceResponse is the response from the GetPrice grpc method exposed from the x/oracle query service.

func (*GetPriceResponse) Descriptor

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

func (*GetPriceResponse) GetDecimals

func (m *GetPriceResponse) GetDecimals() uint64

func (*GetPriceResponse) GetId

func (m *GetPriceResponse) GetId() uint64

func (*GetPriceResponse) GetNonce

func (m *GetPriceResponse) GetNonce() uint64

func (*GetPriceResponse) GetPrice

func (m *GetPriceResponse) GetPrice() *QuotePrice

func (*GetPriceResponse) Marshal

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

func (*GetPriceResponse) MarshalTo

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

func (*GetPriceResponse) MarshalToSizedBuffer

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

func (*GetPriceResponse) ProtoMessage

func (*GetPriceResponse) ProtoMessage()

func (*GetPriceResponse) Reset

func (m *GetPriceResponse) Reset()

func (*GetPriceResponse) Size

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

func (*GetPriceResponse) String

func (m *GetPriceResponse) String() string

func (*GetPriceResponse) Unmarshal

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

func (*GetPriceResponse) XXX_DiscardUnknown

func (m *GetPriceResponse) XXX_DiscardUnknown()

func (*GetPriceResponse) XXX_Marshal

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

func (*GetPriceResponse) XXX_Merge

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

func (*GetPriceResponse) XXX_Size

func (m *GetPriceResponse) XXX_Size() int

func (*GetPriceResponse) XXX_Unmarshal

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

type GetPricesRequest

type GetPricesRequest struct {
	CurrencyPairIds []string `protobuf:"bytes,1,rep,name=currency_pair_ids,json=currencyPairIds,proto3" json:"currency_pair_ids,omitempty"`
}

GetPricesRequest takes an identifier for the CurrencyPair in the format base/quote.

func (*GetPricesRequest) Descriptor

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

func (*GetPricesRequest) GetCurrencyPairIds

func (m *GetPricesRequest) GetCurrencyPairIds() []string

func (*GetPricesRequest) Marshal

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

func (*GetPricesRequest) MarshalTo

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

func (*GetPricesRequest) MarshalToSizedBuffer

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

func (*GetPricesRequest) ProtoMessage

func (*GetPricesRequest) ProtoMessage()

func (*GetPricesRequest) Reset

func (m *GetPricesRequest) Reset()

func (*GetPricesRequest) Size

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

func (*GetPricesRequest) String

func (m *GetPricesRequest) String() string

func (*GetPricesRequest) Unmarshal

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

func (*GetPricesRequest) XXX_DiscardUnknown

func (m *GetPricesRequest) XXX_DiscardUnknown()

func (*GetPricesRequest) XXX_Marshal

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

func (*GetPricesRequest) XXX_Merge

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

func (*GetPricesRequest) XXX_Size

func (m *GetPricesRequest) XXX_Size() int

func (*GetPricesRequest) XXX_Unmarshal

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

type GetPricesResponse

type GetPricesResponse struct {
	Prices []GetPriceResponse `protobuf:"bytes,1,rep,name=prices,proto3" json:"prices"`
}

GetPricesResponse is the response from the GetPrices grpc method exposed from the x/oracle query service.

func (*GetPricesResponse) Descriptor

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

func (*GetPricesResponse) GetPrices

func (m *GetPricesResponse) GetPrices() []GetPriceResponse

func (*GetPricesResponse) Marshal

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

func (*GetPricesResponse) MarshalTo

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

func (*GetPricesResponse) MarshalToSizedBuffer

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

func (*GetPricesResponse) ProtoMessage

func (*GetPricesResponse) ProtoMessage()

func (*GetPricesResponse) Reset

func (m *GetPricesResponse) Reset()

func (*GetPricesResponse) Size

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

func (*GetPricesResponse) String

func (m *GetPricesResponse) String() string

func (*GetPricesResponse) Unmarshal

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

func (*GetPricesResponse) XXX_DiscardUnknown

func (m *GetPricesResponse) XXX_DiscardUnknown()

func (*GetPricesResponse) XXX_Marshal

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

func (*GetPricesResponse) XXX_Merge

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

func (*GetPricesResponse) XXX_Size

func (m *GetPricesResponse) XXX_Size() int

func (*GetPricesResponse) XXX_Unmarshal

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

type MarketMapKeeper

type MarketMapKeeper interface {
	GetMarket(ctx sdk.Context, tickerStr string) (types.Market, error)
}

MarketMapKeeper is the expected keeper interface for the market map keeper.

type MsgAddCurrencyPairs

type MsgAddCurrencyPairs struct {
	// authority is the address of the account that is authorized to update the
	// x/oracle's CurrencyPairs
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// set of CurrencyPairs to be added to the module (+ prices if they are to be
	// set)
	CurrencyPairs []types.CurrencyPair `protobuf:"bytes,2,rep,name=currency_pairs,json=currencyPairs,proto3" json:"currency_pairs"`
}

Given an authority + a set of CurrencyPairs, the x/oracle module will check to see that the authority has permissions to update the set of CurrencyPairs tracked in the oracle, and add the given CurrencyPairs to be tracked in each VoteExtension

func NewMsgAddCurrencyPairs

func NewMsgAddCurrencyPairs(authority string, cps []slinkytypes.CurrencyPair) MsgAddCurrencyPairs

NewMsgAddCurrencyPairs returns a new message from a set of currency-pairs and an authority.

func (*MsgAddCurrencyPairs) Descriptor

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

func (*MsgAddCurrencyPairs) GetAuthority

func (m *MsgAddCurrencyPairs) GetAuthority() string

func (*MsgAddCurrencyPairs) GetCurrencyPairs

func (m *MsgAddCurrencyPairs) GetCurrencyPairs() []types.CurrencyPair

func (*MsgAddCurrencyPairs) Marshal

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

func (*MsgAddCurrencyPairs) MarshalTo

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

func (*MsgAddCurrencyPairs) MarshalToSizedBuffer

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

func (*MsgAddCurrencyPairs) ProtoMessage

func (*MsgAddCurrencyPairs) ProtoMessage()

func (*MsgAddCurrencyPairs) Reset

func (m *MsgAddCurrencyPairs) Reset()

func (*MsgAddCurrencyPairs) Size

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

func (*MsgAddCurrencyPairs) String

func (m *MsgAddCurrencyPairs) String() string

func (*MsgAddCurrencyPairs) Unmarshal

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

func (*MsgAddCurrencyPairs) ValidateBasic

func (m *MsgAddCurrencyPairs) ValidateBasic() error

func (*MsgAddCurrencyPairs) XXX_DiscardUnknown

func (m *MsgAddCurrencyPairs) XXX_DiscardUnknown()

func (*MsgAddCurrencyPairs) XXX_Marshal

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

func (*MsgAddCurrencyPairs) XXX_Merge

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

func (*MsgAddCurrencyPairs) XXX_Size

func (m *MsgAddCurrencyPairs) XXX_Size() int

func (*MsgAddCurrencyPairs) XXX_Unmarshal

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

type MsgAddCurrencyPairsResponse

type MsgAddCurrencyPairsResponse struct {
}

func (*MsgAddCurrencyPairsResponse) Descriptor

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

func (*MsgAddCurrencyPairsResponse) Marshal

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

func (*MsgAddCurrencyPairsResponse) MarshalTo

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

func (*MsgAddCurrencyPairsResponse) MarshalToSizedBuffer

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

func (*MsgAddCurrencyPairsResponse) ProtoMessage

func (*MsgAddCurrencyPairsResponse) ProtoMessage()

func (*MsgAddCurrencyPairsResponse) Reset

func (m *MsgAddCurrencyPairsResponse) Reset()

func (*MsgAddCurrencyPairsResponse) Size

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

func (*MsgAddCurrencyPairsResponse) String

func (m *MsgAddCurrencyPairsResponse) String() string

func (*MsgAddCurrencyPairsResponse) Unmarshal

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

func (*MsgAddCurrencyPairsResponse) XXX_DiscardUnknown

func (m *MsgAddCurrencyPairsResponse) XXX_DiscardUnknown()

func (*MsgAddCurrencyPairsResponse) XXX_Marshal

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

func (*MsgAddCurrencyPairsResponse) XXX_Merge

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

func (*MsgAddCurrencyPairsResponse) XXX_Size

func (m *MsgAddCurrencyPairsResponse) XXX_Size() int

func (*MsgAddCurrencyPairsResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// AddCurrencyPairs will be used only by governance to update the set of
	// available CurrencyPairs. Given a set of CurrencyPair objects, update
	// the available currency pairs in the module .
	AddCurrencyPairs(ctx context.Context, in *MsgAddCurrencyPairs, opts ...grpc.CallOption) (*MsgAddCurrencyPairsResponse, error)
	// RemoveCurrencyPairs will be used explicitly by governance to remove the
	// given set of currency-pairs from the module's state. Thus these
	// CurrencyPairs will no longer have price-data available from this module.
	RemoveCurrencyPairs(ctx context.Context, in *MsgRemoveCurrencyPairs, opts ...grpc.CallOption) (*MsgRemoveCurrencyPairsResponse, 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 MsgRemoveCurrencyPairs

type MsgRemoveCurrencyPairs struct {
	// authority is the address of the account that is authorized to update the
	// x/oracle's CurrencyPairs
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// currency_pair_ids are the stringified representation of a currency-pairs
	// (base/quote) to be removed from the module's state
	CurrencyPairIds []string `protobuf:"bytes,2,rep,name=currency_pair_ids,json=currencyPairIds,proto3" json:"currency_pair_ids,omitempty"`
}

Given an authority + a set of CurrencyPairIDs, the x/oracle module's message service will remove all of the CurrencyPairs identified by each CurrencyPairID in the request from state. Notice, if a given currency-pair does not exist in state, the module ignores that currency-pair and continues removing the rest.

func NewMsgRemoveCurrencyPairs

func NewMsgRemoveCurrencyPairs(authority string, currencyPairIDs []string) MsgRemoveCurrencyPairs

NewMsgRemoveCurrencyPairs returns a new message to remove a set of currency-pairs from the x/oracle module's state.

func (*MsgRemoveCurrencyPairs) Descriptor

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

func (*MsgRemoveCurrencyPairs) GetAuthority

func (m *MsgRemoveCurrencyPairs) GetAuthority() string

func (*MsgRemoveCurrencyPairs) GetCurrencyPairIds

func (m *MsgRemoveCurrencyPairs) GetCurrencyPairIds() []string

func (*MsgRemoveCurrencyPairs) Marshal

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

func (*MsgRemoveCurrencyPairs) MarshalTo

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

func (*MsgRemoveCurrencyPairs) MarshalToSizedBuffer

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

func (*MsgRemoveCurrencyPairs) ProtoMessage

func (*MsgRemoveCurrencyPairs) ProtoMessage()

func (*MsgRemoveCurrencyPairs) Reset

func (m *MsgRemoveCurrencyPairs) Reset()

func (*MsgRemoveCurrencyPairs) Size

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

func (*MsgRemoveCurrencyPairs) String

func (m *MsgRemoveCurrencyPairs) String() string

func (*MsgRemoveCurrencyPairs) Unmarshal

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

func (*MsgRemoveCurrencyPairs) ValidateBasic

func (m *MsgRemoveCurrencyPairs) ValidateBasic() error

ValidateBasic determines whether the information in the message is valid, specifically whether the authority is a valid acc-address, and that each CurrencyPairID in the message is formatted correctly.

func (*MsgRemoveCurrencyPairs) XXX_DiscardUnknown

func (m *MsgRemoveCurrencyPairs) XXX_DiscardUnknown()

func (*MsgRemoveCurrencyPairs) XXX_Marshal

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

func (*MsgRemoveCurrencyPairs) XXX_Merge

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

func (*MsgRemoveCurrencyPairs) XXX_Size

func (m *MsgRemoveCurrencyPairs) XXX_Size() int

func (*MsgRemoveCurrencyPairs) XXX_Unmarshal

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

type MsgRemoveCurrencyPairsResponse

type MsgRemoveCurrencyPairsResponse struct {
}

func (*MsgRemoveCurrencyPairsResponse) Descriptor

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

func (*MsgRemoveCurrencyPairsResponse) Marshal

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

func (*MsgRemoveCurrencyPairsResponse) MarshalTo

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

func (*MsgRemoveCurrencyPairsResponse) MarshalToSizedBuffer

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

func (*MsgRemoveCurrencyPairsResponse) ProtoMessage

func (*MsgRemoveCurrencyPairsResponse) ProtoMessage()

func (*MsgRemoveCurrencyPairsResponse) Reset

func (m *MsgRemoveCurrencyPairsResponse) Reset()

func (*MsgRemoveCurrencyPairsResponse) Size

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

func (*MsgRemoveCurrencyPairsResponse) String

func (*MsgRemoveCurrencyPairsResponse) Unmarshal

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

func (*MsgRemoveCurrencyPairsResponse) XXX_DiscardUnknown

func (m *MsgRemoveCurrencyPairsResponse) XXX_DiscardUnknown()

func (*MsgRemoveCurrencyPairsResponse) XXX_Marshal

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

func (*MsgRemoveCurrencyPairsResponse) XXX_Merge

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

func (*MsgRemoveCurrencyPairsResponse) XXX_Size

func (m *MsgRemoveCurrencyPairsResponse) XXX_Size() int

func (*MsgRemoveCurrencyPairsResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// AddCurrencyPairs will be used only by governance to update the set of
	// available CurrencyPairs. Given a set of CurrencyPair objects, update
	// the available currency pairs in the module .
	AddCurrencyPairs(context.Context, *MsgAddCurrencyPairs) (*MsgAddCurrencyPairsResponse, error)
	// RemoveCurrencyPairs will be used explicitly by governance to remove the
	// given set of currency-pairs from the module's state. Thus these
	// CurrencyPairs will no longer have price-data available from this module.
	RemoveCurrencyPairs(context.Context, *MsgRemoveCurrencyPairs) (*MsgRemoveCurrencyPairsResponse, error)
}

MsgServer is the server API for Msg service.

type QueryClient

type QueryClient interface {
	// Get all the currency pairs the x/oracle module is tracking price-data for.
	GetAllCurrencyPairs(ctx context.Context, in *GetAllCurrencyPairsRequest, opts ...grpc.CallOption) (*GetAllCurrencyPairsResponse, error)
	// Given a CurrencyPair (or its identifier) return the latest QuotePrice for
	// that CurrencyPair.
	GetPrice(ctx context.Context, in *GetPriceRequest, opts ...grpc.CallOption) (*GetPriceResponse, error)
	GetPrices(ctx context.Context, in *GetPricesRequest, opts ...grpc.CallOption) (*GetPricesResponse, error)
	// Get the mapping of currency pair ID -> currency pair. This is useful for
	// indexers that have access to the ID of a currency pair, but no way to get
	// the underlying currency pair from it.
	GetCurrencyPairMapping(ctx context.Context, in *GetCurrencyPairMappingRequest, opts ...grpc.CallOption) (*GetCurrencyPairMappingResponse, error)
	// Get the mapping of currency pair ID <-> currency pair as a list. This is
	// useful for indexers that have access to the ID of a currency pair, but no
	// way to get the underlying currency pair from it.
	GetCurrencyPairMappingList(ctx context.Context, in *GetCurrencyPairMappingListRequest, opts ...grpc.CallOption) (*GetCurrencyPairMappingListResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryServer

type QueryServer interface {
	// Get all the currency pairs the x/oracle module is tracking price-data for.
	GetAllCurrencyPairs(context.Context, *GetAllCurrencyPairsRequest) (*GetAllCurrencyPairsResponse, error)
	// Given a CurrencyPair (or its identifier) return the latest QuotePrice for
	// that CurrencyPair.
	GetPrice(context.Context, *GetPriceRequest) (*GetPriceResponse, error)
	GetPrices(context.Context, *GetPricesRequest) (*GetPricesResponse, error)
	// Get the mapping of currency pair ID -> currency pair. This is useful for
	// indexers that have access to the ID of a currency pair, but no way to get
	// the underlying currency pair from it.
	GetCurrencyPairMapping(context.Context, *GetCurrencyPairMappingRequest) (*GetCurrencyPairMappingResponse, error)
	// Get the mapping of currency pair ID <-> currency pair as a list. This is
	// useful for indexers that have access to the ID of a currency pair, but no
	// way to get the underlying currency pair from it.
	GetCurrencyPairMappingList(context.Context, *GetCurrencyPairMappingListRequest) (*GetCurrencyPairMappingListResponse, error)
}

QueryServer is the server API for Query service.

type QuotePrice

type QuotePrice struct {
	Price cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=price,proto3,customtype=cosmossdk.io/math.Int" json:"price"`
	// BlockTimestamp tracks the block height associated with this price update.
	// We include block timestamp alongside the price to ensure that smart
	// contracts and applications are not utilizing stale oracle prices
	BlockTimestamp time.Time `protobuf:"bytes,2,opt,name=block_timestamp,json=blockTimestamp,proto3,stdtime" json:"block_timestamp"`
	// BlockHeight is height of block mentioned above
	BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}

QuotePrice is the representation of the aggregated prices for a CurrencyPair, where price represents the price of Base in terms of Quote

func (*QuotePrice) Descriptor

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

func (*QuotePrice) GetBlockHeight

func (m *QuotePrice) GetBlockHeight() uint64

func (*QuotePrice) GetBlockTimestamp

func (m *QuotePrice) GetBlockTimestamp() time.Time

func (*QuotePrice) Marshal

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

func (*QuotePrice) MarshalTo

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

func (*QuotePrice) MarshalToSizedBuffer

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

func (*QuotePrice) ProtoMessage

func (*QuotePrice) ProtoMessage()

func (*QuotePrice) Reset

func (m *QuotePrice) Reset()

func (*QuotePrice) Size

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

func (*QuotePrice) String

func (m *QuotePrice) String() string

func (*QuotePrice) Unmarshal

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

func (*QuotePrice) ValidateBasic

func (qp *QuotePrice) ValidateBasic() error

ValidateBasic validates that the QuotePrice is valid, i.e. that the price is non-negative.

func (*QuotePrice) XXX_DiscardUnknown

func (m *QuotePrice) XXX_DiscardUnknown()

func (*QuotePrice) XXX_Marshal

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

func (*QuotePrice) XXX_Merge

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

func (*QuotePrice) XXX_Size

func (m *QuotePrice) XXX_Size() int

func (*QuotePrice) XXX_Unmarshal

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

type QuotePriceNotExistError

type QuotePriceNotExistError struct {
	// contains filtered or unexported fields
}

func (QuotePriceNotExistError) Error

func (e QuotePriceNotExistError) Error() string

type QuotePriceWithNonce

type QuotePriceWithNonce struct {
	QuotePrice
	// contains filtered or unexported fields
}

QuotePriceWithNonce is a wrapper around the QuotePrice object which also contains a nonce. The nonce is meant to represent the number of times that the QuotePrice has been updated for a given CurrencyPair.

func NewQuotePriceWithNonce

func NewQuotePriceWithNonce(qp QuotePrice, nonce uint64) QuotePriceWithNonce

func (*QuotePriceWithNonce) Nonce

func (q *QuotePriceWithNonce) Nonce() uint64

Nonce returns the nonce for a given QuotePriceWithNonce.

func (*QuotePriceWithNonce) ValidateBasic

func (q *QuotePriceWithNonce) ValidateBasic() error

ValidateBasic validates that the QuotePriceWithNonce is valid, i.e that the underlying QuotePrice is valid.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AddCurrencyPairs

func (*UnimplementedMsgServer) RemoveCurrencyPairs

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GetAllCurrencyPairs

func (*UnimplementedQueryServer) GetCurrencyPairMapping

func (*UnimplementedQueryServer) GetCurrencyPairMappingList

func (*UnimplementedQueryServer) GetPrice

func (*UnimplementedQueryServer) GetPrices

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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