@layerzerolabs/ui-wallet-solana
v0.2.8
Published
<p align="center"> <a href="https://layerzero.network"> <img alt="LayerZero" style="max-width: 500px" src="https://d3a2dpnnrypp5h.cloudfront.net/bridge-app/lz.png"/> </a> </p>
Downloads
104
Readme
Installation
yarn add @layerzerolabs/ui-wallet-solana
pnpm add @layerzerolabs/ui-wallet-solana
npm install @layerzerolabs/ui-wallet-solana
Usage
This package exports the SolanaWallet
class to connect with Solana compatible wallets adapters.
import {SolanaWallet} from '@layerzerolabs/ui-wallet-solana';
import {
CoinbaseWalletAdapter,
PhantomWalletAdapter,
SolflareWalletAdapter,
} from '@solana/wallet-adapter-wallets';
const wallets: Record<string, Wallet<unknown>> = {};
wallets.phantomWallet = new SolanaWallet('Phantom', new PhantomWalletAdapter());
wallets.coinbaseWalletSolana = new SolanaWallet(
'CoinBase',
new CoinbaseWalletAdapter() as BaseSignerWalletAdapter,
);
wallets.solflareWallet = new SolanaWallet('Solflare', new SolflareWalletAdapter());
walletStore.addWallets(wallets);