sugar-money

Crates.iosugar-money
lib.rssugar-money
version0.1.38
created_at2025-07-18 21:36:07.176849+00
updated_at2025-09-23 09:52:58.049585+00
descriptionOfficial Rust SDK for SugarMoney Protocol - Solana trading and DeFi interactions
homepagehttps://sugar.money
repositoryhttps://github.com/Sugar-Money/sdk
max_upload_size
id1759707
size650,664
(maximnok)

documentation

https://docs.rs/sugar-money

README

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.

Commit count: 0

cargo fmt