# @ecadlabs/beacon-dapp

> Beacon dApp client for connecting Tezos dApps to wallets.

Latest version **4.9.0-ecad** (published 2026-11-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ecadlabs/beacon-dapp
pnpm add @ecadlabs/beacon-dapp
yarn add @ecadlabs/beacon-dapp
bun add @ecadlabs/beacon-dapp
```

## 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 | 4.9.0-ecad |
| Published | 2026-11-30 |
| First published | 2026-03-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 10 |
| Unpacked size | 5.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | ECAD Labs |
| Maintainers | jevonearth, gimbrailo.ecad, hui-an.yang, maxward.ecad |

## Links

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

## Dependencies (10)

- [bs58check](https://npm.io/package/bs58check.md) 4.0.0
- [broadcast-channel](https://npm.io/package/broadcast-channel.md) ^7.4.0
- [@ecadlabs/beacon-ui](https://npm.io/package/@ecadlabs/beacon-ui.md) 4.9.0-ecad
- [@walletconnect/types](https://npm.io/package/@walletconnect/types.md) 2.18.0
- [@ecadlabs/beacon-core](https://npm.io/package/@ecadlabs/beacon-core.md) 4.9.0-ecad
- [@ecadlabs/beacon-types](https://npm.io/package/@ecadlabs/beacon-types.md) 4.9.0-ecad
- [@ecadlabs/beacon-utils](https://npm.io/package/@ecadlabs/beacon-utils.md) 4.9.0-ecad
- [@ecadlabs/beacon-transport-matrix](https://npm.io/package/@ecadlabs/beacon-transport-matrix.md) 4.9.0-ecad
- [@ecadlabs/beacon-transport-postmessage](https://npm.io/package/@ecadlabs/beacon-transport-postmessage.md) 4.9.0-ecad
- [@ecadlabs/beacon-transport-walletconnect](https://npm.io/package/@ecadlabs/beacon-transport-walletconnect.md) 4.9.0-ecad

## Recent versions

- 4.9.0-ecad (latest) — 2026-11-30
- 4.9.0-ecad-rc.1 (beta) — 2026-11-25
- 4.8.1-ecad.4 (ecad) — 2026-04-11
- 4.9.0-ecad-rc.0 — 2026-11-20
- 4.9.0-ecad-beta.6 — 2026-11-19
- 4.9.0-ecad-beta.5 — 2026-11-19
- 4.9.0-ecad-beta.4 — 2026-11-18
- 4.9.0-ecad-beta.3 — 2026-11-13
- 4.9.0-ecad-beta.2 — 2026-11-13
- 4.9.0-ecad-beta.1 — 2026-11-12
- 4.9.0-ecad-beta.0 — 2026-11-11
- 4.8.5-ecad — 2026-11-09
- 4.8.4-ecad — 2026-05-20
- 4.8.4-ecad-beta.1 — 2026-05-17
- 4.8.3-ecad — 2026-04-30
- … 5 more at https://npm.io/package/@ecadlabs/beacon-dapp/versions

## README

# `@ecadlabs/beacon-dapp`

Beacon dApp client for connecting Tezos dApps to wallets.

This is a primary package in the ECAD-maintained Beacon SDK line and may be installed directly.

## Install

```sh
npm install @ecadlabs/beacon-dapp
```
## Package provenance

This package is published from the ECAD-maintained Beacon SDK repository:
[ecadlabs/beacon-sdk-taquito-patches](https://github.com/ecadlabs/beacon-sdk-taquito-patches)

- Original Beacon lineage: [airgap-it/beacon-sdk](https://github.com/airgap-it/beacon-sdk)
- External maintenance line ECAD may selectively import from: [trilitech/octez.connect](https://github.com/trilitech/octez.connect)

## Notes

- ECAD publishes these packages under the neutral `@ecadlabs/beacon-*` scope
- Taquito consumes this package line directly where Beacon patches are needed
- Release notes, package policy, and the current package list live in the repository README

## Restoring persisted dApp sessions

Applications should restore Beacon connection state from the SDK, for example by
calling `client.getActiveAccount()`, instead of relying only on app-local markers
such as `wallet-provider=beacon`.

Treat a missing `beacon:active-account` storage entry as disconnected. Do not use
checks like `localStorage.getItem('beacon:active-account') !== 'undefined'` as a
valid restore guard, because `null` and corrupt stored state are not valid active
accounts.

When Beacon deactivates invalid stored active-account state, it emits
`BeaconEvent.INVALID_ACCOUNT_DEACTIVATED` with this payload:

```ts
{
  reason:
    | 'missing_active_account'
    | 'invalid_active_account_storage'
    | 'storage_validation_failed'
}
```

For backward compatibility, event handler types still allow this event data to
be `undefined`. Beacon's invalid active-account deactivation path emits the
object above; consumers that inspect the reason should handle an absent payload
defensively if they also support direct event emission or older Beacon versions.

Reason meanings:

- `missing_active_account`: `beacon:active-account` pointed at an account
  identifier that was not present in Beacon's persisted account list.
- `invalid_active_account_storage`: Beacon could not read or parse the persisted
  active-account/account storage needed to restore the account.
- `storage_validation_failed`: Beacon restored an active account, but a later
  storage validation pass still found invalid persisted session state.

The default UI intentionally keeps a generic "session expired" message for end
users, while the event payload and debug logs expose the specific restore failure
reason for applications and diagnostics.

## Active wallet metadata

```ts
import type { WalletInfo } from '@ecadlabs/beacon-dapp'

const wallet: WalletInfo | undefined = await client.getActiveWalletInfo()
```

Returns metadata for the active account using its app metadata, matching transport
peer, then the last selected wallet. Known wallet names receive registry details
such as an icon, deep link and wallet type. Returns `undefined` when disconnected
or no wallet name is available, without initiating pairing or waiting for a peer.

Older pairing UI versions stored the wallet key without a display name. These
records remain readable: a missing or blank stored name falls back to the key.
Reading active wallet metadata does not rewrite the saved wallet selection.

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