Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions invofi/apps/sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@ export type {
ReputationRecordedData,
} from './events';

// ── Contract interaction testing framework (#226) ───────────────────────────
// `createTestInvoice` / `createTestOffer` — typed factory helpers with
// sensible defaults + partial overrides.
// `MockServerBuilder` — fluent builder for configuring failure scenarios on
// the mock client (insufficient balance, auth errors, network errors, …).
// `EventTracker` — wraps any InvofiClient and captures protocol events emitted
// by each state-changing call so tests can assert on event history.
export {
createTestInvoice,
createTestOffer,
MockServerBuilder,
createMockServerBuilder,
EventTracker,
createEventTracker,
} from './testing';
export type { TrackedEventType, TrackedEvent } from './testing';

// ── Offline cache (IndexedDB, stale-while-revalidate) ───────────────────────
// Browser-only, gracefully no-ops under SSR/Node (see cache.ts). Caches
// invoice/offer/position reads with configurable per-type TTLs and evicts
Expand Down
Loading