Withdraw NFT
withdraw nft to layer1
EndPoint
Header
Field | Description | Example |
---|---|---|
X-API-KEY | ApiKey | "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ6B6DQ6THZWbvrAGxzEdulXQvOKLrRWZLnN" |
X-API-SIG | ECDSA Signature, pay attention the signature type, sign the ecdsa hash | "0xccf0a141fce2dc5cbbd4f802c52220e9e2ce260e86704d6258603eb346eefe2d 4a450005c362b223b2842d087f7065ea5eee0314531adf6a580fce64c25dca81c02" |
Request
Query Param | Description | Example |
---|---|---|
exchange | exchangeAddress in exchange info | |
owner | account owner address | |
accountId | sender accountId | 10110 |
to | withdraw to address | |
token | NftTAmountInfo, withdraw nft info | |
maxFee | offchain fee, request type is 10.
Note: if the tokenAddress isn't deployed yet, the fee is | |
storageId | offchainId of storage Id, sellTokenId is nft tokenId in nft balance | 1 |
validUntil | Timestamp for transfer to become invalid, seconds | normally current time + 2 months |
eddsaSignature | eddsa signature of the eddsa hash | |
counterFactualInfo | if it's a counterFactual wallet, need to pass the info | |
minGas | (Optional) min gas for on-chain withdraw, Loopring exchange allocates gas for each distribution, but people can also assign this min gas, so Loopring have to allocate higher gas value for this specific distribution, 0 means let Loopring choose the reasonable gas | 0 |
Response
Field | Description | Example |
---|---|---|
hash | The hash identifier set by the user at the time of submission, can use this hash to get the transfer info | "0x1d923ca7834dc90484fa2eb611f0f0bc7e741bb107007ebea19ba8caeab4f9d3" |
status | Whether the order was successfully submitted or not, please note, user may query after a while to get real process status, as most offchain requests are async processed Allowable : ['received', 'processing', 'processed', 'failed'] | "received" |
isIdempotent | Idempotent of submit transfer response, submit same transfer again idempotent will be true | "false" |
Model
NftTokenAmountInfo
Wrapper object used to describe a token associated with a certain quantity.
Field | Description | Example |
---|---|---|
tokenId | The Loopring's NFT token identifier. | 32769 |
amount | The amount of the NFT token | "2" |
nftData | The Loopring's NFT token data identifier which is a hash string of NFT token address and NFT_ID | "0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa 8ca7100400f7c31085" |
TokenAmountInfo
Field | Description | Example |
---|---|---|
tokenId | The Loopring's ERC20 token identifier. | 0 |
amount | The amount of the ERC20 token | "100000000000000000" |
counterFactualInfo
counterFactual Wallet Info
Field | Description | Example |
---|---|---|
walletFactory | Counter factual wallet factory contract address | "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd" |
walletOwner | Counter factual wallet owner address, NOT the wallet address | "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd" |
walletSalt | Salt to generate address from owner & other related info | "1" |
Compute ECDSA hash
Compute EdDSA hash
Last updated