Documentation Index
Fetch the complete documentation index at: https://docs.hadron.fi/llms.txt
Install
solana-sdk for Pubkey and Instruction types.
Initializing a Pool
Initialising a Hadron pool gives you your own propAMM instance.Two transactions required
With default parameters the CurvePrefabs account is ~15 KB. Two allocate instructions are returned because Solana’s single-instruction realloc limit is 10 KB. Send the allocates first in one transaction, then send the initialize instruction.
Returns
(Vec<Instruction>, Pubkey, u64) — instructions, pool address, seed
Loading an Existing Pool
The Rust SDK is sync-first — you provide raw account data and it decodes everything locally. No async required.RPC convenience loader
Enable therpcfeature for a one-liner:cargo add hadron-sdk-v2 --features rpc
Then call Hadron::load(&rpc_client, &pool_address) which fetches all accounts automatically.
setPoolState
Pools are initialised by default asRejectSwaps. This lets you deposit funds before the pool is indexed by aggregators.
.png?fit=max&auto=format&n=pH37fL0GL14scVCH&q=85&s=5749b485c8c5b2386a4cca404e97d6be)