What is solana-pipkit?
solana-pipkit is a Rust utility crate designed to streamline common tasks in Solana program and client development. It focuses on ergonomics, safety, and reusable patterns for production-grade Solana workflows.
Installation
Or add to your Cargo.toml:
[]
= "1.2.0"
High-level features
-
Rent Recovery Efficiently reclaim lamports from dormant or empty accounts
-
SPL Token Helpers Simplified helpers for burning, transferring, and closing token accounts
-
PDA Management Utilities for derivation, seeding, and validation (including Metaplex metadata PDAs)
-
Account Utilities Common validation patterns and deserialization helpers
-
Anchor Reusables Macros and shared structures for cleaner, more maintainable Anchor programs
-
Safety Protocol Client-side validation to prevent costly transaction mistakes
Safety Features
Crypto losses from typos and decimal errors are preventable. The safety module catches mistakes before they hit the chain.
use *;
let protocol = new
.token_price // $100/SOL for USD calculations
.large_amount_threshold;
let report = protocol.validate_offline;
if !report.approved
if report.requires_confirmation
What it prevents:
- Address typos (invalid base58, wrong length)
- Sending to yourself accidentally
- Draining entire balance (>90% warning)
- Decimal/magnitude errors (1000 vs 1.000)
- Large transfers without confirmation (>$1000 USD)
Risk levels: Low | Medium | High | Critical
See examples/full_safety_demo.rs for complete usage.
Quick Example
Reclaiming rent from empty accounts:
use RentCleaner;
use ;
async
More examples are available in the examples/ directory.
Project Status
Early-stage utility crate - APIs may evolve and breaking changes can occur as the toolkit matures.
Fast chains deserve safe, expressive tooling. solana-pipkit exists to remove boilerplate, reduce footguns, and let you focus on protocol logic.
Contributing
Contributions are welcome and appreciated.
- Open an issue for bugs, ideas, or discussion
- Submit a PR for improvements or new helpers
- Keep APIs ergonomic, composable, and Solana-native
License
This project is licensed under the MIT License.