Integrating decentralized domain name registration into your platform has never been easier. With SPACE ID’s web3-name-sdk, developers and partners can seamlessly enable users to register .bnb, .arb, and .eth domain names directly through custom front-end interfaces. This powerful integration not only enhances user experience but also opens up monetization opportunities—qualified partners earn commission fees when users register .arb and .bnb domains via their integrated portals.
Whether you're building a wallet, dApp, or Web3 infrastructure service, embedding domain registration functionality boosts engagement and adds long-term value for your users.
Why Integrate Web3 Domain Registration?
Web3 domain names simplify blockchain interactions by replacing complex wallet addresses with human-readable names like yourname.bnb. As decentralized identity gains momentum, offering domain registration directly in your app positions you at the forefront of user-centric Web3 innovation.
By integrating SPACE ID’s SDK, you provide:
- Simplified onboarding: Users claim memorable domains in just a few clicks.
- Brand differentiation: Stand out with built-in identity solutions.
- Revenue potential: Earn referral commissions on .bnb and .arb registrations.
👉 Discover how easy it is to integrate Web3 domain registration today.
Getting Started: SDK Installation
To begin, install the @web3-name-sdk/register package using npm or yarn. The SDK currently supports ethers.js v5 due to breaking changes in v6 that have not yet achieved broad adoption.
npm install @web3-name-sdk/register [email protected]yarn add @web3-name-sdk/register [email protected]⚠️ Note: If you're using Next.js, add the following configuration to your next.config.js file to ensure proper transpilation of CommonJS dependencies:const nextConfig = {
transpilePackages: ['@web3-name-sdk/register'],
}This ensures smooth compatibility and runtime performance across modern React frameworks.
Step-by-Step Domain Registration Process
The domain registration flow is standardized across supported top-level domains (TLDs) and consists of three essential steps:
- Check Availability
Verify whether the desired domain label (e.g.,mywallet) is available for registration. - Query Registration Fee
Retrieve the dynamic pricing based on domain length and registration duration. - Execute Registration
Trigger the on-chain transaction, including required parameters and payment.
Each step is designed for asynchronous execution, ensuring responsive UX in web applications.
Code Implementation Examples
Below are practical code snippets demonstrating integration for each supported chain.
Registering .bnb Domains
import SIDRegister from '@web3-name-sdk/register';
import { providers } from 'ethers';
async function registerDomain(label: String) {
if (window.ethereum) {
const provider = new providers.Web3Provider(window.ethereum);
// Switch to BNB Smart Chain
await provider.send('wallet_switchEthereumChain', [{ chainId: '0x38' }]);
// Connect wallet
await provider.send('eth_requestAccounts', []);
const signer = provider.getSigner();
const address = await signer.getAddress();
// Initialize SDK
const register = new SIDRegister({ signer, chainId: 56 });
// Check availability
const available = await register.getAvailable(label);
if (!available) throw new Error("Domain unavailable");
// Get price for 1-year registration
const price = await register.getRentPrice(label, 1);
// Register domain
await register.register(label, address, 1, {
setPrimaryName: true, // Optional: set as primary identity
referrer: 'partner.bnb' // Optional: earn commission via referral
});
}
}Registering .arb Domains
import SIDRegister from '@web3-name-sdk/register';
import { providers } from 'ethers';
async function registerArbDomain(label: String) {
if (window.ethereum) {
const provider = new providers.Web3Provider(window.ethereum);
// Switch to Arbitrum One
await provider.send('wallet_switchEthereumChain', [{ chainId: '0xA4B1' }]);
await provider.send('eth_requestAccounts', []);
const signer = provider.getSigner();
const address = await signer.getAddress();
const register = new SIDRegister({ signer, chainId: 42161 });
const available = await register.getAvailable(label);
if (!available) return;
const price = await register.getRentPrice(label, 1);
await register.register(label, address, 1, {
setPrimaryName: true,
referrer: 'referral.bnb'
});
}
}👉 Start integrating Web3 naming services with minimal code changes.
Registering .eth Domains
import SIDRegister from '@web3-name-sdk/register';
import { providers } from 'ethers';
async function registerEthDomain(label: String) {
if (window.ethereum) {
const provider = new providers.Web3Provider(window.ethereum);
// Switch to Ethereum Mainnet
await provider.send('wallet_switchEthereumChain', [{ chainId: '0x1' }]);
await provider.send('eth_requestAccounts', []);
const signer = provider.getSigner();
const address = await signer.getAddress();
const register = new SIDRegister({ signer, chainId: 1 });
const available = await register.getAvailable(label);
if (!available) return;
const price = await register.getRentPrice(label, 1);
await register.register(label, address, 1, {
onCommitSuccess: (waitTime) => {
return new Promise(resolve => {
setTimeout(resolve, waitTime * 1000); // Wait 60 seconds
});
}
});
}
}📌 Important Notes:
- The label refers to the name without the TLD (e.g.,
myprojectformyproject.bnb).- Chain IDs: ETH = 1, ARB = 42161, BNB = 56.
.ethdomains require a commit-and-wait mechanism (60 seconds), which is handled internally via theonCommitSuccesscallback.- Referral and primary name settings are not supported for
.ethdomains.
Partner Benefits and Referral Mechanics
Qualified integration partners can earn commission fees when users register .bnb and .arb domains through their platform. To qualify:
- Set a valid referrer domain (e.g.,
yourapp.bnb) during registration. - Ensure the referrer domain has its resolving address configured to receive earnings.
- Optionally set
setPrimaryName: trueto help users establish their default Web3 identity.
This creates a sustainable revenue model while enhancing user value—win-win for builders and end-users alike.
Frequently Asked Questions
Q: Can I integrate this SDK into a mobile dApp?
A: Yes, as long as your app supports Web3 wallet injection (like WalletConnect), you can integrate the SDK similarly to web environments.
Q: Are there any costs associated with using the SDK?
A: The SDK itself is free to use. You only pay standard blockchain gas fees during registration. Partners may earn referral commissions on eligible TLDs.
Q: Does .eth registration work the same way as .bnb or .arb?
A: No. .eth uses a two-step commit-and-register process requiring a mandatory 60-second wait, managed via the onCommitSuccess callback.
Q: How do I become a qualified partner for referral commissions?
A: Reach out through official channels to verify your integration. Once approved, simply pass your domain as the referrer parameter during registration.
Q: Is ethers.js v6 supported?
A: Not currently. The SDK is built on ethers v5 due to stability and ecosystem adoption. Support for v6 may be added in future updates.
Q: Can I customize the UI/UX around domain search and checkout?
A: Absolutely. The SDK handles backend logic only—frontend design is fully customizable to match your brand.
Final Thoughts
Integrating Web3 domain registration with SPACE ID’s SDK empowers your platform to offer seamless digital identity solutions. With straightforward implementation, flexible customization, and real monetization potential, it's an essential tool for any Web3-focused product.
👉 See how top platforms are enhancing user identity with one simple integration.
Core keywords naturally integrated: web3 domain registration, BNB domain, ARB domain, ETH domain, decentralized identity, domain name SDK, Web3 naming service, register .bnb domain.