Merged
Conversation
Implements a CLI wrapping sparkscan-api-go for querying addresses, tokens, transactions, and network stats on the Spark network. Includes mock-based tests, goreleaser config, CI/CD workflows, and a curl-pipe installer. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Quantumlyy
commented
Apr 4, 2026
| return err | ||
| } | ||
|
|
||
| return output.PrintResult(cmd, resp, func(w io.Writer) error { |
Member
Author
There was a problem hiding this comment.
This command accepts --cursor, but the text renderer never surfaces resp.NextCursor. Against the live API, token list --limit 1 returned a non-null nextCursor in JSON and only the row table in text mode, which means the default output cannot paginate past the first page. The same pattern is present in the address history subcommands.
Quantumlyy
commented
Apr 4, 2026
cmd/version/version.go
Outdated
| Annotations: map[string]string{ | ||
| "skipClient": "true", | ||
| }, | ||
| Run: func(cmd *cobra.Command, _ []string) { |
Member
Author
There was a problem hiding this comment.
The root command exposes --output json globally, but this command bypasses output.PrintResult, so sparkscan version --output json still emits plain text (dev (commit: unknown, built: unknown) in my repro) instead of valid JSON. That breaks the PR contract that commands support structured JSON output.
The version command now uses output.PrintResult so `--output json` emits valid JSON instead of plain text. Cursor-paginated commands (token list, address history net-worth/sats/token) now print the next cursor in text mode so users can paginate past the first page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
sparkscan-api-gowith commands for addresses, tokens, and transactions on the Spark network--output jsonfor structured output and--networkfor MAINNET/REGTEST selection--api-keyflag orSPARKSCAN_API_KEYenvironment variableTest plan
go test -race ./...passesgo vet ./...cleango build ./cmdproduces working binarysparkscan versionprints version infosparkscan --helpshows all command groups