Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m22s
CI/CD Pipeline / Security Scanning (push) Successful in 2m30s
CI/CD Pipeline / Lint and Format (push) Failing after 44s
CI/CD Pipeline / Terraform Validation (push) Failing after 27s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 31s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 56s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 29s
Validation / validate-genesis (push) Successful in 34s
Validation / validate-terraform (push) Failing after 39s
Validation / validate-kubernetes (push) Failing after 14s
Validation / validate-smart-contracts (push) Failing after 20s
Validation / validate-security (push) Failing after 1m19s
Validation / validate-documentation (push) Failing after 27s
Verify Deployment / Verify Deployment (push) Failing after 1m13s
Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
2.4 KiB
JavaScript
55 lines
2.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.rollExternalTransferVerbiage = rollExternalTransferVerbiage;
|
|
exports.buildMt103Narrative = buildMt103Narrative;
|
|
exports.buildMt102Narrative = buildMt102Narrative;
|
|
exports.swiftKindForRequest = swiftKindForRequest;
|
|
/** OMNL central-bank external transfer verbiage roll (audit + operator copy) */
|
|
function rollExternalTransferVerbiage(req) {
|
|
const lines = [
|
|
'=== OMNL CENTRAL BANK — EXTERNAL TRANSFER VERBIAGE ROLL ===',
|
|
`Settlement ref: ${req.idempotencyKey}`,
|
|
`Value date: ${req.valueDate}`,
|
|
`Amount: ${req.amount} ${req.currency}`,
|
|
`Rail: ${req.rail}`,
|
|
`Money layers: ${req.moneyLayers.join(' + ')}`,
|
|
`Beneficiary: ${req.beneficiaryName}`,
|
|
`Creditor IBAN: ${req.creditorIban}`,
|
|
];
|
|
if (req.creditorBic)
|
|
lines.push(`Creditor BIC: ${req.creditorBic}`);
|
|
if (req.debtorIban)
|
|
lines.push(`Debtor IBAN: ${req.debtorIban}`);
|
|
if (req.orderingName)
|
|
lines.push(`Ordering party: ${req.orderingName}`);
|
|
lines.push(`Remittance: ${req.remittanceInfo}`);
|
|
if (req.swiftMessageKind)
|
|
lines.push(`SWIFT message: ${req.swiftMessageKind}`);
|
|
if (req.tradeFinance) {
|
|
lines.push(`Trade finance: ${req.tradeFinance.instrument} ref ${req.tradeFinance.reference}`);
|
|
}
|
|
if (req.rwaVerbiage?.externalTransferRoll) {
|
|
lines.push(`RWA roll: ${req.rwaVerbiage.assetClass} → line ${req.rwaVerbiage.tokenLineId}`);
|
|
}
|
|
if (req.convertToCrypto?.enabled) {
|
|
lines.push(`Post-settlement crypto conversion: chain ${req.convertToCrypto.targetChainId} → ${req.convertToCrypto.recipientAddress}`);
|
|
}
|
|
lines.push('', 'DISCLAIMER: Internal OMNL operator verbiage — not SWIFT NET transmission.', 'Fineract SoR + ISO 20022 archive bind settlement finality.');
|
|
return lines.join('\n');
|
|
}
|
|
function buildMt103Narrative(req) {
|
|
return `/BNF/${req.beneficiaryName}//${req.remittanceInfo}`.slice(0, 140);
|
|
}
|
|
function buildMt102Narrative(req) {
|
|
const tf = req.tradeFinance ? `/${req.tradeFinance.instrument}/${req.tradeFinance.reference}` : '';
|
|
return `/BNF/${req.beneficiaryName}${tf}//${req.remittanceInfo}`.slice(0, 140);
|
|
}
|
|
function swiftKindForRequest(req) {
|
|
if (req.swiftMessageKind)
|
|
return req.swiftMessageKind;
|
|
if (req.tradeFinance?.instrument === 'LS' || req.tradeFinance?.instrument === 'DLC') {
|
|
return 'MT102';
|
|
}
|
|
return 'MT103';
|
|
}
|