Accounts
Overview of account structure
Account Structure
A wallet owner can register an account on Orderly Network for each builder that is supported. Each wallet owner could thus have multiple accounts (that are not interlinked with each other) registered with Orderly Network.
Account ID
Each account is identified by an account id, which can be calculated by
Converting the wallet address to bytes
Converting the keccak256 hash of the `brokerId` string to bytes
ABI encoding (1) and (2)
Converting back to Hex String, the keccak256 hash of the result of (3)
Account Registration
Follow the following steps to register an account on Orderly Network:
Choose a valid chain/builder to register the account on
List of chains can be found here and supported builders through Get list of builders API.
Obtain a registration nonce
Get a nonce from Get Registration Nonce API.
Obtain a signature from EIP-712
Sign a message from the wallet in the following format using the EIP-712 standard and obtain the signature.
{
"brokerId": "woofi_dex",
"chainId": 80001,
"timestamp": 1685973017064,
"registrationNonce": "194528949540"
}
where:
Name | Type | Required | Description |
---|---|---|---|
brokerId | string | Y | Builder ID |
chainId | int | Y | Chain ID of registering chain (within those that are supported by the Network) |
timestamp | timestamp | Y | timestamp in UNIX milliseconds |
registrationNonce | string | Y | Valid nonce from Get Registration Nonce |
Register account
Send all the necessary information via Register account API.