Skip to content

feat(primitives): add Signature v_byte helper - #1111

Merged
DaniPopes merged 2 commits into
mainfrom
fix-signature-v-byte
May 23, 2026
Merged

DaniPopes merged 2 commits into
mainfrom
fix-signature-v-byte

Conversation

@decofe

@decofe decofe commented May 23, 2026

Copy link
Copy Markdown
Contributor

Adds Signature::v_byte() to expose the Electrum-style recovery ID byte (27 + y_parity) requested in #1093.

as_bytes() now uses the helper so the existing byte serialization path stays aligned with the public API.

Tests:

  • cargo test -p alloy-primitives signature::sig

Closes #1093

@decofe
decofe requested review from DaniPopes and mattsse as code owners May 23, 2026 14:43
@decofe decofe changed the title Add Signature v_byte helper feat(primitives): add Signature v_byte helper May 23, 2026
@github-project-automation github-project-automation Bot moved this to Reviewed in Alloy May 23, 2026
@DaniPopes
DaniPopes enabled auto-merge (squash) May 23, 2026 14:52
@DaniPopes
DaniPopes merged commit 00d10c9 into main May 23, 2026
31 checks passed
@DaniPopes
DaniPopes deleted the fix-signature-v-byte branch May 23, 2026 14:59
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in Alloy May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature] alloy::primitives::Signature add method that returns (signature.v() as u8) + 27

3 participants