Skip to content

Conversation

@lcovar
Copy link
Contributor

Summary

  • Changed buildTransaction() to return Transaction instead of Uint8Array
  • Changed buildFromVersionedData() to return VersionedTransaction instead of Uint8Array
  • Added fromWasm() factory methods to Transaction and VersionedTransaction classes
  • Callers that need bytes can simply call .toBytes() on the result

This addresses feedback from PR #113 to return rich Transaction objects that can be inspected before serializing, which is more ergonomic.

Test plan

  • All 90 existing tests pass
  • Updated tests to use new return types

Changed buildTransaction() and buildFromVersionedData() to return Transaction and VersionedTransaction objects instead of raw bytes. This allows callers to inspect the transaction before serializing, which is more ergonomic and matches the existing Transaction API. Callers that need bytes can simply call .toBytes() on the result.
@lcovarlcovar requested a review from a team as a code ownerJanuary 29, 2026 19:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@lcovar