Changelog

All notable changes to the Zypp SDK.


0.2.0 (Unreleased)

General Intent Pivot

  • Replaced payment-only model with a closed IntentType enum: Payment, Ticket, Action
  • Core is now domain-agnostic except the settlement tail

Types

  • Added TrustTier (Unsigned / Signed) — fixes downgrade attack
  • Added CryptographicEnvelope (signature + public_key + per-key nonce) — fixes replay attack
  • Added DualSignatureEnvelope for Tickets (issuer + holder signatures)
  • Added content_hash: u64 to Intent — FNV-1a dedup on content, not ID
  • RejectionReason is now type-blind — replaced ticket-specific variants with ValidationError { code, message, details }
  • QueueStatus now has four states: Pending, SyncedProvisional, SyncedFinalized, Failed

State Machine

  • Core-enforced transitions: mark_provisional() / finalize() / fail()
  • SyncedFinalized is terminal — no transitions out
  • finalize() from Pending is rejected — must pass through SyncedProvisional

Security

  • Encrypted local storage via AES-256-GCM (zypp_init_with_encryption)
  • Platform secure storage: initWithSecureStorage (iOS Keychain, Android Keystore)
  • Trust tier lint system — registerKind() returns warnings; lint() audits
  • Dedicated zypp_create_payment_intent binding — fixed payment path through FFI
  • Trust tier parameter added to zypp_create_intent — resolved catch-22 for Signed intents
  • QueueStatus / RejectionReason now serialized as JSON at FFI/JSI boundary (replaced Debug formatting)

Templates

  • zypp-ticket: Atomic redeem-once check-and-set, dual-signature (issuer+holder)
  • zypp-arcade: Signed+nonce bundled tier, provisional-vs-finalized handling, explicit trust-tier per action kind

Bindings

  • FFI: 40 tests covering all 19 functions
  • JSI: 35 tests (identical surface to FFI, parity verified)
  • New bindings: enqueue_intent, mark_provisional, finalize, signature attachment (device + issuer + holder), encrypted persistence, kind registration, connectivity reporting, degraded-routing settlement, lint

Platform SDKs

  • Expo SDK: 18 typed wrappers in src/index.ts, all errors throw ZyppError
  • Unity SDK: 19 public methods via ZyppSdk.cs, ZyppTypes.cs, build postprocessor
  • Status parsing: JSON-native (no regex against Debug output)
  • Connectivity reporting and degraded routing on both platforms

Transport

  • Compact payload schema with version byte, bincode, base64
  • BLE adapter with MTU-aware chunking/reassembly (9 tests)
  • NFC adapter with NDEF encode/decode (7 tests)
  • QR codec (3 tests)
  • Extensible Transport trait

Tests

  • 220+ tests across the stack
  • Integration tests: queue persistence across offline periods, sync/retry + provisional revert, transport tamper detection

Documentation

  • TYPES_DESIGN.md — refined type system design document
  • SECURITY_MODEL.md — integrity vs validity split, threat analysis
  • ONBOARDING.md — integration guides with sample flows per platform
  • Cross-layer audit: 4 layers verified (core → FFI → JSI → SDK)

0.1.0 (Initial)

  • Payment-only intent model
  • Basic queue with offline persistence
  • Rust core with FFI bindings for iOS
  • Initial Expo SDK integration