[ ARKIV DOCS ]
Everything you need to build with Arkiv. From quick start guides to comprehensive API documentation.
Last updated: October 2025 ยท SDK v0.1.19
Documentation
Arkiv Documentation
Introduction to Arkiv and its architecture
What is Arkiv?
Arkiv is a decentralized data layer that brings queryable, time-scoped storage to Ethereum. It enables developers to store, query, and manage data with built-in expiration and attribute systems.
Why Arkiv?
Arkiv treats data as a first-class citizen on Ethereum:
Instant Queries โ SQL-like queries with attributes, real-time data retrieval, no external indexing required.
Cost-Efficient โ Pay only for storage duration (Expires In), automatic data pruning, no permanent storage fees.
Ethereum-Native โ Built on Ethereum infrastructure, fully transparent and verifiable, compatible with existing Web3 tools.
Developer-Friendly โ Simple CRUD operations, TypeScript SDK with full type safety, real-time event streaming.
Architecture
Arkiv uses a three-layer architecture:
Layer 1: Ethereum Mainnet Final settlement and security. Proof verification, commitments, and ultimate source of truth.
Layer 2: Arkiv Coordination Layer Data management and registry. DB-chain coordination, cross-chain synchronization, deterministic query resolution.
Layer 3: Specialized DB-Chains High-performance data operations. CRUD via JSON-RPC, indexed queries with attributes, programmable expiration (Expires In).
Use Cases
Temporary Data Storage โ Session data with automatic expiration, cross-device clipboards, cached API responses.
Event & Analytics โ Application logs with cleanup, user activity tracking, temporary metrics.
File & Media โ Image metadata with expiration, document versioning, chunked file storage.
Real-Time Apps โ Live chat, collaborative tools, IoT data streams.
Core Concepts
Entities โ Data records containing content, attributes, and expiration time.
Attributes โ Key-value pairs for querying:
typescriptExample1{ key: "type", value: "note" } // String attribute 2{ key: "priority", value: 5 } // Numeric attribute
Expires In โ Automatic expiration (in seconds):
typescriptExample1expiresIn: 1800 // 30 minutes 2expiresIn: 86400 // 24 hours 3expiresIn: 604800 // 7 days
Query Language โ SQL-like syntax:
sqlExample1type = "note" && priority > 3 && created > 1672531200
Testnet Access
typescriptExample1Chain ID: 60138453056 2RPC URL: https://mendoza.hoodi.arkiv.network/rpc 3WebSocket: wss://mendoza.hoodi.arkiv.network/rpc/ws
Faucet: Get Test ETH Explorer: View Transactions
Quick example:
typescriptExample1import { createWalletClient, createPublicClient, http } from "@arkiv-network/sdk" 2import { privateKeyToAccount } from "@arkiv-network/sdk/accounts" 3import { mendoza } from "@arkiv-network/sdk/chains" 4import { ExpirationTime, jsonToPayload } from "@arkiv-network/sdk/utils" 5import { eq } from "@arkiv-network/sdk/query" 6 7// Wallet client (read/write) - requires private key 8const walletClient = createWalletClient({ 9 chain: mendoza, 10 transport: http(), 11 account: privateKeyToAccount('0x...'), 12}) 13 14const { entityKey, txHash } = await walletClient.createEntity({ 15 payload: jsonToPayload({ message: 'Hello Arkiv!' }), 16 contentType: 'application/json', 17 attributes: [{ key: 'type', value: 'greeting' }], 18 expiresIn: ExpirationTime.fromMinutes(30), 19}) 20 21console.log("Stored:", entityKey) 22 23// Public client (queries only) - no private key needed 24const publicClient = createPublicClient({ 25 chain: mendoza, 26 transport: http(), 27}) 28 29const query = publicClient.buildQuery() 30const results = await query 31 .where(eq('type', 'greeting')) 32 .withAttributes(true) 33 .withPayload(true) 34 .fetch()
Next Steps
- Getting Started โ Set up your dev environment
- SDK Reference โ TypeScript and Python SDKs
- API Docs โ JSON-RPC interface
- Guides โ Build real applications
Resources: Playground โ Interactive examples Discord โ Community support