Skip to main content

Crate kanatoko

Crate kanatoko 

Source
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§

AuthorizationTree
A detached authorization tree observed by the Host.
AutoRun
Result of a successful automatic scenario.
AutoRunner
Runs one repeatable scenario through automatic discovery and strict replay.
CandidateRegistration
Detached result of a successful local candidate installation.
CaptureBuilder
Builds an execution-driven, RPC-backed capture.
CaptureProvenance
Source origin and ledger provenance.
CaptureReport
Stable capture summary.
CapturedFixture
A coherent starting state plus strict Present/Absent coverage.
Checkpoint
A checkpoint of ledger state and the SDK address/nonce generators.
DetachedEvent
A detached contract or diagnostic event.
Fork
An isolated, stateful Soroban test environment.
FrozenFixture
A validated, immutable starting point for independent crate::Forks.
InvocationFailure
Stable, structured invocation failure.
InvocationReport
Detached evidence from one isolated high-level preview.
InvokeRequest
Fully detached generic contract invocation.
LedgerValue
One detached ledger value in a receipt diff.
Receipt
Detached evidence for one local Host invocation.
ScenarioFork
One stateful scenario pass.
StateChange
Exact before/after value for one canonical ledger key.
StrictCheckpoint
Strict ledger state and local allowlists captured for revert.
StrictFork
A stateful offline fork whose omitted keys remain Unknown rather than being silently treated as absent.

Enums§

AppliedAuthMode
Honest authorization evidence attached to a receipt.
AuthMode
Authorization policy applied to one invocation.
AutoRunError
Automatic runner failures.
CacheStatus
How the automatic runner obtained its fixture.
CandidateInstallMode
Evidence level for installing candidate code locally.
CaptureError
Fail-closed capture and strict replay errors.
ExecutionMode
Whether an invocation is simulated or eligible to update the fork.
FixtureError
Fail-closed errors produced before constructing a Soroban environment.
InvokeErrorKind
Coarse fallback when an SDK invocation error cannot be represented as an exact ScError.
InvokeOutcome
Detached success or failure returned by the generic invoke API.
PreviewAuth
Authorization policy for an isolated ScenarioFork::preview.
ReceiptDisposition
Whether the isolated child was discarded or promoted.
RuntimeError
Errors produced while configuring the local runtime.
StrictForkError
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.com by default.
testnet
Creates an automatic public testnet runner using https://soroban-testnet.stellar.org by default.