Important
Active Integration Phase: Cash.io is currently in its frontend integration phase. Some features, particularly those involving cross-chain bridging and real-time proof generation, may be experimental or non-functional in the current build as we synchronize our agents, relayers, and frontend components.
POA Cash.io is a cutting-edge decentralized application that provides zero-fee, privacy-preserving cross-chain transactions across Ethereum, Solana, and Bitcoin (via Rootstock) networks, all rolled up on an Avalanche Subnet-EVM hub chain.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CASH.IO ARCHITECTURE β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Ethereum β β Solana β β Rootstock β β Bitcoin β β
β β Bridge β β Bridge β β Bridge β β (via RSK) β β
β ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ β
β β β β β β
β ββββββββββββββββββ¬β΄ββββββββββββββββββ΄ββββββββββββββββββ β
β β β
β βββββββΌββββββ β
β β Relayer β β Cross-chain event watchers β
β β Network β β
β βββββββ¬ββββββ β
β β β
β ββββββββββββββββββ΄βββββββββββββββββ β
β β β β
β ββββββββΌβββββββ ββββββββΌβββββββ β
β β ZK β β Blob β β
β β Prover β β Storage β β
β β Network β β (Sharded) β β
β ββββββββ¬βββββββ ββββββββ¬βββββββ β
β β β β
β ββββββββββββββββββ¬βββββββββββββββββ β
β β β
β βββββββββββββΌβββββββββββββ β
β β AVALANCHE SUBNET β β
β β (EVM-Compatible) β β
β ββββββββββββββββββββββββββ€ β
β β β’ ZK Verifier Precompileβ β
β β β’ Shielded Pool Contractβ β
β β β’ Bridge Contracts β β
β β β’ ERC-4337 EntryPoint β β
β β β’ Paymaster (Zero-Fee) β β
β βββββββββββββ¬βββββββββββββ β
β β β
β βββββββββββββΌβββββββββββββ β
β β LANGGRAPH.JS AGENTS β β
β ββββββββββββββββββββββββββ€ β
β β β’ Intent Parser β β
β β β’ Proof Coordinator β β
β β β’ TX Submitter β β
β β β’ Health Monitor β β
β ββββββββββββββββββββββββββ β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Ethereum - Direct bridge with Merkle proof verification
- Solana - Cross-chain messaging with SPL token support
- Bitcoin - Via Rootstock (RSK) EVM-compatible sidechain
- Rollup Aggregation - All transactions rolled up on Avalanche Subnet
- Shielded Pool Model - Notes + Nullifiers system
- ZK-SNARKs - Groth16 proofs for transaction privacy
- Commitment Tree - Merkle tree for balance tracking
- Batch Proving - Validity rollup style batching
- ERC-4337 Integration - Full Account Abstraction support
- Paymaster - Gas sponsorship for users
- Bundler - UserOperation batching and submission
- Smart Accounts - Social recovery, spending limits
- Intent Parser Agent - Natural language to transaction
- Proof Coordinator Agent - ZK proof generation workflow
- TX Submitter Agent - AA bundler interaction
- Health Monitor Agent - Cross-chain health checks
- Data Availability - Encrypted transaction data storage
- Content-Addressed - IPFS/Arweave integration
- Sharded Retrieval - Efficient proof input serving
- Indexing Layer - Commitment tree reconstruction
- Recovery Key Backup - Encrypted recovery keys stored on IPFS
- Pinata Integration - Reliable IPFS pinning service
- Password Encryption - AES-GCM-256 encryption for sensitive data
- Gateway Fallback - Multiple IPFS gateway support
Cash.io/
βββ packages/
β βββ subnet-evm/ # Avalanche Subnet with custom precompiles
β β βββ precompiles/ # Go precompile implementations
β β β βββ zkverifier/ # ZK proof verification precompile
β β β βββ cryptoops/ # Elliptic curve operations
β β βββ genesis/ # Subnet genesis configuration
β β
β βββ contracts/ # Solidity smart contracts
β β βββ core/ # Core protocol contracts
β β β βββ ShieldedPool.sol # Privacy pool (notes/nullifiers)
β β β βββ CommitmentTree.sol
β β β βββ ZKVerifier.sol
β β βββ bridges/ # Cross-chain bridge contracts
β β β βββ EthBridge.sol
β β β βββ SolanaBridge.sol
β β β βββ RootstockBridge.sol
β β βββ aa/ # Account Abstraction
β β β βββ CashAccount.sol # Smart account
β β β βββ CashPaymaster.sol
β β β βββ CashAccountFactory.sol
β β βββ rollup/ # Rollup components
β β βββ BatchSubmitter.sol
β β βββ StateManager.sol
β β
β βββ circuits/ # ZK circuits (Circom)
β β βββ transfer.circom # Private transfer circuit
β β βββ deposit.circom # Shield deposit circuit
β β βββ withdraw.circom # Unshield withdraw circuit
β β βββ batch.circom # Batch proof aggregation
β β
β βββ relayer/ # Cross-chain relayer service
β β βββ src/
β β β βββ watchers/ # Chain-specific event watchers
β β β βββ provers/ # Proof generation
β β β βββ submitters/ # Transaction submission
β β βββ package.json
β β
β βββ agents/ # LangGraph.js AI agents
β β βββ src/
β β β βββ graphs/ # Agent workflow graphs
β β β βββ nodes/ # Agent action nodes
β β β βββ tools/ # Agent tools
β β β βββ state/ # Shared agent state
β β βββ package.json
β β
β βββ blob-storage/ # Blob storage service
β β βββ src/
β β β βββ storage/ # Storage backends
β β β βββ sharding/ # Data sharding logic
β β β βββ indexer/ # Commitment tree indexer
β β βββ package.json
β β
β βββ sdk/ # TypeScript SDK
β βββ src/
β β βββ client/ # Main SDK client
β β βββ aa/ # Account abstraction helpers
β β βββ zk/ # ZK proof generation
β β βββ bridges/ # Bridge interaction
β β βββ ipfs/ # IPFS storage integration
β βββ package.json
β
βββ apps/
β βββ web/ # Web application
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ hooks/
β βββ package.json
β
βββ docker/ # Docker configurations
βββ scripts/ # Deployment scripts
βββ docs/ # Documentation
# Clone the repository
git clone https://github.com/your-org/cash-io.git
cd cash-io
# Install dependencies
npm install
# Build all packages
npm run build
# Start local development
npm run devThe SDK provides built-in IPFS support for decentralized storage of recovery keys and other data.
Add the following to your .env file (or .env.local for frontend):
# Frontend (Vite) - use VITE_ prefix
VITE_IPFS_GATEWAY_URL=https://gateway.pinata.cloud
VITE_IPFS_API_URL=https://api.pinata.cloud
VITE_IPFS_JWT=your-pinata-jwt-token
# Backend/Node.js
IPFS_GATEWAY_URL=https://gateway.pinata.cloud
IPFS_API_URL=https://api.pinata.cloud
IPFS_JWT=your-pinata-jwt-tokenimport {
CashioClient,
IPFSClient,
ipfsClient,
RecoveryKeyUtils
} from '@cash-io/sdk';
// Option 1: Create IPFS client from environment variables
const ipfs = ipfsClient('VITE_');
// Option 2: Use through CashioClient
const cashio = new CashioClient({
// ... other config
ipfs: {
gatewayUrl: import.meta.env.VITE_IPFS_GATEWAY_URL,
jwt: import.meta.env.VITE_IPFS_JWT,
},
});
// Upload recovery key (encrypted with password)
const result = await cashio.uploadRecoveryKey(
'your-recovery-key-data',
'user-password',
{ userId: 'user-123' } // optional metadata
);
console.log('Recovery key stored at:', result.cid);
// Retrieve and decrypt recovery key
const recoveryKey = await cashio.retrieveRecoveryKey(result.cid, 'user-password');
// Upload arbitrary JSON data
const jsonResult = await cashio.uploadJSONToIPFS({
type: 'wallet-backup',
data: { /* ... */ }
});
console.log('JSON stored at:', jsonResult.ipfsUri);import { IPFSClient, RecoveryKeyUtils } from '@cash-io/sdk';
const ipfs = new IPFSClient({
gatewayUrl: 'https://gateway.pinata.cloud',
jwt: 'your-pinata-jwt',
});
// Upload raw data
const result = await ipfs.upload('Hello IPFS!', { name: 'hello.txt' });
// Upload JSON
const jsonResult = await ipfs.uploadJSON({ foo: 'bar' });
// Retrieve data
const data = await ipfs.retrieve(result.cid);
console.log(data.text); // "Hello IPFS!"
// Encrypt and upload recovery key
const encryptedData = await RecoveryKeyUtils.encrypt('secret-key', 'password');
const recoveryResult = await ipfs.uploadRecoveryKey(encryptedData);
// Retrieve and decrypt
const recoveryData = await ipfs.retrieveRecoveryKey(recoveryResult.cid);
const secret = await RecoveryKeyUtils.decrypt(recoveryData, 'password');- Architecture Deep Dive
- Subnet Setup Guide
- Smart Contract Reference
- Agent System Guide
- SDK Documentation
This project is in active development. Do not use in production without thorough security audits.
MIT License - see LICENSE for details.