types

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeCreatePool          = TypeMsgCreatePool
	EventTypeDepositWithinBatch  = TypeMsgDepositWithinBatch
	EventTypeWithdrawWithinBatch = TypeMsgWithdrawWithinBatch
	EventTypeSwapWithinBatch     = TypeMsgSwapWithinBatch
	EventTypeDepositToPool       = "deposit_to_pool"
	EventTypeWithdrawFromPool    = "withdraw_from_pool"
	EventTypeSwapTransacted      = "swap_transacted"

	AttributeValuePoolId         = "pool_id"      //nolint:golint
	AttributeValuePoolTypeId     = "pool_type_id" //nolint:golint
	AttributeValuePoolName       = "pool_name"
	AttributeValueReserveAccount = "reserve_account"
	AttributeValuePoolCoinDenom  = "pool_coin_denom"
	AttributeValuePoolCoinAmount = "pool_coin_amount"
	AttributeValueBatchIndex     = "batch_index"
	AttributeValueMsgIndex       = "msg_index"

	AttributeValueDepositCoins = "deposit_coins"

	AttributeValueOfferCoinDenom         = "offer_coin_denom"
	AttributeValueOfferCoinAmount        = "offer_coin_amount"
	AttributeValueOfferCoinFeeAmount     = "offer_coin_fee_amount"
	AttributeValueExchangedCoinFeeAmount = "exchanged_coin_fee_amount"
	AttributeValueDemandCoinDenom        = "demand_coin_denom"
	AttributeValueOrderPrice             = "order_price"

	AttributeValueDepositor        = "depositor"
	AttributeValueRefundedCoins    = "refunded_coins"
	AttributeValueAcceptedCoins    = "accepted_coins"
	AttributeValueSuccess          = "success"
	AttributeValueNoMatch          = "no_match"
	AttributeValueWithdrawer       = "withdrawer"
	AttributeValueWithdrawCoins    = "withdraw_coins"
	AttributeValueWithdrawFeeCoins = "withdraw_fee_coins"
	AttributeValueSwapRequester    = "swap_requester"
	AttributeValueSwapTypeId       = "swap_type_id" //nolint:golint
	AttributeValueSwapPrice        = "swap_price"

	AttributeValueTransactedCoinAmount       = "transacted_coin_amount"
	AttributeValueRemainingOfferCoinAmount   = "remaining_offer_coin_amount"
	AttributeValueExchangedOfferCoinAmount   = "exchanged_offer_coin_amount"
	AttributeValueExchangedDemandCoinAmount  = "exchanged_demand_coin_amount"
	AttributeValueReservedOfferCoinFeeAmount = "reserved_offer_coin_fee_amount"
	AttributeValueOrderExpiryHeight          = "order_expiry_height"
	AttributeValueOrderExpired               = "order_has_expired"
	AttributeValueInvalidSwapErr             = "swap_err_message"

	AttributeValueCategory = ModuleName

	Success = "success"
	Failure = "failure"
)

Event types for the liquidity module.

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

	// RouterKey is the message router key for the liquidity module
	RouterKey = ModuleName

	// StoreKey is the default store key for the liquidity module
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the liquidity module
	QuerierRoute = ModuleName

	// PoolCoinDenomPrefix is the prefix used for liquidity pool coin representation
	PoolCoinDenomPrefix = "pool"
)
View Source
const (
	TypeMsgCreatePool          = "create_pool"
	TypeMsgDepositWithinBatch  = "deposit_within_batch"
	TypeMsgWithdrawWithinBatch = "withdraw_within_batch"
	TypeMsgSwapWithinBatch     = "swap_within_batch"
)

Message types for the liquidity module

View Source
const (
	// CancelOrderLifeSpan is the lifespan of order cancellation.
	CancelOrderLifeSpan int64 = 0

	// MinReserveCoinNum is the minimum number of reserve coins in each liquidity pool.
	MinReserveCoinNum uint32 = 2

	// MaxReserveCoinNum is the maximum number of reserve coins in each liquidity pool.
	MaxReserveCoinNum uint32 = 2

	// DefaultUnitBatchHeight is the default number of blocks in one batch. This param is used for scalability.
	DefaultUnitBatchHeight uint32 = 1

	// DefaultPoolTypeID is the default pool type id. The only supported pool type id is 1.
	DefaultPoolTypeID uint32 = 1

	// DefaultSwapTypeID is the default swap type id. The only supported swap type (instant swap) id is 1.
	DefaultSwapTypeID uint32 = 1

	// DefaultCircuitBreakerEnabled is the default circuit breaker status. This param is used for a contingency plan.
	DefaultCircuitBreakerEnabled = false
)
View Source
const (
	QueryLiquidityPool  = "liquidityPool"
	QueryLiquidityPools = "liquidityPools"
)

QueryLiquidityPool liquidity query endpoint supported by the liquidity querier

Variables

View Source
var (
	ErrPoolNotExists                = sdkerrors.Register(ModuleName, 1, "pool not exists")
	ErrPoolTypeNotExists            = sdkerrors.Register(ModuleName, 2, "pool type not exists")
	ErrEqualDenom                   = sdkerrors.Register(ModuleName, 3, "reserve coin denomination are equal")
	ErrInvalidDenom                 = sdkerrors.Register(ModuleName, 4, "invalid denom")
	ErrNumOfReserveCoin             = sdkerrors.Register(ModuleName, 5, "invalid number of reserve coin")
	ErrNumOfPoolCoin                = sdkerrors.Register(ModuleName, 6, "invalid number of pool coin")
	ErrInsufficientPool             = sdkerrors.Register(ModuleName, 7, "insufficient pool")
	ErrInsufficientBalance          = sdkerrors.Register(ModuleName, 8, "insufficient coin balance")
	ErrLessThanMinInitDeposit       = sdkerrors.Register(ModuleName, 9, "deposit coin less than MinInitDepositAmount")
	ErrNotImplementedYet            = sdkerrors.Register(ModuleName, 10, "not implemented yet")
	ErrPoolAlreadyExists            = sdkerrors.Register(ModuleName, 11, "the pool already exists")
	ErrPoolBatchNotExists           = sdkerrors.Register(ModuleName, 12, "pool batch not exists")
	ErrOrderBookInvalidity          = sdkerrors.Register(ModuleName, 13, "orderbook is not validity")
	ErrBatchNotExecuted             = sdkerrors.Register(ModuleName, 14, "the liquidity pool batch is not executed")
	ErrInvalidPoolCreatorAddr       = sdkerrors.Register(ModuleName, 15, "invalid pool creator address")
	ErrInvalidDepositorAddr         = sdkerrors.Register(ModuleName, 16, "invalid pool depositor address")
	ErrInvalidWithdrawerAddr        = sdkerrors.Register(ModuleName, 17, "invalid pool withdrawer address")
	ErrInvalidSwapRequesterAddr     = sdkerrors.Register(ModuleName, 18, "invalid pool swap requester address")
	ErrBadPoolCoinAmount            = sdkerrors.Register(ModuleName, 19, "invalid pool coin amount")
	ErrBadDepositCoinsAmount        = sdkerrors.Register(ModuleName, 20, "invalid deposit coins amount")
	ErrBadOfferCoinAmount           = sdkerrors.Register(ModuleName, 21, "invalid offer coin amount")
	ErrBadOrderingReserveCoin       = sdkerrors.Register(ModuleName, 22, "reserve coin denoms not ordered alphabetical")
	ErrBadOrderPrice                = sdkerrors.Register(ModuleName, 23, "invalid order price")
	ErrNumOfReserveCoinDenoms       = sdkerrors.Register(ModuleName, 24, "invalid reserve coin denoms")
	ErrEmptyReserveAccountAddress   = sdkerrors.Register(ModuleName, 25, "empty reserve account address")
	ErrEmptyPoolCoinDenom           = sdkerrors.Register(ModuleName, 26, "empty pool coin denom")
	ErrBadOrderingReserveCoinDenoms = sdkerrors.Register(ModuleName, 27, "bad ordering reserve coin denoms")
	ErrBadReserveAccountAddress     = sdkerrors.Register(ModuleName, 28, "bad reserve account address")
	ErrBadPoolCoinDenom             = sdkerrors.Register(ModuleName, 29, "bad pool coin denom")
	ErrInsufficientPoolCreationFee  = sdkerrors.Register(ModuleName, 30, "insufficient balances for pool creation fee")
	ErrExceededMaxOrderable         = sdkerrors.Register(ModuleName, 31, "can not exceed max order ratio of reserve coins that can be ordered at a order")
	ErrBadBatchMsgIndex             = sdkerrors.Register(ModuleName, 32, "bad msg index of the batch")
	ErrSwapTypeNotExists            = sdkerrors.Register(ModuleName, 33, "swap type not exists")
	ErrLessThanMinOfferAmount       = sdkerrors.Register(ModuleName, 34, "offer amount should be over 100 micro")
	ErrBadOfferCoinFee              = sdkerrors.Register(ModuleName, 35, "bad offer coin fee")
	ErrNotMatchedReserveCoin        = sdkerrors.Register(ModuleName, 36, "does not match the reserve coin of the pool")
	ErrBadPoolTypeID                = sdkerrors.Register(ModuleName, 37, "invalid index of the pool type")
	ErrExceededReserveCoinLimit     = sdkerrors.Register(ModuleName, 38, "can not exceed reserve coin limit amount")
	ErrDepletedPool                 = sdkerrors.Register(ModuleName, 39, "the pool is depleted of reserve coin, reinitializing is required by deposit")
	ErrCircuitBreakerEnabled        = sdkerrors.Register(ModuleName, 40, "circuit breaker is triggered")
	ErrOverflowAmount               = sdkerrors.Register(ModuleName, 41, "invalid amount that can cause overflow")
	ErrMaxSlippage                  = sdkerrors.Register(ModuleName, 42, "Max slippage reached")
)

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 (
	// param key for global Liquidity Pool IDs
	GlobalLiquidityPoolIDKey       = []byte("globalLiquidityPoolId")
	ParamsKey                      = []byte{0x10} // key for liquidity module params
	PoolKeyPrefix                  = []byte{0x11}
	PoolByReserveAccIndexKeyPrefix = []byte{0x12}

	PoolBatchKeyPrefix = []byte{0x22}

	PoolBatchDepositMsgStateIndexKeyPrefix  = []byte{0x31}
	PoolBatchWithdrawMsgStateIndexKeyPrefix = []byte{0x32}
	PoolBatchSwapMsgStateIndexKeyPrefix     = []byte{0x33}
)
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 (
	KeyPoolTypes              = []byte("PoolTypes")
	KeyMinInitDepositAmount   = []byte("MinInitDepositAmount")
	KeyInitPoolCoinMintAmount = []byte("InitPoolCoinMintAmount")
	KeyMaxReserveCoinAmount   = []byte("MaxReserveCoinAmount")
	KeySwapFeeRate            = []byte("SwapFeeRate")
	KeyPoolCreationFee        = []byte("PoolCreationFee")
	KeyUnitBatchHeight        = []byte("UnitBatchHeight")
	KeyWithdrawFeeRate        = []byte("WithdrawFeeRate")
	KeyMaxOrderAmountRatio    = []byte("MaxOrderAmountRatio")
	KeyCircuitBreakerEnabled  = []byte("CircuitBreakerEnabled")
	KeyBuildersAddresses      = []byte("BuildersAddresses")
	KeyBuildersCommission     = []byte("BuildersCommission")
)

Parameter store keys

View Source
var (
	DefaultMinInitDepositAmount   = math.NewInt(1000000)
	DefaultInitPoolCoinMintAmount = math.NewInt(1000000)
	DefaultMaxReserveCoinAmount   = math.ZeroInt()
	DefaultSwapFeeRate            = math.LegacyNewDecWithPrec(3, 3) // "0.003000000000000000"
	DefaultWithdrawFeeRate        = math.LegacyZeroDec()
	DefaultMaxOrderAmountRatio    = math.LegacyNewDecWithPrec(1, 1) // "0.100000000000000000"
	DefaultPoolCreationFee        = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(40000000)))
	DefaultPoolType               = PoolType{
		Id:                1,
		Name:              "StandardLiquidityPool",
		MinReserveCoinNum: MinReserveCoinNum,
		MaxReserveCoinNum: MaxReserveCoinNum,
		Description:       "Standard liquidity pool with pool price function X/Y, ESPM constraint, and two kinds of reserve coins",
	}
	DefaultPoolTypes = []PoolType{DefaultPoolType}

	MinOfferCoinAmount       = math.NewInt(100)
	DefaultBuilderCommission = math.LegacyNewDecWithPrec(2, 1) // "0.200000000000000000" if there's builders addresses, this commission rate from fees are redirected to builders
	DefaultBuildersAddresses = []WeightedAddress(nil)
)
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 (

	// ModuleCdc references the global x/liquidity module codec. Note, the
	// codec should ONLY be used in certain instances of tests and for JSON
	// encoding as Amino is still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/liquidity
	// and defined at the application level.
	ModuleCdc = codec.NewAminoCodec(amino)
)

legacy amino codecs

Functions

func AlphabeticalDenomPair

func AlphabeticalDenomPair(denom1, denom2 string) (resDenom1, resDenom2 string)

AlphabeticalDenomPair returns denom pairs that are alphabetically sorted.

func CheckOverflow

func CheckOverflow(a, b math.Int) (err error)

func CheckOverflowWithDec

func CheckOverflowWithDec(a, b math.LegacyDec) (err error)

func CheckSwapPrice

func CheckSwapPrice(matchResultXtoY, matchResultYtoX []MatchResult, swapPrice math.LegacyDec) bool

Check swap price validity using list of match result.

func CountFractionalMatchedMsgs

func CountFractionalMatchedMsgs(swapMsgStates []*SwapMsgState) int

Get number of fractional matched messages on the list.

func CountNotMatchedMsgs

func CountNotMatchedMsgs(swapMsgStates []*SwapMsgState) int

Get number of not matched messages on the list.

func CreateModuleAccount added in v1.6.8

func CreateModuleAccount(ctx sdk.Context, ak AccountKeeper, addr sdk.AccAddress) error

