Skip to content

Commit e0e919d

Browse files
committed
feat: add core bot framework, web components, tutorials, and docs updates
1 parent 49d0cf8 commit e0e919d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+7557
-462
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ jobs:
2828
- name: Type check
2929
run: npm run typecheck
3030

31+
- name: Test
32+
run: npm test
33+
3134
- name: Build
3235
run: npm run build

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pumpkit/
1212
│ ├── tracker/ @pumpkit/tracker — group tracker bot
1313
│ ├── channel/ @pumpkit/channel — channel feed bot
1414
│ ├── claim/ @pumpkit/claim — claim tracker bot
15-
│ └── web/ @pumpkit/web — frontend dashboard (coming soon)
15+
│ └── web/ @pumpkit/web — frontend dashboard and docs site
1616
├── docs/ documentation and guides
1717
├── tutorials/ hands-on step-by-step guides
1818
├── examples/ HTML dashboard examples

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Consolidates 3 existing production bots into one:
171171
- [Core API](docs/core-api.md)`@pumpkit/core` module reference
172172
- [Monitor Bot](docs/monitor-bot.md) — Feature spec, commands, configuration
173173
- [Tracker Bot](docs/tracker-bot.md) — Feature spec, commands, configuration
174-
- [npm Packages](docs/npm.md)Publishing roadmap (coming soon)
174+
- [npm Packages](docs/npm.md)Package installation and usage
175175

176176
### Pump Protocol Reference
177177
- [Protocol Overview](docs/pump-protocol/) — All 9 official protocol specs + IDLs

STATUS.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# PumpKit — Status Report
2+
3+
> Last updated: 2026-03-12
4+
5+
## Package Status
6+
7+
| Package | Version | Status | Notes |
8+
|---------|---------|--------|-------|
9+
| `@pumpkit/core` | 1.0.0 | ✅ Complete | Logger, config, health, shutdown, bot scaffold, formatter, monitors, storage, SDK bridge |
10+
| `@pumpkit/monitor` | 1.0.0 | ✅ Complete | DM bot + REST API + SSE stream. Copied from telegram-bot |
11+
| `@pumpkit/channel` | 1.0.0 | ✅ Complete | Channel broadcast bot. Copied from channel-bot |
12+
| `@pumpkit/claim` | 1.0.0 | ✅ Complete | Fee claim tracker. Copied from claim-bot |
13+
| `@pumpkit/tracker` | 1.0.0 | ✅ Complete | Call-tracking leaderboard bot. Copied from outsiders-bot |
14+
| `@pumpkit/web` | 0.1.0 | 🔄 In Progress | Dashboard UI with mock + live SSE feed |
15+
16+
## Core Modules
17+
18+
| Module | File | Status |
19+
|--------|------|--------|
20+
| Logger | `logger.ts` | ✅ Tested |
21+
| Config | `config.ts` | ✅ Tested |
22+
| Health Server | `health.ts` | ✅ Tested |
23+
| Shutdown | `shutdown.ts` | ✅ Tested |
24+
| Bot Scaffold | `bot/index.ts` | ✅ Implemented |
25+
| Formatter (links) | `formatter/links.ts` | ✅ Tested |
26+
| Formatter (templates) | `formatter/templates.ts` | ✅ Tested |
27+
| Storage (FileStore) | `storage/FileStore.ts` | ✅ Implemented |
28+
| Storage (SqliteStore) | `storage/SqliteStore.ts` | ✅ Implemented |
29+
| SDK Bridge | `solana/sdk-bridge.ts` | ✅ Implemented |
30+
| RPC Helpers | `solana/rpc.ts` | ✅ Implemented |
31+
| Program Constants | `solana/programs.ts` | ✅ Implemented |
32+
| Event Types | `types/events.ts` | ✅ Implemented |
33+
| Claim Monitor | `monitor/ClaimMonitor.ts` | ✅ Implemented |
34+
| Launch Monitor | `monitor/LaunchMonitor.ts` | ✅ Implemented |
35+
| Graduation Monitor | `monitor/GraduationMonitor.ts` | ✅ Implemented |
36+
| Whale Monitor | `monitor/WhaleMonitor.ts` | ✅ Implemented |
37+
| CTO Monitor | `monitor/CTOMonitor.ts` | ✅ Implemented |
38+
| FeeDist Monitor | `monitor/FeeDistMonitor.ts` | ✅ Implemented |
39+
40+
## Web Dashboard Pages
41+
42+
| Page | Route | Status | Notes |
43+
|------|-------|--------|-------|
44+
| Home | `/` | ✅ Built | Hero + package cards + quick start |
45+
| Create Coin | `/create` | ✅ Built | Interactive demo (simulated) |
46+
| Dashboard | `/dashboard` | ✅ Built | Live SSE + mock fallback, filter bar, stats |
47+
| Docs | `/docs` | ✅ Built | Inline API reference |
48+
| Packages | `/packages` | ✅ Built | Package cards with features/code |
49+
50+
## Documentation
51+
52+
| Doc | Status |
53+
|-----|--------|
54+
| README.md | ✅ Complete |
55+
| SDK Integration (docs/sdk-integration.md) | ✅ Complete |
56+
| npm Publishing (docs/npm.md) | 🚧 Coming Soon |
57+
| Core API (docs/core-api.md) | ✅ Complete |
58+
| Architecture (docs/architecture.md) | ✅ Complete |
59+
| Roadmap (docs/roadmap.md) | ✅ Complete |
60+
| 9 Tutorials | ✅ Copied from pump-fun-sdk |
61+
| Protocol Specs | ✅ Copied from pump-fun-sdk |
62+
63+
## CI/CD
64+
65+
| Step | Status |
66+
|------|--------|
67+
| Typecheck | ✅ In CI |
68+
| Test | ✅ In CI |
69+
| Build | ✅ In CI |
70+
| npm Publish | 📋 Planned |
71+
| Lint | 📋 Planned (turbo task exists, no package scripts yet) |
72+
73+
## Known Issues
74+
75+
1. **npm packages not yet published**`@pumpkit` scope not yet registered on npm
76+
2. **Lint scripts missing**`turbo.json` references a `lint` task but no package has a `lint` script
77+
3. **Web dashboard uses mock data by default** — set `VITE_API_URL` env to connect to real monitor bot
78+
4. **Security checklist unchecked**`security/SECURITY_CHECKLIST.md` items not yet verified
79+
80+
## Suggested Next Steps
81+
82+
1. Register `@pumpkit` npm org and publish packages
83+
2. Add ESLint configs + `lint` scripts to each package
84+
3. Set up Changesets for versioning
85+
4. Deploy web dashboard to Vercel
86+
5. Deploy monitor bot to Railway
87+
6. Complete security checklist review

