0.0.1-alpha.16 • Published 1 year ago
@xlabs-libs/wallet-aggregator-solana v0.0.1-alpha.16
Wallet Aggregator - Solana
Implements the base abstractions for the Solana blockchain.
The package leverages on @solana/wallet-adapter-base
, which already provides an abstraction over wallets from the solana ecosystem. The SolanaWallet
class functions as a wrapper over it.
Usage
import {
PhantomWalletAdapter,
SolflareWalletAdapter,
} from "@solana/wallet-adapter-wallets";
import { clusterApiUrl } from "@solana/web3.js";
import {
getSolanaStandardWallets,
SolanaWallet,
} from "@xlabs-libs/wallet-aggregator-solana";
const cluster = "mainnet";
const url = clusterApiUrl("mainnet-beta");
const connection = new Connection(url);
const martian = new SolanaWallet(new PhantomWalletAdapter(), connection);
// get those wallets that support the wallet standard
const standardWallets = getSolanaStandardWallets(connection);
// create wallets using the adapters
const adapterWallets = [
new PhantomWalletAdapter(),
new SolflareWalletAdapter(),
].map((adapter) => new SolanaWallet(adapter, connection));
const solanaWallets: SolanaWallet[] = [...standardWallets, ...adapters];
0.0.1-alpha.16
1 year ago
0.0.1-alpha.15
1 year ago
0.0.1-alpha.14
1 year ago
0.0.1-alpha.12
2 years ago
0.0.1-alpha.13
2 years ago
0.0.1-alpha.11
2 years ago
0.0.1-alpha.10
2 years ago
0.0.1-alpha.9
2 years ago
0.0.1-alpha.8
2 years ago
0.0.1-alpha.7
2 years ago
0.0.1-alpha.6
2 years ago
0.0.1-alpha.5
2 years ago
0.0.1-alpha.4
2 years ago
0.0.1-alpha.3
2 years ago
0.0.1-alpha.2
2 years ago
0.0.1-alpha.1
2 years ago
0.0.1-alpha
2 years ago