Skip to content

refactor: export shield signature message as a standalone constant - #31

Merged
mattgle merged 1 commit into
devfrom
refactor/export-shield-signature-message
Jul 31, 2026
Merged

mattgle merged 1 commit into
devfrom
refactor/export-shield-signature-message

Conversation

@mattgle

@mattgle mattgle commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

what

RAILGUN_SHIELD — the message a public wallet signs to derive a shield private key — was only reachable through the RailgunWallet.getShieldPrivateKeySignatureMessage() static. Downstream packages that need the constant but not a wallet instance were re-declaring it locally, which puts a correctness-critical value in more than one place: a mismatch produces a valid-looking 32-byte key with no error, and the resulting shield is simply undecryptable.

It is now SHIELD_PRIVATE_KEY_SIGNATURE_MESSAGE, exported from notes/shield-note.ts and through the package entry point. Placing it next to ShieldNote means consumers already importing that module pick it up at no extra cost.

breaking

RailgunWallet.getShieldPrivateKeySignatureMessage() is removed. Import the constant instead.

@bhflm bhflm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@mattgle
mattgle merged commit 07846f0 into dev Jul 31, 2026
1 check passed
@mattgle
mattgle deleted the refactor/export-shield-signature-message branch July 31, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants