# @base-org/account

> Base Account SDK

Latest version **2.5.13** (published 2026-09-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @base-org/account
pnpm add @base-org/account
yarn add @base-org/account
bun add @base-org/account
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; large bundle.

## Facts

| | |
|---|---|
| Version | 2.5.13 |
| Published | 2026-09-24 |
| First published | 2025-07-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 9 |
| Unpacked size | 9.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 172 |
| Author | Base |
| Maintainers | lukasrosario, zencephalon, wilsoncusack, ericliu121187, base-npm |
| Keywords | base, account, sdk, web3 |

## Links

- npm: https://www.npmjs.com/package/@base-org/account
- Repository: https://github.com/base/account-sdk
- Homepage: https://github.com/base/account-sdk#readme
- Issues: https://github.com/base/account-sdk/issues
- npm.io page: https://npm.io/package/@base-org/account

## Dependencies (9)

- [ox](https://npm.io/package/ox.md) 0.6.9
- [clsx](https://npm.io/package/clsx.md) 1.2.1
- [viem](https://npm.io/package/viem.md) ^2.31.7
- [preact](https://npm.io/package/preact.md) 10.24.2
- [zustand](https://npm.io/package/zustand.md) 5.0.3
- [idb-keyval](https://npm.io/package/idb-keyval.md) 6.2.1
- [brotli-wasm](https://npm.io/package/brotli-wasm.md) ^3.0.0
- [eventemitter3](https://npm.io/package/eventemitter3.md) 5.0.1
- [@coinbase/cdp-sdk](https://npm.io/package/@coinbase/cdp-sdk.md) ^1.56.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 2.5.13 (latest) — 2026-09-24
- 2.5.1-canary.20251210211516 (canary) — 2025-12-10
- 2.0.4-payment-link-payment-link (payment-link) — 2025-11-13
- 0.0.0 (placeholder) — 2025-07-16
- 2.5.12 — 2026-09-24
- 2.5.11 — 2026-09-24
- 2.5.10 — 2026-08-12
- 2.5.9 — 2026-08-04
- 2.5.8 — 2026-07-27
- 2.5.7 — 2026-06-26
- 2.5.6 — 2026-05-08
- 2.5.5 — 2026-04-28
- 2.5.4 — 2026-04-15
- 2.5.3 — 2026-03-24
- 2.5.2 — 2026-02-05
- … 28 more at https://npm.io/package/@base-org/account/versions

## README

# Base Account SDK

> **Rebrand:** Base Account is now Coinbase Wallet. The npm package remains `@base-org/account` — it has not been renamed or merged. `@base-org/account` is still the current recommended SDK for connecting to Coinbase Wallet until the next-generation Coinbase Wallet SDK is ready. Existing integrations do not need to migrate.

## Base Account SDK allows dapps to connect to Coinbase Wallet (formerly Base Account)

1. [Coinbase Wallet](https://wallet.coinbase.com)
   - [Docs](https://docs.cdp.coinbase.com/coinbase-wallet/overview)

### Installing Base Account SDK

1. Check available versions:

   ```shell
     # yarn
     yarn info @base-org/account versions

     # npm
     npm view @base-org/account versions
   ```

2. Install latest version:

   ```shell
   # yarn
   yarn add @base-org/account

   # npm
   npm install @base-org/account
   ```

3. Check installed version:

   ```shell
   # yarn
   yarn list @base-org/account

   # npm
   npm list @base-org/account
   ```

### Upgrading Base Account SDK

1. Compare the installed version with the latest:

   ```shell
   # yarn
   yarn outdated @base-org/account

   # npm
   npm outdated @base-org/account
   ```

2. Update to latest:

   ```shell
   # yarn
   yarn upgrade @base-org/account --latest

   # npm
   npm update @base-org/account
   ```

### Basic Usage

1. Initialize Base Account SDK

   ```js
   const sdk = createBaseAccountSDK({
     appName: 'SDK Playground',
   });
   ```

2. Make Base Account Provider

   ```js
   const provider = sdk.getProvider();
   ```

3. Request accounts to initialize a connection to wallet

   ```js
   const addresses = provider.request({
     method: 'eth_requestAccounts',
   });
   ```

4. Make more requests

   ```js
   provider.request('personal_sign', [
     `0x${Buffer.from('test message', 'utf8').toString('hex')}`,
     addresses[0],
   ]);
   ```

5. Handle provider events

   ```js
   provider.on('connect', (info) => {
     setConnect(info);
   });

   provider.on('disconnect', (error) => {
     setDisconnect({ code: error.code, message: error.message });
   });

   provider.on('accountsChanged', (accounts) => {
     setAccountsChanged(accounts);
   });

   provider.on('chainChanged', (chainId) => {
     setChainChanged(chainId);
   });

   provider.on('message', (message) => {
     setMessage(message);
   });
   ```

### Developing locally and running the test dapp

- The Base Account SDK test dapp can be viewed here https://base.github.io/account-sdk/.
- To run it locally follow these steps:

  1. Fork this repo and clone it
  1. From the root dir run `yarn install`
  1. From the root dir run `yarn dev`

## Script Tag Usage

Base Accunt can be used directly in HTML pages via a script tag, without any build tools:

```html
<!-- Via unpkg -->
<script src="https://unpkg.com/@base-org/account/dist/base-account.min.js"></script>

<!-- Via jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/@base-org/account/dist/base-account.min.js"></script>
```

Once loaded, the SDK is available as `window.base` and `window.createBaseAccountSDK`:

```javascript
// Make a payment
const result = await window.base.pay({
  amount: "10.50",
  to: "0xYourAddress...",
  testnet: true
});

// Check payment status
const status = await window.base.getPaymentStatus({
  id: result.id,
  expectedPayment: {
    amount: "10.50",
    recipient: "0xYourAddress..."
  },
  testnet: true
});

// Create Base Account Provider
const provider = window.createBaseAccountSDK().getProvider()
```

For production payment verification, call `getPaymentStatus` on your backend and populate
`expectedPayment` from trusted server-side order data. Omitting it preserves backward compatibility
but does not verify the order amount or recipient. Bind each payment ID to one order and reject IDs
that have already been used for fulfillment.

---
_Source: https://npm.io/package/@base-org/account · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
