Skip to content

feat(reconciliation): integrate Nirium Audit Trail anchor for settlement reports - #23

Open
Santia2004 wants to merge 1 commit into
wejoona:mainfrom
Santia2004:feat/reconciliation-nirium-audit-anchor
Open

Santia2004 wants to merge 1 commit into
wejoona:mainfrom
Santia2004:feat/reconciliation-nirium-audit-anchor

Conversation

@Santia2004

Copy link
Copy Markdown

Overview

Integrates cryptographic reconciliation anchoring against the Nirium Audit Trail for JoonaPay settlement reports and ledger batches.

Implementation Details

  • Audit Anchor Service (NiriumAuditAnchorService):
    • Consumes generated settlement reports/batches and verifies referenced on-chain transactions (stellar_tx_hash / tx_hash / providerReference).
    • Constructs a deterministic canonical settlement payload with strictly sorted key serialization.
    • Derives domain-separated Nirium-compatible audit CIDs (bafk-nirium-audit-<sha256>).
    • Subscribes asynchronously to settlement.report.generated events without altering fund custody or core ledger mutations.
  • Standalone Verification CLI:
    • Added scripts/verify-nirium-reconciliation-anchor.ts to allow compliance teams and external auditors to independently re-derive state hashes and verify ledger parity off-chain.
  • Testing & Exports:
    • Added unit test suite covering deterministic CID generation and non-zero fee/volume aggregation.
    • Exported service in ReconciliationModule.

Closes nirium-protocol/nirium#76

This branch has not been deployed

No deployments
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.

[Advanced] External integration: ledger reconciliation via audit-trail anchor for JoonaPay (real PR to wejoona/JoonaPay)

1 participant