feat: add GetVerificationKeyUpdates - #1
Merged
Conversation
Archive-Node-API 1.0.0 adds a `verificationKeyUpdates` query — applied account updates that set a given verification key, bounded by a required block range (o1-labs/Archive-Node-API#225). This SDK had no way to reach it, and its vendored schema predated it. - schema.graphql refreshed from upstream main; the drift check is green again. The delta is purely additive. - queryVerificationKeyUpdates selects the full type, matching the field-coverage convention of the other four documents. - GetVerificationKeyUpdates follows GetEvents/GetActions: same retry path, same MissingFieldError on a null field. - VerificationKeyUpdateFilterInput takes From and To as plain ints rather than the *int used by the optional filters, because the schema requires them — the server bounds the span by its BLOCK_RANGE_SIZE. Only Status is omitted from the variables when unset. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012LtdRKTkaKRAuTkEEpgPcc
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.
What & why
Archive-Node-API 1.0.0 adds a
verificationKeyUpdatesroot field — applied account updates that set a given verification key, over a required block range (o1-labs/Archive-Node-API#225). This SDK could not reach it, and its vendoredschema.graphqlpredated it by three types.The schema delta is purely additive —
VerificationKeyUpdateFilterInput,VerificationKeyUpdate, and the root field. Nothing existing was removed, renamed or retyped, so this is a new capability, not a migration.Changes
schema.graphqlrefreshed from upstreammain.check_schema_drift.shreports in sync again.queryVerificationKeyUpdatesselects the full type, matching the field-coverage convention the other four documents follow.Client.GetVerificationKeyUpdates(ctx, in)sits beside the existing query methods: same retry path, same missing-field error when the server returns a null field.VerificationKeyUpdateFilterInputtypesFromandToas plainint, not the*intthe optional filters use, because the schema requires them: the server bounds the span by its configuredBLOCK_RANGE_SIZE. OnlyStatusis omitted from the variables when unset.Testing
go build ./...,go vet ./...,gofmt -s -l .— all cleango test -race -count=1 ./...— 25 tests pass, 0 failures: a happy path over anhttptestserver, and one capturing the request body to pin that the required range is sent andstatusis omitted when unsetintegration_test.gogains aVerificationKeyUpdatessubtest querying the single verification key present in the upstream sample dumpscripts/check_schema_drift.sh— in syncgo mod tidywas not re-run:go.modrequires Go 1.21 and the local toolchain is 1.19. Neithergo.modnorgo.sumis touched by this change.Note on the drift guard
This repo's weekly
Schema Driftworkflow had been switched off by GitHub (disabled_inactivity) after 60 days without a commit, which is why the new query went unnoticed — the same had happened in all three archive SDKs. It has been re-enabled; merging this commit also resets the inactivity clock.🤖 Generated with Claude Code
https://claude.ai/code/session_012LtdRKTkaKRAuTkEEpgPcc