docs/npm.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# npm Packages
22

3-
> 🚧 **Coming Soon**PumpKit packages will be published to npm under the `@pumpkit` scope.
3+
PumpKit packages are available under the `@pumpkit` scope. Currently distributed via the monorepo — install from source using workspace references.
44

55
## Packages
66

@@ -12,9 +12,9 @@
1212
| `@pumpkit/claim` | `npm i @pumpkit/claim` | Fee claim tracker by token CA or X handle | ✅ Ready |
1313
| `@pumpkit/tracker` | `npm i @pumpkit/tracker` | Group call-tracking bot with leaderboards and PNL cards | ✅ Ready |
1414

15-
## Install (Coming Soon)
15+
## Install
1616

17-
Once published, you'll be able to install packages directly:
17+
Once published to npm, install packages directly:
1818

1919
```bash
2020
# Install the core framework
@@ -27,7 +27,7 @@ npm install @pumpkit/monitor
2727
npm install @pumpkit/core @pumpkit/monitor @pumpkit/tracker @pumpkit/channel @pumpkit/claim
2828
```
2929

30-
## Usage (Coming Soon)
30+
## Usage
3131

3232
### Build a custom bot with core
3333

docs/sdk-integration.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# SDK Integration Guide
2+
3+
> How PumpKit integrates with `@nirholas/pump-sdk` for on-chain Solana operations.
4+
5+
## Overview
6+
7+
PumpKit wraps the [pump-fun-sdk](https://github.com/nirholas/pump-fun-sdk) to provide bot-friendly async functions for querying bonding curves, token prices, graduation progress, and buy/sell quotes.
8+
9+
The bridge lives in `@pumpkit/core` and is exported from the barrel:
10+
11+
```typescript
12+
import {
13+
getTokenPrice,
14+
getGraduationProgress,
15+
getBuyQuote,
16+
getSellQuote,
17+
getBondingCurveState,
18+
} from '@pumpkit/core';
19+
```
20+
21+
## Setup
22+
23+
Install `@nirholas/pump-sdk` as a peer dependency of your bot:
24+
25+
```bash
26+
npm install @nirholas/pump-sdk @solana/web3.js bn.js
27+
```
28+
29+
## Functions
30+
31+
### `getTokenPrice(connection, mint)`
32+
33+
Returns the current buy/sell price per token and market cap.
34+
35+
```typescript
36+
import { Connection, PublicKey } from '@solana/web3.js';
37+
import { getTokenPrice } from '@pumpkit/core';
38+
39+
const connection = new Connection('https://api.mainnet-beta.solana.com');
40+
const mint = new PublicKey('YourTokenMintAddress...');
41+
42+
const price = await getTokenPrice(connection, mint);
43+
if (price) {
44+
console.log('Buy price:', price.buyPricePerToken.toString());
45+
console.log('Market cap:', price.marketCap.toString());
46+
console.log('Graduated:', price.isGraduated);
47+
}
48+
```
49+
50+
**Returns:** `TokenPriceInfo | null``null` if the bonding curve doesn't exist.
51+
52+
### `getGraduationProgress(connection, mint)`
53+
54+
Returns how close a token is to graduating from bonding curve to AMM.
55+
56+
```typescript
57+
import { getGraduationProgress } from '@pumpkit/core';
58+
59+
const progress = await getGraduationProgress(connection, mint);
60+
if (progress) {
61+
console.log(`${progress.progressBps / 100}% graduated`);
62+
console.log('Tokens remaining:', progress.tokensRemaining.toString());
63+
console.log('SOL accumulated:', progress.solAccumulated.toString());
64+
}
65+
```
66+
67+
**Returns:** `GraduationProgress | null`
68+
69+
### `getBuyQuote(connection, mint, solAmount)`
70+
71+
Calculates how many tokens you'd receive for a given SOL amount.
72+
73+
```typescript
74+
import BN from 'bn.js';
75+
import { getBuyQuote } from '@pumpkit/core';
76+
77+
const solAmount = new BN(1_000_000_000); // 1 SOL in lamports
78+
const quote = await getBuyQuote(connection, mint, solAmount);
79+
if (quote) {
80+
console.log('Tokens received:', quote.tokens.toString());
81+
console.log('Price impact:', quote.priceImpact, '%');
82+
}
83+
```
84+
85+
**Returns:** `{ tokens: BN, priceImpact: number } | null`
86+
87+
### `getSellQuote(connection, mint, tokenAmount)`
88+
89+
Calculates how much SOL you'd receive for selling a given token amount.
90+
91+
```typescript
92+
import { getSellQuote } from '@pumpkit/core';
93+
94+
const tokenAmount = new BN('1000000000'); // token amount
95+
const quote = await getSellQuote(connection, mint, tokenAmount);
96+
if (quote) {
97+
console.log('SOL received:', quote.sol.toString(), 'lamports');
98+
console.log('Price impact:', quote.priceImpact, '%');
99+
}
100+
```
101+
102+
**Returns:** `{ sol: BN, priceImpact: number } | null`
103+
104+
### `getBondingCurveState(connection, mint)`
105+
106+
Fetches the raw bonding curve account state.
107+
108+
```typescript
109+
import { getBondingCurveState } from '@pumpkit/core';
110+
111+
const state = await getBondingCurveState(connection, mint);
112+
if (state) {
113+
console.log('Complete:', state.complete);
114+
console.log('Creator:', state.creator);
115+
console.log('Virtual SOL reserves:', state.virtualSolReserves);
116+
console.log('Mayhem mode:', state.isMayhemMode);
117+
}
118+
```
119+
120+
**Returns:** `BondingCurveInfo | null`
121+
122+
## Error Handling
123+
124+
All bridge functions return `null` when the bonding curve account doesn't exist (e.g., token hasn't been created yet, or account was closed). Network errors are caught internally and also return `null`.
125+
126+
```typescript
127+
const price = await getTokenPrice(connection, mint);
128+
if (!price) {
129+
console.log('Token not found or RPC error');
130+
return;
131+
}
132+
```
133+
134+
## Architecture
135+
136+
```
137+
Your Bot
138+
139+
@pumpkit/core (sdk-bridge.ts)
140+
141+
@nirholas/pump-sdk (OnlinePumpSdk, analytics, bondingCurve)
142+
143+
Solana RPC (getAccountInfo, etc.)
144+
```
145+
146+
The bridge uses `OnlinePumpSdk` internally to fetch Global, FeeConfig, and BondingCurve state, then passes them to the SDK's pure math functions (`getTokenPrice`, `getBuyTokenAmountFromSolAmount`, etc.).
147+
148+
## When to Use the Bridge vs. SDK Directly
149+
150+
| Scenario | Use |
151+
|----------|-----|
152+
| Quick price check in a bot command | Bridge (`getTokenPrice`) |
153+
| Building transaction instructions | SDK directly (`PUMP_SDK.buyInstructions()`) |
154+
| Batch queries for many tokens | SDK directly (manual batching with `getMultipleAccountsInfo`) |
155+
| One-off graduation check | Bridge (`getGraduationProgress`) |
156+
| Complex trading logic | SDK directly for full control |
157+
158+
The bridge is for convenience. For advanced use cases, import from `@nirholas/pump-sdk` directly.

examples/claim-alert/package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "@pumpkit/example-claim-alert",
3+
"version": "0.1.0",
4+
"private": true,
5+
"type": "module",
6+
"description": "Minimal fee claim notification bot using PumpKit",
7+
"scripts": {
8+
"dev": "tsx src/index.ts",
9+
"build": "tsc",
10+
"start": "node dist/index.js"
11+
},
12+
"dependencies": {
13+
"@pumpkit/core": "workspace:*",
14+
"grammy": "^1.30.0",
15+
"dotenv": "^16.4.7"
16+
},
17+
"devDependencies": {
18+
"tsx": "^4.19.0",
19+
"typescript": "^5.7.0"
20+
}
21+
}

0 commit comments

Comments
 (0)