Skip to content

fix(ZEC): update ANYONECANPAY sign parameter#1109

Merged
hankliu418 merged 2 commits intomasterfrom
fix/zcash_anyonecanpay_transaction_issue
Feb 25, 2026
Merged

fix(ZEC): update ANYONECANPAY sign parameter#1109
hankliu418 merged 2 commits intomasterfrom
fix/zcash_anyonecanpay_transaction_issue

Conversation

@hankliu418
Copy link
Contributor

@hankliu418 hankliu418 commented Feb 25, 2026


Checklist:

  • README.md includes:
    • The details of signing data and transaction data, this includes parameters.
    • Official docs or white paper.
    • Website or api can query assets and broadcast transaction.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

PR Summary by Typo

Overview

This PR addresses a fix for Zcash (ZEC) transaction signing, specifically when using the ANYONECANPAY flag, by adjusting how transaction parameters are handled during the signing process.

Key Changes

  • Updated package versions for @coolwallet/zec to 2.0.1-beta.0.
  • Removed the inputs parameter from signTransaction, getArgument, and getScriptSigningActions functions in sign.ts and scriptUtil.ts.
  • Modified scriptUtil.ts to set hashPrevouts and hashSequence to zero-filled buffers, aligning with ANYONECANPAY signing requirements.
  • Updated the test snapshot in index.spec.ts to reflect the corrected signed transaction output.

Work Breakdown

Category Lines Changed
New Work 10 (33.3%)
Churn 9 (30.0%)
Rework 11 (36.7%)
Total Changes 30 (100.0%)
To turn off PR summary, please visit Notification settings.

@typo-app
Copy link

typo-app bot commented Feb 25, 2026

Static Code Review 📊

✅ All quality checks passed!

@cbx-tech cbx-tech requested review from a team, Dorac, Rickuan, a0979470582, gundomlegend, jin860315, melody0000tw and tp26610 and removed request for a team February 25, 2026 09:11
Copy link

@typo-app typo-app bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Code Review 🤖

Files Reviewed: 5
Comments Added: 0
Lines of Code Analyzed: 41
Critical Issues: 0

PR Health: Excellent 🔥

Give 👍 or 👎 on each review comment to help us improve.

gundomlegend
gundomlegend previously approved these changes Feb 25, 2026
melody0000tw
melody0000tw previously approved these changes Feb 25, 2026
@gundomlegend
Copy link
Contributor

可以修一下測試,更新簽章結果

@hankliu418 hankliu418 merged commit c3f0cd7 into master Feb 25, 2026
4 of 5 checks passed
@hankliu418 hankliu418 deleted the fix/zcash_anyonecanpay_transaction_issue branch February 25, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants