feat: Add Blob as a default endowment#4063
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4063 +/- ##
=======================================
Coverage 98.59% 98.59%
=======================================
Files 425 425
Lines 12413 12414 +1
Branches 1969 1969
=======================================
+ Hits 12238 12239 +1
Misses 175 175 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
naugtur
approved these changes
Jul 13, 2026
naugtur
left a comment
There was a problem hiding this comment.
Blob global is a constructor for data views, it doesn't bring in any new powers that didn't already exist with fetch or typed ararys
Mrtenz
approved these changes
Jul 13, 2026
Merged
pull Bot
pushed a commit
to Dustin4444/snaps
that referenced
this pull request
Jul 13, 2026
Release candidate for `164.0.0`. Including support for `Blob` in Snaps. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Version and changelog-only release; sandbox surface grows slightly via the Blob endowment already merged in prior PRs. > > **Overview** > Release cut for **164.0.0** that bumps the monorepo version and publishes **`@metamask/snaps-utils@12.4.0`** and **`@metamask/snaps-execution-environments@11.2.0`**. > > The highlighted user-facing change in these package notes is **`Blob` as a default Snap endowment** ([MetaMask#4063](MetaMask#4063)), so Snaps can use `Blob` without an extra permission. The execution-environments release also records a **`@metamask/superstruct`** bump to `^3.3.0` ([MetaMask#4062](MetaMask#4062)). > > No application logic appears in this diff—only version fields and changelog/compare-link updates. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1a21ee3. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Add
Blobas a default endowment forinstanceofchecks when usingfetch.https://consensyssoftware.atlassian.net/browse/WPC-1126
Note
Low Risk
Small expansion of the default sandbox API using the same hardened global pattern as other Web platform types; no auth or network policy changes.
Overview
Snaps now receive a hardened global
Blobby default, alongside existing fetch-related globals likeResponse.Blobis registered in the common endowment factory, included inDEFAULT_ENDOWMENTS, and covered by hardening and executor tests (includingfetch→res.blob()→instanceof Blob). Simulation endowment snapshots are updated to listBlob.Reviewed by Cursor Bugbot for commit 00347d2. Bugbot is set up for automated code reviews on this repo. Configure here.