Documentation ¶
Index ¶
- func BuildRegisterSwap(chain, txid string) error
- 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
- func P2shSwapin(txid, bindAddr *string) (*PostResult, error)
- func RegisterAddress(address string) (*PostResult, error)
- func RegisterSwap(chain, method, pairid, txid, swapServer string) (*PostResult, error)
- func RegisterSwapPending(chain, txid string) (*PostResult, error)
- func RegisterSwapRouter(chain, method, chainid, txid, logIndex, swapServer string) (*PostResult, error)
- func RetrySwapin(txid, pairID *string) (*PostResult, error)
- func Swapin(txid, pairID *string) (*PostResult, error)
- func Swapout(txid, pairID *string) (*PostResult, error)
- 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 SwapRegisterStatus
- type SwapResult
- type SwapStatistics
- type SwapStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRegisterSwap ¶
func GetP2shAddressInfo ¶
func GetP2shAddressInfo(p2shAddress string) (*tokens.P2shAddressInfo, error)
GetP2shAddressInfo api
func GetTokenPairInfo ¶
func GetTokenPairInfo(pairID string) (*tokens.TokenPairConfig, error)
GetTokenPairInfo api
func GetTokenPairsInfo ¶
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 FailedPostResult PostResult = "Failed"
var SuccessPostResult PostResult = "Success"
SuccessPostResult success post result
func RegisterAddress ¶
func RegisterAddress(address string) (*PostResult, error)
RegisterAddress register address for ETH like chain
func RegisterSwap ¶
func RegisterSwap(chain, method, pairid, txid, swapServer string) (*PostResult, error)
RegisterSwap register Swap for ETH like chain
func RegisterSwapPending ¶
func RegisterSwapPending(chain, txid string) (*PostResult, error)
RegisterSwapPending register Swap for ETH like chain
func RegisterSwapRouter ¶
func RegisterSwapRouter(chain, method, chainid, txid, logIndex, swapServer string) (*PostResult, error)
RegisterSwapRouter register Swap 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 ¶
type SwapNonceInfo struct { SwapinNonces map[string]uint64 `json:"swapinNonces"` SwapoutNonces map[string]uint64 `json:"swapoutNonces"` }
SwapNonceInfo swap nonce info
type SwapRegisterStatus ¶
type SwapRegisterStatus struct { Chainid string Txid string //Submit *submitStatus Register interface{} }
func RegisterSwapStatus ¶
func RegisterSwapStatus(txid string) (*SwapRegisterStatus, error)
RegisterSwapStatus register Swap for ETH like chain
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
type SwapStatistics ¶
type SwapStatistics = mongodb.SwapStatistics
SwapStatistics type alias
func GetSwapStatistics ¶
func GetSwapStatistics(pairID string) (*SwapStatistics, error)
GetSwapStatistics api