Documentation
¶
Index ¶
- type Executor
- func (executor *Executor) CalcSwapId(randomNumberHash ec.Hash, sender string, senderOtherChain string) ([]byte, error)
- func (executor *Executor) Claim(swapId ec.Hash, randomNumber ec.Hash) (string, *common.Error)
- func (executor *Executor) Claimable(swapId ec.Hash) (bool, error)
- func (executor *Executor) GetBalance(addressString string) (*big.Int, error)
- func (executor *Executor) GetBalanceAlertMsg() (string, error)
- func (executor *Executor) GetBlockAndTxs(height int64) (*common.BlockAndTxLogs, error)
- func (executor *Executor) GetChain() string
- func (executor *Executor) GetColdWalletAddress() string
- func (executor *Executor) GetDeputyAddress() string
- func (executor *Executor) GetFetchInterval() time.Duration
- func (executor *Executor) GetHeight() (int64, error)
- func (executor *Executor) GetSentTxStatus(hash string) store.TxStatus
- func (executor *Executor) GetStatus() (interface{}, error)
- func (executor *Executor) GetSwap(swapId ec.Hash) (*common.SwapRequest, error)
- func (executor *Executor) HTLT(randomNumberHash ec.Hash, timestamp int64, heightSpan int64, ...) (string, *common.Error)
- func (executor *Executor) HasSwap(swapId ec.Hash) (bool, error)
- func (executor *Executor) IsSameAddress(addrA string, addrB string) bool
- func (executor *Executor) QuerySwap(swapId []byte) (swap bep3.AtomicSwap, isExist bool, err error)
- func (executor *Executor) Refund(swapId ec.Hash) (string, *common.Error)
- func (executor *Executor) Refundable(swapId ec.Hash) (bool, error)
- func (executor *Executor) SendAmount(address string, amount *big.Int) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct { Config *util.KavaConfig NetworkType client.ChainNetwork Client *client.KavaClient Cdc *amino.Codec // contains filtered or unexported fields }
Executor implements the common executor interface
func NewExecutor ¶
func NewExecutor(networkType client.ChainNetwork, cfg *util.KavaConfig) *Executor
NewExecutor creates a new Executor
func (*Executor) CalcSwapId ¶
func (executor *Executor) CalcSwapId(randomNumberHash ec.Hash, sender string, senderOtherChain string) ([]byte, error)
CalcSwapId calculates the swap ID for a given random number hash, sender, and sender other chain
func (*Executor) GetBalance ¶
GetBalance gets an account's current kava-bnb balance
func (*Executor) GetBalanceAlertMsg ¶
GetBalanceAlertMsg constructs an alert message if the deputy's balance is low
func (*Executor) GetBlockAndTxs ¶
func (executor *Executor) GetBlockAndTxs(height int64) (*common.BlockAndTxLogs, error)
GetBlockAndTxs parses all transactions from a specific block height
func (*Executor) GetColdWalletAddress ¶
GetColdWalletAddress gets the deputy's address from the config
func (*Executor) GetDeputyAddress ¶
GetDeputyAddress gets the deputy's address from the config
func (*Executor) GetFetchInterval ¶
GetFetchInterval gets the duration between fetches
func (*Executor) GetSentTxStatus ¶
GetSentTxStatus gets a sent transaction's status
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)
HTLT sends a transaction containing a MsgCreateAtomicSwap to kava
func (*Executor) IsSameAddress ¶
IsSameAddress checks for equality between two addresses
func (*Executor) Refundable ¶
Refundable returns true is an AtomicSwap is currently refundable