Repository navigation
Implement the common API from mina-sdk-spec - #29
Merged
Merged
Conversation
spec/ is a copy of o1-labs/mina-sdk-spec v0.1.0 (spec/VERSION), and queries.py is generated from spec/operations.graphql; tests/test_spec.py checks it. A CI job checks that spec/ is the tag's copy. Add the methods this SDK did not have, the optional signature on payments and delegations, and the result fields of the specification. Existing names stay; new fields have defaults. get_pooled_user_commands returns PooledUserCommand objects, which still answer the old dictionary keys. Nullable variables are always sent, as null. Remove the schema drift check and the schema snapshot: mina-sdk-spec validates the documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E9VzXg2bJYonrX5xBfmLMr
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
The Python part of the SDK parity work. Rust: o1-labs/mina-sdk-rust#20. Go: o1-labs/mina-sdk-go#8. JS: o1-labs/mina-sdk-js#12. Specification: o1-labs/mina-sdk-spec v0.1.0.
spec/is a copy of mina-sdk-spec v0.1.0, and the tag is inspec/VERSION.queries.pyis generated fromspec/operations.graphql, with all 22 named operations.tests/test_spec.pychecks that the query strings are the specification's documents.spec/is the tag's copy.get_daemon_metrics,get_genesis_block,get_block,get_pooled_zkapp_commands,get_transaction_status,get_genesis_constants,get_tracked_accounts,get_snark_pool,get_fork_config,send_zkapp,unlock_account.send_paymentandsend_delegationtake an optionalsignature=SignatureInput(...). Thesignaturevariable is always sent, as null when it is not set.get_pooled_user_commandsreturnsPooledUserCommandobjects, not dicts. The old dict access (cmd["hash"],cmd.get("hash")) still works for the old keys. The daemon'sfromfield is the attributefrom_.get_accountraisesAccountNotFoundError, which is aValueError, so existingexcept ValueErrorcode still catches it.src/mina_sdk/schema/. The mina-sdk-spec CI validates the documents, as in the other SDKs.spec/ITN.md). This SDK does not have one yet.Test plan
tests/test_common_api.py, whose mock-daemon tests check the variables that the client sends.4.0.0-6965b50: all 17 integration tests pass. This includes the 4 new tests and the payment and delegation tests, with a funded key in the keystore. The live run found that old code callscmd.get(...)on pooled commands, soPooledUserCommandnow hasget().🤖 Generated with Claude Code
https://claude.ai/code/session_01E9VzXg2bJYonrX5xBfmLMr