Expand description
§Hopper Schema
Schema export, ABI fingerprinting, decode tooling, and program management primitives for the Hopper framework.
Provides:
- Layout manifest generation (JSON-compatible metadata)
- Layout fingerprint computation and comparison
- Schema diff detection for migration safety
- Field-level compatibility checking
- Account header decoding and inspection
- Segment registry inspection
- Manifest registries for multi-layout programs
- Program manifests for Hopper Manager (full program schema)
- Field-level account decoding for account inspection
- Segment migration analysis and migration planning
Modules§
- accounts
- Context-level schema metadata for the Account DSL.
- anchor_
idl - Anchor IDL Emitter
- clientgen
- Client Generation Module
- codama
- Codama Projection Module
- python_
client - Python client emitter
- rust_
client - Rust client generator.
Structs§
- Account
Entry - An account entry in an instruction’s account list.
- ArgDescriptor
- An argument descriptor for an instruction.
- Codama
Account - Codama-compatible account descriptor.
- Codama
Event - Codama-compatible event descriptor.
- Codama
Instruction - Codama-compatible instruction descriptor.
- Codama
Projection - Codama-compatible projection of a Hopper program.
- Compatibility
Explain - A structured, human-readable explanation of a compatibility verdict.
- Compatibility
Pair - A compatibility pair describing a known upgrade path.
- Constant
Descriptor - Public-facing program constant.
- Decoded
Field - A decoded field value from account data.
- Decoded
Header - Decoded account header for inspection/tooling.
- Decoded
Receipt - Decoded receipt from wire bytes. Useful for CLI and off-chain tooling.
- Decoded
Segment - Decoded segment entry for inspection.
- Error
Descriptor - Descriptor for one variant of a
#[hopper::error]enum. - Error
Registry - A convenience wrapper holding an enum’s full error table.
- Event
Descriptor - An event descriptor in a program manifest.
- Field
Compat Entry - A single field compatibility entry.
- Field
Compat Report - Result of a field-level compatibility comparison.
- Field
Descriptor - A field descriptor in a layout manifest.
- Hopper
Idl - Extended IDL with full Hopper-native sections.
- Hopper
Schema Pointer - On-chain account that points to a Hopper program’s schema.
- IdlAccount
Entry - IDL account entry with optional PDA metadata.
- IdlInstruction
Descriptor - IDL instruction descriptor.
- IdlSegment
Descriptor - Segment metadata for inclusion in the IDL.
- Instruction
Descriptor - An instruction descriptor in a program manifest.
- Layout
Behavior - Describes how a layout behaves under mutation, what policy it expects, and what receipt profile it should produce.
- Layout
Fingerprint - Extended layout fingerprint combining wire-level and semantic identity.
- Layout
Manifest - A layout manifest describing an account type.
- Layout
Metadata - Extended per-layout metadata for the manifest.
- Manager
Metadata - Minimal manager-readable metadata for a Hopper layout.
- Manifest
Registry - A static registry of all layout manifests for a program.
- Migration
Plan - A generated migration plan between two layout versions.
- Migration
Step - A step in the migration plan.
- Operating
Profile - A machine-readable summary of a program’s operational characteristics.
- PdaSeed
Hint - PDA seed hint for an instruction account.
- Policy
Descriptor - A policy descriptor in a program manifest.
- Program
Idl - A public-facing IDL for a Hopper program.
- Program
Manifest - A full program manifest for Hopper Manager and tooling.
- Receipt
Explain - Human-readable explanation of a decoded receipt.
- Receipt
Narrative - An auto-generated human-readable narrative describing a mutation.
- Receipt
Profile - A receipt profile describing what a receipt for a given mutation type looks like.
- Schema
Bundle - Unified schema payload tying runtime identity to rich manifest metadata.
- Segment
Advice - Migration advice for a single segment.
- Segment
Map - A decoded segment map for display.
- Segment
Migration Report - Segment-level migration report for a segmented account.
- Semantic
Lint - A semantic lint warning produced by analyzing field intents, mutation classes, and policy against a layout manifest.
Enums§
- ArgParse
Error - Failure reason for
#[hopper::args] T::parse. - Compat
Impact - Compatibility impact level encoded in a receipt.
- Compatibility
Verdict - Unified compatibility verdict between two layout versions.
- Field
Compat - Field-level compatibility result.
- Field
Intent - Semantic intent of a layout field.
- Layout
Stability Grade - How safe it is to evolve a layout over time.
- Lint
Severity - Lint severity.
- Migration
Action - Migration action type.
- Migration
Policy - Migration policy for a version transition.
- Mutation
Class - Classification of how a layout or segment behaves when mutated.
- Narrative
Risk - Risk level for a receipt narrative.
- Phase
- Instruction execution phase encoded in a receipt.
- Policy
Class - High-level classification of what a policy governs.
- Segment
Role Hint - Segment role classification for migration (mirrors hopper-core SegmentRole).
Constants§
- MANIFEST_
COMPRESS_ NONE - Compression tag: no compression (raw JSON).
- MANIFEST_
COMPRESS_ ZLIB - Compression tag: zlib-deflate compressed JSON.
- MANIFEST_
HEADER_ LEN - On-chain manifest account header size (bytes).
- MANIFEST_
MAGIC - 8-byte magic discriminator at the start of a manifest account.
- MANIFEST_
SEED - PDA seed for on-chain Hopper manifest accounts.
- MANIFEST_
VERSION - Current manifest wire format version.
Traits§
- Account
Schema Ext - Bridge from a live
AccountViewto the schema bundle of a concrete layout type. - Schema
Export - Trait for layout types that can export their full schema information.
Functions§
- compare_
fields - Compare two manifests field-by-field.
- decode_
account_ fields - Decode all fields of an account against a layout manifest.
- decode_
header - Decode an account header from raw bytes.
- decode_
segments - Decode segment entries from a segmented account.
- format_
header - Decode an account header and format it for display.
- format_
segment_ map - Decode segments and return a displayable segment map string.
- identify_
account - Try to identify which manifest matches an account’s header.
- is_
append_ compatible - Check if two layout manifests are append-compatible.
- is_
backward_ readable - Check if accounts written by
newercan still be parsed by code expectingolder. - lint_
layout - Run semantic lints against a layout manifest and its behavior.
- lint_
policy - Run policy-aware semantic lints.
- requires_
migration - Check if migration is required between two manifests.