Skip to content

feat(serialization): add buildUnsignedXdr helper for offline signing (#438) - #534

Merged
Chuks-coderr merged 2 commits into
SoroStream:mainfrom
adeniran19-maker:feat/438-offline-xdr-signing
Aug 29, 2026
Merged

feat(serialization): add buildUnsignedXdr helper for offline signing (#438)#534
Chuks-coderr merged 2 commits into
SoroStream:mainfrom
adeniran19-maker:feat/438-offline-xdr-signing

Conversation

@adeniran19-maker

Copy link
Copy Markdown
Contributor

Description

This PR introduces the buildUnsignedXdr(operation, params) helper function to construct and serialize Soroban contract transactions to base64 XDR without broadcasting them, enabling offline and air-gapped signing workflows.

Summary of Changes

  • buildUnsignedXdr Helper: Implemented in src/serialization.ts, supporting both named contract operations (createStream, withdraw, cancelStream, topUp, updateFlowRate, pauseStream, resumeStream, transferStream, setOperator, operatorCancelStream, operatorTopUp, addDelegate, revokeDelegate) and raw xdr.Operation objects.
  • Client Integration: Added buildUnsignedXdr method to SoroStreamClient using the client'''s configured contract address and connected wallet.
  • Types & Exports: Defined BuildUnsignedXdrParams and exported helper from @sorostream/sdk.
  • Tests: Added tests in test/offline_xdr_signing.test.ts verifying unsigned transaction construction, envelope deserialization with TransactionBuilder.fromXDR, parameter overrides (fee, memo, sequence number, timeout, network passphrase), and error cases.

Closes #438

…(issue SoroStream#438)

- Implement buildUnsignedXdr helper function for constructing and serialising unsigned transaction XDR
- Support operation name strings (createStream, withdraw, cancelStream, topUp, updateFlowRate, pause, resume, transferStream, etc.) and raw xdr.Operation
- Add buildUnsignedXdr method to SoroStreamClient
- Export buildUnsignedXdr and BuildUnsignedXdrParams from @sorostream/sdk
- Add unit tests in test/offline_xdr_signing.test.ts
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@adeniran19-maker 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

@Chuks-coderr
Chuks-coderr merged commit 18cb89c into SoroStream:main Aug 29, 2026
0 of 3 checks 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.

Add XDR serialisation helper for offline and air-gapped signing workflows

2 participants