Create Royal ID
Esta página aún no está disponible en tu idioma.
The Royal Protocol provides flexible ways to create Royal IDs, accommodating both self-service users and platform-assisted registration. This flexibility ensures that both crypto-native users and those new to web3 can easily establish their digital identity.
Core Approaches
Users can create Royal IDs in two primary ways:
- Direct Creation: Users with ETH can create their own Royal ID by sending a transaction directly. This approach gives users complete control over the process but requires them to have ETH for gas fees.
- Sponsored Creation: Platforms or registrars can create Royal IDs on behalf of users, with user approval via signature. This approach eliminates the need for users to hold ETH, making it ideal for onboarding new users.
Setup Requirements
Before creating a Royal ID, ensure:
- The user has access to a web3 wallet (like MetaMask or Coinbase Wallet)
- For direct creation, the user has ETH on Base for gas fees
- For sponsored creation, the platform handles gas fees
- User connects their wallet to a Royal Protocol-enabled application
- User provides their desired username and optional recovery address
- Application calls
IdGateway.register()
with:- Username
- Recovery address (if specified)
- User approves the transaction in their wallet
- IdGateway validates the request and forwards it to IdRegistry
- IdRegistry creates the Royal ID and emits a
Registered
event
- User connects their wallet to a Royal Protocol-enabled application
- User provides their desired username and optional recovery address
- User signs a message containing:
- Their wallet address (future custody address)
- Chosen username
- Recovery address (if specified)
- Request deadline
- Platform submits the signed message via
IdGateway.registerFor()
- IdGateway verifies the signature and forwards the request to IdRegistry
- IdRegistry creates the Royal ID and emits a
Registered
event
Success Verification
For both flows, successful creation is indicated by:
- The
Registered
event being emitted - The new Royal ID being queryable via IdRegistry
- The user’s address being associated with the new Royal ID