1import { ScellApiClient } from '@scell/sdk';
2
3const scell = new ScellApiClient('sk_live_your_api_key');
4
5// ─── Compliance overview ───────────────────────────────
6const status = await scell.fiscal.compliance();
7console.log(status.is_compliant); // true | false
8console.log(status.nf525_status);
9
10// ─── Immutable ledger entries ──────────────────────────
11const entries = await scell.fiscal.entries();
12
13// ─── Closings ──────────────────────────────────────────
14const closings = await scell.fiscal.closings();
15await scell.fiscal.dailyClosing(); // Trigger a daily closing
16
17// ─── Integrity verification ───────────────────────────
18const integrity = await scell.fiscal.integrity();
19const history = await scell.fiscal.integrityHistory();
20const forDate = await scell.fiscal.integrityForDate('2026-03-30');
21
22// ─── Fiscal rules engine ──────────────────────────────
23const rules = await scell.fiscal.rules();
24const newRule = await scell.fiscal.createRule({
25 key: 'auto_daily_closing',
26 value: true,
27 description: 'Automatically trigger daily closings at midnight',
28});
29await scell.fiscal.updateRule(newRule.id, { value: false });
30const detail = await scell.fiscal.ruleDetail('auto_daily_closing');
31const ruleHist = await scell.fiscal.ruleHistory('auto_daily_closing');
32await scell.fiscal.exportRules();
33await scell.fiscal.replayRules();
34
35// ─── TSA Anchors ──────────────────────────────────────
36const anchors = await scell.fiscal.anchors();
37
38// ─── Kill switch ──────────────────────────────────────
39const ksStatus = await scell.fiscal.killSwitchStatus();
40await scell.fiscal.activateKillSwitch();
41await scell.fiscal.deactivateKillSwitch();
42
43// ─── Exports ──────────────────────────────────────────
44const fec = await scell.fiscal.fecExport();
45const forensic = await scell.fiscal.forensicExport();
46const attestation = await scell.fiscal.attestation(2026);
47const download = await scell.fiscal.attestationDownload(2026);