Add ZetaChain Integration to Python SDK #380
Open
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
This PR adds comprehensive ZetaChain support to the dstack Python SDK, enabling secure key management for ZetaChain networks using TEE technology.
ZetaChain is an EVM-compatible blockchain focused on cross-chain interoperability, making it a perfect fit for dstack's confidential computing capabilities.
Changes
Core Integration
zetachain.pymodule withto_account()andto_account_secure()functionspyproject.tomlwith ZetaChain dependencies (uses existingweb3library)test_zetachain.py(8 test cases)examples/zetachain_demo.py)examples/ZETACHAIN_README.mdFeatures
AsyncDstackClientSecurity
to_account_secure()Implementation Details
The implementation follows the exact same pattern as existing Ethereum and Solana integrations, making it easy for developers already familiar with dstack to add ZetaChain support:
Since ZetaChain is fully EVM-compatible, it reuses the same
web3library dependency as Ethereum integration - no new dependencies required!Installation
Testing
All tests pass using the existing test framework:
test_async_to_account()- Async account creationtest_sync_to_account()- Sync account creationtest_async_to_account_secure()- Secure async account creationtest_sync_to_account_secure()- Secure sync account creationtest_to_account_with_tls_key()- TLS key deprecation warningtest_to_account_secure_with_tls_key()- Secure TLS key warningtest_deterministic_keys()- Deterministic key generationtest_different_keys_produce_different_accounts()- Key uniquenessDemo Application
The demo application (
examples/zetachain_demo.py) showcases:Use Cases
This integration enables powerful new use cases:
Why This Matters
ZetaChain + dstack combines two powerful technologies:
Together, they enable confidential omnichain applications with cryptographic security guarantees!
Documentation
sdk/python/examples/ZETACHAIN_README.mdChecklist
web3)Related Projects
This integration was built to support the ZetaChain ecosystem and bring TEE security to cross-chain applications.
π€ Generated with Claude Code
Co-Authored-By: Claude [email protected]