Withdraw
Last updated
Last updated
Withdraw from zkLink L2 to connected networks.
Name | Type | Required | Description |
---|---|---|---|
For Example:
For more details please refer to Golang example in SDK
type
String
yes
The value is "Withdraw"
toChainId
yes
The target chain of the withdrawal
accountId
yes
TheID of the withdraw account
subAccountId
yes
The ID of the withdraw subaccount
to
String
yes
The target address of the withdrawal
l2SourceToken
yes
The source token to be deducted from the Layer3 account and used as the fee token
l1TargetToken
yes
The target token to be sent to the to_address on Layer1
amount
yes
Withdrawal amount, the value does not have to be packable
fee
yes
Fee requested via estimateTransactionFee
API, the value should be packable
withdrawToL1
u8
yes
1: true, 0: false. Withdraw to L1 or not
withdrawFeeRatio
u16
yes
Transaction fee for fast withdraw, 100 as 1%, 10000 as 100%, If ratio is not zero means fast withdraw, Value range: [0, 10000]
ts
u32
yes
Timestamp of the API call, used as front-end request id to generate transaction hash
nonce
yes
Current nonce of the account
signature
yes
the public key hash corresponding to the signature must be aligned with the withdraw account