Skip to content

feat: add Base Account SDK connector#2340

Open
youssefea wants to merge 5 commits intoWeb3Auth:masterfrom
youssefea:feat/base-account-connector
Open

feat: add Base Account SDK connector#2340
youssefea wants to merge 5 commits intoWeb3Auth:masterfrom
youssefea:feat/base-account-connector

Conversation

@youssefea
Copy link

@youssefea youssefea commented Jan 20, 2026

Add @base-org/account as an EVM connector for Web3Auth, enabling developers to
use Base Account SDK as a wallet option in modal and no-modal flows.

Changes:

  • New BaseAccountConnector extending BaseEvmConnector with full lifecycle
  • Add BASE_ACCOUNT to WALLET_CONNECTORS and CONNECTOR_NAMES
  • Skip AA wrapping for Base Account (already a smart account provider)
  • Add @base-org/account as optional peer dependency
  • Add Base logo asset and constant for modal UI

Motivation and Context

Enable Web3Auth users to connect via Base Account SDK, which provides a smart
account wallet experience on Base chain. This gives developers another wallet
option alongside existing connectors like Coinbase and MetaMask.

Jira Link: N/A

Description

  • Created BaseAccountConnector class in
    packages/no-modal/src/connectors/base-account-connector/ following the same
    pattern as CoinbaseConnector
  • Connector dynamically imports @base-org/account SDK and exposes its
    EIP-1193 provider
  • Auto-derives appName, appLogoUrl from site metadata and appChainIds
    from configured EIP-155 chains
  • Added guard in noModal.ts to skip AA wrapping for Base Account since it's
    already a smart account provider
  • Added @base-org/account ^2.5.1 as optional peer dependency
  • Added Base logo SVG asset and BASE_ACCOUNT_LOGO constant for modal UI
  • Re-exported connector from @web3auth/modal package

How has this been tested?

  • Lint passes for no-modal package (0 errors, only pre-existing warnings)
  • TypeScript compilation passes for all new connector files (pre-existing TS
    errors in other files unrelated to this PR)
  • Code follows existing connector patterns (CoinbaseConnector,
    MetaMaskConnector)
  • Manual testing pending with demo app on Base mainnet/sepolia

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality
    to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

Low Risk
Demo-only updates to align with upstream Next.js and Wagmi hook API changes; low blast radius beyond sample apps.

Overview
Updates the nextjs-ssr-app demo to match newer Next.js/Wagmi APIs.

RootLayout is now async and awaits headers() when deriving web3authInitialState from cookies, and the demo’s Wagmi usage is migrated to the newer hook return shapes (useConnection, useChains, mutate/mutateAsync for useSwitchChain, useSignMessage, useSignTypedData). Adds an ESLint flat config (eslint.config.mjs) and updates next-env.d.ts to include generated route types.

Written by Cursor Bugbot for commit 703b279. This will update automatically on new commits. Configure here.

Add @base-org/account as an EVM connector for Web3Auth, enabling developers
to use Base Account SDK as a wallet option in modal and no-modal flows.

Changes:
- New BaseAccountConnector extending BaseEvmConnector with full lifecycle
- Add BASE_ACCOUNT to WALLET_CONNECTORS and CONNECTOR_NAMES
- Skip AA wrapping for Base Account (already a smart account provider)
- Add @base-org/account as optional peer dependency
- Add Base logo asset and constant for modal UI

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 20, 2026

@youssefea is attempting to deploy a commit to the Consensys Team on Vercel.

A member of the Team first needs to authorize it.

"require": "./dist/lib.cjs/vue/wagmi/index.js",
"types": "./dist/lib.cjs/types/vue/wagmi/index.d.ts"
},
"./connectors/base-account-connector": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to follow our conventions, pls re-export from modal package as well
You also need to add this as a path in rollup config to become an export

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@chaitanyapotti chaitanyapotti changed the base branch from master to v10 February 2, 2026 11:37
@chaitanyapotti chaitanyapotti deleted the branch Web3Auth:master February 3, 2026 11:17
@yashovardhan yashovardhan reopened this Feb 4, 2026
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="20" cy="20" r="20" fill="#0052FF"/>
<path d="M19.9756 34.1667C27.8002 34.1667 34.1424 27.8246 34.1424 20C34.1424 12.1755 27.8002 5.83337 19.9756 5.83337C12.5597 5.83337 6.47236 11.5399 5.87109 18.7917H25.3588V21.2084H5.87109C6.47236 28.4602 12.5597 34.1667 19.9756 34.1667Z" fill="white"/>
</svg>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused SVG asset file not referenced anywhere

Low Severity

The base-logo.svg file is added to the assets directory but is not imported or referenced anywhere in the codebase. The BASE_ACCOUNT_LOGO constant uses a URL (https://images.web3auth.io/login-base-account.svg) rather than this local asset file.

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.


export default defineConfig([globalIgnores(["**/*.config.js"]), {
extends: [...nextCoreWebVitals],
}]); No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flat eslint config spreads non-iterable

Medium Severity

eslint.config.mjs uses extends: [...nextCoreWebVitals], but eslint-config-next/core-web-vitals is not guaranteed to be an array/iterable in flat config form. If it’s an object/string config, spreading throws at load time and breaks eslint execution for the demo.

Fix in Cursor Fix in Web

@youssefea
Copy link
Author

@chaitanyapotti @yashovardhan The Base logo is missing from the CDN

Can you please upload it to the proper link by choosing the appropriate logo: https://www.base.org/base-brand.zip

Probably a simple square makes the most sense here (see Privy as an example)

@yashovardhan yashovardhan changed the base branch from v10 to master February 25, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants