Skip to content

feat(rest): add version() to read the node's version and release - #32

Merged
isaacdoidge merged 4 commits into
masterfrom
feat/node-version
Nov 4, 2026
Merged

isaacdoidge merged 4 commits into
masterfrom
feat/node-version

Conversation

@isaacdoidge

Copy link
Copy Markdown
Collaborator

What

Adds GeneralRestClient.version() (inherited by SupraClient), which reads GET /rpc/v3/version and returns the
node's response as a dict.

Behaviour

  • Fields: version, release, branch, commit_hash, build_time, build_env. version is the version of the
    node's Rust packages and is the same for every release; release identifies the release (for example
    supra_node_v12.0.0, supra_node_v12.0.0.rc7 for a candidate, unreleased for a build from a commit that is not
    a release).
  • Nodes before supra_node_v12.0.0.rc7 (every v11 release, and v12.0.0.rc1 to rc6) omit release; read it with
    .get("release"). Rules that differ between node lines can be chosen from it.
  • New method only; no existing behaviour changes.

Checks

  • make fmt-check, make lint, make typecheck: clean.
  • make test-unit: 240 tests, OK (26 node-backed tests skipped). tests/unit/test_version.py checks the request and
    a v12-shaped and a v11-shaped response over httpx.MockTransport.
  • make test-spec: 248 scenarios passed. make build: sdist and wheel built.
  • Called against a supra_node_v12.0.0.rc7 localnet (release: supra_node_v12.0.0.rc7) and a supra_node_v11.7.2
    localnet (no release key).

🤖 Generated with Claude Code

isaacdoidge and others added 4 commits November 4, 2026 01:49
GeneralRestClient.version() calls GET /rpc/v3/version and returns the
response as a dict. Nodes from supra_node_v12.0.0 include a `release`
key; the key is absent from the response of an earlier node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…release`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	supra_sdk/clients/rest/general.py
@isaacdoidge
isaacdoidge merged commit cdd21eb into master Nov 4, 2026
5 checks passed
@isaacdoidge
isaacdoidge deleted the feat/node-version branch November 4, 2026 01:46
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.

1 participant