CreateModuleAccount creates a module account at the provided address. It overrides an account if it exists at that address, with a non-zero sequence number & pubkey Contract: addr is derived from `address.Module(ModuleName, key)`

func GetCoinsTotalAmount

func GetCoinsTotalAmount(coins sdk.Coins) math.Int

GetCoinsTotalAmount returns total amount of all coins in sdk.Coins.

func GetOfferCoinFee

func GetOfferCoinFee(offerCoin sdk.Coin, swapFeeRate math.LegacyDec) sdk.Coin

func GetPoolBatchDepositMsgStateIndexKey

func GetPoolBatchDepositMsgStateIndexKey(poolID, msgIndex uint64) []byte

GetPoolBatchDepositMsgStateIndexKey returns kv indexing key of the latest index value of the msg index

func GetPoolBatchDepositMsgStatesPrefix

func GetPoolBatchDepositMsgStatesPrefix(poolID uint64) []byte

GetPoolBatchDepositMsgStatesPrefix returns prefix of deposit message states in the pool's latest batch for iteration

func GetPoolBatchKey

func GetPoolBatchKey(poolID uint64) []byte

GetPoolBatchKey returns kv indexing key of the pool batch indexed by pool id

func GetPoolBatchSwapMsgStateIndexKey

func GetPoolBatchSwapMsgStateIndexKey(poolID, msgIndex uint64) []byte

GetPoolBatchSwapMsgStateIndexKey returns kv indexing key of the latest index value of the msg index

func GetPoolBatchSwapMsgStatesPrefix

func GetPoolBatchSwapMsgStatesPrefix(poolID uint64) []byte

GetPoolBatchSwapMsgStatesPrefix returns prefix of swap message states in the pool's latest batch for iteration

func GetPoolBatchWithdrawMsgStateIndexKey

func GetPoolBatchWithdrawMsgStateIndexKey(poolID, msgIndex uint64) []byte

GetPoolBatchWithdrawMsgStateIndexKey returns kv indexing key of the latest index value of the msg index

func GetPoolBatchWithdrawMsgsPrefix

func GetPoolBatchWithdrawMsgsPrefix(poolID uint64) []byte

GetPoolBatchWithdrawMsgsPrefix returns prefix of withdraw message states in the pool's latest batch for iteration

func GetPoolByReserveAccIndexKey

func GetPoolByReserveAccIndexKey(reserveAcc sdk.AccAddress) []byte

GetPoolByReserveAccIndexKey returns kv indexing key of the pool indexed by reserve account

func GetPoolCoinDenom

func GetPoolCoinDenom(poolName string) string

GetPoolCoinDenom returns the denomination of the pool coin.

func GetPoolKey

func GetPoolKey(poolID uint64) []byte

GetPoolKey returns kv indexing key of the pool

func GetPoolReserveAcc

func GetPoolReserveAcc(poolName string) sdk.AccAddress

GetPoolReserveAcc returns the module address of the pool's reserve account.

func GetReserveAcc

func GetReserveAcc(poolCoinDenom string) (sdk.AccAddress, error)

GetReserveAcc extracts and returns reserve account from pool coin denom.

func MakeOrderMap

func MakeOrderMap(swapMsgs []*SwapMsgState, denomX, denomY string, onlyNotMatched bool) (OrderMap, []*SwapMsgState, []*SwapMsgState)

make orderMap key as swap price, value as Buy, Sell Amount from swap msgs, with split as Buy xToY, Sell yToX msg list.

func MustMarshalDepositMsgState

func MustMarshalDepositMsgState(cdc codec.BinaryCodec, msg DepositMsgState) []byte

MustMarshalDepositMsgState returns the DepositMsgState bytes. Panics if fails.

func MustMarshalPool

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

MustMarshalPool returns the Pool bytes. Panics if fails.

func MustMarshalPoolBatch

func MustMarshalPoolBatch(cdc codec.BinaryCodec, poolBatch PoolBatch) []byte

MustMarshalPoolBatch returns the PoolBatch bytes. Panics if fails.

func MustMarshalSwapMsgState

func MustMarshalSwapMsgState(cdc codec.BinaryCodec, msg SwapMsgState) []byte

MustMarshalSwapMsgState returns the SwapMsgState bytes. Panics if fails.

func MustMarshalWithdrawMsgState

func MustMarshalWithdrawMsgState(cdc codec.BinaryCodec, msg WithdrawMsgState) []byte

MustMarshalWithdrawMsgState returns the WithdrawMsgState bytes. Panics if fails.

func MustParseCoinsNormalized

func MustParseCoinsNormalized(coinStr string) sdk.Coins

func ParamKeyTable

func ParamKeyTable() paramstypes.KeyTable

ParamKeyTable returns the parameter key table.

func PoolName

func PoolName(reserveCoinDenoms []string, poolTypeID uint32) string

PoolName returns unique name of the pool consists of given reserve coin denoms and type id.

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the x/liquidity interface types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on the codec.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func SortDenoms

func SortDenoms(denoms []string) []string

SortDenoms sorts denoms in alphabetical order.

func UpdateSwapMsgStates

func UpdateSwapMsgStates(x, y math.LegacyDec, xToY, yToX []*SwapMsgState, matchResultXtoY, matchResultYtoX []MatchResult) (
	[]*SwapMsgState, []*SwapMsgState, math.LegacyDec, math.LegacyDec, math.LegacyDec, math.LegacyDec)

UpdateSwapMsgStates updates SwapMsgStates using the MatchResults.

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates GenesisState.

func ValidateReserveCoinLimit

func ValidateReserveCoinLimit(maxReserveCoinAmount math.Int, depositCoins sdk.Coins) error

ValidateReserveCoinLimit checks if total amounts of depositCoins exceed maxReserveCoinAmount.

func ValidateStateAndExpireOrders

func ValidateStateAndExpireOrders(swapMsgStates []*SwapMsgState, currentHeight int64, expireThisHeight bool)

check validity state of the batch swap messages, and set to delete state to height timeout expired order

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
	GetModuleAddress(name string) sdk.AccAddress
	NewAccount(context.Context, sdk.AccountI) sdk.AccountI
	SetAccount(ctx context.Context, acc sdk.AccountI)
}

AccountKeeper defines the expected account keeper

type BankKeeper

type BankKeeper interface {
	InputOutputCoins(ctx context.Context, inputs banktypes.Input, outputs []banktypes.Output) error
	SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
	SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins

	GetSupply(ctx context.Context, denom string) sdk.Coin
	SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	BurnCoins(ctx context.Context, name string, amt sdk.Coins) error
	MintCoins(ctx context.Context, name string, amt sdk.Coins) error
}

BankKeeper defines the expected bank send keeper

type BatchResult

type BatchResult struct {
	MatchType      MatchType
	PriceDirection PriceDirection
	SwapPrice      math.LegacyDec
	EX             math.LegacyDec
	EY             math.LegacyDec
	OriginalEX     math.Int
	OriginalEY     math.Int
	PoolX          math.LegacyDec
	PoolY          math.LegacyDec
	TransactAmt    math.LegacyDec
}

struct of swap matching result of the batch

func NewBatchResult

func NewBatchResult() BatchResult

return of zero object, to avoid nil

type DepositMsgState

type DepositMsgState struct {
	// height where this message is appended to the batch
	MsgHeight int64 `protobuf:"varint,1,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty" yaml:"msg_height"`
	// index of this deposit message in this liquidity pool
	MsgIndex uint64 `protobuf:"varint,2,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty" yaml:"msg_index"`
	// true if executed on this batch, false if not executed
	Executed bool `protobuf:"varint,3,opt,name=executed,proto3" json:"executed,omitempty" yaml:"executed"`
	// true if executed successfully on this batch, false if failed
	Succeeded bool `protobuf:"varint,4,opt,name=succeeded,proto3" json:"succeeded,omitempty" yaml:"succeeded"`
	// true if ready to be deleted on kvstore, false if not ready to be deleted
	ToBeDeleted bool `protobuf:"varint,5,opt,name=to_be_deleted,json=toBeDeleted,proto3" json:"to_be_deleted,omitempty" yaml:"to_be_deleted"`
	// MsgDepositWithinBatch
	Msg *MsgDepositWithinBatch `protobuf:"bytes,6,opt,name=msg,proto3" json:"msg,omitempty" yaml:"msg"`
}

DepositMsgState defines the state of deposit message that contains state information as it is processed in the next batch or batches.

func MustUnmarshalDepositMsgState

func MustUnmarshalDepositMsgState(cdc codec.BinaryCodec, value []byte) DepositMsgState

MustUnmarshalDepositMsgState returns the DepositMsgState from bytes. Panics if fails.

func UnmarshalDepositMsgState

func UnmarshalDepositMsgState(cdc codec.BinaryCodec, value []byte) (msg DepositMsgState, err error)

UnmarshalDepositMsgState returns the DepositMsgState from bytes.

func (*DepositMsgState) Descriptor

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

func (*DepositMsgState) Marshal

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

func (*DepositMsgState) MarshalTo

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

func (*DepositMsgState) MarshalToSizedBuffer

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

func (*DepositMsgState) ProtoMessage

func (*DepositMsgState) ProtoMessage()

func (*DepositMsgState) Reset

func (m *DepositMsgState) Reset()

func (*DepositMsgState) Size

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

func (*DepositMsgState) String

func (m *DepositMsgState) String() string

func (*DepositMsgState) Unmarshal

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

func (*DepositMsgState) XXX_DiscardUnknown

func (m *DepositMsgState) XXX_DiscardUnknown()

func (*DepositMsgState) XXX_Marshal

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

func (*DepositMsgState) XXX_Merge

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

func (*DepositMsgState) XXX_Size

func (m *DepositMsgState) XXX_Size() int

func (*DepositMsgState) XXX_Unmarshal

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

type DistributionKeeper

type DistributionKeeper interface {
	FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error
}

DistributionKeeper defines the expected distribution keeper

type GenesisState

