Skip to content

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.

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);
  1. The compliance engine evaluates the input against the specified framework rules
  2. Each rule evaluation is recorded in the audit trail
  3. The result includes compliance status, individual rule outcomes, and any violations
  4. An evidence bundle is produced automatically for external audit

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

Compliance frameworks are defined as rule sets. You can register custom frameworks for your domain-specific requirements through the Govern layer configuration.

  • Evidence — How evidence bundles are structured
  • Policies — Configure governance policies
  • REST API — Compliance endpoints in the API