Skip to content

feat: add get_wrap_hash convenience query - #627

Open
VictorEzenma wants to merge 1 commit into
zintarh:mainfrom
VictorEzenma:feature/get-wrap-hash
Open

feat: add get_wrap_hash convenience query#627
VictorEzenma wants to merge 1 commit into
zintarh:mainfrom
VictorEzenma:feature/get-wrap-hash

Conversation

@VictorEzenma

Copy link
Copy Markdown

I have completed the implementation of get_wrap_hash and verified the code correctness using cargo check.

Description

Added a new read-only query method get_wrap_hash to the StellarWrapContract to allow lightweight clients to retrieve only the data hash for a
user-period. This improves efficiency for clients performing integrity checks by avoiding the overhead of loading the full WrapRecord and its
associated fields (timestamp, archetype, etc.).

Changes:

  • Added get_wrap_hash to src/queries.rs to query the DataKey::Wrap and return only the data_hash field.
  • Exposed get_wrap_hash in the StellarWrapContract implementation within src/lib.rs.
  • Added test_get_wrap_hash in src/test.rs to verify the method works correctly for existing wraps and returns None for nonexistent ones.

Closes #279

@drips-wave

drips-wave Bot commented Aug 8, 2026

Copy link
Copy Markdown

@VictorEzenma Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

feature: Add get_wrap_hash convenience query

1 participant