# @tronweb3/tronwallet-adapters

> Wallet adapters to help developers interact with Tron wallets using consistent API.

Latest version **1.3.3** (published 2026-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tronweb3/tronwallet-adapters
pnpm add @tronweb3/tronwallet-adapters
yarn add @tronweb3/tronwallet-adapters
bun add @tronweb3/tronwallet-adapters
```

## Health

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

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

Warnings: low downloads; large bundle.

## Facts

| | |
|---|---|
| Version | 1.3.3 |
| Published | 2026-09-04 |
| First published | 2022-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 24 |
| Unpacked size | 18.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 80 |
| Author | tronweb3 |
| Maintainers | troncore, tronwallet-adapter |
| Keywords | TRON, TronWeb, adapters |

## Links

- npm: https://www.npmjs.com/package/@tronweb3/tronwallet-adapters
- Repository: https://github.com/tronweb3/tronwallet-adapter
- Homepage: https://walletadapter.org
- Issues: https://github.com/tronweb3/tronwallet-adapter/issues
- npm.io page: https://npm.io/package/@tronweb3/tronwallet-adapters

## Dependencies (24)

- [@tronweb3/tronwallet-adapter-bybit](https://npm.io/package/@tronweb3/tronwallet-adapter-bybit.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-trust](https://npm.io/package/@tronweb3/tronwallet-adapter-trust.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-guarda](https://npm.io/package/@tronweb3/tronwallet-adapter-guarda.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-ledger](https://npm.io/package/@tronweb3/tronwallet-adapter-ledger.md) ^1.1.15
- [@tronweb3/tronwallet-adapter-onekey](https://npm.io/package/@tronweb3/tronwallet-adapter-onekey.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-binance](https://npm.io/package/@tronweb3/tronwallet-adapter-binance.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-bitkeep](https://npm.io/package/@tronweb3/tronwallet-adapter-bitkeep.md) ^1.3.0
- [@tronweb3/tronwallet-adapter-imtoken](https://npm.io/package/@tronweb3/tronwallet-adapter-imtoken.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-safepal](https://npm.io/package/@tronweb3/tronwallet-adapter-safepal.md) ^1.0.0
- [@tronweb3/tronwallet-adapter-backpack](https://npm.io/package/@tronweb3/tronwallet-adapter-backpack.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-tronlink](https://npm.io/package/@tronweb3/tronwallet-adapter-tronlink.md) ^1.3.0
- [@tronweb3/tronwallet-adapter-foxwallet](https://npm.io/package/@tronweb3/tronwallet-adapter-foxwallet.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-okxwallet](https://npm.io/package/@tronweb3/tronwallet-adapter-okxwallet.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-trust-evm](https://npm.io/package/@tronweb3/tronwallet-adapter-trust-evm.md) ^1.1.1
- [@tronweb3/tronwallet-adapter-gatewallet](https://npm.io/package/@tronweb3/tronwallet-adapter-gatewallet.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-ledger-evm](https://npm.io/package/@tronweb3/tronwallet-adapter-ledger-evm.md) ^1.0.0
- [@tronweb3/tronwallet-adapter-binance-evm](https://npm.io/package/@tronweb3/tronwallet-adapter-binance-evm.md) ^1.2.2
- [@tronweb3/tronwallet-adapter-tokenpocket](https://npm.io/package/@tronweb3/tronwallet-adapter-tokenpocket.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-metamask-evm](https://npm.io/package/@tronweb3/tronwallet-adapter-metamask-evm.md) ^1.1.1
- [@tronweb3/tronwallet-adapter-tronlink-evm](https://npm.io/package/@tronweb3/tronwallet-adapter-tronlink-evm.md) ^1.2.1
- [@tronweb3/tronwallet-adapter-metamask-tron](https://npm.io/package/@tronweb3/tronwallet-adapter-metamask-tron.md) ^1.2.0
- [@tronweb3/tronwallet-adapter-okxwallet-evm](https://npm.io/package/@tronweb3/tronwallet-adapter-okxwallet-evm.md) ^1.1.1
- [@tronweb3/tronwallet-adapter-walletconnect](https://npm.io/package/@tronweb3/tronwallet-adapter-walletconnect.md) ^3.1.0
- [@tronweb3/tronwallet-adapter-tokenpocket-evm](https://npm.io/package/@tronweb3/tronwallet-adapter-tokenpocket-evm.md) ^1.0.0

## Recent versions

- 1.3.3 (latest) — 2026-09-04
- 1.3.2 — 2026-08-07
- 1.3.1 — 2026-07-10
- 1.3.0 — 2026-06-11
- 1.2.26 — 2026-05-15
- 1.2.25 — 2026-04-23
- 1.2.24 — 2026-04-09
- 1.2.23 — 2026-03-25
- 1.2.22 — 2026-03-11
- 1.2.21 — 2026-02-10
- 1.2.20 — 2026-01-26
- 1.2.19 — 2026-01-16
- 1.2.18 — 2026-01-07
- 1.2.17 — 2025-12-26
- 1.2.16 — 2025-11-19
- … 26 more at https://npm.io/package/@tronweb3/tronwallet-adapters/versions

## README

# @tronweb3/tronwallet-adapters

`@tronweb3/tronwallet-adapters` provides a comprehensive suite of wallet adapters, enabling developers to connect to both **Tron** and **EVM** wallets (such as [TronLink](https://www.tronlink.org/) and [MetaMask](https://metamask.io/)) through a unified and consistent API.

---

## 📦 Installation

This package is a "barrel package" that includes all individual adapters. You can install the entire suite or choose specific adapters to keep your bundle size small.

```bash
# Install the complete suite
npm install @tronweb3/tronwallet-abstract-adapter @tronweb3/tronwallet-adapters

# Or install individual adapters as needed
npm install @tronweb3/tronwallet-abstract-adapter @tronweb3/tronwallet-adapter-tronlink
npm install @tronweb3/tronwallet-abstract-adapter @tronweb3/tronwallet-adapter-walletconnect
```

---

## 🔌 Supported Wallets

We support a wide range of TRON and EVM wallets, including TronLink, MetaMask, WalletConnect, Ledger, and [more](https://walletadapter.org/docs/guide/wallet-reference.html#supported-wallets-by-adapter). Each adapter offers a consistent interface — use the collective `@tronweb3/tronwallet-adapters` package and import individual adapters.

👉 For the complete list of supported wallets and their adapters, visit our [documentation](https://walletadapter.org/docs/guide/wallet-reference.html#supported-wallets-by-adapter).


---

## 🚀 Usage

> **Note**: If you are using TypeScript, ensure `skipLibCheck: true` is set in your `tsconfig.json`.

### React

For React applications, while you can use the adapters directly, we highly recommend using our official **[React Hooks Package](https://github.com/tronweb3/tronwallet-adapter/tree/main/packages/react/react-hooks)** for the best developer experience.

#### Manual Usage (Low-level):

```tsx
import { useMemo, useEffect, useState } from 'react';
import { TronLinkAdapter } from '@tronweb3/tronwallet-adapters';

function WalletInterface() {
    const adapter = useMemo(() => new TronLinkAdapter(), []);
    const [address, setAddress] = useState(adapter.address);

    useEffect(() => {
        const onConnect = (addr: string) => setAddress(addr);
        adapter.on('connect', onConnect);

        return () => {
            adapter.off('connect', onConnect);
            adapter.removeAllListeners();
        };
    }, [adapter]);

    return <button onClick={() => adapter.connect()}>{address ? `Connected: ${address}` : 'Connect TronLink'}</button>;
}
```

### Vue

In Vue 3, the Composition API is the recommended way to initialize and manage the adapter.

```vue
<script setup>
import { onMounted, onBeforeUnmount, ref } from 'vue';
import { TronLinkAdapter } from '@tronweb3/tronwallet-adapters';

const address = ref('');
const adapter = new TronLinkAdapter();

onMounted(() => {
    adapter.on('connect', (addr) => {
        address.value = addr;
    });
});

onBeforeUnmount(() => {
    adapter.removeAllListeners();
});

const connect = () => adapter.connect();
</script>

<template>
    <button @click="connect">
        {{ address || 'Connect Wallet' }}
    </button>
</template>
```

### 🌐 Vanilla JS / CDN

For environments without build tools, use our UMD bundle.

1. **Include the script**:

```html
<!-- peer dependency needed for LedgerAdapter -->
<script type="module">
    import bufferPolyfill from 'https://cdn.jsdelivr.net/npm/buffer-polyfill@6.0.3/+esm';
    window.Buffer = bufferPolyfill;
</script>
<!-- peer dependency needed for WalletConnect -->
<script src="https://cdn.jsdelivr.net/npm/@walletconnect/sign-client/dist/index.umd.js"></script>
<!-- adapters bundle -->
<script src="https://cdn.jsdelivr.net/npm/@tronweb3/tronwallet-adapters/lib/umd/index.js"></script>
```

2. **Initialize**:

```js
const { TronLinkAdapter } = window['@tronweb3/tronwallet-adapters'];
const adapter = new TronLinkAdapter();

adapter.connect().then(() => {
    console.log('Connected to:', adapter.address);
});
```

---

## 🛠️ Configuration

### WalletConnect Support

`WalletConnectAdapter` requires a peer dependency. If you plan to use it, please install:

```bash
npm install @walletconnect/sign-client
```

---

## 📘 Documentation

-   **API Reference**: Detailed class and method documentation is available at [walletadapter.org](https://walletadapter.org/docs/api-reference/adapter.html).
-   **Guide**: Step-by-step integration guides for [React](https://walletadapter.org/docs/guide/react.html), [Vue](https://walletadapter.org/docs/guide/vue.html).
-   **EVM Integration**: Learn how to use MetaMask and other EVM wallets on Tron [here](https://walletadapter.org/docs/guide/evm.html).

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