Documentation ¶
Index ¶
- Variables
- type DepositRequest
- func (*DepositRequest) Descriptor() ([]byte, []int)
- func (m *DepositRequest) Marshal() (dAtA []byte, err error)
- func (m *DepositRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *DepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DepositRequest) ProtoMessage()
- func (m *DepositRequest) Reset()
- func (m *DepositRequest) Size() (n int)
- func (m *DepositRequest) String() string
- func (m *DepositRequest) Unmarshal(dAtA []byte) error
- func (m *DepositRequest) XXX_DiscardUnknown()
- func (m *DepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DepositRequest) XXX_Merge(src proto.Message)
- func (m *DepositRequest) XXX_Size() int
- func (m *DepositRequest) XXX_Unmarshal(b []byte) error
- type Order
- func (*Order) Descriptor() ([]byte, []int)
- func (m *Order) Marshal() (dAtA []byte, err error)
- func (m *Order) MarshalTo(dAtA []byte) (int, error)
- func (m *Order) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Order) ProtoMessage()
- func (m *Order) Reset()
- func (m *Order) Size() (n int)
- func (m *Order) String() string
- func (m *Order) Unmarshal(dAtA []byte) error
- func (m *Order) XXX_DiscardUnknown()
- func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Order) XXX_Merge(src proto.Message)
- func (m *Order) XXX_Size() int
- func (m *Order) XXX_Unmarshal(b []byte) error
- type OrderDirection
- type OrderStatus
- type Pair
- func (*Pair) Descriptor() ([]byte, []int)
- func (m *Pair) Marshal() (dAtA []byte, err error)
- func (m *Pair) MarshalTo(dAtA []byte) (int, error)
- func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Pair) ProtoMessage()
- func (m *Pair) Reset()
- func (m *Pair) Size() (n int)
- func (m *Pair) String() string
- func (m *Pair) Unmarshal(dAtA []byte) error
- func (m *Pair) XXX_DiscardUnknown()
- func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pair) XXX_Merge(src proto.Message)
- func (m *Pair) XXX_Size() int
- func (m *Pair) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type Pool
- func (*Pool) Descriptor() ([]byte, []int)
- func (m *Pool) Marshal() (dAtA []byte, err error)
- func (m *Pool) MarshalTo(dAtA []byte) (int, error)
- func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Pool) ProtoMessage()
- func (m *Pool) Reset()
- func (m *Pool) Size() (n int)
- func (m *Pool) String() string
- func (m *Pool) Unmarshal(dAtA []byte) error
- func (m *Pool) XXX_DiscardUnknown()
- func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pool) XXX_Merge(src proto.Message)
- func (m *Pool) XXX_Size() int
- func (m *Pool) XXX_Unmarshal(b []byte) error
- type RequestStatus
- type WithdrawRequest
- func (*WithdrawRequest) Descriptor() ([]byte, []int)
- func (m *WithdrawRequest) Marshal() (dAtA []byte, err error)
- func (m *WithdrawRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *WithdrawRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WithdrawRequest) ProtoMessage()
- func (m *WithdrawRequest) Reset()
- func (m *WithdrawRequest) Size() (n int)
- func (m *WithdrawRequest) String() string
- func (m *WithdrawRequest) Unmarshal(dAtA []byte) error
- func (m *WithdrawRequest) XXX_DiscardUnknown()
- func (m *WithdrawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WithdrawRequest) XXX_Merge(src proto.Message)
- func (m *WithdrawRequest) XXX_Size() int
- func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
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 OrderDirection_name = map[int32]string{
0: "ORDER_DIRECTION_UNSPECIFIED",
1: "ORDER_DIRECTION_BUY",
2: "ORDER_DIRECTION_SELL",
}
View Source
var OrderDirection_value = map[string]int32{
"ORDER_DIRECTION_UNSPECIFIED": 0,
"ORDER_DIRECTION_BUY": 1,
"ORDER_DIRECTION_SELL": 2,
}
View Source
var OrderStatus_name = map[int32]string{
0: "ORDER_STATUS_UNSPECIFIED",
1: "ORDER_STATUS_NOT_EXECUTED",
2: "ORDER_STATUS_NOT_MATCHED",
3: "ORDER_STATUS_PARTIALLY_MATCHED",
4: "ORDER_STATUS_COMPLETED",
5: "ORDER_STATUS_CANCELED",
6: "ORDER_STATUS_EXPIRED",
}
View Source
var OrderStatus_value = map[string]int32{
"ORDER_STATUS_UNSPECIFIED": 0,
"ORDER_STATUS_NOT_EXECUTED": 1,
"ORDER_STATUS_NOT_MATCHED": 2,
"ORDER_STATUS_PARTIALLY_MATCHED": 3,
"ORDER_STATUS_COMPLETED": 4,
"ORDER_STATUS_CANCELED": 5,
"ORDER_STATUS_EXPIRED": 6,
}
View Source
var RequestStatus_name = map[int32]string{
0: "REQUEST_STATUS_UNSPECIFIED",
1: "REQUEST_STATUS_NOT_EXECUTED",
2: "REQUEST_STATUS_SUCCEEDED",
3: "REQUEST_STATUS_FAILED",
}
View Source
var RequestStatus_value = map[string]int32{
"REQUEST_STATUS_UNSPECIFIED": 0,
"REQUEST_STATUS_NOT_EXECUTED": 1,
"REQUEST_STATUS_SUCCEEDED": 2,
"REQUEST_STATUS_FAILED": 3,
}
Functions ¶
This section is empty.
Types ¶
type DepositRequest ¶
type DepositRequest struct { // id specifies the id for the request Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // pool_id specifies the pool id PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // msg_height specifies the block height when the request is stored for the batch execution MsgHeight int64 `protobuf:"varint,3,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty"` // depositor specifies the bech32-encoded address that makes a deposit to the pool Depositor string `protobuf:"bytes,4,opt,name=depositor,proto3" json:"depositor,omitempty"` // deposit_coins specifies the amount of coins to deposit. DepositCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 141-byte string literal not displayed */ // accepted_coins specifies the amount of coins that are accepted. AcceptedCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 144-byte string literal not displayed */ MintedPoolCoin types.Coin `protobuf:"bytes,7,opt,name=minted_pool_coin,json=mintedPoolCoin,proto3" json:"minted_pool_coin"` Status RequestStatus `protobuf:"varint,8,opt,name=status,proto3,enum=crescent.liquidity.v1beta1.RequestStatus" json:"status,omitempty"` }
DepositRequest defines a deposit request.
func (*DepositRequest) Descriptor ¶
func (*DepositRequest) Descriptor() ([]byte, []int)
func (*DepositRequest) Marshal ¶
func (m *DepositRequest) Marshal() (dAtA []byte, err error)
func (*DepositRequest) MarshalToSizedBuffer ¶
func (m *DepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DepositRequest) ProtoMessage ¶
func (*DepositRequest) ProtoMessage()
func (*DepositRequest) Reset ¶
func (m *DepositRequest) Reset()
func (*DepositRequest) Size ¶
func (m *DepositRequest) Size() (n int)
func (*DepositRequest) String ¶
func (m *DepositRequest) String() string
func (*DepositRequest) Unmarshal ¶
func (m *DepositRequest) Unmarshal(dAtA []byte) error
func (*DepositRequest) XXX_DiscardUnknown ¶
func (m *DepositRequest) XXX_DiscardUnknown()
func (*DepositRequest) XXX_Marshal ¶
func (m *DepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DepositRequest) XXX_Merge ¶
func (m *DepositRequest) XXX_Merge(src proto.Message)
func (*DepositRequest) XXX_Size ¶
func (m *DepositRequest) XXX_Size() int
func (*DepositRequest) XXX_Unmarshal ¶
func (m *DepositRequest) XXX_Unmarshal(b []byte) error
type Order ¶
type Order struct { // id specifies the id for the request Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // pair_id specifies the pair id PairId uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` // msg_height specifies the block height when the request is stored for the batch execution MsgHeight int64 `protobuf:"varint,3,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty"` // orderer specifies the bech32-encoded address that makes an order Orderer string `protobuf:"bytes,4,opt,name=orderer,proto3" json:"orderer,omitempty"` // direction specifies the order direction; either buy or sell Direction OrderDirection `protobuf:"varint,5,opt,name=direction,proto3,enum=crescent.liquidity.v1beta1.OrderDirection" json:"direction,omitempty"` OfferCoin types.Coin `protobuf:"bytes,6,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin"` // remaining_offer_coin specifies the remaining offer coin RemainingOfferCoin types.Coin `protobuf:"bytes,7,opt,name=remaining_offer_coin,json=remainingOfferCoin,proto3" json:"remaining_offer_coin"` // received_coin specifies the received coin after the swap ReceivedCoin types.Coin `protobuf:"bytes,8,opt,name=received_coin,json=receivedCoin,proto3" json:"received_coin"` // price specifies the price that an orderer is willing to swap Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` OpenAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 132-byte string literal not displayed */ // batch_id specifies the pair's batch id when the request is stored BatchId uint64 `protobuf:"varint,12,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"` ExpireAt time.Time `protobuf:"bytes,13,opt,name=expire_at,json=expireAt,proto3,stdtime" json:"expire_at"` Status OrderStatus `protobuf:"varint,14,opt,name=status,proto3,enum=crescent.liquidity.v1beta1.OrderStatus" json:"status,omitempty"` }
Order defines an order.
func (*Order) Descriptor ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) XXX_DiscardUnknown ¶
func (m *Order) XXX_DiscardUnknown()
func (*Order) XXX_Marshal ¶
func (*Order) XXX_Unmarshal ¶
type OrderDirection ¶
type OrderDirection int32
OrderDirection enumerates order directions.
const ( // ORDER_DIRECTION_UNSPECIFIED specifies unknown order direction OrderDirectionUnspecified OrderDirection = 0 // ORDER_DIRECTION_BUY specifies buy(swap quote coin to base coin) order direction OrderDirectionBuy OrderDirection = 1 // ORDER_DIRECTION_SELL specifies sell(swap base coin to quote coin) order direction OrderDirectionSell OrderDirection = 2 )
func (OrderDirection) EnumDescriptor ¶
func (OrderDirection) EnumDescriptor() ([]byte, []int)
func (OrderDirection) String ¶
func (x OrderDirection) String() string
type OrderStatus ¶
type OrderStatus int32
OrderStatus enumerates order statuses.
const ( // ORDER_STATUS_UNSPECIFIED specifies unknown order status OrderStatusUnspecified OrderStatus = 0 // ORDER_STATUS_NOT_EXECUTED indicates the order has not been executed yet OrderStatusNotExecuted OrderStatus = 1 // ORDER_STATUS_NOT_MATCHED indicates the order has been executed but has no match OrderStatusNotMatched OrderStatus = 2 // ORDER_STATUS_PARTIALLY_MATCHED indicates the order has been partially matched OrderStatusPartiallyMatched OrderStatus = 3 // ORDER_STATUS_COMPLETED indicates the order has been fully matched and completed OrderStatusCompleted OrderStatus = 4 // ORDER_STATUS_CANCELED indicates the order has been canceled OrderStatusCanceled OrderStatus = 5 // ORDER_STATUS_EXPIRED indicates the order has been expired OrderStatusExpired OrderStatus = 6 )
func (OrderStatus) EnumDescriptor ¶
func (OrderStatus) EnumDescriptor() ([]byte, []int)
func (OrderStatus) String ¶
func (x OrderStatus) String() string
type Pair ¶
type Pair struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` BaseCoinDenom string `protobuf:"bytes,2,opt,name=base_coin_denom,json=baseCoinDenom,proto3" json:"base_coin_denom,omitempty"` QuoteCoinDenom string `protobuf:"bytes,3,opt,name=quote_coin_denom,json=quoteCoinDenom,proto3" json:"quote_coin_denom,omitempty"` EscrowAddress string `protobuf:"bytes,4,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"` LastOrderId uint64 `protobuf:"varint,5,opt,name=last_order_id,json=lastOrderId,proto3" json:"last_order_id,omitempty"` LastPrice *github_com_cosmos_cosmos_sdk_types.Dec `` /* 138-byte string literal not displayed */ CurrentBatchId uint64 `protobuf:"varint,7,opt,name=current_batch_id,json=currentBatchId,proto3" json:"current_batch_id,omitempty"` }
Pair defines a coin pair.
func (*Pair) Descriptor ¶
func (*Pair) ProtoMessage ¶
func (*Pair) ProtoMessage()
func (*Pair) XXX_DiscardUnknown ¶
func (m *Pair) XXX_DiscardUnknown()
func (*Pair) XXX_Unmarshal ¶
type Params ¶
type Params struct { BatchSize uint32 `protobuf:"varint,1,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` TickPrecision uint32 `protobuf:"varint,2,opt,name=tick_precision,json=tickPrecision,proto3" json:"tick_precision,omitempty"` FeeCollectorAddress string `protobuf:"bytes,3,opt,name=fee_collector_address,json=feeCollectorAddress,proto3" json:"fee_collector_address,omitempty"` DustCollectorAddress string `protobuf:"bytes,4,opt,name=dust_collector_address,json=dustCollectorAddress,proto3" json:"dust_collector_address,omitempty"` MinInitialPoolCoinSupply github_com_cosmos_cosmos_sdk_types.Int `` /* 179-byte string literal not displayed */ PairCreationFee github_com_cosmos_cosmos_sdk_types.Coins `` /* 152-byte string literal not displayed */ PoolCreationFee github_com_cosmos_cosmos_sdk_types.Coins `` /* 152-byte string literal not displayed */ MinInitialDepositAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 174-byte string literal not displayed */ MaxPriceLimitRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 159-byte string literal not displayed */ MaxOrderLifespan time.Duration `protobuf:"bytes,10,opt,name=max_order_lifespan,json=maxOrderLifespan,proto3,stdduration" json:"max_order_lifespan"` SwapFeeRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */ WithdrawFeeRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */ DepositExtraGas github_com_cosmos_cosmos_sdk_types.Gas `` /* 150-byte string literal not displayed */ WithdrawExtraGas github_com_cosmos_cosmos_sdk_types.Gas `` /* 153-byte string literal not displayed */ OrderExtraGas github_com_cosmos_cosmos_sdk_types.Gas `` /* 144-byte string literal not displayed */ }
Params defines the parameters for the liquidity module.
func (*Params) Descriptor ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type Pool ¶
type Pool struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` PairId uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"` ReserveAddress string `protobuf:"bytes,3,opt,name=reserve_address,json=reserveAddress,proto3" json:"reserve_address,omitempty"` PoolCoinDenom string `protobuf:"bytes,4,opt,name=pool_coin_denom,json=poolCoinDenom,proto3" json:"pool_coin_denom,omitempty"` LastDepositRequestId uint64 `` /* 126-byte string literal not displayed */ LastWithdrawRequestId uint64 `` /* 129-byte string literal not displayed */ Disabled bool `protobuf:"varint,7,opt,name=disabled,proto3" json:"disabled,omitempty"` }
Pool defines a basic liquidity pool with no min-price and max-price.
func (*Pool) Descriptor ¶
func (*Pool) ProtoMessage ¶
func (*Pool) ProtoMessage()
func (*Pool) XXX_DiscardUnknown ¶
func (m *Pool) XXX_DiscardUnknown()
func (*Pool) XXX_Unmarshal ¶
type RequestStatus ¶
type RequestStatus int32
RequestStatus enumerates request statuses.
const ( // REQUEST_STATUS_UNSPECIFIED specifies unknown request status RequestStatusUnspecified RequestStatus = 0 // REQUEST_STATUS_NOT_EXECUTED indicates the request is not executed yet RequestStatusNotExecuted RequestStatus = 1 // REQUEST_STATUS_SUCCEEDED indicates the request has been succeeded RequestStatusSucceeded RequestStatus = 2 // REQUEST_STATUS_FAILED indicates the request is failed RequestStatusFailed RequestStatus = 3 )
func (RequestStatus) EnumDescriptor ¶
func (RequestStatus) EnumDescriptor() ([]byte, []int)
func (RequestStatus) String ¶
func (x RequestStatus) String() string
type WithdrawRequest ¶
type WithdrawRequest struct { // id specifies the id for the request Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // pool_id specifies the pool id PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` // msg_height specifies the block height when the request is stored for the batch execution MsgHeight int64 `protobuf:"varint,3,opt,name=msg_height,json=msgHeight,proto3" json:"msg_height,omitempty"` // withdrawer specifies the bech32-encoded address that withdraws pool coin from the pool Withdrawer string `protobuf:"bytes,4,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` // pool_coin specifies the pool coin that is a proof of liquidity provider for the pool PoolCoin types.Coin `protobuf:"bytes,5,opt,name=pool_coin,json=poolCoin,proto3" json:"pool_coin"` // withdrawn_coins specifies the amount of coins that are withdrawn. WithdrawnCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 147-byte string literal not displayed */ Status RequestStatus `protobuf:"varint,7,opt,name=status,proto3,enum=crescent.liquidity.v1beta1.RequestStatus" json:"status,omitempty"` }
WithdrawRequest defines a withdraw request.
func (*WithdrawRequest) Descriptor ¶
func (*WithdrawRequest) Descriptor() ([]byte, []int)
func (*WithdrawRequest) Marshal ¶
func (m *WithdrawRequest) Marshal() (dAtA []byte, err error)
func (*WithdrawRequest) MarshalToSizedBuffer ¶
func (m *WithdrawRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WithdrawRequest) ProtoMessage ¶
func (*WithdrawRequest) ProtoMessage()
func (*WithdrawRequest) Reset ¶
func (m *WithdrawRequest) Reset()
func (*WithdrawRequest) Size ¶
func (m *WithdrawRequest) Size() (n int)
func (*WithdrawRequest) String ¶
func (m *WithdrawRequest) String() string
func (*WithdrawRequest) Unmarshal ¶
func (m *WithdrawRequest) Unmarshal(dAtA []byte) error
func (*WithdrawRequest) XXX_DiscardUnknown ¶
func (m *WithdrawRequest) XXX_DiscardUnknown()
func (*WithdrawRequest) XXX_Marshal ¶
func (m *WithdrawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WithdrawRequest) XXX_Merge ¶
func (m *WithdrawRequest) XXX_Merge(src proto.Message)
func (*WithdrawRequest) XXX_Size ¶
func (m *WithdrawRequest) XXX_Size() int
func (*WithdrawRequest) XXX_Unmarshal ¶
func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.