Snaps execution environment
Secure ECMAScript (SES).
There's no DOM, no Node.js built-ins, and no platform-specific APIs other than MetaMask's
this list that
are also in Node.js are available as normal.
This includes globals such as
The following globals are also available:
The execution environment is instrumented in this way to:
- Prevent Snaps from influencing any other running code, including MetaMask itself. That is, prevent all Snaps from polluting the global environment and malicious Snaps from stealing the user's stuff.
fetch) without permission.
- Ensure that the execution environment is "fully virtualizable," that is, platform-independent.
This allows you to safely execute Snaps anywhere, without the Snap needing to worry about where and how it's executed.
Secure ECMAScript (SES)