Skip to main content

Crate wp_solana_core

Crate wp_solana_core 

Source
Expand description

wp-solana-core — cross-protocol shared crate for waterpump-solana.

Contains shared code that every protocol SDK (Raydium, Meteora, Orca) needs:

  • token/ — token account planning types, state types, transfer-fee helper
  • metadatadecode_mint_info / read_mint_decimals mint-account byte-decoders shared by every protocol fetch layer
  • plan_errorPlanError, FetchError, OrchestrateError (FCIS error types)
  • constants — Solana system program addresses (protocol-agnostic)

§Layering note

Core exposes synchronous compatibility helpers and shared error/types. Token account state/planning primitives are re-exported from solana-token-toolkit.

Re-exports§

pub use metadata::decode_mint_info;
pub use metadata::read_mint_decimals;
pub use plan_error::FetchError;
pub use plan_error::OrchestrateError;
pub use plan_error::PlanError;
pub use token::account_planner::TokenAccountInstructions;
pub use token::account_planner::TokenAccountStrategy;
pub use token::get_current_transfer_fee;

Modules§

constants
Protocol-agnostic Solana system program constants.
metadata
Mint-account decoding helpers shared by every protocol’s fetch layer.
plan_error
Error types for the plan / fetch / orchestrate layering.
token
Token account utilities for waterpump-solana core.

Structs§

MintAndAta
Per-mint state: the mint account itself, the ATA address, and the ATA account if it currently exists on chain.
TokenAccountState
On-chain state for an owner’s token accounts across a set of mints.