@bit-buccaneers/wallet-abstraction
v0.0.22
Published
Solid.js web3 wallet abstraction for EVM and Solana
Maintainers
Readme
wallet-abstraction
Solid.js web3 wallet abstraction for EVM and Solana.
Features
- 🔗 Multi-chain — EVM (Ethereum, Polygon, etc.) and Solana support
- 📱 Mobile-first — WalletConnect, deeplinks, in-app browsers
- 🎯 Unified API — Single interface for all wallets
- ⚡ Solid.js — Reactive, fine-grained updates
Supported Wallets
- MetaMask
- Phantom
- Trust Wallet
- Binance Web3 Wallet
- Solflare
- Any WalletConnect-compatible wallet
Installation
npm i wallet-abstraction
# or
yarn add wallet-abstraction
# or
pnpm add wallet-abstractionQuick Start
import { WalletProvider, useWallet } from 'wallet-abstraction'
function App() {
return (
<WalletProvider
walletConnect={{
projectId: 'YOUR_WALLETCONNECT_PROJECT_ID',
metadata: {
name: 'My App',
description: 'My App Description',
url: window.location.origin,
icons: ['https://my-app.com/icon.png'],
},
}}
>
<WalletButtons />
</WalletProvider>
)
}
function WalletButtons() {
const { groupedWallets, connectEvm, connectSolana, evmConnection, solanaConnection } = useWallet()
return (
<div>
<For each={groupedWallets()}>
{wallet => (
<button onClick={() => wallet.evm && connectEvm(wallet.evm)}>
{wallet.name}
</button>
)}
</For>
<Show when={evmConnection()}>
<p>EVM: {evmConnection()?.address}</p>
</Show>
<Show when={solanaConnection()}>
<p>Solana: {solanaConnection()?.address}</p>
</Show>
</div>
)
}License
MIT © Bit Buccaneers
