Skip to content

Sunpump add launch token#36

Merged
Will-Guan merged 9 commits into
mainfrom
sunpump-add
Jun 9, 2026
Merged

Sunpump add launch token#36
Will-Guan merged 9 commits into
mainfrom
sunpump-add

Conversation

@grayfoxd

@grayfoxd grayfoxd commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Leon.Zhang and others added 9 commits June 4, 2026 11:51
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This reverts commit adc1177.

The nile host tn-api.sunpump.meme is publicly reachable now (verified:
HTTP 200 with valid token data; `sun --network nile sunpump token list`
works end-to-end), so the nile/mainnet switch is back.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New `sun sunpump launch` creates a token through the SunPump agent
endpoint (POST /ai/agentTokenLaunch) — server-side creation, no local
wallet or signing:

- lib/sunpump.ts: add post() (shares send() error handling with GET)
  and agentTokenLaunch(); export AgentTokenLaunchParams.
- commands/sunpump.ts: `launch` with required --name/--symbol, optional
  --description, --image <path> (read + base64-encoded) or
  --image-base64, social URLs, --tweet-username. Irreversible action:
  prints a summary and asks for confirmation (--yes skips), honours
  --dry-run. Success view reuses tokenDetail plus Create Tx / Logo.
  The launch response serializes *Instant fields as epoch-millis/1e6
  (unlike GET endpoints' epoch seconds) — normalized before display.
- README: document the launch command.

Verified on nile: launched TFAC (TXsGnUGNRoZ1AqyHfak1vvbayxo9JqZg3J,
tx 8fecad1b…) and queried it back via `token get`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
name/symbol/description are all required by the agentTokenLaunch
endpoint; image and social fields stay optional. Docs updated to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The agentTokenLaunch endpoint currently fails with "500 Invoke third
part error" when no imageBase64 accompanies the request (verified
against the nile API: same payload succeeds once an image is attached).
The image stays optional per the API contract, but when that specific
error comes back on an image-less launch, print a stderr hint pointing
at --image so users aren't left guessing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The nile host tn-api.sunpump.meme is an internal-only service, not
publicly reachable, so the nile/mainnet switch never worked end-to-end
for external users. Removing nile from every SunPump path:

- lib/sunpump.ts: drop SUNPUMP_NILE_BASE_URL/SUNPUMP_MAINNET_BASE_URL,
  the SunPumpNetwork type, sunPumpBaseUrlFor(), and the network-keyed
  client cache. getSunPump() is back to a plain singleton; the base URL
  resolves from baseUrl arg -> SUNPUMP_API_BASE_URL env -> mainnet.
- commands/sunpump.ts: replace the currentNetwork machinery with
  assertMainnet(), called from the sp preAction hook (and the launch
  action) so every sunpump subcommand bails fast on non-mainnet.
- README + CHANGELOG: reflect mainnet-only behaviour.

Verified: token list works on mainnet; --network nile fails fast with
the new error. tsc clean, 106 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Will-Guan Will-Guan merged commit 6239b9f into main Jun 9, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants