@fabrknt/sdk
v0.3.0
Published
Open source SDK for building crypto financial operations on Solana. SDK primitives and patterns for developers. Each module can be used independently or together.
Maintainers
Readme
🛠️ Fabrknt
Open source SDK for building crypto financial operations on Solana
⚠️ Beta: Fabrknt is currently in beta (development). npm publication is coming soon. Install directly from GitHub for now.
Fabrknt provides SDK primitives and execution patterns that help developers build crypto payment systems, treasury tools, and financial workflows — without reinventing security, parallel execution, or transaction orchestration. Each module works independently or together.
Installation (Beta)
git clone https://github.com/fabrknt/fabrknt.git
cd fabrknt
npm installNote: npm package @fabrknt/sdk will be available soon. Stay tuned!
Documentation | Examples | API Reference | Discord
Why Fabrknt?
Building financial operations on crypto is harder than it should be. Most teams end up:
- Reinventing transaction security → vulnerable to drains, reentrancy, slippage
- Building retry logic from scratch → unreliable execution, lost transactions
- Ignoring parallel execution → high gas costs, slow processing
- Skipping accounting integration → reconciliation nightmares
Fabrknt solves this with pre-built patterns you can use in your applications.
What You Get
🧱 Core Primitives
Core components for secure, efficient crypto operations. Each module can be used independently or integrated through the unified SDK:
- Guard - Security validation layer preventing drains, excessive slippage, malicious calls
- Loom - Parallel transaction optimization for maximum throughput, minimum gas
- Flow - Multi-DEX liquidity routing with Jupiter V6 integration
- Risk - AI-driven risk assessment and compliance checks
- Privacy - ZK Compression for cost-efficient private transactions
📚 Pattern Library
Pre-built execution patterns for common workflows:
Financial Operations
BatchPayoutPattern- Secure batch payments with Guard protectionRecurringPaymentPattern- Scheduled payments with retry logic (subscriptions, payroll)TokenVestingPattern- Token vesting with cliff periods and linear unlocks
DAO Treasury
TreasuryRebalancing- Maintain target asset allocationsYieldFarmingPattern- Optimize yields across protocols
Trading & DeFi
GridTradingPattern- Automated grid trading strategiesDCAStrategy- Dollar cost averaging automationArbitragePattern- Multi-DEX arbitrage with Jupiter V6SwapPattern- Multi-route swap optimizationLiquidityPattern- Automated liquidity provision
🔗 Chain Abstraction
Portable components that work across Solana and EVM chains (Ethereum, Polygon, Arbitrum).
Quick Start
Installation (Beta)
git clone https://github.com/fabrknt/fabrknt.git
cd fabrknt
npm installNote: npm package @fabrknt/sdk publication is coming soon. For now, install directly from GitHub.
Basic Example: Batch Payments
import { BatchPayoutPattern, Guard } from "@fabrknt/sdk";
// Create secure batch payout with Guard protection
const payroll = new BatchPayoutPattern({
name: "Monthly Payroll",
recipients: [
{ wallet: "7xKXtg...", amount: 5000, token: "USDC", id: "emp-001" },
{ wallet: "9zYpKm...", amount: 3000, token: "USDC", id: "emp-002" },
],
guard: new Guard({
maxSlippage: 0.01,
mode: "block",
}),
enableParallel: true, // Use Loom for gas optimization
generateReport: true, // Export CSV for accounting
});
// Execute with automatic retries and Guard validation
const result = await payroll.execute();
console.log(`Processed: ${result.transactions.length} payments`);
console.log(`Gas cost: ${result.metrics.actualCost} SOL`);
console.log(`Report:`, result.metadata?.csvReport);Advanced Example: Trading Bot with Risk Management
import { ArbitragePattern, Guard, Pulsar } from "@fabrknt/sdk";
// Create arbitrage pattern with risk assessment
const arbitrage = new ArbitragePattern({
name: "Multi-DEX Arbitrage",
pairs: [
{
base: { mint: "So11...", symbol: "SOL", decimals: 9 },
quote: { mint: "EPjF...", symbol: "USDC", decimals: 6 },
},
],
dexs: [
{ name: "Orca", programId: "whirL...", feeTier: 0.003 },
{ name: "Raydium", programId: "Rayd...", feeTier: 0.0025 },
],
minProfitPercent: 0.5,
enableRealDEX: true, // Live Jupiter V6 integration
guard: new Guard({
mode: "block",
maxSlippage: 0.02,
pulsar: {
enabled: true,
riskThreshold: 0.7, // Block high-risk transactions
},
}),
});
const result = await arbitrage.execute();
console.log(`Profit: $${result.metadata?.totalProfit}`);Architecture
Fabrknt uses a layered architecture optimized for Solana's parallel execution:
Your Application
↓
┌──────────────────────────────────┐
│ Pattern Library │ ← Pre-built workflows
│ (BatchPayout, Treasury, etc) │
├──────────────────────────────────┤
│ Core Primitives │
│ (Guard, Loom, Flow, Risk) │ ← Composable components
├──────────────────────────────────┤
│ Chain Abstraction Layer │ ← Solana + EVM support
└──────────────────────────────────┘
↓
BlockchainKey Design Principles:
- Composable - Mix and match primitives for your use case
- Comprehensive - Complete SDK with primitives and patterns
- Solana-First - Optimized for Sealevel's parallel execution
- Cross-Chain - Portable to EVM chains via abstraction layer
Use Cases
What Developers Are Building
Crypto Payroll Systems
// Build automated payroll with compliance reporting
BatchPayoutPattern + Guard + accounting export
Example: Monthly USDC salary payments to 50 employeesDAO Treasury Tools
// Build DAO treasury management dashboards
TreasuryRebalancing + Risk + governance integration
Example: Automated rebalancing for $1M+ treasuriesTrading Bots
// Build automated trading strategies
GridTradingPattern + ArbitragePattern + Jupiter V6
Example: Market-making bots, arbitrage scannersDeFi Protocols
// Build swap aggregators, liquidity managers
SwapPattern + LiquidityPattern + multi-DEX routing
Example: Optimal execution for large swapsSubscription Platforms
// Build recurring billing systems
RecurringPaymentPattern + Guard + accounting
Example: SaaS billing in stablecoins, membership subscriptionsToken Vesting Systems
// Build token distribution platforms
TokenVestingPattern + Guard + compliance reporting
Example: Team vesting, investor unlocks, advisor compensationDocumentation
Getting Started
- Installation Guide - Setup and installation
- Getting Started Guide - Quick start with your first pattern
- Core Concepts - Understanding Fabrknt architecture
Patterns
- Batch Payout Pattern - Secure batch payments
- Recurring Payments - Automated recurring billing
- Token Vesting - Token vesting schedules
- Pattern Library - Complete pattern documentation
Primitives
- Guard (Security)
- Loom (Parallel Execution)
- Flow (DEX Integration)
- Risk (Risk Assessment)
- Privacy (ZK Compression)
API Reference
- API Overview - Complete API reference
- TypeScript Types - Type definitions
Tutorials
- Building a Payroll System - Step-by-step payroll tutorial
- Building a DAO Treasury - Treasury management tutorial
Examples
Check out complete example implementations:
- Crypto Payroll - Batch payment processing with accounting
- DAO Treasury - Automated rebalancing and reporting
- Grid Trading Bot - Automated market making
- Subscription Billing - Recurring payment system
- DEX Aggregator - Multi-route swap optimization
Roadmap
- [x] Phase 1: SDK Consolidation - Core primitives integrated
- [x] Phase 2: Pattern Library - Trading, treasury, DeFi patterns
- [x] Phase 2.5: Financial Operations - Payroll, subscription patterns
- [ ] Phase 3: Chain Abstraction - Full EVM support
- [ ] Phase 4: Developer Platform - Hosted APIs, monitoring, analytics
- [ ] Phase 5: Enterprise Features - SLA, dedicated support, custom patterns
🛠️ Core Repositories
Fabrknt is composed of five core repositories, each providing specialized functionality. Each repository can be used independently or integrated through the unified @fabrknt/sdk package. Pick what you need:
- flow - The Liquidity Backbone
- guard - Security & Compliance
- loom - Parallel Execution Logic
- risk - Risk: RWA Risk Oracle & Integrity Gateway
- privacy - Privacy: Shielded State Middleware & Privacy Layer
Use independently: Each repository is a standalone project with its own documentation, tests, and release cycle.
Use together: Integrate all modules through the unified @fabrknt/sdk package for a complete solution.
Community & Support
Open Source
- GitHub: github.com/fabrknt/fabrknt
- Issues: Report bugs, request features
- Discussions: Ask questions, share ideas
Resources
- Documentation: Comprehensive guides and API reference
- Examples: Production-ready code samples
- Blog: Technical deep dives and tutorials
Commercial Support (Coming Soon)
- Hosted API: Managed infrastructure ($99-199/mo)
- Priority Support: Direct access to maintainers ($499/mo)
- Enterprise: SLA, custom integration, dedicated support (Contact)
Contributing
We welcome contributions! Fabrknt is built by developers, for developers.
- Code: Submit PRs for bug fixes, new patterns, documentation
- Patterns: Share your production patterns with the community
- Feedback: Tell us what you're building, what you need
See CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE
Built with ❤️ for the Solana developer community
Status
- 417 Tests Passing ✅
- 100% TypeScript ✅
- Production-Ready ✅
- Open Source ✅
Latest Release: v0.3.0
Why "Fabrknt"?
In parallel execution, transactions aren't a linear chain—they're a complex fabric. Fabrknt provides the tools to design, optimize, and secure this fabric, ensuring every thread executes with maximum efficiency and zero conflict.
Weaving reliable financial operations on-chain.
