service

package
v0.0.0-...-8377674 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: GPL-3.0 Imports: 34 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUtxoKey

func GetUtxoKey(scriptPk *btcjson.ScriptPubKeyResult) string

func GetUtxoKey1

func GetUtxoKey1(scriptPk *btcjson.ScriptPubKeyResult) string

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(c *conf.Config) (s *Service)

func (*Service) AssetInfo

func (exp *Service) AssetInfo(tokenHash string) (string, string)

func (*Service) ChainId2Name

func (exp *Service) ChainId2Name(chainId uint32) string

func (*Service) CheckChains

func (exp *Service) CheckChains(context *ctx.Context)

func (*Service) Close

func (s *Service) Close()

Close Service

func (*Service) DayOfTime

func (exp *Service) DayOfTime(t uint32) uint32

func (*Service) DayOfTimeAddOne

func (exp *Service) DayOfTimeAddOne(t uint32) uint32

func (*Service) DayOfTimeSubOne

func (exp *Service) DayOfTimeSubOne(t uint32) uint32

func (*Service) DayOfTimeUp

func (exp *Service) DayOfTimeUp(t uint32) uint32

func (*Service) FormatAmount

func (exp *Service) FormatAmount(precision uint64, amount uint64) string

func (*Service) FormatFee

func (exp *Service) FormatFee(chain uint32, fee uint64) string

func (*Service) GetAddressTxList

func (exp *Service) GetAddressTxList(chainId uint32, addr string, start uint32, end uint32) (int64, string)

func (*Service) GetChain

func (exp *Service) GetChain(chainId uint32) *model.ChainInfo

func (*Service) GetChainInfos

func (exp *Service) GetChainInfos() []*model.ChainInfo

func (*Service) GetConsumeGas

func (srv *Service) GetConsumeGas(ctx *ctx.Context, hash ethcommon.Hash) uint64

func (*Service) GetCrossTx

func (exp *Service) GetCrossTx(hash string) (int64, string)

GetCrossTx gets cross tx by Tx

func (*Service) GetCrossTxList

func (exp *Service) GetCrossTxList(start int, end int) (int64, string)

TODO GetCrossTxList gets Cross transaction list from start to end (to be optimized)

func (*Service) GetExplorerInfo

func (exp *Service) GetExplorerInfo(start uint32, end uint32) (int64, string)

GetExplorerInfo shows explorer information, such as current blockheight (the number of blockchain and so on) on the home page.

func (*Service) GetLatestValidator

func (exp *Service) GetLatestValidator() (int64, string)

GetCrossTx gets cross tx by Tx

func (*Service) GetToken

func (exp *Service) GetToken(tokenHash string) *model.ChainToken

func (*Service) GetTokenTxList

func (exp *Service) GetTokenTxList(token string, start uint32, end uint32) (int64, string)

func (*Service) Hash2Address

func (exp *Service) Hash2Address(chainId uint32, value string) string

func (*Service) LoadAllianceCrossTxFromChain

func (srv *Service) LoadAllianceCrossTxFromChain(context *ctx.Context)

loadAllianceCrossTxFromChain synchronizes cross txs from Alliance network

func (*Service) LoadCosmosCrossTxFromChain

func (srv *Service) LoadCosmosCrossTxFromChain(context *ctx.Context)

func (*Service) LoadEthCrossTxFromChain

func (srv *Service) LoadEthCrossTxFromChain(context *ctx.Context)

loadOntCrossTxFromChain synchronizes cross txs from Ethereum network

func (*Service) LoadNeoCrossTxFromChain

func (srv *Service) LoadNeoCrossTxFromChain(context *ctx.Context)

loadOntCrossTxFromChain synchronizes cross txs from Neo network

func (*Service) LoadOntCrossTxFromChain

func (srv *Service) LoadOntCrossTxFromChain(context *ctx.Context)

loadOntCrossTxFromChain synchronizes cross txs from Ontology network

func (*Service) MonitorBtcChainFromAlliance

func (self *Service) MonitorBtcChainFromAlliance(context *ctx.Context)

func (*Service) ParseBtcCrossTransfer

func (self *Service) ParseBtcCrossTransfer(rawTx *btcjson.TxRawResult) (xtype uint32, toAddress string, tChainid uint64, amount int64, extData []byte, err error)

func (*Service) Ping

func (s *Service) Ping() (err error)

Ping Service

func (*Service) SearchToken

func (exp *Service) SearchToken(name string, chainId uint32) *model.ChainToken

func (*Service) Start

func (exp *Service) Start(context *ctx.Context)

func (*Service) TxType2Name

func (exp *Service) TxType2Name(ttype uint32) string

Jump to

Keyboard shortcuts

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