@reactmore/crypto-wallet-sdk
v1.3.1
Published
Multi-chain crypto wallet SDK for EVM, Bitcoin, Solana, and more
Readme
Crypto Wallet SDK
A multi-chain crypto wallet SDK focused on EVM first. This SDK is designed for building bots, services, and backends that can generate wallets, check balances, send transactions, estimate gas, and interact with smart contracts.
⚠️ This project is under active development. APIs may change.
✨ Features
- 🔐 Generate wallets (mnemonic / private key)
- 💰 Get balance (native coin & token)
- 🔁 Transfer native coin or token
- 🧾 Send transaction
- ⛽ Gas estimation (Legacy & EIP-1559)
- 📜 Smart contract call (read & write)
- 🔍 Get transaction & receipt
- 🧱 Modular architecture (ready for multi-chain)
⛓️ Supported Chains
| Chain | Network Type | Status | Notes | |-------------|--------------|---------------|-------------------------------| | Ethereum | EVM | ✅ Supported | Mainnet, Sepolia, etc | | BSC | EVM | ✅ Supported | Compatible with EVM adapter | | Arbitrum | EVM | 🟡 Tested | Compatible with EVM adapter | | Optimism | EVM | 🟡 Tested | Compatible with EVM adapter | | Base | EVM | 🟡 Tested | Compatible with EVM adapter | | Polygon | EVM | 🟡 Tested | Compatible with EVM adapter | | Solana | Non-EVM | 🟡 Planned | Separate adapter | | Bitcoin | Non-EVM | 🟡 Planned | Separate adapter | | Tron | Non-EVM | 🟡 Planned | Separate adapter | | Doge / LTC | Non-EVM | 🟡 Planned | UTXO-based chains |
Legend:
- ✅ Supported = Already implemented / usable
- 🟡 Planned = In roadmap
- 🔴 Not supported = Not in scope (yet)
📦 Installation
npm installor if published later:
npm i @reactmore/crypto-wallet-sdk🚀 Quick Start
import { CryptoClientSdk } from "@reactmore/crypto-wallet-sdk";
const client = new CryptoClientSdk({
network: "EVM",
chainId: "11155111", // Sepolia
rpcUrl: "https://ethereum-sepolia-rpc.publicnode.com",
});
const wallet = client.getWallet();🔐 Generate Wallet
const res = await wallet.generateWallet({});
console.log(res);
// { address, publicKey, privateKey }💰 Get Balance
Native Coin
const res = await wallet.getBalance({
address: "0xYourAddressHere",
});
console.log(res);ERC20 Token
const res = await wallet.getBalance({
address: "0xYourAddressHere",
contractAddress: "0xTokenContractAddress",
});
console.log(res);🔁 Transfer (Native / ERC20)
Native Transfer
const res = await wallet.transfer({
recipientAddress: "0xRecipient",
privateKey: "0xYourPrivateKey",
amount: 0.01,
});
console.log(res);With Custom Memo (data)
const res = await wallet.transfer({
recipientAddress: "0xRecipient",
privateKey: "0xYourPrivateKey",
amount: 0.005,
gasPrice: "20", // gwei (legacy example)
data: "Payment for services",
});
console.log(res);ERC20 Transfer
const res = await wallet.transfer({
recipientAddress: "0xRecipient",
privateKey: "0xYourPrivateKey",
amount: 10,
contractAddress: "0xTokenContract",
});
console.log(res);⛽ Estimate Gas
const res = await wallet.estimateGas({
recipientAddress: "0xRecipient",
amount: "0.01",
data: "optional memo",
});
console.log(res);Supports:
- Legacy gas model
- EIP-1559 (maxFeePerGas & maxPriorityFeePerGas)
📜 Smart Contract Call
Read
const res = await wallet.smartContractCall({
rpcUrl: "https://ethereum-sepolia-rpc.publicnode.com",
contractAddress: "0xContract",
method: "balanceOf",
methodType: "read",
params: ["0xAddress"],
contractAbi: [...],
});
console.log(res);Write
const res = await wallet.smartContractCall({
rpcUrl: "https://ethereum-sepolia-rpc.publicnode.com",
contractAddress: "0xContract",
method: "transfer",
methodType: "write",
params: ["0xTo", "1000000"],
contractAbi: [...],
privateKey: "0xYourPrivateKey",
});
console.log(res);🔍 Get Transaction
const res = await wallet.getTransaction({
hash: "0xTxHash",
withReceipt: true,
});
console.log(res);
// {
// transaction,
// receipt,
// memo
// }If the transaction contains data, memo will be automatically decoded (UTF-8).
🧩 Architecture
BaseWallet→ Common wallet interfaceEvmWallet→ EVM implementation (Ethereum, BSC, Arbitrum, etc)utils→ Unit conversion (parseEther, formatEther, parseGwei, etc)- Future chains will live in their own adapters:
SolanaWalletBitcoinWalletTronWallet- etc.
🛣️ Roadmap
- [ ] EVM: Event listener / incoming transfer watcher
- [ ] EVM: Token transfer history helper
- [ ] Solana adapter
- [ ] Bitcoin adapter (UTXO)
- [ ] Webhook / hook integration
- [ ] Better typings & docs
⚠️ Disclaimer
This SDK does NOT manage private key security for you.
You are responsible for:
- Storing private keys securely
- Managing RPC reliability
- Handling reorgs, retries, and confirmations
Use at your own risk in production.
📄 License
MIT