type GenesisState struct {
	// params defines all the parameters for the liquidity module.
	Params      Params       `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	PoolRecords []PoolRecord `protobuf:"bytes,2,rep,name=pool_records,json=poolRecords,proto3" json:"pool_records" yaml:"pools"`
}

GenesisState defines the liquidity module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns the default genesis state.

func NewGenesisState

func NewGenesisState(params Params, liquidityPoolRecords []PoolRecord) *GenesisState

NewGenesisState returns new GenesisState.

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

type MatchResult struct {
	OrderDirection         OrderDirection
	OrderMsgIndex          uint64
	OrderPrice             math.LegacyDec
	OfferCoinAmt           math.LegacyDec
	TransactedCoinAmt      math.LegacyDec
	ExchangedDemandCoinAmt math.LegacyDec
	OfferCoinFeeAmt        math.LegacyDec
	ExchangedCoinFeeAmt    math.LegacyDec
	SwapMsgState           *SwapMsgState
}

struct of swap matching result of each Batch swap message

func FindOrderMatch

func FindOrderMatch(direction OrderDirection, swapMsgStates []*SwapMsgState, executableAmt, swapPrice math.LegacyDec, height int64) (
	matchResults []MatchResult, poolXDelta, poolYDelta math.LegacyDec)

Find matched orders and set status for msgs

type MatchType

type MatchType int

Type of match

const (
	ExactMatch MatchType = iota + 1
	NoMatch
	FractionalMatch
)

type MsgClient

type MsgClient interface {
	// Submit a create liquidity pool message.
	CreatePool(ctx context.Context, in *MsgCreatePool, opts ...grpc.CallOption) (*MsgCreatePoolResponse, error)
	// Submit a deposit to the liquidity pool batch.
	DepositWithinBatch(ctx context.Context, in *MsgDepositWithinBatch, opts ...grpc.CallOption) (*MsgDepositWithinBatchResponse, error)
	// Submit a withdraw from the liquidity pool batch.
	WithdrawWithinBatch(ctx context.Context, in *MsgWithdrawWithinBatch, opts ...grpc.CallOption) (*MsgWithdrawWithinBatchResponse, error)
	// Submit a swap to the liquidity pool batch.
	Swap(ctx context.Context, in *MsgSwapWithinBatch, opts ...grpc.CallOption) (*MsgSwapWithinBatchResponse, error)
	DirectSwap(ctx context.Context, in *MsgDirectSwap, opts ...grpc.CallOption) (*MsgDirectSwapResponse, 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 {
	PoolCreatorAddress string `` /* 145-byte string literal not displayed */
	// id of the target pool type, must match the value in the pool. Only
	// pool-type-id 1 is supported.
	PoolTypeId uint32 `protobuf:"varint,2,opt,name=pool_type_id,json=poolTypeId,proto3" json:"pool_type_id,omitempty" yaml:"pool_type_id"`
	// reserve coin pair of the pool to deposit.
	DepositCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 162-byte string literal not displayed */
}

MsgCreatePool defines an sdk.Msg type that supports submitting a create liquidity pool tx.

See: https://github.com/tendermint/liquidity/blob/develop/x/liquidity/spec/04_messages.md

func NewMsgCreatePool

func NewMsgCreatePool(poolCreator sdk.AccAddress, poolTypeID uint32, depositCoins sdk.Coins) *MsgCreatePool

NewMsgCreatePool creates a new MsgCreatePool.

func (*MsgCreatePool) Descriptor

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

func (MsgCreatePool) GetPoolCreator

func (msg MsgCreatePool) GetPoolCreator() 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 MsgDepositWithinBatch

type MsgDepositWithinBatch struct {
	DepositorAddress string `` /* 134-byte string literal not displayed */
	// id of the target pool
	PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	// reserve coin pair of the pool to deposit
	DepositCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 162-byte string literal not displayed */
}

`MsgDepositWithinBatch defines` an `sdk.Msg` type that supports submitting a deposit request to the batch of the liquidity pool. Deposit is submitted to the batch of the Liquidity pool with the specified `pool_id`, `deposit_coins` for reserve. This request is stacked in the batch of the liquidity pool, is not processed immediately, and is processed in the `endblock` at the same time as other requests.

See: https://github.com/tendermint/liquidity/blob/develop/x/liquidity/spec/04_messages.md

func NewMsgDepositWithinBatch

func NewMsgDepositWithinBatch(depositor sdk.AccAddress, poolID uint64, depositCoins sdk.Coins) *MsgDepositWithinBatch

NewMsgDepositWithinBatch creates a new MsgDepositWithinBatch.

func (*MsgDepositWithinBatch) Descriptor

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

func (MsgDepositWithinBatch) GetDepositor

func (msg MsgDepositWithinBatch) GetDepositor() sdk.AccAddress

func (MsgDepositWithinBatch) GetSignBytes

func (msg MsgDepositWithinBatch) GetSignBytes() []byte

func (MsgDepositWithinBatch) GetSigners

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

func (*MsgDepositWithinBatch) Marshal

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

func (*MsgDepositWithinBatch) MarshalTo

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

func (*MsgDepositWithinBatch) MarshalToSizedBuffer

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

func (*MsgDepositWithinBatch) ProtoMessage

func (*MsgDepositWithinBatch) ProtoMessage()

func (*MsgDepositWithinBatch) Reset

func (m *MsgDepositWithinBatch) Reset()

func (MsgDepositWithinBatch) Route

func (msg MsgDepositWithinBatch) Route() string

func (*MsgDepositWithinBatch) Size

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

func (*MsgDepositWithinBatch) String

func (m *MsgDepositWithinBatch) String() string

func (MsgDepositWithinBatch) Type

func (msg MsgDepositWithinBatch) Type() string

func (*MsgDepositWithinBatch) Unmarshal

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

func (MsgDepositWithinBatch) ValidateBasic

func (msg MsgDepositWithinBatch) ValidateBasic() error

func (*MsgDepositWithinBatch) XXX_DiscardUnknown

func (m *MsgDepositWithinBatch) XXX_DiscardUnknown()

func (*MsgDepositWithinBatch) XXX_Marshal

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

func (*MsgDepositWithinBatch) XXX_Merge

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

func (*MsgDepositWithinBatch) XXX_Size

func (m *MsgDepositWithinBatch) XXX_Size() int

func (*MsgDepositWithinBatch) XXX_Unmarshal

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

type MsgDepositWithinBatchResponse

type MsgDepositWithinBatchResponse struct {
}

MsgDepositWithinBatchResponse defines the Msg/DepositWithinBatch response type.

func (*MsgDepositWithinBatchResponse) Descriptor

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

func (*MsgDepositWithinBatchResponse) Marshal

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

func (*MsgDepositWithinBatchResponse) MarshalTo

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

func (*MsgDepositWithinBatchResponse) MarshalToSizedBuffer

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

func (*MsgDepositWithinBatchResponse) ProtoMessage

func (*MsgDepositWithinBatchResponse) ProtoMessage()

func (*MsgDepositWithinBatchResponse) Reset

func (m *MsgDepositWithinBatchResponse) Reset()

func (*MsgDepositWithinBatchResponse) Size

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

func (*MsgDepositWithinBatchResponse) String

func (*MsgDepositWithinBatchResponse) Unmarshal

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

func (*MsgDepositWithinBatchResponse) XXX_DiscardUnknown

func (m *MsgDepositWithinBatchResponse) XXX_DiscardUnknown()

func (*MsgDepositWithinBatchResponse) XXX_Marshal

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

func (*MsgDepositWithinBatchResponse) XXX_Merge

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

func (*MsgDepositWithinBatchResponse) XXX_Size

func (m *MsgDepositWithinBatchResponse) XXX_Size() int

func (*MsgDepositWithinBatchResponse) XXX_Unmarshal

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

type MsgDirectSwap added in v1.6.10

type MsgDirectSwap struct {
	// address of swap requester
	SwapRequesterAddress string `` /* 153-byte string literal not displayed */
	// id of swap type, must match the value in the pool. Only `swap_type_id` 1 is
	// supported.
	PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	// id of swap type. Must match the value in the pool.
	SwapTypeId uint32 `protobuf:"varint,3,opt,name=swap_type_id,json=swapTypeId,proto3" json:"swap_type_id,omitempty" yaml:"swap_type_id"`
	// offer sdk.coin for the swap request, must match the denom in the pool.
	OfferCoin types.Coin `protobuf:"bytes,4,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin" yaml:"offer_coin"`
	// denom of demand coin to be exchanged on the swap request, must match the
	// denom in the pool.
	DemandCoinDenom string `` /* 133-byte string literal not displayed */
	// limit order price for the order, the price is the exchange ratio of X/Y
	// where X is the amount of the first coin and Y is the amount
	// of the second coin when their denoms are sorted alphabetically.
	OrderPrice cosmossdk_io_math.LegacyDec `` /* 139-byte string literal not displayed */
}

func NewMsgDirectSwap added in v1.6.10

func NewMsgDirectSwap(
	swapRequester sdk.AccAddress,
	poolID uint64,
	swapTypeID uint32,
	offerCoin sdk.Coin,
	demandCoinDenom string,
	orderPrice math.LegacyDec,
) *MsgDirectSwap

NewMsgSwapWithinBatch creates a new MsgSwapWithinBatch.

func (*MsgDirectSwap) Descriptor added in v1.6.10

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

func (MsgDirectSwap) GetSignBytes added in v1.6.10

func (msg MsgDirectSwap) GetSignBytes() []byte

func (MsgDirectSwap) GetSigners added in v1.6.10

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

func (MsgDirectSwap) GetSwapRequester added in v1.6.10

func (msg MsgDirectSwap) GetSwapRequester() sdk.AccAddress

func (*MsgDirectSwap) Marshal added in v1.6.10

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

func (*MsgDirectSwap) MarshalTo added in v1.6.10

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

func (*MsgDirectSwap) MarshalToSizedBuffer added in v1.6.10

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

func (*MsgDirectSwap) ProtoMessage added in v1.6.10

func (*MsgDirectSwap) ProtoMessage()

func (*MsgDirectSwap) Reset added in v1.6.10

func (m *MsgDirectSwap) Reset()

func (MsgDirectSwap) Route added in v1.6.10

func (msg MsgDirectSwap) Route() string

func (*MsgDirectSwap) Size added in v1.6.10

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

func (*MsgDirectSwap) String added in v1.6.10

func (m *MsgDirectSwap) String() string

func (MsgDirectSwap) Type added in v1.6.10

func (msg MsgDirectSwap) Type() string

func (*MsgDirectSwap) Unmarshal added in v1.6.10

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

func (MsgDirectSwap) ValidateBasic added in v1.6.10

func (msg MsgDirectSwap) ValidateBasic() error

func (*MsgDirectSwap) XXX_DiscardUnknown added in v1.6.10

func (m *MsgDirectSwap) XXX_DiscardUnknown()

func (*MsgDirectSwap) XXX_Marshal added in v1.6.10

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

func (*MsgDirectSwap) XXX_Merge added in v1.6.10

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

func (*MsgDirectSwap) XXX_Size added in v1.6.10

func (m *MsgDirectSwap) XXX_Size() int

func (*MsgDirectSwap) XXX_Unmarshal added in v1.6.10

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

type MsgDirectSwapResponse added in v1.6.10

type MsgDirectSwapResponse struct {
	ReceivedAmount types.Coin `protobuf:"bytes,1,opt,name=received_amount,json=receivedAmount,proto3" json:"received_amount" yaml:"offer_coin"`
}

MsgSwapWithinBatchResponse defines the Msg/Swap response type.

func (*MsgDirectSwapResponse) Descriptor added in v1.6.10

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

func (*MsgDirectSwapResponse) GetReceivedAmount added in v1.6.10

func (m *MsgDirectSwapResponse) GetReceivedAmount() types.Coin

func (*MsgDirectSwapResponse) Marshal added in v1.6.10

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

func (*MsgDirectSwapResponse) MarshalTo added in v1.6.10

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

func (*MsgDirectSwapResponse) MarshalToSizedBuffer added in v1.6.10

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

func (*MsgDirectSwapResponse) ProtoMessage added in v1.6.10

func (*MsgDirectSwapResponse) ProtoMessage()

func (*MsgDirectSwapResponse) Reset added in v1.6.10

func (m *MsgDirectSwapResponse) Reset()

func (*MsgDirectSwapResponse) Size added in v1.6.10

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

func (*MsgDirectSwapResponse) String added in v1.6.10

func (m *MsgDirectSwapResponse) String() string

func (*MsgDirectSwapResponse) Unmarshal added in v1.6.10

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

func (*MsgDirectSwapResponse) XXX_DiscardUnknown added in v1.6.10

func (m *MsgDirectSwapResponse) XXX_DiscardUnknown()

func (*MsgDirectSwapResponse) XXX_Marshal added in v1.6.10

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

func (*MsgDirectSwapResponse) XXX_Merge added in v1.6.10

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

func (*MsgDirectSwapResponse) XXX_Size added in v1.6.10

func (m *MsgDirectSwapResponse) XXX_Size() int

func (*MsgDirectSwapResponse) XXX_Unmarshal added in v1.6.10

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

type MsgServer

type MsgServer interface {
	// Submit a create liquidity pool message.
	CreatePool(context.Context, *MsgCreatePool) (*MsgCreatePoolResponse, error)
	// Submit a deposit to the liquidity pool batch.
	DepositWithinBatch(context.Context, *MsgDepositWithinBatch) (*MsgDepositWithinBatchResponse, error)
	// Submit a withdraw from the liquidity pool batch.
	WithdrawWithinBatch(context.Context, *MsgWithdrawWithinBatch) (*MsgWithdrawWithinBatchResponse, error)
	// Submit a swap to the liquidity pool batch.
	Swap(context.Context, *MsgSwapWithinBatch) (*MsgSwapWithinBatchResponse, error)
	DirectSwap(context.Context, *MsgDirectSwap) (*MsgDirectSwapResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSwapWithinBatch

type MsgSwapWithinBatch struct {
	// address of swap requester
	SwapRequesterAddress string `` /* 153-byte string literal not displayed */
	// id of swap type, must match the value in the pool. Only `swap_type_id` 1 is
	// supported.
	PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	// id of swap type. Must match the value in the pool.
	SwapTypeId uint32 `protobuf:"varint,3,opt,name=swap_type_id,json=swapTypeId,proto3" json:"swap_type_id,omitempty" yaml:"swap_type_id"`
	// offer sdk.coin for the swap request, must match the denom in the pool.
	OfferCoin types.Coin `protobuf:"bytes,4,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin" yaml:"offer_coin"`
	// denom of demand coin to be exchanged on the swap request, must match the
	// denom in the pool.
	DemandCoinDenom string `` /* 133-byte string literal not displayed */
	// half of offer coin amount * params.swap_fee_rate and ceil for reservation
	// to pay fees.
	OfferCoinFee types.Coin `protobuf:"bytes,6,opt,name=offer_coin_fee,json=offerCoinFee,proto3" json:"offer_coin_fee" yaml:"offer_coin_fee"`
	// limit order price for the order, the price is the exchange ratio of X/Y
	// where X is the amount of the first coin and Y is the amount
	// of the second coin when their denoms are sorted alphabetically.
	OrderPrice cosmossdk_io_math.LegacyDec `` /* 139-byte string literal not displayed */
}

`MsgSwapWithinBatch` defines an sdk.Msg type that supports submitting a swap offer request to the batch of the liquidity pool. Submit swap offer to the liquidity pool batch with the specified the `pool_id`, `swap_type_id`, `demand_coin_denom` with the coin and the price you're offering and `offer_coin_fee` must be half of offer coin amount * current `params.swap_fee_rate` and ceil for reservation to pay fees. This request is stacked in the batch of the liquidity pool, is not processed immediately, and is processed in the `endblock` at the same time as other requests. You must request the same fields as the pool. Only the default `swap_type_id` 1 is supported.

See: https://github.com/tendermint/liquidity/tree/develop/doc https://github.com/tendermint/liquidity/blob/develop/x/liquidity/spec/04_messages.md

func NewMsgSwapWithinBatch

func NewMsgSwapWithinBatch(
	swapRequester sdk.AccAddress,
	poolID uint64,
	swapTypeID uint32,
	offerCoin sdk.Coin,
	demandCoinDenom string,
	orderPrice math.LegacyDec,
	swapFeeRate math.LegacyDec,
) *MsgSwapWithinBatch

NewMsgSwapWithinBatch creates a new MsgSwapWithinBatch.

func (*MsgSwapWithinBatch) Descriptor

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

func (MsgSwapWithinBatch) GetSignBytes

func (msg MsgSwapWithinBatch) GetSignBytes() []byte

func (MsgSwapWithinBatch) GetSigners

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

func (MsgSwapWithinBatch) GetSwapRequester

func (msg MsgSwapWithinBatch) GetSwapRequester() sdk.AccAddress

func (*MsgSwapWithinBatch) Marshal

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

func (*MsgSwapWithinBatch) MarshalTo

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

func (*MsgSwapWithinBatch) MarshalToSizedBuffer

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

func (*MsgSwapWithinBatch) ProtoMessage

func (*MsgSwapWithinBatch) ProtoMessage()

func (*MsgSwapWithinBatch) Reset

func (m *MsgSwapWithinBatch) Reset()

func (MsgSwapWithinBatch) Route

func (msg MsgSwapWithinBatch) Route() string

func (*MsgSwapWithinBatch) Size

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

func (*MsgSwapWithinBatch) String

func (m *MsgSwapWithinBatch) String() string

func (MsgSwapWithinBatch) Type

func (msg MsgSwapWithinBatch) Type() string

func (*MsgSwapWithinBatch) Unmarshal

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

func (MsgSwapWithinBatch) ValidateBasic

func (msg MsgSwapWithinBatch) ValidateBasic() error

func (*MsgSwapWithinBatch) XXX_DiscardUnknown

func (m *MsgSwapWithinBatch) XXX_DiscardUnknown()

func (*MsgSwapWithinBatch) XXX_Marshal

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

func (*MsgSwapWithinBatch) XXX_Merge

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

func (*MsgSwapWithinBatch) XXX_Size

func (m *MsgSwapWithinBatch) XXX_Size() int

func (*MsgSwapWithinBatch) XXX_Unmarshal

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

type MsgSwapWithinBatchResponse

type MsgSwapWithinBatchResponse struct {
}

MsgSwapWithinBatchResponse defines the Msg/Swap response type.

func (*MsgSwapWithinBatchResponse) Descriptor

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

func (*MsgSwapWithinBatchResponse) Marshal

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

func (*MsgSwapWithinBatchResponse) MarshalTo

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

func (*MsgSwapWithinBatchResponse) MarshalToSizedBuffer

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

func (*MsgSwapWithinBatchResponse) ProtoMessage

func (*MsgSwapWithinBatchResponse) ProtoMessage()

func (*MsgSwapWithinBatchResponse) Reset

func (m *MsgSwapWithinBatchResponse) Reset()

func (*MsgSwapWithinBatchResponse) Size

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

func (*MsgSwapWithinBatchResponse) String

func (m *MsgSwapWithinBatchResponse) String() string

func (*MsgSwapWithinBatchResponse) Unmarshal

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

func (*MsgSwapWithinBatchResponse) XXX_DiscardUnknown

func (m *MsgSwapWithinBatchResponse) XXX_DiscardUnknown()

func (*MsgSwapWithinBatchResponse) XXX_Marshal

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

func (*MsgSwapWithinBatchResponse) XXX_Merge

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

func (*MsgSwapWithinBatchResponse) XXX_Size

func (m *MsgSwapWithinBatchResponse) XXX_Size() int

func (*MsgSwapWithinBatchResponse) XXX_Unmarshal

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

type MsgWithdrawWithinBatch

type MsgWithdrawWithinBatch struct {
	WithdrawerAddress string `` /* 138-byte string literal not displayed */
	// id of the target pool
	PoolId   uint64     `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	PoolCoin types.Coin `protobuf:"bytes,3,opt,name=pool_coin,json=poolCoin,proto3" json:"pool_coin" yaml:"pool_coin"`
}

