Rust SDK
Last updated
Last updated
Solana integration sdk for Magic-Fi Swap. ProgramId on mainnet: MagFiGFK9x5FBYdvMg3pJBpAkPA8EEYiLcopwrxJvDG
SDK git repo:
sdk/src/lib.rs have functions to compose Magic-Fi swap instructions
client/src/main.rs have the demo usage of these instrucionts
Build:
Copy
To test, simply run:
Copy
above try-query is query price for 1 SOL above swap will swap 0.1 USDC to SOL After swap, it will print out transaction signature and program return log
Copy
above cmd will use
Copy
If you want change your own RPC URL or Payer Key, please use following cmd:
Copy