Skip to content

The compliance engine is a standalone TypeScript library that sits between the payment engine and execution.

Notifications You must be signed in to change notification settings

PapillaeTech/compliance-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compliance-aml-engine

Standalone TypeScript compliance library with a single orchestration entry point: check().

Public API

import { createComplianceEngine } from 'compliance-aml-engine';

const engine = createComplianceEngine({
  amlBotApiKey: process.env.AMLBOT_API_KEY!,
  amlBotBaseUrl: 'https://api.amlbot.com',
  proofSigningKey: process.env.COMPLIANCE_PROOF_SIGNING_KEY!,
});

const decision = await engine.check({
  transferId: 'tr_123',
  userId: 'user_123',
  senderAddress: '0xabc...',
  senderChain: 'ethereum',
  recipientAddress: '0xdef...',
  recipientChain: 'ethereum',
  destinationChainId: 1,
  amountUsd: 1200,
  tokenSymbol: 'USDC',
  initiatedBy: 'human',
});

if (!decision.allowed) {
  console.log(decision.reason, decision.proofBundleId);
}

Internal Architecture

  • Shared types and policies live in src/core.
  • AMLBot integration is isolated under src/providers/amlbot.
  • Address screening flow: local sanctions cache -> AMLBot -> conditional two-hop analysis.
  • Rule engine runs prioritized AML pattern rules.
  • Risk evaluator converts checks + triggers into one final decision.
  • Proof builder signs complete compliance evidence with HMAC-SHA256.
  • Repositories are interface-driven; in-memory implementations are included for local/dev use.

Scripts

  • npm run typecheck
  • npm run build

About

The compliance engine is a standalone TypeScript library that sits between the payment engine and execution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors