types

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 37 Imported by: 2

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeCreatePool      = "create_pool"
	EventTypeDepositBatch    = "deposit_batch"
	EventTypeWithdrawBatch   = "withdraw_batch"
	EventTypeSwapBatch       = "swap_batch"
	EventTypeCancelSwapBatch = "cancel_swap_batch"

	AttributeKeyCreator         = "creator"
	AttributeKeyDepositor       = "depositor"
	AttributeKeyWithdrawer      = "withdrawer"
	AttributeKeyOrderer         = "orderer"
	AttributeKeyXCoin           = "x_coin"
	AttributeKeyYCoin           = "y_coin"
	AttributeKeyMintedPoolCoin  = "minted_pool_coin"
	AttributeKeyPoolCoin        = "pool_coin"
	AttributeKeyRequestId       = "request_id"
	AttributeKeyPoolId          = "pool_id"
	AttributeKeyPairId          = "pair_id"
	AttributeKeyBatchId         = "batch_id"
	AttributeKeySwapRequestId   = "swap_request_id"
	AttributeKeySwapDirection   = "swap_direction"
	AttributeKeyRemainingAmount = "remaining_amount"
	AttributeKeyReceivedAmount  = "received_amount"
)

Event types for the liquidity module.

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

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

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

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName
)
View Source
const (
	TypeMsgCreatePool      = "create_pool"
	TypeMsgDepositBatch    = "deposit_batch"
	TypeMsgWithdrawBatch   = "withdraw_batch"
	TypeMsgSwapBatch       = "swap_batch"
	TypeMsgCancelSwapBatch = "cancel_swap_batch"
)

Message types for the liquidity module

View Source
const (
	PoolReserveAccPrefix   = "PoolReserveAcc"
	PairEscrowAddrPrefix   = "PairEscrowAddr"
	ModuleAddrNameSplitter = "|"
	AddressType            = farmingtypes.AddressType32Bytes
)

Variables

View Source
var (
	ErrInsufficientDepositAmount = sdkerrors.Register(ModuleName, 2, "insufficient deposit amount")
	ErrPoolAlreadyExists         = sdkerrors.Register(ModuleName, 3, "pool already exists")
	ErrWrongPair                 = sdkerrors.Register(ModuleName, 4, "wrong coin denom pair")
	ErrWrongPoolCoinDenom        = sdkerrors.Register(ModuleName, 5, "wrong pool coin denom")
	ErrInvalidPriceTick          = sdkerrors.Register(ModuleName, 6, "price not fit into ticks")
	ErrPriceOutOfRange           = sdkerrors.Register(ModuleName, 7, "price out of range limit")
	ErrTooLongOrderLifespan      = sdkerrors.Register(ModuleName, 8, "order lifespan is too long")
)

x/liquidity module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	LastPairIdKey = []byte{0xa0} // key for the latest pair id
	LastPoolIdKey = []byte{0xa1} // key for the latest pool id

	PairKeyPrefix            = []byte{0xa5}
	PairIndexKeyPrefix       = []byte{0xa6}
	PairLookupIndexKeyPrefix = []byte{0xa7}

	PoolKeyPrefix                  = []byte{0xab}
	PoolByReserveAccIndexKeyPrefix = []byte{0xac}
	PoolsByPairIndexKeyPrefix      = []byte{0xad}

	DepositRequestKeyPrefix    = []byte{0xb0}
	WithdrawRequestKeyPrefix   = []byte{0xb1}
	SwapRequestKeyPrefix       = []byte{0xb2}
	CancelSwapRequestKeyPrefix = []byte{0xb3}
)
View Source
var (
	ErrInvalidLengthLiquidity        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLiquidity          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLiquidity = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyInitialPoolCoinSupply   = []byte("InitialPoolCoinSupply")
	KeyBatchSize               = []byte("BatchSize")
	KeyTickPrecision           = []byte("TickPrecision")
	KeyMinInitialDepositAmount = []byte("MinInitialDepositAmount")
	KeyPoolCreationFee         = []byte("PoolCreationFee")
	KeyFeeCollectorAddress     = []byte("FeeCollectorAddress")
	KeyMaxPriceLimitRatio      = []byte("MaxPriceLimitRatio")
	KeySwapFeeRate             = []byte("SwapFeeRate")
	KeyWithdrawFeeRate         = []byte("WithdrawFeeRate")
	KeyMaxOrderLifespan        = []byte("MaxOrderLifespan")
)

TODO: sort keys

View Source
var (
	DefaultInitialPoolCoinSupply          = sdk.NewInt(1_000_000_000_000)
	DefaultBatchSize               uint32 = 1
	DefaultTickPrecision           uint32 = 3
	DefaultMinInitialDepositAmount        = sdk.NewInt(1000000)
	DefaultPoolCreationFee                = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1000000)))
	DefaultFeeCollectorAddress            = farmingtypes.DeriveAddress(AddressType, ModuleName, "FeeCollector")
	DefaultMaxPriceLimitRatio             = sdk.NewDecWithPrec(1, 1) // 10%
	DefaultSwapFeeRate                    = sdk.ZeroDec()
	DefaultWithdrawFeeRate                = sdk.ZeroDec()
	DefaultMaxOrderLifespan               = 24 * time.Hour
)
View Source
var (
	MinOfferCoinAmount = sdk.NewInt(100) // This value can be modified in the future

	GlobalEscrowAddr = farmingtypes.DeriveAddress(AddressType, ModuleName, "GlobalEscrow")
)
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")
)
View Source
var SwapDirection_name = map[int32]string{
	0: "SWAP_DIRECTION_UNSPECIFIED",
	1: "SWAP_DIRECTION_BUY",
	2: "SWAP_DIRECTION_SELL",
}
View Source
var SwapDirection_value = map[string]int32{
	"SWAP_DIRECTION_UNSPECIFIED": 0,
	"SWAP_DIRECTION_BUY":         1,
	"SWAP_DIRECTION_SELL":        2,
}

Functions

func DepositToPool

func DepositToPool(pool PoolI, x, y sdk.Int) (ax, ay, pc sdk.Int)

DepositToPool returns accepted x amount, accepted y amount and minted pool coin amount.

func DownTick

func DownTick(price sdk.Dec, prec int) sdk.Dec

DownTick returns the next highest price tick under the price. DownTick guarantees that the price is already fit in ticks. DownTick doesn't check if the price is the lowest price tick.

func GetCancelSwapRequestKey

func GetCancelSwapRequestKey(pairId, id uint64) []byte

GetCancelSwapRequestKey returns the store key to retrieve cancel swap request object from pair id and request id.

func GetDepositRequestKey

func GetDepositRequestKey(poolId, id uint64) []byte

GetDepositRequestKey returns the store key to retrieve deposit request object from the pool id and request id.

func GetPairByDenomKeyPrefix

func GetPairByDenomKeyPrefix(denom string) []byte

GetPairByDenomKeyPrefix returns the single denom index key.

func GetPairIndexKey

func GetPairIndexKey(denomX, denomY string) []byte

GetPairIndexKey returns the index key to get a pair by denoms.

func GetPairKey

func GetPairKey(pairId uint64) []byte

GetPairKey returns the store key to retrieve pair object from the pair id.

func GetPairLookupIndexKey

func GetPairLookupIndexKey(denomA, denomB string, pairId uint64) []byte

GetPairLookupIndexKey returns the index key to lookup pairs with given denoms.

func GetPoolByReserveAccIndexKey

func GetPoolByReserveAccIndexKey(reserveAcc sdk.AccAddress) []byte

GetPoolByReserveAccIndexKey returns the index key to retrieve the particular pool.

func GetPoolKey

func GetPoolKey(poolId uint64) []byte

GetPoolKey returns the store key to retrieve pool object from the pool id.

func GetPoolsByPairIndexKey

func GetPoolsByPairIndexKey(pairId, poolId uint64) []byte

GetPoolsByPairIndexKey returns the index key to retrieve pool id that is used to iterate pools.

func GetPoolsByPairIndexKeyPrefix

func GetPoolsByPairIndexKeyPrefix(pairId uint64) []byte

GetPoolsByPairIndexKeyPrefix returns the store key to retrieve pool id to iterate pools.

func GetSwapRequestKey

func GetSwapRequestKey(pairId, id uint64) []byte

GetSwapRequestKey returns the store key to retrieve swap request object from the pair id and request id.

func GetSwapRequestsByPairKeyPrefix

func GetSwapRequestsByPairKeyPrefix(pairId uint64) []byte

GetSwapRequestsByPairKeyPrefix returns the store key to iterate swap requests by pair.

func GetWithdrawRequestKey

func GetWithdrawRequestKey(poolId, id uint64) []byte

GetWithdrawRequestKey returns the store key to retrieve withdraw request object from the pool id and request id.

func IsDepletedPool

func IsDepletedPool(pool PoolI) bool

func LengthPrefixString

func LengthPrefixString(s string) []byte

LengthPrefixString returns length-prefixed bytes representation of a string.

func LowestTick

func LowestTick(prec int) sdk.Dec

LowestTick returns the lowest possible price tick.

func MatchOrders

func MatchOrders(buyOrders, sellOrders Orders, price sdk.Dec)

MatchOrders matches two order groups at given price.

func MustMarshaSwapRequest

func MustMarshaSwapRequest(cdc codec.BinaryCodec, msg SwapRequest) []byte

MustMarshaSwapRequest returns the SwapRequest bytes. It throws panic if it fails.

func MustMarshaWithdrawRequest

func MustMarshaWithdrawRequest(cdc codec.BinaryCodec, msg WithdrawRequest) []byte

MustMarshaWithdrawRequest returns the WithdrawRequest bytes. It throws panic if it fails.

func MustMarshalDepositRequest

func MustMarshalDepositRequest(cdc codec.BinaryCodec, msg DepositRequest) []byte

MustMarshalDepositRequest returns the DepositRequest bytes. Panics if fails.

func MustMarshalPair

func MustMarshalPair(cdc codec.BinaryCodec, pair Pair) []byte

MustMarshalPair returns the pair bytes. It throws panic if it fails.

func MustMarshalPool

func MustMarshalPool(cdc codec.BinaryCodec, pool Pool) []byte

MustMarshalPool returns the pool bytes. It throws panic if it fails.

func PairEscrowAddr

func PairEscrowAddr(pairId uint64) sdk.AccAddress

PairEscrowAddr returns a unique address of the pair's escrow.

func ParamKeyTable

func ParamKeyTable() paramstypes.KeyTable

func ParsePairByDenomIndexKey

func ParsePairByDenomIndexKey(key []byte) (denomB string, pairId uint64)

ParsePairByDenomIndexKey parses a pair by denom index key.

func ParsePoolCoinDenom

func ParsePoolCoinDenom(denom string) uint64

ParsePoolCoinDenom trims pool prefix from the pool coin denom and returns pool id.

func ParsePoolsByPairIndexKey

func ParsePoolsByPairIndexKey(key []byte) (poolId uint64)

ParsePoolsByPairIndexKey parses a pool id from the index key.

func PoolCoinDenom

func PoolCoinDenom(poolId uint64) string

PoolCoinDenom returns a unique pool coin denom for a pool.

func PoolReserveAcc

func PoolReserveAcc(poolId uint64) sdk.AccAddress

PoolReserveAcc returns a unique pool reserve account address for each pool. TODO: rename to PoolReserveAddr

func PriceToTick

func PriceToTick(price sdk.Dec, prec int) sdk.Dec

PriceToTick returns the highest price tick under(or equal to) the price.

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func TickFromIndex

func TickFromIndex(i, prec int) sdk.Dec

TickFromIndex returns a price for given tick index. See TickToIndex for more details about tick indices.

func TickToIndex

func TickToIndex(price sdk.Dec, prec int) int

TickToIndex returns a tick index for given price. Tick index 0 means the lowest possible price fit in ticks.

func UpTick

func UpTick(price sdk.Dec, prec int) sdk.Dec

UpTick returns the next lowest price tick above the price. UpTick guarantees that the price is already fit in ticks.

func WithdrawFromPool

func WithdrawFromPool(pool PoolI, pc sdk.Int, feeRate sdk.Dec) (x, y sdk.Int)

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
}

type BankKeeper

