Shared KYC/AML compliance infrastructure for Solana. Accredit provides on-chain transfer enforcement and compliant DEX routing as reusable building blocks for regulated token applications.
Accredit is organized into two layers:
Core Layer — KYC verification and transfer enforcement via Token-2022 transfer hooks. Every token transfer is validated against an on-chain whitelist that tracks KYC level, jurisdiction, expiry, and daily volume limits.
Routing Layer — Compliance-aware DEX aggregation built on top of Jupiter. Routes are filtered to only pass through audited, whitelisted liquidity pools. Includes optional zero-knowledge proof support for privacy-preserving compliance.
┌───────────────────────────────┐
│ Accredit │
│ │
│ Core: │
│ transfer-hook program │
│ accredit-types crate │
│ @accredit/types │
│ @accredit/sdk │
│ │
│ Routing: │
│ compliant-registry program │
│ @accredit/router │
└───────────────┬───────────────-┘
│
┌────────────────┴───────────────┐
│ │
core + routing core only
│ │
┌────────▼────────┐ ┌──────────▼────────┐
│ Meridian │ │ Continuum │
│ (securities) │ │ (repo treasury) │
└─────────────────┘ └───────────────────┘
accredit/
├── crates/
│ └── accredit-types/ # Shared Rust types (KycLevel, Jurisdiction, helpers)
├── programs/
│ ├── transfer-hook/ # Token-2022 transfer hook — KYC enforcement
│ └── compliant-registry/ # Pool compliance registry — route verification
├── packages/
│ ├── types/ # @accredit/types — TypeScript type definitions
│ ├── sdk/ # @accredit/sdk — PDA derivation + KycClient
│ └── router/ # @accredit/router — compliance-aware Jupiter routing
└── tests/ # Integration tests (ts-mocha)
Token-2022 transfer hook that validates every token transfer against KYC/AML requirements:
- Wallet whitelist with KYC level, jurisdiction, and expiry
- Per-wallet daily volume tracking and limits
- Per-KYC-level transaction size limits
- Jurisdiction restrictions (USA blocked by default)
- Emergency pause/resume for the registry
- Authority transfer
See docs/programs/transfer-hook.md for full reference.
On-chain registry of audited DEX pools for compliant route verification:
- Pool registration with audit hash, jurisdiction, and KYC requirements
- Pool lifecycle management (Active / Suspended / Revoked)
- Batch route verification (validate all hops in a single instruction)
- Compliance config linking pool registry to KYC registry
See docs/programs/compliant-registry.md for full reference.
| Package | Description | Layer |
|---|---|---|
@accredit/types |
Shared type definitions (enums, interfaces, constants) | Core |
@accredit/sdk |
PDA derivation, KycClient, RegistryClient |
Core |
@accredit/router |
ComplianceAwareRouter, Jupiter integration, ZK proofs |
Routing |
See docs/sdk/ for usage guides.
- Rust (1.79+)
- Solana CLI (2.2.1+)
- Anchor (0.32.1)
- Node.js (20+)
- pnpm (8+)
# Install TypeScript dependencies
pnpm install
# Build Anchor programs
anchor build
# Build TypeScript packages
pnpm build# Run on-chain + SDK tests (requires solana-test-validator)
anchor test
# Run TypeScript package tests
pnpm testRust crate (in your program's Cargo.toml):
[dependencies]
accredit-types = { path = "../accredit/crates/accredit-types" }TypeScript packages (add accredit to your pnpm workspace):
# pnpm-workspace.yaml
packages:
- "packages/*"
- "../accredit/packages/*"Then in your package.json:
{
"dependencies": {
"@accredit/types": "workspace:*",
"@accredit/sdk": "workspace:*",
"@accredit/router": "workspace:*"
}
}See docs/integration.md for detailed integration instructions.
| Level | Description | Per-Transaction Limit |
|---|---|---|
| Basic | Email + phone verification | 100,000 JPY |
| Standard | Government ID document | 10,000,000 JPY |
| Enhanced | Video call + address proof | 100,000,000 JPY |
| Institutional | Corporate KYC/KYB | Unlimited |
| Jurisdiction | Code | Transfer Status |
|---|---|---|
| Japan | 0 | Allowed (primary market) |
| Singapore | 1 | Allowed |
| Hong Kong | 2 | Allowed |
| EU | 3 | Allowed |
| USA | 4 | Restricted |
| Other | 5 | Allowed |
- Architecture — System design, account structures, PDA derivation
- Transfer Hook Program — Instruction reference and account contexts
- Compliant Registry Program — Pool management and route verification
- SDK Guide —
@accredit/typesand@accredit/sdkusage - Router Guide —
@accredit/routercompliance-aware routing - Integration Guide — Adding Accredit to your project
| Tool | Version |
|---|---|
| Anchor | 0.32.1 |
| Solana | 2.2.1 |
| Rust | 2021 edition |
| TypeScript | 5.6+ |
| Node.js | 20+ |
MIT