Skip to content

Latest commit

 

History

History
141 lines (95 loc) · 7.33 KB

File metadata and controls

141 lines (95 loc) · 7.33 KB

TronWallet Adapter

Network npm version downloads license last commit

tronwallet-adapter is a powerful Monorepo providing a high-quality suite of wallet adapters and UI components for the TRON ecosystem. It enables developers to integrate multiple wallets (both TRON native and EVM compatible) with a unified, modern API.


✨ Key Features

  • Unified API: Maintain a single codebase to support 15+ different wallets.
  • Out-of-the-Box Components: Ready-to-use modals and buttons for React and Vue.
  • Developer Friendly: Fully typed with TypeScript, including detailed error handling and state management.

📚 Documentation & Resources


🧭 Which Package Should I Use?

Decide based on your framework and the level of UI control you need:

Framework Quickest Integration (UI + Logic) Custom UI (Hooks / Logic Only) Core Only (Vanilla JS)
React @tronweb3/tronwallet-adapter-react-ui @tronweb3/tronwallet-adapter-react-hooks
Vue @tronweb3/tronwallet-adapter-vue-ui @tronweb3/tronwallet-adapter-vue-hooks
Vanilla JS @tronweb3/tronwallet-adapters

🔌 Supported Wallets

Each adapter offers a consistent interface. You can use this collective package or import individual ones.

Wallet NPM Package Description Source
All-in-One @tronweb3/tronwallet-adapters Includes all adapters below View
TronLink @tronweb3/tronwallet-adapter-tronlink Adapter for TronLink View
WalletConnect @tronweb3/tronwallet-adapter-walletconnect Adapter for WalletConnect View
Ledger @tronweb3/tronwallet-adapter-ledger Hardware wallet support View
MetaMask EVM @tronweb3/tronwallet-adapter-metamask-evm Native EVM support View

ℹ️ For the full list of supported wallets, visit our documentation.

Note: In case wallet developers intend to release breaking changes, you can open an issue here to inform us, thus enabling us to update the new protocols accordingly.

Add support for new wallet

Follow these steps to support new wallets:

  1. List your wallet to Tron Wallet .
  2. Open an issue in this repository or fork the repository and implement the according adapter.

Wallet Integration Standards

Wallets are encouraged to implement the following TRON interface standards to ensure compatibility with the TronWallet Adapter and the broader TRON dApp ecosystem:

  • TIP-1193 – Defines a standard TRON provider interface for dApps to communicate with wallets.

By following these standards, wallets can be seamlessly integrated into modern TRON dApps using unified APIs and adapters.


🛠 Project Structure

This repository is managed using pnpm workspaces:

tronwallet-adapter
├── packages
│   ├── adapters
│   │   ├── abstract-adapter  # Core interface definitions
│   │   ├── adapters          # Barrel package for all adapters
│   │   └── [specific-wallet] # Individual wallet implementations
│   ├── react
│   │   ├── react-hooks       # State management for React
│   │   └── react-ui          # Pre-built React components
│   └── vue
│       ├── vue-hooks         # State management for Vue
│       └── vue-ui            # Pre-built Vue components
├── demos                     # Example applications (Next.js, Vite, CDN)
└── docs                      # Detailed manual and API docs

🚀 Development & Contributing

We welcome contributions! To get started with the codebase:

Prerequisites

  • Node.js: 20.18.0
  • pnpm: 9.6.0

Local Setup

# 1. Clone the repo
git clone https://github.com/tronweb3/tronwallet-adapter.git

# 2. Install dependencies
pnpm install

# 3. Build all packages
pnpm build

# 4. Start the development demo
pnpm example  # Runs our pre-built React/Vite example

Commands

  • pnpm watch: Rebuild packages automatically on change.
  • pnpm lint: Run ESLint across all workspaces.
  • pnpm test: Run unit tests.
  • pnpm update-version: Update package versions for release.

📄 License

MIT