@clod-sdk/core
v0.1.0
Published
TypeScript SDK for Clod — Solana Token Launchpad powered by Meteora Dynamic Bonding Curve
Downloads
111
Maintainers
Readme
clod-sdk
TypeScript SDK for Clod — Solana Token Launchpad powered by Meteora Dynamic Bonding Curve.
Install
npm install @getclod/sdkQuick Start
import { Clod } from 'clod-sdk';
const clod = new Clod({ baseUrl: 'https://clod.fun' });Market Data
// List all tokens sorted by market cap
const { deployments, total } = await clod.market.list({
sort: 'ranking', // 'ranking' | 'new' | 'old'
limit: 20,
page: 1,
});
// Get market data for a single token
const data = await clod.market.getTokenData('mint_address_here');
console.log(data);
// → {
// mcap: 50000,
// price: 0.001,
// volume24h: 1200,
// bondingProgress: 45.2,
// isMigrated: false
// }
// Batch market data for multiple tokens
const batch = await clod.market.getMarketData(['mint1', 'mint2', 'mint3']);
// Get tokens by creator wallet
const myTokens = await clod.market.byWallet('wallet_address');Token Deployment
// Get available trading pairs
const pairs = await clod.deploy.getPairs();
// → [{ symbol: "SOL", mint: "So11...", available: true }]
// Upload token image
const imageUrl = await clod.deploy.uploadImage(imageFile);
// Build unsigned deploy transaction
const { transaction, intentId, mint } = await clod.deploy.buildTransaction({
name: 'MyToken',
symbol: 'MTK',
description: 'A cool token on Solana',
image: imageUrl,
pair: 'SOL',
twitter: 'https://x.com/mytoken',
});
// Sign with wallet adapter, then send
const { signature } = await clod.deploy.sendSigned({
signedTransaction: base64SignedTx,
mint: mint,
});
// Finalize — verify on-chain & save
const result = await clod.deploy.finalize({
signature,
mint,
wallet: 'creator_wallet_address',
});Fees
// Get total platform fees earned
const { totalFees } = await clod.fees.getTotal();
console.log(`Total fees: ${totalFees} SOL`);Error Handling
import { Clod, ClodApiError } from 'clod-sdk';
try {
const data = await clod.market.list();
} catch (err) {
if (err instanceof ClodApiError) {
console.error(`API Error (${err.status}): ${err.message}`);
}
}Configuration
const clod = new Clod({
baseUrl: 'https://clod.fun', // Required
timeout: 30000, // Optional (default: 30s)
});API Reference
clod.market
| Method | Description |
|--------|-------------|
| .list(opts?) | List tokens with pagination & sorting |
| .byWallet(wallet, page?) | Get tokens by creator wallet |
| .getMarketData(mints) | Batch fetch market data |
| .getTokenData(mint) | Get single token market data |
clod.deploy
| Method | Description |
|--------|-------------|
| .getPairs() | Get available trading pairs |
| .uploadImage(file) | Upload token image |
| .buildTransaction(params) | Build unsigned deploy tx |
| .sendSigned(params) | Send signed transaction |
| .finalize(params) | Verify on-chain & save |
clod.fees
| Method | Description |
|--------|-------------|
| .getTotal() | Get total platform fees |
License
MIT © getclod
