░▒▓███████▓▒░░▒▓█▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓████████▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓███████▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓███████▓▒░░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
░▒▓███████▓▒░░▒▓████████▓▒░▒▓██████▓▒░░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
EIP-4844 blob storage for Ethereum
BlobKit enables applications to store data on Ethereum using blob transactions (EIP-4844).
- TypeScript SDK with browser and Node.js support
- Trust-minimized proxy server for wallets without EIP-4844 support
- Smart contract escrow system for payment and job management
- KZG cryptography implementation for blob commitments
- Cost-efficient: ~$0.01 per blob vs ~$50 for calldata
SDK (@blobkit/sdk)
- Handles blob encoding and KZG commitments
- Manages payments through escrow contract
- Supports both direct submission and proxy routing
Proxy Server (@blobkit/proxy-server)
- Executes blob transactions on behalf of users
- Verifies payments before processing
- Implements circuit breakers and rate limiting
Escrow Contract (@blobkit/contracts)
- Holds user payments until job completion
- Enforces timeouts with automatic refunds
- Prevents replay attacks via signature verification
- User deposits ETH into escrow contract with unique job ID
- User submits blob data and payment proof to proxy
- Proxy verifies payment and submits blob transaction
- Proxy claims payment from escrow upon completion
- If proxy fails, user can refund after timeout
npm install @blobkit/sdk- Node.js 18+ or modern browser
- Ethereum wallet or signer
- RPC endpoint (see Infrastructure Requirements)
import { BlobKit } from '@blobkit/sdk';
import { Wallet } from 'ethers';
const signer = new Wallet(process.env.PRIVATE_KEY);
const blobkit = await BlobKit.init(
{
rpcUrl: process.env.BLOBKIT_RPC_URL!, // Recommended: blob-compatible RPC
chainId: 1
// Escrow contract auto-configured for mainnet
},
signer
);
const data = Buffer.from('Hello, blobs!');
const result = await blobkit.writeBlob(data);
console.log(`Blob tx: ${result.blobTxHash}`);import { BlobKit } from '@blobkit/sdk/browser';
const blobkit = await BlobKit.init(
{
rpcUrl: process.env.BLOBKIT_RPC_URL!, // Recommended: blob-compatible RPC
chainId: 1,
proxyUrl: 'https://proxy.blobkit.org' // Your proxy server URL
},
window.ethereum
);
const data = new TextEncoder().encode('Hello from browser!');
const result = await blobkit.writeBlob(data);// Read blob data by transaction hash
const blobData = await blobkit.readBlob(txHash);
console.log('Raw data:', blobData.data);
// Read and decode as text
const text = await blobkit.readBlobAsString(txHash);
console.log('Text:', text);
// Read and decode as JSON
const json = await blobkit.readBlobAsJSON(txHash);
console.log('JSON:', json);-
Flashbots RPC (FREE, Recommended)
rpcUrl: 'https://rpc.flashbots.net';
- Free to use
- Supports blob transactions
- No registration required
-
Run Your Own Node
# Requires both execution and consensus clients geth + lighthouse/prysm/teku -
Use Specialized Services
- bloXroute Gateway
- MEV relays with blob support
- Dedicated node providers
Blob transactions (EIP-4844) require coordination between:
- Execution Layer: Transaction processing
- Consensus Layer: Blob data storage
Standard RPCs only handle execution layer, while blobs need both layers.
interface BlobKitConfig {
rpcUrl: string; // Use blob-compatible RPC (e.g., Flashbots)
chainId?: number; // Network chain ID (default: 1 for mainnet)
archiveUrl?: string; // Blob archive endpoint for reading
proxyUrl?: string; // Proxy server URL (auto-discovered)
escrowContract?: string; // Auto-configured for mainnet/testnets
requestSigningSecret?: string; // HMAC secret for proxy auth
logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent';
}# Required for Proxy Server
RPC_URL=https://rpc.flashbots.net # Use blob-compatible RPC
ESCROW_CONTRACT=0x2e8e414bc5c6B0b8339853CEDf965B4A28FB4838 # Mainnet escrow
# Optional Configuration
CHAIN_ID=1
PORT=3000
PROXY_FEE_PERCENT=1
MAX_BLOB_SIZE=131072
REDIS_URL=redis://localhost:6379
JOB_TIMEOUT_SECONDS=300
# Production Key Management (choose one)
PRIVATE_KEY=0x... # Dev only
AWS_KMS_KEY_ID=arn:aws:kms:region:account:key/id # Production- Funds held in escrow until job completion
- Automatic refunds after timeout period
- Signature verification prevents unauthorized claims
- HMAC-SHA256 request signing (required)
- Rate limiting per IP address
- Input validation for all blob parameters
- AWS KMS and GCP KMS key management support
- Circuit breakers for Redis/RPC failures
- Always verify proxy authorization before use
- Monitor gas prices for cost optimization
- Implement retry logic for network failures
- Use environment variables for sensitive configuration
- Node.js 18+
- Foundry (for contracts)
- Redis (for proxy server)
# One-click development setup
./dev.sh
# Manual setup
git clone https://github.com/blobkit/blobkit.git
cd blobkit
npm install
npm run build
# Deploy contracts locally
cd packages/contracts
forge script script/Deploy.s.sol --rpc-url http://localhost:8545 --broadcast
# Start proxy server
npm run dev --workspace=packages/proxy-server# Unit tests
npm test
# Integration tests
npm run test:integration
# Gas benchmarks
cd packages/contracts && forge test --gas-report| Network | Contract Address | Status |
|---|---|---|
| Mainnet | 0x2e8e414bc5c6B0b8339853CEDf965B4A28FB4838 |
Live |
| Sepolia | 0x1B345402377A44F674376d6e0f6212e3B9991798 |
Live |
cd packages/contracts
forge script script/Deploy.s.sol --rpc-url $RPC_URL --broadcastdocker build -t blobkit-proxy .
docker run -p 3000:3000 --env-file .env blobkit-proxyContributions are welcome! Please see CONTRIBUTING.md for details.
MIT - see LICENSE for details.
Built by Zak Cole at Number Group for the Ethereum Community Foundation.