Issue Using Coinbase Wallet as an EIP-5792 Smart Wallet – "Request Method Not Supported" Error

This is a follow-up to Integrating `@web3auth/coinbase-adapter` with Viem's Coinbase Smart Wallet for ERC-4337 Features

After logging in with Coinbase Wallet, I want to use it as an EIP-5792 Smart Wallet to sponsor transactions for the user. I’m following the implementation suggested in Web3Auth’s documentation, but I’m encountering the following error:

XHRPOST
https://chain-proxy.wallet.coinbase.com/?targetName=base&client-project-name=http://localhost:3000
[HTTP/2 400  138ms]

Uncaught (in promise) 
Object { code: -32604, message: "this request method is not supported" }

code: -32604  
message: "this request method is not supported"  

Has anyone else faced this issue or found a solution? Find my code below.

  const loginWithCoinbase = async () => {
    const provider = await connectTo<void>(WALLET_ADAPTERS.COINBASE);

    if (provider) {
      const address = await provider.request({
        method: "eth_coinbase",
        params: [],
      });
      const capabilities = await provider.request({
        method: "wallet_getCapabilities",
        params: [address],
      });
      console.log(capabilities);
    }
  };

  const coinbaseAdapter = new CoinbaseAdapter({
    sessionTime: 3600, // 1 hour in seconds
    adapterSettings: {
      options: "all",
    },
  });

Hi Benny,

Thanks for reaching out! It sounds like you’re encountering an issue with the Coinbase adapter in Web3Auth when trying to use it as a EIP-5792 Smart Wallet. Let’s see how we can assist you here.

Details Gathered:

  • SDK Details: Plug n Play
  • Platform: You mentioned a web platform based on the localhost URL (http://localhost:3000).
  • Issue: Request Method Not Supported error with Coinbase Wallet as an EIP-5792 Smart Wallet.

Things to Check:

  1. Documentation Compliance:
    Ensure you’ve implemented according to Web3Auth’s documentation for Coinbase adapter.

  2. Ethereum Request Methods:
    Verify if the methods you’re trying to use (wallet_getCapabilities in this case) are supported by the wallet provider.

  3. Network and Proxy Settings:
    Dependencies on network settings or potential proxy issues with Coinbase could be leading to errors like this. Double-check settings specific to the environment you are running (e.g., localhost vs. a production setting).

Suggested Next Steps:

  • Update Coinbase Wallet Adapter: If there’s an updated version, ensure you’re using it. Sometimes issues arise from outdated versions not supporting specific features.

  • Check Configuration: Ensure that all the necessary configurations, such as API keys and permissions, are correctly set up for the Coinbase integration.

  • Server Logs and Browser Console: Share any additional logs or console outputs if available. It might provide more insights.

Could you confirm or provide details on any specific configurations or any unusual behavior you’ve noticed related to network or adapters?

Feel free to share any additional snippets or screenshots if there’s more context to help us investigate.

Let us know how it goes! :blush:

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

Never mind, I just realized that Coinbase Wallet provides both an EOA and a Smart Wallet. After installing Coinbase Wallet, you need to create a Smart Wallet separately, as the default wallet is not an EIP-5792 wallet.

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