Domains

OAuth2 🤝Web3

While users can activate Passports on Underdog's Passport site, owning a Domain allows applications to embed the Passport activation process within their own product.

Creating a Domain

Domains are composed of two pieces:

FieldDescriptionExample
namespaceName of the applicationsolarplex, underdog, metacamp
authorityAddress of the signer that can activate Passports within a Domain's namespaceEBeLw5jEdrEgDe17BdKGW2MizzGxtxigEuAGvYC7VzDp

Domains can be purchased on the Passport site starting at 1000 USDC for lifetime access. We are offering a significant discount for early partners - please contact us at [email protected] with your use case.

Once purchased, we create an on-chain account that manages your namespace (e.g. sporting, publique) and a Domain authority, which is the signer allowed to activate Passports within your domain.

Activating a Passport

There is a three step process to activate a Passport:

  1. Create a transaction to activate the Passport
  2. Sign the transaction with your Domain authority
  3. Prompt your user to sign & send the transaction

We've set up a Passport SDK to easily construct a @solana/web3.js instruction to activate a Passport within your Domain.

We'll walk through how this translate to code.

import { Keypair, Transaction } from "@solana/web3.js";

// Set up a connection with an RPC endpoint of your choosing
const connection = new Connection("rpc_url");

// This is the authority on your Domain
const domainAuthority = Keypair.generate();

// Step 1: Create transaction to activate Passport
const instruction = activatePassportInstruction(
  { namespace: "metacamp", identifier: "[email protected]" },
  domainAuthority.publicKey,
  passportAuthority.publicKey
);
const transaction = new Transaction().add(instruction);

// Set the transaction's blockhash so domain authority can sign
const { blockhash }= await connection.getLatestBlockhash();
transaction.recentBlockhash = blockhash;

// Step 2: Sign with the Domain authority
transaction.partialSign(domainAuthority);

// Step 3: Prompt user to sign & send
transaction.partialSign(passportAuthority);
connection.sendTransaction(transaction);

FAQ

Can I update the Domain authority?

Currently there is no functionality to update the Domain authority. The Domain authority will be set to the wallet that paid for the Domain.

However this is functionality we plan on adding soon to provide projects more flexibility with managing Passport activation.

How much does a Domain cost?

For a limited time, we are selling lifetime access to a domain starting at 1000 USDC. For early partners, we are offering a significant discount on a lifetime Domain - please contact us [email protected] with your use case.

We are still working on pricing for Domains but are expecting something similar to some monthly fee with an annual discount to maintain domain ownership.