Files
RogueWave f9c471ef71 feat(transmute): sell-route detection (Jupiter) + design Rev 3
Re-prioritizes the core loop (sell→feed→close; burn for unsellable only) per
user direction. READ-ONLY this increment — quotes + risk flags only, no swap
build/sign, no funds moved.

- docs: Rev 3 — §5 scope, §6 TRANSMUTABLE active, new §6.1 (Jupiter Ultra
  routing incl. pump.fun pre/post-graduation + Token-2022; 3rd-party-swap trust
  model = simulate + lamports-delta ≥ min-out + sole-signer + no
  SetAuthority/Approve/bad-CloseAccount; Shield; price-impact/slippage/dust
  guards; Essence model 1 = opt-in off-chain tally, no custody).
- @pyre/core: SellInfo type + TokenAccountDto.sell.
- @pyre/api: keyless Jupiter client (lite-api: /swap/v1/quote + /ultra/v1/shield);
  bounded /api/scan enrichment — upgrades INCINERATE_ONLY→TRANSMUTABLE when a
  worthwhile route exists; dust gate (proceeds ≤ fee+rent → keep burn); price
  impact >10% blocks; graceful degrade if Jupiter down.
- @pyre/web: shows "Sellable for ~X SOL", price impact, Shield chips; disabled
  "Sell & feed the PYRE (soon)" CTA (execution is the next, audited step).

Tracker: Phase 6 "swap candidate detection" + "route quote preview" done.
typecheck 8/8, core 85, solana 19, web build green.

LIVE FINDING: both pump.fun tokens ARE routable via Jupiter (so no pump.fun
engine needed) but quote ~0.0000097 SOL each — far below their ~0.002 SOL rent,
so the dust gate correctly keeps them INCINERATE_ONLY ("not worth selling").

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 05:11:20 +00:00
..

@pyre/api

PYRE backend HTTP API. Skeleton only — endpoints exist as TODO stubs/route placeholders, NOT real implementations. No Solana transaction or scan/build logic is implemented yet (see CLAUDE.md, §14).

Stack: Node.js + Fastify + TypeScript, with PostgreSQL (@pyre/db), Redis + BullMQ for queueing jobs handled by @pyre/worker.

Responsibilities (§13)

Token scan coordination, classification helpers, route evaluation, AI generation orchestration, metadata preparation, receipt storage, Spawn record storage, public API, admin API.

Endpoints to implement (§14) — TODO

  • POST /api/scan — scan a wallet's token accounts; return summary + accounts.
  • POST /api/build/close-empty — build unsigned close-account tx for empty ATAs.
  • POST /api/build/burn — build unsigned burn tx for selected junk tokens.
  • POST /api/receipt — record/return a cleanup receipt for a confirmed tx.
  • POST /api/prometheus/generate — enqueue a Prometheus Spawn generation job.
  • Admin endpoints — review/approve/reject generated Spawn packages.

Currently only GET /health is wired up.

Backend security rules (§16)

Rate-limit scan endpoints, validate wallet pubkeys, validate token-account ownership, never trust client-submitted classifications (recompute server-side), log all transaction-build requests, protect admin endpoints, use env secrets only.

Scripts

  • devtsx watch src/index.ts
  • buildtsc -p tsconfig.json
  • typechecktsc --noEmit
  • lint / test — placeholders for now