feat(settlement): add M3 and M4 money layers for full M0-M4 production
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m11s
CI/CD Pipeline / Lint and Format (push) Has been cancelled
CI/CD Pipeline / Terraform Validation (push) Has been cancelled
CI/CD Pipeline / Kubernetes Validation (push) Has been cancelled
CI/CD Pipeline / Security Scanning (push) Has been cancelled
Validation / validate-genesis (push) Has been cancelled
Validation / validate-terraform (push) Has been cancelled
Validation / validate-kubernetes (push) Has been cancelled
Validation / validate-smart-contracts (push) Has been cancelled
Validation / validate-security (push) Has been cancelled
Validation / validate-documentation (push) Has been cancelled
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 26s

Extend settlement-core with GL 2300 token liabilities (M3) and near-money aggregate (M4), wire middleware workflows and dashboards to expose all five layers end-to-end.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 06:27:23 -07:00
parent a5c16330ca
commit fce988dceb
23 changed files with 407 additions and 169 deletions

View File

@@ -203,7 +203,7 @@ export function createSettlementRouter(): Router {
expiryDate: body.tradeFinance?.expiryDate,
},
rail: 'SWIFT',
moneyLayers: body.moneyLayers ?? ['M1', 'M2'],
moneyLayers: body.moneyLayers ?? ['M0', 'M1', 'M2', 'M3', 'M4'],
});
const record = await processExternalTransfer(merged);
res.status(record.phase === 'FAILED' ? 422 : 200).json(record);
@@ -225,7 +225,7 @@ export function createSettlementRouter(): Router {
tokenLineId: body.convertToCrypto?.tokenLineId ?? `${body.currency ?? 'USD'}-M2`,
recipientAddress: body.convertToCrypto?.recipientAddress ?? '',
},
moneyLayers: ['M2'],
moneyLayers: ['M2', 'M3'],
});
const record = await processExternalTransfer(merged);
res.status(record.phase === 'FAILED' ? 422 : 200).json(record);
@@ -264,7 +264,7 @@ export function createSettlementRouter(): Router {
...body,
officeId: settlementOfficeId(body.officeId),
rail: 'INTERNAL',
moneyLayers: body.moneyLayers ?? ['M2'],
moneyLayers: body.moneyLayers ?? ['M2', 'M3'],
});
res.status(record.phase === 'FAILED' ? 422 : 200).json(record);
} catch (e) {
@@ -284,7 +284,7 @@ export function createSettlementRouter(): Router {
...body,
officeId: settlementOfficeId(body.officeId),
rail: body.rail === 'RTGS' ? 'RTGS' : 'SWIFT',
moneyLayers: body.moneyLayers ?? ['M2'],
moneyLayers: body.moneyLayers ?? ['M2', 'M4'],
});
res.status(record.phase === 'FAILED' ? 422 : 200).json(record);
} catch (e) {