repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | { |
| #2 | "skillId": "pump-solana-dev", |
| #3 | "name": "pump-solana-dev", |
| #4 | "description": "Solana development patterns used in the Pump SDK — Anchor IDL-based program interaction, SPL Token and Token-2022 management, transaction construction with instruction composition, RPC batching, and cross-program coordination.", |
| #5 | "category": "solana-dev", |
| #6 | "path": "pump-solana-dev/SKILL.md", |
| #7 | "url": "https://x402.wtf/api/skills/pump-solana-dev", |
| #8 | "tags": [ |
| #9 | "pump", |
| #10 | "solana", |
| #11 | "dev" |
| #12 | ], |
| #13 | "requiredEnv": [ |
| #14 | "SOLANA_RPC_URL" |
| #15 | ], |
| #16 | "homepage": "https://github.com/nirholas/pump-fun-sdk", |
| #17 | "attestation": { |
| #18 | "status": "pending", |
| #19 | "isFormallyVerified": false, |
| #20 | "attestationPda": null, |
| #21 | "verificationTimestamp": null |
| #22 | }, |
| #23 | "markdown": "---\nname: pump-solana-dev\ndescription: \"Solana development patterns used in the Pump SDK — Anchor IDL-based program interaction, SPL Token and Token-2022 management, transaction construction with instruction composition, RPC batching, and cross-program coordination.\"\nmetadata:\n openclaw:\n homepage: https://github.com/nirholas/pump-fun-sdk\n requires:\n env:\n - SOLANA_RPC_URL\n---\n\n# Solana Development — Web3.js, Anchor, SPL Tokens & On-Chain Patterns\n\nApply Solana development patterns used throughout the Pump SDK: Anchor IDL-based program interaction, SPL Token and Token-2022 account management, transaction construction with instruction composition, RPC batching, and cross-program account coordination.\n\n## Anchor Program Initialization\n\n```typescript\nimport { Program, AnchorProvider } from '@coral-xyz/anchor';\n\nfunction getPumpProgram(connection: Connection): Program<Pump> {\n const provider = new AnchorProvider(\n connection,\n { publicKey: PublicKey.default, signTransaction: async (tx) => tx, signAllTransactions: async (txs) => txs },\n { commitment: 'confirmed' }\n );\n return new Program(pumpIdl as Pump, PUMP_PROGRAM_ID, provider);\n}\n```\n\n**Offline pattern:** Uses a dummy provider (no wallet) for building instructions. Actual signing happens in the caller's code.\n\n## Instruction Building with `accountsStrict`\n\n```typescript\nconst ix = await program.methods\n .buy(amount, maxSolCost, flags)\n .accountsStrict({\n global: GLOBAL_PDA,\n bondingCurve: bondingCurvePda(mint),\n user: userPublicKey,\n // ... all required accounts\n })\n .remainingAccounts(additionalAccounts)\n .instruction();\n```\n\n## PDA Derivation\n\n```typescript\nconst [pda, bump] = PublicKey.findProgramAddressSync(\n [Buffer.from(\"bonding-curve\"), mint.toBuffer()],\n PUMP_PROGRAM_ID\n);\n```\n\n## RPC Batching\n\n```typescript\nconst accounts = await connection.getMultipleAccountsInfo([\n bondingCurvePda(mint),\n GLOBAL_PDA,\n FEE_CONFIG_PDA,\n]);\n```\n\n## Token-2022 Support\n\nThe SDK supports both SPL Token and Token-2022:\n- `createV2Instruction` creates Token-2022 mints\n- `tokenProgram` parameter selects the appropriate program\n- Associated Token Accounts (ATAs) are created idempotently\n\n## Account Decoding\n\n```typescript\nconst bondingCurve = program.coder.accounts.decode('bondingCurve', accountInfo.data);\n```\n\nNullable variants handle missing accounts:\n```typescript\nconst bc = decodeBondingCurveNullable(accountInfo); // returns null instead of throwing\n```\n\n## Transaction Simulation\n\n```typescript\nconst result = await connection.simulateTransaction(tx, [signer]);\n// Parse return data from simulation logs\n```\n\n## BN.js Arithmetic\n\nAll amounts use `BN` for arbitrary-precision integer arithmetic:\n\n```typescript\nconst fee = amount.mul(new BN(feeBps)).div(new BN(10000));\nconst ceilFee = amount.mul(new BN(feeBps)).add(new BN(9999)).div(new BN(10000));\n```\n\n## Patterns to Follow\n\n- Always use `accountsStrict` — not `accounts` — for type-safe account specification\n- Use `getMultipleAccountsInfo` to batch account fetches\n- Build instruction arrays, not transactions — let callers compose\n- Handle both Token and Token-2022 programs via parameter\n- Use nullable decoders for optional accounts\n\n## Common Pitfalls\n\n- `AnchorProvider` with dummy wallet is for instruction building only — never sign with it\n- `getMultipleAccountsInfo` returns nulls for missing accounts — always check\n- Transaction size limit is 1232 bytes — large instruction sets may need multiple transactions\n- `remainingAccounts` order matters — the on-chain program reads them positionally\n\n" |
| #24 | } |
| #25 |