Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m3s
CI/CD Pipeline / Security Scanning (push) Successful in 2m58s
CI/CD Pipeline / Lint and Format (push) Failing after 46s
CI/CD Pipeline / Terraform Validation (push) Failing after 26s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 29s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 41s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 22s
OMNL reconcile anchor / Run omnl:reconcile and upload artifacts (push) Failing after 24s
Validation / validate-genesis (push) Successful in 32s
Validation / validate-terraform (push) Failing after 28s
Validation / validate-kubernetes (push) Failing after 13s
Validation / validate-smart-contracts (push) Failing after 12s
Validation / validate-security (push) Failing after 1m31s
Validation / validate-documentation (push) Failing after 23s
Verify Deployment / Verify Deployment (push) Failing after 1m4s
Add BTC L1 settle/reconcile/ledger APIs, bitcoind intake, cBTC PMM hot-LP scripts, and custody credential smoke tests (secrets stay gitignored). Enables full-prod local green health and server pull-deploy for secure.omdnl.org /btc/*. Co-authored-by: Cursor <cursoragent@cursor.com>
59 lines
1.6 KiB
JavaScript
59 lines
1.6 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Smoke local settlement BTC rails after rebuild.
|
|
* Usage: node scripts/deployment/smoke-btc-settlement.mjs
|
|
* Env: SETTLEMENT_URL (default http://127.0.0.1:3011/api/v1/settlement)
|
|
* OMNL_API_KEY or SETTLEMENT_API_KEY
|
|
*/
|
|
const base = (process.env.SETTLEMENT_URL || 'http://127.0.0.1:3011/api/v1/settlement').replace(
|
|
/\/$/,
|
|
'',
|
|
);
|
|
const key = process.env.OMNL_API_KEY || process.env.SETTLEMENT_API_KEY || '';
|
|
|
|
async function get(path) {
|
|
const res = await fetch(`${base}${path}`, {
|
|
headers: { Authorization: `Bearer ${key}`, Accept: 'application/json' },
|
|
});
|
|
const text = await res.text();
|
|
let body;
|
|
try {
|
|
body = JSON.parse(text);
|
|
} catch {
|
|
body = text;
|
|
}
|
|
return { status: res.status, body };
|
|
}
|
|
|
|
const health = await get('/health');
|
|
const ledger = await get('/btc/ledger');
|
|
const settlements = await get('/btc/settlements?limit=10');
|
|
|
|
const settledSats = ledger.body?.mintQueue?.settledSats ?? 0;
|
|
const ok =
|
|
health.status === 200 &&
|
|
ledger.status === 200 &&
|
|
settlements.status === 200 &&
|
|
Number(settledSats) >= 100_000_000_000;
|
|
|
|
console.log(
|
|
JSON.stringify(
|
|
{
|
|
base,
|
|
health: health.status,
|
|
ledger: ledger.status,
|
|
settlements: settlements.status,
|
|
custodyHo12015: ledger.body?.gl?.custodyHo12015,
|
|
settledSats,
|
|
settlementCount: ledger.body?.mintQueue?.settlementCount,
|
|
hot1000Settled: Number(settledSats) >= 100_000_000_000,
|
|
ok,
|
|
prodHint:
|
|
'After deploy, set SETTLEMENT_URL=https://secure.omdnl.org/settlement and re-run this smoke',
|
|
},
|
|
null,
|
|
2,
|
|
),
|
|
);
|
|
process.exit(ok ? 0 : 1);
|