Standalone TypeScript compliance library with a single orchestration entry point: check().
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);
}- 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.
npm run typechecknpm run build