`MsgWithdrawWithinBatch` defines an `sdk.Msg` type that supports submitting a withdraw request to the batch of the liquidity pool. Withdraw is submitted to the batch from the Liquidity pool with the specified `pool_id`, `pool_coin` of the pool. This request is stacked in the batch of the liquidity pool, is not processed immediately, and is processed in the `endblock` at the same time as other requests.

See: https://github.com/tendermint/liquidity/blob/develop/x/liquidity/spec/04_messages.md

func NewMsgWithdrawWithinBatch

func NewMsgWithdrawWithinBatch(withdrawer sdk.AccAddress, poolID uint64, poolCoin sdk.Coin) *MsgWithdrawWithinBatch

NewMsgWithdrawWithinBatch creates a new MsgWithdrawWithinBatch.

func (*MsgWithdrawWithinBatch) Descriptor

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

func (MsgWithdrawWithinBatch) GetSignBytes

func (msg MsgWithdrawWithinBatch) GetSignBytes() []byte

func (MsgWithdrawWithinBatch) GetSigners

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

func (MsgWithdrawWithinBatch) GetWithdrawer

func (msg MsgWithdrawWithinBatch) GetWithdrawer() sdk.AccAddress

func (*MsgWithdrawWithinBatch) Marshal

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

func (*MsgWithdrawWithinBatch) MarshalTo

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

func (*MsgWithdrawWithinBatch) MarshalToSizedBuffer

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

func (*MsgWithdrawWithinBatch) ProtoMessage

func (*MsgWithdrawWithinBatch) ProtoMessage()

func (*MsgWithdrawWithinBatch) Reset

func (m *MsgWithdrawWithinBatch) Reset()

func (MsgWithdrawWithinBatch) Route

func (msg MsgWithdrawWithinBatch) Route() string

func (*MsgWithdrawWithinBatch) Size

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

func (*MsgWithdrawWithinBatch) String

func (m *MsgWithdrawWithinBatch) String() string

func (MsgWithdrawWithinBatch) Type

func (msg MsgWithdrawWithinBatch) Type() string

func (*MsgWithdrawWithinBatch) Unmarshal

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

func (MsgWithdrawWithinBatch) ValidateBasic

func (msg MsgWithdrawWithinBatch) ValidateBasic() error

func (*MsgWithdrawWithinBatch) XXX_DiscardUnknown

func (m *MsgWithdrawWithinBatch) XXX_DiscardUnknown()

func (*MsgWithdrawWithinBatch) XXX_Marshal

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

func (*MsgWithdrawWithinBatch) XXX_Merge

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

func (*MsgWithdrawWithinBatch) XXX_Size

func (m *MsgWithdrawWithinBatch) XXX_Size() int

func (*MsgWithdrawWithinBatch) XXX_Unmarshal

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

type MsgWithdrawWithinBatchResponse

type MsgWithdrawWithinBatchResponse struct {
}

MsgWithdrawWithinBatchResponse defines the Msg/WithdrawWithinBatch response type.

func (*MsgWithdrawWithinBatchResponse) Descriptor

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

func (*MsgWithdrawWithinBatchResponse) Marshal

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

func (*MsgWithdrawWithinBatchResponse) MarshalTo

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

func (*MsgWithdrawWithinBatchResponse) MarshalToSizedBuffer

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

func (*MsgWithdrawWithinBatchResponse) ProtoMessage

func (*MsgWithdrawWithinBatchResponse) ProtoMessage()

func (*MsgWithdrawWithinBatchResponse) Reset

func (m *MsgWithdrawWithinBatchResponse) Reset()

func (*MsgWithdrawWithinBatchResponse) Size

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

func (*MsgWithdrawWithinBatchResponse) String

func (*MsgWithdrawWithinBatchResponse) Unmarshal

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

func (*MsgWithdrawWithinBatchResponse) XXX_DiscardUnknown

func (m *MsgWithdrawWithinBatchResponse) XXX_DiscardUnknown()

func (*MsgWithdrawWithinBatchResponse) XXX_Marshal

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

func (*MsgWithdrawWithinBatchResponse) XXX_Merge

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

func (*MsgWithdrawWithinBatchResponse) XXX_Size

func (m *MsgWithdrawWithinBatchResponse) XXX_Size() int

func (*MsgWithdrawWithinBatchResponse) XXX_Unmarshal

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

type Order

type Order struct {
	Price         math.LegacyDec
	BuyOfferAmt   math.Int
	SellOfferAmt  math.Int
	SwapMsgStates []*SwapMsgState
}

Type of order map to index at price, having the pointer list of the swap batch message.

type OrderBook

type OrderBook []Order

OrderBook is a list of orders

func (OrderBook) CalculateMatch

func (orderBook OrderBook) CalculateMatch(direction PriceDirection, x, y math.LegacyDec) (maxScenario BatchResult, found bool)

Calculates the batch results with the logic for each direction

func (OrderBook) CalculateMatchStay

func (orderBook OrderBook) CalculateMatchStay(currentPrice math.LegacyDec) (r BatchResult)

Calculate results for orderbook matching with unchanged price case

func (OrderBook) CalculateSwap

func (orderBook OrderBook) CalculateSwap(direction PriceDirection, x, y, orderPrice, lastOrderPrice math.LegacyDec) BatchResult

CalculateSwap calculates the batch result.

func (OrderBook) ExecutableAmt

func (orderBook OrderBook) ExecutableAmt(swapPrice math.LegacyDec) (executableBuyAmtX, executableSellAmtY math.Int)

calculate the executable amount of the orderbook for each X, Y

func (OrderBook) Len

func (orderBook OrderBook) Len() int

Len implements sort.Interface for OrderBook

func (OrderBook) Less

func (orderBook OrderBook) Less(i, j int) bool

Less implements sort.Interface for OrderBook

func (OrderBook) Match

func (orderBook OrderBook) Match(x, y math.LegacyDec) (BatchResult, bool)

The price and coins of swap messages in orderbook are calculated to derive match result with the price direction.

func (OrderBook) MustExecutableAmt

func (orderBook OrderBook) MustExecutableAmt(swapPrice math.LegacyDec) (mustExecutableBuyAmtX, mustExecutableSellAmtY math.Int)

Check swap executable amount validity of the orderbook

func (OrderBook) PriceDirection

func (orderBook OrderBook) PriceDirection(currentPrice math.LegacyDec) PriceDirection

Get Price direction of the orderbook with current Price

func (OrderBook) Reverse

func (orderBook OrderBook) Reverse()

decreasing sort orderbook by order price

func (OrderBook) Sort

func (orderBook OrderBook) Sort()

increasing sort orderbook by order price

func (OrderBook) Swap

func (orderBook OrderBook) Swap(i, j int)

Swap implements sort.Interface for OrderBook

func (OrderBook) Validate

func (orderBook OrderBook) Validate(currentPrice math.LegacyDec) bool

Check orderbook validity naively

type OrderDirection

type OrderDirection int

Direction of order

const (
	DirectionXtoY OrderDirection = iota + 1
	DirectionYtoX
)

type OrderMap

type OrderMap map[string]Order

Order map type indexed by order price at price

func (OrderMap) SortOrderBook

func (orderMap OrderMap) SortOrderBook() (orderBook OrderBook)

Make orderbook by sort orderMap.

type Params

type Params struct {
	// list of available pool types
	PoolTypes []PoolType `protobuf:"bytes,1,rep,name=pool_types,json=poolTypes,proto3" json:"pool_types" yaml:"pool_types"`
	// Minimum number of coins to be deposited to the liquidity pool on pool
	// creation.
	MinInitDepositAmount cosmossdk_io_math.Int `` /* 179-byte string literal not displayed */
	// Initial mint amount of pool coins upon pool creation.
	InitPoolCoinMintAmount cosmossdk_io_math.Int `` /* 190-byte string literal not displayed */
	// Limit the size of each liquidity pool to minimize risk. In development, set
	// to 0 for no limit. In production, set a limit.
	MaxReserveCoinAmount cosmossdk_io_math.Int `` /* 179-byte string literal not displayed */
	// Fee paid to create a Liquidity Pool. Set a fee to prevent spamming.
	PoolCreationFee github_com_cosmos_cosmos_sdk_types.Coins `` /* 177-byte string literal not displayed */
	// Swap fee rate for every executed swap.
	SwapFeeRate cosmossdk_io_math.LegacyDec `` /* 146-byte string literal not displayed */
	// Reserve coin withdrawal with less proportion by withdrawFeeRate.
	WithdrawFeeRate cosmossdk_io_math.LegacyDec `` /* 162-byte string literal not displayed */
	// Maximum ratio of reserve coins that can be ordered at a swap order.
	MaxOrderAmountRatio cosmossdk_io_math.LegacyDec `` /* 181-byte string literal not displayed */
	// The smallest unit batch height for every liquidity pool.
	UnitBatchHeight uint32 `` /* 134-byte string literal not displayed */
	// Circuit breaker enables or disables transaction messages in liquidity
	// module.
	CircuitBreakerEnabled bool                        `` /* 159-byte string literal not displayed */
	BuildersAddresses     []WeightedAddress           `` /* 129-byte string literal not displayed */
	BuildersCommission    cosmossdk_io_math.LegacyDec `` /* 172-byte string literal not displayed */
}

Params defines the parameters for the liquidity module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns the default liquidity module parameters.

func (*Params) Descriptor

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

func (*Params) Equal

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

ParamSetPairs implements paramstypes.ParamSet.

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 (p Params) String() string

String returns a human readable string representation of the parameters.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates parameters.

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 of the pool
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// id of the pool_type
	TypeId uint32 `protobuf:"varint,2,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty" yaml:"type_id"`
	// denoms of reserve coin pair of the pool
	ReserveCoinDenoms []string `` /* 141-byte string literal not displayed */
	// reserve account address of the pool
	ReserveAccountAddress string `` /* 157-byte string literal not displayed */
	// denom of pool coin of the pool
	PoolCoinDenom string `protobuf:"bytes,5,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty" yaml:"pool_coin_denom"`
}

Pool defines the liquidity pool that contains pool information.

func MustUnmarshalPool

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

MustUnmarshalPool returns the Pool from bytes. Panics if fails.

func UnmarshalPool

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

UnmarshalPool returns the Pool from bytes.

func (*Pool) Descriptor

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

func (*Pool) Equal

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

func (Pool) GetId

func (pool Pool) GetId() uint64

GetId returns id of the pool.

func (Pool) GetPoolCoinDenom

func (pool Pool) GetPoolCoinDenom() string

GetPoolCoinDenom returns the pool coin's denom.

func (Pool) GetReserveAccount

func (pool Pool) GetReserveAccount() sdk.AccAddress

GetReserveAccount returns sdk.AccAddress of the pool's reserve account.

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

func (pool Pool) Name() string

Name returns the pool's name.

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

func (pool Pool) Validate() error

Validate validates Pool.

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 PoolBatch

type PoolBatch struct {
	// id of the pool
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	// index of this batch
	Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty" yaml:"index"`
	// height where this batch is started
	BeginHeight int64 `protobuf:"varint,3,opt,name=begin_height,json=beginHeight,proto3" json:"begin_height,omitempty" yaml:"begin_height"`
	// last index of DepositMsgStates
	DepositMsgIndex uint64 `` /* 134-byte string literal not displayed */
	// last index of WithdrawMsgStates
	WithdrawMsgIndex uint64 `` /* 138-byte string literal not displayed */
	// last index of SwapMsgStates
	SwapMsgIndex uint64 `protobuf:"varint,6,opt,name=swap_msg_index,json=swapMsgIndex,proto3" json:"swap_msg_index,omitempty" yaml:"swap_msg_index"`
	// true if executed, false if not executed
	Executed bool `protobuf:"varint,7,opt,name=executed,proto3" json:"executed,omitempty" yaml:"executed"`
}

PoolBatch defines the batch or batches of a given liquidity pool that contains indexes of deposit, withdraw, and swap messages. Index param increments by 1 if the pool id is same.

func MustUnmarshalPoolBatch

func MustUnmarshalPoolBatch(cdc codec.BinaryCodec, value []byte) PoolBatch

MustUnmarshalPoolBatch returns the PoolBatch from bytes. Panics if fails.

func NewPoolBatch

func NewPoolBatch(poolID, batchIndex uint64) PoolBatch

NewPoolBatch creates a new PoolBatch object.

func UnmarshalPoolBatch

func UnmarshalPoolBatch(cdc codec.BinaryCodec, value []byte) (poolBatch PoolBatch, err error)

UnmarshalPoolBatch returns the PoolBatch from bytes.

func (*PoolBatch) Descriptor

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

func (*PoolBatch) Equal

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

func (*PoolBatch) Marshal

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

func (*PoolBatch) MarshalTo

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

func (*PoolBatch) MarshalToSizedBuffer

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

func (*PoolBatch) ProtoMessage

func (*PoolBatch) ProtoMessage()

func (*PoolBatch) Reset

func (m *PoolBatch) Reset()

func (*PoolBatch) Size

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

func (*PoolBatch) String

func (m *PoolBatch) String() string

func (*PoolBatch) Unmarshal

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

func (*PoolBatch) XXX_DiscardUnknown

func (m *PoolBatch) XXX_DiscardUnknown()

func (*PoolBatch) XXX_Marshal

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

func (*PoolBatch) XXX_Merge

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

func (*PoolBatch) XXX_Size

func (m *PoolBatch) XXX_Size() int

func (*PoolBatch) XXX_Unmarshal

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

type PoolMetadata

type PoolMetadata struct {
	// id of the pool
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"`
	// pool coin issued at the pool
	PoolCoinTotalSupply types.Coin `` /* 142-byte string literal not displayed */
	// reserve coins deposited in the pool
	ReserveCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 162-byte string literal not displayed */
}

Metadata for the state of each pool for invariant checking after genesis export or import.

func (*PoolMetadata) Descriptor

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

func (*PoolMetadata) Equal

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

func (*PoolMetadata) Marshal

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

func (*PoolMetadata) MarshalTo

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

func (*PoolMetadata) MarshalToSizedBuffer

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

func (*PoolMetadata) ProtoMessage

func (*PoolMetadata) ProtoMessage()

func (*PoolMetadata) Reset

func (m *PoolMetadata) Reset()

func (*PoolMetadata) Size

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

func (*PoolMetadata) String

func (m *PoolMetadata) String() string

func (*PoolMetadata) Unmarshal

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

func (*PoolMetadata) XXX_DiscardUnknown

func (m *PoolMetadata) XXX_DiscardUnknown()

func (*PoolMetadata) XXX_Marshal

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

func (*PoolMetadata) XXX_Merge

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

func (*PoolMetadata) XXX_Size

func (m *PoolMetadata) XXX_Size() int

func (*PoolMetadata) XXX_Unmarshal

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

type PoolRecord

type PoolRecord struct {
	Pool              Pool               `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool" yaml:"pool"`
	PoolMetadata      PoolMetadata       `protobuf:"bytes,2,opt,name=pool_metadata,json=poolMetadata,proto3" json:"pool_metadata" yaml:"pool_metadata"`
	PoolBatch         PoolBatch          `protobuf:"bytes,3,opt,name=pool_batch,json=poolBatch,proto3" json:"pool_batch" yaml:"pool_batch"`
	DepositMsgStates  []DepositMsgState  `` /* 127-byte string literal not displayed */
	WithdrawMsgStates []WithdrawMsgState `` /* 131-byte string literal not displayed */
	SwapMsgStates     []SwapMsgState     `protobuf:"bytes,6,rep,name=swap_msg_states,json=swapMsgStates,proto3" json:"swap_msg_states" yaml:"swap_msg_states"`
}

records the state of each pool after genesis export or import, used to check variables

func (*PoolRecord) Descriptor

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

func (*PoolRecord) GetDepositMsgStates

func (m *PoolRecord) GetDepositMsgStates() []DepositMsgState

func (*PoolRecord) GetPool

func (m *PoolRecord) GetPool() Pool

func (*PoolRecord) GetPoolBatch

func (m *PoolRecord) GetPoolBatch() PoolBatch

func (*PoolRecord) GetPoolMetadata

func (m *PoolRecord) GetPoolMetadata() PoolMetadata

func (*PoolRecord) GetSwapMsgStates

func (m *PoolRecord) GetSwapMsgStates() []SwapMsgState

func (*PoolRecord) GetWithdrawMsgStates

func (m *PoolRecord) GetWithdrawMsgStates() []WithdrawMsgState

func (*PoolRecord) Marshal

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

func (*PoolRecord) MarshalTo

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

func (*PoolRecord) MarshalToSizedBuffer

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

func (*PoolRecord) ProtoMessage

func (*PoolRecord) ProtoMessage()

func (*PoolRecord) Reset

func (m *PoolRecord) Reset()

func (*PoolRecord) Size

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

func (*PoolRecord) String

func (m *PoolRecord) String() string

func (*PoolRecord) Unmarshal

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

func (PoolRecord) Validate

func (record PoolRecord) Validate() error

Validate validates PoolRecord.

func (*PoolRecord) XXX_DiscardUnknown

func (m *PoolRecord) XXX_DiscardUnknown()

func (*PoolRecord) XXX_Marshal

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

func (*PoolRecord) XXX_Merge

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

func (*PoolRecord) XXX_Size

func (m *PoolRecord) XXX_Size() int

func (*PoolRecord) XXX_Unmarshal

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

type PoolType

type PoolType struct {
	// This is the id of the pool_type that is used as pool_type_id for pool
	// creation. In this version, only pool-type-id 1 is supported.
	// {"id":1,"name":"ConstantProductLiquidityPool","min_reserve_coin_num":2,"max_reserve_coin_num":2,"description":""}
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"`
	// name of the pool type.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" yaml:"name"`
	// minimum number of reserveCoins for LiquidityPoolType, only 2 reserve coins
	// are supported.
	MinReserveCoinNum uint32 `` /* 145-byte string literal not displayed */
	// maximum number of reserveCoins for LiquidityPoolType, only 2 reserve coins
	// are supported.
	MaxReserveCoinNum uint32 `` /* 145-byte string literal not displayed */
	// description of the pool type.
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty" yaml:"description"`
}

Structure for the pool type to distinguish the characteristics of the reserve pools.

func (*PoolType) Descriptor

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

func (*PoolType) Equal

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

func (*PoolType) Marshal

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

func (*PoolType) MarshalTo

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

func (*PoolType) MarshalToSizedBuffer

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

func (*PoolType) ProtoMessage

func (*PoolType) ProtoMessage()

func (*PoolType) Reset

func (m *PoolType) Reset()

func (*PoolType) Size

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

func (*PoolType) String

func (m *PoolType) String() string

func (*PoolType) Unmarshal

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

func (*PoolType) XXX_DiscardUnknown

func (m *PoolType) XXX_DiscardUnknown()

func (*PoolType) XXX_Marshal

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

func (*PoolType) XXX_Merge

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

func (*PoolType) XXX_Size

func (m *PoolType) XXX_Size() int

func (*PoolType) XXX_Unmarshal

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

type Pools

type Pools []Pool

Pools is a collection of pools.

func (Pools) String

func (pools Pools) String() (out string)

type PriceDirection

type PriceDirection int

Direction of price

const (
	Increasing PriceDirection = iota + 1
	Decreasing
	Staying
)

type QueryClient

type QueryClient interface {
	// Get existing liquidity pools.
	LiquidityPools(ctx context.Context, in *QueryLiquidityPoolsRequest, opts ...grpc.CallOption) (*QueryLiquidityPoolsResponse, error)
	// Get specific liquidity pool.
	LiquidityPool(ctx context.Context, in *QueryLiquidityPoolRequest, opts ...grpc.CallOption) (*QueryLiquidityPoolResponse, error)
	// Get specific liquidity pool corresponding to the pool_coin_denom.
	LiquidityPoolByPoolCoinDenom(ctx context.Context, in *QueryLiquidityPoolByPoolCoinDenomRequest, opts ...grpc.CallOption) (*QueryLiquidityPoolResponse, error)
	// Get specific liquidity pool corresponding to the reserve account.
	LiquidityPoolByReserveAcc(ctx context.Context, in *QueryLiquidityPoolByReserveAccRequest, opts ...grpc.CallOption) (*QueryLiquidityPoolResponse, error)
	// Get the pool's current batch.
	LiquidityPoolBatch(ctx context.Context, in *QueryLiquidityPoolBatchRequest, opts ...grpc.CallOption) (*QueryLiquidityPoolBatchResponse, error)
	// Get all swap messages in the pool's current batch.
	PoolBatchSwapMsgs(ctx context.Context, in *QueryPoolBatchSwapMsgsRequest, opts ...grpc.CallOption) (*QueryPoolBatchSwapMsgsResponse, error)
	// Get a specific swap message in the pool's current batch.
	PoolBatchSwapMsg(ctx context.Context, in *QueryPoolBatchSwapMsgRequest, opts ...grpc.CallOption) (*QueryPoolBatchSwapMsgResponse, error)
	// Get all deposit messages in the pool's current batch.
	PoolBatchDepositMsgs(ctx context.Context, in *QueryPoolBatchDepositMsgsRequest, opts ...grpc.CallOption) (*QueryPoolBatchDepositMsgsResponse, error)
	// Get a specific deposit message in the pool's current batch.
	PoolBatchDepositMsg(ctx context.Context, in *QueryPoolBatchDepositMsgRequest, opts ...grpc.CallOption) (*QueryPoolBatchDepositMsgResponse, error)
	// Get all withdraw messages in the pool's current batch.
	PoolBatchWithdrawMsgs(ctx context.Context, in *QueryPoolBatchWithdrawMsgsRequest, opts ...grpc.CallOption) (*QueryPoolBatchWithdrawMsgsResponse, error)
	// Get a specific withdraw message in the pool's current batch.
	PoolBatchWithdrawMsg(ctx context.Context, in *QueryPoolBatchWithdrawMsgRequest, opts ...grpc.CallOption) (*QueryPoolBatchWithdrawMsgResponse, error)
	// Get all parameters of the liquidity module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryLiquidityPoolBatchRequest

type QueryLiquidityPoolBatchRequest struct {
	// id of the target pool for query
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
}

the request type for the QueryLiquidityPoolBatch RPC method. requestable including specified pool_id.

func (*QueryLiquidityPoolBatchRequest) Descriptor

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

func (*QueryLiquidityPoolBatchRequest) GetPoolId

func (m *QueryLiquidityPoolBatchRequest) GetPoolId() uint64

func (*QueryLiquidityPoolBatchRequest) Marshal

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

func (*QueryLiquidityPoolBatchRequest) MarshalTo

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

func (*QueryLiquidityPoolBatchRequest) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolBatchRequest) ProtoMessage

func (*QueryLiquidityPoolBatchRequest) ProtoMessage()

func (*QueryLiquidityPoolBatchRequest) Reset

func (m *QueryLiquidityPoolBatchRequest) Reset()

func (*QueryLiquidityPoolBatchRequest) Size

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

func (*QueryLiquidityPoolBatchRequest) String

func (*QueryLiquidityPoolBatchRequest) Unmarshal

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

func (*QueryLiquidityPoolBatchRequest) XXX_DiscardUnknown

func (m *QueryLiquidityPoolBatchRequest) XXX_DiscardUnknown()

func (*QueryLiquidityPoolBatchRequest) XXX_Marshal

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

func (*QueryLiquidityPoolBatchRequest) XXX_Merge

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

func (*QueryLiquidityPoolBatchRequest) XXX_Size

func (m *QueryLiquidityPoolBatchRequest) XXX_Size() int

func (*QueryLiquidityPoolBatchRequest) XXX_Unmarshal

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

type QueryLiquidityPoolBatchResponse

type QueryLiquidityPoolBatchResponse struct {
	Batch PoolBatch `protobuf:"bytes,1,opt,name=batch,proto3" json:"batch"`
}

the response type for the QueryLiquidityPoolBatchResponse RPC method. Returns the liquidity pool batch that corresponds to the requested pool_id.

func (*QueryLiquidityPoolBatchResponse) Descriptor

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

func (*QueryLiquidityPoolBatchResponse) GetBatch

func (*QueryLiquidityPoolBatchResponse) Marshal

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

func (*QueryLiquidityPoolBatchResponse) MarshalTo

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

func (*QueryLiquidityPoolBatchResponse) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolBatchResponse) ProtoMessage

func (*QueryLiquidityPoolBatchResponse) ProtoMessage()

func (*QueryLiquidityPoolBatchResponse) Reset

func (*QueryLiquidityPoolBatchResponse) Size

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

func (*QueryLiquidityPoolBatchResponse) String

func (*QueryLiquidityPoolBatchResponse) Unmarshal

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

func (*QueryLiquidityPoolBatchResponse) XXX_DiscardUnknown

func (m *QueryLiquidityPoolBatchResponse) XXX_DiscardUnknown()

func (*QueryLiquidityPoolBatchResponse) XXX_Marshal

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

func (*QueryLiquidityPoolBatchResponse) XXX_Merge

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

func (*QueryLiquidityPoolBatchResponse) XXX_Size

func (m *QueryLiquidityPoolBatchResponse) XXX_Size() int

func (*QueryLiquidityPoolBatchResponse) XXX_Unmarshal

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

type QueryLiquidityPoolByPoolCoinDenomRequest

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

the request type for the QueryLiquidityByPoolCoinDenomPool RPC method. Requestable specified pool_coin_denom.

func (*QueryLiquidityPoolByPoolCoinDenomRequest) Descriptor

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

func (*QueryLiquidityPoolByPoolCoinDenomRequest) GetPoolCoinDenom

func (m *QueryLiquidityPoolByPoolCoinDenomRequest) GetPoolCoinDenom() string

func (*QueryLiquidityPoolByPoolCoinDenomRequest) Marshal

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

func (*QueryLiquidityPoolByPoolCoinDenomRequest) MarshalTo

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

func (*QueryLiquidityPoolByPoolCoinDenomRequest) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolByPoolCoinDenomRequest) ProtoMessage

