Expand description
Quote math primitives. Mirrors @pump-fun/pump-sdk-internal (bonding
curve) and @pump-fun/pump-swap-sdk (AMM) so Rust callers can compute
quotes locally without round-tripping through JS or the chain.
All arithmetic uses u128 intermediates; reserves and amounts are u64
at the API boundary but their products do not fit in u64.
Re-exports§
pub use bonding_curve::TOKEN_SUPPLY;
Modules§
- amm
- AMM (pump-swap) quoting. Ports
buyQuoteInput,buyBaseInput, andsellBaseInputfrom@pump-fun/pump-swap-sdk/src/sdk/{buy,sell}.ts. - bonding_
curve - Bonding-curve quoting. Ports
getBuyTokenAmountFromSolAmount,getBuySolAmountFromTokenAmount, andgetSellSolAmountFromTokenAmountfrom@pump-fun/pump-sdk-internal/src/bondingCurve.ts. - fees
- Fee math shared by the bonding-curve and AMM quote paths.
- utils
- Generic numeric helpers shared by the quote builders. Pure functions — no domain types, no I/O.
Enums§
- Quote
Error - Reasons a quote computation can fail. Returned in place of a panic for any case where the inputs are inconsistent with a well-formed pool or trade — empty reserves, oversized requests, or fee configurations whose total bps would consume the entire trade.