Expand description
Kanatoko local Soroban fork runtime.
The default build exposes deterministic fixture loading, production WASM
registration, stateful execution, and checkpoint/revert. The optional
capture feature adds one-scenario mainnet and testnet runners: generated
clients and dynamic calls drive automatic execution-based capture, then the
same body replays strictly offline. Imported client WASM supplies ABI
bindings only; captured network instances and WASM always execute.
Kanatoko does not emulate transactions or claim network-faithful execution.
Loaders and capture accept exactly SUPPORTED_PROTOCOL_VERSION by
default. An explicit newer-protocol opt-in (for example
AutoRunner::allow_newer_protocol with the capture feature, or
FrozenFixture::from_snapshot_allowing_newer_protocol) also accepts a
ledger exactly one protocol ahead. Captures keep the real network protocol;
only the ledger protocol given to the Host is downgraded.
Capture discovery suppresses panic-hook output and returns scenario panics as opaque errors. Strict replay still uses Rust’s standard panic hook, so scenario panic messages must never contain credentials or other secrets.
Re-exports§
pub use soroban_env_host;pub use soroban_ledger_snapshot;pub use soroban_sdk;
Structs§
- Authorization
Tree - A detached authorization tree observed by the Host.
- AutoRun
- Result of a successful automatic scenario.
- Auto
Runner - Runs one repeatable scenario through automatic discovery and strict replay.
- Candidate
Registration - Detached result of a successful local candidate installation.
- Capture
Builder - Builds an execution-driven, RPC-backed capture.
- Capture
Provenance - Source origin and ledger provenance.
- Capture
Report - Stable capture summary.
- Captured
Fixture - A coherent starting state plus strict Present/Absent coverage.
- Checkpoint
- A checkpoint of ledger state and the SDK address/nonce generators.
- Detached
Event - A detached contract or diagnostic event.
- Fork
- An isolated, stateful Soroban test environment.
- Frozen
Fixture - A validated, immutable starting point for independent
crate::Forks. - Invocation
Failure - Stable, structured invocation failure.
- Invocation
Report - Detached evidence from one isolated high-level preview.
- Invoke
Request - Fully detached generic contract invocation.
- Ledger
Value - One detached ledger value in a receipt diff.
- Receipt
- Detached evidence for one local Host invocation.
- Scenario
Fork - One stateful scenario pass.
- State
Change - Exact before/after value for one canonical ledger key.
- Strict
Checkpoint - Strict ledger state and local allowlists captured for revert.
- Strict
Fork - A stateful offline fork whose omitted keys remain Unknown rather than being silently treated as absent.
Enums§
- Applied
Auth Mode - Honest authorization evidence attached to a receipt.
- Auth
Mode - Authorization policy applied to one invocation.
- Auto
RunError - Automatic runner failures.
- Cache
Status - How the automatic runner obtained its fixture.
- Candidate
Install Mode - Evidence level for installing candidate code locally.
- Capture
Error - Fail-closed capture and strict replay errors.
- Execution
Mode - Whether an invocation is simulated or eligible to update the fork.
- Fixture
Error - Fail-closed errors produced before constructing a Soroban environment.
- Invoke
Error Kind - Coarse fallback when an SDK invocation error cannot be represented as an
exact
ScError. - Invoke
Outcome - Detached success or failure returned by the generic invoke API.
- Preview
Auth - Authorization policy for an isolated
ScenarioFork::preview. - Receipt
Disposition - Whether the isolated child was discarded or promoted.
- Runtime
Error - Errors produced while configuring the local runtime.
- Strict
Fork Error - Fail-closed errors from strict local execution.
Constants§
- SUPPORTED_
PROTOCOL_ VERSION - The only ledger protocol accepted by the selected Soroban Host.
Functions§
- canonical_
ledger_ digest - Computes the version-1 canonical ledger digest.
- mainnet
- Creates an automatic mainnet runner using
https://mainnet.sorobanrpc.comby default. - testnet
- Creates an automatic public testnet runner using
https://soroban-testnet.stellar.orgby default.