func (*QueryLiquidityPoolByPoolCoinDenomRequest) Reset

func (*QueryLiquidityPoolByPoolCoinDenomRequest) Size

func (*QueryLiquidityPoolByPoolCoinDenomRequest) String

func (*QueryLiquidityPoolByPoolCoinDenomRequest) Unmarshal

func (*QueryLiquidityPoolByPoolCoinDenomRequest) XXX_DiscardUnknown

func (m *QueryLiquidityPoolByPoolCoinDenomRequest) XXX_DiscardUnknown()

func (*QueryLiquidityPoolByPoolCoinDenomRequest) XXX_Marshal

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

func (*QueryLiquidityPoolByPoolCoinDenomRequest) XXX_Merge

func (*QueryLiquidityPoolByPoolCoinDenomRequest) XXX_Size

func (*QueryLiquidityPoolByPoolCoinDenomRequest) XXX_Unmarshal

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

type QueryLiquidityPoolByReserveAccRequest

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

the request type for the QueryLiquidityByReserveAcc RPC method. Requestable specified reserve_acc.

func (*QueryLiquidityPoolByReserveAccRequest) Descriptor

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

func (*QueryLiquidityPoolByReserveAccRequest) GetReserveAcc

func (m *QueryLiquidityPoolByReserveAccRequest) GetReserveAcc() string

func (*QueryLiquidityPoolByReserveAccRequest) Marshal

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

func (*QueryLiquidityPoolByReserveAccRequest) MarshalTo

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

func (*QueryLiquidityPoolByReserveAccRequest) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolByReserveAccRequest) ProtoMessage

func (*QueryLiquidityPoolByReserveAccRequest) ProtoMessage()

func (*QueryLiquidityPoolByReserveAccRequest) Reset

func (*QueryLiquidityPoolByReserveAccRequest) Size

func (*QueryLiquidityPoolByReserveAccRequest) String

func (*QueryLiquidityPoolByReserveAccRequest) Unmarshal

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

func (*QueryLiquidityPoolByReserveAccRequest) XXX_DiscardUnknown

func (m *QueryLiquidityPoolByReserveAccRequest) XXX_DiscardUnknown()

func (*QueryLiquidityPoolByReserveAccRequest) XXX_Marshal

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

func (*QueryLiquidityPoolByReserveAccRequest) XXX_Merge

func (*QueryLiquidityPoolByReserveAccRequest) XXX_Size

func (*QueryLiquidityPoolByReserveAccRequest) XXX_Unmarshal

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

type QueryLiquidityPoolParams

type QueryLiquidityPoolParams struct {
	PoolId uint64 `json:"pool_id" yaml:"pool_id"` // nolint:golint
}

QueryLiquidityPoolParams is the query parameters for 'custom/liquidity'

func NewQueryLiquidityPoolParams

func NewQueryLiquidityPoolParams(poolID uint64) QueryLiquidityPoolParams

return params of Liquidity Pool Query

type QueryLiquidityPoolRequest

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

the request type for the QueryLiquidityPool RPC method. requestable specified pool_id.

func (*QueryLiquidityPoolRequest) Descriptor

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

func (*QueryLiquidityPoolRequest) GetPoolId

func (m *QueryLiquidityPoolRequest) GetPoolId() uint64

func (*QueryLiquidityPoolRequest) Marshal

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

func (*QueryLiquidityPoolRequest) MarshalTo

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

func (*QueryLiquidityPoolRequest) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolRequest) ProtoMessage

func (*QueryLiquidityPoolRequest) ProtoMessage()

func (*QueryLiquidityPoolRequest) Reset

func (m *QueryLiquidityPoolRequest) Reset()

func (*QueryLiquidityPoolRequest) Size

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

func (*QueryLiquidityPoolRequest) String

func (m *QueryLiquidityPoolRequest) String() string

func (*QueryLiquidityPoolRequest) Unmarshal

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

func (*QueryLiquidityPoolRequest) XXX_DiscardUnknown

func (m *QueryLiquidityPoolRequest) XXX_DiscardUnknown()

func (*QueryLiquidityPoolRequest) XXX_Marshal

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

func (*QueryLiquidityPoolRequest) XXX_Merge

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

func (*QueryLiquidityPoolRequest) XXX_Size

func (m *QueryLiquidityPoolRequest) XXX_Size() int

func (*QueryLiquidityPoolRequest) XXX_Unmarshal

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

type QueryLiquidityPoolResponse

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

the response type for the QueryLiquidityPoolResponse RPC method. Returns the liquidity pool that corresponds to the requested pool_id.

func (*QueryLiquidityPoolResponse) Descriptor

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

func (*QueryLiquidityPoolResponse) GetPool

func (m *QueryLiquidityPoolResponse) GetPool() Pool

func (*QueryLiquidityPoolResponse) Marshal

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

func (*QueryLiquidityPoolResponse) MarshalTo

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

func (*QueryLiquidityPoolResponse) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolResponse) ProtoMessage

func (*QueryLiquidityPoolResponse) ProtoMessage()

func (*QueryLiquidityPoolResponse) Reset

func (m *QueryLiquidityPoolResponse) Reset()

func (*QueryLiquidityPoolResponse) Size

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

func (*QueryLiquidityPoolResponse) String

func (m *QueryLiquidityPoolResponse) String() string

func (*QueryLiquidityPoolResponse) Unmarshal

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

func (*QueryLiquidityPoolResponse) XXX_DiscardUnknown

func (m *QueryLiquidityPoolResponse) XXX_DiscardUnknown()

func (*QueryLiquidityPoolResponse) XXX_Marshal

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

func (*QueryLiquidityPoolResponse) XXX_Merge

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

func (*QueryLiquidityPoolResponse) XXX_Size

func (m *QueryLiquidityPoolResponse) XXX_Size() int

func (*QueryLiquidityPoolResponse) XXX_Unmarshal

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

type QueryLiquidityPoolsParams

type QueryLiquidityPoolsParams struct {
	Page, Limit int
}

QueryValidatorsParams defines the params for the following queries: - 'custom/liquidity/liquidityPools'

func NewQueryLiquidityPoolsParams

func NewQueryLiquidityPoolsParams(page, limit int) QueryLiquidityPoolsParams

return params of Liquidity Pools Query

type QueryLiquidityPoolsRequest

type QueryLiquidityPoolsRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

the request type for the QueryLiquidityPools RPC method. Requestable including pagination offset, limit, key.

func (*QueryLiquidityPoolsRequest) Descriptor

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

func (*QueryLiquidityPoolsRequest) GetPagination

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

func (*QueryLiquidityPoolsRequest) Marshal

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

func (*QueryLiquidityPoolsRequest) MarshalTo

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

func (*QueryLiquidityPoolsRequest) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolsRequest) ProtoMessage

func (*QueryLiquidityPoolsRequest) ProtoMessage()

func (*QueryLiquidityPoolsRequest) Reset

func (m *QueryLiquidityPoolsRequest) Reset()

func (*QueryLiquidityPoolsRequest) Size

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

func (*QueryLiquidityPoolsRequest) String

func (m *QueryLiquidityPoolsRequest) String() string

func (*QueryLiquidityPoolsRequest) Unmarshal

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

func (*QueryLiquidityPoolsRequest) XXX_DiscardUnknown

func (m *QueryLiquidityPoolsRequest) XXX_DiscardUnknown()

func (*QueryLiquidityPoolsRequest) XXX_Marshal

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

func (*QueryLiquidityPoolsRequest) XXX_Merge

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

func (*QueryLiquidityPoolsRequest) XXX_Size

func (m *QueryLiquidityPoolsRequest) XXX_Size() int

func (*QueryLiquidityPoolsRequest) XXX_Unmarshal

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

type QueryLiquidityPoolsResponse

