@metamask/snaps-utils 8.5.2 → 8.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -1
- package/dist/default-endowments.cjs +1 -0
- package/dist/default-endowments.cjs.map +1 -1
- package/dist/default-endowments.d.cts.map +1 -1
- package/dist/default-endowments.d.mts.map +1 -1
- package/dist/default-endowments.mjs +1 -0
- package/dist/default-endowments.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [8.6.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add `isSecureContext` global ([#2893](https://github.com/MetaMask/snaps/pull/2893))
|
|
15
|
+
|
|
10
16
|
## [8.5.2]
|
|
11
17
|
|
|
12
18
|
### Fixed
|
|
@@ -485,7 +491,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
485
491
|
- The version of the package no longer needs to match the version of all other
|
|
486
492
|
MetaMask Snaps packages.
|
|
487
493
|
|
|
488
|
-
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.
|
|
494
|
+
[Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.6.0...HEAD
|
|
495
|
+
[8.6.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.5.2...@metamask/snaps-utils@8.6.0
|
|
489
496
|
[8.5.2]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.5.1...@metamask/snaps-utils@8.5.2
|
|
490
497
|
[8.5.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.5.0...@metamask/snaps-utils@8.5.1
|
|
491
498
|
[8.5.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-utils@8.4.1...@metamask/snaps-utils@8.5.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-endowments.cjs","sourceRoot":"","sources":["../src/default-endowments.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,kBAAkB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACjE,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,MAAM;IACN,YAAY;IACZ,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,KAAK;IACL,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,UAAU;IACV,aAAa;IACb,qFAAqF;IACrF,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,aAAa;CACd,CAAC,CAAC","sourcesContent":["/**\n * Global JavaScript APIs exposed by default to all snaps.\n */\nexport const DEFAULT_ENDOWMENTS: readonly string[] = Object.freeze([\n 'atob',\n 'btoa',\n 'BigInt',\n 'console',\n 'crypto',\n 'Date',\n 'Math',\n 'setTimeout',\n 'clearTimeout',\n 'SubtleCrypto',\n 'TextDecoder',\n 'TextEncoder',\n 'URL',\n 'setInterval',\n 'clearInterval',\n 'Int8Array',\n 'Uint8Array',\n 'Uint8ClampedArray',\n 'Int16Array',\n 'Uint16Array',\n 'Int32Array',\n 'Uint32Array',\n 'Float32Array',\n 'Float64Array',\n 'BigInt64Array',\n 'BigUint64Array',\n 'DataView',\n 'ArrayBuffer',\n // Used by fetch, but also as API for some packages that don't do network connections\n // https://github.com/MetaMask/snaps-monorepo/issues/662\n // https://github.com/MetaMask/snaps-monorepo/discussions/678\n 'AbortController',\n 'AbortSignal',\n]);\n"]}
|
|
1
|
+
{"version":3,"file":"default-endowments.cjs","sourceRoot":"","sources":["../src/default-endowments.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,kBAAkB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACjE,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,MAAM;IACN,YAAY;IACZ,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,KAAK;IACL,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,UAAU;IACV,aAAa;IACb,qFAAqF;IACrF,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,aAAa;CACd,CAAC,CAAC","sourcesContent":["/**\n * Global JavaScript APIs exposed by default to all snaps.\n */\nexport const DEFAULT_ENDOWMENTS: readonly string[] = Object.freeze([\n 'atob',\n 'btoa',\n 'BigInt',\n 'console',\n 'crypto',\n 'Date',\n 'Math',\n 'setTimeout',\n 'clearTimeout',\n 'SubtleCrypto',\n 'TextDecoder',\n 'TextEncoder',\n 'URL',\n 'setInterval',\n 'clearInterval',\n 'Int8Array',\n 'Uint8Array',\n 'Uint8ClampedArray',\n 'Int16Array',\n 'Uint16Array',\n 'Int32Array',\n 'isSecureContext',\n 'Uint32Array',\n 'Float32Array',\n 'Float64Array',\n 'BigInt64Array',\n 'BigUint64Array',\n 'DataView',\n 'ArrayBuffer',\n // Used by fetch, but also as API for some packages that don't do network connections\n // https://github.com/MetaMask/snaps-monorepo/issues/662\n // https://github.com/MetaMask/snaps-monorepo/discussions/678\n 'AbortController',\n 'AbortSignal',\n]);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-endowments.d.cts","sourceRoot":"","sources":["../src/default-endowments.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"default-endowments.d.cts","sourceRoot":"","sources":["../src/default-endowments.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAmC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-endowments.d.mts","sourceRoot":"","sources":["../src/default-endowments.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"default-endowments.d.mts","sourceRoot":"","sources":["../src/default-endowments.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAmC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-endowments.mjs","sourceRoot":"","sources":["../src/default-endowments.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACjE,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,MAAM;IACN,YAAY;IACZ,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,KAAK;IACL,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,UAAU;IACV,aAAa;IACb,qFAAqF;IACrF,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,aAAa;CACd,CAAC,CAAC","sourcesContent":["/**\n * Global JavaScript APIs exposed by default to all snaps.\n */\nexport const DEFAULT_ENDOWMENTS: readonly string[] = Object.freeze([\n 'atob',\n 'btoa',\n 'BigInt',\n 'console',\n 'crypto',\n 'Date',\n 'Math',\n 'setTimeout',\n 'clearTimeout',\n 'SubtleCrypto',\n 'TextDecoder',\n 'TextEncoder',\n 'URL',\n 'setInterval',\n 'clearInterval',\n 'Int8Array',\n 'Uint8Array',\n 'Uint8ClampedArray',\n 'Int16Array',\n 'Uint16Array',\n 'Int32Array',\n 'Uint32Array',\n 'Float32Array',\n 'Float64Array',\n 'BigInt64Array',\n 'BigUint64Array',\n 'DataView',\n 'ArrayBuffer',\n // Used by fetch, but also as API for some packages that don't do network connections\n // https://github.com/MetaMask/snaps-monorepo/issues/662\n // https://github.com/MetaMask/snaps-monorepo/discussions/678\n 'AbortController',\n 'AbortSignal',\n]);\n"]}
|
|
1
|
+
{"version":3,"file":"default-endowments.mjs","sourceRoot":"","sources":["../src/default-endowments.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACjE,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,MAAM;IACN,YAAY;IACZ,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,KAAK;IACL,aAAa;IACb,eAAe;IACf,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,UAAU;IACV,aAAa;IACb,qFAAqF;IACrF,wDAAwD;IACxD,6DAA6D;IAC7D,iBAAiB;IACjB,aAAa;CACd,CAAC,CAAC","sourcesContent":["/**\n * Global JavaScript APIs exposed by default to all snaps.\n */\nexport const DEFAULT_ENDOWMENTS: readonly string[] = Object.freeze([\n 'atob',\n 'btoa',\n 'BigInt',\n 'console',\n 'crypto',\n 'Date',\n 'Math',\n 'setTimeout',\n 'clearTimeout',\n 'SubtleCrypto',\n 'TextDecoder',\n 'TextEncoder',\n 'URL',\n 'setInterval',\n 'clearInterval',\n 'Int8Array',\n 'Uint8Array',\n 'Uint8ClampedArray',\n 'Int16Array',\n 'Uint16Array',\n 'Int32Array',\n 'isSecureContext',\n 'Uint32Array',\n 'Float32Array',\n 'Float64Array',\n 'BigInt64Array',\n 'BigUint64Array',\n 'DataView',\n 'ArrayBuffer',\n // Used by fetch, but also as API for some packages that don't do network connections\n // https://github.com/MetaMask/snaps-monorepo/issues/662\n // https://github.com/MetaMask/snaps-monorepo/discussions/678\n 'AbortController',\n 'AbortSignal',\n]);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/snaps-utils",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.0",
|
|
4
4
|
"description": "A collection of utilities for MetaMask Snaps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@metamask/rpc-errors": "^7.0.1",
|
|
86
86
|
"@metamask/slip44": "^4.0.0",
|
|
87
87
|
"@metamask/snaps-registry": "^3.2.2",
|
|
88
|
-
"@metamask/snaps-sdk": "^6.
|
|
88
|
+
"@metamask/snaps-sdk": "^6.11.0",
|
|
89
89
|
"@metamask/superstruct": "^3.1.0",
|
|
90
90
|
"@metamask/utils": "^10.0.0",
|
|
91
91
|
"@noble/hashes": "^1.3.1",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@metamask/post-message-stream": "^8.1.1",
|
|
114
114
|
"@swc/core": "1.3.78",
|
|
115
115
|
"@swc/jest": "^0.2.26",
|
|
116
|
-
"@ts-bridge/cli": "^0.
|
|
116
|
+
"@ts-bridge/cli": "^0.6.0",
|
|
117
117
|
"@types/jest": "^27.5.1",
|
|
118
118
|
"@types/mocha": "^10.0.1",
|
|
119
119
|
"@types/node": "18.14.2",
|