slopwallet
v1.0.0
Published
Encrypted Solana wallet with multisig support - create wallets, send SOL/SPL tokens, and manage Squads multisig vaults
Maintainers
Readme
Solana Local Wallet
A full-featured Solana wallet library with Squads multisig support. Installable via npm — no git clone needed.
Install
npm install slopwalletFeatures
Single-Signature Wallet
- Local keypair generation using
@solana/web3.js - Password-encrypted storage (AES-256-GCM)
- SOL and SPL token transfers
- Balance checking with token name resolution
Multisig Vaults (Squads Protocol)
- Create multisig vaults with configurable thresholds
- Propose SOL transfers requiring multiple approvals
- Approve/reject proposals as a vault member
- Execute approved transactions
- Shareable links for easy collaboration
Quick Start
import {
createWallet,
unlockWallet,
getAddress,
checkStatus,
getKeypair,
} from 'slopwallet'
import { getConnection } from 'slopwallet/rpc'
// Create a new encrypted wallet
const result = await createWallet('My Wallet', 'securepass123')
console.log('Address:', result.address)
// Check balance
const connection = getConnection()
const keypair = await getKeypair('securepass123')
const balance = await connection.getBalance(keypair.publicKey)
console.log('Balance:', balance)Multisig Usage
import { getKeypair } from 'slopwallet'
import { getConnection } from 'slopwallet/rpc'
import {
createMultisigVault,
getAllPermissions,
getVaultShareLink,
} from 'slopwallet/multisig'
import { PublicKey } from '@solana/web3.js'
const connection = getConnection()
const keypair = await getKeypair('securepass123')
const members = [
{ publicKey: keypair.publicKey, permissions: getAllPermissions() },
{ publicKey: new PublicKey('Member2...'), permissions: getAllPermissions() },
]
const { multisigPda, vaultPda } = await createMultisigVault(
connection, keypair, members, 2, 0
)
console.log('Share link:', getVaultShareLink(multisigPda.toBase58()))Environment Configuration
Create a .env file in your project root:
SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEYOr set it programmatically:
import { setRpcUrl } from 'slopwallet/rpc'
setRpcUrl('https://api.devnet.solana.com')Wallet data is stored in wallet-data/ directory in your project root.
Web UI
The web application provides two modes:
Built-in Wallet Mode (/wallet)
- Create and manage a local encrypted wallet
- View balances and transaction history
- Create multisig vaults
- Propose, approve, and execute vault transactions
External Wallet Mode (/connect)
- Connect Phantom, Solflare, or other Solana wallets
- View multisig vaults you're a member of
- Import vaults via share links
- Vote on proposals and create new vaults
CLI Scripts
Wallet Operations
# Create wallet
npm run skill:create -- --name "My Wallet" --password "pass123"
# Get address
npm run skill:address
# Check balance
npm run skill:balance
# Send SOL
npm run skill:send-sol -- --to "Address..." --amount 0.1 --password "pass123"
# Send tokens (by symbol)
npm run skill:send-token -- --mint USDC --to "Address..." --amount 10 --password "pass123"Multisig Operations
# Create 2-of-3 vault
npm run skill:multisig:create -- --members "Addr1,Addr2" --threshold 2 --password "pass123"
# List your vaults
npm run skill:multisig:list
# Import vault from share link
npm run skill:multisig:import -- --link "https://app.com/vault/ABC..."
# Get vault details
npm run skill:multisig:get -- --address "VaultAddress..."
# Create transfer proposal
npm run skill:multisig:propose -- --vault "VaultAddr" --to "Recipient" --amount 0.5 --password "pass123"
# List proposals
npm run skill:multisig:proposals -- --vault "VaultAddr"
# Approve proposal
npm run skill:multisig:approve -- --vault "VaultAddr" --proposal 1 --password "pass123"
# Execute approved proposal
npm run skill:multisig:execute -- --vault "VaultAddr" --proposal 1 --password "pass123"Environment Setup
Create a .env file:
SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEYFor development, you can use:
SOLANA_RPC_URL=https://api.devnet.solana.comProject Structure
src/
├── components/ # React UI components
│ ├── external/ # External wallet components
│ ├── multisig/ # Built-in wallet multisig components
│ ├── BuiltinWalletApp.tsx
│ ├── LandingPage.tsx
│ └── WalletProvider.tsx
├── skill/ # CLI skill scripts
│ ├── multisig/ # Multisig skill scripts
│ ├── wallet.ts # Core wallet functions
│ ├── rpc.ts # RPC connection
│ └── ...
├── utils/ # Shared utilities
│ ├── multisig.ts # Multisig helper functions
│ └── multisigWalletAdapter.ts # External wallet support
└── App.tsx # Route definitionsSecurity Notes
- Single-sig wallet: Password gives full access to funds
- Multisig vaults: Require multiple approvals for transactions
- Never commit
.envfiles orwallet-data/directory - For production: Use multisig for any significant amounts
Skill Documentation
For detailed agent/AI integration, see SKILL.md.
Development
# Run dev server
npm run dev
# Build for production
npm run build
# Build skill scripts
npm run build:skill
# Lint
npm run lintTech Stack
- Frontend: React 19 + TypeScript + Vite
- Styling: CSS (no framework)
- Blockchain: Solana Web3.js
- Multisig: Squads Protocol SDK
- Wallet Adapter: @solana/wallet-adapter-react
License
MIT