type QueryLiquidityPoolsResponse struct {
	Pools []Pool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools"`
	// pagination defines the pagination in the response. not working on this
	// version.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

the response type for the QueryLiquidityPoolsResponse RPC method. This includes a list of all existing liquidity pools and paging results that contain next_key and total count.

func (*QueryLiquidityPoolsResponse) Descriptor

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

func (*QueryLiquidityPoolsResponse) GetPagination

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

func (*QueryLiquidityPoolsResponse) GetPools

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

func (*QueryLiquidityPoolsResponse) Marshal

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

func (*QueryLiquidityPoolsResponse) MarshalTo

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

func (*QueryLiquidityPoolsResponse) MarshalToSizedBuffer

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

func (*QueryLiquidityPoolsResponse) ProtoMessage

func (*QueryLiquidityPoolsResponse) ProtoMessage()

func (*QueryLiquidityPoolsResponse) Reset

func (m *QueryLiquidityPoolsResponse) Reset()

func (*QueryLiquidityPoolsResponse) Size

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

func (*QueryLiquidityPoolsResponse) String

func (m *QueryLiquidityPoolsResponse) String() string

func (*QueryLiquidityPoolsResponse) Unmarshal

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

func (*QueryLiquidityPoolsResponse) XXX_DiscardUnknown

func (m *QueryLiquidityPoolsResponse) XXX_DiscardUnknown()

func (*QueryLiquidityPoolsResponse) XXX_Marshal

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

func (*QueryLiquidityPoolsResponse) XXX_Merge

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

func (*QueryLiquidityPoolsResponse) XXX_Size

func (m *QueryLiquidityPoolsResponse) XXX_Size() int

func (*QueryLiquidityPoolsResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the QueryParams 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 holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

the response type for the QueryParamsResponse RPC method. This includes current parameter of the liquidity module.

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 QueryPoolBatchDepositMsgRequest

type QueryPoolBatchDepositMsgRequest struct {
	// id of the target pool for query
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// target msg_index of the pool
	MsgIndex uint64 `protobuf:"varint,2,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"`
}

the request type for the QueryPoolBatchDeposit RPC method. requestable including specified pool_id and msg_index.

func (*QueryPoolBatchDepositMsgRequest) Descriptor

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

func (*QueryPoolBatchDepositMsgRequest) GetMsgIndex

func (m *QueryPoolBatchDepositMsgRequest) GetMsgIndex() uint64

func (*QueryPoolBatchDepositMsgRequest) GetPoolId

func (m *QueryPoolBatchDepositMsgRequest) GetPoolId() uint64

func (*QueryPoolBatchDepositMsgRequest) Marshal

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

func (*QueryPoolBatchDepositMsgRequest) MarshalTo

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

func (*QueryPoolBatchDepositMsgRequest) MarshalToSizedBuffer

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

func (*QueryPoolBatchDepositMsgRequest) ProtoMessage

func (*QueryPoolBatchDepositMsgRequest) ProtoMessage()

func (*QueryPoolBatchDepositMsgRequest) Reset

func (*QueryPoolBatchDepositMsgRequest) Size

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

func (*QueryPoolBatchDepositMsgRequest) String

func (*QueryPoolBatchDepositMsgRequest) Unmarshal

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

func (*QueryPoolBatchDepositMsgRequest) XXX_DiscardUnknown

func (m *QueryPoolBatchDepositMsgRequest) XXX_DiscardUnknown()

func (*QueryPoolBatchDepositMsgRequest) XXX_Marshal

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

func (*QueryPoolBatchDepositMsgRequest) XXX_Merge

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

func (*QueryPoolBatchDepositMsgRequest) XXX_Size

func (m *QueryPoolBatchDepositMsgRequest) XXX_Size() int

func (*QueryPoolBatchDepositMsgRequest) XXX_Unmarshal

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

type QueryPoolBatchDepositMsgResponse

type QueryPoolBatchDepositMsgResponse struct {
	Deposit DepositMsgState `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"`
}

the response type for the QueryPoolBatchDepositMsg RPC method. This includes a batch swap message of the batch.

func (*QueryPoolBatchDepositMsgResponse) Descriptor

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

func (*QueryPoolBatchDepositMsgResponse) GetDeposit

func (*QueryPoolBatchDepositMsgResponse) Marshal

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

func (*QueryPoolBatchDepositMsgResponse) MarshalTo

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

func (*QueryPoolBatchDepositMsgResponse) MarshalToSizedBuffer

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

func (*QueryPoolBatchDepositMsgResponse) ProtoMessage

func (*QueryPoolBatchDepositMsgResponse) ProtoMessage()

func (*QueryPoolBatchDepositMsgResponse) Reset

func (*QueryPoolBatchDepositMsgResponse) Size

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

func (*QueryPoolBatchDepositMsgResponse) String

func (*QueryPoolBatchDepositMsgResponse) Unmarshal

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

func (*QueryPoolBatchDepositMsgResponse) XXX_DiscardUnknown

func (m *QueryPoolBatchDepositMsgResponse) XXX_DiscardUnknown()

func (*QueryPoolBatchDepositMsgResponse) XXX_Marshal

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

func (*QueryPoolBatchDepositMsgResponse) XXX_Merge

func (*QueryPoolBatchDepositMsgResponse) XXX_Size

func (m *QueryPoolBatchDepositMsgResponse) XXX_Size() int

func (*QueryPoolBatchDepositMsgResponse) XXX_Unmarshal

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

type QueryPoolBatchDepositMsgsRequest

type QueryPoolBatchDepositMsgsRequest struct {
	// id of the target pool for query
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

the request type for the QueryPoolBatchDeposit RPC method. Requestable including specified pool_id and pagination offset, limit, key.

func (*QueryPoolBatchDepositMsgsRequest) Descriptor

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

func (*QueryPoolBatchDepositMsgsRequest) GetPagination

func (*QueryPoolBatchDepositMsgsRequest) GetPoolId

func (*QueryPoolBatchDepositMsgsRequest) Marshal

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

func (*QueryPoolBatchDepositMsgsRequest) MarshalTo

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

func (*QueryPoolBatchDepositMsgsRequest) MarshalToSizedBuffer

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

func (*QueryPoolBatchDepositMsgsRequest) ProtoMessage

func (*QueryPoolBatchDepositMsgsRequest) ProtoMessage()

func (*QueryPoolBatchDepositMsgsRequest) Reset

func (*QueryPoolBatchDepositMsgsRequest) Size

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

func (*QueryPoolBatchDepositMsgsRequest) String

func (*QueryPoolBatchDepositMsgsRequest) Unmarshal

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

func (*QueryPoolBatchDepositMsgsRequest) XXX_DiscardUnknown

func (m *QueryPoolBatchDepositMsgsRequest) XXX_DiscardUnknown()

func (*QueryPoolBatchDepositMsgsRequest) XXX_Marshal

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

func (*QueryPoolBatchDepositMsgsRequest) XXX_Merge

func (*QueryPoolBatchDepositMsgsRequest) XXX_Size

func (m *QueryPoolBatchDepositMsgsRequest) XXX_Size() int

func (*QueryPoolBatchDepositMsgsRequest) XXX_Unmarshal

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

type QueryPoolBatchDepositMsgsResponse

type QueryPoolBatchDepositMsgsResponse struct {
	Deposits []DepositMsgState `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
	// pagination defines the pagination in the response. not working on this
	// version.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

the response type for the QueryPoolBatchDeposit RPC method. This includes a list of all currently existing deposit messages of the batch and paging results that contain next_key and total count.

func (*QueryPoolBatchDepositMsgsResponse) Descriptor

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

func (*QueryPoolBatchDepositMsgsResponse) GetDeposits

func (*QueryPoolBatchDepositMsgsResponse) GetPagination

func (*QueryPoolBatchDepositMsgsResponse) Marshal

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

func (*QueryPoolBatchDepositMsgsResponse) MarshalTo

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

func (*QueryPoolBatchDepositMsgsResponse) MarshalToSizedBuffer

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

func (*QueryPoolBatchDepositMsgsResponse) ProtoMessage

func (*QueryPoolBatchDepositMsgsResponse) ProtoMessage()

func (*QueryPoolBatchDepositMsgsResponse) Reset

func (*QueryPoolBatchDepositMsgsResponse) Size

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

func (*QueryPoolBatchDepositMsgsResponse) String

func (*QueryPoolBatchDepositMsgsResponse) Unmarshal

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

func (*QueryPoolBatchDepositMsgsResponse) XXX_DiscardUnknown

func (m *QueryPoolBatchDepositMsgsResponse) XXX_DiscardUnknown()

func (*QueryPoolBatchDepositMsgsResponse) XXX_Marshal

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

func (*QueryPoolBatchDepositMsgsResponse) XXX_Merge

func (*QueryPoolBatchDepositMsgsResponse) XXX_Size

func (m *QueryPoolBatchDepositMsgsResponse) XXX_Size() int

func (*QueryPoolBatchDepositMsgsResponse) XXX_Unmarshal

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

type QueryPoolBatchSwapMsgRequest

type QueryPoolBatchSwapMsgRequest struct {
	// id of the target pool for query
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// target msg_index of the pool
	MsgIndex uint64 `protobuf:"varint,2,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"`
}

the request type for the QueryPoolBatchSwap RPC method. Requestable including specified pool_id and msg_index.

func (*QueryPoolBatchSwapMsgRequest) Descriptor

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

func (*QueryPoolBatchSwapMsgRequest) GetMsgIndex

func (m *QueryPoolBatchSwapMsgRequest) GetMsgIndex() uint64

func (*QueryPoolBatchSwapMsgRequest) GetPoolId

func (m *QueryPoolBatchSwapMsgRequest) GetPoolId() uint64

func (*QueryPoolBatchSwapMsgRequest) Marshal

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

func (*QueryPoolBatchSwapMsgRequest) MarshalTo

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

func (*QueryPoolBatchSwapMsgRequest) MarshalToSizedBuffer

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

func (*QueryPoolBatchSwapMsgRequest) ProtoMessage

func (*QueryPoolBatchSwapMsgRequest) ProtoMessage()

func (*QueryPoolBatchSwapMsgRequest) Reset

func (m *QueryPoolBatchSwapMsgRequest) Reset()

func (*QueryPoolBatchSwapMsgRequest) Size

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

func (*QueryPoolBatchSwapMsgRequest) String

func (*QueryPoolBatchSwapMsgRequest) Unmarshal

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

func (*QueryPoolBatchSwapMsgRequest) XXX_DiscardUnknown

func (m *QueryPoolBatchSwapMsgRequest) XXX_DiscardUnknown()

func (*QueryPoolBatchSwapMsgRequest) XXX_Marshal

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

func (*QueryPoolBatchSwapMsgRequest) XXX_Merge

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

func (*QueryPoolBatchSwapMsgRequest) XXX_Size

func (m *QueryPoolBatchSwapMsgRequest) XXX_Size() int

func (*QueryPoolBatchSwapMsgRequest) XXX_Unmarshal

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

type QueryPoolBatchSwapMsgResponse

type QueryPoolBatchSwapMsgResponse struct {
	Swap SwapMsgState `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap"`
}

the response type for the QueryPoolBatchSwapMsg RPC method. This includes a batch swap message of the batch.

func (*QueryPoolBatchSwapMsgResponse) Descriptor

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

func (*QueryPoolBatchSwapMsgResponse) GetSwap

func (*QueryPoolBatchSwapMsgResponse) Marshal

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

func (*QueryPoolBatchSwapMsgResponse) MarshalTo

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

func (*QueryPoolBatchSwapMsgResponse) MarshalToSizedBuffer

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

func (*QueryPoolBatchSwapMsgResponse) ProtoMessage

func (*QueryPoolBatchSwapMsgResponse) ProtoMessage()

func (*QueryPoolBatchSwapMsgResponse) Reset

func (m *QueryPoolBatchSwapMsgResponse) Reset()

func (*QueryPoolBatchSwapMsgResponse) Size

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

func (*QueryPoolBatchSwapMsgResponse) String

func (*QueryPoolBatchSwapMsgResponse) Unmarshal

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

func (*QueryPoolBatchSwapMsgResponse) XXX_DiscardUnknown

func (m *QueryPoolBatchSwapMsgResponse) XXX_DiscardUnknown()

func (*QueryPoolBatchSwapMsgResponse) XXX_Marshal

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

func (*QueryPoolBatchSwapMsgResponse) XXX_Merge

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

func (*QueryPoolBatchSwapMsgResponse) XXX_Size

func (m *QueryPoolBatchSwapMsgResponse) XXX_Size() int

func (*QueryPoolBatchSwapMsgResponse) XXX_Unmarshal

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

type QueryPoolBatchSwapMsgsRequest

type QueryPoolBatchSwapMsgsRequest struct {
	// id of the target pool for query
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

the request type for the QueryPoolBatchSwapMsgs RPC method. Requestable including specified pool_id and pagination offset, limit, key.

func (*QueryPoolBatchSwapMsgsRequest) Descriptor

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

func (*QueryPoolBatchSwapMsgsRequest) GetPagination

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

func (*QueryPoolBatchSwapMsgsRequest) GetPoolId

func (m *QueryPoolBatchSwapMsgsRequest) GetPoolId() uint64

func (*QueryPoolBatchSwapMsgsRequest) Marshal

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

func (*QueryPoolBatchSwapMsgsRequest) MarshalTo

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

func (*QueryPoolBatchSwapMsgsRequest) MarshalToSizedBuffer

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

func (*QueryPoolBatchSwapMsgsRequest) ProtoMessage

func (*QueryPoolBatchSwapMsgsRequest) ProtoMessage()

func (*QueryPoolBatchSwapMsgsRequest) Reset

func (m *QueryPoolBatchSwapMsgsRequest) Reset()

func (*QueryPoolBatchSwapMsgsRequest) Size

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

func (*QueryPoolBatchSwapMsgsRequest) String

func (*QueryPoolBatchSwapMsgsRequest) Unmarshal

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

func (*QueryPoolBatchSwapMsgsRequest) XXX_DiscardUnknown

func (m *QueryPoolBatchSwapMsgsRequest) XXX_DiscardUnknown()

func (*QueryPoolBatchSwapMsgsRequest) XXX_Marshal

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

func (*QueryPoolBatchSwapMsgsRequest) XXX_Merge

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

func (*QueryPoolBatchSwapMsgsRequest) XXX_Size

func (m *QueryPoolBatchSwapMsgsRequest) XXX_Size() int

func (*QueryPoolBatchSwapMsgsRequest) XXX_Unmarshal

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

type QueryPoolBatchSwapMsgsResponse

type QueryPoolBatchSwapMsgsResponse struct {
	Swaps []SwapMsgState `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps"`
	// pagination defines the pagination in the response. not working on this
	// version.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

the response type for the QueryPoolBatchSwapMsgs RPC method. This includes list of all currently existing swap messages of the batch and paging results that contain next_key and total count.

func (*QueryPoolBatchSwapMsgsResponse) Descriptor

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

func (*QueryPoolBatchSwapMsgsResponse) GetPagination

func (*QueryPoolBatchSwapMsgsResponse) GetSwaps

func (*QueryPoolBatchSwapMsgsResponse) Marshal

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

func (*QueryPoolBatchSwapMsgsResponse) MarshalTo

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

func (*QueryPoolBatchSwapMsgsResponse) MarshalToSizedBuffer

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

func (*QueryPoolBatchSwapMsgsResponse) ProtoMessage

func (*QueryPoolBatchSwapMsgsResponse) ProtoMessage()

func (*QueryPoolBatchSwapMsgsResponse) Reset

func (m *QueryPoolBatchSwapMsgsResponse) Reset()

func (*QueryPoolBatchSwapMsgsResponse) Size

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

func (*QueryPoolBatchSwapMsgsResponse) String

func (*QueryPoolBatchSwapMsgsResponse) Unmarshal

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

func (*QueryPoolBatchSwapMsgsResponse) XXX_DiscardUnknown

func (m *QueryPoolBatchSwapMsgsResponse) XXX_DiscardUnknown()

func (*QueryPoolBatchSwapMsgsResponse) XXX_Marshal

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

func (*QueryPoolBatchSwapMsgsResponse) XXX_Merge

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

func (*QueryPoolBatchSwapMsgsResponse) XXX_Size

func (m *QueryPoolBatchSwapMsgsResponse) XXX_Size() int

func (*QueryPoolBatchSwapMsgsResponse) XXX_Unmarshal

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

type QueryPoolBatchWithdrawMsgRequest

type QueryPoolBatchWithdrawMsgRequest struct {
	// id of the target pool for query
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// target msg_index of the pool
	MsgIndex uint64 `protobuf:"varint,2,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"`
}

the request type for the QueryPoolBatchWithdraw RPC method. requestable including specified pool_id and msg_index.

func (*QueryPoolBatchWithdrawMsgRequest) Descriptor

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

func (*QueryPoolBatchWithdrawMsgRequest) GetMsgIndex

func (m *QueryPoolBatchWithdrawMsgRequest) GetMsgIndex() uint64

func (*QueryPoolBatchWithdrawMsgRequest) GetPoolId

func (*QueryPoolBatchWithdrawMsgRequest) Marshal

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

func (*QueryPoolBatchWithdrawMsgRequest) MarshalTo

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

func (*QueryPoolBatchWithdrawMsgRequest) MarshalToSizedBuffer

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

func (*QueryPoolBatchWithdrawMsgRequest) ProtoMessage

func (*QueryPoolBatchWithdrawMsgRequest) ProtoMessage()

func (*QueryPoolBatchWithdrawMsgRequest) Reset

func (*QueryPoolBatchWithdrawMsgRequest) Size

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

func (*QueryPoolBatchWithdrawMsgRequest) String

func (*QueryPoolBatchWithdrawMsgRequest) Unmarshal

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

func (*QueryPoolBatchWithdrawMsgRequest) XXX_DiscardUnknown

func (m *QueryPoolBatchWithdrawMsgRequest) XXX_DiscardUnknown()

func (*QueryPoolBatchWithdrawMsgRequest) XXX_Marshal

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

func (*QueryPoolBatchWithdrawMsgRequest) XXX_Merge

func (*QueryPoolBatchWithdrawMsgRequest) XXX_Size

func (m *QueryPoolBatchWithdrawMsgRequest) XXX_Size() int

func (*QueryPoolBatchWithdrawMsgRequest) XXX_Unmarshal

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

type QueryPoolBatchWithdrawMsgResponse

type QueryPoolBatchWithdrawMsgResponse struct {
	Withdraw WithdrawMsgState `protobuf:"bytes,1,opt,name=withdraw,proto3" json:"withdraw"`
}

the response type for the QueryPoolBatchWithdrawMsg RPC method. This includes a batch swap message of the batch.

func (*QueryPoolBatchWithdrawMsgResponse) Descriptor

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

func (*QueryPoolBatchWithdrawMsgResponse) GetWithdraw

func (*QueryPoolBatchWithdrawMsgResponse) Marshal

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

func (*QueryPoolBatchWithdrawMsgResponse) MarshalTo

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

func (*QueryPoolBatchWithdrawMsgResponse) MarshalToSizedBuffer

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

func (*QueryPoolBatchWithdrawMsgResponse) ProtoMessage

func (*QueryPoolBatchWithdrawMsgResponse) ProtoMessage()

func (*QueryPoolBatchWithdrawMsgResponse) Reset

func (*QueryPoolBatchWithdrawMsgResponse) Size

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

func (*QueryPoolBatchWithdrawMsgResponse) String

func (*QueryPoolBatchWithdrawMsgResponse) Unmarshal

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

func (*QueryPoolBatchWithdrawMsgResponse) XXX_DiscardUnknown

func (m *QueryPoolBatchWithdrawMsgResponse) XXX_DiscardUnknown()

func (*QueryPoolBatchWithdrawMsgResponse) XXX_Marshal

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

func (*QueryPoolBatchWithdrawMsgResponse) XXX_Merge

func (*QueryPoolBatchWithdrawMsgResponse) XXX_Size

func (m *QueryPoolBatchWithdrawMsgResponse) XXX_Size() int

func (*QueryPoolBatchWithdrawMsgResponse) XXX_Unmarshal

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

type QueryPoolBatchWithdrawMsgsRequest

type QueryPoolBatchWithdrawMsgsRequest struct {
	// id of the target pool for query
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

the request type for the QueryPoolBatchWithdraw RPC method. Requestable including specified pool_id and pagination offset, limit, key.

func (*QueryPoolBatchWithdrawMsgsRequest) Descriptor

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

func (*QueryPoolBatchWithdrawMsgsRequest) GetPagination

func (*QueryPoolBatchWithdrawMsgsRequest) GetPoolId

func (*QueryPoolBatchWithdrawMsgsRequest) Marshal

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

func (*QueryPoolBatchWithdrawMsgsRequest) MarshalTo

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

func (*QueryPoolBatchWithdrawMsgsRequest) MarshalToSizedBuffer

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

func (*QueryPoolBatchWithdrawMsgsRequest) ProtoMessage

func (*QueryPoolBatchWithdrawMsgsRequest) ProtoMessage()

func (*QueryPoolBatchWithdrawMsgsRequest) Reset

func (*QueryPoolBatchWithdrawMsgsRequest) Size

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

func (*QueryPoolBatchWithdrawMsgsRequest) String

func (*QueryPoolBatchWithdrawMsgsRequest) Unmarshal

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

func (*QueryPoolBatchWithdrawMsgsRequest) XXX_DiscardUnknown

func (m *QueryPoolBatchWithdrawMsgsRequest) XXX_DiscardUnknown()

func (*QueryPoolBatchWithdrawMsgsRequest) XXX_Marshal

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

func (*QueryPoolBatchWithdrawMsgsRequest) XXX_Merge

func (*QueryPoolBatchWithdrawMsgsRequest) XXX_Size

func (m *QueryPoolBatchWithdrawMsgsRequest) XXX_Size() int

func (*QueryPoolBatchWithdrawMsgsRequest) XXX_Unmarshal

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

type QueryPoolBatchWithdrawMsgsResponse

type QueryPoolBatchWithdrawMsgsResponse struct {
	Withdraws []WithdrawMsgState `protobuf:"bytes,1,rep,name=withdraws,proto3" json:"withdraws"`
	// pagination defines the pagination in the response. Not supported on this
	// version.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

the response type for the QueryPoolBatchWithdraw RPC method. This includes a list of all currently existing withdraw messages of the batch and paging results that contain next_key and total count.

func (*QueryPoolBatchWithdrawMsgsResponse) Descriptor

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

func (*QueryPoolBatchWithdrawMsgsResponse) GetPagination

func (*QueryPoolBatchWithdrawMsgsResponse) GetWithdraws

func (*QueryPoolBatchWithdrawMsgsResponse) Marshal

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

func (*QueryPoolBatchWithdrawMsgsResponse) MarshalTo

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

func (*QueryPoolBatchWithdrawMsgsResponse) MarshalToSizedBuffer

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

func (*QueryPoolBatchWithdrawMsgsResponse) ProtoMessage

func (*QueryPoolBatchWithdrawMsgsResponse) ProtoMessage()

func (*QueryPoolBatchWithdrawMsgsResponse) Reset

func (*QueryPoolBatchWithdrawMsgsResponse) Size

func (*QueryPoolBatchWithdrawMsgsResponse) String

func (*QueryPoolBatchWithdrawMsgsResponse) Unmarshal

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

func (*QueryPoolBatchWithdrawMsgsResponse) XXX_DiscardUnknown

func (m *QueryPoolBatchWithdrawMsgsResponse) XXX_DiscardUnknown()

func (*QueryPoolBatchWithdrawMsgsResponse) XXX_Marshal

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

func (*QueryPoolBatchWithdrawMsgsResponse) XXX_Merge

func (*QueryPoolBatchWithdrawMsgsResponse) XXX_Size

func (*QueryPoolBatchWithdrawMsgsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Get existing liquidity pools.
	LiquidityPools(context.Context, *QueryLiquidityPoolsRequest) (*QueryLiquidityPoolsResponse, error)
	// Get specific liquidity pool.
	LiquidityPool(context.Context, *QueryLiquidityPoolRequest) (*QueryLiquidityPoolResponse, error)
	// Get specific liquidity pool corresponding to the pool_coin_denom.
	LiquidityPoolByPoolCoinDenom(context.Context, *QueryLiquidityPoolByPoolCoinDenomRequest) (*QueryLiquidityPoolResponse, error)
	// Get specific liquidity pool corresponding to the reserve account.
	LiquidityPoolByReserveAcc(context.Context, *QueryLiquidityPoolByReserveAccRequest) (*QueryLiquidityPoolResponse, error)
	// Get the pool's current batch.
	LiquidityPoolBatch(context.Context, *QueryLiquidityPoolBatchRequest) (*QueryLiquidityPoolBatchResponse, error)
	// Get all swap messages in the pool's current batch.
	PoolBatchSwapMsgs(context.Context, *QueryPoolBatchSwapMsgsRequest) (*QueryPoolBatchSwapMsgsResponse, error)
	// Get a specific swap message in the pool's current batch.
	PoolBatchSwapMsg(context.Context, *QueryPoolBatchSwapMsgRequest) (*QueryPoolBatchSwapMsgResponse, error)
	// Get all deposit messages in the pool's current batch.
	PoolBatchDepositMsgs(context.Context, *QueryPoolBatchDepositMsgsRequest) (*QueryPoolBatchDepositMsgsResponse, error)
	// Get a specific deposit message in the pool's current batch.
	PoolBatchDepositMsg(context.Context, *QueryPoolBatchDepositMsgRequest) (*QueryPoolBatchDepositMsgResponse, error)
	// Get all withdraw messages in the pool's current batch.
	PoolBatchWithdrawMsgs(context.Context, *QueryPoolBatchWithdrawMsgsRequest) (*QueryPoolBatchWithdrawMsgsResponse, error)
	// Get a specific withdraw message in the pool's current batch.
	PoolBatchWithdrawMsg(context.Context, *QueryPoolBatchWithdrawMsgRequest) (*QueryPoolBatchWithdrawMsgResponse, error)
	// Get all parameters of the liquidity module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type SwapMsgState

type SwapMsgState struct {
	// height where this message is appended to the batch
	MsgHeight int64 `protobuf:"varint,1,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty" yaml:"msg_height"`
	// index of this swap message in this liquidity pool
	MsgIndex uint64 `protobuf:"varint,2,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty" yaml:"msg_index"`
	// true if executed on this batch, false if not executed
	Executed bool `protobuf:"varint,3,opt,name=executed,proto3" json:"executed,omitempty" yaml:"executed"`
	// true if executed successfully on this batch, false if failed
	Succeeded bool `protobuf:"varint,4,opt,name=succeeded,proto3" json:"succeeded,omitempty" yaml:"succeeded"`
	// true if ready to be deleted on kvstore, false if not ready to be deleted
	ToBeDeleted bool `protobuf:"varint,5,opt,name=to_be_deleted,json=toBeDeleted,proto3" json:"to_be_deleted,omitempty" yaml:"to_be_deleted"`
	// swap orders are cancelled when current height is equal to or higher than
	// ExpiryHeight
	OrderExpiryHeight int64 `` /* 142-byte string literal not displayed */
	// offer coin exchanged until now
	ExchangedOfferCoin types.Coin `` /* 135-byte string literal not displayed */
	// offer coin currently remaining to be exchanged
	RemainingOfferCoin types.Coin `` /* 135-byte string literal not displayed */
	// reserve fee for pays fee in half offer coin
	ReservedOfferCoinFee types.Coin `` /* 146-byte string literal not displayed */
	// MsgSwapWithinBatch
	Msg *MsgSwapWithinBatch `protobuf:"bytes,10,opt,name=msg,proto3" json:"msg,omitempty" yaml:"msg"`
}

SwapMsgState defines the state of the swap message that contains state information as the message is processed in the next batch or batches.

func MustUnmarshalSwapMsgState

func MustUnmarshalSwapMsgState(cdc codec.BinaryCodec, value []byte) SwapMsgState

MustUnmarshalSwapMsgState returns the SwapMsgState from bytes. Panics if fails.

func UnmarshalSwapMsgState

func UnmarshalSwapMsgState(cdc codec.BinaryCodec, value []byte) (msg SwapMsgState, err error)

UnmarshalSwapMsgState returns the UnmarshalSwapMsgState from bytes.

func (*SwapMsgState) Descriptor

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

func (*SwapMsgState) Marshal

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

func (*SwapMsgState) MarshalTo

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

func (*SwapMsgState) MarshalToSizedBuffer

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

func (*SwapMsgState) ProtoMessage

func (*SwapMsgState) ProtoMessage()

func (*SwapMsgState) Reset

func (m *SwapMsgState) Reset()

func (*SwapMsgState) Size

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

func (*SwapMsgState) String

func (m *SwapMsgState) String() string

func (*SwapMsgState) Unmarshal

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

func (*SwapMsgState) XXX_DiscardUnknown

func (m *SwapMsgState) XXX_DiscardUnknown()

func (*SwapMsgState) XXX_Marshal

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

func (*SwapMsgState) XXX_Merge

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

func (*SwapMsgState) XXX_Size

func (m *SwapMsgState) XXX_Size() int

func (*SwapMsgState) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreatePool

func (*UnimplementedMsgServer) DepositWithinBatch

func (*UnimplementedMsgServer) DirectSwap added in v1.6.11

func (*UnimplementedMsgServer) Swap

func (*UnimplementedMsgServer) WithdrawWithinBatch

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) LiquidityPool

func (*UnimplementedQueryServer) LiquidityPoolBatch

func (*UnimplementedQueryServer) LiquidityPoolByPoolCoinDenom

func (*UnimplementedQueryServer) LiquidityPoolByReserveAcc

func (*UnimplementedQueryServer) LiquidityPools

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) PoolBatchDepositMsg

func (*UnimplementedQueryServer) PoolBatchSwapMsg

func (*UnimplementedQueryServer) PoolBatchSwapMsgs

type WeightedAddress added in v1.6.5

type WeightedAddress struct {
	Address string                      `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	Weight  cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight" yaml:"weight"`
}

WeightedAddress represents an address with a weight assigned to it. The weight is used to determine the proportion of the total minted tokens to be minted to the address.

func (*WeightedAddress) Descriptor added in v1.6.5

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

func (*WeightedAddress) Equal added in v1.6.5

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

func (*WeightedAddress) Marshal added in v1.6.5

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

func (*WeightedAddress) MarshalTo added in v1.6.5

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

func (*WeightedAddress) MarshalToSizedBuffer added in v1.6.5

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

func (*WeightedAddress) ProtoMessage added in v1.6.5

func (*WeightedAddress) ProtoMessage()

func (*WeightedAddress) Reset added in v1.6.5

func (m *WeightedAddress) Reset()

func (*WeightedAddress) Size added in v1.6.5

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

func (*WeightedAddress) String added in v1.6.5

func (m *WeightedAddress) String() string

func (*WeightedAddress) Unmarshal added in v1.6.5

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

func (*WeightedAddress) XXX_DiscardUnknown added in v1.6.5

func (m *WeightedAddress) XXX_DiscardUnknown()

func (*WeightedAddress) XXX_Marshal added in v1.6.5

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

func (*WeightedAddress) XXX_Merge added in v1.6.5

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

func (*WeightedAddress) XXX_Size added in v1.6.5

func (m *WeightedAddress) XXX_Size() int

func (*WeightedAddress) XXX_Unmarshal added in v1.6.5

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

type WithdrawMsgState

type WithdrawMsgState struct {
	// height where this message is appended to the batch
	MsgHeight int64 `protobuf:"varint,1,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty" yaml:"msg_height"`
	// index of this withdraw message in this liquidity pool
	MsgIndex uint64 `protobuf:"varint,2,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty" yaml:"msg_index"`
	// true if executed on this batch, false if not executed
	Executed bool `protobuf:"varint,3,opt,name=executed,proto3" json:"executed,omitempty" yaml:"executed"`
	// true if executed successfully on this batch, false if failed
	Succeeded bool `protobuf:"varint,4,opt,name=succeeded,proto3" json:"succeeded,omitempty" yaml:"succeeded"`
	// true if ready to be deleted on kvstore, false if not ready to be deleted
	ToBeDeleted bool `protobuf:"varint,5,opt,name=to_be_deleted,json=toBeDeleted,proto3" json:"to_be_deleted,omitempty" yaml:"to_be_deleted"`
	// MsgWithdrawWithinBatch
	Msg *MsgWithdrawWithinBatch `protobuf:"bytes,6,opt,name=msg,proto3" json:"msg,omitempty" yaml:"msg"`
}

WithdrawMsgState defines the state of the withdraw message that contains state information as the message is processed in the next batch or batches.

func MustUnmarshalWithdrawMsgState

func MustUnmarshalWithdrawMsgState(cdc codec.BinaryCodec, value []byte) WithdrawMsgState

MustUnmarshalWithdrawMsgState returns the WithdrawMsgState from bytes. Panics if fails.

func UnmarshalWithdrawMsgState

func UnmarshalWithdrawMsgState(cdc codec.BinaryCodec, value []byte) (msg WithdrawMsgState, err error)

UnmarshalWithdrawMsgState returns the WithdrawMsgState from bytes.

func (*WithdrawMsgState) Descriptor

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

func (*WithdrawMsgState) Marshal

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

func (*WithdrawMsgState) MarshalTo

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

func (*WithdrawMsgState) MarshalToSizedBuffer

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

func (*WithdrawMsgState) ProtoMessage

func (*WithdrawMsgState) ProtoMessage()

func (*WithdrawMsgState) Reset

func (m *WithdrawMsgState) Reset()

func (*WithdrawMsgState) Size

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

func (*WithdrawMsgState) String

func (m *WithdrawMsgState) String() string

func (*WithdrawMsgState) Unmarshal

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

func (*WithdrawMsgState) XXX_DiscardUnknown

func (m *WithdrawMsgState) XXX_DiscardUnknown()

func (*WithdrawMsgState) XXX_Marshal

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

func (*WithdrawMsgState) XXX_Merge

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

func (*WithdrawMsgState) XXX_Size

func (m *WithdrawMsgState) XXX_Size() int

func (*WithdrawMsgState) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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