/**
 * Legacy / rail protocols visible to the quantum translation & compatibility layer.
 * Aligns with SolaceNet gateway rails where applicable (see gateway-adapter-registry).
 */
export type LegacyProtocol =
	| 'SWIFT'
	| 'ISO20022'
	| 'ACH'
	| 'SEPA'
	| 'PRIVATE_BANK'
	| 'KTT_EVIDENCE'
	| 'TT_ROUTE'
	| 'DTC_SETTLEMENT'
	| 'DTCC_NSCC'
	| 'DTCC_FICC'
	| 'SWIFT_GPI'
	| 'MOJALOOP'
	| 'RTGS'
	| 'CARD_NETWORK';

/** Subset used for SolaceNet-aligned scaffolds (non-SWIFT/ACH core banking). */
export const SOLACENET_EXTENDED_PROTOCOLS: readonly LegacyProtocol[] = [
	'KTT_EVIDENCE',
	'TT_ROUTE',
	'DTC_SETTLEMENT',
	'DTCC_NSCC',
	'DTCC_FICC',
	'SWIFT_GPI',
	'MOJALOOP',
	'RTGS',
	'CARD_NETWORK',
] as const;

export function isSolaceNetExtendedProtocol(p: string): p is LegacyProtocol {
	return (SOLACENET_EXTENDED_PROTOCOLS as readonly string[]).includes(p);
}

/** All values accepted by quantum translation / compatibility services. */
export const ALL_LEGACY_PROTOCOLS: readonly LegacyProtocol[] = [
	'SWIFT',
	'ISO20022',
	'ACH',
	'SEPA',
	'PRIVATE_BANK',
	...SOLACENET_EXTENDED_PROTOCOLS,
] as const;
