Documentation ¶
Index ¶
- func AmountBytesToString(amt []byte) string
- func GetConsensusReader(vite *vite.Vite) *util.VMConsensusReader
- func TokenBytesToString(token []byte) string
- type CancelStake
- type CancelStakeList
- type DelegateStakeInfo
- type DividendPoolInfo
- type Funds
- type NewRpcMarketInfo
- type NewRpcVxMineInfo
- type OrdersRes
- type PlaceOrderInfo
- type RpcDexFeesByPeriod
- type RpcDexTokenInfo
- type RpcFeeAccount
- type RpcFeesByPeriod
- type RpcFeesForDividend
- type RpcFeesForMine
- type RpcMarketInfo
- type RpcMiningStakingByPeriod
- type RpcMiningStakings
- type RpcOperatorFeeAccount
- type RpcOperatorFeesByPeriod
- type RpcOperatorMarketFee
- type RpcOrder
- type RpcThresholdForTradeAndMine
- type RpcUserFees
- type RpcVxFundByPeriod
- type RpcVxFunds
- type RpcVxMineInfo
- type SimpleAccountInfo
- type SimpleFund
- type StakeInfo
- type StakeInfoList
- type VIPStakingRpc
- type VxUnlock
- type VxUnlockList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmountBytesToString ¶
func GetConsensusReader ¶
func GetConsensusReader(vite *vite.Vite) *util.VMConsensusReader
func TokenBytesToString ¶
Types ¶
type CancelStake ¶
type CancelStakeList ¶
type CancelStakeList struct { CancellingAmount string `json:"cancellingAmount"` Count int `json:"count"` Cancels []*CancelStake `json:"cancels"` }
func CancelStakeListToRpc ¶
func CancelStakeListToRpc(cancelStakes *dex.CancelStakes, pageIndex int, pageSize int, chain chain.Chain) *CancelStakeList
type DelegateStakeInfo ¶
type DelegateStakeInfo struct { StakeType int `json:"stakeType"` Address string `json:"address"` Principal string `json:"principal"` Amount string `json:"amount"` Status int `json:"status"` }
func DelegateStakeInfoToRpc ¶
func DelegateStakeInfoToRpc(info *dex.DelegateStakeInfo) *DelegateStakeInfo
type DividendPoolInfo ¶
type DividendPoolInfo struct { Amount string `json:"amount"` QuoteTokenType int32 `json:"quoteTokenType"` TokenInfo *RpcDexTokenInfo `json:"tokenInfo,omitempty"` }
type Funds ¶
type Funds struct {
Funds []*SimpleFund `json:"funds"`
}
type NewRpcMarketInfo ¶
type NewRpcMarketInfo struct { MarketId int32 `json:"marketId"` MarketSymbol string `json:"marketSymbol"` TradeToken string `json:"tradeToken"` QuoteToken string `json:"quoteToken"` QuoteTokenType int32 `json:"quoteTokenType"` TradeTokenDecimals int32 `json:"tradeTokenDecimals,omitempty"` QuoteTokenDecimals int32 `json:"quoteTokenDecimals"` TakerOperatorFeeRate int32 `json:"takerOperatorFeeRate"` MakerOperatorFeeRate int32 `json:"makerOperatorFeeRate"` AllowMining bool `json:"allowMining"` Valid bool `json:"valid"` Owner string `json:"owner"` Creator string `json:"creator"` Stopped bool `json:"stopped"` Timestamp int64 `json:"timestamp"` }
func MarketInfoToNewRpc ¶
func MarketInfoToNewRpc(mkInfo *dex.MarketInfo) *NewRpcMarketInfo
type NewRpcVxMineInfo ¶
type PlaceOrderInfo ¶
type PlaceOrderInfo struct { Available string `json:"available"` // account available, side == true tradeToken, side == false quoteToken MinTradeAmount string `json:"minTradeAmount"` // min trade amount by quoteToken FeeRate int32 `json:"feeRate"` // max(takerFeeRateSum, makerFeeRateSum) Side bool `json:"side"` IsVIP bool `json:"isVIP"` IsSVIP bool `json:"isSVIP"` IsInvited bool `json:"isInvited"` }
type RpcDexFeesByPeriod ¶
type RpcDexFeesByPeriod struct { FeesForDividend []*RpcFeesForDividend `json:"feesForDividend"` FeesForMine []*RpcFeesForMine `json:"feesForMine"` LastValidPeriod uint64 `json:"lastValidPeriod"` FinishDividend bool `json:"finishDividend"` FinishMine bool `json:"finishMine"` }
func DexFeesByPeriodToRpc ¶
func DexFeesByPeriodToRpc(dexFeesByPeriod *dex.DexFeesByPeriod) *RpcDexFeesByPeriod
type RpcDexTokenInfo ¶
type RpcDexTokenInfo struct { TokenSymbol string `json:"tokenSymbol"` Decimals int32 `json:"decimals"` TokenId types.TokenTypeId `json:"tokenId"` Index int32 `json:"index"` Owner types.Address `json:"owner"` QuoteTokenType int32 `json:"quoteTokenType"` }
func TokenInfoToRpc ¶
func TokenInfoToRpc(tinfo *dex.TokenInfo, tti types.TokenTypeId) *RpcDexTokenInfo
type RpcFeeAccount ¶
type RpcFeesByPeriod ¶
type RpcFeesByPeriod struct { UserFees []*RpcFeeAccount `json:"userFees"` Period uint64 `json:"period"` }
type RpcFeesForDividend ¶
type RpcFeesForMine ¶
type RpcMarketInfo ¶
type RpcMarketInfo struct { MarketId int32 `json:"marketId"` MarketSymbol string `json:"marketSymbol"` TradeToken string `json:"tradeToken"` QuoteToken string `json:"quoteToken"` QuoteTokenType int32 `json:"quoteTokenType"` TradeTokenDecimals int32 `json:"tradeTokenDecimals,omitempty"` QuoteTokenDecimals int32 `json:"quoteTokenDecimals"` TakerBrokerFeeRate int32 `json:"takerBrokerFeeRate"` MakerBrokerFeeRate int32 `json:"makerBrokerFeeRate"` AllowMine bool `json:"allowMine"` Valid bool `json:"valid"` Owner string `json:"owner"` Creator string `json:"creator"` Stopped bool `json:"stopped"` Timestamp int64 `json:"timestamp"` }
func MarketInfoToRpc ¶
func MarketInfoToRpc(mkInfo *dex.MarketInfo) *RpcMarketInfo
type RpcMiningStakings ¶
type RpcMiningStakings struct {
Pledges []*RpcMiningStakingByPeriod `json:"Pledges"`
}
func MiningStakingsToRpc ¶
func MiningStakingsToRpc(miningStakings *dex.MiningStakings) *RpcMiningStakings
type RpcOperatorFeeAccount ¶
type RpcOperatorFeeAccount struct { Token string `json:"token"` MarketFees []*RpcOperatorMarketFee `json:"marketFees"` }
type RpcOperatorFeesByPeriod ¶
type RpcOperatorFeesByPeriod struct {
OperatorFees []*RpcOperatorFeeAccount `json:"operatorFees"`
}
func OperatorFeesByPeriodToRpc ¶
func OperatorFeesByPeriodToRpc(operatorFees *dex.OperatorFeesByPeriod) *RpcOperatorFeesByPeriod
type RpcOperatorMarketFee ¶
type RpcOrder ¶
type RpcOrder struct { Id string `json:"Id"` Address string `json:"Address"` MarketId int32 `json:"MarketId"` Side bool `json:"Side"` Type int32 `json:"Type"` Price string `json:"Price"` TakerFeeRate int32 `json:"TakerFeeRate"` MakerFeeRate int32 `json:"MakerFeeRate"` TakerOperatorFeeRate int32 `json:"TakerOperatorFeeRate"` MakerOperatorFeeRate int32 `json:"MakerOperatorFeeRate"` Quantity string `json:"Quantity"` Amount string `json:"Amount"` LockedBuyFee string `json:"LockedBuyFee,omitempty"` Status int32 `json:"Status"` CancelReason int32 `json:"CancelReason,omitempty"` ExecutedQuantity string `json:"ExecutedQuantity,omitempty"` ExecutedAmount string `json:"ExecutedAmount,omitempty"` ExecutedBaseFee string `json:"ExecutedBaseFee,omitempty"` ExecutedOperatorFee string `json:"ExecutedOperatorFee,omitempty"` RefundToken string `json:"RefundToken,omitempty"` RefundQuantity string `json:"RefundQuantity,omitempty"` Timestamp int64 `json:"Timestamp"` Agent string `json:"Agent,omitempty"` SendHash string `json:"SendHash,omitempty"` }
func OrderToRpc ¶
func OrdersToRpc ¶
type RpcUserFees ¶
type RpcUserFees struct {
Fees []*RpcFeesByPeriod `json:"fees"`
}
func UserFeesToRpc ¶
func UserFeesToRpc(userFees *dex.UserFees) *RpcUserFees
type RpcVxFundByPeriod ¶
type RpcVxFunds ¶
type RpcVxFunds struct {
Funds []*RpcVxFundByPeriod `json:"funds"`
}
func VxFundsToRpc ¶
func VxFundsToRpc(funds *dex.VxFunds) *RpcVxFunds
type RpcVxMineInfo ¶
type SimpleAccountInfo ¶
type SimpleFund ¶
type SimpleFund struct { Address string `json:"address"` Accounts []*SimpleAccountInfo `json:"accounts"` }
type StakeInfo ¶
type StakeInfo struct { Amount string `json:"stakeAmount"` Beneficiary string `json:"beneficiary"` ExpirationHeight string `json:"expirationHeight"` ExpirationTime int64 `json:"expirationTime"` IsDelegated bool `json:"isDelegated"` DelegateAddress string `json:"delegateAddress"` StakeAddress string `json:"stakeAddress"` Bid uint8 `json:"bid"` Id string `json:"id,omitempty"` Principal string `json:"principal,omitempty"` }
type StakeInfoList ¶
type VIPStakingRpc ¶
type VxUnlockList ¶
type VxUnlockList struct { UnlockingAmount string `json:"unlockingAmount"` Count int `json:"count"` Unlocks []*VxUnlock `json:"unlocks"` }
func UnlockListToRpc ¶
Click to show internal directories.
Click to hide internal directories.