Transfer
type TransferBuilder
Builder is used to build Transfer transaction
type Transfer
Transfer transaction type, it's a opaque data type.
func NewTransfer(builder TransferBuilder)
Create a new Transfer transaction.
Get the signature in the Transfer transaction.
func (*Transfer) GetBytes
Get the encoded bytes used to create the L3 signature.
func (*Transfer) TxHash
Get the transaction hash of Transfer transaction.
func (*Transfer) JsonStr
Get the json string of the Transfer transaction.
func (*Transfer) IsValid
Check if all the fields in Withdraw are valid. For example, if the ChainId
is exceeded the maximum ChainId, it will return false.
func (*Transfer) CreateSignedTx
Sign the Transfer transaction with the ZkLinkSigner, L1 signature and L3 signature will be created.
input:
signer: ZkLinkSigner
func (*Transfer) GetSignature
func (*Transfer) IsSignatureValid
Check if the L3 signature in the transaction is valid or not.
func (*Transfer) GetEthSignMsg
Get the message that used to create the Ethereum signature.
func (*Transfer) EthSignature
Create Ethereum signature, returns a TxLayer1Signature
input:
ethSigner: EthSigner
tokenSymbol: the symbol string of the token, for example,
USDT
func (*Transfer) SubmitterSignature
Create the submitter signature.
input:
signer: ZkLinkSigner
func (*Transfer) ToZklinkTx
Change the transaction to the ZkLinkTx
Last updated