swapapi

package
v0.0.0-...-590ca12 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetP2shAddressInfo

func GetP2shAddressInfo(p2shAddress string) (*tokens.P2shAddressInfo, error)

GetP2shAddressInfo api

func IsValidSwapinBindAddress

func IsValidSwapinBindAddress(address *string) bool

IsValidSwapinBindAddress api

func IsValidSwapoutBindAddress

func IsValidSwapoutBindAddress(address *string) bool

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 P2shSwapin

func P2shSwapin(txid, bindAddr *string) (*PostResult, error)

P2shSwapin api

func RecallSwapin

func RecallSwapin(txid *string) (*PostResult, error)

RecallSwapin api

func Swapin

func Swapin(txid *string) (*PostResult, error)

Swapin api

func Swapout

func Swapout(txid *string) (*PostResult, error)

Swapout api

type ServerInfo

type ServerInfo struct {
	Identifier string
	SrcToken   *tokens.TokenConfig
	DestToken  *tokens.TokenConfig
	Version    string
}

ServerInfo server info

func GetServerInfo

func GetServerInfo() (*ServerInfo, error)

GetServerInfo api

type Swap

type Swap = mongodb.MgoSwap

Swap type alias

func GetRawSwapin

func GetRawSwapin(txid *string) (*Swap, error)

GetRawSwapin api

func GetRawSwapout

func GetRawSwapout(txid *string) (*Swap, error)

GetRawSwapout api

type SwapInfo

type SwapInfo struct {
	TxID          string     `json:"txid"`
	TxHeight      uint64     `json:"txheight"`
	TxTime        uint64     `json:"txtime"`
	From          string     `json:"from"`
	To            string     `json:"to"`
	Bind          string     `json:"bind"`
	Value         string     `json:"value"`
	SwapTx        string     `json:"swaptx"`
	SwapHeight    uint64     `json:"swapheight"`
	SwapTime      uint64     `json:"swaptime"`
	SwapValue     string     `json:"swapvalue"`
	SwapType      uint32     `json:"swaptype"`
	Status        SwapStatus `json:"status"`
	Timestamp     int64      `json:"timestamp"`
	Memo          string     `json:"memo"`
	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 GetSwapin

func GetSwapin(txid *string) (*SwapInfo, error)

GetSwapin api

func GetSwapinHistory

func GetSwapinHistory(address string, offset, limit int) ([]*SwapInfo, error)

GetSwapinHistory api

func GetSwapout

func GetSwapout(txid *string) (*SwapInfo, error)

GetSwapout api

func GetSwapoutHistory

func GetSwapoutHistory(address string, offset, limit int) ([]*SwapInfo, error)

GetSwapoutHistory api

type SwapResult

type SwapResult = mongodb.MgoSwapResult

SwapResult type alias

func GetRawSwapinResult

func GetRawSwapinResult(txid *string) (*SwapResult, error)

GetRawSwapinResult api

func GetRawSwapoutResult

func GetRawSwapoutResult(txid *string) (*SwapResult, error)

GetRawSwapoutResult api

type SwapStatistics

type SwapStatistics = mongodb.SwapStatistics

SwapStatistics type alias

func GetSwapStatistics

func GetSwapStatistics() (*SwapStatistics, error)

GetSwapStatistics api

type SwapStatus

type SwapStatus = mongodb.SwapStatus

SwapStatus type alias

Jump to

Keyboard shortcuts

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