Skip to content

add pending balance and tests for confidetial transfer extension #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dvrvsimi
Copy link

@dvrvsimi dvrvsimi commented Jun 1, 2025

Summary

This PR introduces a new helper for querying and decrypting the pending balance of a confidential token account, and adds comprehensive tests for confidential transfer account info logic.

Changes

  • Adds get_pending_balance and related helpers to ApplyPendingBalanceAccountInfo.
  • Adds robust tests for:
    • Pending balance decryption and combination
    • Available balance decryption and error handling
    • Total balance calculation and overflow handling
    • Utility function combine_balances (including overflow cases)
  • Ensures all cryptographic edge cases and error paths are covered.

Motivation

  • Makes it easier for client code to query pending balances in confidential transfer accounts, such cases.

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.

None yet

1 participant