Expand description
§Solana Kite
A Rust library that works great with LiteSVM for testing your Solana programs. This crate offers high-level abstractions for common Solana operations like program deployment, transaction sending, token operations, and account management.
§Features
- Program Deployment: Deploy programs to a test environment (from files or bytes)
- Transaction Utilities: Send transactions from instructions with proper signing
- Token Operations: Create mints, associated token accounts, and mint tokens
- Token Extensions Support: Create Token Extensions mints with extensions, transfer hooks, and more
- Account Management: Create wallets, check balances, and manage account state
- PDA Utilities: Generate Program Derived Addresses with type-safe seed handling
§Example
use solana_kite::{create_wallet, create_token_mint};
use litesvm::LiteSVM;
let mut litesvm = LiteSVM::new();
let wallet = create_wallet(&mut litesvm, 1_000_000_000).unwrap(); // 1 SOL
let mint = create_token_mint(&mut litesvm, &wallet, 6, None).unwrap(); // 6 decimalsRe-exports§
pub use error::SolanaKiteError;pub use pda::get_pda_and_bump;pub use pda::Seed;pub use program::deploy_program;pub use program::deploy_program_bytes;pub use token::assert_token_account_balance;pub use token::create_associated_token_account;pub use token::create_token_mint;pub use token::get_token_account_address;pub use token::get_token_account_balance;pub use token::mint_tokens_to_token_account;pub use token_extensions::create_token_extensions_account;pub use token_extensions::create_token_extensions_mint;pub use token_extensions::get_token_extensions_account_address;pub use token_extensions::mint_tokens_to_token_extensions_account;pub use token_extensions::transfer_checked_token_extensions;pub use token_extensions::MintExtension;pub use token_extensions::TokenAccountState;pub use transaction::send_transaction_from_instructions;pub use transfer_hook::build_hook_accounts;pub use transfer_hook::get_hook_accounts_address;pub use transfer_hook::initialize_hook_accounts;pub use transfer_hook::HookAccount;pub use wallet::assert_sol_balance;pub use wallet::check_account_is_closed;pub use wallet::create_wallet;pub use wallet::create_wallets;pub use wallet::get_sol_balance;
Modules§
- error
- Error types for Solana Kite operations.
- pda
- Program Derived Address (PDA) utilities with type-safe seed handling.
- program
- Program deployment utilities for Solana programs.
- token
- Token operations for SPL tokens on Solana.
- token_
extensions - Token Extensions operations for Solana.
- transaction
- Transaction utilities for sending Solana transactions.
- transfer_
hook - Transfer hook helpers for Token Extensions.
- wallet
- Wallet creation and management utilities.
Macros§
- seeds
- Syntactic sugar for creating seed vectors with automatic type conversion.