Compliance
Baseline Protocol ships with compliance primitives for regulated industries. The Govern layer (@baselineos/govern) provides a programmatic interface for running compliance checks with full audit trails.
Running a compliance check
Section titled “Running a compliance check”import { BaselineGovernSystem } from '@baselineos/govern';
const govern = new BaselineGovernSystem();
const check = await govern.compliance.check('AFCFTA-ROO', { originCountry: 'GH', destinationCountry: 'NG', localValuePercentage: 55, hasCertificateOfOrigin: true,});
console.log('Compliant:', check.compliance?.compliant);How it works
Section titled “How it works”- The compliance engine evaluates the input against the specified framework rules
- Each rule evaluation is recorded in the audit trail
- The result includes compliance status, individual rule outcomes, and any violations
- An evidence bundle is produced automatically for external audit
Audit trail integration
Section titled “Audit trail integration”Every compliance check feeds into the append-only audit trail. The audit entry includes:
- Framework identifier
- Input parameters
- Rule-by-rule evaluation results
- Final compliance determination
- Timestamp and actor identity
Extending compliance
Section titled “Extending compliance”Compliance frameworks are defined as rule sets. You can register custom frameworks for your domain-specific requirements through the Govern layer configuration.