Initial commit
This commit is contained in:
72
docs/volume-vi/README.md
Normal file
72
docs/volume-vi/README.md
Normal file
@@ -0,0 +1,72 @@
|
||||
# DBIS Volume VI Documentation
|
||||
|
||||
This directory contains documentation for DBIS Expansion Volume VI: Global Regulatory Harmonization, Sovereign Digital Identity, Autonomous Liquidity Systems, AML Pattern Language, and Financial Ontology.
|
||||
|
||||
## Overview
|
||||
|
||||
Volume VI expands DBIS into the global regulatory domain, universal sovereign identification, autonomous liquidity provisioning, next-generation AML intelligence, and unified financial ontology, forming the intellectual backbone of the DBIS global financial order.
|
||||
|
||||
## Modules
|
||||
|
||||
### 1. Unified DBIS Financial Ontology (UDFO)
|
||||
- **Location**: `src/core/ontology/udfo/`
|
||||
- **Services**: `udfo.service.ts`, `asset-ontology.service.ts`, `entity-ontology.service.ts`, `process-ontology.service.ts`, `ontology-validator.service.ts`
|
||||
- **API Routes**: `/api/v1/udfo`
|
||||
- **Documentation**: [udfo.md](./udfo.md)
|
||||
|
||||
### 2. Sovereign Digital Identity Passport (SDIP)
|
||||
- **Location**: `src/core/identity/sdip/`
|
||||
- **Services**: `sdip.service.ts`, `sdip-issuer.service.ts`, `sdip-verification.service.ts`, `sdip-revocation.service.ts`
|
||||
- **API Routes**: `/api/v1/sdip`
|
||||
- **Documentation**: [sdip.md](./sdip.md)
|
||||
|
||||
### 3. Global Regulatory Harmonization Suite (GRHS)
|
||||
- **Location**: `src/core/compliance/grhs/`
|
||||
- **Services**: `grhs.service.ts`, `regulatory-equivalence.service.ts`, `monetary-harmonization.service.ts`, `legal-harmonization.service.ts`, `compliance-harmonization.service.ts`, `trade-harmonization.service.ts`
|
||||
- **API Routes**: `/api/v1/grhs`
|
||||
- **Documentation**: [grhs.md](./grhs.md)
|
||||
|
||||
### 4. Global AML & Sanctions Engine (GASE)
|
||||
- **Location**: `src/core/compliance/gase/`
|
||||
- **Services**: `gase.service.ts`, `sanctions-sync.service.ts`, `pep-graph.service.ts`, `sas-calculator.service.ts`, `risk-tiering.service.ts`
|
||||
- **API Routes**: `/api/v1/gase`
|
||||
- **Documentation**: [gase.md](./gase.md)
|
||||
|
||||
### 5. Worldwide AML Pattern Language (WAPL)
|
||||
- **Location**: `src/core/compliance/wapl/`
|
||||
- **Services**: `wapl.service.ts`, `pattern-compiler.service.ts`, `pattern-library.service.ts`, `ml-enhancement.service.ts`
|
||||
- **API Routes**: `/api/v1/wapl`
|
||||
- **Documentation**: [wapl.md](./wapl.md)
|
||||
|
||||
### 6. Autonomous Liquidity Provision System (ALPS)
|
||||
- **Location**: `src/core/treasury/alps/`
|
||||
- **Services**: `alps.service.ts`, `liquidity-monitor.service.ts`, `stress-predictor.service.ts`, `liquidity-executor.service.ts`
|
||||
- **API Routes**: `/api/v1/alps`
|
||||
- **Documentation**: [alps.md](./alps.md)
|
||||
|
||||
## Database Schema
|
||||
|
||||
All Volume VI components use Prisma models defined in `prisma/schema.prisma`:
|
||||
|
||||
- UDFO: `UDFOAsset`, `UDFOEntity`, `UDFOProcess`, `OntologyMapping`
|
||||
- SDIP: `SovereignDigitalIdentityPassport`, `SDIPRevocation`
|
||||
- GRHS: `RegulatoryHarmonizationRule`, `RegulatoryEquivalenceScore`, `HarmonizationCompliance`, `FastTrackPrivilege`
|
||||
- GASE: `GlobalSanctionsList`, `PEPGraphNode`, `PEPGraphEdge`, `SuspiciousActivityScore`, `RiskTier`
|
||||
- WAPL: `WAPLPattern`, `PatternMatch`, `PatternAlert`
|
||||
- ALPS: `AutonomousLiquidityAction`, `LiquidityStressEvent`, `SovereignLiquidityRatio`
|
||||
|
||||
## Integration
|
||||
|
||||
Volume VI systems integrate with:
|
||||
|
||||
- **UDFO**: Used by smart contracts, CBDC ledgers, regulatory engines, risk models
|
||||
- **SDIP**: Extends GBIG (Volume V), uses quantum crypto service for PQ signatures
|
||||
- **GRHS**: Extends existing compliance framework, integrates with SRI, settlement systems
|
||||
- **GASE**: Extends AML service, integrates with WAPL, uses GBIG for entity linking
|
||||
- **WAPL**: Extends AML service, integrates with transaction monitoring
|
||||
- **ALPS**: Integrates with GLP (Volume III), uses SRI for risk assessment, monitors FX volatility
|
||||
|
||||
## License
|
||||
|
||||
UNLICENSED - Proprietary DBIS System
|
||||
|
||||
86
docs/volume-vi/alps.md
Normal file
86
docs/volume-vi/alps.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# Autonomous Liquidity Provision System (ALPS)
|
||||
|
||||
## Overview
|
||||
|
||||
ALPS is the autonomous liquidity engine of DBIS, providing real-time liquidity injections without human intervention. It includes real-time liquidity monitoring, predictive stress module, automated stabilization executor, and GLP interface.
|
||||
|
||||
## Architecture
|
||||
|
||||
ALPS includes:
|
||||
- **Real-time liquidity monitor**: Monitors SXLR (Sovereign Liquidity Ratio) for all sovereigns
|
||||
- **Predictive stress module**: Predicts liquidity stress events
|
||||
- **Automated stabilization executor**: Executes injections/withdrawals automatically
|
||||
- **GLP interface**: Integrates with Global Liquidity Pool
|
||||
|
||||
## Liquidity Injection Algorithm
|
||||
|
||||
```
|
||||
if (liquidity_ratio < threshold)
|
||||
amount = required_liquidity - current_liquidity
|
||||
inject(amount)
|
||||
```
|
||||
|
||||
Inputs:
|
||||
- SXLR (Sovereign Liquidity Ratio)
|
||||
- SRI risk levels
|
||||
- FX volatility indices
|
||||
- CBDC flow constraints
|
||||
|
||||
## Autonomous Liquidity Withdrawal
|
||||
|
||||
Reverse mechanism triggers when:
|
||||
- Excess liquidity → inflation risk
|
||||
- Settlement congestion decreases
|
||||
- FX bands stabilize
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Run Autonomous Engine
|
||||
```http
|
||||
POST /api/v1/alps/run
|
||||
```
|
||||
|
||||
### Monitor Liquidity
|
||||
```http
|
||||
GET /api/v1/alps/monitor
|
||||
GET /api/v1/alps/monitor/:sovereignBankId
|
||||
```
|
||||
|
||||
### Predict Stress Events
|
||||
```http
|
||||
POST /api/v1/alps/stress/predict
|
||||
GET /api/v1/alps/stress?sovereignBankId=xxx
|
||||
```
|
||||
|
||||
### Get Actions
|
||||
```http
|
||||
GET /api/v1/alps/actions?sovereignBankId=xxx&actionType=INJECTION
|
||||
```
|
||||
|
||||
### Manual Injection/Withdrawal
|
||||
```http
|
||||
POST /api/v1/alps/inject
|
||||
POST /api/v1/alps/withdraw
|
||||
```
|
||||
|
||||
## Usage Example
|
||||
|
||||
```typescript
|
||||
import { alpsService } from '@/core/treasury/alps';
|
||||
|
||||
// Run autonomous engine
|
||||
await alpsService.runAutonomousEngine();
|
||||
|
||||
// Monitor liquidity
|
||||
const ratios = await alpsService.monitorLiquidity();
|
||||
|
||||
// Predict stress events
|
||||
const events = await alpsService.predictStressEvents();
|
||||
```
|
||||
|
||||
## Database Models
|
||||
|
||||
- `AutonomousLiquidityAction`: Injection/withdrawal records
|
||||
- `LiquidityStressEvent`: Predicted stress events
|
||||
- `SovereignLiquidityRatio`: SXLR tracking
|
||||
|
||||
80
docs/volume-vi/gase.md
Normal file
80
docs/volume-vi/gase.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# Global AML & Sanctions Engine (GASE)
|
||||
|
||||
## Overview
|
||||
|
||||
GASE is the global AML and sanctions engine providing sovereign sanctions list synchronization, automated risk tiering of transactions, PEP graph linking, and Suspicious Activity Score (SAS) calculation.
|
||||
|
||||
## Core Functions
|
||||
|
||||
- **Sovereign Sanctions List Synchronization**: Unified sanctions list from OFAC, EU, UN, etc.
|
||||
- **Automated Risk Tiering**: Assign risk tiers (TIER_1 to TIER_4) to entities
|
||||
- **PEP Graph Linking**: Graph structure for Politically Exposed Persons and relationships
|
||||
- **Suspicious Activity Score (SAS)**: Multi-factor risk scoring for transactions
|
||||
|
||||
## Sanctions Matching Logic
|
||||
|
||||
```
|
||||
if fuzzy_match(entity.name, sanctions_list) > 0.93:
|
||||
block_transaction()
|
||||
```
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Synchronize Sanctions
|
||||
```http
|
||||
POST /api/v1/gase/sanctions/sync
|
||||
```
|
||||
|
||||
### Search Sanctions
|
||||
```http
|
||||
POST /api/v1/gase/sanctions/search
|
||||
```
|
||||
|
||||
### Add PEP
|
||||
```http
|
||||
POST /api/v1/gase/pep/add
|
||||
```
|
||||
|
||||
### Find PEP Connections
|
||||
```http
|
||||
GET /api/v1/gase/pep/:entityId/connections?maxDepth=2
|
||||
```
|
||||
|
||||
### Calculate SAS
|
||||
```http
|
||||
POST /api/v1/gase/sas/calculate
|
||||
GET /api/v1/gase/sas/:transactionId
|
||||
```
|
||||
|
||||
### Risk Tiering
|
||||
```http
|
||||
GET /api/v1/gase/risk-tier/:entityId
|
||||
POST /api/v1/gase/risk-tier/:entityId/assign
|
||||
```
|
||||
|
||||
## Usage Example
|
||||
|
||||
```typescript
|
||||
import { gaseService } from '@/core/compliance/gase';
|
||||
|
||||
// Synchronize sanctions lists
|
||||
await gaseService.syncSanctionsLists();
|
||||
|
||||
// Search sanctions
|
||||
const matches = await gaseService.searchSanctions('entity-name', 0.93);
|
||||
|
||||
// Calculate SAS
|
||||
const sas = await gaseService.calculateSAS(transactionId, entityId);
|
||||
|
||||
// Assign risk tier
|
||||
const riskTier = await gaseService.assignRiskTier(entityId);
|
||||
```
|
||||
|
||||
## Database Models
|
||||
|
||||
- `GlobalSanctionsList`: Unified sanctions list
|
||||
- `PEPGraphNode`: PEP graph nodes
|
||||
- `PEPGraphEdge`: PEP relationships
|
||||
- `SuspiciousActivityScore`: SAS calculations
|
||||
- `RiskTier`: Risk tier assignments
|
||||
|
||||
100
docs/volume-vi/grhs.md
Normal file
100
docs/volume-vi/grhs.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# Global Regulatory Harmonization Suite (GRHS)
|
||||
|
||||
## Overview
|
||||
|
||||
The GRHS establishes DBIS as a central harmonization authority aligning international regulations, sovereign banking laws, global AML/KYC frameworks, CBDC issuance standards, and trade finance and securities rules.
|
||||
|
||||
## Harmonization Pillars
|
||||
|
||||
### Pillar I – Monetary Harmonization
|
||||
- FX stabilization rules
|
||||
- Sovereign liquidity minimums
|
||||
- CBDC interoperability requirements
|
||||
|
||||
### Pillar II – Legal Harmonization
|
||||
- Standardized settlement law
|
||||
- Unified arbitration and enforcement
|
||||
- Cross-border recognition of DBIS authority
|
||||
|
||||
### Pillar III – Compliance Harmonization
|
||||
- FATF-Plus standards
|
||||
- Integrated sanctions regime
|
||||
- AML/KYC equivalency protocols
|
||||
|
||||
### Pillar IV – Trade Harmonization
|
||||
- ICC UCP/URDG/eUCP uniform adoption
|
||||
- Standardized digital document formats
|
||||
- Commodity and security tokenization rules
|
||||
|
||||
## Regulatory Equivalence Protocol (REP)
|
||||
|
||||
A sovereign may be declared **Regulatory Equivalent** if:
|
||||
|
||||
```
|
||||
REP_SCORE = (compliance + transparency + AML_strength + CBDC_maturity) / 4 ≥ 95%
|
||||
```
|
||||
|
||||
Grants:
|
||||
- Fast-track settlement privileges
|
||||
- Preferential liquidity access
|
||||
- Reduced oversight frequency
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Initialize GRHS
|
||||
```http
|
||||
POST /api/v1/grhs/initialize
|
||||
```
|
||||
|
||||
### Get REP Score
|
||||
```http
|
||||
GET /api/v1/grhs/rep/:sovereignBankId
|
||||
POST /api/v1/grhs/rep/:sovereignBankId/calculate
|
||||
```
|
||||
|
||||
### Assess Compliance
|
||||
```http
|
||||
GET /api/v1/grhs/compliance/:sovereignBankId
|
||||
```
|
||||
|
||||
### Fast-Track Privileges
|
||||
```http
|
||||
POST /api/v1/grhs/fast-track/:sovereignBankId
|
||||
GET /api/v1/grhs/fast-track/:sovereignBankId/:privilegeType
|
||||
```
|
||||
|
||||
### Get Rules
|
||||
```http
|
||||
GET /api/v1/grhs/rules/monetary
|
||||
GET /api/v1/grhs/rules/legal
|
||||
GET /api/v1/grhs/rules/compliance
|
||||
GET /api/v1/grhs/rules/trade
|
||||
```
|
||||
|
||||
## Usage Example
|
||||
|
||||
```typescript
|
||||
import { grhsService } from '@/core/compliance/grhs';
|
||||
|
||||
// Initialize GRHS
|
||||
await grhsService.initialize();
|
||||
|
||||
// Calculate REP score
|
||||
const repScore = await grhsService.calculateREPScore(sovereignBankId);
|
||||
|
||||
// Assess compliance
|
||||
const compliance = await grhsService.assessCompliance(sovereignBankId);
|
||||
|
||||
// Grant fast-track privileges
|
||||
if (repScore.equivalent) {
|
||||
await grhsService.grantFastTrackPrivileges(sovereignBankId);
|
||||
}
|
||||
```
|
||||
|
||||
## Database Models
|
||||
|
||||
- `RegulatoryHarmonizationRule`: Harmonization rules by pillar
|
||||
- `RegulatoryEquivalenceScore`: REP scores for sovereigns
|
||||
- `HarmonizationCompliance`: Compliance tracking per sovereign
|
||||
- `FastTrackPrivilege`: Fast-track settlement privileges
|
||||
|
||||
105
docs/volume-vi/sdip.md
Normal file
105
docs/volume-vi/sdip.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# Sovereign Digital Identity Passport (SDIP)
|
||||
|
||||
## Overview
|
||||
|
||||
SDIP is the global cryptographic identity passport for Sovereign Central Banks, private banks, individuals, institutions, and smart contracts. It is issued by the DBIS Sovereign Identity Fabric (SIF) and extends the GBIG system from Volume V.
|
||||
|
||||
## Passport Structure
|
||||
|
||||
```typescript
|
||||
SDIP = {
|
||||
entity_type: SCB | Bank | Person | Contract,
|
||||
sovereign_issuer: SCB,
|
||||
root_cert: HSM_SIGNATURE,
|
||||
pq_signature: DILITHIUM_SIGNATURE,
|
||||
expiry: YYYY-MM-DD,
|
||||
revocation_status: ACTIVE/REVOKED,
|
||||
attributes: {...}
|
||||
}
|
||||
```
|
||||
|
||||
## Trust Levels
|
||||
|
||||
- **TL0**: Anonymous/Unverified
|
||||
- **TL1**: Verified KYC/Bank
|
||||
- **TL2**: Sovereign Verified
|
||||
- **TL3**: SCB/High Authority
|
||||
- **TL4**: DBIS Governance-Level Access
|
||||
|
||||
## Lifecycle
|
||||
|
||||
1. Identity verification
|
||||
2. Key generation inside PQ-HSM
|
||||
3. Passport issuance
|
||||
4. Continuous trust scoring
|
||||
5. Expiration/renewal
|
||||
6. Revocation
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Issue Passport
|
||||
```http
|
||||
POST /api/v1/sdip/issue
|
||||
```
|
||||
|
||||
### Verify Passport
|
||||
```http
|
||||
GET /api/v1/sdip/verify/:passportId
|
||||
```
|
||||
|
||||
### Get Passport
|
||||
```http
|
||||
GET /api/v1/sdip/:passportId
|
||||
```
|
||||
|
||||
### Get Passports by Entity
|
||||
```http
|
||||
GET /api/v1/sdip/entity/:entityId
|
||||
```
|
||||
|
||||
### Calculate Trust Score
|
||||
```http
|
||||
GET /api/v1/sdip/:passportId/trust-score
|
||||
```
|
||||
|
||||
### Renew Passport
|
||||
```http
|
||||
POST /api/v1/sdip/:passportId/renew
|
||||
```
|
||||
|
||||
### Revoke Passport
|
||||
```http
|
||||
POST /api/v1/sdip/:passportId/revoke
|
||||
```
|
||||
|
||||
### Get Expiring Passports
|
||||
```http
|
||||
GET /api/v1/sdip/expiring?daysAhead=30
|
||||
```
|
||||
|
||||
## Usage Example
|
||||
|
||||
```typescript
|
||||
import { sdipService } from '@/core/identity/sdip';
|
||||
|
||||
// Issue passport
|
||||
const passport = await sdipService.issuePassport({
|
||||
entityType: 'SCB',
|
||||
entityId: 'entity-id',
|
||||
sovereignIssuer: 'OMNL',
|
||||
trustLevel: 'TL3',
|
||||
validityYears: 1,
|
||||
});
|
||||
|
||||
// Verify passport
|
||||
const verification = await sdipService.verifyPassport(passport.passportId);
|
||||
|
||||
// Calculate trust score
|
||||
const trustScore = await sdipService.calculateTrustScore(passport.passportId);
|
||||
```
|
||||
|
||||
## Database Models
|
||||
|
||||
- `SovereignDigitalIdentityPassport`: Passport records with PQ signatures
|
||||
- `SDIPRevocation`: Revocation records
|
||||
|
||||
92
docs/volume-vi/udfo.md
Normal file
92
docs/volume-vi/udfo.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# Unified DBIS Financial Ontology (UDFO)
|
||||
|
||||
## Overview
|
||||
|
||||
UDFO is the global financial language of DBIS, used by all smart contracts, CBDC ledgers, regulatory engines, risk models, and cross-chain protocols. It creates universal definitions for multi-asset terms.
|
||||
|
||||
## Architecture
|
||||
|
||||
UDFO consists of three ontology domains:
|
||||
|
||||
### Domain 1 – Assets
|
||||
- **FIAT**: Traditional government-issued currency
|
||||
- **CBDC**: Central Bank Digital Currency
|
||||
- **SSU**: Synthetic Settlement Unit
|
||||
- **COMMODITY**: Physical or digital commodity token
|
||||
- **SECURITY**: Tokenized security or financial instrument
|
||||
|
||||
### Domain 2 – Entities
|
||||
- **SCB**: Sovereign Central Bank
|
||||
- **BANK**: Private commercial or investment bank
|
||||
- **INDIVIDUAL**: Individual person or wallet holder
|
||||
- **INSTITUTION**: Corporate or institutional entity
|
||||
- **CONTRACT**: Deterministic smart contract
|
||||
|
||||
### Domain 3 – Processes
|
||||
- **SETTLEMENT**: Dual-ledger posting resulting in finality
|
||||
- **ISSUANCE**: Creation of new asset units by authorized issuer
|
||||
- **CONVERSION**: Exchange of one asset type for another
|
||||
- **REDEMPTION**: Return of asset to issuer for underlying value
|
||||
- **COLLATERALIZATION**: Use of asset as collateral for obligation
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Initialize UDFO
|
||||
```http
|
||||
POST /api/v1/udfo/initialize
|
||||
```
|
||||
|
||||
### Get All Definitions
|
||||
```http
|
||||
GET /api/v1/udfo/definitions
|
||||
```
|
||||
|
||||
### Get Assets
|
||||
```http
|
||||
GET /api/v1/udfo/assets
|
||||
GET /api/v1/udfo/assets/:code
|
||||
```
|
||||
|
||||
### Get Entities
|
||||
```http
|
||||
GET /api/v1/udfo/entities
|
||||
GET /api/v1/udfo/entities/:identifier
|
||||
```
|
||||
|
||||
### Get Processes
|
||||
```http
|
||||
GET /api/v1/udfo/processes
|
||||
GET /api/v1/udfo/processes/:code
|
||||
```
|
||||
|
||||
### Validate Ontology
|
||||
```http
|
||||
POST /api/v1/udfo/validate
|
||||
```
|
||||
|
||||
## Usage Example
|
||||
|
||||
```typescript
|
||||
import { udfoService } from '@/core/ontology/udfo';
|
||||
|
||||
// Initialize UDFO
|
||||
await udfoService.initialize();
|
||||
|
||||
// Get asset definition
|
||||
const asset = await udfoService.getAssetService().getAssetByCode('SSU');
|
||||
|
||||
// Validate smart contract against ontology
|
||||
const validation = await udfoService.getValidatorService().validate({
|
||||
assetId: 'SSU',
|
||||
processId: 'SETTLEMENT',
|
||||
contractCode: contractCode,
|
||||
});
|
||||
```
|
||||
|
||||
## Database Models
|
||||
|
||||
- `UDFOAsset`: Asset definitions
|
||||
- `UDFOEntity`: Entity definitions
|
||||
- `UDFOProcess`: Process definitions
|
||||
- `OntologyMapping`: Cross-domain mappings
|
||||
|
||||
86
docs/volume-vi/wapl.md
Normal file
86
docs/volume-vi/wapl.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# Worldwide AML Pattern Language (WAPL)
|
||||
|
||||
## Overview
|
||||
|
||||
WAPL is the global AML pattern recognition language used by DBIS to detect illicit transfers, identify layering, smurfing, structuring, flag cross-border velocity anomalies, detect SSU manipulation, and identify DeFi laundering schemes.
|
||||
|
||||
## Pattern Syntax
|
||||
|
||||
### Example Pattern: Circular FX Laundering
|
||||
|
||||
```
|
||||
pattern CIRCULAR_FX:
|
||||
if occurs(
|
||||
FX_trade[X].pair == FX_trade[Y].pair.reverse &&
|
||||
abs(FX_trade[X].amount - FX_trade[Y].amount) < tolerance &&
|
||||
entity_link(X.entity, Y.entity) == true
|
||||
) raise_alert("Circular FX pattern detected")
|
||||
```
|
||||
|
||||
### Example Pattern: High-Velocity CBDC Layering
|
||||
|
||||
```
|
||||
pattern CBDC_LAYERING:
|
||||
if velocity(wallet) > threshold &&
|
||||
hops(wallet) > 4 &&
|
||||
transaction_type == "micro-split":
|
||||
raise_alert("CBDC layering risk")
|
||||
```
|
||||
|
||||
## Machine-Learning Enhanced Patterns
|
||||
|
||||
WAPL integrates:
|
||||
- Graph embeddings
|
||||
- Anomaly detection
|
||||
- Statistical signatures
|
||||
- Behavioral clustering
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Initialize WAPL
|
||||
```http
|
||||
POST /api/v1/wapl/initialize
|
||||
```
|
||||
|
||||
### Get Patterns
|
||||
```http
|
||||
GET /api/v1/wapl/patterns
|
||||
GET /api/v1/wapl/patterns/:patternCode
|
||||
```
|
||||
|
||||
### Match Patterns
|
||||
```http
|
||||
POST /api/v1/wapl/match/:transactionId
|
||||
```
|
||||
|
||||
### Get Alerts
|
||||
```http
|
||||
GET /api/v1/wapl/alerts?status=PENDING
|
||||
```
|
||||
|
||||
### Create Pattern
|
||||
```http
|
||||
POST /api/v1/wapl/patterns
|
||||
```
|
||||
|
||||
## Usage Example
|
||||
|
||||
```typescript
|
||||
import { waplService } from '@/core/compliance/wapl';
|
||||
|
||||
// Initialize WAPL
|
||||
await waplService.initialize();
|
||||
|
||||
// Match transaction against patterns
|
||||
const matches = await waplService.matchPatterns(transactionId);
|
||||
|
||||
// Get alerts
|
||||
const alerts = await waplService.getAlerts('PENDING');
|
||||
```
|
||||
|
||||
## Database Models
|
||||
|
||||
- `WAPLPattern`: Pattern definitions
|
||||
- `PatternMatch`: Pattern match results
|
||||
- `PatternAlert`: Generated alerts
|
||||
|
||||
Reference in New Issue
Block a user