SDK Integration (TypeScript + Rust)
PLX SDKs abstract away raw API calls, offering a plug-and-play layer for developers. Both SDKs — TypeScript and Rust — are production-ready, with local caching, signature helpers, and deterministic transaction builders.
🧩 TypeScript SDK (@plx/sdk)
@plx/sdk)Install:
npm install @plx/sdkQuickstart Example
import { Vault, Rewards, Wallet } from "@plx/sdk";
const wallet = new Wallet("PRIVATE_KEY");
const vault = new Vault("PUMP5X");
// Fetch vault stats
const stats = await vault.stats();
console.log("TVL:", stats.tvl, "APY:", stats.apy);
// Deposit 10 SOL
await vault.deposit(wallet.address, 10);
// Claim rewards
const claim = await Rewards.claim(wallet.address);
console.log("Rewards claimed:", claim.amount, "SOL");WebSocket Stream Example
The TypeScript SDK also integrates directly with the PLX CLI:
⚙️ Rust SDK (plx-sdk)
plx-sdk)Built for Solana-native engineers and on-chain analytics devs. Optimized for performance and direct Anchor IDL integration.
Cargo.toml
Example Usage
Last updated
