Is Saphire Devnet Working?

Hello, i am trying to implement this example: Integration Builder | Web3Auth

But i am getting error with the provider, Currenly in my web3 dashboard my project is setting up with sapphire_devnet Envirorment, then in the code i am trying to get the provider as:

const chainConfig = getEvmChainConfig(0x5aff, clientId)!;

because 0x5aff is the chain id of saphire testnet

But i am getting this error:

Can you help me to configure the right provider pls

Thank you for providing so many details, Anibal! Here’s a summary of what you shared for our support team:

Issue Summary:

  • SDK: PnP Web SDK (No Modal, Next.js implementation)
  • Chain/Environment: Saphire Devnet (chainId: 0x5aff)
  • Error: Provider error when using getEvmChainConfig(0x5aff, clientId)
  • Web3Auth Dashboard: Project set to sapphire_devnet
  • Resources Provided:
    • Code snippet for chainConfig initialization
    • Screenshots of the configuration and error (not visible to me, but available above)
    • Reference to Web3Auth Quick Start documentation being followed

Next Steps to Troubleshoot

  1. Chain Config Support:
    Please note that not all EVM chains or testnets are natively supported by default in the Web3Auth SDK chain config helpers. The Saphire devnet (0x5aff) may not be included out-of-the-box.

  2. Custom Chain Configuration:
    If getEvmChainConfig(0x5aff, clientId) doesn’t return a valid config, you will likely need to provide a custom chainConfig object manually.

    Here’s an example for adding a custom EVM-compatible chain:

    const chainConfig = {
      chainNamespace: "eip155",
      chainId: "0x5aff", // Saphire Devnet Chain ID
      rpcTarget: "<YOUR_RPC_ENDPOINT>", // Replace with Saphire Devnet RPC URL
      displayName: "Saphire Devnet",
      ticker: "SAP",
      tickerName: "Saphire",
    };
    
    • Replace <YOUR_RPC_ENDPOINT> with the actual Saphire Devnet RPC endpoint.
  3. Web3Auth Initialization:
    Pass this custom chainConfig when initializing Web3Auth.

    const web3auth = new Web3AuthNoModal({
      clientId,
      chainConfig,
    });
    
  4. RPC Endpoint:
    Ensure your RPC endpoint is correct and accessible. A missing or misconfigured RPC provider will result in a provider error.

Reference Docs


Action for You

  • Try defining chainConfig manually as shown above, ensuring you’ve added the correct RPC endpoint for Saphire Devnet.

Let us know:

  • The exact provider error message (if you’d like specific diagnostics).
  • If the manual chainConfig resolves your connection issue.

If you continue experiencing issues, please share:

  • Your Web3Auth initialization code snippet.
  • The full provider error message/text from the browser console.

Thank you for your patience—let us know if this helps or if you need more detailed guidance!

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours

Are you still facing this issue?
The issue is related to incorrect chain config.

all good now i used:

const chainConfig = {
  chainNamespace: ADAPTER_NAMESPACES.EIP155,
  chainId: "0x5aff",
  rpcTarget: "https://testnet.sapphire.oasis.io",
  displayName: "Sapphire Devnet",
  ticker: "SAP",
  tickerName: "Sapphire",
};

const privateKeyProvider = new EthereumPrivateKeyProvider({
  config: { chainConfig },
});

const web3auth = new Web3AuthNoModal({
  clientId,
  web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
  privateKeyProvider,
});

to make it work

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.