Documentation
¶
Index ¶
- func GetP2shAddressInfo(p2shAddress string) (*tokens.P2shAddressInfo, error)
- func GetTokenPairInfo(pairID string) (*tokens.TokenPairConfig, error)
- func GetTokenPairsInfo(pairIDs string) (map[string]*tokens.TokenPairConfig, error)
- func IsValidSwapinBindAddress(address *string) bool
- func IsValidSwapoutBindAddress(address *string) bool
- func RegisterP2shAddress(bindAddress string) (*tokens.P2shAddressInfo, error)
- type LatestScanInfo
- type PostResult
- type RegisteredAddress
- type ServerInfo
- type Swap
- type SwapInfo
- func ConvertMgoSwapResultToSwapInfo(mr *mongodb.MgoSwapResult) *SwapInfo
- func ConvertMgoSwapResultsToSwapInfos(mrSlice []*mongodb.MgoSwapResult) []*SwapInfo
- func ConvertMgoSwapToSwapInfo(ms *mongodb.MgoSwap) *SwapInfo
- func ConvertMgoSwapsToSwapInfos(msSlice []*mongodb.MgoSwap) []*SwapInfo
- func GetSwapin(txid, pairID, bindAddr *string) (*SwapInfo, error)
- func GetSwapinHistory(address, pairID string, offset, limit int, status string) ([]*SwapInfo, error)
- func GetSwapout(txid, pairID, bindAddr *string) (*SwapInfo, error)
- func GetSwapoutHistory(address, pairID string, offset, limit int, status string) ([]*SwapInfo, error)
- type SwapNonceInfo
- type SwapResult
- type SwapStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetP2shAddressInfo ¶
func GetP2shAddressInfo(p2shAddress string) (*tokens.P2shAddressInfo, error)
GetP2shAddressInfo api
func GetTokenPairInfo ¶ added in v0.3.0
func GetTokenPairInfo(pairID string) (*tokens.TokenPairConfig, error)
GetTokenPairInfo api
func GetTokenPairsInfo ¶ added in v0.3.9
func GetTokenPairsInfo(pairIDs string) (map[string]*tokens.TokenPairConfig, error)
GetTokenPairsInfo api
func IsValidSwapinBindAddress ¶
IsValidSwapinBindAddress api
func IsValidSwapoutBindAddress ¶
IsValidSwapoutBindAddress api
func RegisterP2shAddress ¶
func RegisterP2shAddress(bindAddress string) (*tokens.P2shAddressInfo, error)
RegisterP2shAddress api
Types ¶
type LatestScanInfo ¶
type LatestScanInfo = mongodb.MgoLatestScanInfo
LatestScanInfo type alias
func GetLatestScanInfo ¶
func GetLatestScanInfo(isSrc bool) (*LatestScanInfo, error)
GetLatestScanInfo api
type PostResult ¶
type PostResult string
PostResult post result
var SuccessPostResult PostResult = "Success"
SuccessPostResult success post result
func RegisterAddress ¶
func RegisterAddress(address string) (*PostResult, error)
RegisterAddress register address for ETH like chain
type RegisteredAddress ¶
type RegisteredAddress = mongodb.MgoRegisteredAddress
RegisteredAddress type alias
func GetRegisteredAddress ¶
func GetRegisteredAddress(address string) (*RegisteredAddress, error)
GetRegisteredAddress get registered address
type ServerInfo ¶
type ServerInfo struct {
Identifier string
MustRegisterAccount bool
SrcChain *tokens.ChainConfig
DestChain *tokens.ChainConfig
PairIDs []string
Version string
}
ServerInfo server info
type Swap ¶
Swap type alias
func GetRawSwapin ¶
GetRawSwapin api
func GetRawSwapout ¶
GetRawSwapout api
type SwapInfo ¶
type SwapInfo struct {
PairID string `json:"pairid"`
TxID string `json:"txid"`
TxTo string `json:"txto"`
TxHeight uint64 `json:"txheight"`
From string `json:"from"`
To string `json:"to"`
Bind string `json:"bind"`
Value string `json:"value"`
SwapTx string `json:"swaptx"`
SwapHeight uint64 `json:"swapheight"`
SwapValue string `json:"swapvalue"`
SwapType uint32 `json:"swaptype"`
SwapNonce uint64 `json:"swapnonce"`
Status SwapStatus `json:"status"`
StatusMsg string `json:"statusmsg"`
InitTime int64 `json:"inittime"`
Timestamp int64 `json:"timestamp"`
Memo string `json:"memo"`
ReplaceCount int `json:"replaceCount"`
Confirmations uint64 `json:"confirmations"`
}
SwapInfo swap info
func ConvertMgoSwapResultToSwapInfo ¶
func ConvertMgoSwapResultToSwapInfo(mr *mongodb.MgoSwapResult) *SwapInfo
ConvertMgoSwapResultToSwapInfo convert
func ConvertMgoSwapResultsToSwapInfos ¶
func ConvertMgoSwapResultsToSwapInfos(mrSlice []*mongodb.MgoSwapResult) []*SwapInfo
ConvertMgoSwapResultsToSwapInfos convert
func ConvertMgoSwapToSwapInfo ¶
ConvertMgoSwapToSwapInfo convert
func ConvertMgoSwapsToSwapInfos ¶
ConvertMgoSwapsToSwapInfos convert
type SwapNonceInfo ¶ added in v0.3.7
type SwapNonceInfo struct {
SwapinNonces map[string]uint64 `json:"swapinNonces"`
SwapoutNonces map[string]uint64 `json:"swapoutNonces"`
}
SwapNonceInfo swap nonce info
type SwapResult ¶
type SwapResult = mongodb.MgoSwapResult
SwapResult type alias
func GetRawSwapinResult ¶
func GetRawSwapinResult(txid, pairID, bindAddr *string) (*SwapResult, error)
GetRawSwapinResult api
func GetRawSwapoutResult ¶
func GetRawSwapoutResult(txid, pairID, bindAddr *string) (*SwapResult, error)
GetRawSwapoutResult api