Royal ID
The User
struct
Royal IDs are stored in User
structs π:
Field | Type | Meaning |
---|---|---|
id | uint256 | Unique identifier (autoincrement) |
username | string | Readable username |
custody | address | The address currently controlling this Royal ID |
recovery | address | Address authorized to reset the custody address (optional) |
Requirements
For user information to be valid, it needs to follow these requirements:
- Both username and custody address have to be unique.
- The username has to be URL safe (matching the regular expression
/^[a-zA-Z0-9_][a-zA-Z0-9\._-]+$/
)
Changes
Royal IDs can change their username (once every 28 days), custody address, and recovery address. The custody address can also be changed by the recovery address. See here for more information.
To avoid people registering under names that should belong to somebody else, Royal also has the ability to modify an IDβs username.
Contracts
- Registry:
IdRegistry
- Gateway (authorization logic):
IdGateway
Control and data flows
- Register a new Royal ID
- Register a new Royal ID and delegate authority
- Modify a Royal ID
- Recover a Royal ID
Queries
You can get Royal IDs by identifier, custody address, or username.
Query by | Function | Base | Base Sepolia |
---|---|---|---|
id | getUserById(uint256 id) π | π | π |
username | getUserByUsername(string username) π | π | π |
custody address | getUserByAddress(address wallet) π | π | π |