{"_id":"@anaxer/sdk","_rev":"4-4b09dd8c94cc1963a527e083dac2f9e6","name":"@anaxer/sdk","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"@anaxer/sdk","version":"0.0.1","keywords":["solana","pump.fun","pumpswap","websocket","api","sdk"],"license":"MIT","_id":"@anaxer/sdk@0.0.1","maintainers":[{"name":"anaxer","email":"contact@anaxer.com"}],"homepage":"https://anaxer.com/docs","bugs":{"url":"https://anaxer.com/contact"},"dist":{"shasum":"587b85723fd922004dec33940149f629bd9c95c6","tarball":"https://registry.npmjs.org/@anaxer/sdk/-/sdk-0.0.1.tgz","fileCount":5,"integrity":"sha512-kxjiGg7JdcJR9/j6DsMim61N83/8bF0Ai53+QDe7gV5c+i02sltDJrYM3ihw27LwSLc8WqhmB50QkyNlVCOfzA==","signatures":[{"sig":"MEUCIQCeVEHo9hS9ciKc6KF3H+QSqy9O8mQfnTVzWv3tmt1gaQIgD+4oy9popnR7fgMcs8UVrX0ClYjhkWiInQ+U8hX7r5M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3354},"main":"index.js","types":"index.d.ts","engines":{"node":">=18"},"gitHead":"5f28e083cb1e20d754cb64d939e34425b692eee9","_npmUser":{"name":"anaxer","email":"contact@anaxer.com"},"_npmVersion":"10.9.8","description":"Official Anaxer SDK for real-time Solana data (Pump.fun, PumpSwap, and more). Not available yet - this is a placeholder release that reserves the package name.","directories":{},"_nodeVersion":"22.23.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sdk_0.0.1_1783063502814_0.48313687190744314","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@anaxer/sdk","version":"0.1.0","license":"MIT","_id":"@anaxer/sdk@0.1.0","maintainers":[{"name":"anaxer","email":"contact@anaxer.com"}],"dist":{"shasum":"25b7c748f5a6da2a1c64bedc7e1d5f3e7aba32a0","tarball":"https://registry.npmjs.org/@anaxer/sdk/-/sdk-0.1.0.tgz","fileCount":6,"integrity":"sha512-ogtI4gMZr49/WCTyxbVj+830jYYPIsWitPKMXQvv8Hk5z2nrt8wS5ITxs0Q3PNEB8Tr9bm7OTVbtU2yDgzWEkQ==","signatures":[{"sig":"MEUCIBUiVgpKAF/v4t3tW/LSBNbMXSs+0b/ZzWTVbmUJMlFZAiEAgFHJVOwRiVBOebz8U2UHFOXa20IzC5jRF7Ue3rdpGZk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96306},"type":"module","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"04aa3e669a312ce0f57224418b5274e3b94d10ad","scripts":{"test":"vitest run","build":"tsup && node ./scripts/assert-dist-clean.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"anaxer","email":"contact@anaxer.com"},"_npmVersion":"10.9.8","description":"Official TypeScript SDK for the Anaxer Solana real-time data API.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"ws":"^8.18.0","zod":"^3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.2.4","@types/ws":"^8.5.0","typescript":"^5.6.3","@types/node":"^20.16.10","@anaxer/schemas":"*"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1784193705793_0.5132133830133219","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anaxer/sdk","version":"0.1.1","license":"MIT","_id":"@anaxer/sdk@0.1.1","maintainers":[{"name":"anaxer","email":"contact@anaxer.com"}],"dist":{"shasum":"8b93fea6055631a641d1db0f8b5659242674421b","tarball":"https://registry.npmjs.org/@anaxer/sdk/-/sdk-0.1.1.tgz","fileCount":6,"integrity":"sha512-G1iaxGCCKa7O2glG7IfFSsZD34WCzkkZWQ/EL4AOUyFJxe9wecFjhiJWqOCJsVjW06fDA+bd1DzrzsosXvpcLw==","signatures":[{"sig":"MEYCIQD2Zs5ljJ0GqUNKI9n0calkpOy3U6KGUDWVfeM6b/2xAAIhAOjh4uO4RR7wqrrMHaNwlcYBqGNtlTNZctM1M+OJLsGD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":98155},"type":"module","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"497cacac2f50ecb329fda1b2191350c373a52258","scripts":{"test":"vitest run","build":"tsup && node ./scripts/assert-dist-clean.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"anaxer","email":"contact@anaxer.com"},"_npmVersion":"10.9.8","description":"Official TypeScript SDK for the Anaxer Solana real-time data API.","directories":{},"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"ws":"^8.18.0","zod":"^3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.2.4","@types/ws":"^8.5.0","typescript":"^5.6.3","@types/node":"^20.16.10","@anaxer/schemas":"*"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.1_1784773918111_0.6098390506940801","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"_id":"@anaxer/sdk@0.1.2","bugs":{"url":"https://anaxer.com/contact"},"dist":{"shasum":"682c12a7f8d7e7fb909d423f296f315514b63cb6","tarball":"https://registry.npmjs.org/@anaxer/sdk/-/sdk-0.1.2.tgz","fileCount":6,"integrity":"sha512-hQlyB3CJtvkP7xOIF4tKMseuEQekStUF2Bc3erEkGh1n7vNcQ0jvR921oNpF9oxino4G5qVDePhX0rRw8dGV3A==","signatures":[{"sig":"MEYCIQCfGs6Ab88xkyQdSS/NuxT3Qgug3tq5GsPJ6vb8ClJ0zAIhANKWQ1zuwtuB/j+AnRejRXLHaXsldIoUyOkj56Rwn7rI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDQnHTUFWTjD6IiQ85RpXxjGD9oW5gW82Q/lV7PPIodWAIhAOi9cu/uX5ptHejPYOVFdk8gpkAsuJsp4sjrzW5+W9h5"}],"unpackedSize":98499},"name":"@anaxer/sdk","type":"module","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"23b78008c8d15671c7a311260e7281e97840277d","license":"MIT","scripts":{"test":"vitest run","build":"tsup && node ./scripts/assert-dist-clean.mjs","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"version":"0.1.2","_npmUser":{"name":"anaxer","email":"contact@anaxer.com"},"homepage":"https://anaxer.com/docs/sdks","keywords":["solana","pumpfun","pump-fun","websocket","dex","real-time","trading","api","sdk","memecoin"],"repository":{"url":"git+https://github.com/Anaxer-v2/anaxer-sdk-js.git","type":"git"},"_npmVersion":"10.9.8","description":"Official TypeScript SDK for the Anaxer Solana real-time data API.","directories":{},"maintainers":[{"name":"anaxer","email":"contact@anaxer.com"}],"sideEffects":false,"_nodeVersion":"22.23.1","dependencies":{"ws":"^8.18.0","zod":"^3.23.8"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.2.4","@types/ws":"^8.5.0","typescript":"^5.6.3","@types/node":"^20.16.10","@anaxer/schemas":"*"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.2_1789821343921_0.43324258826025597"}}},"time":{"created":"2026-07-03T07:25:02.633Z","modified":"2026-09-19T12:35:44.210Z","0.0.1":"2026-07-03T07:25:02.979Z","0.1.0":"2026-07-16T09:21:45.929Z","0.1.1":"2026-07-23T02:31:58.244Z","0.1.2":"2026-09-19T12:35:44.015Z"},"license":"MIT","description":"Official TypeScript SDK for the Anaxer Solana real-time data API.","maintainers":[{"name":"anaxer","email":"contact@anaxer.com"}],"readme":"# `@anaxer/sdk`\r\n\r\nOfficial TypeScript client for the Anaxer Solana real-time data API — typed WebSocket\r\nstreams and REST reads over the public `/v1` contracts.\r\n\r\n**Requires Node ≥ 20.** ESM and CommonJS builds ship together.\r\n\r\n```bash\r\nnpm install @anaxer/sdk\r\n```\r\n\r\n## Quickstart\r\n\r\n```ts\r\nimport { connect } from \"@anaxer/sdk\";\r\n\r\nconst client = connect({ apiKey: process.env.ANAXER_API_KEY! });\r\n\r\nclient.stream(\"creations\", { excludeMayhem: true }).on(\"data\", (token) => {\r\n  console.log(\"new launch:\", token.symbol, token.mint);\r\n});\r\n\r\nconst price = await client.tokens.price(\"3PFaeFMXiRVYueDCnHHSKndKDDpKZhbhFjQ13JXYpump\");\r\n```\r\n\r\n`connect()` returns immediately. The WebSocket opens on the first `stream()` call (or\r\n`await client.ready()`). Auth is `Authorization: Bearer` for both WS and REST.\r\n\r\nWire contracts: [`docs/api/ws-v1.md`](../../docs/api/ws-v1.md),\r\n[`docs/api/rest-v1.md`](../../docs/api/rest-v1.md).\r\n\r\n## Streaming (`client.stream`)\r\n\r\n| Channel | Payload type | Notes |\r\n|---|---|---|\r\n| `trades` | `SwapV1` | Optional `sources`, `mints`, `wallets`, volume bounds, `solOnly` |\r\n| `creations` | `CreatedV1` | Optional `sources`, `enriched`, `excludeMayhem` |\r\n| `graduations` | `GraduatedV1` | Optional `sources`, `excludeMayhem`, `minLiquiditySol` |\r\n| `prices` | `PriceUpdateV1` | Optional `sources`, `mints` |\r\n\r\n```ts\r\nconst sub = client.stream(\"trades\", {\r\n  sources: [\"pump_fun\"],\r\n  minVolumeUsd: 10,\r\n});\r\n\r\nsub.on(\"subscribed\", (filters) => console.log(\"live\", filters));\r\nsub.on(\"data\", (swap) => console.log(swap.signature, swap.volumeUsd));\r\nsub.on(\"error\", (err) => console.error(err.code, err.message));\r\n\r\n// later\r\nsub.close(); // unsubscribe; not resurrected after reconnect\r\n```\r\n\r\n### Connection events\r\n\r\n```ts\r\nclient.on(\"connected\", ({ connectionsPerStream }) => { /* per-channel plan cap */ });\r\nclient.on(\"reconnect\", (attempt) => { /* about to retry */ });\r\nclient.on(\"error\", (err) => { /* connection-level */ });\r\nclient.on(\"close\", () => { /* socket dropped (may reconnect) */ });\r\n\r\nawait client.ready();   // resolves on first `connected`\r\nawait client.close();   // graceful shutdown; disables reconnect\r\n```\r\n\r\n### Heartbeat & reconnect\r\n\r\n- **Heartbeat** (default `heartbeatMs: 15_000`): client sends `ping`; the socket is dead\r\n  if **no inbound traffic of any kind** arrives within `2×heartbeatMs`. Set `0` to disable.\r\n- **Reconnect** (on by default): exponential backoff with ±20% jitter, then re-sends every\r\n  **active** subscription with the same `id` / filters. `reconnect: false` disables it.\r\n  `unauthorized` is **terminal** (bad key — no retry loop). Other closes (including\r\n  `slow_consumer`) reconnect after emitting `error` with the server code.\r\n\r\n### No gap recovery in v1\r\n\r\nOn reconnect the SDK resumes the **live** feed only. Events during the disconnect window\r\nare **not** replayed — the wire protocol has no sequence numbers or cursors yet. Plan for\r\nat-most-once delivery across reconnects.\r\n\r\n### Intentional v1 omissions\r\n\r\n- **`transfers` channel** — not exposed on `stream()` until server-side ingestion ships.\r\n  The `TransferV1` **type** is still exported for callers that need the shape.\r\n- **`programs()`** — not included; the public catalog type is not in `@anaxer/schemas`.\r\n\r\n## REST\r\n\r\nAll authenticated GETs use `Authorization: Bearer`. Transient `429` / `5xx` retry up to\r\n`restMaxRetries` (default `2`), honoring `Retry-After`. Other `4xx` throw immediately.\r\n\r\n| Method | Returns |\r\n|---|---|\r\n| `client.tokens.get(mint)` | `TokenMetadataV1` |\r\n| `client.tokens.batch(mints)` | `TokenMetadataV1[]` (unwraps `{ data }`, max 50) |\r\n| `client.tokens.price(mint)` | `PriceUpdateV1` |\r\n| `client.tokens.batchPrice(mints)` | `PriceUpdateV1[]` |\r\n| `client.tokens.trades(mint, opts?)` | `Page<SwapV1>` (either swap leg; opts: `limit`, `cursor`, `from`, `to`, `source`, `solOnly`) |\r\n| `client.creations(opts?)` | `Page<CreatedV1>` |\r\n| `client.graduations(opts?)` | `Page<GraduatedV1>` |\r\n| `client.launchpads.stats(opts?)` | `LaunchpadStatsV1` |\r\n\r\nList endpoints return a `Page<T>` with `.data`, `.next`, `.window`. It is also an async\r\niterable that walks `next` on the **same** endpoint until null:\r\n\r\n```ts\r\nconst page = await client.creations({ excludeMayhem: true, limit: 50 });\r\nconsole.log(page.data.length, page.window);\r\n\r\nfor await (const created of page) {\r\n  console.log(created.mint);\r\n}\r\n```\r\n\r\n## Config\r\n\r\n```ts\r\nconnect({\r\n  apiKey: \"...\",                          // required\r\n  baseUrl: \"https://api.anaxer.com\",      // REST base (no trailing slash required)\r\n  wsUrl: undefined,                       // default: derived from baseUrl → …/v1/stream\r\n  reconnect: true,                        // or false | { baseDelayMs, maxDelayMs, maxRetries }\r\n  heartbeatMs: 15_000,                    // 0 disables\r\n  restMaxRetries: 2,                      // 0 disables REST retries\r\n});\r\n```\r\n\r\nLocal gateway: `baseUrl: \"http://localhost:3010\"` (derives `ws://localhost:3010/v1/stream`).\r\n\r\n## Errors\r\n\r\nREST non-2xx **throws** `AnaxerError` (`code`, `message`, `status`). WS `error` frames\r\n**emit** on the matching `Subscription` (when `id` is present) or on `Client`.\r\n\r\n```ts\r\nimport { AnaxerError } from \"@anaxer/sdk\";\r\n\r\ntry {\r\n  await client.tokens.get(mint);\r\n} catch (e) {\r\n  if (e instanceof AnaxerError && e.code === \"not_found\") { /* … */ }\r\n}\r\n```\r\n\r\n## Types\r\n\r\nPayload and filter types are exported from the package (`SwapV1`, `CreatedV1`,\r\n`SubscriptionFiltersV1`, `TradesFilters`, …). `WIRE_VERSION` is `1` (wire envelope `v`,\r\nindependent of the npm package version).\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md","homepage":"https://anaxer.com/docs/sdks","keywords":["solana","pumpfun","pump-fun","websocket","dex","real-time","trading","api","sdk","memecoin"],"repository":{"url":"git+https://github.com/Anaxer-v2/anaxer-sdk-js.git","type":"git"},"bugs":{"url":"https://anaxer.com/contact"}}