Version: v0.0.0-...-1d4ad2d Latest Latest

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

Go to latest
Published: Aug 16, 2020 License: LGPL-3.0 Imports: 18 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Executor

type Executor struct {
	Config *util.BnbConfig

	NetworkType types.ChainNetwork
	RpcClient   rpc.Client
	// contains filtered or unexported fields

func NewExecutor

func NewExecutor(networkType types.ChainNetwork, cfg *util.BnbConfig) *Executor

func (*Executor) Balance

func (executor *Executor) Balance() ([]types.TokenBalance, error)

func (*Executor) CalcSwapId

func (executor *Executor) CalcSwapId(randomNumberHash ec.Hash, sender string, senderOtherChain string) ([]byte, error)

func (*Executor) Claim

func (executor *Executor) Claim(swapId ec.Hash, randomNumber ec.Hash) (string, *common.Error)

func (*Executor) Claimable

func (executor *Executor) Claimable(swapId ec.Hash) (bool, error)

func (*Executor) GetBalance

func (executor *Executor) GetBalance(addressString string) (*big.Int, error)

func (*Executor) GetBalanceAlertMsg

func (executor *Executor) GetBalanceAlertMsg() (string, error)

func (*Executor) GetBlockAndTxs

func (executor *Executor) GetBlockAndTxs(height int64) (*common.BlockAndTxLogs, error)

func (*Executor) GetChain

func (executor *Executor) GetChain() string

func (*Executor) GetColdWalletAddress

func (executor *Executor) GetColdWalletAddress() string

func (*Executor) GetDeputyAddress

func (executor *Executor) GetDeputyAddress() string

func (*Executor) GetFetchInterval

func (executor *Executor) GetFetchInterval() time.Duration

func (*Executor) GetHeight

func (executor *Executor) GetHeight() (int64, error)

func (*Executor) GetSentTxStatus

func (executor *Executor) GetSentTxStatus(hash string) store.TxStatus

func (*Executor) GetStatus

func (executor *Executor) GetStatus() (interface{}, error)

func (*Executor) GetSwap

func (executor *Executor) GetSwap(swapId ec.Hash) (*common.SwapRequest, error)

func (*Executor) HTLT

func (executor *Executor) HTLT(randomNumberHash ec.Hash, timestamp int64, heightSpan int64, recipientAddr string, otherChainSenderAddr string, otherChainRecipientAddr string, outAmount *big.Int) (string, *common.Error)

func (*Executor) HasSwap

func (executor *Executor) HasSwap(swapId ec.Hash) (bool, error)

func (*Executor) IsSameAddress

func (executor *Executor) IsSameAddress(addrA string, addrB string) bool

func (*Executor) QuerySwap

func (executor *Executor) QuerySwap(swapId []byte) (swap types.AtomicSwap, isExist bool, err error)

func (*Executor) Refund

func (executor *Executor) Refund(swapId ec.Hash) (string, *common.Error)

func (*Executor) Refundable

func (executor *Executor) Refundable(swapId ec.Hash) (bool, error)

func (*Executor) SendAmount

func (executor *Executor) SendAmount(address string, amount *big.Int) (string, error)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL