Labels: complexity: high
Implement generatePaymentReceipt(invoiceId, payerAddress) that compiles a payment receipt object from on-chain data: invoice details, total paid, timestamps, and a SHA-256 proof hash.
Acceptance criteria:
- Returns
{ invoiceId, payer, totalPaid, payments[], proofHash, generatedAt }
proofHash is SHA-256 of invoiceId + payer + totalPaid + ledgerTimestamp
- Works for both completed and in-progress invoices
- Exported with TypeScript types and optional JSON serialisation
Labels: complexity: high
Implement
generatePaymentReceipt(invoiceId, payerAddress)that compiles a payment receipt object from on-chain data: invoice details, total paid, timestamps, and a SHA-256 proof hash.Acceptance criteria:
{ invoiceId, payer, totalPaid, payments[], proofHash, generatedAt }proofHashis SHA-256 ofinvoiceId + payer + totalPaid + ledgerTimestamp