| Crates.io | yieldin-cli |
| lib.rs | yieldin-cli |
| version | 0.2.0 |
| created_at | 2025-12-06 21:20:07.602932+00 |
| updated_at | 2025-12-07 17:01:35.298194+00 |
| description | CLI client for interacting with Yieldin Protocol - a unified liquidity pool on Solana with enhanced security |
| homepage | https://github.com/atlantictechguy/yieldin |
| repository | https://github.com/atlantictechguy/yieldin |
| max_upload_size | |
| id | 1970774 |
| size | 368,909 |
Command-line interface for interacting with the Yieldin Protocol - a unified liquidity pool on Solana.
cd cli
cargo build --release
The binary will be at target/release/yieldin.
You can add it to your PATH:
sudo cp target/release/yieldin /usr/local/bin/
yieldin init --rpc-url https://api.mainnet-beta.solana.com --wallet ~/.config/solana/id.json
This creates a config file at ~/.config/yieldin/config.toml with your settings.
yieldin info
View detailed pool statistics:
yieldin info --detailed
Deposit tokens into the pool and receive LP tokens:
yieldin deposit --token <TOKEN_MINT> --amount 100 --min-lp 99
Example with full token address:
yieldin deposit --token 9QFCh8z1s6u4zm959wyBvW8VtNcZGfEHnRzYub33bonk --amount 10
Burn LP tokens and receive underlying tokens:
yieldin withdraw --amount 100 --token <TOKEN_MINT> --min-out 99
Example:
yieldin withdraw --token 9QFCh8z1s6u4zm959wyBvW8VtNcZGfEHnRzYub33bonk --amount 1
Exchange one token for another through the pool (two transactions: deposit + withdraw):
yieldin swap --from <FROM_MINT> --to <TO_MINT> --amount 100 --min-out 98
Example:
yieldin swap \
--from 9QFCh8z1s6u4zm959wyBvW8VtNcZGfEHnRzYub33bonk \
--to 8jFvTLps7uBigKoXMH8FVRDmSvetGvB5ivUVzphBBAGS \
--amount 10
Note: Swap executes as two transactions (deposit → withdraw) and applies fees on both operations.
The following "magic" commands are planned for future releases:
Intelligent swap routing with Jupiter integration for best execution across all Solana DEXs.
Simplified deposit with automatic calculations and preview confirmation.
Optimized withdrawal with best execution and proportional distribution options.
Default: ~/.config/yieldin/config.toml
Override with --config flag:
yieldin --config /path/to/config.toml info
rpc_url = "https://api.mainnet-beta.solana.com"
wallet_path = "/home/user/.config/solana/id.json"
program_id = "8DVcjWUSBobmb4b3wdEksb9jwoxfUC55nzkky3u8s4qW"
pool_state = "6k3KnkaRUwdxEGr165CFVMEeAL2eWsoyGoqKWepX8KWV"
Override config values with CLI flags:
yieldin --rpc-url https://api.devnet.solana.com --wallet /path/to/wallet.json info
yieldin --rpc-url https://your-private-rpc.com swap --from <FROM> --to <TO> --amount 100
yieldin --wallet /path/to/other-wallet.json deposit --token <MINT> --amount 50
Enable debug logs for troubleshooting:
yieldin --verbose magic-swap --from <FROM> --to <TO> --amount 100
Check your balance and pool info:
yieldin info --detailed
Deposit tokens into the pool:
yieldin deposit --token 9QFCh8z1s6u4zm959wyBvW8VtNcZGfEHnRzYub33bonk --amount 10
Swap between registered tokens:
yieldin swap \
--from 9QFCh8z1s6u4zm959wyBvW8VtNcZGfEHnRzYub33bonk \
--to 8jFvTLps7uBigKoXMH8FVRDmSvetGvB5ivUVzphBBAGS \
--amount 5 \
--min-out 0
Withdraw LP tokens:
yieldin withdraw --token 9QFCh8z1s6u4zm959wyBvW8VtNcZGfEHnRzYub33bonk --amount 1
8DVcjWUSBobmb4b3wdEksb9jwoxfUC55nzkky3u8s4qW6k3KnkaRUwdxEGr165CFVMEeAL2eWsoyGoqKWepX8KWVm1nJUGyKZEjREJQ755EetM1boJsnFXFF7orRwQTbNPB
Magic swap uses Jupiter's V6 API for intelligent routing:
https://quote-api.jup.ag/v6/quotehttps://quote-api.jup.ag/v6/swapDefault RPC: https://api.mainnet-beta.solana.com
For production usage, consider using a private RPC provider for better reliability:
git clone https://github.com/atlantictechguy/yieldin.git
cd yieldin/cli
cargo build --release
cargo test
cli/
├── src/
│ ├── main.rs # CLI entry point and command routing
│ ├── config.rs # Configuration management
│ ├── client/ # Anchor client wrapper
│ │ └── mod.rs
│ ├── commands/ # Command implementations
│ │ ├── deposit.rs
│ │ ├── withdraw.rs
│ │ ├── swap.rs
│ │ ├── info.rs
│ │ └── magic/ # Magic functions
│ │ ├── swap.rs
│ │ ├── add_liquidity.rs
│ │ └── remove_liquidity.rs
│ └── jupiter/ # Jupiter integration
│ ├── mod.rs
│ └── client.rs
└── Cargo.toml
Ensure your wallet file exists and is readable:
ls -la ~/.config/solana/id.json
Check your RPC connection:
yieldin --rpc-url https://api.mainnet-beta.solana.com info
Ensure you have:
If magic swap fails with Jupiter, try direct pool routing:
yieldin magic-swap --from <FROM> --to <TO> --amount 100 --use-jupiter false
⚠️ Important Security Notes:
Apache-2.0
../docs/ for technical specificationsContributions welcome! Please:
See main project README for contribution guidelines.