Files
smom-dbis-138/packages/settlement-core/dist/chain-registry.js
zaragoza444 5dd67e2b1d
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
feat: OMNL Bank online production — 128 chains, Central Bank UI, settlement stack
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 08:49:36 -07:00

44 lines
1.7 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveChainRegistryPath = resolveChainRegistryPath;
exports.loadOmnlChainRegistry = loadOmnlChainRegistry;
exports.getActiveChains = getActiveChains;
exports.getChainById = getChainById;
exports.getSupportedChainIds128 = getSupportedChainIds128;
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
let cached = null;
function resolveChainRegistryPath() {
if (process.env.OMNL_SUPPORTED_CHAINS_CONFIG)
return process.env.OMNL_SUPPORTED_CHAINS_CONFIG;
const candidates = [
path_1.default.resolve(process.cwd(), 'config/omnl-supported-chains.v1.json'),
path_1.default.resolve(__dirname, '../../../config/omnl-supported-chains.v1.json'),
path_1.default.resolve(__dirname, '../../../../config/omnl-supported-chains.v1.json'),
];
for (const p of candidates) {
if (fs_1.default.existsSync(p))
return p;
}
return candidates[1];
}
function loadOmnlChainRegistry() {
if (cached)
return cached;
const p = resolveChainRegistryPath();
cached = JSON.parse(fs_1.default.readFileSync(p, 'utf8'));
return cached;
}
function getActiveChains() {
return loadOmnlChainRegistry().chains.filter((c) => c.status === 'active');
}
function getChainById(chainId) {
return loadOmnlChainRegistry().chains.find((c) => c.chainId === chainId);
}
function getSupportedChainIds128() {
return loadOmnlChainRegistry().chains.map((c) => c.chainId);
}