Versions in this module Expand all Collapse all v1 v1.0.1 Apr 12, 2021 Changes in this version + type LockedInfo struct + Amount int64 + BlockHeight int64 + FromAddress string + Timestamp int64 + ToAddress string + Txid string + Typ int + UserEthAddress string + func (l *LockedInfo) String() string type Transaction + func (n *Transaction) ClientEndpoint() string + func (n *Transaction) CreateLockTransaction(nep5SenderAddr, erc20ReceiverAddr, wif string, amount int) (string, error) + func (n *Transaction) CreateUnLockTransaction(ethTxId, nep5ReceiverAddr, erc20SenderAddr string, amount int, ...) (string, error) + func (n *Transaction) QueryLockedInfo(hash string) (*LockedInfo, error) + func (n *Transaction) SendLockTransaction(txHash, signature, publicKey, address string) (string, error) + func (n *Transaction) SwapEnd(hash string) + func (n *Transaction) UnsignedLockTransaction(nep5SenderAddr, erc20ReceiverAddr string, amount int) (string, string, error) + func (n *Transaction) WaitTxVerifyAndConfirmed(txHash string, interval int) (uint32, error) v1.0.0 Sep 15, 2020 Changes in this version + func AddressParam(addr string) request.Param + func ArrayParams(params []request.Param) request.Param + func ArrayTypeParam(hexStr string) request.Param + func FunctionName(name string) request.Param + func IntegerTypeParam(v int) request.Param + func StackToSwapInfo(stack []smartcontract.Parameter) (map[string]interface{}, error) + func StringTypeParam(v string) request.Param + type State int + const RefundUser + const RefundWrapper + const UserLock + const UserUnlock + const WrapperLock + const WrapperUnlock + type SwapInfo struct + Amount int64 + LockedHeight uint32 + OriginText string + OvertimeBlocks int64 + State int + TxIdIn string + TxIdOut string + TxIdRefund string + UnlockedHeight uint32 + UserNeoAddress string + type Transaction struct + func NewTransaction(url, contractAddr string, signer *signer.SignerClient) (*Transaction, error) + func (n *Transaction) Balance(addr string, asset string) (int64, error) + func (n *Transaction) CheckTxAndRHash(txHash, rHash string, confirmedHeight int, state State) (uint32, error) + func (n *Transaction) Client() *client.Client + func (n *Transaction) CreateTransaction(param TransactionParam) (string, error) + func (n *Transaction) CreateTransactionAppendWitness(param TransactionParam) (string, error) + func (n *Transaction) DeleteSwapInfo(rHash, signerAddr string) (string, error) + func (n *Transaction) GetTransactionHeight(txHash string) (uint32, error) + func (n *Transaction) HasConfirmedBlocksHeight(startHeight uint32, interval int64) (bool, uint32) + func (n *Transaction) QuerySwapData(rHash string) (map[string]interface{}, error) + func (n *Transaction) QuerySwapInfo(rHash string) (*SwapInfo, error) + func (n *Transaction) QuerySwapInfoAndConfirmedTx(rHash string, state State, interval int) (*SwapInfo, error) + func (n *Transaction) RefundUser(rOrigin string, signerAddress string) (string, error) + func (n *Transaction) RefundWrapper(rHash, signerAddr string) (string, error) + func (n *Transaction) SignData(address string, str string) (*proto.SignResponse, error) + func (n *Transaction) SignTx(tx *transaction.Transaction, address string) error + func (n *Transaction) TxVerifyAndConfirmed(txHash string, interval int) (uint32, error) + func (n *Transaction) UserLock(userAddress, assetsAddr, rHash string, amount int) (string, error) + func (n *Transaction) UserUnlock(rOrigin, userAddr, signerAddress string) (string, error) + func (n *Transaction) ValidateAddress(addr string) error + func (n *Transaction) WrapperLock(assetsAddr, userEthAddress, rHash string, amount, timerInterval int) (string, error) + func (n *Transaction) WrapperUnlock(rOrigin, signerAddress, userEthAddress string) (string, error) + type TransactionParam struct + EmitIndex string + FuncName string + Netfee util.Fixed8 + Params []request.Param + RHash string + ROrigin string + SignerAddress string + Sysfee util.Fixed8