Skip to main content

Module substrate

Module substrate 

Source
Expand description

Sovereign substrate surface.

This is the lowest public layer for programs that want direct account, syscall, PDA, hashing, memory, budget, and raw-entrypoint tools while still staying inside Hopper’s crate graph. Framework-mode code should prefer hopper::prelude::*; systems-mode code should prefer hopper::systems::*.

Modules§

account_view
RuntimeAccount memory layout and AccountView zero-copy wrapper.
address
Solana address type – 32-byte public key.
batch
Batch account operations.
budget
Compute-unit budget tracking and instrumentation.
capability
Compile-time account capability types.
entrypoint
Program entrypoint ownership for Hopper Native.
error
Program error type for Solana on-chain programs.
hash
Cryptographic hash functions via Solana syscalls.
introspect
Instruction introspection – stack height and sibling instruction access.
lazy
Lazy account parser – on-demand account deserialization.
lens
Cross-program account lenses – read foreign fields by offset.
log
Zero-allocation logging via Solana syscalls.
mem
SVM-optimized memory operations.
pda
PDA (Program Derived Address) helpers.
pod
Substrate-level Pod marker.
raw
Raw escape hatch for Hopper Native.
raw_account
Raw account header for the Solana loader input buffer.
raw_input
Raw loader input parsing for Hopper Native.
return_data
CPI return data retrieval and typed deserialization.
safe
Safe default path for Hopper Native.
syscalls
Raw Solana syscall declarations.
sysvar
Sysvar access via direct syscalls.
verify
Verified CPI – pre/post state assertions around cross-program invocations.
wire
Alignment-safe wire types for zero-copy account data.

Macros§

address
Compile-time base58 address literal.

Structs§

AccountView
Zero-copy view over a Solana account.
Address
A Solana address (public key): 32 bytes, transparent layout.
CpiAccount
C-ABI account info passed to sol_invoke_signed_c.
CuBudget
Compute-unit budget tracker.
DataFingerprint
Fast integrity check for account data using FNV-1a hash.
InstructionAccount
Metadata for an account referenced in a CPI instruction.
InstructionView
A cross-program instruction to invoke.
LamportSnapshot
Snapshot of lamport balances for two accounts before a CPI.
NativeAccountView
Zero-copy view over a Solana account in the BPF input buffer.
NativeAddress
A Solana address (public key): 32 bytes, transparent layout.
Ref
RefMut
ReturnData
Return data from a previous CPI call.
RuntimeAccount
Raw C-layout struct matching the Solana BPF account input format.
Seed
A single PDA seed for CPI signing.
Signer
A PDA signer: a set of seeds that derive the signing PDA.

Enums§

ProgramError
Errors that a Solana program can return.

Constants§

SUCCESS

Functions§

find_bump_for_address
Find the bump seed for a known PDA address, skipping curve validation.
read_bump_from_account
Read the bump byte directly from account data at a known offset.
verify_pda_from_stored_bump
Verify a PDA using the bump stored in account data (cheapest path).
verify_pda_strict
Verify that an address matches a PDA derived from the given seeds.

Type Aliases§

ProgramResult
Result type returned by all Hopper instruction handlers.