swapapi

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapIntResult

type MapIntResult map[int]string

MapIntResult type

func RegisterAnyCallSwap

func RegisterAnyCallSwap(fromChainID, txid, logIndexStr string) (*MapIntResult, error)

RegisterAnyCallSwap register anycall swap if logIndex is 0 then check all logs, otherwise only check the specified log

func RegisterRouterSwap

func RegisterRouterSwap(fromChainID, txid, logIndexStr string) (*MapIntResult, error)

RegisterRouterSwap register router swap if logIndex is 0 then check all logs, otherwise only check the specified log

type ServerInfo

type ServerInfo struct {
	Identifier     string
	Version        string
	ConfigContract string
}

ServerInfo serverinfo

func GetServerInfo

func GetServerInfo() *ServerInfo

GetServerInfo get server info

type SwapInfo

type SwapInfo struct {
	SwapType      uint32             `json:"swaptype"`
	TxID          string             `json:"txid"`
	TxTo          string             `json:"txto"`
	TxHeight      uint64             `json:"txheight"`
	TxTime        uint64             `json:"txtime"`
	From          string             `json:"from"`
	To            string             `json:"to"`
	Bind          string             `json:"bind"`
	Value         string             `json:"value"`
	LogIndex      int                `json:"logIndex,omitempty"`
	FromChainID   string             `json:"fromChainID"`
	ToChainID     string             `json:"toChainID"`
	SwapInfo      mongodb.SwapInfo   `json:"swapinfo"`
	SwapTx        string             `json:"swaptx"`
	OldSwapTxs    []string           `json:"oldswaptxs,omitempty"`
	SwapHeight    uint64             `json:"swapheight"`
	SwapTime      uint64             `json:"swaptime"`
	SwapValue     string             `json:"swapvalue"`
	SwapNonce     uint64             `json:"swapnonce"`
	Status        mongodb.SwapStatus `json:"status"`
	StatusMsg     string             `json:"statusmsg"`
	InitTime      int64              `json:"inittime"`
	Timestamp     int64              `json:"timestamp"`
	Memo          string             `json:"memo,omitempty"`
	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

func ConvertMgoSwapToSwapInfo(ms *mongodb.MgoSwap) *SwapInfo

ConvertMgoSwapToSwapInfo convert

func ConvertMgoSwapsToSwapInfos

func ConvertMgoSwapsToSwapInfos(msSlice []*mongodb.MgoSwap) []*SwapInfo

ConvertMgoSwapsToSwapInfos convert

func GetRouterSwap

func GetRouterSwap(fromChainID, txid, logindexStr string) (*SwapInfo, error)

GetRouterSwap impl

func GetRouterSwapHistory

func GetRouterSwapHistory(fromChainID, address string, offset, limit int, status string) ([]*SwapInfo, error)

GetRouterSwapHistory impl

Jump to

Keyboard shortcuts

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