type BankKeeper interface {
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	SendCoins(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	InputOutputCoins(ctx sdk.Context, inputs []banktypes.Input, outputs []banktypes.Output) error
}

type BulkSendCoinsOperation

type BulkSendCoinsOperation struct {
	Inputs  []banktypes.Input
	Outputs []banktypes.Output
}

func NewBulkSendCoinsOperation

func NewBulkSendCoinsOperation() *BulkSendCoinsOperation

func (*BulkSendCoinsOperation) Run

func (op *BulkSendCoinsOperation) Run(ctx sdk.Context, bankKeeper BankKeeper) error

func (*BulkSendCoinsOperation) SendCoins

func (op *BulkSendCoinsOperation) SendCoins(fromAddr, toAddr sdk.AccAddress, amt sdk.Coins)

type CancelSwapRequest

type CancelSwapRequest struct {
	Id            uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	PairId        uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	MsgHeight     int64  `protobuf:"varint,3,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty"`
	Orderer       string `protobuf:"bytes,4,opt,name=orderer,proto3" json:"orderer,omitempty"`
	SwapRequestId uint64 `protobuf:"varint,5,opt,name=swap_request_id,json=swapRequestId,proto3" json:"swap_request_id,omitempty"`
	BatchId       uint64 `protobuf:"varint,6,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
	Succeeded     bool   `protobuf:"varint,7,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	ToBeDeleted   bool   `protobuf:"varint,8,opt,name=to_be_deleted,json=toBeDeleted,proto3" json:"to_be_deleted,omitempty"`
}

CancelSwapRequest defines a request to cancel a swap request.

func NewCancelSwapRequest

func NewCancelSwapRequest(
	msg *MsgCancelSwapBatch, id uint64, pair Pair, msgHeight int64) CancelSwapRequest

func (*CancelSwapRequest) Descriptor

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

func (*CancelSwapRequest) Marshal

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

func (*CancelSwapRequest) MarshalTo

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

func (*CancelSwapRequest) MarshalToSizedBuffer

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

func (*CancelSwapRequest) ProtoMessage

func (*CancelSwapRequest) ProtoMessage()

func (*CancelSwapRequest) Reset

func (m *CancelSwapRequest) Reset()

func (*CancelSwapRequest) Size

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

func (*CancelSwapRequest) String

func (m *CancelSwapRequest) String() string

func (*CancelSwapRequest) Unmarshal

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

func (*CancelSwapRequest) XXX_DiscardUnknown

func (m *CancelSwapRequest) XXX_DiscardUnknown()

func (*CancelSwapRequest) XXX_Marshal

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

func (*CancelSwapRequest) XXX_Merge

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

func (*CancelSwapRequest) XXX_Size

func (m *CancelSwapRequest) XXX_Size() int

func (*CancelSwapRequest) XXX_Unmarshal

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

type DepositRequest

type DepositRequest struct {
	// id specifies the id for the request
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// pool_id specifies the pool id
	PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// msg_height specifies the block height when the request is stored for the batch execution
	MsgHeight int64 `protobuf:"varint,3,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty"`
	// depositor specifies the bech32-encoded address that makes a deposit to the pool
	Depositor string `protobuf:"bytes,4,opt,name=depositor,proto3" json:"depositor,omitempty"`
	// x_coin specifies the deposit coin x
	XCoin         types.Coin `protobuf:"bytes,5,opt,name=x_coin,json=xCoin,proto3" json:"x_coin"`
	AcceptedXCoin types.Coin `protobuf:"bytes,6,opt,name=accepted_x_coin,json=acceptedXCoin,proto3" json:"accepted_x_coin"`
	// y_coin specifies the deposit coin y
	YCoin          types.Coin `protobuf:"bytes,7,opt,name=y_coin,json=yCoin,proto3" json:"y_coin"`
	AcceptedYCoin  types.Coin `protobuf:"bytes,8,opt,name=accepted_y_coin,json=acceptedYCoin,proto3" json:"accepted_y_coin"`
	MintedPoolCoin types.Coin `protobuf:"bytes,9,opt,name=minted_pool_coin,json=mintedPoolCoin,proto3" json:"minted_pool_coin"`
	Succeeded      bool       `protobuf:"varint,10,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	ToBeDeleted    bool       `protobuf:"varint,11,opt,name=to_be_deleted,json=toBeDeleted,proto3" json:"to_be_deleted,omitempty"`
}

DepositRequest defines a deposit request.

func MustUnmarshalDepositRequest

func MustUnmarshalDepositRequest(cdc codec.BinaryCodec, value []byte) DepositRequest

MustUnmarshalDepositRequest returns the DepositRequest from bytes. It throws panic if it fails.

func NewDepositRequest

func NewDepositRequest(msg *MsgDepositBatch, id uint64, msgHeight int64) DepositRequest

func UnmarshalDepositRequest

func UnmarshalDepositRequest(cdc codec.BinaryCodec, value []byte) (msg DepositRequest, err error)

UnmarshalDepositMsgState returns the DepositRequest from bytes.

func (*DepositRequest) Descriptor

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

func (DepositRequest) GetDepositor

func (req DepositRequest) GetDepositor() sdk.AccAddress

func (*DepositRequest) Marshal

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

func (*DepositRequest) MarshalTo

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

func (*DepositRequest) MarshalToSizedBuffer

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

func (*DepositRequest) ProtoMessage

func (*DepositRequest) ProtoMessage()

func (*DepositRequest) Reset

func (m *DepositRequest) Reset()

func (*DepositRequest) Size

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

func (*DepositRequest) String

func (m *DepositRequest) String() string

func (*DepositRequest) Unmarshal

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

func (*DepositRequest) XXX_DiscardUnknown

func (m *DepositRequest) XXX_DiscardUnknown()

func (*DepositRequest) XXX_Marshal

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

func (*DepositRequest) XXX_Merge

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

func (*DepositRequest) XXX_Size

func (m *DepositRequest) XXX_Size() int

func (*DepositRequest) XXX_Unmarshal

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

type GenesisState

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

GenesisState defines the liquidity module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

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

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MatchEngine

type MatchEngine struct {
	BuyOrderSource  OrderSource
	SellOrderSource OrderSource
	TickPrecision   int // price tick precision
}

func NewMatchEngine

func NewMatchEngine(buys, sells OrderSource, prec int) *MatchEngine

func (*MatchEngine) EstimatedPriceDirection

func (engine *MatchEngine) EstimatedPriceDirection(lastPrice sdk.Dec) PriceDirection

func (*MatchEngine) Match

func (engine *MatchEngine) Match(lastPrice sdk.Dec) (orderBook *OrderBook, swapPrice sdk.Dec, matched bool)

func (*MatchEngine) Matchable

func (engine *MatchEngine) Matchable() bool

func (*MatchEngine) SwapPrice

func (engine *MatchEngine) SwapPrice(lastPrice sdk.Dec) sdk.Dec

SwapPrice assumes that the last price is fit in tick.

type MergedOrderSources

type MergedOrderSources struct {
	Sources []OrderSource
}

func (*MergedOrderSources) AmountGTE

func (os *MergedOrderSources) AmountGTE(price sdk.Dec) sdk.Int

func (*MergedOrderSources) AmountLTE

func (os *MergedOrderSources) AmountLTE(price sdk.Dec) sdk.Int

func (*MergedOrderSources) DownTick

func (os *MergedOrderSources) DownTick(price sdk.Dec) (tick sdk.Dec, found bool)

func (*MergedOrderSources) DownTickWithOrders

func (os *MergedOrderSources) DownTickWithOrders(price sdk.Dec) (tick sdk.Dec, found bool)

func (*MergedOrderSources) HighestTick

func (os *MergedOrderSources) HighestTick() (tick sdk.Dec, found bool)

func (*MergedOrderSources) LowestTick

func (os *MergedOrderSources) LowestTick() (tick sdk.Dec, found bool)

func (*MergedOrderSources) Orders

func (os *MergedOrderSources) Orders(price sdk.Dec) Orders

func (*MergedOrderSources) UpTick

func (os *MergedOrderSources) UpTick(price sdk.Dec) (tick sdk.Dec, found bool)

func (*MergedOrderSources) UpTickWithOrders

func (os *MergedOrderSources) UpTickWithOrders(price sdk.Dec) (tick sdk.Dec, found bool)

type MsgCancelSwapBatch

type MsgCancelSwapBatch struct {
	// orderer specifies the bech32-encoded address that makes an order to swap from the pool
	Orderer string `protobuf:"bytes,1,opt,name=orderer,proto3" json:"orderer,omitempty"`
	// pair_id specifies the pair id
	PairId uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	// swap_request_id specifies the swap request id
	SwapRequestId uint64 `protobuf:"varint,3,opt,name=swap_request_id,json=swapRequestId,proto3" json:"swap_request_id,omitempty"`
}

MsgCancelSwapBatch defines an SDK message for cancelling a swap request

func NewMsgCancelSwapBatch

func NewMsgCancelSwapBatch(
	orderer sdk.AccAddress,
	pairId uint64,
	swapRequestId uint64,
) *MsgCancelSwapBatch

NewMsgCancelSwapBatch creates a new MsgCancelSwapBatch.

func (*MsgCancelSwapBatch) Descriptor

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

func (MsgCancelSwapBatch) GetOrderer

func (msg MsgCancelSwapBatch) GetOrderer() sdk.AccAddress

func (MsgCancelSwapBatch) GetSignBytes

func (msg MsgCancelSwapBatch) GetSignBytes() []byte

func (MsgCancelSwapBatch) GetSigners

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

func (*MsgCancelSwapBatch) Marshal

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

func (*MsgCancelSwapBatch) MarshalTo

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

func (*MsgCancelSwapBatch) MarshalToSizedBuffer

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

func (*MsgCancelSwapBatch) ProtoMessage

func (*MsgCancelSwapBatch) ProtoMessage()

func (*MsgCancelSwapBatch) Reset

func (m *MsgCancelSwapBatch) Reset()

func (MsgCancelSwapBatch) Route

func (msg MsgCancelSwapBatch) Route() string

func (*MsgCancelSwapBatch) Size

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

func (*MsgCancelSwapBatch) String

func (m *MsgCancelSwapBatch) String() string

func (MsgCancelSwapBatch) Type

func (msg MsgCancelSwapBatch) Type() string

func (*MsgCancelSwapBatch) Unmarshal

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

func (MsgCancelSwapBatch) ValidateBasic

func (msg MsgCancelSwapBatch) ValidateBasic() error

func (*MsgCancelSwapBatch) XXX_DiscardUnknown

func (m *MsgCancelSwapBatch) XXX_DiscardUnknown()

func (*MsgCancelSwapBatch) XXX_Marshal

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

func (*MsgCancelSwapBatch) XXX_Merge

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

func (*MsgCancelSwapBatch) XXX_Size

func (m *MsgCancelSwapBatch) XXX_Size() int

func (*MsgCancelSwapBatch) XXX_Unmarshal

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

type MsgCancelSwapBatchResponse

type MsgCancelSwapBatchResponse struct {
}

MsgCancelSwapBatchResponse defines the Msg/CancelSwapBatch response type.

func (*MsgCancelSwapBatchResponse) Descriptor

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

func (*MsgCancelSwapBatchResponse) Marshal

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

func (*MsgCancelSwapBatchResponse) MarshalTo

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

func (*MsgCancelSwapBatchResponse) MarshalToSizedBuffer

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

func (*MsgCancelSwapBatchResponse) ProtoMessage

func (*MsgCancelSwapBatchResponse) ProtoMessage()

func (*MsgCancelSwapBatchResponse) Reset

func (m *MsgCancelSwapBatchResponse) Reset()

func (*MsgCancelSwapBatchResponse) Size

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

func (*MsgCancelSwapBatchResponse) String

func (m *MsgCancelSwapBatchResponse) String() string

func (*MsgCancelSwapBatchResponse) Unmarshal

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

func (*MsgCancelSwapBatchResponse) XXX_DiscardUnknown

func (m *MsgCancelSwapBatchResponse) XXX_DiscardUnknown()

func (*MsgCancelSwapBatchResponse) XXX_Marshal

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

func (*MsgCancelSwapBatchResponse) XXX_Merge

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

func (*MsgCancelSwapBatchResponse) XXX_Size

func (m *MsgCancelSwapBatchResponse) XXX_Size() int

func (*MsgCancelSwapBatchResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// CreatePool defines a method for creating a pool
	CreatePool(ctx context.Context, in *MsgCreatePool, opts ...grpc.CallOption) (*MsgCreatePoolResponse, error)
	// DepositBatch defines a method for depositing coins to the pool
	DepositBatch(ctx context.Context, in *MsgDepositBatch, opts ...grpc.CallOption) (*MsgDepositBatchResponse, error)
	// WithdrawBatch defines a method for withdrawing pool coin from the pool
	WithdrawBatch(ctx context.Context, in *MsgWithdrawBatch, opts ...grpc.CallOption) (*MsgWithdrawBatchResponse, error)
	// SwapBatch defines a method for swapping X coin to Y coin from the pool
	SwapBatch(ctx context.Context, in *MsgSwapBatch, opts ...grpc.CallOption) (*MsgSwapBatchResponse, error)
	// CancelSwapBatch defines a method for cancelling a swap request
	CancelSwapBatch(ctx context.Context, in *MsgCancelSwapBatch, opts ...grpc.CallOption) (*MsgCancelSwapBatchResponse, 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 MsgCreatePool

type MsgCreatePool struct {
	// creator specifies the bech32-encoded address that is the pool creator
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// x_coin specifies the deposit coin x
	XCoin types.Coin `protobuf:"bytes,2,opt,name=x_coin,json=xCoin,proto3" json:"x_coin"`
	// y_coin specifies the deposit coin y
	YCoin types.Coin `protobuf:"bytes,3,opt,name=y_coin,json=yCoin,proto3" json:"y_coin"`
}

MsgCreatePool defines an SDK message for creating a pool.

func NewMsgCreatePool

func NewMsgCreatePool(
	creator sdk.AccAddress,
	xCoin sdk.Coin,
	yCoin sdk.Coin,
) *MsgCreatePool

NewMsgCreatePool creates a new MsgCreatePool.

func (*MsgCreatePool) Descriptor

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

func (MsgCreatePool) GetCreator

func (msg MsgCreatePool) GetCreator() sdk.AccAddress

func (MsgCreatePool) GetSignBytes

func (msg MsgCreatePool) GetSignBytes() []byte

func (MsgCreatePool) GetSigners

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

func (*MsgCreatePool) Marshal

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

func (*MsgCreatePool) MarshalTo

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

func (*MsgCreatePool) MarshalToSizedBuffer

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

func (*MsgCreatePool) ProtoMessage

func (*MsgCreatePool) ProtoMessage()

func (*MsgCreatePool) Reset

func (m *MsgCreatePool) Reset()

func (MsgCreatePool) Route

func (msg MsgCreatePool) Route() string

func (*MsgCreatePool) Size

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

func (*MsgCreatePool) String

func (m *MsgCreatePool) String() string

func (MsgCreatePool) Type

func (msg MsgCreatePool) Type() string

func (*MsgCreatePool) Unmarshal

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

func (MsgCreatePool) ValidateBasic

func (msg MsgCreatePool) ValidateBasic() error

func (*MsgCreatePool) XXX_DiscardUnknown

func (m *MsgCreatePool) XXX_DiscardUnknown()

func (*MsgCreatePool) XXX_Marshal

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

func (*MsgCreatePool) XXX_Merge

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

func (*MsgCreatePool) XXX_Size

func (m *MsgCreatePool) XXX_Size() int

func (*MsgCreatePool) XXX_Unmarshal

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

type MsgCreatePoolResponse

type MsgCreatePoolResponse struct {
}

MsgCreatePoolResponse defines the Msg/CreatePool response type.

func (*MsgCreatePoolResponse) Descriptor

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

func (*MsgCreatePoolResponse) Marshal

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

func (*MsgCreatePoolResponse) MarshalTo

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

func (*MsgCreatePoolResponse) MarshalToSizedBuffer

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

func (*MsgCreatePoolResponse) ProtoMessage

func (*MsgCreatePoolResponse) ProtoMessage()

func (*MsgCreatePoolResponse) Reset

func (m *MsgCreatePoolResponse) Reset()

func (*MsgCreatePoolResponse) Size

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

func (*MsgCreatePoolResponse) String

func (m *MsgCreatePoolResponse) String() string

func (*MsgCreatePoolResponse) Unmarshal

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

func (*MsgCreatePoolResponse) XXX_DiscardUnknown

func (m *MsgCreatePoolResponse) XXX_DiscardUnknown()

func (*MsgCreatePoolResponse) XXX_Marshal

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

func (*MsgCreatePoolResponse) XXX_Merge

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

func (*MsgCreatePoolResponse) XXX_Size

func (m *MsgCreatePoolResponse) XXX_Size() int

func (*MsgCreatePoolResponse) XXX_Unmarshal

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

type MsgDepositBatch

type MsgDepositBatch struct {
	// depositor specifies the bech32-encoded address that makes a deposit to the pool
	Depositor string `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,omitempty"`
	// pool_id specifies the pool id
	PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// x_coin specifies the deposit coin x
	XCoin types.Coin `protobuf:"bytes,3,opt,name=x_coin,json=xCoin,proto3" json:"x_coin"`
	// y_coin specifies the deposit coin y
	YCoin types.Coin `protobuf:"bytes,4,opt,name=y_coin,json=yCoin,proto3" json:"y_coin"`
}

MsgDepositBatch defines an SDK message for depositing coins to the pool

func NewMsgDepositBatch

func NewMsgDepositBatch(
	depositor sdk.AccAddress,
	poolId uint64,
	xCoin sdk.Coin,
	yCoin sdk.Coin,
) *MsgDepositBatch

NewMsgDepositBatch creates a new MsgDepositBatch.

func (*MsgDepositBatch) Descriptor

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

func (MsgDepositBatch) GetDepositor

func (msg MsgDepositBatch) GetDepositor() sdk.AccAddress

func (MsgDepositBatch) GetSignBytes

func (msg MsgDepositBatch) GetSignBytes() []byte

func (MsgDepositBatch) GetSigners

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

func (*MsgDepositBatch) Marshal

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

func (*MsgDepositBatch) MarshalTo

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

func (*MsgDepositBatch) MarshalToSizedBuffer

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

func (*MsgDepositBatch) ProtoMessage

func (*MsgDepositBatch) ProtoMessage()

func (*MsgDepositBatch) Reset

func (m *MsgDepositBatch) Reset()

func (MsgDepositBatch) Route

func (msg MsgDepositBatch) Route() string

func (*MsgDepositBatch) Size

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

func (*MsgDepositBatch) String

func (m *MsgDepositBatch) String() string

func (MsgDepositBatch) Type

func (msg MsgDepositBatch) Type() string

func (*MsgDepositBatch) Unmarshal

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

func (MsgDepositBatch) ValidateBasic

func (msg MsgDepositBatch) ValidateBasic() error

func (*MsgDepositBatch) XXX_DiscardUnknown

func (m *MsgDepositBatch) XXX_DiscardUnknown()

func (*MsgDepositBatch) XXX_Marshal

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

func (*MsgDepositBatch) XXX_Merge

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

func (*MsgDepositBatch) XXX_Size

func (m *MsgDepositBatch) XXX_Size() int

func (*MsgDepositBatch) XXX_Unmarshal

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

type MsgDepositBatchResponse

type MsgDepositBatchResponse struct {
}

MsgDepositBatchResponse defines the Msg/DepositBatch response type.

func (*MsgDepositBatchResponse) Descriptor

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

func (*MsgDepositBatchResponse) Marshal

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

func (*MsgDepositBatchResponse) MarshalTo

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

func (*MsgDepositBatchResponse) MarshalToSizedBuffer

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

func (*MsgDepositBatchResponse) ProtoMessage

func (*MsgDepositBatchResponse) ProtoMessage()

func (*MsgDepositBatchResponse) Reset

func (m *MsgDepositBatchResponse) Reset()

func (*MsgDepositBatchResponse) Size

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

func (*MsgDepositBatchResponse) String

func (m *MsgDepositBatchResponse) String() string

func (*MsgDepositBatchResponse) Unmarshal

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

func (*MsgDepositBatchResponse) XXX_DiscardUnknown

func (m *MsgDepositBatchResponse) XXX_DiscardUnknown()

func (*MsgDepositBatchResponse) XXX_Marshal

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

func (*MsgDepositBatchResponse) XXX_Merge

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

func (*MsgDepositBatchResponse) XXX_Size

func (m *MsgDepositBatchResponse) XXX_Size() int

func (*MsgDepositBatchResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// CreatePool defines a method for creating a pool
	CreatePool(context.Context, *MsgCreatePool) (*MsgCreatePoolResponse, error)
	// DepositBatch defines a method for depositing coins to the pool
	DepositBatch(context.Context, *MsgDepositBatch) (*MsgDepositBatchResponse, error)
	// WithdrawBatch defines a method for withdrawing pool coin from the pool
	WithdrawBatch(context.Context, *MsgWithdrawBatch) (*MsgWithdrawBatchResponse, error)
	// SwapBatch defines a method for swapping X coin to Y coin from the pool
	SwapBatch(context.Context, *MsgSwapBatch) (*MsgSwapBatchResponse, error)
	// CancelSwapBatch defines a method for cancelling a swap request
	CancelSwapBatch(context.Context, *MsgCancelSwapBatch) (*MsgCancelSwapBatchResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSwapBatch

type MsgSwapBatch struct {
	// orderer specifies the bech32-encoded address that makes an order to swap from the pool
	Orderer string `protobuf:"bytes,1,opt,name=orderer,proto3" json:"orderer,omitempty"`
	// x_coin_denom specifies the x coin denom of a pair.
	XCoinDenom string `protobuf:"bytes,2,opt,name=x_coin_denom,json=xCoinDenom,proto3" json:"x_coin_denom,omitempty"`
	// y_coin_denom specifies the y coin denom of a pair.
	YCoinDenom string `protobuf:"bytes,3,opt,name=y_coin_denom,json=yCoinDenom,proto3" json:"y_coin_denom,omitempty"`
	// coin specifies the offer coin that the orderer offers to swap with
	OfferCoin types.Coin `protobuf:"bytes,4,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin"`
	// demand_coin_denom specifies the coin denom that is exchanged during the swap request; it must match the denom in
	// the pool
	DemandCoinDenom string `protobuf:"bytes,5,opt,name=demand_coin_denom,json=demandCoinDenom,proto3" json:"demand_coin_denom,omitempty"`
	// price specifies ...
	Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
	// order_lifespan specifies the order lifespan
	OrderLifespan time.Duration `protobuf:"bytes,7,opt,name=order_lifespan,json=orderLifespan,proto3,stdduration" json:"order_lifespan"`
}

MsgSwapBatch defines an SDK message for swapping X coin to Y coin from the pool

func NewMsgSwapBatch

func NewMsgSwapBatch(
	orderer sdk.AccAddress,
	xCoinDenom string,
	yCoinDenom string,
	offerCoin sdk.Coin,
	demandCoinDenom string,
	price sdk.Dec,
	orderLifespan time.Duration,
) *MsgSwapBatch

NewMsgSwapBatch creates a new MsgSwapBatch.

func (*MsgSwapBatch) Descriptor

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

func (MsgSwapBatch) GetDirection

func (msg MsgSwapBatch) GetDirection() SwapDirection

func (MsgSwapBatch) GetOrderer

func (msg MsgSwapBatch) GetOrderer() sdk.AccAddress

func (MsgSwapBatch) GetSignBytes

func (msg MsgSwapBatch) GetSignBytes() []byte

func (MsgSwapBatch) GetSigners

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

func (*MsgSwapBatch) Marshal

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

func (*MsgSwapBatch) MarshalTo

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

func (*MsgSwapBatch) MarshalToSizedBuffer

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

func (*MsgSwapBatch) ProtoMessage

func (*MsgSwapBatch) ProtoMessage()

func (*MsgSwapBatch) Reset

func (m *MsgSwapBatch) Reset()

func (MsgSwapBatch) Route

func (msg MsgSwapBatch) Route() string

func (*MsgSwapBatch) Size

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

func (*MsgSwapBatch) String

func (m *MsgSwapBatch) String() string

func (MsgSwapBatch) Type

func (msg MsgSwapBatch) Type() string

func (*MsgSwapBatch) Unmarshal

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

func (MsgSwapBatch) ValidateBasic

func (msg MsgSwapBatch) ValidateBasic() error

func (*MsgSwapBatch) XXX_DiscardUnknown

func (m *MsgSwapBatch) XXX_DiscardUnknown()

func (*MsgSwapBatch) XXX_Marshal

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

func (*MsgSwapBatch) XXX_Merge

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

func (*MsgSwapBatch) XXX_Size

func (m *MsgSwapBatch) XXX_Size() int

func (*MsgSwapBatch) XXX_Unmarshal

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

type MsgSwapBatchResponse

type MsgSwapBatchResponse struct {
}

MsgSwapBatchResponse defines the Msg/SwapBatch response type.

func (*MsgSwapBatchResponse) Descriptor

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

func (*MsgSwapBatchResponse) Marshal

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

func (*MsgSwapBatchResponse) MarshalTo

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

func (*MsgSwapBatchResponse) MarshalToSizedBuffer

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

func (*MsgSwapBatchResponse) ProtoMessage

func (*MsgSwapBatchResponse) ProtoMessage()

func (*MsgSwapBatchResponse) Reset

func (m *MsgSwapBatchResponse) Reset()

func (*MsgSwapBatchResponse) Size

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

func (*MsgSwapBatchResponse) String

func (m *MsgSwapBatchResponse) String() string

func (*MsgSwapBatchResponse) Unmarshal

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

func (*MsgSwapBatchResponse) XXX_DiscardUnknown

func (m *MsgSwapBatchResponse) XXX_DiscardUnknown()

func (*MsgSwapBatchResponse) XXX_Marshal

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

func (*MsgSwapBatchResponse) XXX_Merge

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

func (*MsgSwapBatchResponse) XXX_Size

func (m *MsgSwapBatchResponse) XXX_Size() int

func (*MsgSwapBatchResponse) XXX_Unmarshal

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

type MsgWithdrawBatch

type MsgWithdrawBatch struct {
	// withdrawer specifies the bech32-encoded address that withdraws pool coin from the pool
	Withdrawer string `protobuf:"bytes,1,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"`
	// pool_id specifies the pool id
	PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// pool_coin specifies the pool coin that is a proof of liquidity provider for the pool
	PoolCoin types.Coin `protobuf:"bytes,3,opt,name=pool_coin,json=poolCoin,proto3" json:"pool_coin"`
}

MsgWithdrawBatch defines an SDK message for withdrawing pool coin from the pool

func NewMsgWithdrawBatch

func NewMsgWithdrawBatch(
	withdrawer sdk.AccAddress,
	poolId uint64,
	poolCoin sdk.Coin,
) *MsgWithdrawBatch

NewMsgWithdrawBatch creates a new MsgWithdrawBatch.

func (*MsgWithdrawBatch) Descriptor

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

func (MsgWithdrawBatch) GetSignBytes

func (msg MsgWithdrawBatch) GetSignBytes() []byte

func (MsgWithdrawBatch) GetSigners

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

func (MsgWithdrawBatch) GetWithdrawer

func (msg MsgWithdrawBatch) GetWithdrawer() sdk.AccAddress

func (*MsgWithdrawBatch) Marshal

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

func (*MsgWithdrawBatch) MarshalTo

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

func (*MsgWithdrawBatch) MarshalToSizedBuffer

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

func (*MsgWithdrawBatch) ProtoMessage

func (*MsgWithdrawBatch) ProtoMessage()

func (*MsgWithdrawBatch) Reset

func (m *MsgWithdrawBatch) Reset()

func (MsgWithdrawBatch) Route

func (msg MsgWithdrawBatch) Route() string

func (*MsgWithdrawBatch) Size

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

func (*MsgWithdrawBatch) String

func (m *MsgWithdrawBatch) String() string

func (MsgWithdrawBatch) Type

func (msg MsgWithdrawBatch) Type() string

func (*MsgWithdrawBatch) Unmarshal

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

func (MsgWithdrawBatch) ValidateBasic

func (msg MsgWithdrawBatch) ValidateBasic() error

func (*MsgWithdrawBatch) XXX_DiscardUnknown

func (m *MsgWithdrawBatch) XXX_DiscardUnknown()

func (*MsgWithdrawBatch) XXX_Marshal

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

func (*MsgWithdrawBatch) XXX_Merge

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

func (*MsgWithdrawBatch) XXX_Size

func (m *MsgWithdrawBatch) XXX_Size() int

func (*MsgWithdrawBatch) XXX_Unmarshal

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

type MsgWithdrawBatchResponse

type MsgWithdrawBatchResponse struct {
}

MsgWithdrawBatchResponse defines the Msg/WithdrawBatch response type.

func (*MsgWithdrawBatchResponse) Descriptor

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

func (*MsgWithdrawBatchResponse) Marshal

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

func (*MsgWithdrawBatchResponse) MarshalTo

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

func (*MsgWithdrawBatchResponse) MarshalToSizedBuffer

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

func (*MsgWithdrawBatchResponse) ProtoMessage

func (*MsgWithdrawBatchResponse) ProtoMessage()

func (*MsgWithdrawBatchResponse) Reset

func (m *MsgWithdrawBatchResponse) Reset()

func (*MsgWithdrawBatchResponse) Size

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

func (*MsgWithdrawBatchResponse) String

func (m *MsgWithdrawBatchResponse) String() string

func (*MsgWithdrawBatchResponse) Unmarshal

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

func (*MsgWithdrawBatchResponse) XXX_DiscardUnknown

func (m *MsgWithdrawBatchResponse) XXX_DiscardUnknown()

func (*MsgWithdrawBatchResponse) XXX_Marshal

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

func (*MsgWithdrawBatchResponse) XXX_Merge

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

func (*MsgWithdrawBatchResponse) XXX_Size

func (m *MsgWithdrawBatchResponse) XXX_Size() int

func (*MsgWithdrawBatchResponse) XXX_Unmarshal

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

type Order

type Order struct {
	Direction       SwapDirection
	Price           sdk.Dec
	Amount          sdk.Int
	RemainingAmount sdk.Int
	ReceivedAmount  sdk.Int
	Matched         bool
}

func NewOrder

func NewOrder(dir SwapDirection, price sdk.Dec, amount sdk.Int) *Order

func (*Order) GetAmount

func (order *Order) GetAmount() sdk.Int

func (*Order) GetDirection

func (order *Order) GetDirection() SwapDirection

func (*Order) GetPrice

func (order *Order) GetPrice() sdk.Dec

func (*Order) GetReceivedAmount

func (order *Order) GetReceivedAmount() sdk.Int

func (*Order) GetRemainingAmount

func (order *Order) GetRemainingAmount() sdk.Int

func (*Order) IsMatched

func (order *Order) IsMatched() bool

func (*Order) SetMatched

func (order *Order) SetMatched(matched bool)

func (*Order) SetReceivedAmount

func (order *Order) SetReceivedAmount(amount sdk.Int)

func (*Order) SetRemainingAmount

func (order *Order) SetRemainingAmount(amount sdk.Int)

type OrderBook

type OrderBook struct {
	BuyTicks      *OrderBookTicks
	SellTicks     *OrderBookTicks
	TickPrecision int
}

func NewOrderBook

func NewOrderBook(prec int) *OrderBook

func (*OrderBook) AddOrder

func (ob *OrderBook) AddOrder(order OrderI)

func (*OrderBook) AddOrders

func (ob *OrderBook) AddOrders(orders ...OrderI)

func (OrderBook) AllOrders

func (ob OrderBook) AllOrders() []OrderI

func (OrderBook) OrderSource

func (ob OrderBook) OrderSource(dir SwapDirection) OrderSource

func (OrderBook) String

func (ob OrderBook) String() string

type OrderBookTick

type OrderBookTick struct {
	Price  sdk.Dec
	Orders Orders
}

func NewOrderBookTick

func NewOrderBookTick(order OrderI) *OrderBookTick

type OrderBookTicks

type OrderBookTicks struct {
	Ticks         []*OrderBookTick
	TickPrecision int
}

func NewOrderBookTicks

func NewOrderBookTicks(prec int) *OrderBookTicks

func (*OrderBookTicks) AddOrder

func (ticks *OrderBookTicks) AddOrder(order OrderI)

func (*OrderBookTicks) AddOrders

func (ticks *OrderBookTicks) AddOrders(orders ...OrderI)

func (*OrderBookTicks) AllOrders

func (ticks *OrderBookTicks) AllOrders() []OrderI

func (*OrderBookTicks) AmountGTE

func (ticks *OrderBookTicks) AmountGTE(price sdk.Dec) sdk.Int

func (OrderBookTicks) AmountLTE

func (ticks OrderBookTicks) AmountLTE(price sdk.Dec) sdk.Int

func (OrderBookTicks) DownTick

func (ticks OrderBookTicks) DownTick(price sdk.Dec) (tick sdk.Dec, found bool)

func (OrderBookTicks) DownTickWithOrders

func (ticks OrderBookTicks) DownTickWithOrders(price sdk.Dec) (tick sdk.Dec, found bool)

func (*OrderBookTicks) FindPrice

func (ticks *OrderBookTicks) FindPrice(price sdk.Dec) (i int, exact bool)

func (OrderBookTicks) HighestTick

func (ticks OrderBookTicks) HighestTick() (tick sdk.Dec, found bool)

func (OrderBookTicks) LowestTick

func (ticks OrderBookTicks) LowestTick() (tick sdk.Dec, found bool)

func (OrderBookTicks) Orders

func (ticks OrderBookTicks) Orders(price sdk.Dec) Orders

func (OrderBookTicks) UpTick

func (ticks OrderBookTicks) UpTick(price sdk.Dec) (tick sdk.Dec, found bool)

func (OrderBookTicks) UpTickWithOrders

func (ticks OrderBookTicks) UpTickWithOrders(price sdk.Dec) (tick sdk.Dec, found bool)

type OrderI

type OrderI interface {
	GetDirection() SwapDirection
	GetPrice() sdk.Dec
	GetAmount() sdk.Int
	GetRemainingAmount() sdk.Int
	SetRemainingAmount(amount sdk.Int)
	GetReceivedAmount() sdk.Int
	SetReceivedAmount(amount sdk.Int)
	IsMatched() bool
	SetMatched(matched bool)
}

type OrderSource

type OrderSource interface {
	AmountGTE(price sdk.Dec) sdk.Int
	AmountLTE(price sdk.Dec) sdk.Int
	Orders(price sdk.Dec) Orders
	UpTick(price sdk.Dec) (tick sdk.Dec, found bool)
	DownTick(price sdk.Dec) (tick sdk.Dec, found bool)
	UpTickWithOrders(price sdk.Dec) (tick sdk.Dec, found bool)
	DownTickWithOrders(price sdk.Dec) (tick sdk.Dec, found bool)
	HighestTick() (tick sdk.Dec, found bool)
	LowestTick() (tick sdk.Dec, found bool)
}

OrderSource defines a source of orders which can be an order book or a pool.

func MergeOrderSources

func MergeOrderSources(sources ...OrderSource) OrderSource

func NewPoolOrderSource

func NewPoolOrderSource(pool PoolI, reserveAddr sdk.AccAddress, dir SwapDirection, prec int) OrderSource

type Orders

type Orders []OrderI

func (Orders) RemainingAmount

func (orders Orders) RemainingAmount() sdk.Int

type Pair

type Pair struct {
	Id                      uint64                                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XCoinDenom              string                                  `protobuf:"bytes,2,opt,name=x_coin_denom,json=xCoinDenom,proto3" json:"x_coin_denom,omitempty"`
	YCoinDenom              string                                  `protobuf:"bytes,3,opt,name=y_coin_denom,json=yCoinDenom,proto3" json:"y_coin_denom,omitempty"`
	EscrowAddress           string                                  `protobuf:"bytes,4,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"`
	LastSwapRequestId       uint64                                  `protobuf:"varint,5,opt,name=last_swap_request_id,json=lastSwapRequestId,proto3" json:"last_swap_request_id,omitempty"`
	LastCancelSwapRequestId uint64                                  `` /* 137-byte string literal not displayed */
	LastPrice               *github_com_cosmos_cosmos_sdk_types.Dec `` /* 138-byte string literal not displayed */
	CurrentBatchId          uint64                                  `protobuf:"varint,8,opt,name=current_batch_id,json=currentBatchId,proto3" json:"current_batch_id,omitempty"`
}

Pair defines a coin pair.

func MustUnmarshalPair

func MustUnmarshalPair(cdc codec.BinaryCodec, value []byte) Pair

MustUnmarshalPair return the unmarshalled pair from bytes. It throws panic if it fails.

func NewPair

func NewPair(id uint64, xCoinDenom, yCoinDenom string) Pair

NewPair returns a new pair object.

func UnmarshalPair

func UnmarshalPair(cdc codec.BinaryCodec, value []byte) (pair Pair, err error)

UnmarshalPair returns the pair from bytes.

func (*Pair) Descriptor

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

func (Pair) GetEscrowAddress

func (pair Pair) GetEscrowAddress() sdk.AccAddress

func (*Pair) Marshal

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

func (*Pair) MarshalTo

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

func (*Pair) MarshalToSizedBuffer

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

func (*Pair) ProtoMessage

func (*Pair) ProtoMessage()

func (*Pair) Reset

func (m *Pair) Reset()

func (*Pair) Size

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

func (*Pair) String

func (m *Pair) String() string

func (*Pair) Unmarshal

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

func (*Pair) XXX_DiscardUnknown

func (m *Pair) XXX_DiscardUnknown()

func (*Pair) XXX_Marshal

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

func (*Pair) XXX_Merge

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

func (*Pair) XXX_Size

func (m *Pair) XXX_Size() int

func (*Pair) XXX_Unmarshal

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

type Params

type Params struct {
	InitialPoolCoinSupply   github_com_cosmos_cosmos_sdk_types.Int   `` /* 168-byte string literal not displayed */
	BatchSize               uint32                                   `protobuf:"varint,2,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"`
	TickPrecision           uint32                                   `protobuf:"varint,3,opt,name=tick_precision,json=tickPrecision,proto3" json:"tick_precision,omitempty"`
	MinInitialDepositAmount github_com_cosmos_cosmos_sdk_types.Int   `` /* 174-byte string literal not displayed */
	PoolCreationFee         github_com_cosmos_cosmos_sdk_types.Coins `` /* 152-byte string literal not displayed */
	FeeCollectorAddress     string                                   `protobuf:"bytes,6,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"`
	MaxPriceLimitRatio      github_com_cosmos_cosmos_sdk_types.Dec   `` /* 159-byte string literal not displayed */
	SwapFeeRate             github_com_cosmos_cosmos_sdk_types.Dec   `` /* 136-byte string literal not displayed */
	WithdrawFeeRate         github_com_cosmos_cosmos_sdk_types.Dec   `` /* 148-byte string literal not displayed */
	MaxOrderLifespan        time.Duration                            `protobuf:"bytes,10,opt,name=max_order_lifespan,json=maxOrderLifespan,proto3,stdduration" json:"max_order_lifespan"`
}

Params defines the parameters for the liquidity module.

func DefaultParams

func DefaultParams() Params

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (params *Params) ParamSetPairs() paramstypes.ParamSetPairs

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (params Params) Validate() error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type Pool

type Pool struct {
	Id                    uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	PairId                uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	XCoinDenom            string `protobuf:"bytes,3,opt,name=x_coin_denom,json=xCoinDenom,proto3" json:"x_coin_denom,omitempty"`
	YCoinDenom            string `protobuf:"bytes,4,opt,name=y_coin_denom,json=yCoinDenom,proto3" json:"y_coin_denom,omitempty"`
	ReserveAddress        string `protobuf:"bytes,5,opt,name=reserve_address,json=reserveAddress,proto3" json:"reserve_address,omitempty"`
	PoolCoinDenom         string `protobuf:"bytes,6,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty"`
	LastDepositRequestId  uint64 `` /* 126-byte string literal not displayed */
	LastWithdrawRequestId uint64 `` /* 129-byte string literal not displayed */
}

Pool defines a basic liquidity pool with no min-price and max-price.

func MustUnmarshalPool

func MustUnmarshalPool(cdc codec.BinaryCodec, value []byte) Pool

MustUnmarshalPool return the unmarshaled pool from bytes. It throws panic if it fails.

func NewPool

func NewPool(id, pairId uint64, xCoinDenom, yCoinDenom string) Pool

NewPool returns a new pool object.

func UnmarshalPool

func UnmarshalPool(cdc codec.BinaryCodec, value []byte) (pool Pool, err error)

UnmarshalPool returns the pool from bytes.

func (*Pool) Descriptor

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

func (Pool) GetReserveAddress

func (pool Pool) GetReserveAddress() sdk.AccAddress

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 PoolI

type PoolI interface {
	Balance() (rx, ry sdk.Int)
	PoolCoinSupply() sdk.Int
	Price() sdk.Dec
}

type PoolInfo

type PoolInfo struct {
	RX, RY sdk.Int
	PS     sdk.Int
}

func NewPoolInfo

func NewPoolInfo(rx, ry, ps sdk.Int) PoolInfo

func (PoolInfo) Balance

func (info PoolInfo) Balance() (rx, ry sdk.Int)

func (PoolInfo) PoolCoinSupply

func (info PoolInfo) PoolCoinSupply() sdk.Int

func (PoolInfo) Price

func (info PoolInfo) Price() sdk.Dec

type PoolOrder

type PoolOrder struct {
	Order
	ReserveAddress sdk.AccAddress
}

func NewPoolOrder

func NewPoolOrder(reserveAddr sdk.AccAddress, dir SwapDirection, price sdk.Dec, amount sdk.Int) *PoolOrder

type PoolOrderSource

type PoolOrderSource struct {
	ReserveAddress sdk.AccAddress
	RX, RY         sdk.Int
	PoolPrice      sdk.Dec
	Direction      SwapDirection
	TickPrecision  int
	// contains filtered or unexported fields
}

func (PoolOrderSource) AmountGTE

func (os PoolOrderSource) AmountGTE(price sdk.Dec) sdk.Int

func (PoolOrderSource) AmountLTE

func (os PoolOrderSource) AmountLTE(price sdk.Dec) sdk.Int

func (PoolOrderSource) DownTick

func (os PoolOrderSource) DownTick(price sdk.Dec) (tick sdk.Dec, found bool)

func (PoolOrderSource) DownTickWithOrders

func (os PoolOrderSource) DownTickWithOrders(price sdk.Dec) (tick sdk.Dec, found bool)

func (PoolOrderSource) HighestTick

func (os PoolOrderSource) HighestTick() (tick sdk.Dec, found bool)

func (PoolOrderSource) LowestTick

func (os PoolOrderSource) LowestTick() (tick sdk.Dec, found bool)

func (PoolOrderSource) Orders

func (os PoolOrderSource) Orders(price sdk.Dec) Orders

func (PoolOrderSource) ProvidableX

func (os PoolOrderSource) ProvidableX(price sdk.Dec) sdk.Int

func (PoolOrderSource) ProvidableXOnTick

func (os PoolOrderSource) ProvidableXOnTick(price sdk.Dec) sdk.Int

func (PoolOrderSource) ProvidableY

func (os PoolOrderSource) ProvidableY(price sdk.Dec) sdk.Int

func (PoolOrderSource) ProvidableYOnTick

func (os PoolOrderSource) ProvidableYOnTick(price sdk.Dec) sdk.Int

func (PoolOrderSource) UpTick

func (os PoolOrderSource) UpTick(price sdk.Dec) (tick sdk.Dec, found bool)

func (PoolOrderSource) UpTickWithOrders

func (os PoolOrderSource) UpTickWithOrders(price sdk.Dec) (tick sdk.Dec, found bool)

type PoolResponse

type PoolResponse struct {
	Id                    uint64     `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	PairId                uint64     `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	XCoinDenom            string     `protobuf:"bytes,3,opt,name=x_coin_denom,json=xCoinDenom,proto3" json:"x_coin_denom,omitempty"`
	YCoinDenom            string     `protobuf:"bytes,4,opt,name=y_coin_denom,json=yCoinDenom,proto3" json:"y_coin_denom,omitempty"`
	ReserveAddress        string     `protobuf:"bytes,5,opt,name=reserve_address,json=reserveAddress,proto3" json:"reserve_address,omitempty"`
	PoolCoinDenom         string     `protobuf:"bytes,6,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty"`
	XCoin                 types.Coin `protobuf:"bytes,7,opt,name=x_coin,json=xCoin,proto3" json:"x_coin"`
	YCoin                 types.Coin `protobuf:"bytes,8,opt,name=y_coin,json=yCoin,proto3" json:"y_coin"`
	LastDepositRequestId  uint64     `` /* 126-byte string literal not displayed */
	LastWithdrawRequestId uint64     `` /* 130-byte string literal not displayed */
}

PoolResponse defines a custom pool response message.

func (*PoolResponse) Descriptor

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

func (*PoolResponse) GetId

func (m *PoolResponse) GetId() uint64

func (*PoolResponse) GetLastDepositRequestId

func (m *PoolResponse) GetLastDepositRequestId() uint64

func (*PoolResponse) GetLastWithdrawRequestId

func (m *PoolResponse) GetLastWithdrawRequestId() uint64

func (*PoolResponse) GetPairId

func (m *PoolResponse) GetPairId() uint64

func (*PoolResponse) GetPoolCoinDenom

func (m *PoolResponse) GetPoolCoinDenom() string

func (*PoolResponse) GetReserveAddress

func (m *PoolResponse) GetReserveAddress() string

func (*PoolResponse) GetXCoin

func (m *PoolResponse) GetXCoin() types.Coin

func (*PoolResponse) GetXCoinDenom

func (m *PoolResponse) GetXCoinDenom() string

func (*PoolResponse) GetYCoin

func (m *PoolResponse) GetYCoin() types.Coin

func (*PoolResponse) GetYCoinDenom

func (m *PoolResponse) GetYCoinDenom() string

func (*PoolResponse) Marshal

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

func (*PoolResponse) MarshalTo

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

func (*PoolResponse) MarshalToSizedBuffer

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

func (*PoolResponse) ProtoMessage

func (*PoolResponse) ProtoMessage()

func (*PoolResponse) Reset

func (m *PoolResponse) Reset()

func (*PoolResponse) Size

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

func (*PoolResponse) String

func (m *PoolResponse) String() string

func (*PoolResponse) Unmarshal

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

func (*PoolResponse) XXX_DiscardUnknown

func (m *PoolResponse) XXX_DiscardUnknown()

func (*PoolResponse) XXX_Marshal

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

func (*PoolResponse) XXX_Merge

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

func (*PoolResponse) XXX_Size

func (m *PoolResponse) XXX_Size() int

func (*PoolResponse) XXX_Unmarshal

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

type PriceDirection

type PriceDirection int
const (
	PriceIncreasing PriceDirection = iota + 1
	PriceDecreasing
)

type QueryClient

type QueryClient interface {
	// Params returns parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Pools returns all liquidity pools.
	Pools(ctx context.Context, in *QueryPoolsRequest, opts ...grpc.CallOption) (*QueryPoolsResponse, error)
	// PoolsByPair returns all pools that correspond to the pair.
	PoolsByPair(ctx context.Context, in *QueryPoolsByPairRequest, opts ...grpc.CallOption) (*QueryPoolsResponse, error)
	// Pool returns the specific liquidity pool.
	Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error)
	// PoolByReserveAcc returns all pools that correspond to the reserve account.
	PoolByReserveAcc(ctx context.Context, in *QueryPoolByReserveAccRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error)
	// PoolByPoolCoinDenom returns all pools that correspond to the pool coin denom.
	PoolByPoolCoinDenom(ctx context.Context, in *QueryPoolByPoolCoinDenomRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error)
	// Pairs returns all liquidity pairs.
	Pairs(ctx context.Context, in *QueryPairsRequest, opts ...grpc.CallOption) (*QueryPairsResponse, error)
	// Pair returns the specific pair.
	Pair(ctx context.Context, in *QueryPairRequest, opts ...grpc.CallOption) (*QueryPairResponse, error)
	// DepositRequests returns all deposit requests.
	DepositRequests(ctx context.Context, in *QueryDepositRequestsRequest, opts ...grpc.CallOption) (*QueryDepositRequestsResponse, error)
	// DepositRequest returns the specific deposit request.
	DepositRequest(ctx context.Context, in *QueryDepositRequestRequest, opts ...grpc.CallOption) (*QueryDepositRequestResponse, error)
	// WithdrawRequests returns all withdraw requests.
	WithdrawRequests(ctx context.Context, in *QueryWithdrawRequestsRequest, opts ...grpc.CallOption) (*QueryWithdrawRequestsResponse, error)
	// WithdrawRequest returns the specific withdraw request.
	WithdrawRequest(ctx context.Context, in *QueryWithdrawRequestRequest, opts ...grpc.CallOption) (*QueryWithdrawRequestResponse, error)
	// SwapRequests returns all swap requests.
	SwapRequests(ctx context.Context, in *QuerySwapRequestsRequest, opts ...grpc.CallOption) (*QuerySwapRequestsResponse, error)
	// SwapRequest returns the specific swap request.
	SwapRequest(ctx context.Context, in *QuerySwapRequestRequest, opts ...grpc.CallOption) (*QuerySwapRequestResponse, 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 QueryDepositRequestRequest

type QueryDepositRequestRequest struct {
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	Id     uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

QueryDepositRequestRequest is request type for the Query/DepositRequest RPC method.

func (*QueryDepositRequestRequest) Descriptor

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

func (*QueryDepositRequestRequest) GetId

func (*QueryDepositRequestRequest) GetPoolId

func (m *QueryDepositRequestRequest) GetPoolId() uint64

func (*QueryDepositRequestRequest) Marshal

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

func (*QueryDepositRequestRequest) MarshalTo

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

func (*QueryDepositRequestRequest) MarshalToSizedBuffer

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

func (*QueryDepositRequestRequest) ProtoMessage

func (*QueryDepositRequestRequest) ProtoMessage()

func (*QueryDepositRequestRequest) Reset

func (m *QueryDepositRequestRequest) Reset()

func (*QueryDepositRequestRequest) Size

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

func (*QueryDepositRequestRequest) String

func (m *QueryDepositRequestRequest) String() string

func (*QueryDepositRequestRequest) Unmarshal

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

func (*QueryDepositRequestRequest) XXX_DiscardUnknown

func (m *QueryDepositRequestRequest) XXX_DiscardUnknown()

func (*QueryDepositRequestRequest) XXX_Marshal

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

func (*QueryDepositRequestRequest) XXX_Merge

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

func (*QueryDepositRequestRequest) XXX_Size

func (m *QueryDepositRequestRequest) XXX_Size() int

func (*QueryDepositRequestRequest) XXX_Unmarshal

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

type QueryDepositRequestResponse

type QueryDepositRequestResponse struct {
	DepositRequest DepositRequest `protobuf:"bytes,1,opt,name=deposit_request,json=depositRequest,proto3" json:"deposit_request"`
}

QueryDepositRequestResponse is response type for the Query/DepositRequest RPC method.

func (*QueryDepositRequestResponse) Descriptor

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

func (*QueryDepositRequestResponse) GetDepositRequest

func (m *QueryDepositRequestResponse) GetDepositRequest() DepositRequest

func (*QueryDepositRequestResponse) Marshal

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

func (*QueryDepositRequestResponse) MarshalTo

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

func (*QueryDepositRequestResponse) MarshalToSizedBuffer

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

func (*QueryDepositRequestResponse) ProtoMessage

func (*QueryDepositRequestResponse) ProtoMessage()

func (*QueryDepositRequestResponse) Reset

func (m *QueryDepositRequestResponse) Reset()

func (*QueryDepositRequestResponse) Size

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

func (*QueryDepositRequestResponse) String

func (m *QueryDepositRequestResponse) String() string

func (*QueryDepositRequestResponse) Unmarshal

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

func (*QueryDepositRequestResponse) XXX_DiscardUnknown

func (m *QueryDepositRequestResponse) XXX_DiscardUnknown()

func (*QueryDepositRequestResponse) XXX_Marshal

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

func (*QueryDepositRequestResponse) XXX_Merge

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

func (*QueryDepositRequestResponse) XXX_Size

func (m *QueryDepositRequestResponse) XXX_Size() int

func (*QueryDepositRequestResponse) XXX_Unmarshal

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

type QueryDepositRequestsRequest

type QueryDepositRequestsRequest struct {
	PoolId     uint64             `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositRequestsRequest is request type for the Query/DepositRequests RPC method.

func (*QueryDepositRequestsRequest) Descriptor

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

func (*QueryDepositRequestsRequest) GetPagination

func (m *QueryDepositRequestsRequest) GetPagination() *query.PageRequest

func (*QueryDepositRequestsRequest) GetPoolId

func (m *QueryDepositRequestsRequest) GetPoolId() uint64

func (*QueryDepositRequestsRequest) Marshal

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

func (*QueryDepositRequestsRequest) MarshalTo

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

func (*QueryDepositRequestsRequest) MarshalToSizedBuffer

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

func (*QueryDepositRequestsRequest) ProtoMessage

func (*QueryDepositRequestsRequest) ProtoMessage()

func (*QueryDepositRequestsRequest) Reset

func (m *QueryDepositRequestsRequest) Reset()

func (*QueryDepositRequestsRequest) Size

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

func (*QueryDepositRequestsRequest) String

func (m *QueryDepositRequestsRequest) String() string

func (*QueryDepositRequestsRequest) Unmarshal

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

func (*QueryDepositRequestsRequest) XXX_DiscardUnknown

func (m *QueryDepositRequestsRequest) XXX_DiscardUnknown()

func (*QueryDepositRequestsRequest) XXX_Marshal

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

func (*QueryDepositRequestsRequest) XXX_Merge

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

func (*QueryDepositRequestsRequest) XXX_Size

func (m *QueryDepositRequestsRequest) XXX_Size() int

func (*QueryDepositRequestsRequest) XXX_Unmarshal

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

type QueryDepositRequestsResponse

type QueryDepositRequestsResponse struct {
	DepositRequests []DepositRequest    `protobuf:"bytes,1,rep,name=deposit_requests,json=depositRequests,proto3" json:"deposit_requests"`
	Pagination      *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositRequestsResponse is response type for the Query/DepositRequests RPC method.

func (*QueryDepositRequestsResponse) Descriptor

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

func (*QueryDepositRequestsResponse) GetDepositRequests

func (m *QueryDepositRequestsResponse) GetDepositRequests() []DepositRequest

func (*QueryDepositRequestsResponse) GetPagination

func (m *QueryDepositRequestsResponse) GetPagination() *query.PageResponse

func (*QueryDepositRequestsResponse) Marshal

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

func (*QueryDepositRequestsResponse) MarshalTo

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

func (*QueryDepositRequestsResponse) MarshalToSizedBuffer

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

func (*QueryDepositRequestsResponse) ProtoMessage

func (*QueryDepositRequestsResponse) ProtoMessage()

func (*QueryDepositRequestsResponse) Reset

func (m *QueryDepositRequestsResponse) Reset()

func (*QueryDepositRequestsResponse) Size

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

func (*QueryDepositRequestsResponse) String

func (*QueryDepositRequestsResponse) Unmarshal

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

func (*QueryDepositRequestsResponse) XXX_DiscardUnknown

func (m *QueryDepositRequestsResponse) XXX_DiscardUnknown()

func (*QueryDepositRequestsResponse) XXX_Marshal

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

func (*QueryDepositRequestsResponse) XXX_Merge

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

func (*QueryDepositRequestsResponse) XXX_Size

func (m *QueryDepositRequestsResponse) XXX_Size() int

func (*QueryDepositRequestsResponse) XXX_Unmarshal

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

type QueryPairRequest

type QueryPairRequest struct {
	PairId uint64 `protobuf:"varint,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
}

QueryPairRequest is request type for the Query/Pair RPC method.

func (*QueryPairRequest) Descriptor

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

func (*QueryPairRequest) GetPairId

func (m *QueryPairRequest) GetPairId() uint64

func (*QueryPairRequest) Marshal

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

func (*QueryPairRequest) MarshalTo

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

func (*QueryPairRequest) MarshalToSizedBuffer

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

func (*QueryPairRequest) ProtoMessage

func (*QueryPairRequest) ProtoMessage()

func (*QueryPairRequest) Reset

func (m *QueryPairRequest) Reset()

func (*QueryPairRequest) Size

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

func (*QueryPairRequest) String

func (m *QueryPairRequest) String() string

func (*QueryPairRequest) Unmarshal

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

func (*QueryPairRequest) XXX_DiscardUnknown

func (m *QueryPairRequest) XXX_DiscardUnknown()

func (*QueryPairRequest) XXX_Marshal

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

func (*QueryPairRequest) XXX_Merge

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

func (*QueryPairRequest) XXX_Size

func (m *QueryPairRequest) XXX_Size() int

func (*QueryPairRequest) XXX_Unmarshal

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

type QueryPairResponse

type QueryPairResponse struct {
	Pair Pair `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair"`
}

QueryPairResponse is response type for the Query/Pair RPC method.

func (*QueryPairResponse) Descriptor

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

func (*QueryPairResponse) GetPair

func (m *QueryPairResponse) GetPair() Pair

func (*QueryPairResponse) Marshal

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

func (*QueryPairResponse) MarshalTo

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

func (*QueryPairResponse) MarshalToSizedBuffer

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

func (*QueryPairResponse) ProtoMessage

func (*QueryPairResponse) ProtoMessage()

func (*QueryPairResponse) Reset

func (m *QueryPairResponse) Reset()

func (*QueryPairResponse) Size

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

func (*QueryPairResponse) String

func (m *QueryPairResponse) String() string

func (*QueryPairResponse) Unmarshal

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

func (*QueryPairResponse) XXX_DiscardUnknown

func (m *QueryPairResponse) XXX_DiscardUnknown()

func (*QueryPairResponse) XXX_Marshal

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

func (*QueryPairResponse) XXX_Merge

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

func (*QueryPairResponse) XXX_Size

func (m *QueryPairResponse) XXX_Size() int

func (*QueryPairResponse) XXX_Unmarshal

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

type QueryPairsRequest

type QueryPairsRequest struct {
	XDenom     string             `protobuf:"bytes,1,opt,name=x_denom,json=xDenom,proto3" json:"x_denom,omitempty"`
	YDenom     string             `protobuf:"bytes,2,opt,name=y_denom,json=yDenom,proto3" json:"y_denom,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

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

func (*QueryPairsRequest) Descriptor

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

func (*QueryPairsRequest) GetPagination

func (m *QueryPairsRequest) GetPagination() *query.PageRequest

func (*QueryPairsRequest) GetXDenom

func (m *QueryPairsRequest) GetXDenom() string

func (*QueryPairsRequest) GetYDenom

func (m *QueryPairsRequest) GetYDenom() string

func (*QueryPairsRequest) Marshal

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

func (*QueryPairsRequest) MarshalTo

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

func (*QueryPairsRequest) MarshalToSizedBuffer

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

func (*QueryPairsRequest) ProtoMessage

func (*QueryPairsRequest) ProtoMessage()

func (*QueryPairsRequest) Reset

func (m *QueryPairsRequest) Reset()

func (*QueryPairsRequest) Size

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

func (*QueryPairsRequest) String

func (m *QueryPairsRequest) String() string

func (*QueryPairsRequest) Unmarshal

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

func (*QueryPairsRequest) XXX_DiscardUnknown

func (m *QueryPairsRequest) XXX_DiscardUnknown()

func (*QueryPairsRequest) XXX_Marshal

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

func (*QueryPairsRequest) XXX_Merge

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

func (*QueryPairsRequest) XXX_Size

func (m *QueryPairsRequest) XXX_Size() int

func (*QueryPairsRequest) XXX_Unmarshal

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

type QueryPairsResponse

type QueryPairsResponse struct {
	Pairs      []Pair              `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

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

func (*QueryPairsResponse) Descriptor

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

func (*QueryPairsResponse) GetPagination

func (m *QueryPairsResponse) GetPagination() *query.PageResponse

func (*QueryPairsResponse) GetPairs

func (m *QueryPairsResponse) GetPairs() []Pair

func (*QueryPairsResponse) Marshal

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

func (*QueryPairsResponse) MarshalTo

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

func (*QueryPairsResponse) MarshalToSizedBuffer

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

func (*QueryPairsResponse) ProtoMessage

func (*QueryPairsResponse) ProtoMessage()

func (*QueryPairsResponse) Reset

func (m *QueryPairsResponse) Reset()

func (*QueryPairsResponse) Size

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

func (*QueryPairsResponse) String

func (m *QueryPairsResponse) String() string

func (*QueryPairsResponse) Unmarshal

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

func (*QueryPairsResponse) XXX_DiscardUnknown

func (m *QueryPairsResponse) XXX_DiscardUnknown()

func (*QueryPairsResponse) XXX_Marshal

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

func (*QueryPairsResponse) XXX_Merge

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

func (*QueryPairsResponse) XXX_Size

func (m *QueryPairsResponse) XXX_Size() int

func (*QueryPairsResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

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

QueryParamsResponse is response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryPoolByPoolCoinDenomRequest

type QueryPoolByPoolCoinDenomRequest struct {
	PoolCoinDenom string `protobuf:"bytes,1,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty"`
}

QueryPoolByPoolCoinDenomRequest is request type for the Query/PoolByPoolCoinDenom RPC method.

func (*QueryPoolByPoolCoinDenomRequest) Descriptor

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

func (*QueryPoolByPoolCoinDenomRequest) GetPoolCoinDenom

func (m *QueryPoolByPoolCoinDenomRequest) GetPoolCoinDenom() string

func (*QueryPoolByPoolCoinDenomRequest) Marshal

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

func (*QueryPoolByPoolCoinDenomRequest) MarshalTo

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

func (*QueryPoolByPoolCoinDenomRequest) MarshalToSizedBuffer

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

func (*QueryPoolByPoolCoinDenomRequest) ProtoMessage

func (*QueryPoolByPoolCoinDenomRequest) ProtoMessage()

func (*QueryPoolByPoolCoinDenomRequest) Reset

func (*QueryPoolByPoolCoinDenomRequest) Size

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

func (*QueryPoolByPoolCoinDenomRequest) String

func (*QueryPoolByPoolCoinDenomRequest) Unmarshal

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

func (*QueryPoolByPoolCoinDenomRequest) XXX_DiscardUnknown

func (m *QueryPoolByPoolCoinDenomRequest) XXX_DiscardUnknown()

func (*QueryPoolByPoolCoinDenomRequest) XXX_Marshal

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

func (*QueryPoolByPoolCoinDenomRequest) XXX_Merge

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

func (*QueryPoolByPoolCoinDenomRequest) XXX_Size

func (m *QueryPoolByPoolCoinDenomRequest) XXX_Size() int

func (*QueryPoolByPoolCoinDenomRequest) XXX_Unmarshal

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

type QueryPoolByReserveAccRequest

type QueryPoolByReserveAccRequest struct {
	ReserveAcc string `protobuf:"bytes,1,opt,name=reserve_acc,json=reserveAcc,proto3" json:"reserve_acc,omitempty"`
}

QueryPoolByReserveAccRequest is request type for the Query/PoolByReserveAcc RPC method.

func (*QueryPoolByReserveAccRequest) Descriptor

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

func (*QueryPoolByReserveAccRequest) GetReserveAcc

func (m *QueryPoolByReserveAccRequest) GetReserveAcc() string

func (*QueryPoolByReserveAccRequest) Marshal

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

func (*QueryPoolByReserveAccRequest) MarshalTo

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

func (*QueryPoolByReserveAccRequest) MarshalToSizedBuffer

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

func (*QueryPoolByReserveAccRequest) ProtoMessage

func (*QueryPoolByReserveAccRequest) ProtoMessage()

func (*QueryPoolByReserveAccRequest) Reset

func (m *QueryPoolByReserveAccRequest) Reset()

func (*QueryPoolByReserveAccRequest) Size

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

func (*QueryPoolByReserveAccRequest) String

func (*QueryPoolByReserveAccRequest) Unmarshal

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

func (*QueryPoolByReserveAccRequest) XXX_DiscardUnknown

func (m *QueryPoolByReserveAccRequest) XXX_DiscardUnknown()

func (*QueryPoolByReserveAccRequest) XXX_Marshal

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

func (*QueryPoolByReserveAccRequest) XXX_Merge

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

func (*QueryPoolByReserveAccRequest) XXX_Size

func (m *QueryPoolByReserveAccRequest) XXX_Size() int

func (*QueryPoolByReserveAccRequest) XXX_Unmarshal

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

type QueryPoolRequest

type QueryPoolRequest struct {
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
}

QueryPoolRequest is request type for the Query/Pool RPC method.

func (*QueryPoolRequest) Descriptor

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

func (*QueryPoolRequest) GetPoolId

func (m *QueryPoolRequest) GetPoolId() uint64

func (*QueryPoolRequest) Marshal

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

func (*QueryPoolRequest) MarshalTo

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

func (*QueryPoolRequest) MarshalToSizedBuffer

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

func (*QueryPoolRequest) ProtoMessage

func (*QueryPoolRequest) ProtoMessage()

func (*QueryPoolRequest) Reset

func (m *QueryPoolRequest) Reset()

func (*QueryPoolRequest) Size

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

func (*QueryPoolRequest) String

func (m *QueryPoolRequest) String() string

func (*QueryPoolRequest) Unmarshal

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

func (*QueryPoolRequest) XXX_DiscardUnknown

func (m *QueryPoolRequest) XXX_DiscardUnknown()

func (*QueryPoolRequest) XXX_Marshal

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

func (*QueryPoolRequest) XXX_Merge

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

func (*QueryPoolRequest) XXX_Size

func (m *QueryPoolRequest) XXX_Size() int

func (*QueryPoolRequest) XXX_Unmarshal

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

type QueryPoolResponse

type QueryPoolResponse struct {
	Pool PoolResponse `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool"`
}

QueryPoolResponse is response type for the Query/Pool RPC method.

func (*QueryPoolResponse) Descriptor

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

func (*QueryPoolResponse) GetPool

func (m *QueryPoolResponse) GetPool() PoolResponse

func (*QueryPoolResponse) Marshal

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

func (*QueryPoolResponse) MarshalTo

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

func (*QueryPoolResponse) MarshalToSizedBuffer

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

func (*QueryPoolResponse) ProtoMessage

func (*QueryPoolResponse) ProtoMessage()

func (*QueryPoolResponse) Reset

func (m *QueryPoolResponse) Reset()

func (*QueryPoolResponse) Size

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

func (*QueryPoolResponse) String

func (m *QueryPoolResponse) String() string

func (*QueryPoolResponse) Unmarshal

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

func (*QueryPoolResponse) XXX_DiscardUnknown

func (m *QueryPoolResponse) XXX_DiscardUnknown()

func (*QueryPoolResponse) XXX_Marshal

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

func (*QueryPoolResponse) XXX_Merge

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

func (*QueryPoolResponse) XXX_Size

func (m *QueryPoolResponse) XXX_Size() int

func (*QueryPoolResponse) XXX_Unmarshal

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

type QueryPoolsByPairRequest

type QueryPoolsByPairRequest struct {
	PairId     uint64             `protobuf:"varint,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPoolsByPairRequest is request type for the Query/PoolsByPair RPC method.

func (*QueryPoolsByPairRequest) Descriptor

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

func (*QueryPoolsByPairRequest) GetPagination

func (m *QueryPoolsByPairRequest) GetPagination() *query.PageRequest

func (*QueryPoolsByPairRequest) GetPairId

func (m *QueryPoolsByPairRequest) GetPairId() uint64

func (*QueryPoolsByPairRequest) Marshal

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

func (*QueryPoolsByPairRequest) MarshalTo

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

func (*QueryPoolsByPairRequest) MarshalToSizedBuffer

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

func (*QueryPoolsByPairRequest) ProtoMessage

func (*QueryPoolsByPairRequest) ProtoMessage()

func (*QueryPoolsByPairRequest) Reset

func (m *QueryPoolsByPairRequest) Reset()

func (*QueryPoolsByPairRequest) Size

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

func (*QueryPoolsByPairRequest) String

func (m *QueryPoolsByPairRequest) String() string

func (*QueryPoolsByPairRequest) Unmarshal

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

func (*QueryPoolsByPairRequest) XXX_DiscardUnknown

func (m *QueryPoolsByPairRequest) XXX_DiscardUnknown()

func (*QueryPoolsByPairRequest) XXX_Marshal

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

func (*QueryPoolsByPairRequest) XXX_Merge

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

func (*QueryPoolsByPairRequest) XXX_Size

func (m *QueryPoolsByPairRequest) XXX_Size() int

func (*QueryPoolsByPairRequest) XXX_Unmarshal

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

type QueryPoolsRequest

type QueryPoolsRequest struct {
	XDenom     string             `protobuf:"bytes,1,opt,name=x_denom,json=xDenom,proto3" json:"x_denom,omitempty"`
	YDenom     string             `protobuf:"bytes,2,opt,name=y_denom,json=yDenom,proto3" json:"y_denom,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPoolsRequest is request type for the Query/Pools RPC method.

func (*QueryPoolsRequest) Descriptor

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

func (*QueryPoolsRequest) GetPagination

func (m *QueryPoolsRequest) GetPagination() *query.PageRequest

func (*QueryPoolsRequest) GetXDenom

func (m *QueryPoolsRequest) GetXDenom() string

func (*QueryPoolsRequest) GetYDenom

func (m *QueryPoolsRequest) GetYDenom() string

func (*QueryPoolsRequest) Marshal

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

func (*QueryPoolsRequest) MarshalTo

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

func (*QueryPoolsRequest) MarshalToSizedBuffer

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

func (*QueryPoolsRequest) ProtoMessage

func (*QueryPoolsRequest) ProtoMessage()

func (*QueryPoolsRequest) Reset

func (m *QueryPoolsRequest) Reset()

func (*QueryPoolsRequest) Size

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

func (*QueryPoolsRequest) String

func (m *QueryPoolsRequest) String() string

func (*QueryPoolsRequest) Unmarshal

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

func (*QueryPoolsRequest) XXX_DiscardUnknown

func (m *QueryPoolsRequest) XXX_DiscardUnknown()

func (*QueryPoolsRequest) XXX_Marshal

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

func (*QueryPoolsRequest) XXX_Merge

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

func (*QueryPoolsRequest) XXX_Size

func (m *QueryPoolsRequest) XXX_Size() int

func (*QueryPoolsRequest) XXX_Unmarshal

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

type QueryPoolsResponse

type QueryPoolsResponse struct {
	Pools      []PoolResponse      `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPoolsResponse is response type for the Query/Pools RPC method.

func (*QueryPoolsResponse) Descriptor

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

func (*QueryPoolsResponse) GetPagination

func (m *QueryPoolsResponse) GetPagination() *query.PageResponse

func (*QueryPoolsResponse) GetPools

func (m *QueryPoolsResponse) GetPools() []PoolResponse

func (*QueryPoolsResponse) Marshal

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

func (*QueryPoolsResponse) MarshalTo

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

func (*QueryPoolsResponse) MarshalToSizedBuffer

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

func (*QueryPoolsResponse) ProtoMessage

func (*QueryPoolsResponse) ProtoMessage()

func (*QueryPoolsResponse) Reset

func (m *QueryPoolsResponse) Reset()

func (*QueryPoolsResponse) Size

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

func (*QueryPoolsResponse) String

func (m *QueryPoolsResponse) String() string

func (*QueryPoolsResponse) Unmarshal

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

func (*QueryPoolsResponse) XXX_DiscardUnknown

func (m *QueryPoolsResponse) XXX_DiscardUnknown()

func (*QueryPoolsResponse) XXX_Marshal

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

func (*QueryPoolsResponse) XXX_Merge

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

func (*QueryPoolsResponse) XXX_Size

func (m *QueryPoolsResponse) XXX_Size() int

func (*QueryPoolsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params returns parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Pools returns all liquidity pools.
	Pools(context.Context, *QueryPoolsRequest) (*QueryPoolsResponse, error)
	// PoolsByPair returns all pools that correspond to the pair.
	PoolsByPair(context.Context, *QueryPoolsByPairRequest) (*QueryPoolsResponse, error)
	// Pool returns the specific liquidity pool.
	Pool(context.Context, *QueryPoolRequest) (*QueryPoolResponse, error)
	// PoolByReserveAcc returns all pools that correspond to the reserve account.
	PoolByReserveAcc(context.Context, *QueryPoolByReserveAccRequest) (*QueryPoolResponse, error)
	// PoolByPoolCoinDenom returns all pools that correspond to the pool coin denom.
	PoolByPoolCoinDenom(context.Context, *QueryPoolByPoolCoinDenomRequest) (*QueryPoolResponse, error)
	// Pairs returns all liquidity pairs.
	Pairs(context.Context, *QueryPairsRequest) (*QueryPairsResponse, error)
	// Pair returns the specific pair.
	Pair(context.Context, *QueryPairRequest) (*QueryPairResponse, error)
	// DepositRequests returns all deposit requests.
	DepositRequests(context.Context, *QueryDepositRequestsRequest) (*QueryDepositRequestsResponse, error)
	// DepositRequest returns the specific deposit request.
	DepositRequest(context.Context, *QueryDepositRequestRequest) (*QueryDepositRequestResponse, error)
	// WithdrawRequests returns all withdraw requests.
	WithdrawRequests(context.Context, *QueryWithdrawRequestsRequest) (*QueryWithdrawRequestsResponse, error)
	// WithdrawRequest returns the specific withdraw request.
	WithdrawRequest(context.Context, *QueryWithdrawRequestRequest) (*QueryWithdrawRequestResponse, error)
	// SwapRequests returns all swap requests.
	SwapRequests(context.Context, *QuerySwapRequestsRequest) (*QuerySwapRequestsResponse, error)
	// SwapRequest returns the specific swap request.
	SwapRequest(context.Context, *QuerySwapRequestRequest) (*QuerySwapRequestResponse, error)
}

QueryServer is the server API for Query service.

type QuerySwapRequestRequest

type QuerySwapRequestRequest struct {
	PairId uint64 `protobuf:"varint,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	Id     uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

QuerySwapRequestRequest is request type for the Query/SwapRequest RPC method.

func (*QuerySwapRequestRequest) Descriptor

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

func (*QuerySwapRequestRequest) GetId

func (m *QuerySwapRequestRequest) GetId() uint64

func (*QuerySwapRequestRequest) GetPairId

func (m *QuerySwapRequestRequest) GetPairId() uint64

func (*QuerySwapRequestRequest) Marshal

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

func (*QuerySwapRequestRequest) MarshalTo

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

func (*QuerySwapRequestRequest) MarshalToSizedBuffer

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

func (*QuerySwapRequestRequest) ProtoMessage

func (*QuerySwapRequestRequest) ProtoMessage()

func (*QuerySwapRequestRequest) Reset

func (m *QuerySwapRequestRequest) Reset()

func (*QuerySwapRequestRequest) Size

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

func (*QuerySwapRequestRequest) String

func (m *QuerySwapRequestRequest) String() string

func (*QuerySwapRequestRequest) Unmarshal

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

func (*QuerySwapRequestRequest) XXX_DiscardUnknown

func (m *QuerySwapRequestRequest) XXX_DiscardUnknown()

func (*QuerySwapRequestRequest) XXX_Marshal

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

func (*QuerySwapRequestRequest) XXX_Merge

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

func (*QuerySwapRequestRequest) XXX_Size

func (m *QuerySwapRequestRequest) XXX_Size() int

func (*QuerySwapRequestRequest) XXX_Unmarshal

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

type QuerySwapRequestResponse

type QuerySwapRequestResponse struct {
	SwapRequest SwapRequest `protobuf:"bytes,1,opt,name=swap_request,json=swapRequest,proto3" json:"swap_request"`
}

QuerySwapRequestResponse is response type for the Query/SwapRequest RPC method.

func (*QuerySwapRequestResponse) Descriptor

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

func (*QuerySwapRequestResponse) GetSwapRequest

func (m *QuerySwapRequestResponse) GetSwapRequest() SwapRequest

func (*QuerySwapRequestResponse) Marshal

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

func (*QuerySwapRequestResponse) MarshalTo

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

func (*QuerySwapRequestResponse) MarshalToSizedBuffer

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

func (*QuerySwapRequestResponse) ProtoMessage

func (*QuerySwapRequestResponse) ProtoMessage()

func (*QuerySwapRequestResponse) Reset

func (m *QuerySwapRequestResponse) Reset()

func (*QuerySwapRequestResponse) Size

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

func (*QuerySwapRequestResponse) String

func (m *QuerySwapRequestResponse) String() string

func (*QuerySwapRequestResponse) Unmarshal

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

func (*QuerySwapRequestResponse) XXX_DiscardUnknown

func (m *QuerySwapRequestResponse) XXX_DiscardUnknown()

func (*QuerySwapRequestResponse) XXX_Marshal

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

func (*QuerySwapRequestResponse) XXX_Merge

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

func (*QuerySwapRequestResponse) XXX_Size

func (m *QuerySwapRequestResponse) XXX_Size() int

func (*QuerySwapRequestResponse) XXX_Unmarshal

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

type QuerySwapRequestsRequest

type QuerySwapRequestsRequest struct {
	PairId     uint64             `protobuf:"varint,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QuerySwapRequestsRequest is request type for the Query/SwapRequests RPC method.

func (*QuerySwapRequestsRequest) Descriptor

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

func (*QuerySwapRequestsRequest) GetPagination

func (m *QuerySwapRequestsRequest) GetPagination() *query.PageRequest

func (*QuerySwapRequestsRequest) GetPairId

func (m *QuerySwapRequestsRequest) GetPairId() uint64

func (*QuerySwapRequestsRequest) Marshal

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

func (*QuerySwapRequestsRequest) MarshalTo

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

func (*QuerySwapRequestsRequest) MarshalToSizedBuffer

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

func (*QuerySwapRequestsRequest) ProtoMessage

func (*QuerySwapRequestsRequest) ProtoMessage()

func (*QuerySwapRequestsRequest) Reset

func (m *QuerySwapRequestsRequest) Reset()

func (*QuerySwapRequestsRequest) Size

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

func (*QuerySwapRequestsRequest) String

func (m *QuerySwapRequestsRequest) String() string

func (*QuerySwapRequestsRequest) Unmarshal

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

func (*QuerySwapRequestsRequest) XXX_DiscardUnknown

func (m *QuerySwapRequestsRequest) XXX_DiscardUnknown()

func (*QuerySwapRequestsRequest) XXX_Marshal

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

func (*QuerySwapRequestsRequest) XXX_Merge

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

func (*QuerySwapRequestsRequest) XXX_Size

func (m *QuerySwapRequestsRequest) XXX_Size() int

func (*QuerySwapRequestsRequest) XXX_Unmarshal

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

type QuerySwapRequestsResponse

type QuerySwapRequestsResponse struct {
	SwapRequests []SwapRequest       `protobuf:"bytes,1,rep,name=swap_requests,json=swapRequests,proto3" json:"swap_requests"`
	Pagination   *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QuerySwapRequestsResponse is response type for the Query/SwapRequests RPC method.

func (*QuerySwapRequestsResponse) Descriptor

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

func (*QuerySwapRequestsResponse) GetPagination

func (m *QuerySwapRequestsResponse) GetPagination() *query.PageResponse

func (*QuerySwapRequestsResponse) GetSwapRequests

func (m *QuerySwapRequestsResponse) GetSwapRequests() []SwapRequest

func (*QuerySwapRequestsResponse) Marshal

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

func (*QuerySwapRequestsResponse) MarshalTo

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

func (*QuerySwapRequestsResponse) MarshalToSizedBuffer

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

func (*QuerySwapRequestsResponse) ProtoMessage

func (*QuerySwapRequestsResponse) ProtoMessage()

func (*QuerySwapRequestsResponse) Reset

func (m *QuerySwapRequestsResponse) Reset()

func (*QuerySwapRequestsResponse) Size

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

func (*QuerySwapRequestsResponse) String

func (m *QuerySwapRequestsResponse) String() string

func (*QuerySwapRequestsResponse) Unmarshal

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

func (*QuerySwapRequestsResponse) XXX_DiscardUnknown

func (m *QuerySwapRequestsResponse) XXX_DiscardUnknown()

func (*QuerySwapRequestsResponse) XXX_Marshal

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

func (*QuerySwapRequestsResponse) XXX_Merge

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

func (*QuerySwapRequestsResponse) XXX_Size

func (m *QuerySwapRequestsResponse) XXX_Size() int

func (*QuerySwapRequestsResponse) XXX_Unmarshal

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

type QueryWithdrawRequestRequest

type QueryWithdrawRequestRequest struct {
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	Id     uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

QueryWithdrawRequestRequest is request type for the Query/WithdrawRequest RPC method.

func (*QueryWithdrawRequestRequest) Descriptor

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

func (*QueryWithdrawRequestRequest) GetId

func (*QueryWithdrawRequestRequest) GetPoolId

func (m *QueryWithdrawRequestRequest) GetPoolId() uint64

func (*QueryWithdrawRequestRequest) Marshal

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

func (*QueryWithdrawRequestRequest) MarshalTo

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

func (*QueryWithdrawRequestRequest) MarshalToSizedBuffer

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

func (*QueryWithdrawRequestRequest) ProtoMessage

func (*QueryWithdrawRequestRequest) ProtoMessage()

func (*QueryWithdrawRequestRequest) Reset

func (m *QueryWithdrawRequestRequest) Reset()

func (*QueryWithdrawRequestRequest) Size

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

func (*QueryWithdrawRequestRequest) String

func (m *QueryWithdrawRequestRequest) String() string

func (*QueryWithdrawRequestRequest) Unmarshal

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

func (*QueryWithdrawRequestRequest) XXX_DiscardUnknown

func (m *QueryWithdrawRequestRequest) XXX_DiscardUnknown()

func (*QueryWithdrawRequestRequest) XXX_Marshal

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

func (*QueryWithdrawRequestRequest) XXX_Merge

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

func (*QueryWithdrawRequestRequest) XXX_Size

func (m *QueryWithdrawRequestRequest) XXX_Size() int

func (*QueryWithdrawRequestRequest) XXX_Unmarshal

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

type QueryWithdrawRequestResponse

type QueryWithdrawRequestResponse struct {
	WithdrawRequest WithdrawRequest `protobuf:"bytes,1,opt,name=withdraw_request,json=withdrawRequest,proto3" json:"withdraw_request"`
}

QueryWithdrawRequestResponse is response type for the Query/WithdrawRequest RPC method.

func (*QueryWithdrawRequestResponse) Descriptor

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

func (*QueryWithdrawRequestResponse) GetWithdrawRequest

func (m *QueryWithdrawRequestResponse) GetWithdrawRequest() WithdrawRequest

func (*QueryWithdrawRequestResponse) Marshal

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

func (*QueryWithdrawRequestResponse) MarshalTo

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

func (*QueryWithdrawRequestResponse) MarshalToSizedBuffer

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

func (*QueryWithdrawRequestResponse) ProtoMessage

func (*QueryWithdrawRequestResponse) ProtoMessage()

func (*QueryWithdrawRequestResponse) Reset

func (m *QueryWithdrawRequestResponse) Reset()

func (*QueryWithdrawRequestResponse) Size

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

func (*QueryWithdrawRequestResponse) String

func (*QueryWithdrawRequestResponse) Unmarshal

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

func (*QueryWithdrawRequestResponse) XXX_DiscardUnknown

func (m *QueryWithdrawRequestResponse) XXX_DiscardUnknown()

func (*QueryWithdrawRequestResponse) XXX_Marshal

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

func (*QueryWithdrawRequestResponse) XXX_Merge

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

func (*QueryWithdrawRequestResponse) XXX_Size

func (m *QueryWithdrawRequestResponse) XXX_Size() int

func (*QueryWithdrawRequestResponse) XXX_Unmarshal

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

type QueryWithdrawRequestsRequest

type QueryWithdrawRequestsRequest struct {
	PoolId     uint64             `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryWithdrawRequestsRequest is request type for the Query/WithdrawRequests RPC method.

func (*QueryWithdrawRequestsRequest) Descriptor

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

func (*QueryWithdrawRequestsRequest) GetPagination

func (m *QueryWithdrawRequestsRequest) GetPagination() *query.PageRequest

func (*QueryWithdrawRequestsRequest) GetPoolId

func (m *QueryWithdrawRequestsRequest) GetPoolId() uint64

func (*QueryWithdrawRequestsRequest) Marshal

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

func (*QueryWithdrawRequestsRequest) MarshalTo

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

func (*QueryWithdrawRequestsRequest) MarshalToSizedBuffer

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

func (*QueryWithdrawRequestsRequest) ProtoMessage

func (*QueryWithdrawRequestsRequest) ProtoMessage()

func (*QueryWithdrawRequestsRequest) Reset

func (m *QueryWithdrawRequestsRequest) Reset()

func (*QueryWithdrawRequestsRequest) Size

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

func (*QueryWithdrawRequestsRequest) String

func (*QueryWithdrawRequestsRequest) Unmarshal

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

func (*QueryWithdrawRequestsRequest) XXX_DiscardUnknown

func (m *QueryWithdrawRequestsRequest) XXX_DiscardUnknown()

func (*QueryWithdrawRequestsRequest) XXX_Marshal

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

func (*QueryWithdrawRequestsRequest) XXX_Merge

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

func (*QueryWithdrawRequestsRequest) XXX_Size

func (m *QueryWithdrawRequestsRequest) XXX_Size() int

func (*QueryWithdrawRequestsRequest) XXX_Unmarshal

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

type QueryWithdrawRequestsResponse

type QueryWithdrawRequestsResponse struct {
	WithdrawRequests []WithdrawRequest   `protobuf:"bytes,1,rep,name=withdraw_requests,json=withdrawRequests,proto3" json:"withdraw_requests"`
	Pagination       *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryWithdrawRequestsResponse is response type for the Query/WithdrawRequests RPC method.

func (*QueryWithdrawRequestsResponse) Descriptor

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

func (*QueryWithdrawRequestsResponse) GetPagination

func (m *QueryWithdrawRequestsResponse) GetPagination() *query.PageResponse

func (*QueryWithdrawRequestsResponse) GetWithdrawRequests

func (m *QueryWithdrawRequestsResponse) GetWithdrawRequests() []WithdrawRequest

func (*QueryWithdrawRequestsResponse) Marshal

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

func (*QueryWithdrawRequestsResponse) MarshalTo

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

func (*QueryWithdrawRequestsResponse) MarshalToSizedBuffer

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

func (*QueryWithdrawRequestsResponse) ProtoMessage

func (*QueryWithdrawRequestsResponse) ProtoMessage()

func (*QueryWithdrawRequestsResponse) Reset

func (m *QueryWithdrawRequestsResponse) Reset()

func (*QueryWithdrawRequestsResponse) Size

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

func (*QueryWithdrawRequestsResponse) String

func (*QueryWithdrawRequestsResponse) Unmarshal

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

func (*QueryWithdrawRequestsResponse) XXX_DiscardUnknown

func (m *QueryWithdrawRequestsResponse) XXX_DiscardUnknown()

func (*QueryWithdrawRequestsResponse) XXX_Marshal

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

func (*QueryWithdrawRequestsResponse) XXX_Merge

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

func (*QueryWithdrawRequestsResponse) XXX_Size

func (m *QueryWithdrawRequestsResponse) XXX_Size() int

func (*QueryWithdrawRequestsResponse) XXX_Unmarshal

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

type SwapDirection

type SwapDirection int32

SwapDirection enumerates swap directions.

const (
	// SWAP_DIRECTION_UNSPECIFIED specifies unknown swap direction
	SwapDirectionUnspecified SwapDirection = 0
	// SWAP_DIRECTION_BUY specifies buy(swap x to y) swap direction
	SwapDirectionBuy SwapDirection = 1
	// SWAP_DIRECTION_SELL specifies sell(swap y to x) swap direction
	SwapDirectionSell SwapDirection = 2
)

func (SwapDirection) EnumDescriptor

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

func (SwapDirection) String

func (x SwapDirection) String() string

type SwapRequest

type SwapRequest struct {
	// id specifies the id for the request
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// pair_id specifies the pair id
	PairId uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	// msg_height specifies the block height when the request is stored for the batch execution
	MsgHeight int64 `protobuf:"varint,3,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty"`
	// orderer specifies the bech32-encoded address that makes an order to swap from the pool
	Orderer string `protobuf:"bytes,4,opt,name=orderer,proto3" json:"orderer,omitempty"`
	// direction specifies the swap direction; either buy or sell
	Direction SwapDirection `protobuf:"varint,5,opt,name=direction,proto3,enum=crescent.liquidity.v1beta1.SwapDirection" json:"direction,omitempty"`
	// price specifies the price that an orderer is willing to swap
	Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"`
	// remaining_coin specifies the remaining coin after the swap
	RemainingCoin types.Coin `protobuf:"bytes,7,opt,name=remaining_coin,json=remainingCoin,proto3" json:"remaining_coin"`
	// received_coin specifies the received coin after the swap
	ReceivedCoin types.Coin `protobuf:"bytes,8,opt,name=received_coin,json=receivedCoin,proto3" json:"received_coin"`
	// batch_id specifies the pair's batch id when the request is stored
	BatchId     uint64    `protobuf:"varint,9,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
	CanceledAt  time.Time `protobuf:"bytes,10,opt,name=canceled_at,json=canceledAt,proto3,stdtime" json:"canceled_at"`
	Matched     bool      `protobuf:"varint,11,opt,name=matched,proto3" json:"matched,omitempty"`
	Canceled    bool      `protobuf:"varint,12,opt,name=canceled,proto3" json:"canceled,omitempty"`
	ToBeDeleted bool      `protobuf:"varint,13,opt,name=to_be_deleted,json=toBeDeleted,proto3" json:"to_be_deleted,omitempty"`
}

SwapRequest defines a swap request.

func MustUnmarshaSwapRequest

func MustUnmarshaSwapRequest(cdc codec.BinaryCodec, value []byte) SwapRequest

MustUnmarshaSwapRequest returns the SwapRequest from bytes. It throws panic if it fails.

func NewSwapRequest

func NewSwapRequest(msg *MsgSwapBatch, id uint64, pair Pair, canceledAt time.Time, msgHeight int64) SwapRequest

func UnmarshalSwapRequest

func UnmarshalSwapRequest(cdc codec.BinaryCodec, value []byte) (msg SwapRequest, err error)

UnmarshalSwapRequest returns the SwapRequest from bytes.

func (*SwapRequest) Descriptor

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

func (SwapRequest) GetOrderer

func (req SwapRequest) GetOrderer() sdk.AccAddress

func (*SwapRequest) Marshal

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

func (*SwapRequest) MarshalTo

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

func (*SwapRequest) MarshalToSizedBuffer

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

func (*SwapRequest) ProtoMessage

func (*SwapRequest) ProtoMessage()

func (*SwapRequest) Reset

func (m *SwapRequest) Reset()

func (*SwapRequest) Size

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

func (*SwapRequest) String

func (m *SwapRequest) String() string

func (*SwapRequest) Unmarshal

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

func (*SwapRequest) XXX_DiscardUnknown

func (m *SwapRequest) XXX_DiscardUnknown()

func (*SwapRequest) XXX_Marshal

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

func (*SwapRequest) XXX_Merge

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

func (*SwapRequest) XXX_Size

func (m *SwapRequest) XXX_Size() int

func (*SwapRequest) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CancelSwapBatch

func (*UnimplementedMsgServer) CreatePool

func (*UnimplementedMsgServer) DepositBatch

func (*UnimplementedMsgServer) SwapBatch

func (*UnimplementedMsgServer) WithdrawBatch

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) DepositRequest

func (*UnimplementedQueryServer) DepositRequests

func (*UnimplementedQueryServer) Pair

func (*UnimplementedQueryServer) Pairs

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Pool

func (*UnimplementedQueryServer) PoolByPoolCoinDenom

func (*UnimplementedQueryServer) PoolByReserveAcc

func (*UnimplementedQueryServer) Pools

func (*UnimplementedQueryServer) PoolsByPair

func (*UnimplementedQueryServer) SwapRequest

func (*UnimplementedQueryServer) SwapRequests

func (*UnimplementedQueryServer) WithdrawRequest

func (*UnimplementedQueryServer) WithdrawRequests

type UserOrder

type UserOrder struct {
	Order
	RequestId uint64
	Orderer   sdk.AccAddress
}

func NewUserOrder

func NewUserOrder(req SwapRequest) *UserOrder

type WithdrawRequest

type WithdrawRequest struct {
	// id specifies the id for the request
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// pool_id specifies the pool id
	PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// msg_height specifies the block height when the request is stored for the batch execution
	MsgHeight int64 `protobuf:"varint,3,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty"`
	// withdrawer specifies the bech32-encoded address that withdraws pool coin from the pool
	Withdrawer string `protobuf:"bytes,4,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"`
	// pool_coin specifies the pool coin that is a proof of liquidity provider for the pool
	PoolCoin       types.Coin `protobuf:"bytes,5,opt,name=pool_coin,json=poolCoin,proto3" json:"pool_coin"`
	WithdrawnXCoin types.Coin `protobuf:"bytes,6,opt,name=withdrawn_x_coin,json=withdrawnXCoin,proto3" json:"withdrawn_x_coin"`
	WithdrawnYCoin types.Coin `protobuf:"bytes,7,opt,name=withdrawn_y_coin,json=withdrawnYCoin,proto3" json:"withdrawn_y_coin"`
	Succeeded      bool       `protobuf:"varint,8,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	ToBeDeleted    bool       `protobuf:"varint,9,opt,name=to_be_deleted,json=toBeDeleted,proto3" json:"to_be_deleted,omitempty"`
}

WithdrawRequest defines a withdraw request.

func MustUnmarshaWithdrawRequest

func MustUnmarshaWithdrawRequest(cdc codec.BinaryCodec, value []byte) WithdrawRequest

MustUnmarshaWithdrawRequest returns the WithdrawRequest from bytes. It throws panic if it fails.

func NewWithdrawRequest

func NewWithdrawRequest(msg *MsgWithdrawBatch, id uint64, msgHeight int64) WithdrawRequest

func UnmarshalWithdrawRequest

func UnmarshalWithdrawRequest(cdc codec.BinaryCodec, value []byte) (msg WithdrawRequest, err error)

UnmarshalWithdrawRequest returns the WithdrawRequest from bytes.

func (*WithdrawRequest) Descriptor

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

func (WithdrawRequest) GetWithdrawer

func (req WithdrawRequest) GetWithdrawer() sdk.AccAddress

func (*WithdrawRequest) Marshal

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

func (*WithdrawRequest) MarshalTo

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

func (*WithdrawRequest) MarshalToSizedBuffer

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

func (*WithdrawRequest) ProtoMessage

func (*WithdrawRequest) ProtoMessage()

func (*WithdrawRequest) Reset

func (m *WithdrawRequest) Reset()

func (*WithdrawRequest) Size

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

func (*WithdrawRequest) String

func (m *WithdrawRequest) String() string

func (*WithdrawRequest) Unmarshal

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

func (*WithdrawRequest) XXX_DiscardUnknown

func (m *WithdrawRequest) XXX_DiscardUnknown()

func (*WithdrawRequest) XXX_Marshal

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

func (*WithdrawRequest) XXX_Merge

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

func (*WithdrawRequest) XXX_Size

func (m *WithdrawRequest) XXX_Size() int

func (*WithdrawRequest) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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