��# Issue 16: Add Ballot Consistency Audit Report
Problem
No structured way to get full audit report. Requires multiple read calls to reconstruct state.
Solution
- Implement
get_audit_report(ballot_id_hash) returning complete BallotAuditReport struct
- Report includes: created_at, admin, tokens_issued, votes_cast, result_hash, is_consistent, state
- TypeScript helper
sorobanGetAuditReport() to fetch in single call
- Enables external verification and compliance audits
Implementation Tasks
Note for Contributors
Complete Issues #1, #9, #10, #12 (ballot metadata, state transitions, expiration, timestamps) first to have all report fields available. The audit report is a comprehensive snapshot of ballot state for compliance and verification purposes. Include all fields: created_at, admin, tokens_issued, votes_cast, result_hash, is_consistent flag, current state, expiration_time. This single function call replaces multiple read operations, improving efficiency. The report is read-only and immutable. Use this for external audits and compliance verification. Consider returning error if ballot doesn't exist (use Option or error type).
��# Issue 16: Add Ballot Consistency Audit Report
Problem
No structured way to get full audit report. Requires multiple read calls to reconstruct state.
Solution
get_audit_report(ballot_id_hash)returning completeBallotAuditReportstructsorobanGetAuditReport()to fetch in single callImplementation Tasks
BallotAuditReportstruct with all fieldsget_audit_report()function assembling all datasorobanGetAuditReport()Note for Contributors
Complete Issues #1, #9, #10, #12 (ballot metadata, state transitions, expiration, timestamps) first to have all report fields available. The audit report is a comprehensive snapshot of ballot state for compliance and verification purposes. Include all fields: created_at, admin, tokens_issued, votes_cast, result_hash, is_consistent flag, current state, expiration_time. This single function call replaces multiple read operations, improving efficiency. The report is read-only and immutable. Use this for external audits and compliance verification. Consider returning error if ballot doesn't exist (use Option or error type).