Coinbase Smart Wallet support in Connect v5.15.0

Joaquim Verges

We just released v5.15.0 of the Typescript Connect SDK, with full support for Coinbase Smart Wallets on Base Sepolia and Base Mainnet.

0:00
/1:48

You can connect to Coinbase Smart Wallets using either:
- the ConnectButton or ConnectEmbed UI components
- the useConnect react hook in your own UI.

Here's an example using the useConnect hook:

const { connect } = useConnect();
const connectCoinbase = async () => {
connect(async () => {
const cb = createWallet("com.coinbase.wallet");
// this will trigger the smart wallet connection flow
await cb.connect({
client,
chain,
});
return cb;
});
};

Once connected, you can use the rest of the connect SDK to perform transactions from the connected Coinbase Smart wallet as you would normally, using useSendTransaction or the TransactionButton component for example.

You can configure the behavior to smart wallet or EOA only passing options to createWallet like so:

const cb = createWallet("com.coinbase.wallet", {
appMetadata: {
// customize your app metadata
name: "my app",
},
walletConfig: {
// options are "eoaOnly" | "smartWalletOnly" | "all" (default)
options: "smartWalletOnly",
},
// the supported chains (only base and base sepolia supported)
chains: [base],
});

Happy building! 🛠