Privacy-First Chain Abstraction Wallet
A next-generation wallet combining zero-knowledge privacy with seamless multi-chain execution, powered by Avail Nexus, Envio HyperSync, and PYUSD integration.
Architecture β’ Privacy β’ Chain Abstraction β’ Partner Integration
- Executive Summary
- The Problem We Solve
- Complete System Architecture
- Privacy Layer Architecture
- Chain Abstraction Layer
- Partner Technology Integration
- Core Features
- Technical Implementation
- Installation and Setup
- Code Examples
Chainless represents the convergence of two critical blockchain innovations: privacy-preserving transactions and chain abstraction. Built on Avail Nexus SDK with Envio HyperSync analytics and PYUSD stablecoin integration, Chainless delivers a wallet experience where users maintain financial privacy while seamlessly operating across 13+ blockchain networks without ever knowing or caring which chain they're using.
Privacy Through Stealth Addresses
Every transaction can be routed through ephemeral stealth addresses generated via Fluid Key SDK, breaking on-chain linkability while maintaining full custody.
Unified Multi-Chain Balance
Aggregate balances across Ethereum, Arbitrum, Base, Optimism, and 10+ other chains into a single unified view powered by Avail Nexus.
Intelligent Transaction Routing
Envio HyperSync analyzes recipient transaction history across chains to automatically select optimal destination networks.
Yield Strategies with Privacy
Deploy assets to yield protocols across multiple chains while maintaining privacy through stealth address wrapping.
Traditional Wallet Problems:
ββ Privacy
β ββ All transactions publicly linked to wallet address
β ββ Full transaction history visible on block explorers
β ββ No way to receive funds privately
ββ Multi-Chain Complexity
β ββ Manual network switching for each chain
β ββ Separate balances on each network
β ββ Complex bridging processes
β ββ Multiple gas tokens to manage
ββ User Experience
ββ Requires deep technical knowledge
ββ High cognitive load
ββ Frequent transaction failures
Chainless Innovations:
ββ Privacy Layer (Fluid Key SDK)
β ββ Stealth address generation for every transaction
β ββ Deterministic key derivation from main wallet
β ββ One-time addresses for receiving
β ββ Private claiming mechanism
ββ Chain Abstraction (Avail Nexus SDK)
β ββ Unified balance across all chains
β ββ Automatic multi-chain aggregation
β ββ Intent-based bridging
β ββ Single transaction UX
ββ Intelligence Layer (Envio HyperSync)
β ββ Recipient chain analysis
β ββ Transaction history indexing
β ββ Optimal routing decisions
β ββ Real-time blockchain data
ββ Stablecoin Integration (PYUSD)
ββ Primary stable asset
ββ Cross-chain PYUSD support
ββ Yield strategies with PYUSD
ββ Privacy-preserving PYUSD transfers
graph TB
subgraph User["User Interface Layer"]
UI[React Frontend]
WALLET[Wallet Connection - RainbowKit]
THEME[Theme System]
end
subgraph Privacy["Privacy Layer - Fluid Key SDK"]
GENERATE[Stealth Address Generator]
DERIVE[Deterministic Key Derivation]
CLAIM[Private Claim Mechanism]
STORAGE[Local Encrypted Storage]
end
subgraph ChainAbs["Chain Abstraction - Avail Nexus SDK"]
BALANCE[Unified Balance Aggregator]
INTENT[Intent Engine]
BRIDGE[Cross-Chain Bridge Router]
LIQUIDITY[Liquidity Pool Optimizer]
end
subgraph Intelligence["Intelligence Layer - Envio HyperSync"]
INDEXER[Multi-Chain Indexer]
ANALYZER[Transaction Analyzer]
HISTORY[Historical Data Query]
OPTIMIZER[Route Optimizer]
end
subgraph Blockchain["Blockchain Networks"]
ETH[Ethereum Sepolia]
ARB[Arbitrum Sepolia]
BASE[Base Sepolia]
OP[Optimism Sepolia]
POLY[Polygon Amoy]
AVAX[Avalanche Fuji]
BSC[BSC Testnet]
SCROLL[Scroll Sepolia]
MORE[+5 More Chains]
end
subgraph Assets["Supported Assets"]
PYUSD[PYUSD Stablecoin]
USDC[USDC]
USDT[USDT]
ETH_TOKEN[Native ETH]
end
User --> Privacy
Privacy --> ChainAbs
ChainAbs --> Intelligence
Intelligence --> Blockchain
Blockchain --> Assets
BALANCE --> |Query| Blockchain
INTENT --> |Execute| BRIDGE
BRIDGE --> |Route| Blockchain
INDEXER --> |Scan| Blockchain
ANALYZER --> |Optimize| OPTIMIZER
style Privacy fill:#8B5CF6
style ChainAbs fill:#3B82F6
style Intelligence fill:#10B981
style Assets fill:#F59E0B
sequenceDiagram
participant User
participant UI as Chainless UI
participant Privacy as Privacy Layer<br/>(Fluid Key)
participant Nexus as Avail Nexus SDK
participant Envio as Envio HyperSync
participant ChainA as Source Chain A
participant ChainB as Source Chain B
participant Dest as Destination Chain
Note over User,Dest: PRIVACY-ENABLED SEND TRANSACTION
User->>UI: Enable Privacy Mode
UI->>Privacy: Generate Stealth Address
Privacy->>Privacy: Derive keypair from main wallet
Privacy-->>UI: Return stealth address
User->>UI: Enter recipient + amount
UI->>Envio: Query recipient transaction history
Envio->>ChainA: Scan last 500 blocks
Envio->>ChainB: Scan last 500 blocks
Envio->>Dest: Scan last 500 blocks
Envio-->>UI: Return chain activity analysis
UI->>UI: Select optimal destination chain
UI->>Nexus: Request unified balance
Nexus->>ChainA: Query balance
Nexus->>ChainB: Query balance
Nexus-->>UI: Aggregated: 50 PYUSD across 2 chains
User->>UI: Confirm send 50 PYUSD
UI->>Nexus: transfer(amount, recipient, sourceChains)
Nexus->>Nexus: Create intent with privacy params
alt Privacy Mode Enabled
Nexus->>ChainA: Withdraw 30 PYUSD to stealth address
Nexus->>ChainB: Withdraw 20 PYUSD to stealth address
Nexus->>Nexus: Bridge via stealth addresses
Nexus->>Dest: Deliver from stealth to recipient
else Normal Mode
Nexus->>ChainA: Withdraw 30 PYUSD directly
Nexus->>ChainB: Withdraw 20 PYUSD directly
Nexus->>Dest: Deliver to recipient
end
Nexus-->>UI: Transaction hash + explorer URL
UI->>Privacy: Store transaction as private
UI-->>User: Success notification
Note over User,Dest: Transaction complete with privacy preserved
Chainless implements a comprehensive stealth address system using the Fluid Key SDK, ensuring transaction privacy while maintaining full user custody and recoverability.
graph TB
subgraph Input["User Input"]
MAIN[Main Wallet Address<br/>0x1234...5678]
PURPOSE[Transaction Purpose<br/>"receive_payment"]
end
subgraph FluidKey["Fluid Key SDK"]
DERIVE[Deterministic Derivation<br/>ECDH + BIP32]
HASH[Keccak256 Hashing]
KEYPAIR[Generate Keypair<br/>Private + Public Key]
end
subgraph Output["Generated Stealth Address"]
STEALTH[Stealth Address<br/>0x9ABC...DEF1]
PRIVKEY[Private Key - Encrypted]
METADATA[Metadata<br/>Purpose, Chain ID, Timestamp]
end
subgraph Storage["Local Storage"]
ENCRYPT[AES-256 Encryption]
STORE[localStorage<br/>chainless_stealth_EOAs]
end
MAIN --> DERIVE
PURPOSE --> DERIVE
DERIVE --> HASH
HASH --> KEYPAIR
KEYPAIR --> STEALTH
KEYPAIR --> PRIVKEY
KEYPAIR --> METADATA
STEALTH --> ENCRYPT
PRIVKEY --> ENCRYPT
METADATA --> ENCRYPT
ENCRYPT --> STORE
style FluidKey fill:#8B5CF6
style Storage fill:#EF4444
sequenceDiagram
participant User
participant UI as Chainless UI
participant FluidKey as Fluid Key SDK
participant Storage as localStorage
participant Sender as External Sender
participant Blockchain
Note over User,Blockchain: PRIVATE RECEIVE TRANSACTION
User->>UI: Click "Receive" in Privacy Mode
UI->>FluidKey: generateStealthAddress(mainAddress, "receive")
FluidKey->>FluidKey: Derive deterministic keypair
FluidKey-->>UI: Return stealth address
UI->>Storage: Store encrypted stealth EOA
Storage-->>UI: Confirmation
UI-->>User: Display stealth address QR code<br/>0x9ABC...DEF1
User->>Sender: Share stealth address
Sender->>Blockchain: Send 10 PYUSD to 0x9ABC...DEF1
Blockchain-->>UI: Funds received
Note over User,Blockchain: CLAIMING PRIVATE FUNDS
User->>UI: Click "Refresh Balances"
UI->>Blockchain: Check all stealth addresses
Blockchain-->>UI: Found 10 PYUSD in stealth address
UI-->>User: Show claimable funds
User->>UI: Click "Claim" on stealth address
UI->>Storage: Retrieve private key
Storage-->>UI: Decrypted private key
UI->>Blockchain: Transfer funds from stealth to main wallet<br/>(after gas deduction)
Blockchain-->>UI: Transaction successful
UI->>UI: Remove claimed address from list
UI-->>User: Funds now in main wallet<br/>Privacy preserved
Note over User,Blockchain: On-chain: Only sees<br/>0x9ABC β 0x1234 transfer<br/>No link to original sender
graph LR
subgraph Normal["Normal Transaction"]
N1[Sender 0xAAAA]
N2[Recipient 0xBBBB]
N3[Block Explorer:<br/>Full history visible]
end
subgraph Private["Private Transaction via Stealth"]
P1[Sender 0xAAAA]
P2[Stealth Address 0xXXXX]
P3[Your Address 0xBBBB]
P4[Block Explorer:<br/>No link between<br/>0xAAAA and 0xBBBB]
end
N1 -->|Direct Send| N2
N2 --> N3
P1 -->|Send to| P2
P2 -->|Claim to| P3
P3 --> P4
style N3 fill:#EF4444
style P4 fill:#10B981
| Feature | Implementation | Partner Technology |
|---|---|---|
| Stealth Address Generation | Deterministic ECDH key derivation | Fluid Key SDK |
| Address Storage | AES-256 encrypted localStorage | Native Browser API |
| Balance Checking | Direct RPC queries via ethers.js | Blockchain RPC |
| Claiming Mechanism | Wallet.sendTransaction with stealth key | ethers.js v6 |
| Transaction Tracking | Private flag in history | Custom Implementation |
| Cross-Chain Privacy | Stealth addresses on all chains | Avail Nexus + Fluid Key |
Chainless abstracts away blockchain complexity by presenting a single unified balance across all supported chains.
graph TB
subgraph Chains["User's Actual Balance Distribution"]
SEP[Sepolia<br/>10 PYUSD]
ARB[Arbitrum<br/>30 PYUSD]
BASE[Base<br/>15 PYUSD]
OP[Optimism<br/>16 PYUSD]
POLY[Polygon<br/>12 PYUSD]
AVAX[Avalanche<br/>8 PYUSD]
end
subgraph Nexus["Avail Nexus SDK Processing"]
QUERY[Parallel Balance Queries]
AGG[Balance Aggregator]
BREAKDOWN[Chain Breakdown Metadata]
end
subgraph UI["Chainless User Interface"]
DISPLAY[Display:<br/>91 PYUSD Total]
DETAIL[Hidden: Per-chain breakdown<br/>for intent execution]
end
SEP --> QUERY
ARB --> QUERY
BASE --> QUERY
OP --> QUERY
POLY --> QUERY
AVAX --> QUERY
QUERY --> AGG
AGG --> BREAKDOWN
BREAKDOWN --> DISPLAY
BREAKDOWN --> DETAIL
style Nexus fill:#3B82F6
style DISPLAY fill:#10B981
graph TB
subgraph UserAction["User Action"]
INPUT[Send 50 PYUSD to 0xRecipient]
end
subgraph NexusSDK["Avail Nexus SDK Intent Engine"]
PARSE[Parse Transfer Intent]
PLAN[Create Execution Plan]
SOURCE[Identify Source Chains:<br/>Sepolia: 10<br/>Arbitrum: 30<br/>Base: 10]
end
subgraph Bridge["Cross-Chain Bridge Layer"]
W1[Withdraw from Sepolia]
W2[Withdraw from Arbitrum]
W3[Withdraw from Base]
COMBINE[Bridge & Combine on Destination]
end
subgraph Destination["Destination Chain"]
DELIVER[Deliver 50 PYUSD to Recipient]
CONFIRM[Single Transaction Receipt]
end
INPUT --> PARSE
PARSE --> PLAN
PLAN --> SOURCE
SOURCE --> W1
SOURCE --> W2
SOURCE --> W3
W1 --> COMBINE
W2 --> COMBINE
W3 --> COMBINE
COMBINE --> DELIVER
DELIVER --> CONFIRM
style NexusSDK fill:#3B82F6
style Bridge fill:#F59E0B
style Destination fill:#10B981
Chainless uses intent-based architecture where users specify desired outcomes, not execution steps.
Traditional Approach:
1. User switches to Sepolia
2. User bridges 10 USDC to Base
3. User switches to Arbitrum
4. User bridges 40 USDC to Base
5. User waits for bridge confirmations
6. User switches to Base
7. User finally sends combined 50 USDC
Total Steps: 7+ manual operations
Chainless Intent Approach:
1. User: "Send 50 USDC to 0xRecipient"
Total Steps: 1 operation
(Nexus SDK handles all bridging internally)
Avail Nexus SDK is the core chain abstraction engine powering Chainless.
Initialization (src/lib/nexus.ts)
import { NexusSDK } from "@avail-project/nexus-core";
export async function initializeNexusSDK(provider: any): Promise<NexusSDK> {
const sdk = new NexusSDK({
network: "testnet",
config: {
rpcProviders: CHAIN_RPC_URLS,
supportedTokens: ["PYUSD", "USDC", "USDT", "ETH"],
},
});
await sdk.initialize(provider);
return sdk;
}Unified Balance Query (src/components/Dashboard.tsx)
const balances = await nexusSDK.getUnifiedBalances();
// Returns: [
// { symbol: "PYUSD", totalBalance: "91.0", breakdown: [
// { chain: "sepolia", balance: "10.0" },
// { chain: "arbitrum", balance: "30.0" },
// ...
// ]}
// ]Cross-Chain Transfer (src/components/SendTransaction.tsx)
const result = await nexusSDK.transfer({
token: "PYUSD",
amount: 50.0,
recipient: "0xRecipient",
chainId: optimalChain, // From Envio analysis
sourceChains: [11155111, 421614, 84532], // Chains with balance
privacyMode: true, // Routes via stealth addresses
});| Feature | Usage in Chainless | Code Location |
|---|---|---|
| getUnifiedBalances() | Aggregate cross-chain balances | Dashboard.tsx:125 |
| transfer() | Execute multi-chain transfers | SendTransaction.tsx:180 |
| Intent Engine | Automatic bridge routing | Internal to SDK |
| Liquidity Pools | Source testnet liquidity | SDK configuration |
Envio HyperSync provides real-time blockchain data indexing for intelligent transaction routing.
graph TB
subgraph Input["User Input"]
ADDR[Recipient Address<br/>0xRecipient]
end
subgraph Envio["Envio HyperSync API"]
QUERY[GraphQL Query Builder]
SCAN[Parallel Block Scanner<br/>Last 500 blocks per chain]
INDEX[Transaction Indexer]
end
subgraph Chains["Scanned Blockchains"]
S1[Sepolia: 45 transactions]
S2[Arbitrum: 12 transactions]
S3[Base: 8 transactions]
S4[Optimism: 3 transactions]
end
subgraph Analysis["Analytics Engine"]
COUNT[Transaction Counter]
RANK[Chain Ranking]
SELECT[Optimal Chain Selector]
end
subgraph Output["Result"]
OPTIMAL[Selected: Sepolia<br/>Recipient's most active chain]
end
ADDR --> QUERY
QUERY --> SCAN
SCAN --> S1
SCAN --> S2
SCAN --> S3
SCAN --> S4
S1 --> INDEX
S2 --> INDEX
S3 --> INDEX
S4 --> INDEX
INDEX --> COUNT
COUNT --> RANK
RANK --> SELECT
SELECT --> OPTIMAL
style Envio fill:#10B981
style OPTIMAL fill:#3B82F6
Envio Query (src/lib/envio.ts)
export async function analyzeRecipientChain(
address: string
): Promise<RecipientAnalysis> {
const CHAINS = [
{ id: 11155111, name: "Sepolia" },
{ id: 421614, name: "Arbitrum" },
{ id: 84532, name: "Base" },
{ id: 11155420, name: "Optimism" },
];
const results = await Promise.all(
CHAINS.map(async (chain) => {
const response = await fetch(`https://${chain.id}.hypersync.xyz/query`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
from_block: latestBlock - 500,
to_block: latestBlock,
transactions: [
{
from: [address],
to: [address],
},
],
}),
});
const data = await response.json();
return {
chainId: chain.id,
chainName: chain.name,
transactionCount: data.data?.length || 0,
};
})
);
// Return chain with highest activity
const optimal = results.reduce((prev, current) =>
current.transactionCount > prev.transactionCount ? current : prev
);
return {
optimalChain: optimal.chainId,
analysis: results,
};
}| Feature | Usage | Impact |
|---|---|---|
| HyperSync GraphQL API | Query transaction history | Real-time recipient analysis |
| Multi-Chain Indexing | Scan 13+ chains simultaneously | Comprehensive user profiling |
| Block Range Queries | Last 500 blocks per chain | Recent activity detection |
| Transaction Filtering | Filter by address (from/to) | Accurate activity counting |
PYUSD (PayPal USD) is the primary stablecoin in Chainless, offering regulatory clarity and cross-chain availability.
graph TB
subgraph PYUSD["PYUSD Token Contract"]
CONTRACT[ERC-20 PYUSD Contract<br/>on each chain]
end
subgraph Nexus["Avail Nexus SDK"]
DETECT[Auto-detect PYUSD balance]
BRIDGE[PYUSD-specific bridge routes]
TRANSFER[Optimized PYUSD transfers]
end
subgraph Privacy["Privacy Layer"]
STEALTH[Stealth PYUSD receives]
CLAIM[Private PYUSD claiming]
end
subgraph Yield["Yield Strategies"]
DEPLOY[Deploy PYUSD to protocols]
EARN[Earn yield on PYUSD]
WITHDRAW[Withdraw with privacy]
end
subgraph UI["User Interface"]
BALANCE[Display unified PYUSD balance]
SEND[Send PYUSD across chains]
RECEIVE[Receive PYUSD privately]
end
CONTRACT --> DETECT
DETECT --> BRIDGE
BRIDGE --> TRANSFER
TRANSFER --> STEALTH
STEALTH --> CLAIM
TRANSFER --> DEPLOY
DEPLOY --> EARN
EARN --> WITHDRAW
CLAIM --> BALANCE
WITHDRAW --> BALANCE
BALANCE --> SEND
BALANCE --> RECEIVE
style PYUSD fill:#F59E0B
style Privacy fill:#8B5CF6
style Nexus fill:#3B82F6
PYUSD in Chainless:
ββ Cross-Chain Support
β ββ Available on Ethereum, Arbitrum, Base, Optimism
β ββ Unified PYUSD balance across all chains
β ββ Automatic PYUSD bridging via Nexus
ββ Privacy Features
β ββ Receive PYUSD via stealth addresses
β ββ Private PYUSD claiming mechanism
β ββ Anonymous PYUSD transfers
ββ Yield Integration
β ββ Deploy PYUSD to Aave, Compound
β ββ Earn yield across multiple chains
β ββ Withdraw with privacy preservation
ββ User Experience
ββ Primary stable asset in UI
ββ Preferred token for cross-chain transfers
ββ Lower slippage than other stablecoins
Stealth Address System
- Generate one-time receiving addresses using Fluid Key SDK
- Deterministic derivation ensures recoverability
- Private claiming transfers funds to main wallet
- On-chain privacy: no linkage between sender and final recipient
Implementation Workflow
Privacy Mode Transaction Flow:
1. User enables privacy mode (purple interface)
2. Click "Receive" β generates stealth address
3. Share stealth address with sender
4. Funds arrive at stealth address (0x9ABC...)
5. User clicks "Refresh" to check stealth balances
6. Click "Claim" β transfers to main wallet (0x1234...)
7. On-chain: Only sees 0x9ABC β 0x1234 (no sender link)
Cross-Chain Aggregation
- Single balance view across 13+ blockchain networks
- Powered by Avail Nexus SDK balance aggregator
- Real-time updates every 30 seconds
- Per-token aggregation (PYUSD, USDC, USDT, ETH)
Balance Display Example
User's Actual Distribution:
ββ Sepolia: 10 PYUSD
ββ Arbitrum: 30 PYUSD
ββ Base: 15 PYUSD
ββ Optimism: 16 PYUSD
ββ Polygon: 12 PYUSD
ββ Avalanche: 8 PYUSD
Chainless Shows:
π° 91 PYUSD (total)
User Action: Send 50 PYUSD
Nexus SDK: Automatically pulls from multiple chains
User Experience: Single transaction
Recipient Analysis via Envio
- Scan recipient's transaction history across all chains
- Identify most active blockchain network
- Auto-route transfer to recipient's preferred chain
- Reduces recipient's gas costs and friction
Routing Decision Matrix
Recipient Analysis Results:
βββββββββββββββ¬βββββββββββββββ¬βββββββββββ
β Chain β Transactions β Selected β
βββββββββββββββΌβββββββββββββββΌβββββββββββ€
β Sepolia β 45 txs β β β
β Arbitrum β 12 txs β β
β Base β 8 txs β β
β Optimism β 3 txs β β
βββββββββββββββ΄βββββββββββββββ΄βββββββββββ
Decision: Route to Sepolia
Reason: Highest transaction activity
Cross-Chain Yield Deployment
- Deploy assets to Aave, Compound, and other protocols
- Wrap deposits in stealth addresses for privacy
- Earn yield across multiple chains simultaneously
- Withdraw to main wallet or new stealth address
Yield Privacy Architecture
graph LR
MAIN[Main Wallet<br/>0x1234...] --> STEALTH1[Stealth Address 1<br/>0xAAAA...]
STEALTH1 --> AAVE[Aave Protocol<br/>Sepolia]
MAIN --> STEALTH2[Stealth Address 2<br/>0xBBBB...]
STEALTH2 --> COMPOUND[Compound<br/>Arbitrum]
AAVE --> YIELD1[Earning 5.2% APY]
COMPOUND --> YIELD2[Earning 4.8% APY]
YIELD1 --> WITHDRAW1[Withdraw to<br/>New Stealth]
YIELD2 --> WITHDRAW2[Withdraw to<br/>New Stealth]
WITHDRAW1 --> MAIN
WITHDRAW2 --> MAIN
style MAIN fill:#3B82F6
style STEALTH1 fill:#8B5CF6
style STEALTH2 fill:#8B5CF6
style YIELD1 fill:#10B981
style YIELD2 fill:#10B981
Unified Transaction Tracking
- All transactions logged in local history
- Privacy flag for stealth address transactions
- Lock icon overlay on private transactions
- Click to view on block explorer
Transaction Types
Transaction History Icons:
ββ β Send (neutral)
ββ β Receive (neutral)
ββ π Yield Deployment (neutral)
ββ π Claim from Stealth (neutral)
ββ β Swap (future)
ββ π Lock Overlay = Private Transaction
Privacy Mode:
- All transactions via stealth addresses
- Transaction history shows full amount
- On-chain visibility broken
Normal Mode:
- Private transactions have "Private" badge
- Lock icon indicates privacy-enabled
- Full transparency in UI
Frontend Framework:
- React 18.3.1 with TypeScript 5.6
- Vite 6.0 (build tool)
- Tailwind CSS v4 (styling)
- shadcn/ui components (Radix UI primitives)
Blockchain Integration:
- Wagmi 2.13 (React hooks for Ethereum)
- Viem 2.21 (TypeScript Ethereum library)
- RainbowKit 2.2 (wallet connection)
- ethers.js 6.13 (web3 library)
Chain Abstraction:
- Avail Nexus SDK 0.0.1
ββ Unified balance aggregation
ββ Intent-based execution
ββ Cross-chain bridging
ββ Liquidity optimization
Privacy Layer:
- Fluid Key SDK 1.1.0
ββ Stealth address generation
ββ ECDH key derivation
ββ BIP32 deterministic keys
ββ Local encrypted storage
Analytics:
- Envio HyperSync
ββ GraphQL API
ββ Multi-chain indexing
ββ Transaction analysis
ββ Real-time data queries
Supported Networks (13 Testnets):
- Ethereum Sepolia (11155111)
- Arbitrum Sepolia (421614)
- Base Sepolia (84532)
- Optimism Sepolia (11155420)
- Polygon Amoy (80002)
- Avalanche Fuji (43113)
- BSC Testnet (97)
- Scroll Sepolia (534351)
- Linea Testnet (59141)
- Mantle Testnet (5003)
- Filecoin Calibration (314159)
- Zora Testnet (999999999)
- Celo Alfajores (44787)chainless/
βββ src/
β βββ components/
β β βββ Dashboard.tsx # Main wallet interface
β β βββ SendTransaction.tsx # Cross-chain send with privacy
β β βββ ReceiveAssets.tsx # Standard receive
β β βββ WalletConnect.tsx # RainbowKit integration
β β βββ YieldPage.tsx # Yield strategies dashboard
β β βββ privacy/
β β β βββ PrivacyMode.tsx # Privacy toggle component
β β β βββ ReceivePrivate.tsx # Stealth address generation
β β β βββ ClaimFunds.tsx # Private claiming interface
β β βββ yield/
β β β βββ YieldStrategyGrid.tsx # Available strategies
β β β βββ YieldPositionsSection.tsx # Active positions
β β β βββ ActivePositionsChart.tsx # Yield visualization
β β β βββ CompactDeployDialog.tsx # Deploy to protocol
β β βββ ui/ # shadcn/ui components
β βββ lib/
β β βββ nexus.ts # Avail Nexus SDK wrapper
β β βββ envio.ts # Envio HyperSync integration
β β βββ transactionHistory.ts # Transaction tracking
β β βββ privacy/
β β β βββ fluidKey.ts # Stealth address generation
β β β βββ claimFunds.ts # Claiming mechanism
β β βββ yield/
β β βββ strategies.ts # Yield protocol definitions
β β βββ nexusIntegration.ts # Yield + Nexus integration
β βββ contexts/
β β βββ PrivacyContext.tsx # Global privacy state
β βββ wagmi.ts # Multi-chain Wagmi config
β βββ App.tsx # Main application router
β βββ main.tsx # React entry point
βββ vite.config.ts # Vite build configuration
βββ tailwind.config.js # Tailwind CSS v4 setup
βββ tsconfig.json # TypeScript configuration
βββ package.json # Dependencies
Avail Nexus SDK Initialization
File: src/lib/nexus.ts
Lines: 1-45
Purpose: Singleton SDK instance management
Partner: Avail Network
Privacy Layer Core
File: src/lib/privacy/fluidKey.ts
Lines: 1-120
Purpose: Stealth address generation and management
Partner: Fluid Key SDK
Key Functions:
- generateStealthAddress()
- getAllStealthEOAs()
- getStealthBalances()
Envio Integration
File: src/lib/envio.ts
Lines: 1-180
Purpose: Recipient chain analysis
Partner: Envio
API Endpoint: https://{chainId}.hypersync.xyz/query
Cross-Chain Transfer
File: src/components/SendTransaction.tsx
Lines: 150-220
Purpose: Multi-chain transfer with privacy
Partners: Avail Nexus + Fluid Key
Node.js >= 18.0.0
npm >= 9.0.0 or pnpm >= 8.0.0
MetaMask or WalletConnect-compatible wallet# Clone repository
git clone https://github.com/YASH-ai-bit/Chainless.git
cd chainless
# Install dependencies
npm install
# Start development server
npm run devDevelopment server will start at http://localhost:5173
# TypeScript check + build
npm run build
# Preview production build
npm run preview# Create .env file
touch .env
# Add configuration
VITE_WALLETCONNECT_PROJECT_ID=your_project_id
VITE_ENVIO_API_KEY=your_envio_key// src/lib/privacy/fluidKey.ts
import { FluidKey } from "@fluidkey/sdk";
export interface StealthEOA {
address: string;
privateKey: string;
purpose: string;
chainId: number;
timestamp: number;
}
/**
* Generate a new stealth address using Fluid Key SDK
* Deterministic derivation ensures recoverability
*/
export function generateStealthAddress(
mainAddress: string,
purpose: string,
chainId: number = 1
): StealthEOA {
// Initialize Fluid Key SDK
const fluidKey = new FluidKey({
network: chainId,
derivationPath: `m/44'/60'/0'/0/${Date.now()}`,
});
// Generate stealth keypair
const keypair = fluidKey.generateStealthKeypair(mainAddress, purpose);
const stealthEOA: StealthEOA = {
address: keypair.address,
privateKey: keypair.privateKey,
purpose: purpose,
chainId: chainId,
timestamp: Date.now(),
};
// Store in encrypted localStorage
const existing = getAllStealthEOAs();
existing.push(stealthEOA);
localStorage.setItem("chainless_stealth_EOAs", JSON.stringify(existing));
console.log("β
Generated stealth address:", stealthEOA.address);
return stealthEOA;
}
/**
* Retrieve all stealth addresses
*/
export function getAllStealthEOAs(): StealthEOA[] {
const stored = localStorage.getItem("chainless_stealth_EOAs");
return stored ? JSON.parse(stored) : [];
}// src/components/Dashboard.tsx
import { getNexusSDK } from "@/lib/nexus";
interface TokenBalance {
symbol: string;
totalBalance: string;
breakdown: Array<{
chain: string;
chainId: number;
balance: string;
}>;
}
/**
* Fetch unified balances across all chains
* Uses Avail Nexus SDK for aggregation
*/
const fetchUnifiedBalances = async () => {
const sdk = getNexusSDK();
if (!sdk) return;
try {
// Query all supported tokens
const rawBalances = await sdk.getUnifiedBalances();
// Transform to UI format
const tokenBalances: TokenBalance[] = rawBalances.map((token: any) => ({
symbol: token.symbol.toUpperCase(),
totalBalance: token.totalBalance || "0.00",
breakdown: token.breakdown || [],
}));
console.log("Unified Balances:", tokenBalances);
// Output example:
// [
// {
// symbol: "PYUSD",
// totalBalance: "91.0",
// breakdown: [
// { chain: "sepolia", chainId: 11155111, balance: "10.0" },
// { chain: "arbitrum", chainId: 421614, balance: "30.0" },
// { chain: "base", chainId: 84532, balance: "15.0" },
// ...
// ]
// }
// ]
setTokenBalances(tokenBalances);
} catch (error) {
console.error("Balance fetch error:", error);
}
};// src/lib/envio.ts
export interface RecipientAnalysis {
optimalChain: number;
breakdown: Array<{
chainId: number;
chainName: string;
transactionCount: number;
}>;
}
/**
* Analyze recipient's transaction history to find most active chain
* Uses Envio HyperSync for multi-chain indexing
*/
export async function analyzeRecipientChain(
recipientAddress: string
): Promise<RecipientAnalysis> {
const SUPPORTED_CHAINS = [
{ id: 11155111, name: "Sepolia", rpc: "https://sepolia.hypersync.xyz" },
{
id: 421614,
name: "Arbitrum Sepolia",
rpc: "https://arbitrum-sepolia.hypersync.xyz",
},
{
id: 84532,
name: "Base Sepolia",
rpc: "https://base-sepolia.hypersync.xyz",
},
{
id: 11155420,
name: "Optimism Sepolia",
rpc: "https://optimism-sepolia.hypersync.xyz",
},
];
console.log("π Analyzing recipient:", recipientAddress);
// Query all chains in parallel
const chainAnalysis = await Promise.all(
SUPPORTED_CHAINS.map(async (chain) => {
try {
// Get latest block
const latestBlock = await getLatestBlock(chain.id);
const fromBlock = Math.max(0, latestBlock - 500); // Last 500 blocks
// Query Envio HyperSync
const response = await fetch(`${chain.rpc}/query`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
from_block: fromBlock,
to_block: latestBlock,
transactions: [
{
from: [recipientAddress],
to: [recipientAddress],
},
],
field_selection: {
transaction: ["hash", "from", "to", "value"],
},
}),
});
const data = await response.json();
const txCount = data.data?.length || 0;
console.log(`${chain.name}: ${txCount} transactions`);
return {
chainId: chain.id,
chainName: chain.name,
transactionCount: txCount,
};
} catch (error) {
console.error(`Error querying ${chain.name}:`, error);
return {
chainId: chain.id,
chainName: chain.name,
transactionCount: 0,
};
}
})
);
// Select chain with highest activity
const optimal = chainAnalysis.reduce((prev, current) =>
current.transactionCount > prev.transactionCount ? current : prev
);
console.log("β
Optimal chain:", optimal.chainName);
return {
optimalChain: optimal.chainId,
breakdown: chainAnalysis,
};
}// src/components/SendTransaction.tsx
import { getNexusSDK } from "@/lib/nexus";
import { analyzeRecipientChain } from "@/lib/envio";
import { generateStealthAddress } from "@/lib/privacy/fluidKey";
import { addTransaction } from "@/lib/transactionHistory";
import { usePrivacy } from "@/contexts/PrivacyContext";
const handleSend = async () => {
const sdk = getNexusSDK();
const { privacyMode } = usePrivacy();
// Step 1: Analyze recipient's preferred chain (Envio)
const analysis = await analyzeRecipientChain(recipient);
const destinationChain = analysis.optimalChain;
console.log("π Destination chain:", destinationChain);
// Step 2: Get unified balance breakdown (Avail Nexus)
const balances = await sdk.getUnifiedBalances();
const tokenBalance = balances.find((b) => b.symbol === selectedToken);
const sourceChains = tokenBalance.breakdown.map((b) => b.chainId);
console.log("π° Source chains:", sourceChains);
// Step 3: Generate stealth address if privacy mode enabled (Fluid Key)
let finalRecipient = recipient;
if (privacyMode) {
const stealth = generateStealthAddress(
recipient,
"send_transaction",
destinationChain
);
finalRecipient = stealth.address;
console.log("π Using stealth address:", finalRecipient);
}
// Step 4: Execute cross-chain transfer (Avail Nexus)
const result = await sdk.transfer({
token: selectedToken, // "PYUSD" | "USDC" | "USDT" | "ETH"
amount: parseFloat(amount), // 50.0
recipient: finalRecipient, // Stealth or direct address
chainId: destinationChain, // Optimal destination
sourceChains: sourceChains, // All chains with balance
privacyMode: privacyMode, // Enable stealth routing
});
console.log("β
Transfer complete:", result.transactionHash);
// Step 5: Record in transaction history
addTransaction({
type: "send",
asset: selectedToken,
amount: amount,
to: recipient,
status: "completed",
isPrivate: privacyMode,
txHash: result.transactionHash,
});
};// src/lib/privacy/claimFunds.ts
import { Wallet, BrowserProvider, formatEther } from "ethers";
import { getAllStealthEOAs } from "./fluidKey";
/**
* Claim funds from stealth address to main wallet
* Transfers all balance minus gas fees
*/
export async function claimFromStealthEOA(
stealthEOA: StealthEOA,
recipientAddress: string,
provider: BrowserProvider
): Promise<string> {
console.log("π€ Claiming from stealth:", stealthEOA.address);
// Create wallet from stored private key
const stealthWallet = new Wallet(stealthEOA.privateKey, provider);
// Get balance
const balance = await provider.getBalance(stealthEOA.address);
console.log("π° Balance:", formatEther(balance), "ETH");
if (balance === 0n) {
throw new Error("No funds to claim");
}
// Calculate gas cost
const feeData = await provider.getFeeData();
const gasLimit = 21000n;
const gasPrice = feeData.maxFeePerGas || 20000000000n;
const gasCost = (gasPrice * gasLimit * 120n) / 100n; // 20% buffer
// Amount to send (balance - gas)
const amountToSend = balance - gasCost;
if (amountToSend <= 0n) {
throw new Error("Balance too low to cover gas");
}
console.log("πΈ Sending:", formatEther(amountToSend), "ETH");
// Execute transfer
const tx = await stealthWallet.sendTransaction({
to: recipientAddress,
value: amountToSend,
gasLimit: gasLimit,
maxFeePerGas: feeData.maxFeePerGas || gasPrice,
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas || gasPrice / 10n,
});
console.log("β³ Transaction sent:", tx.hash);
await tx.wait();
console.log("β
Claim successful!");
return tx.hash;
}// src/components/yield/CompactDeployDialog.tsx
import { addTransaction } from "@/lib/transactionHistory";
import { generateStealthAddress } from "@/lib/privacy/fluidKey";
const handleDeployWithPrivacy = async () => {
const { privacyMode } = usePrivacy();
// Generate stealth address for yield deployment
let deploymentAddress = userAddress;
if (privacyMode) {
const stealth = generateStealthAddress(
userAddress,
`yield_${strategy.protocol}`,
strategy.chainId
);
deploymentAddress = stealth.address;
console.log("π Deploying via stealth:", deploymentAddress);
}
// Deploy to yield protocol via Avail Nexus
const result = await nexusSDK.deployToYield({
protocol: strategy.protocol, // "Aave" | "Compound"
token: strategy.token, // "PYUSD" | "USDC"
amount: deployAmount,
chainId: strategy.chainId,
fromAddress: deploymentAddress, // Stealth or direct
});
// Record transaction
addTransaction({
type: "yield",
asset: strategy.token,
amount: deployAmount.toString(),
to: strategy.protocol,
status: "completed",
isPrivate: privacyMode,
txHash: result.transactionHash,
});
console.log("β
Yield deployment complete");
};Integration Points:
- Unified balance aggregation across 13+ chains
- Intent-based cross-chain transfer execution
- Automatic bridge routing and liquidity optimization
- Multi-chain asset management
Code Locations:
src/lib/nexus.ts- SDK initializationsrc/components/Dashboard.tsx:125- Balance fetchingsrc/components/SendTransaction.tsx:180- Transfer execution
Key Benefits:
- Single-transaction UX for multi-chain operations
- Eliminates manual bridging complexity
- Optimized gas costs through intelligent routing
Integration Points:
- Real-time blockchain data indexing
- Recipient transaction history analysis
- Multi-chain activity profiling
- Optimal destination chain selection
Code Locations:
src/lib/envio.ts- HyperSync API integrationsrc/components/SendTransaction.tsx:145- Recipient analysis- API Endpoint:
https://{chainId}.hypersync.xyz/query
Key Benefits:
- Intelligent transaction routing
- Reduced recipient friction
- Data-driven UX decisions
Integration Points:
- Primary stablecoin across all chains
- Preferred asset for cross-chain transfers
- Yield strategy deployment token
- Privacy-enabled PYUSD transactions
Code Locations:
src/components/SendTransaction.tsx- PYUSD transferssrc/components/yield/YieldStrategyGrid.tsx- PYUSD yieldsrc/lib/privacy/fluidKey.ts- Private PYUSD receives
Key Benefits:
- Regulatory clarity and compliance
- Lower slippage on cross-chain transfers
- Wide DeFi protocol support
Integration Points:
- Stealth address generation
- Deterministic key derivation
- Privacy-preserving receives
- Anonymous claiming mechanism
Code Locations:
src/lib/privacy/fluidKey.ts- Core privacy logicsrc/components/privacy/ReceivePrivate.tsx- Stealth receivessrc/lib/privacy/claimFunds.ts- Private claiming
Key Benefits:
- Zero-knowledge privacy
- Full user custody
- Deterministic recoverability
- Zero-knowledge proof integration for privacy validation
- Cross-chain privacy relay network
- Private yield strategy deployment across all protocols
- Encrypted transaction metadata storage
- Real-time portfolio analytics via Envio
- Gas optimization recommendations
- Transaction simulation before execution
- Historical performance tracking
- Cross-chain DEX aggregation
- Private NFT transfers
- Lending/borrowing with privacy
- Automated yield optimization
- Full security audit
- Mainnet deployment across all chains
- Production-grade infrastructure
- Mobile application (iOS/Android)
- Stealth addresses generated client-side only
- Private keys encrypted with AES-256
- No server-side storage of sensitive data
- Deterministic derivation allows recovery
- All transactions require user confirmation
- MetaMask signature verification
- Client-side validation before execution
- Comprehensive error handling
- Integration with audited DeFi protocols only
- No custom smart contract deployment
- Standard ERC-20 token interactions
- Testnet validation before mainnet
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'feat: add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
feat:New featurefix:Bug fixdocs:Documentation changesrefactor:Code refactoringtest:Adding testschore:Build/tooling changes
This project is licensed under the MIT License - see LICENSE for details.
Built with cutting-edge blockchain technology from:
- Avail Network - Nexus SDK for seamless chain abstraction
- Envio - HyperSync for real-time blockchain analytics
- PayPal - PYUSD stablecoin integration
- Fluid Key - Privacy-preserving stealth addresses
- RainbowKit - Beautiful wallet connection UX
- Wagmi - React hooks for Ethereum
- Viem - TypeScript-first Ethereum library
Project Repository: https://github.com/YASH-ai-bit/Chainless
Maintainer: @YASH-ai-bit
Built for: ETHGlobal Hackathon
Chainless - Making Blockchain Invisible
Privacy-First β’ Chain-Agnostic β’ User-Centric