sugar-money 0.1.38

Official Rust SDK for SugarMoney Protocol - Solana trading and DeFi interactions
Documentation

Sugar Money — Rust SDK

Lightweight Rust toolkit for building on Sugar Money: typed HTTP API client, on-chain instruction builders/quoters, and a slim Raydium CP-Swap compatibility layer — all in one workspace.


Documentation


Modules

  • api/ — Async client for the Sugar Money REST/WebSocket API.

  • program/ — High-level Solana client for the SugarMoney and pSOL Anchor programs.

  • raydium_cp_swap/ — Vendored raydium-cp-swap components adapted for off-chain use.

    • States (AmmConfig, PoolState), curve math (CurveCalculator), Raydium-compatible swap accounts/args.
    • No on-chain handlers; used for local quotes and building swap instructions.
    • Licensed under Apache-2.0 with attribution (see LICENSE and NOTICE).

Quick Pointers

  • Install: see each module’s guide for Cargo.toml snippets and examples.
  • Auth: API uses cookie-based auth (sign-in with wallet).
  • Quotes: Program client provides exact-in/out quoting + slippage helpers.
  • Raydium: use raydium_cp_swap::{accounts, instruction} for swap Ixs; raydium_cp_swap::curve for local math.

License & Notices

This repository includes code derived from raydium-cp-swap under Apache-2.0.
See LICENSE and NOTICE for details and a summary of modifications.