Description
Build a type-safe XDR deserialization layer that converts raw Soroban contract return values into strongly-typed application objects, eliminating unsafe manual XDR parsing.
Requirements and Context
- Type safety: XDR values must deserialize to typed objects
- Testing: Test deserialization for all return value types
- Documentation: Document the deserialization layer
Suggested Execution
Branch: feat/issue-090-soroban-xdr-typesafe-deserialization
Implement Changes
- Add a type-safe XDR deserialization layer to
packages/stellar/src/soroban.ts
- Map Soroban SCVal types to TypeScript types
- Handle all scalar, vector, and map return value types
- Throw typed errors on deserialization failures
Test and Commit
- Test deserialization of scalar, vector, and map return values
- Test typed error on malformed XDR
- Document the deserialization layer
Example Commit Message
feat(soroban): add type-safe XDR deserialization layer
- Map Soroban SCVal types to TypeScript types
- Handle scalar, vector, and map return values
- Throw typed errors on deserialization failures
Guidelines
- Cover all SCVal variants used by templates
- Never silently coerce malformed XDR
- Build on the existing typed error infrastructure
Description
Build a type-safe XDR deserialization layer that converts raw Soroban contract return values into strongly-typed application objects, eliminating unsafe manual XDR parsing.
Requirements and Context
Suggested Execution
Branch:
feat/issue-090-soroban-xdr-typesafe-deserializationImplement Changes
packages/stellar/src/soroban.tsTest and Commit
Example Commit Message
Guidelines