Skip to content

Add payment receipt generator #297

Description

@Kingsman-99

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions