Skip to content

feat: SDK hashing#39

Merged
cusma merged 9 commits intosdkfrom
sdk-hashing
Dec 30, 2025
Merged

feat: SDK hashing#39
cusma merged 9 commits intosdkfrom
sdk-hashing

Conversation

@cusma
Copy link
Copy Markdown
Collaborator

@cusma cusma commented Dec 30, 2025

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new hashing module to the SDK, centralizing hash computation functions that were previously duplicated across test helpers. The changes refactor existing code to use the new module and add comprehensive test coverage for all hashing functionality.

Key Changes:

  • Created new src/hashing.py module with hash computation functions (SHA-512/256, SHA-256, header/page/metadata hashing)
  • Refactored tests/helpers/factories.py to use the centralized hashing module instead of local implementations
  • Added extensive test coverage in tests/sdk/test_hashing.py with 973 lines of tests
  • Enhanced type safety with explicit type annotations in test files

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/hashing.py New module implementing ARC-89 and ARC-3 hash computation functions
src/init.py Exports new hashing functions in public API
src/codec.py Replaced assert with ValueError for better error handling
tests/helpers/factories.py Refactored to use centralized hashing module, removed duplicate implementations
tests/sdk/test_hashing.py Comprehensive test suite for all hashing functions
tests/test_asset_metadata_factory.py Added type annotations for better type safety
tests/smart_contract/test_arc89_get_metadata_b64_bytes_by_key.py Added type annotations for better type safety

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/codec.py Outdated
Comment thread src/codec.py Outdated
cusma and others added 2 commits December 30, 2025 19:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cusma cusma merged commit 71c637b into sdk Dec 30, 2025
1 check passed
@cusma cusma deleted the sdk-hashing branch December 30, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants