Skip to main content

Unstoppable Domains

You can associate an Unstoppable Domain (e.g. brad.crypto) with your DEMOS address. The SDK supports both EVM (MetaMask) and Solana (Phantom) signing flows: you sign a challenge with one of the domain’s authorized addresses, and that signature is submitted to the DEMOS network for verification. The end-to-end flow:
  1. Resolve the domain to fetch its authorized addresses and metadata.
  2. Generate a challenge that includes your Demos public key and the chosen signing address.
  3. Sign the challenge externally with the user’s wallet (MetaMask personal_sign for EVM, Phantom for Solana).
  4. Submit the signature, challenge, and resolution data to link the identity.

1. Connect your wallet

2. Resolve the Domain

Use resolveUDDomain to fetch the unified resolution result for the domain. The returned UnifiedDomainResolution contains the network, registry type, and the list of authorizedAddresses that can sign the linking challenge.
The signing address must either be the domain owner or appear in resolutionData.authorizedAddresses; otherwise addUnstoppableDomainIdentity will throw.

3. Generate a Challenge and Sign It

Generate a challenge string that ties the signing address to your Demos public key, then have the user sign it with their wallet. For EVM, this is typically a MetaMask personal_sign call; for Solana, use Phantom.
For Solana, prompt the user to sign challenge with Phantom and pass the resulting signature in the next step.

4. Send an Identity request

Submit the signing address, signature, challenge, and the resolution data returned in step 2. An optional referralCode may be passed as the final argument.
A successful transaction response should look like this:

5. Getting linked UD identities

After the confirmation block has been forged, you can list the Unstoppable Domain identities linked to an address. Pass an address to query a specific account, or omit it to use the connected wallet’s address.

6. Removing a UD identity

You can create a transaction to unlink a domain. Only the domain string is needed.
A successful transaction response should look like this: