Instant Queries
SQL-like queries with attributes, indexed data retrieval, no external indexing required.
Arkiv is a universal data layer that brings queryable, time-scoped storage to Ethereum. Store, query, and manage data with built-in expiration and attribute systems.
Instant Queries
SQL-like queries with attributes, indexed data retrieval, no external indexing required.
Cost-Efficient
Pay only for storage duration. Automatic data pruning — no permanent storage fees.
Ethereum-Native
Built on Ethereum infrastructure. Fully transparent, tamper-proof, and compatible with existing Web3 tools.
Developer-Friendly
Simple CRUD operations and a TypeScript SDK with full type safety.
Arkiv uses a three-layer architecture:
┌─────────────────────────────────────────────────────┐│ YOUR APP ││ TypeScript SDK · JSON-RPC │└────────────────────────┬────────────────────────────┘ │ read / write ▼┌─────────────────────────────────────────────────────┐│ LAYER 3 — DB-CHAINS ││ High-performance CRUD, indexed queries, ││ programmable expiration │└────────────────────────┬────────────────────────────┘ │ coordination ▼┌─────────────────────────────────────────────────────┐│ LAYER 2 — ARKIV COORDINATION LAYER ││ DB-chain registry, ││ deterministic query resolution │└────────────────────────┬────────────────────────────┘ │ settlement ▼┌─────────────────────────────────────────────────────┐│ LAYER 1 — ETHEREUM MAINNET ││ Proof verification, commitments, ││ ultimate source of truth │└─────────────────────────────────────────────────────┘An entity is a data record on Arkiv. Every entity contains:
Attributes are the backbone of querying. The type you choose determines what query operators are available:
// String attributes — support eq(), glob matching (~){ key: 'type', value: 'note' }{ key: 'status', value: 'active' }
// Numeric attributes — support eq(), gt(), lt(), gte(), lte() range queries{ key: 'priority', value: 5 }{ key: 'created', value: Date.now() }Every entity has a lifespan expressed in seconds. Use the ExpirationTime helper to convert human-readable durations:
import { ExpirationTime } from "@arkiv-network/sdk/utils";
ExpirationTime.fromMinutes(30) // 1800 secondsExpirationTime.fromHours(1) // 3600 secondsExpirationTime.fromHours(12) // 43200 secondsExpirationTime.fromDays(7) // 604800 secondsSQL-like syntax for filtering entities:
type = "note" && priority > 3 && created > 1672531200Supported operators: && (AND), || (OR), ! (NOT), =, !=, <, >, <=, >=, ~ (glob match).
Two client types exist:
The SDK’s query builder supports more than basic filtering. Before you reach for client-side sorting or manual pagination, check what’s built in:
orderBy(desc('field', 'number'))hasNextPage() / next()getEntityCount().ownedBy() and .createdBy() for wallet-level filteringFull reference: Querying Data