Skip to main content

Setup

Prerequisites

To get started with Embedded Wallets, you need the following:

  • Node 18+
  • A CDP API key.
  • A webapp, targeting modern browsers (either mobile or desktop).

Installation

Our SDK is distributed via NPM. If you're using React, we provide additional bindings to make it easier to manage wallets.

Frontend

npm install @coinbase/waas-sdk-web @coinbase-waas-sdk-web-react @coinbase/waas-sdk-viem

Configuration

Get your project ID from the Coinbase Developer Platform, or the projectId field of the API key you previously created.

info

The SDK does not support React strict mode. Disable strict mode in your application before beginning.

Wrap your application's root component in the WalletProvider.

// 1. Wrap your application with the WalletProvider component.
import {WalletProvider} from '@coinbase/waas-sdk-web-react';

// ...

return (
<WalletProvider
collectAndReportMetrics
enableHostedBackups
projectId={"<TODO: Insert `projectID` for this project>"}
prod={false}
>
<App /> {/* Your app component */}
</WalletProvider>
);

Was this helpful?