Sunpump add launch token#36
Merged
Merged
Conversation
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
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.