Withdraw
type WithdrawBuilder
The builder is used to build the Withdraw transaction.
type Withdraw
Withdraw transaction type, it's a opaque data type.
func NewWithdraw(builder WithdrawBuilder)
Create a new Withdraw transaction.
input: builder: WithdrawBuilder
func (*Withdraw) GetBytes
Get the encoded bytes used to create the L3 signature.
func (*Withdraw) TxHash
Get the transaction hash of Withdraw transaction
func (*Withdraw) 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 (*Withdraw) CreateSignedTx
The ZkLinkSigner will sign the [Withdraw] transaction, replace the default signature in the transaction.
input:
signer: ZkLinkSigner
func (*Withdraw) GetSignature
Get L3 signature inside the transaction.
func (*Withdraw) IsSignatureValid
Check if the L3 signature in the Withdraw transaction is valid or not.
func (*Withdraw) EthSignature
Create the Ethereum signature. input::
ethSigner: the Ethereum signer
l2SourceTokenSymbol: the symbol string of l2 token, for example: "USD"
func (*Withdraw) SubmitterSignature
Create a submitter signature.
input:
signer: ZkLinkSigner
func (*Withdraw) ToZklinkTx
Change the Withdraw transaction to the ZkLinkTx
Last updated