Documentation ¶
Index ¶
- 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 LockedInfo
- type Transaction
- func (n *Transaction) Client() *client.Client
- 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) GetTransactionHeight(txHash string) (uint32, error)
- func (n *Transaction) QueryLockedInfo(hash string) (*LockedInfo, error)
- func (n *Transaction) QuerySwapData(h string) (map[string]interface{}, error)
- func (n *Transaction) SendLockTransaction(txHash, signature, publicKey, address 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) SwapEnd(hash string)
- func (n *Transaction) TxVerifyAndConfirmed(txHash string, interval int) error
- func (n *Transaction) UnsignedLockTransaction(nep5SenderAddr, erc20ReceiverAddr string, amount int) (string, string, error)
- func (n *Transaction) ValidateAddress(addr string) error
- func (n *Transaction) WaitTxVerifyAndConfirmed(txHash string, interval int) (uint32, error)
- type TransactionParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressParam ¶
func ArrayTypeParam ¶
func FunctionName ¶
func IntegerTypeParam ¶
func StackToSwapInfo ¶
func StackToSwapInfo(stack []smartcontract.Parameter) (map[string]interface{}, error)
func StringTypeParam ¶
Types ¶
type LockedInfo ¶ added in v1.0.1
type LockedInfo struct { FromAddress string `json:"fromAddress"` ToAddress string `json:"toAddress"` Txid string `json:"txid"` UserEthAddress string `json:"userEthAddress"` Amount int64 `json:"amount"` Timestamp int64 `json:"timestamp"` BlockHeight int64 `json:"blockHeight"` Typ int `json:"typ"` }
func (*LockedInfo) String ¶ added in v1.0.1
func (l *LockedInfo) String() string
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
func NewTransaction(urls []string, contractAddr string, signer *signer.SignerClient) (*Transaction, error)
func (*Transaction) Client ¶
func (n *Transaction) Client() *client.Client
func (*Transaction) ClientEndpoint ¶ added in v1.0.1
func (n *Transaction) ClientEndpoint() string
func (*Transaction) CreateLockTransaction ¶ added in v1.0.1
func (n *Transaction) CreateLockTransaction(nep5SenderAddr, erc20ReceiverAddr, wif string, amount int) (string, error)
create lock tx
func (*Transaction) CreateUnLockTransaction ¶ added in v1.0.1
func (n *Transaction) CreateUnLockTransaction(ethTxId, nep5ReceiverAddr, erc20SenderAddr string, amount int, signerAddress string) (string, error)
create unlock tx
func (*Transaction) GetTransactionHeight ¶
func (n *Transaction) GetTransactionHeight(txHash string) (uint32, error)
func (*Transaction) QueryLockedInfo ¶ added in v1.0.1
func (n *Transaction) QueryLockedInfo(hash string) (*LockedInfo, error)
func (*Transaction) QuerySwapData ¶
func (n *Transaction) QuerySwapData(h string) (map[string]interface{}, error)
func (*Transaction) SendLockTransaction ¶ added in v1.0.1
func (n *Transaction) SendLockTransaction(txHash, signature, publicKey, address string) (string, error)
send lock tx
func (*Transaction) SignData ¶
func (n *Transaction) SignData(address string, str string) (*proto.SignResponse, error)
func (*Transaction) SignTx ¶
func (n *Transaction) SignTx(tx *transaction.Transaction, address string) error
func (*Transaction) SwapEnd ¶ added in v1.0.1
func (n *Transaction) SwapEnd(hash string)
func (*Transaction) TxVerifyAndConfirmed ¶
func (n *Transaction) TxVerifyAndConfirmed(txHash string, interval int) error
func (*Transaction) UnsignedLockTransaction ¶ added in v1.0.1
func (n *Transaction) UnsignedLockTransaction(nep5SenderAddr, erc20ReceiverAddr string, amount int) (string, string, error)
get unsigned lock tx
func (*Transaction) ValidateAddress ¶
func (n *Transaction) ValidateAddress(addr string) error
func (*Transaction) WaitTxVerifyAndConfirmed ¶ added in v1.0.1
func (n *Transaction) WaitTxVerifyAndConfirmed(txHash string, interval int) (uint32, error)
Click to show internal directories.
Click to hide internal directories.