Feat/81 offline stellar signing#108
Merged
truthixify merged 3 commits intoJun 27, 2026
Merged
Conversation
…ctions (wraith-protocol#81) Add prepareOfflineStellarTransaction, signOfflineStellarTransaction, and submitOfflineStellarTransaction for cold-signing Stellar stealth payments. Three exported functions: - prepareOfflineStellarTransaction - build unsigned envelope offline - signOfflineStellarTransaction - sign with secret key or stealth scalar - submitOfflineStellarTransaction - POST signed XDR to Horizon Includes 11 unit tests covering: valid envelope construction, input validation, regular key signing, stealth scalar + stealthPubKey signing, and full end-to-end prepare -> sign -> verify flow. Also fixes a pre-existing duplicate computeAnnouncementViewTag declaration in stealth.ts, adds announcements.ts to .prettierignore for the pre-existing syntax error, and adds docs/offline-signing.md documenting the cold-signing workflow with security best practices.
|
@Hollujay 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! 🚀 |
Contributor
|
Almost there. After #99 just landed, conflicts in git fetch origin
git rebase origin/develop
# .prettierignore: keep both sets of entries
# index.ts: keep develop's sdk-react exports, then add your offline-sign export
git add -u
git rebase --continue
git push --force-with-lease |
281eaae to
db7a1e2
Compare
Contributor
Author
|
@truthixify Rebased on develop and force pushed. Conflicts resolved |
Contributor
|
Clean merge after rebase. 211-line offline-sign + 231-line tests + 244-line docs. Hardware-wallet / cold-storage workflow is exactly what was asked. Thanks @Hollujay. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #81
PR Summary
Offline Signing Workflow for Stellar
Adds three functions for cold-signing Stellar stealth payments:
prepareOfflineStellarTransaction— builds an unsigned transaction envelope offline, returns a serializableOfflineStellarEnvelopewith XDR, network passphrase, and hashsignOfflineStellarTransaction— signs an envelope with either a Stellar secret key (S...) or a stealth private scalar (bigint+stealthPubKeyfor the signature hint)submitOfflineStellarTransaction— POSTs the signed XDR to Horizon viagetDeploymentNew Files
src/chains/stellar/offline-sign.tsOfflineSignParams/OfflineStellarEnvelopetypestest/chains/stellar/offline-sign.test.tsdocs/offline-signing.mdChanges to Existing Files
src/chains/stellar/index.ts— re-exports the new modulesrc/chains/stellar/stealth.ts— removes duplicatecomputeAnnouncementViewTagdeclaration (pre-existing bug fix).prettierignore— addsannouncements.ts(pre-existing syntax error)Test Coverage
transactionXdr,networkPassphrase,hash)deriveStealthKeys→generateStealthAddress→deriveStealthPrivateScalar→signOfflineStellarTransactionflow)stealthPubKeyerrorsubmitOfflineStellarTransactionexistence as separate async function