Quickstart
Install packages
Install the following packages:
# install basic packages in your frontend.
npm i @coinbase/waas-sdk-web @coinbase/waas-sdk-viem viem
# if using react, install our react package.
npm i @coinbase/waas-sdk-web-react
Integrate the WalletProvider
- Wrap your root app component in
WalletProvider
and configure it with your project ID. - Disable StrictMode if you're using it.
//////////////// [frontend] main.tsx - 1. wrap your app in the WalletProvider
import { WalletProvider } from "@coinbase/waas-sdk-web-react";
const PROJECT_ID = process.env.PROJECT_ID; // pass your project ID in using your env var setup.
const TopLevelComponent = () => {
return (
<WalletProvider projectId={PROJECT_ID} verbose collectAndReportMetrics enableHostedBackups>
<App />
</WalletProvider>
);
};