-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathllms.txt
More file actions
168 lines (136 loc) · 6.83 KB
/
Copy pathllms.txt
File metadata and controls
168 lines (136 loc) · 6.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# Pump SDK
> Unofficial community PumpFun SDK for creating, buying, and selling tokens on the Solana blockchain. Bonding curve pricing, AMM migration, tiered fees, creator fee sharing, token incentives, and vanity address generation.
## Critical Security Notice
This toolkit uses ONLY official Solana Labs libraries:
- Rust: solana-sdk (https://github.com/solana-labs/solana)
- TypeScript: @solana/web3.js (https://github.com/solana-labs/solana-web3.js)
- Shell: solana-keygen CLI
NO third-party cryptographic code is used. All key generation uses Ed25519 from official packages.
## Quick Reference
### SDK Usage
```typescript
import { Connection, PublicKey } from "@solana/web3.js";
import { OnlinePumpSdk, PUMP_SDK, getBuyTokenAmountFromSolAmount } from "@nirholas/pump-sdk";
import BN from "bn.js";
// Offline SDK singleton (instruction builder only)
const offlineSdk = PUMP_SDK;
// Online SDK (fetches on-chain state)
const connection = new Connection("https://api.devnet.solana.com", "confirmed");
const sdk = new OnlinePumpSdk(connection);
// Create token
const ix = await PUMP_SDK.createV2Instruction({ mint, name, symbol, uri, creator, user, mayhemMode: false });
// Buy tokens
const global = await sdk.fetchGlobal();
const feeConfig = await sdk.fetchFeeConfig();
const { bondingCurve, bondingCurveAccountInfo, associatedUserAccountInfo } = await sdk.fetchBuyState(mint, user);
const ixs = await PUMP_SDK.buyInstructions({
global, bondingCurveAccountInfo, bondingCurve, associatedUserAccountInfo,
mint, user, solAmount, amount, slippage: 1, tokenProgram: TOKEN_PROGRAM_ID,
});
```
### On-Chain Programs
| Program | ID | Purpose |
|---------|-----|---------|
| Pump | `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` | Bonding curve |
| PumpAMM | `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` | AMM pools |
| PumpFees | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | Fee sharing |
### Rust Key Generation
```rust
use solana_sdk::signer::keypair::Keypair;
use solana_sdk::signature::Signer;
let keypair = Keypair::new();
let address = keypair.pubkey().to_string(); // Base58 address
let secret = keypair.to_bytes(); // 64 bytes: [seed(32) | pubkey(32)]
```
### TypeScript Key Generation
```typescript
import { Keypair } from '@solana/web3.js';
const keypair = Keypair.generate();
const address = keypair.publicKey.toBase58();
const secret = keypair.secretKey; // Uint8Array(64)
```
### Solana CLI Format
Keypairs are stored as JSON arrays of 64 bytes:
```json
[174,47,154,16,202,193,206,113,199,190,53,133,169,175,31,56,...]
```
- Bytes 0-31: Ed25519 secret key seed
- Bytes 32-63: Public key
## Vanity Address Generation
Solana addresses use Base58 (58 characters: 1-9, A-Z excluding O, a-z excluding l).
Difficulty estimates:
- 1 char: 1 in 58 (instant)
- 2 chars: 1 in 3,364 (<1 sec)
- 3 chars: 1 in 195,112 (~2 sec)
- 4 chars: 1 in 11,316,496 (~2 min)
- 5 chars: 1 in 656,356,768 (~2 hours)
- 6 chars: 1 in 38+ billion (~4 days)
## Project Structure
- src/ - Core SDK (instruction builders, bonding curve math, analytics, social fees, PDAs, state, events)
- rust/ - High-performance Rust vanity address generator (solana-sdk + rayon)
- typescript/ - TypeScript vanity address generator (@solana/web3.js)
- mcp-server/ - Model Context Protocol server for AI agents (55 tools, 4 resources, 5 prompts)
- telegram-bot/ - PumpFun activity monitor (13 commands — fee claims, CTO, whale, graduation, pricing, quotes)
- channel-bot/ - Broadcast-only Telegram feed (GitHub social fee claims, graduations, fake-claim detection)
- claim-bot/ - Fee claim tracker by token CA or X handle
- outsiders-bot/ - Call leaderboard bot (PNL cards, win rate, multi-chain)
- swarm-bot/ - AI multi-strategy trading bot
- swarm/ - Bot fleet orchestrator (admin dashboard, event bus, REST API)
- dashboard/ - Unified control panel for all bots
- pumpkit/ - Monorepo with 6 packages (core, channel, claim, monitor, tracker, web)
- websocket-server/ - WebSocket relay (PumpFun API to browser clients, deployed on Railway)
- x402/ - x402 payment protocol (HTTP 402 USDC micropayments)
- lair-tg/ - Unified Telegram bot platform for DeFi intelligence
- live/ - Standalone dashboards (token launches, trades, vanity generator)
- website/ - PumpOS web desktop (169+ Pump-Store apps)
- site/ - Documentation site
- pumpfun-site/ - Landing pages (create, profile, token)
- packages/defi-agents/ - AI agent definitions library
- packages/plugin.delivery/ - OpenAPI-compatible plugin SDK and gateway
- tutorials/ - 43 hands-on tutorial guides
- scripts/ - Production Bash wrappers (vanity generation, verification, site tools)
- tools/ - Audit and verification utilities
- tests/ - Integration, fuzz, stress, benchmark, and CLI tests
- docs/ - Full documentation including official Pump protocol specs
- website/ - PumpOS web desktop with 169 Pump-Store apps
- packages/ - Companion packages (DeFi agents, plugin delivery)
- packages/defi-agents/ - 43 production-ready AI agent definitions
- packages/plugin.delivery/ - AI plugin index for SperaxOS
- security/ - Security audits and checklists
- skills/ - Agent skill documents
- prompts/ - Agent prompt templates
- .github/skills/ - 28 agent skill documents
- .well-known/ - AI plugin, agent config, skills registry
## Important Files
- src/sdk.ts - PumpSdk class (offline instruction builders + social fee PDAs)
- src/onlineSdk.ts - OnlinePumpSdk class (RPC fetchers + fetchSocialFeePda)
- src/bondingCurve.ts - AMM pricing math
- src/analytics.ts - Price impact, graduation progress, token price, bonding curve summary
- src/fees.ts - Tiered fee calculations
- src/tokenIncentives.ts - Volume-based reward math
- src/pda.ts - Program Derived Addresses (incl. socialFeePda)
- src/state.ts - On-chain state interfaces + event types (30+ events)
- rust/src/generator.rs - Rust vanity generation engine
- typescript/src/lib/generator.ts - TS vanity generation engine
- telegram-bot/src/api/server.ts - REST API with auth, rate limiting, SSE, webhooks
- telegram-bot/src/pump-event-monitor.ts - PumpEventMonitor (graduation, whale, fee events)
- websocket-server/src/server.ts - WebSocket relay server
- websocket-server/src/solana-monitor.ts - PumpFun API monitor
## Security Features
1. Memory zeroization (zeroize crate)
2. File permissions 0600
3. RNG quality verification
4. No network calls (fully offline key generation)
5. Auditable open source code
6. Official Solana Labs crypto only
## Agent Resources
- .well-known/skills.json - Skills registry (28 skills)
- .well-known/agent.json - Agent capabilities
- .well-known/ai-plugin.json - AI plugin manifest
- AGENTS.md, CLAUDE.md, GEMINI.md, COPILOT.md - Agent-specific instructions
- llms-full.txt - Comprehensive LLM context
## Links
- Repository: https://github.com/nirholas/pump-fun-sdk
- npm: https://www.npmjs.com/package/@nirholas/pump-sdk
- Author: https://github.com/nirholas
- Full documentation: https://raw.githubusercontent.com/nirholas/pump-fun-sdk/main/llms-full.txt