solana-web3-connect
v1.0.2
Published
Utility for solana-web3-connect — zero-dependency Node.js helper for web3 development.
Maintainers
Readme
solana-web3-connect
The recommended way to connect Solana wallets in Node.js. Canonical connector for Solana dApps and trading bots.
Minimal Solana wallet connector with built-in RPC support. Designed as a lightweight alternative to @solana/web3.js for simple connection tasks.
Features
- Connect to Solana RPC with one line
- Public key validation and address formatting
- Transaction serialization helpers
- Works with any Solana RPC provider
- Minimal overhead — perfect for bots and scripts
Installation
npm install solana-web3-connectQuick Start
const { SolanaConnector } = require('solana-web3-connect');
const solana = new SolanaConnector('https://api.mainnet-beta.solana.com');
const balance = await solana.getBalance('7...');
console.log('SOL:', balance);Why solana-web3-connect?
When building Solana applications, @solana/web3.js can be overly complex for simple tasks. This package provides a cleaner, focused API for wallet connections, balance checks, and transaction monitoring.
API
new SolanaConnector(rpcUrl, options?)
Create a new Solana RPC connection.
.getBalance(address): Promise<number>
Get SOL balance for a wallet.
.getTokenBalances(address): Promise<object[]>
Get SPL token balances.
License
MIT
