@de1/wallet
v0.1.2
Published
A multi-chain wallets manager
Downloads
514
Readme
@de1/wallet
A multi-chain wallet manager that unifies wallet connection, network switching, and signing across EVM and non-EVM ecosystems. Built for dApps that need one integration surface instead of per-wallet glue code.
Highlights
- Unified wallet API — Connect, switch chains, and sign through a shared
BaseWalletinterface, regardless of the underlying provider. - Broad chain coverage — Ethereum and major EVM L2s, plus Solana, Tron, Cosmos / Osmosis, Aptos, Sui, Near, Starknet, Bitcoin, Ontology, Terra, and more.
- 50+ wallet adapters — Browser extensions, mobile wallets, WalletConnect, hardware (Ledger), and domain-based login (Unstoppable Domains).
- One-call connect flow —
tryWalletConnectresolves the wallet, attaches the right chain metadata, and returns a ready-to-use connection. - Chain & wallet registries — Built-in
chainsObj/walletsObjwith RPC URLs, explorers, native currency, and popular tokens for UI and network switching. - EIP-6963 aware — Detects injected EVM providers so multi-wallet browser setups resolve cleanly.
- SID / domain lookup — Optional Space ID name resolution via
getSidName.
Supported ecosystems
| Category | Examples | |----------|----------| | EVM | Ethereum, BSC, Polygon, Arbitrum, Optimism, Base, Avalanche, Fantom, Sonic, Linea, Scroll, zkSync, Blast, Mantle, and many more | | Solana | Solana mainnet | | Cosmos | Cosmos, Osmosis, Injective, Sei | | Move | Aptos, Sui | | Other | Tron, Near, Starknet, Bitcoin, Ontology, Terra, Flow |
Supported wallets
EVM / multi-chain
MetaMask · Rabby · Coinbase Wallet · OKX Wallet · Trust Wallet · TokenPocket · Bitget · Brave · Rainbow · Zerion · Math Wallet · Coin98 · SafePal · imToken · Clover · Ctrl (XDEFI) · Crypto.com · Binance Wallet · Gnosis Safe · Ledger · WalletConnect
Solana
Phantom · Solflare
Aptos
Petra · Martian · Pontem · Fewcha · Rise
Sui
Slush · Suiet · Bifrost
Cosmos
Keplr · Compass
Other
TronLink · Cyano (Ontology) · Terra Station · MyNear / Meteor / Sender · Argent X / Braavos (Starknet) · Unisat / OKX BTC · Unstoppable Domains · ONTO
Core capabilities
| Capability | Description |
|------------|-------------|
| Connect | Request accounts from extension, mobile, WalletConnect, or hardware wallets |
| Switch network | Align the wallet to the target chain using registry metadata (chain ID, RPC, currency) |
| Sign & interact | Expose chain-specific SDKs (e.g. Web3, Solana, Near) on the connected wallet instance |
| Discover | List available wallets and supported chains for connect UI |
| Error codes | Structured EnumErrors for missing wallets, unsupported chains, and user cancellations |
Install
npm install @de1/walletQuick start
import {
tryWalletConnect,
EnumChains,
EnumWalletName,
walletsObj,
chainsObj,
} from '@de1/wallet';
// Connect MetaMask to Ethereum
const { wallet, chain } = await tryWalletConnect({
chainName: EnumChains.ETH,
walletName: EnumWalletName.MetaMask,
});
console.log(wallet.address);
console.log(chain.chainName);
// Browse registries for your connect UI
const wallets = walletsObj.walletList;
const eth = chainsObj.getChainByKey('eth');Package exports
| Export | Purpose |
|--------|---------|
| tryWalletConnect | Connect a wallet to a chain in one call |
| walletsObj / Wallets | Wallet instances and list for UI |
| chainsObj / Chains / Chain | Chain metadata and helpers |
| EnumChains / EnumWalletName | Typed chain and wallet identifiers |
| Individual wallet classes | Direct use when you need a specific adapter (e.g. MetaMask, Phantom) |
| getSidName | Space ID / domain name lookup |
| solanaWeb3 | Re-exported Solana web3 helpers |
License
ISC
