feat(chain138): ISO20022 gateway, swift-listener, and address inventory sync.
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m14s
CI/CD Pipeline / Security Scanning (push) Successful in 2m20s
CI/CD Pipeline / Lint and Format (push) Failing after 44s
CI/CD Pipeline / Terraform Validation (push) Failing after 23s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 24s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 25s
Validation / validate-genesis (push) Successful in 26s
Validation / validate-terraform (push) Failing after 23s
Validation / validate-kubernetes (push) Failing after 8s
Validation / validate-smart-contracts (push) Failing after 9s
Validation / validate-security (push) Failing after 1m13s
Validation / validate-documentation (push) Failing after 17s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 28s
Verify Deployment / Verify Deployment (push) Failing after 1m18s

Update checkpoint-core ISO20022 types/hashes, swift-listener canonical mapping, and chain138 address inventory.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
defiQUG
2026-06-19 16:17:18 -07:00
parent dc9ecd8963
commit 55912d1143
46 changed files with 711 additions and 47 deletions

View File

@@ -22,3 +22,11 @@ export function hashShortUtf8(value: string): string {
if (!value) return ethers.ZeroHash;
return ethers.keccak256(ethers.toUtf8Bytes(value));
}
/** KTT off-chain test-key attestation per SMART_CONTRACTS_ISO20022_FIN_METHODOLOGY §5.3 */
export function authAttestationHashFromProof(testKeyProof: string, normalizedBody: string): string {
const proof = testKeyProof.trim();
const body = normalizedBody.trim();
if (!proof && !body) return ethers.ZeroHash;
return ethers.keccak256(ethers.concat([ethers.toUtf8Bytes(proof), ethers.toUtf8Bytes(body)]));
}

View File

@@ -1,17 +1,18 @@
/** ISO 20022 / SWIFT MT-103+ canonical message (off-chain full payload; on-chain hashes). */
export type IsoMessageTypeCode = 0 | 1 | 2 | 3 | 4;
export type IsoMessageTypeCode = 0 | 1 | 2 | 3 | 4 | 5;
/** 0=unknown, 1=MT103, 2=pacs.008, 3=pain.001, 4=chain138 synthetic (from native tx) */
/** 0=unknown, 1=MT103, 2=pacs.008, 3=pain.001, 4=chain138 synthetic, 5=KTT/telex */
export const MSG_TYPE = {
UNKNOWN: 0 as IsoMessageTypeCode,
MT103: 1 as IsoMessageTypeCode,
PACS008: 2 as IsoMessageTypeCode,
PAIN001: 3 as IsoMessageTypeCode,
CHAIN138_SYNTH: 4 as IsoMessageTypeCode,
KTT: 5 as IsoMessageTypeCode,
} as const;
export type CanonicalPaymentMessage = {
msgType: 'MT103' | 'pacs.008' | 'pain.001' | 'chain138.synthetic';
msgType: 'MT103' | 'pacs.008' | 'pain.001' | 'chain138.synthetic' | 'KTT' | 'TELEX_KTT';
msgTypeCode: IsoMessageTypeCode;
instructionId: string;
instructionIdBytes32: string;
@@ -32,6 +33,8 @@ export type CanonicalPaymentMessage = {
amountSmallestUnit: string;
tokenAddress?: string;
payloadHash: string;
/** keccak256(testKeyProof || normalizedBody) when KTT test-key verified off-chain */
authAttestationHash?: string;
debtorRefHash: string;
creditorRefHash: string;
purposeHash: string;