L
L
Loopring Dev Docs
Search…
⌃K

Update EddsaKey

EndPoint

POST /api/v3/account
Field
Description
Example
X-API-SIG
"0xccf0a141fce2dc5cbbd4f802c52220e9e2ce260e86704d6258603eb346eefe2d4a450005c362b223b2842d087f7065ea5eee0314531adf6a580fce64c25dca81c02"

Request

Field
Description
Example
exchange
exchange address
"0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
owner
owner address
"0xB4A70168340C75119523019f79F5Ffd9c60DceC7"
accountId
user account ID
10010
publicKey
PublicKey, The user's public key
{x:0x241707bcc6d7a4ccf10304be248d343a527e85f61b45d721544d027cc1f2fb5f,y:0x302f3a521dbdd1d0eb1944c8323d4ac3b3e9c9201f4aa43a2565054886369d9c}
maxFee
TokenAmount, maximum of fee token
"{tokenId: 0, volume: 1000000}"
validUntil
Timestamp for order to become invalid
1583183141
nonce
Nonce of users exchange account that used in off-chain requests.
1
keySeed
KeySeed of users L2 eddsaKey, the L2 key should be generated from this seed, i.e., L2_EDDSA_KEY=eth.sign(keySeed). Otherwise, user may meet error in login loopring DEX
"Sign this message to access Loopring Exchange: 0xbbbbca6a901c926f240b89eacb641d8aec7aeafd with key nonce: 103"
counterFactualInfo
(Optional) Counterfactual wallet extra info to verify L1 ecdsa signature.
"{walletFacto ry: 0xABCD, walletOwner: 0xABCD, walletSalt: 1234}"

Response

Field
Description
Example
hash
The order hash identifier set by the user at the time of submission
"0x1d923ca7834dc90484fa2eb611f0f0bc7e741bb107007ebea19ba8caeab4f9d3"
status
Whether the order was successfully submitted or not, please note, that the user may query after a while to get real process status, as most off-chain requests are async processed Allowable : ['received', 'processing', 'processed', 'failed']
"processing"
isIdempotent
Idempotent of submit order response, submit same order again when order was UNKNOWN or WAIT_FREEZE_BALANCE in relayer, idempotent will be true Allowable : [True, False]
false

Model

PublicKey

Field
Description
Example
x
The public keys x part.
"0x241707bcc6 d7a4ccf10304 be248d343a52 7e85f61b45d7 21544d027cc1 f2fb5f"
y
The public keys y part.
"0x302f3a521d bdd1d0eb1944 c8323d4ac3b3 e9c9201f4aa4 3a2565054886 369d9c"

Example

Header

X-API-SIG: 0x86387c20314430db3214412eb3f252102bb2ba50df0441e263164b5202ed9ee8756268c87cc9a9216b2cbeecf17152ddc33ccbdb7500137f6f5c878ee17a81111c02

Request

POST https://uat2.loopring.io/api/v3/account
{
"accountId": 16349,
"ecdsaSignature": "0x86387c20314430db3214412eb3f252102bb2ba50df0441e263164b5202ed9ee8756268c87cc9a9216b2cbeecf17152ddc33ccbdb7500137f6f5c878ee17a81111c02",
"exchange": "0x2e76EBd1c7c0C8e7c2B875b6d505a260C525d25e",
"keySeed": "Sign this message to access Loopring Exchange: 0x2e76EBd1c7c0C8e7c2B875b6d505a260C525d25e with key nonce: 0",
"maxFee": {
"tokenId": 0,
"volume": "22700000000000"
},
"nonce": 0,
"owner": "0x5a1baa04a3a799003938d4e4e7661d800913029c",
"publicKey": {
"x": "0x1cb92be8897bbb7537cc4f58faf31a332bac40158c76723a9c5718bf658d8dbe",
"y": "0x0d330fbce146fbc2cc4d048e578fe2f722532809aef8c433cc4474425c6e3db7"
},
"validUntil": 1656166701
}

Response

{
"hash": "0x14ab2fcacb737a80af8c0b4fca7358c765df0f7163c200929c57bff27fb6a62b",
"status": "processing",
"isIdempotent": false,
"accountId": 16349,
"tokenId": 0,
"storageId": 0
}