Overview
ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator (also referred to as ViewkitViewkit A CLI tool for creating, testing, and deploying views. It defines the SDL, attaches lenses, runs local validation using the Wasmer runtime, packages everything into a ViewBundle, and submits a deploy transaction to the View Registry.) is the developer-facing toolchain for defining, packaging, and deploying Shinzo ViewsView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape.. It provides a workflow for turning raw indexed blockchain data into reusable, versioned data APIs that can be executed and served by HostsHost A Shinzo node that receives indexed data from indexers over P2P, verifies it, runs lens transforms to produce view documents, and serves those documents over GraphQL. across the Shinzo network.
At a high level, ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator bridges the gap between indexed primitive data and application-ready data interfaces. It allows developers to declaratively specify what data to ingest, how to transform it, and how to expose it, without managing infrastructure, execution environments, or deployment mechanics directly.
Purpose and Role in the Stack
Within the Shinzo ecosystem, ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator sits above the IndexerIndexer A node that reads blockchain data from a source chain, parses it into structured documents, and writes them to defraDB. Indexers are write-only: they push data out over P2P and reject all incoming replication. and alongside HostsHost A Shinzo node that receives indexed data from indexers over P2P, verifies it, runs lens transforms to produce view documents, and serves those documents over GraphQL.:
- IndexerIndexer A node that reads blockchain data from a source chain, parses it into structured documents, and writes them to defraDB. Indexers are write-only: they push data out over P2P and reject all incoming replication. → produces normalized, deterministic primitive data
- ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator → defines how that data should be queried, transformed, and exposed
- HostHost A Shinzo node that receives indexed data from indexers over P2P, verifies it, runs lens transforms to produce view documents, and serves those documents over GraphQL. → executes those definitions, serves results, and attests to correctness
Using ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator, developers write ViewsView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. as versioned bundles that describe a complete data pipeline. These viewsView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. are then deployed to a target environment (local, devnet, or future networks), where HostsHost A Shinzo node that receives indexed data from indexers over P2P, verifies it, runs lens transforms to produce view documents, and serves those documents over GraphQL. execute them deterministically against indexed data and serve the results to consumers.
This separation enables:
- Rapid iteration on data models without re-indexingIndexing The process of parsing blockchain data and storing it as structured, schema-compliant documents in defraDB. chains
- Deterministic, reproducible data APIs
- Decoupling of data definition from execution and infrastructure
- Portable viewsView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. that can run on any compliant HostHost A Shinzo node that receives indexed data from indexers over P2P, verifies it, runs lens transforms to produce view documents, and serves those documents over GraphQL.
Core Concepts
A ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. is the fundamental unit produced by ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator. Each viewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. is a self-contained, versioned bundle that may include:
- Queries – declarative definitions of the raw data shape to ingest from indexed primitives
- SDL (GraphQL) – schemas describing how data is modeled, materialized, or exposed to consumers
- LensesLens A WASM module that transforms primitive documents (e.g., raw `Log` records) into view documents (e.g., `USDCTransfer`). Lenses must be deterministic: the same input always produces the same output. Hosts run them via LensVM. (WASMWASM A portable, sandboxed bytecode format. Lens transforms compile to WASM — typically from Rust or AssemblyScript — and hosts run them via LensVM.) – composable WebAssembly transforms for filtering, decoding, enriching, or reshaping data
- Wallet – cryptographic credentials used to sign and authorize deployments to a target network
Conceptually, a viewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. represents the pipeline:
indexed primitive data → query → lensesLens A WASM module that transforms primitive documents (e.g., raw `Log` records) into view documents (e.g., `USDCTransfer`). Lenses must be deterministic: the same input always produces the same output. Hosts run them via LensVM. (WASMWASM A portable, sandboxed bytecode format. Lens transforms compile to WASM — typically from Rust or AssemblyScript — and hosts run them via LensVM.) → GraphQL schema → consumable API
Developer Experience
ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator is distributed as a CLI and is designed for local-first development. It supports:
- Initializing and inspecting viewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. bundles
- Incrementally adding queries, schemas, and lensesLens A WASM module that transforms primitive documents (e.g., raw `Log` records) into view documents (e.g., `USDCTransfer`). Lenses must be deterministic: the same input always produces the same output. Hosts run them via LensVM.
- Executing lensesLens A WASM module that transforms primitive documents (e.g., raw `Log` records) into view documents (e.g., `USDCTransfer`). Lenses must be deterministic: the same input always produces the same output. Hosts run them via LensVM. locally for validation and preview
- Deploying viewsView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. to a local DefraDBdefraDB A peer-to-peer, document-oriented database embedded in every indexer and host. It handles storage, content addressing, CRDT merging, query serving, and P2P replication via libp2p. instance with a GraphQL Playground
- Signing and publishing viewsView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. to shared networks like devnet
By providing strong defaults, explicit versioning, and deterministic behavior, ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator enables developers to focus on data semantics and transformations, while Shinzo handles execution, distribution, and verification.
In summary, ViewView A curated, SDL-defined representation of defraDB documents. Views transform raw indexed data into a structured output shape. Creator is the primary interface for developers to turn indexed blockchain data into reliable, composable, and verifiable data products within the Shinzo ecosystem.