ATSHI Store brings databases, tables, schemas, and queries natively into the blockchain. No external indexer. No off-chain infrastructure. Just declare your data model — the protocol does the rest.
Every dApp team hits the same wall: the chain stores transactions, not structured data. So you bolt on Postgres, run The Graph, deploy indexers — and suddenly you're maintaining more infrastructure than you're building product.
Smart contract state is a single JSON blob. No tables, no schemas, no pagination. You serialize everything yourself and pray it fits.
Want to find all orders above $100 sorted by date? Good luck. You'll need to scan the entire state or build an off-chain indexer from scratch.
The Graph, Alchemy, Infura, Postgres replicas… Every project re-invents the same stack. More points of failure. More trust assumptions. More cost.
Row-level security? Role-based permissions? On blockchain? You're writing that from scratch in Solidity, for every contract, every time.
Declare your schema. Set your access rules. Let the protocol handle validation, indexing, and querying. Every mutation is a transaction. Every query hits a local index. Zero external dependencies.
Schema validation, access control, and foreign keys are checked by the node before consensus — not in your contract code. Reject bad data before it costs gas.
Nodes maintain local indexes (B-tree, full-text) derived deterministically from the chain. Sub-10ms queries on million-document tables. No external indexer.
Every document is a transaction. Every mutation goes through consensus. The blockchain is the source of truth. Indexes are just caches — any node can rebuild them.
Define your database, tables, schemas, and access control declaratively in your smart contract. The protocol generates the table chains, builds the indexes, and enforces every rule at the node level.
Need custom logic? Add an interceptor to enrich documents before they're written. Need aggregations? Add a trigger — same mechanism as oracle triggers, already battle-tested on ATSHI Network.
database("traceability", access: %{read: :public, write: :allowlist} ) table("traceability", "batches", schema: %{ id: {:string, %{required: true, unique: true}}, supplier: {:address, %{required: true}}, weight: {:float, %{required: true, min: 0.0}}, status: {{:enum, ["received", "verified"]}, %{required: true}} }, indexes: [:supplier, :status], access: %{ insert: :allowlist, update: {:field, :supplier}, delete: :none }, audit: true, versioning: :full ) # Automatic aggregation — same as oracle triggers trigger(data: "batches", on: :insert) do doc = Data.document() State.stats.total += 1 State.stats.by_supplier[doc.supplier] += 1 end
From schema validation to full-text search, ATSHI Store covers the complete data management lifecycle — enforced by the protocol, maintained by every node.
String, integer, float, address, timestamp, enum, map, list — with constraints: required, unique, min/max, pattern. Validated by the protocol before consensus.
Per-operation granularity: read, insert, update, delete. Five modes: public, owner_only, allowlist, field-based, none. Enforced before WASM execution — zero gas on rejection.
Referential integrity between tables, enforced at the protocol level. On-delete behaviors: restrict, cascade, set_null. No orphan data, ever.
Same mechanism as oracle triggers. Intercept writes before consensus (on). React after consensus (trigger). Build reactive pipelines across contracts.
find(), count(), orderBy, limit, offset — all exposed via the node's GraphQL API. Powered by local indexes. No external infrastructure.
Enrich documents on the fly — auto-set timestamps, compute hashes, validate business rules. Accept or reject before the data hits the chain.
AES-256-GCM encryption at the field level — not all-or-nothing. Share compliance fields publicly while keeping proprietary data encrypted in the same record. True mixed visibility.
Hash preserved for proof of existence, payload destroyed after retention period. Retention policies enforced at the protocol level — compliance by default, not by afterthought.
Dry-run validation before deploy, automatic snapshots, instant rollback, and auto-generated TypeScript/Java/Python types from on-chain schemas. Zero-risk schema evolution.
16 built-in roles evaluated at consensus level — unauthorized calls pay zero gas. Five policy effects (allow, deny, audit, require MFA, require approval) with deny-overrides-allow conflict resolution, same model as AWS IAM. Contextual conditions on time, geography, and on-chain state.
Full document versioning with diff tracking. Structured audit log queryable by author, date, operation. The chain remembers everything — now you can query it.
Auto-expire documents. Mark as deleted without losing history. Archive old data to cold tables. Manage the full document lifecycle declaratively.
Update orders, insert trades, modify balances — all in one atomic transaction. If any operation fails, everything rolls back. Built for DeFi and ERP.
Inverted indexes on string fields. Relevance scoring. Highlighted snippets. Search your on-chain data like you'd search a document database.
GraphQL subscriptions for live data feeds. Webhooks for off-chain integration. Server-Sent Events for lightweight streaming. Your chain talks to the world.
Not a bolt-on. Not an indexer. A protocol-native data layer that combines the best of Supabase with the trust guarantees of blockchain.
| Capability | Supabase | The Graph | Solidity/EVM | ATSHI Store |
|---|---|---|---|---|
| Typed schemas | SQL DDL | GraphQL schema | Struct (limited) | Declarative + constraints |
| Access control | RLS policies | None | Manual (require) | Declarative, per-operation |
| Queries | Full SQL | GraphQL (indexed) | Key-value only | GraphQL + on-chain find() |
| Foreign keys | ✓ Native | ✗ Manual | ✗ Manual | ✓ Protocol-enforced |
| Triggers / Hooks | PL/pgSQL | Mapping handlers | Events (off-chain) | on() + trigger() (on-chain) |
| Real-time | ✓ Native | ✗ Polling | ✗ Log parsing | ✓ Subscriptions + Webhooks |
| Per-field encryption | ✗ Column-level (pgcrypto) | ✗ None | ✗ None | ✓ AES-256-GCM native |
| GDPR purge | Application-level | Impossible | Impossible | ✓ Protocol-level auto-purge |
| Auth | JWT (GoTrue) | None | msg.sender | Transaction signatures |
| Trust model | Trust operator | Trust indexers | Trust protocol | Trust protocol |
| External infra | Managed server | Subgraph nodes | None | None — built into nodes |
| Immutable audit trail | ✗ Mutable DB | ✓ On-chain source | ✓ On-chain | ✓ On-chain + structured audit API |
ATSHI Store isn't a toy. It's designed for production workloads — from supply chain traceability to decentralized finance.
Track every batch, every analysis, every handover — with foreign keys, versioning, and audit trails. Compliance-ready by design.
Atomic multi-table transactions for trade execution. Partial indexes on active orders. Real-time subscriptions for price feeds.
Role-based access for departments. Computed fields for derived data. Webhooks to sync with existing systems. Hierarchical wallet integration.
One contract per data subject. Owner-only write access. TTL for automatic consent expiration. Field-level encryption for sensitive data.
Public insert, author-only update, no delete. Full-text search on content. Table partitioning for scalable history. Real-time feeds via subscriptions.
Immutable records with full version history. Cross-contract references between registries. Composite keys for natural identifiers.
ATSHI Store is part of the ATSHI Network protocol. Every node is your database.