JustaName
API ReferenceSDK Reference
Guide
Guide
  • 👋Overview
  • Quickstart
  • Configuration
    • Overview
    • Appearance
    • Allowed ENS Names
    • ENS Domains
    • JustVerified
    • Networks
  • Backend Configuration
    • Overview
    • Sign In Routes
    • Subname Management Routes
    • Full Implementation
  • Learn & Engage
    • Overview
    • Views
    • Filters
  • Plugins
    • Overview
    • JustVerified
    • XMTP
    • EFP
    • POAP
    • Talent Protocol
  • Advanced
    • JustaName Deployment Addresses
    • Coin Types
    • JustaName - Under the Hood
    • Reading JustaName Subname Events from OrbisDB
    • Dynamic Records Resolution
  • Wallet Providers
    • Overview
    • RainbowKit
    • Para
    • Privy
    • Coinbase Smart Wallet
  • Design Components
    • Logos
  • Use Cases
    • Overview
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Configuration

ENS Domains

PreviousAllowed ENS NamesNextJustVerified

Last updated 7 months ago

Was this helpful?

In the JustWeb3 Widget configuration, you can specify which ENS domains will be used for your platform. By default, if no ENS domain is passed in the configuration, the following domains are used:

  • Mainnet: justan.id

  • Testnet (Sepolia): justan.eth

However, if you have your own ENS domain and want to use it, you can configure it by adding the domain and the corresponding API key. This allows your platform to issue and manage subnames under the specified ENS domain.

Example Configuration:

For security reasons and to follow best practices, it's important to avoid exposing your API key directly in the frontend configuration. Always refer to the section for guidance on securely managing API keys and handling sensitive operations.

const justweb3Config: JustWeb3ProviderConfig = {
  config: {
    origin: "http://localhost:3000/",
    domain: "localhost",
    signInTtl: 86400000,
  },
  openOnWalletConnect: true,
  allowedEns: "all",
  logo: "",
  ensDomains: [
    {
      ensDomain: "YOUR ENS DOMAIN",  // Replace with your custom ENS domain
      apiKey: "YOUR JUSTANAME API KEY",  // API key for JustaName
      chainId: 1,  // Ethereum mainnet chain ID
    },
  ],
  color: {
    primary: "hsl(216, 90%, 58%)",
    background: "hsl(0, 0%, 100%)",
    destructive: "hsl(0, 100%, 50%)",
  },
};

This configuration allows you to manage subnames under your custom ENS domain and ensures your platform's users can claim and use subnames within that domain.

Backend Configuration