Skip to content

soroban-test-utils v0.1.0

Latest

Choose a tag to compare

@cokehill cokehill released this 30 Apr 23:21
· 1 commit to main since this release

The first open-source JS/TS testing utility library built specifically for Soroban smart contracts.

What's included
MockLedger — in-memory offline ledger with full TTL/expiration tracking, bump, restore, and event logging
SorobanTestClient — deploy, invoke, simulate against any Stellar network
assertResult / assertContractData — fluent, chainable assertions on invoke results, events, resources, and expiration
ExpirationSimulator — test temporary cliff, persistent restore window, and TTL bump scenarios offline
ExpirationAnalyzer — live TTL inspection and human-readable expiration descriptions via RPC
ResourceProfiler — record, compare, and regression-test CPU/memory/fee usage
All Soroban protocol constants documented in one place
191 passing tests
Why this exists
Soroban introduced state expiration — ledger entries that don't persist indefinitely — with almost no community tooling. This library directly addresses that gap.