Guides
DocumentationLog In

Injected Solana provider

Detecting the provider

Coinbase Wallet injects a Solana provider into the top-level window of web applications.
The provider can be used to read on-chain data, establish connections to user accounts, sign messages, and send transactions.

You can access this provider at window.coinbaseSolana.

const getProvider = () => {
  if ('coinbaseSolana' in window) {
    return window.coinbaseSolana;
  }
  // Redirect user if Coinbase Wallet isn’t installed
  window.open('https://www.coinbase.com/wallet', '_blank');
};

📘

Note: If a user does have Coinbase Wallet installed and no provider is found, we recommend redirecting the user to download Coinbase Wallet.


What’s Next