# @taquito/beacon-wallet

> TZIP-10 Beacon wallet integration for Taquito dapps built on the Beacon SDK DAppClient.

Latest version **25.2.0** (published 2026-11-30) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @taquito/beacon-wallet
pnpm add @taquito/beacon-wallet
yarn add @taquito/beacon-wallet
bun add @taquito/beacon-wallet
```

## 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.

## Facts

| | |
|---|---|
| Version | 25.2.0 |
| Published | 2026-11-30 |
| First published | 2020-05-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 7 |
| Unpacked size | 125.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 322 |
| Author | ECAD Labs Inc |
| Maintainers | jevonearth, roxaneletourneau, hui-an.yang, gimbrailo.ecad |
| Keywords | taquito, tezos, typescript, blockchain, wallet, beacon |

## Links

- npm: https://www.npmjs.com/package/@taquito/beacon-wallet
- Repository: https://github.com/ecadlabs/taquito
- Homepage: https://taquito.io/
- Issues: https://github.com/ecadlabs/taquito/issues
- npm.io page: https://npm.io/package/@taquito/beacon-wallet

## Dependencies (7)

- [@types/react](https://npm.io/package/@types/react.md) ^19.3.0
- [@taquito/core](https://npm.io/package/@taquito/core.md) ^25.2.0
- [@types/chrome](https://npm.io/package/@types/chrome.md) 0.1.40
- [@taquito/utils](https://npm.io/package/@taquito/utils.md) ^25.2.0
- [@taquito/taquito](https://npm.io/package/@taquito/taquito.md) ^25.2.0
- [@ecadlabs/beacon-dapp](https://npm.io/package/@ecadlabs/beacon-dapp.md) 4.9.0-ecad
- [@ecadlabs/beacon-types](https://npm.io/package/@ecadlabs/beacon-types.md) 4.9.0-ecad

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 25.2.0 (latest) — 2026-11-30
- 25.2.0-rc1 (next) — 2026-11-25
- 25.2.0-rc0 — 2026-11-20
- 25.1.3 — 2026-11-20
- 25.1.2 — 2026-11-20
- 25.2.0-beta4 — 2026-11-19
- 25.2.0-beta3 — 2026-11-19
- 25.2.0-beta2 — 2026-11-13
- 25.2.0-beta1 — 2026-11-11
- 25.1.1 — 2026-11-10
- 25.2.0-beta0 — 2026-11-01
- 25.1.0 — 2026-10-19
- 25.1.0-rc0 — 2026-10-17
- 25.1.0-beta0 — 2026-10-07
- 25.0.0 — 2026-06-29
- … 228 more at https://npm.io/package/@taquito/beacon-wallet/versions

## README

# Taquito Beacon Wallet package

_Documentation can be found [here](https://taquito.io/docs/wallet_API)_
_TypeDoc style documentation is available [here](https://taquito.io/typedoc/modules/_taquito_beacon_wallet.html)_

## General Information

`@taquito/taquito-beacon-wallet` is an npm package implementing the TZIP-10 standard that describes the communication between decentralized applications and wallets. The package provides developers a way to connect a dapp built with Taquito to a wallet giving the freedom to the users of the dapp to choose the wallet they want.

## Install

Install the package as follows

```
npm install @taquito/beacon-wallet
```

## Usage

Create a wallet instance with defined option parameters and set the wallet provider using `setWalletProvider` to the `TezosToolkit` instance

```ts
import { TezosToolkit } from '@taquito/taquito';
import { BeaconEvent, BeaconWallet } from '@taquito/beacon-wallet';
import { NetworkType } from '@taquito/beacon-wallet/types';

const wallet = new BeaconWallet({
  name: 'MyAwesomeDapp',
  iconUrl: 'https://taquito.io/img/favicon.svg',
  network: { type: NetworkType.SHADOWNET },
});

const unsubscribeAccount = await wallet.subscribeToEvent(
  BeaconEvent.ACTIVE_ACCOUNT_SET,
  async (account) => {
    // An active account has been set or cleared; update the dApp UI
    console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered:`, account);
  },
);
await wallet.requestPermissions();

const Tezos = new TezosToolkit('https://YOUR_PREFERRED_RPC_URL');
Tezos.setWalletProvider(wallet);
```

## Active Wallet Metadata (`getWalletInfo()`)

```ts
import type { WalletInfo } from '@taquito/beacon-wallet';

const info: WalletInfo | undefined = await wallet.getWalletInfo();
if (info) {
  console.log(info.name, info.type, info.icon, info.deeplink);
}
```

`getWalletInfo()` delegates to Beacon's `DAppClient.getActiveWalletInfo()`. It returns the active wallet's resolved `name`, optional `icon` (data URI or extension URL), `deeplink`, and `type` (`'extension' | 'mobile' | 'web' | 'desktop'`), or `undefined` when disconnected. It does not initialize a transport or prompt for permissions.

## Transport & Connection Observability

Query the current transport status and health without blocking on transport initialization, or subscribe to live transitions:

```ts
import {
  BeaconEvent,
  type ConnectionInfo,
  type TransportStatusChangedInfo,
} from '@taquito/beacon-wallet';

const connection: ConnectionInfo = await wallet.getConnectionInfo();
// { transport?: 'postmessage' | 'p2p' | 'walletconnect', status: TransportStatus, health: 'ok' | 'degraded', relayServer?, senderId? }

const unsubscribeStatus = await wallet.subscribeToEvent(
  BeaconEvent.TRANSPORT_STATUS_CHANGED,
  (change: TransportStatusChangedInfo) => {
    if (change.health === 'degraded') {
      console.warn(`Relay degraded (${change.reason}):`, change.relayServer);
    }
  },
);
```

## Request Lifecycle, Acknowledgements & Custom UI

When building a custom request progress UI, you can suppress Beacon's built-in Shadow DOM progress toasts via `uiOptions: { enableToasts: false }` (while keeping the built-in pairing modal and error alerts), track in-flight requests with `wallet.getPendingRequests()`, and correlate lifecycle events by `requestId`:

```ts
import {
  BeaconEvent,
  BeaconWallet,
  isBeaconError,
  TransactionInvalidBeaconError,
  toBeaconError,
} from '@taquito/beacon-wallet';

const wallet = new BeaconWallet({
  name: 'MyAwesomeDapp',
  ackTimeoutMs: 5_000,
  uiOptions: { enableToasts: false },
});

await wallet.subscribeToEvent(BeaconEvent.OPERATION_REQUEST_SENT, (sent) => {
  // sent.dispatchStage is 'transport' (with sent.sentAt) or 'forwarded' (with sent.forwardedAt)
  console.log('Sent request', sent.requestId, 'to', sent.walletInfo.name);
});

await wallet.subscribeToEvent(BeaconEvent.ACKNOWLEDGE_RECEIVED, (ack) => {
  if (ack.correlated) {
    console.log('Wallet acknowledged request', ack.requestId);
  }
});

await wallet.subscribeToEvent(BeaconEvent.WAITING_FOR_WALLET_ACK, (waiting) => {
  console.warn(`Still waiting for wallet ACK (${waiting.elapsedMs}ms) on ${waiting.requestId}`);
});

await wallet.subscribeToEvent(BeaconEvent.LATE_RESPONSE_RECEIVED, (late) => {
  if (late.kind === 'success') {
    console.warn('Wallet responded after local timeout:', late.transactionHash);
  }
});

// Inspect currently open requests synchronously at any point:
const pending = wallet.getPendingRequests();
```

## Typed `BeaconError` Handling & Protocol Message Stream

Request methods (`requestPermissions`, `sendOperations`, `sign`) reject with typed `BeaconError` subclasses (`AbortedBeaconError`, `TransactionInvalidBeaconError`, `PeerUnreachableBeaconError`, etc.):

```ts
try {
  await wallet.sendOperations(operations);
} catch (err) {
  if (isBeaconError(err)) {
    // err.errorOrigin is 'wallet' | 'local'
    console.error(err.errorType, err.errorOrigin, err.title, err.description);
    if (err instanceof TransactionInvalidBeaconError) {
      console.error('RPC errors:', err.rpcErrors);
    }
  }
}

// Note: *_REQUEST_ERROR events emit a plain WireRequestErrorResponse in data.errorResponse
// (where errorType is a string to preserve unfamiliar wallet codes). Narrow with
// isRequestErrorResponse(data.errorResponse) before indexing by BeaconErrorType,
// or pass it to toBeaconError(data.errorResponse) for a typed BeaconError instance.
```

For debugging or telemetry, observe immutable plaintext protocol messages across all transports (including incoming routing `disposition`: `'handled' | 'stale' | 'unknown-request' | 'invalid'`) or configure Beacon's logger without installing `@ecadlabs/beacon-core` directly:

```ts
import {
  setDebugEnabled,
  setLogger,
  type LoggerInterface,
} from '@taquito/beacon-wallet';

setDebugEnabled(true);

const stopMessages = wallet.subscribeToMessages((record) => {
  console.debug(record.direction, record.transport, record.disposition, record.message);
});
```

## Internationalization (i18n) & RTL Layout Support

Beacon includes built-in translations for English (`en`), French (`fr`), Spanish (`es`), German (`de`), Japanese (`ja`), and Arabic (`ar`, with automatic Right-to-Left `rtl` layout across `<beacon-alert>` and `<beacon-toast>` shadow roots), as well as full WCAG/WAI-ARIA keyboard navigation and screen-reader announcements.

By default, `BeaconWallet` automatically detects the user's preferred language from the browser (`navigator.languages` / `navigator.language`, or a non-English `<html lang="...">` attribute, falling back to `'en'`). To pin Beacon's UI and error messages to English regardless of the user's browser language, pass `locale: 'en'` explicitly.

You can override the locale, text direction (`'ltr' | 'rtl' | 'auto'`), and partial translation strings programmatically in constructor options or at runtime:

```ts
import {
  BeaconWallet,
  configureBeaconI18n,
  setBeaconLocale,
} from '@taquito/beacon-wallet';

// 1. Override in constructor options:
const wallet = new BeaconWallet({
  name: 'MyAwesomeDapp',
  locale: 'fr',
  direction: 'auto',
  translations: {
    ui: {
      connectWallet: 'Connecter votre portefeuille Tezos',
    },
  },
});

// 2. Or switch language/direction dynamically at runtime (updates open modals/toasts immediately):
wallet.setLocale('ar'); // switches to Arabic and sets dir="rtl"
wallet.setLocale(undefined); // clears this client's override and reverts to global baseline or detected browser language

// Or via top-level global baseline helpers:
setBeaconLocale('es');
configureBeaconI18n({ locale: 'de', direction: 'ltr' });
```

If you provide custom `translations` for a language not in `builtInLocales` (such as Italian `'it'` or Persian `'fa'`), pass `locale: 'it'` (or `locale: 'fa'`) alongside `translations` so Beacon sets `lang` and `dir` appropriately on its shadow hosts.

## Side-Effect-Free Types (`@taquito/beacon-wallet/types`)

To import Beacon enums, error classes, error guards, or TypeScript types without pulling in `@ecadlabs/beacon-dapp` runtime side effects:

```ts
import {
  BeaconErrorType,
  isBeaconError,
  NetworkType,
  PermissionScope,
  SigningType,
  TransportStatus,
  TransportType,
  type ConnectionInfo,
  type PendingRequestInfo,
  type WalletInfo,
} from '@taquito/beacon-wallet/types';
```

## WalletConnect Project ID

Under the covers, Beacon selects a transport per wallet: browser extensions (such as Temple) communicate locally via `postMessage`, TZIP-10 P2P wallets (such as Kukai web) use Matrix relay nodes (curated by Taquito by default), and WalletConnect-enabled wallets (such as Kukai iOS) use WalletConnect v2. `walletConnectOptions` does not replace Matrix or extension transports.

If your dApp supports WalletConnect connections, register your own `projectId` at [Reown Cloud](https://dashboard.reown.com/), configure your allowed origins list, and pass it in `BeaconWallet` options (in web dApps, typically via a build-time environment variable such as `VITE_*` or `NEXT_PUBLIC_*`):

```ts
const wallet = new BeaconWallet({
  name: 'MyAwesomeDapp',
  walletConnectOptions: {
    projectId: import.meta.env.VITE_REOWN_PROJECT_ID,
  },
});
```

A `projectId` is a public client identifier (not a secret), with access control enforced through your Reown Cloud domain allowlist. Any built-in fallback `projectId` in the underlying Beacon SDK is for demo/testing purposes only; using it in production may put your project in breach of the WalletConnect/Reown Terms of Service, and it will be removed in the next minor release (after which omitting `projectId` will only disable WalletConnect pairings, while extension and Matrix wallets continue to work).

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