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

@@ -332,7 +332,7 @@ router.get('/omnl/health', async (req: Request, res: Response) => {
});
/**
* POST /omnl/settlement/token-load — M2 fiat-backed token mint (Office 24 settlement).
* POST /omnl/settlement/token-load — M2→M3 fiat-backed token mint (Office 24 settlement).
*/
router.post('/omnl/settlement/token-load', async (req: Request, res: Response) => {
const { lineId, amount, recipient, settlementRef, dryRun, symbol, tokenAddress } = req.body as {
@@ -370,13 +370,13 @@ router.post('/omnl/settlement/token-load', async (req: Request, res: Response) =
symbol: symbol ?? null,
tokenAddress: tokenAddress ?? null,
settlementRef: settlementRef ?? null,
moneyLayer: 'M2',
moneyLayer: 'M3',
loadFromGl: '2200',
creditGl: '2300',
capabilities,
txHash: null,
chainRailConfigured: chainRailConfigured(),
message: 'M2 token load validated — set SETTLEMENT_ALLOW_CHAIN_MINT_EXECUTE=1 to mint on-chain',
message: 'M2→M3 token load validated — set SETTLEMENT_ALLOW_CHAIN_MINT_EXECUTE=1 to mint on-chain',
});
return;
}
@@ -406,10 +406,10 @@ router.post('/omnl/settlement/token-load', async (req: Request, res: Response) =
symbol: symbol ?? null,
tokenAddress,
settlementRef: settlementRef ?? null,
moneyLayer: 'M2',
moneyLayer: 'M3',
capabilities,
txHash,
message: 'M2 token minted on Chain 138 — tradable, swappable, transferable',
message: 'M3 token minted on Chain 138 — tradable, swappable, transferable',
});
} catch (e) {
const msg = e instanceof Error ? e.message : String(e);