types

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventSnapshotSaved    = "reserve_snapshot_saved"
	AttributeBlockHeight  = "block_height"
	AttributeQuoteReserve = "quote_reserve"
	AttributeBaseReserve  = "base_reserve"

	EventSwapQuoteForBase     = "swap_input"
	EventSwapBaseForQuote     = "swap_output"
	AttributeQuoteAssetAmount = "quote_asset_amount"
	AttributeBaseAssetAmount  = "base_asset_amount"
)
View Source
const (
	ModuleName   = "vpool"
	StoreKey     = "vpoolkey"
	RouterKey    = ModuleName
	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ErrPairNotSupported     = sdkerrors.Register(ModuleName, 1, "pair not supported")
	ErrOverTradingLimit     = sdkerrors.Register(ModuleName, 2, "over trading limit")
	ErrQuoteReserveAtZero   = sdkerrors.Register(ModuleName, 3, "quote reserve after at zero")
	ErrBaseReserveAtZero    = sdkerrors.Register(ModuleName, 4, "base reserve after at zero")
	ErrNoLastSnapshotSaved  = sdkerrors.Register(ModuleName, 5, "There was no last snapshot, could be that you did not do snapshot on pool creation")
	ErrOverFluctuationLimit = sdkerrors.Register(ModuleName, 6, "price is over fluctuation limit")
	ErrAssetOverUserLimit   = sdkerrors.Register(ModuleName, 7, "amout of assets traded is over user-defined limit")
	ErrOpeningPosition      = sdkerrors.Register(ModuleName, 8, "error opening position")
	ErrClosingPosition      = sdkerrors.Register(ModuleName, 9, "error closing position")
	ErrNoValidPrice         = sdkerrors.Register(ModuleName, 10, "no valid prices available")
	ErrNoValidTWAP          = sdkerrors.Register(ModuleName, 11, "TWAP price not found")
)
View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
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 (
	PoolKey                    = []byte{0x00}
	PoolReserveSnapshotCounter = []byte{0x01}
	PoolReserveSnapshots       = []byte{0x02}
	TWAPPricePrefix            = []byte{0x03}
)

PoolKey | 0x00 + PairString | The Pool struct PoolReserveSnapshotCounter | 0x01 + PairString | Integer PoolReserveSnapshots | 0x02 + PairString + Counter | Snapshot

View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = 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 (
	ErrInvalidLengthVpool        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVpool          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVpool = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Direction_name = map[int32]string{
	0: "DIRECTION_UNSPECIFIED",
	1: "ADD_TO_POOL",
	2: "REMOVE_FROM_POOL",
}
View Source
var Direction_value = map[string]int32{
	"DIRECTION_UNSPECIFIED": 0,
	"ADD_TO_POOL":           1,
	"REMOVE_FROM_POOL":      2,
}
View Source
var TwapCalcOption_name = map[int32]string{
	0: "TWAP_CALC_OPTION_UNSPECIFIED",
	1: "SPOT",
	2: "QUOTE_ASSET_SWAP",
	3: "BASE_ASSET_SWAP",
}
View Source
var TwapCalcOption_value = map[string]int32{
	"TWAP_CALC_OPTION_UNSPECIFIED": 0,
	"SPOT":                         1,
	"QUOTE_ASSET_SWAP":             2,
	"BASE_ASSET_SWAP":              3,
}

Functions

func CurrentTWAPPriceKey added in v0.5.1

func CurrentTWAPPriceKey(twapPairID string) []byte

CurrentTWAPPriceKey returns the prefix for the current TWAP price

func GetPoolKey

func GetPoolKey(pair common.AssetPair) []byte

GetPoolKey returns pool key for KVStore

func GetSnapshotCounterKey

func GetSnapshotCounterKey(pair common.AssetPair) []byte

GetSnapshotCounterKey returns the KVStore for the Snapshot Pool counters.

func GetSnapshotKey

func GetSnapshotKey(pair common.AssetPair, counter uint64) []byte

GetSnapshotKey returns the KVStore for the pool reserve snapshots.

func ParamKeyTable added in v0.2.9

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func RegisterCodec added in v0.2.9

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces added in v0.2.9

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

func RegisterQueryHandler added in v0.3.0

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

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

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

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

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type CurrentTWAP added in v0.5.1

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 NewCurrentTWAP added in v0.5.1

func NewCurrentTWAP(token0 string, token1 string, numerator sdk.Dec, denominator sdk.Dec, price sdk.Dec) CurrentTWAP

NewCurrentTWAP returns an instance of CurrentTWAP

Args:

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

Returns:

(CurrentTWAP): Current TWAP price for the asset pair.

func (*CurrentTWAP) Descriptor added in v0.5.1

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

func (*CurrentTWAP) GetPairID added in v0.5.1

func (m *CurrentTWAP) GetPairID() string

func (*CurrentTWAP) Marshal added in v0.5.1

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

func (*CurrentTWAP) MarshalTo added in v0.5.1

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

func (*CurrentTWAP) MarshalToSizedBuffer added in v0.5.1

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

func (*CurrentTWAP) ProtoMessage added in v0.5.1

func (*CurrentTWAP) ProtoMessage()

func (*CurrentTWAP) Reset added in v0.5.1

func (m *CurrentTWAP) Reset()

func (*CurrentTWAP) Size added in v0.5.1

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

func (*CurrentTWAP) String added in v0.5.1

func (m *CurrentTWAP) String() string

func (*CurrentTWAP) Unmarshal added in v0.5.1

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

func (*CurrentTWAP) XXX_DiscardUnknown added in v0.5.1

func (m *CurrentTWAP) XXX_DiscardUnknown()

func (*CurrentTWAP) XXX_Marshal added in v0.5.1

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

func (*CurrentTWAP) XXX_Merge added in v0.5.1

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

func (*CurrentTWAP) XXX_Size added in v0.5.1

func (m *CurrentTWAP) XXX_Size() int

func (*CurrentTWAP) XXX_Unmarshal added in v0.5.1

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

type Direction

type Direction int32
const (
	Direction_DIRECTION_UNSPECIFIED Direction = 0
	Direction_ADD_TO_POOL           Direction = 1
	Direction_REMOVE_FROM_POOL      Direction = 2
)

func (Direction) EnumDescriptor

func (Direction) EnumDescriptor() ([]byte, []int)

func (Direction) String

func (x Direction) String() string

type GenesisState added in v0.2.9

type GenesisState struct {
	Vpools []*Pool `protobuf:"bytes,1,rep,name=vpools,proto3" json:"vpools,omitempty"`
	Params Params  `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

GenesisState defines the vpool module's genesis state.

func DefaultGenesis added in v0.2.9

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor added in v0.2.9

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

func (*GenesisState) GetParams added in v0.2.9

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetVpools added in v0.2.10

func (m *GenesisState) GetVpools() []*Pool

func (*GenesisState) Marshal added in v0.2.9

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

func (*GenesisState) MarshalTo added in v0.2.9

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

func (*GenesisState) MarshalToSizedBuffer added in v0.2.9

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

func (*GenesisState) ProtoMessage added in v0.2.9

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.2.9

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.2.9

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

func (*GenesisState) String added in v0.2.9

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.2.9

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

func (GenesisState) Validate added in v0.2.9

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown added in v0.2.9

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.2.9

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

func (*GenesisState) XXX_Merge added in v0.2.9

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

func (*GenesisState) XXX_Size added in v0.2.9

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.2.9

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

type MarkPriceChanged added in v0.7.0

type MarkPriceChanged struct {
	Pair      string                                 `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,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"`
	Timestamp time.Time                              `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
}

func (*MarkPriceChanged) Descriptor added in v0.7.0

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

func (*MarkPriceChanged) GetPair added in v0.7.0

func (m *MarkPriceChanged) GetPair() string

func (*MarkPriceChanged) GetTimestamp added in v0.7.0

func (m *MarkPriceChanged) GetTimestamp() time.Time

func (*MarkPriceChanged) Marshal added in v0.7.0

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

func (*MarkPriceChanged) MarshalTo added in v0.7.0

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

func (*MarkPriceChanged) MarshalToSizedBuffer added in v0.7.0

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

func (*MarkPriceChanged) ProtoMessage added in v0.7.0

func (*MarkPriceChanged) ProtoMessage()

func (*MarkPriceChanged) Reset added in v0.7.0

func (m *MarkPriceChanged) Reset()

func (*MarkPriceChanged) Size added in v0.7.0

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

func (*MarkPriceChanged) String added in v0.7.0

func (m *MarkPriceChanged) String() string

func (*MarkPriceChanged) Unmarshal added in v0.7.0

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

func (*MarkPriceChanged) XXX_DiscardUnknown added in v0.7.0

func (m *MarkPriceChanged) XXX_DiscardUnknown()

func (*MarkPriceChanged) XXX_Marshal added in v0.7.0

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

func (*MarkPriceChanged) XXX_Merge added in v0.7.0

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

func (*MarkPriceChanged) XXX_Size added in v0.7.0

func (m *MarkPriceChanged) XXX_Size() int

func (*MarkPriceChanged) XXX_Unmarshal added in v0.7.0

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

type Params added in v0.2.9

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams added in v0.2.9

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams added in v0.2.9

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor added in v0.2.9

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

func (*Params) Marshal added in v0.2.9

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

func (*Params) MarshalTo added in v0.2.9

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

func (*Params) MarshalToSizedBuffer added in v0.2.9

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

func (*Params) ParamSetPairs added in v0.2.9

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

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage added in v0.2.9

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.2.9

func (m *Params) Reset()

func (*Params) Size added in v0.2.9

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

func (Params) String added in v0.2.9

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal added in v0.2.9

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

func (Params) Validate added in v0.2.9

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown added in v0.2.9

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.2.9

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

func (*Params) XXX_Merge added in v0.2.9

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

func (*Params) XXX_Size added in v0.2.9

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.2.9

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

type Pool

type Pool struct {
	// always BASE:QUOTE, e.g. BTC:NUSD or ETH:NUSD
	Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"`
	// base asset is the crypto asset, e.g. BTC or ETH
	BaseAssetReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 151-byte string literal not displayed */
	// quote asset is usually stablecoin, in our case NUSD
	QuoteAssetReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 154-byte string literal not displayed */
	// ratio applied to reserves in order not to over trade
	TradeLimitRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 148-byte string literal not displayed */
	// percentage that a single open or close position can alter the reserve amounts
	FluctuationLimitRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */
	// max_oracle_spread_ratio
	MaxOracleSpreadRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 165-byte string literal not displayed */
}

A virtual pool used only for price discovery of perpetual futures contracts. No real liquidity exists in this pool.

func NewPool

func NewPool(
	pair common.AssetPair,
	tradeLimitRatio sdk.Dec,
	quoteAssetReserve sdk.Dec,
	baseAssetReserve sdk.Dec,
	fluctuationLimitRatio sdk.Dec,
	maxOracleSpreadRatio sdk.Dec,
) *Pool

func (*Pool) DecreaseBaseAssetReserve

func (p *Pool) DecreaseBaseAssetReserve(amount sdk.Dec)

DecreaseBaseAssetReserve descreases the quote asset reserve by amount

func (*Pool) DecreaseQuoteAssetReserve

func (p *Pool) DecreaseQuoteAssetReserve(amount sdk.Dec)

DecreaseQuoteAssetReserve decreases the base reserve by amount

func (*Pool) Descriptor

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

func (*Pool) GetAssetPair added in v0.4.17

func (p *Pool) GetAssetPair() common.AssetPair

func (*Pool) GetBaseAmountByQuoteAmount

func (p *Pool) GetBaseAmountByQuoteAmount(
	dir Direction,
	quoteAmount sdk.Dec,
) (baseAmount sdk.Dec, err error)

GetBaseAmountByQuoteAmount returns the amount of base asset you will get out by giving a specified amount of quote asset

args:

  • dir: add to pool or remove from pool
  • quoteAmount: the amount of quote asset to add to/remove from the pool

ret:

  • baseAmountOut: the amount of base assets required to make this hypothetical swap always an absolute value
  • err: error

func (*Pool) GetPair

func (m *Pool) GetPair() string

func (*Pool) GetQuoteAmountByBaseAmount

func (p *Pool) GetQuoteAmountByBaseAmount(
	dir Direction, baseAmount sdk.Dec,
) (quoteAmount sdk.Dec, err error)

GetQuoteAmountByBaseAmount returns the amount of quote asset you will get out by giving a specified amount of base asset

args:

  • dir: add to pool or remove from pool
  • baseAmount: the amount of base asset to add to/remove from the pool

ret:

  • quoteAmountOut: the amount of quote assets required to make this hypothetical swap always an absolute value
  • err: error

func (*Pool) HasEnoughBaseReserve

func (p *Pool) HasEnoughBaseReserve(baseAmount sdk.Dec) bool

HasEnoughBaseReserve returns true if there is enough base reserve based on baseReserve * tradeLimitRatio

func (*Pool) HasEnoughQuoteReserve

func (p *Pool) HasEnoughQuoteReserve(quoteAmount sdk.Dec) bool

HasEnoughQuoteReserve returns true if there is enough quote reserve based on quoteReserve * tradeLimitRatio

func (*Pool) IncreaseBaseAssetReserve

func (p *Pool) IncreaseBaseAssetReserve(amount sdk.Dec)

IncreaseBaseAssetReserve increases the quote reserve by amount

func (*Pool) IncreaseQuoteAssetReserve

func (p *Pool) IncreaseQuoteAssetReserve(amount sdk.Dec)

func (*Pool) Marshal

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

func (*Pool) MarshalTo

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

func (*Pool) MarshalToSizedBuffer

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

func (*Pool) ProtoMessage

func (*Pool) ProtoMessage()

func (*Pool) Reset

func (m *Pool) Reset()

func (*Pool) Size

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

func (*Pool) String

func (m *Pool) String() string

func (*Pool) Unmarshal

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

func (*Pool) XXX_DiscardUnknown

func (m *Pool) XXX_DiscardUnknown()

func (*Pool) XXX_Marshal

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

func (*Pool) XXX_Merge

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

func (*Pool) XXX_Size

func (m *Pool) XXX_Size() int

func (*Pool) XXX_Unmarshal

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

type PricefeedKeeper

type PricefeedKeeper interface {
	GetCurrentPrice(ctx sdk.Context, token0 string, token1 string) (
		pftypes.CurrentPrice, error,
	)
}

type QueryAllPoolsRequest added in v0.5.0

type QueryAllPoolsRequest struct {
}

func (*QueryAllPoolsRequest) Descriptor added in v0.5.0

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

func (*QueryAllPoolsRequest) Marshal added in v0.5.0

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

func (*QueryAllPoolsRequest) MarshalTo added in v0.5.0

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

func (*QueryAllPoolsRequest) MarshalToSizedBuffer added in v0.5.0

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

func (*QueryAllPoolsRequest) ProtoMessage added in v0.5.0

func (*QueryAllPoolsRequest) ProtoMessage()

func (*QueryAllPoolsRequest) Reset added in v0.5.0

func (m *QueryAllPoolsRequest) Reset()

func (*QueryAllPoolsRequest) Size added in v0.5.0

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

func (*QueryAllPoolsRequest) String added in v0.5.0

func (m *QueryAllPoolsRequest) String() string

func (*QueryAllPoolsRequest) Unmarshal added in v0.5.0

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

func (*QueryAllPoolsRequest) XXX_DiscardUnknown added in v0.5.0

func (m *QueryAllPoolsRequest) XXX_DiscardUnknown()

func (*QueryAllPoolsRequest) XXX_Marshal added in v0.5.0

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

func (*QueryAllPoolsRequest) XXX_Merge added in v0.5.0

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

func (*QueryAllPoolsRequest) XXX_Size added in v0.5.0

func (m *QueryAllPoolsRequest) XXX_Size() int

func (*QueryAllPoolsRequest) XXX_Unmarshal added in v0.5.0

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

type QueryAllPoolsResponse added in v0.4.9

type QueryAllPoolsResponse struct {
	Pools []*Pool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"`
}

func (*QueryAllPoolsResponse) Descriptor added in v0.4.9

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

func (*QueryAllPoolsResponse) GetPools added in v0.4.9

func (m *QueryAllPoolsResponse) GetPools() []*Pool

func (*QueryAllPoolsResponse) Marshal added in v0.4.9

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

func (*QueryAllPoolsResponse) MarshalTo added in v0.4.9

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

func (*QueryAllPoolsResponse) MarshalToSizedBuffer added in v0.4.9

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

func (*QueryAllPoolsResponse) ProtoMessage added in v0.4.9

func (*QueryAllPoolsResponse) ProtoMessage()

func (*QueryAllPoolsResponse) Reset added in v0.4.9

func (m *QueryAllPoolsResponse) Reset()

func (*QueryAllPoolsResponse) Size added in v0.4.9

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

func (*QueryAllPoolsResponse) String added in v0.4.9

func (m *QueryAllPoolsResponse) String() string

func (*QueryAllPoolsResponse) Unmarshal added in v0.4.9

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

func (*QueryAllPoolsResponse) XXX_DiscardUnknown added in v0.4.9

func (m *QueryAllPoolsResponse) XXX_DiscardUnknown()

func (*QueryAllPoolsResponse) XXX_Marshal added in v0.4.9

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

func (*QueryAllPoolsResponse) XXX_Merge added in v0.4.9

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

func (*QueryAllPoolsResponse) XXX_Size added in v0.4.9

func (m *QueryAllPoolsResponse) XXX_Size() int

func (*QueryAllPoolsResponse) XXX_Unmarshal added in v0.4.9

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

type QueryBaseAssetPriceRequest added in v0.5.0

type QueryBaseAssetPriceRequest struct {
	Pair      string    `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"`
	Direction Direction `protobuf:"varint,2,opt,name=direction,proto3,enum=nibiru.vpool.v1.Direction" json:"direction,omitempty"`
	// base asset is the crypto asset, e.g. BTC or ETH
	BaseAssetAmount github_com_cosmos_cosmos_sdk_types.Dec `` /* 148-byte string literal not displayed */
}

func (*QueryBaseAssetPriceRequest) Descriptor added in v0.5.0

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

func (*QueryBaseAssetPriceRequest) GetDirection added in v0.5.0

func (m *QueryBaseAssetPriceRequest) GetDirection() Direction

func (*QueryBaseAssetPriceRequest) GetPair added in v0.5.0

func (m *QueryBaseAssetPriceRequest) GetPair() string

func (*QueryBaseAssetPriceRequest) Marshal added in v0.5.0

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

func (*QueryBaseAssetPriceRequest) MarshalTo added in v0.5.0

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

func (*QueryBaseAssetPriceRequest) MarshalToSizedBuffer added in v0.5.0

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

func (*QueryBaseAssetPriceRequest) ProtoMessage added in v0.5.0

func (*QueryBaseAssetPriceRequest) ProtoMessage()

func (*QueryBaseAssetPriceRequest) Reset added in v0.5.0

func (m *QueryBaseAssetPriceRequest) Reset()

func (*QueryBaseAssetPriceRequest) Size added in v0.5.0

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

func (*QueryBaseAssetPriceRequest) String added in v0.5.0

func (m *QueryBaseAssetPriceRequest) String() string

func (*QueryBaseAssetPriceRequest) Unmarshal added in v0.5.0

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

func (*QueryBaseAssetPriceRequest) XXX_DiscardUnknown added in v0.5.0

func (m *QueryBaseAssetPriceRequest) XXX_DiscardUnknown()

func (*QueryBaseAssetPriceRequest) XXX_Marshal added in v0.5.0

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

func (*QueryBaseAssetPriceRequest) XXX_Merge added in v0.5.0

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

func (*QueryBaseAssetPriceRequest) XXX_Size added in v0.5.0

func (m *QueryBaseAssetPriceRequest) XXX_Size() int

func (*QueryBaseAssetPriceRequest) XXX_Unmarshal added in v0.5.0

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

type QueryBaseAssetPriceResponse added in v0.5.0

type QueryBaseAssetPriceResponse struct {
	PriceInQuoteDenom github_com_cosmos_cosmos_sdk_types.Dec `` /* 156-byte string literal not displayed */
}

func (*QueryBaseAssetPriceResponse) Descriptor added in v0.5.0

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

func (*QueryBaseAssetPriceResponse) Marshal added in v0.5.0

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

func (*QueryBaseAssetPriceResponse) MarshalTo added in v0.5.0

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

func (*QueryBaseAssetPriceResponse) MarshalToSizedBuffer added in v0.5.0

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

func (*QueryBaseAssetPriceResponse) ProtoMessage added in v0.5.0

func (*QueryBaseAssetPriceResponse) ProtoMessage()

func (*QueryBaseAssetPriceResponse) Reset added in v0.5.0

func (m *QueryBaseAssetPriceResponse) Reset()

func (*QueryBaseAssetPriceResponse) Size added in v0.5.0

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

func (*QueryBaseAssetPriceResponse) String added in v0.5.0

func (m *QueryBaseAssetPriceResponse) String() string

func (*QueryBaseAssetPriceResponse) Unmarshal added in v0.5.0

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

func (*QueryBaseAssetPriceResponse) XXX_DiscardUnknown added in v0.5.0

func (m *QueryBaseAssetPriceResponse) XXX_DiscardUnknown()

func (*QueryBaseAssetPriceResponse) XXX_Marshal added in v0.5.0

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

func (*QueryBaseAssetPriceResponse) XXX_Merge added in v0.5.0

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

func (*QueryBaseAssetPriceResponse) XXX_Size added in v0.5.0

func (m *QueryBaseAssetPriceResponse) XXX_Size() int

func (*QueryBaseAssetPriceResponse) XXX_Unmarshal added in v0.5.0

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

type QueryClient added in v0.3.0

type QueryClient interface {
	// Queries the reserve assets in a given pool, identified by a token pair.
	ReserveAssets(ctx context.Context, in *QueryReserveAssetsRequest, opts ...grpc.CallOption) (*QueryReserveAssetsResponse, error)
	// Queries all virtual pools.
	AllPools(ctx context.Context, in *QueryAllPoolsRequest, opts ...grpc.CallOption) (*QueryAllPoolsResponse, error)
	// Queries prices
	BaseAssetPrice(ctx context.Context, in *QueryBaseAssetPriceRequest, opts ...grpc.CallOption) (*QueryBaseAssetPriceResponse, 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 added in v0.3.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryReserveAssetsRequest added in v0.5.0

type QueryReserveAssetsRequest struct {
	// always BASE:QUOTE, e.g. BTC:NUSD or ETH:NUSD
	Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"`
}

func (*QueryReserveAssetsRequest) Descriptor added in v0.5.0

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

func (*QueryReserveAssetsRequest) GetPair added in v0.5.0

func (m *QueryReserveAssetsRequest) GetPair() string

func (*QueryReserveAssetsRequest) Marshal added in v0.5.0

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

func (*QueryReserveAssetsRequest) MarshalTo added in v0.5.0

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

func (*QueryReserveAssetsRequest) MarshalToSizedBuffer added in v0.5.0

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

func (*QueryReserveAssetsRequest) ProtoMessage added in v0.5.0

func (*QueryReserveAssetsRequest) ProtoMessage()

func (*QueryReserveAssetsRequest) Reset added in v0.5.0

func (m *QueryReserveAssetsRequest) Reset()

func (*QueryReserveAssetsRequest) Size added in v0.5.0

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

func (*QueryReserveAssetsRequest) String added in v0.5.0

func (m *QueryReserveAssetsRequest) String() string

func (*QueryReserveAssetsRequest) Unmarshal added in v0.5.0

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

func (*QueryReserveAssetsRequest) XXX_DiscardUnknown added in v0.5.0

func (m *QueryReserveAssetsRequest) XXX_DiscardUnknown()

func (*QueryReserveAssetsRequest) XXX_Marshal added in v0.5.0

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

func (*QueryReserveAssetsRequest) XXX_Merge added in v0.5.0

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

func (*QueryReserveAssetsRequest) XXX_Size added in v0.5.0

func (m *QueryReserveAssetsRequest) XXX_Size() int

func (*QueryReserveAssetsRequest) XXX_Unmarshal added in v0.5.0

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

type QueryReserveAssetsResponse added in v0.3.0

type QueryReserveAssetsResponse struct {
	// base asset is the crypto asset, e.g. BTC or ETH
	BaseAssetReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 151-byte string literal not displayed */
	// quote asset is usually stablecoin, in our case NUSD
	QuoteAssetReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 154-byte string literal not displayed */
}

func (*QueryReserveAssetsResponse) Descriptor added in v0.3.0

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

func (*QueryReserveAssetsResponse) Marshal added in v0.3.0

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

func (*QueryReserveAssetsResponse) MarshalTo added in v0.3.0

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

func (*QueryReserveAssetsResponse) MarshalToSizedBuffer added in v0.3.0

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

func (*QueryReserveAssetsResponse) ProtoMessage added in v0.3.0

func (*QueryReserveAssetsResponse) ProtoMessage()

func (*QueryReserveAssetsResponse) Reset added in v0.3.0

func (m *QueryReserveAssetsResponse) Reset()

func (*QueryReserveAssetsResponse) Size added in v0.3.0

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

func (*QueryReserveAssetsResponse) String added in v0.3.0

func (m *QueryReserveAssetsResponse) String() string

func (*QueryReserveAssetsResponse) Unmarshal added in v0.3.0

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

func (*QueryReserveAssetsResponse) XXX_DiscardUnknown added in v0.3.0

func (m *QueryReserveAssetsResponse) XXX_DiscardUnknown()

func (*QueryReserveAssetsResponse) XXX_Marshal added in v0.3.0

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

func (*QueryReserveAssetsResponse) XXX_Merge added in v0.3.0

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

func (*QueryReserveAssetsResponse) XXX_Size added in v0.3.0

func (m *QueryReserveAssetsResponse) XXX_Size() int

func (*QueryReserveAssetsResponse) XXX_Unmarshal added in v0.3.0

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

type QueryServer added in v0.3.0

type QueryServer interface {
	// Queries the reserve assets in a given pool, identified by a token pair.
	ReserveAssets(context.Context, *QueryReserveAssetsRequest) (*QueryReserveAssetsResponse, error)
	// Queries all virtual pools.
	AllPools(context.Context, *QueryAllPoolsRequest) (*QueryAllPoolsResponse, error)
	// Queries prices
	BaseAssetPrice(context.Context, *QueryBaseAssetPriceRequest) (*QueryBaseAssetPriceResponse, error)
}

QueryServer is the server API for Query service.

type ReserveSnapshot

type ReserveSnapshot struct {
	BaseAssetReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 151-byte string literal not displayed */
	// quote asset is usually the margin asset, e.g. NUSD
	QuoteAssetReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 154-byte string literal not displayed */
	// milliseconds since unix epoch
	TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
	BlockNumber int64 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
}

a snapshot of the vpool's reserves at a given point in time

func (*ReserveSnapshot) Descriptor

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

func (*ReserveSnapshot) GetBlockNumber

func (m *ReserveSnapshot) GetBlockNumber() int64

func (*ReserveSnapshot) GetTimestampMs

func (m *ReserveSnapshot) GetTimestampMs() int64

func (*ReserveSnapshot) Marshal

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

func (*ReserveSnapshot) MarshalTo

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

func (*ReserveSnapshot) MarshalToSizedBuffer

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

func (*ReserveSnapshot) ProtoMessage

func (*ReserveSnapshot) ProtoMessage()

func (*ReserveSnapshot) Reset

func (m *ReserveSnapshot) Reset()

func (*ReserveSnapshot) Size

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

func (*ReserveSnapshot) String

func (m *ReserveSnapshot) String() string

func (*ReserveSnapshot) Unmarshal

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

func (*ReserveSnapshot) XXX_DiscardUnknown

func (m *ReserveSnapshot) XXX_DiscardUnknown()

func (*ReserveSnapshot) XXX_Marshal

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

func (*ReserveSnapshot) XXX_Merge

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

func (*ReserveSnapshot) XXX_Size

func (m *ReserveSnapshot) XXX_Size() int

func (*ReserveSnapshot) XXX_Unmarshal

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

type ReserveSnapshotSavedEvent added in v0.5.0

type ReserveSnapshotSavedEvent struct {
	Pair         string                                 `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"`
	QuoteReserve github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */
	BaseReserve  github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */
}

func (*ReserveSnapshotSavedEvent) Descriptor added in v0.5.0

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

func (*ReserveSnapshotSavedEvent) GetPair added in v0.5.0

func (m *ReserveSnapshotSavedEvent) GetPair() string

func (*ReserveSnapshotSavedEvent) Marshal added in v0.5.0

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

func (*ReserveSnapshotSavedEvent) MarshalTo added in v0.5.0

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

func (*ReserveSnapshotSavedEvent) MarshalToSizedBuffer added in v0.5.0

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

func (*ReserveSnapshotSavedEvent) ProtoMessage added in v0.5.0

func (*ReserveSnapshotSavedEvent) ProtoMessage()

func (*ReserveSnapshotSavedEvent) Reset added in v0.5.0

func (m *ReserveSnapshotSavedEvent) Reset()

func (*ReserveSnapshotSavedEvent) Size added in v0.5.0

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

func (*ReserveSnapshotSavedEvent) String added in v0.5.0

func (m *ReserveSnapshotSavedEvent) String() string

func (*ReserveSnapshotSavedEvent) Unmarshal added in v0.5.0

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

func (*ReserveSnapshotSavedEvent) XXX_DiscardUnknown added in v0.5.0

func (m *ReserveSnapshotSavedEvent) XXX_DiscardUnknown()

func (*ReserveSnapshotSavedEvent) XXX_Marshal added in v0.5.0

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

func (*ReserveSnapshotSavedEvent) XXX_Merge added in v0.5.0

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

func (*ReserveSnapshotSavedEvent) XXX_Size added in v0.5.0

func (m *ReserveSnapshotSavedEvent) XXX_Size() int

func (*ReserveSnapshotSavedEvent) XXX_Unmarshal added in v0.5.0

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

type SwapBaseForQuoteEvent added in v0.5.0

type SwapBaseForQuoteEvent struct {
	Pair        string                                 `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"`
	QuoteAmount github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */
	BaseAmount  github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

func (*SwapBaseForQuoteEvent) Descriptor added in v0.5.0

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

func (*SwapBaseForQuoteEvent) GetPair added in v0.5.0

func (m *SwapBaseForQuoteEvent) GetPair() string

func (*SwapBaseForQuoteEvent) Marshal added in v0.5.0

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

func (*SwapBaseForQuoteEvent) MarshalTo added in v0.5.0

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

func (*SwapBaseForQuoteEvent) MarshalToSizedBuffer added in v0.5.0

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

func (*SwapBaseForQuoteEvent) ProtoMessage added in v0.5.0

func (*SwapBaseForQuoteEvent) ProtoMessage()

func (*SwapBaseForQuoteEvent) Reset added in v0.5.0

func (m *SwapBaseForQuoteEvent) Reset()

func (*SwapBaseForQuoteEvent) Size added in v0.5.0

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

func (*SwapBaseForQuoteEvent) String added in v0.5.0

func (m *SwapBaseForQuoteEvent) String() string

func (*SwapBaseForQuoteEvent) Unmarshal added in v0.5.0

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

func (*SwapBaseForQuoteEvent) XXX_DiscardUnknown added in v0.5.0

func (m *SwapBaseForQuoteEvent) XXX_DiscardUnknown()

func (*SwapBaseForQuoteEvent) XXX_Marshal added in v0.5.0

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

func (*SwapBaseForQuoteEvent) XXX_Merge added in v0.5.0

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

func (*SwapBaseForQuoteEvent) XXX_Size added in v0.5.0

func (m *SwapBaseForQuoteEvent) XXX_Size() int

func (*SwapBaseForQuoteEvent) XXX_Unmarshal added in v0.5.0

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

type SwapQuoteForBaseEvent added in v0.5.0

type SwapQuoteForBaseEvent struct {
	Pair        string                                 `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"`
	QuoteAmount github_com_cosmos_cosmos_sdk_types.Dec `` /* 134-byte string literal not displayed */
	BaseAmount  github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

func (*SwapQuoteForBaseEvent) Descriptor added in v0.5.0

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

func (*SwapQuoteForBaseEvent) GetPair added in v0.5.0

func (m *SwapQuoteForBaseEvent) GetPair() string

func (*SwapQuoteForBaseEvent) Marshal added in v0.5.0

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

func (*SwapQuoteForBaseEvent) MarshalTo added in v0.5.0

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

func (*SwapQuoteForBaseEvent) MarshalToSizedBuffer added in v0.5.0

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

func (*SwapQuoteForBaseEvent) ProtoMessage added in v0.5.0

func (*SwapQuoteForBaseEvent) ProtoMessage()

func (*SwapQuoteForBaseEvent) Reset added in v0.5.0

func (m *SwapQuoteForBaseEvent) Reset()

func (*SwapQuoteForBaseEvent) Size added in v0.5.0

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

func (*SwapQuoteForBaseEvent) String added in v0.5.0

func (m *SwapQuoteForBaseEvent) String() string

func (*SwapQuoteForBaseEvent) Unmarshal added in v0.5.0

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

func (*SwapQuoteForBaseEvent) XXX_DiscardUnknown added in v0.5.0

func (m *SwapQuoteForBaseEvent) XXX_DiscardUnknown()

func (*SwapQuoteForBaseEvent) XXX_Marshal added in v0.5.0

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

func (*SwapQuoteForBaseEvent) XXX_Merge added in v0.5.0

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

func (*SwapQuoteForBaseEvent) XXX_Size added in v0.5.0

func (m *SwapQuoteForBaseEvent) XXX_Size() int

func (*SwapQuoteForBaseEvent) XXX_Unmarshal added in v0.5.0

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

type TwapCalcOption

type TwapCalcOption int32

Enumerates different options of calculating twap.

const (
	TwapCalcOption_TWAP_CALC_OPTION_UNSPECIFIED TwapCalcOption = 0
	// Spot price from quote asset reserve / base asset reserve
	TwapCalcOption_SPOT TwapCalcOption = 1
	// Swapping with quote assets, output denominated in base assets
	TwapCalcOption_QUOTE_ASSET_SWAP TwapCalcOption = 2
	// Swapping with base assets, output denominated in quote assets
	TwapCalcOption_BASE_ASSET_SWAP TwapCalcOption = 3
)

func (TwapCalcOption) EnumDescriptor

func (TwapCalcOption) EnumDescriptor() ([]byte, []int)

func (TwapCalcOption) String

func (x TwapCalcOption) String() string

type UnimplementedQueryServer added in v0.3.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AllPools added in v0.4.9

func (*UnimplementedQueryServer) BaseAssetPrice added in v0.5.0

func (*UnimplementedQueryServer) ReserveAssets added in v0.3.0

Jump to

Keyboard shortcuts

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