Skip to content

feat(txrep-converter): convert envelopes between XDR and SEP-0011 - #532

Merged
egekoca merged 2 commits into
RevenantLabs:mainfrom
Caneryy:feat/txrep-converter
Oct 21, 2026
Merged

egekoca merged 2 commits into
RevenantLabs:mainfrom
Caneryy:feat/txrep-converter

Conversation

@Caneryy

@Caneryy Caneryy commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Convert a pasted transaction envelope between base64 XDR and SEP-0011 Txrep entirely offline.
  • Auto-detect the input, reject secret seeds and oversized text, and require a type line plus well-typed values when compiling Txrep.
  • Round-trip the result and hide the converted text when the envelope bytes do not match.

Files

  • features/txrep-converter/

Out of scope

  • Does not sign or submit a transaction.
  • Does not edit individual Txrep fields beyond the pasted text.

Test plan

  • npx vitest run features/txrep-converter (25 passed)
  • npm run verify:features -- txrep-converter (36 files)
  • Paste the SEP-0011 sample envelope and confirm type: ENVELOPE_TYPE_TX is shown only after the round trip matches

Closes #504

@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@Caneryy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Caneryy

Caneryy commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the TypeScript errors in lib/txrep-tree.ts against @stellar/stellar-sdk 13.

  • Pre-auth and hash signers now go through decodePreAuthTx and decodeSha256Hash. This SDK has no isValidPreAuthTx or isValidSha256Hash.
  • The envelope arm check accepts the XDR TransactionEnvelope value. The generated type exposes switch(), while the runtime union still has arm().
  • Pool-share ids are passed as PoolId. The generated Hash alias does not accept a Buffer.

@egekoca
egekoca merged commit 4136b5d into RevenantLabs:main Oct 21, 2026
1 check passed
Sign up for free to 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.

[Stellar Standards (SEPs)] SEP-0011 Txrep Converter

2 participants