Skip to content

fix: Sync PrivateKeyEncoding type and struct - #4104

Merged
FrederikBolding merged 1 commit into
mainfrom
fb/sync-keyring-private-key-encoding
Aug 26, 2026
Merged

FrederikBolding merged 1 commit into
mainfrom
fb/sync-keyring-private-key-encoding

Conversation

@FrederikBolding

@FrederikBolding FrederikBolding commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Sync PrivateKeyEncoding type and struct with keyring-api. It was out of sync causing issues for certain Snaps.


Note

Low Risk
Narrow type and validation allowlist expansion aligned with keyring-api; no auth or data-path changes.

Overview
Adds base32 as a supported private-key encoding in the Snaps SDK and utils so they match @metamask/keyring-api.

The PrivateKeyEncoding union in permissions.ts and the PrivateKeyEncodingStruct enum used by endowment:keyring capabilities validation in keyring.ts previously only allowed hexadecimal and base58. Snaps that declare base32 in import/export format capabilities were failing type or runtime checks until this sync.

Reviewed by Cursor Bugbot for commit 05c94ac. Bugbot is set up for automated code reviews on this repo. Configure here.

@FrederikBolding
FrederikBolding marked this pull request as ready for review August 26, 2026 09:55
@FrederikBolding
FrederikBolding requested a review from a team as a code owner August 26, 2026 09:55
@FrederikBolding
FrederikBolding added this pull request to the merge queue Aug 26, 2026
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.59%. Comparing base (22be130) to head (05c94ac).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4104   +/-   ##
=======================================
  Coverage   98.59%   98.59%           
=======================================
  Files         429      429           
  Lines       12495    12495           
  Branches     1976     1976           
=======================================
  Hits        12320    12320           
  Misses        175      175           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Merged via the queue into main with commit a49a41c Aug 26, 2026
133 checks passed
@FrederikBolding
FrederikBolding deleted the fb/sync-keyring-private-key-encoding branch August 26, 2026 10:02
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.

2 participants