Crate solana_kite

Crate solana_kite 

Source
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
  • Transaction Utilities: Send transactions from instructions with proper signing
  • Token Operations: Create mints, associated token accounts, and mint tokens
  • 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 decimals

Re-exports§

pub use error::SolanaKiteError;
pub use program::deploy_program;
pub use token::create_associated_token_account;
pub use token::create_token_mint;
pub use token::get_token_account_balance;
pub use token::assert_token_balance;
pub use token::mint_tokens_to_account;
pub use transaction::send_transaction_from_instructions;
pub use wallet::create_wallet;
pub use wallet::create_wallets;
pub use pda::get_pda_and_bump;
pub use pda::Seed;

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.
transaction
Transaction utilities for sending Solana transactions.
wallet
Wallet creation and management utilities.

Macros§

seeds
Syntactic sugar for creating seed vectors with automatic type conversion.

Functions§

check_account_is_closed
Verifies that an account is closed (either doesn’t exist or has empty data)