Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@metamask/permission-controller

Package Overview
Dependencies
Maintainers
8
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/permission-controller - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0

24

CHANGELOG.md

@@ -9,9 +9,18 @@ # Changelog

## [2.0.0]
### Added
- Add `updateCaveat` action ([#1071](https://github.com/MetaMask/core/pull/1071))
### Changed
- **BREAKING:** Update `@metamask/network-controller` peer dependency to v3 ([#1041](https://github.com/MetaMask/controllers/pull/1041))
- Rename this repository to `core` ([#1031](https://github.com/MetaMask/controllers/pull/1031))
- Update `@metamask/controller-utils` package ([#1041](https://github.com/MetaMask/controllers/pull/1041))
## [1.0.2]
### Fixed
- This package will now warn if a required package is not present ([#1003](https://github.com/MetaMask/controllers/pull/1003))
- This package will now warn if a required package is not present ([#1003](https://github.com/MetaMask/core/pull/1003))
## [1.0.1]
### Changed
- Relax dependencies on `@metamask/approval-controller`, `@metamask/base-controller` and `@metamask/controller-utils` (use `^` instead of `~`) ([#998](https://github.com/MetaMask/controllers/pull/998))
- Relax dependencies on `@metamask/approval-controller`, `@metamask/base-controller` and `@metamask/controller-utils` (use `^` instead of `~`) ([#998](https://github.com/MetaMask/core/pull/998))

@@ -21,3 +30,3 @@ ## [1.0.0]

- Initial release
- As a result of converting our shared controllers repo into a monorepo ([#831](https://github.com/MetaMask/controllers/pull/831)), we've created this package from select parts of [`@metamask/controllers` v33.0.0](https://github.com/MetaMask/controllers/tree/v33.0.0), namely:
- As a result of converting our shared controllers repo into a monorepo ([#831](https://github.com/MetaMask/core/pull/831)), we've created this package from select parts of [`@metamask/controllers` v33.0.0](https://github.com/MetaMask/core/tree/v33.0.0), namely:
- Everything in `src/permissions`

@@ -27,5 +36,6 @@

[Unreleased]: https://github.com/MetaMask/controllers/compare/@metamask/permission-controller@1.0.2...HEAD
[1.0.2]: https://github.com/MetaMask/controllers/compare/@metamask/permission-controller@1.0.1...@metamask/permission-controller@1.0.2
[1.0.1]: https://github.com/MetaMask/controllers/compare/@metamask/permission-controller@1.0.0...@metamask/permission-controller@1.0.1
[1.0.0]: https://github.com/MetaMask/controllers/releases/tag/@metamask/permission-controller@1.0.0
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@2.0.0...HEAD
[2.0.0]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@1.0.2...@metamask/permission-controller@2.0.0
[1.0.2]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@1.0.1...@metamask/permission-controller@1.0.2
[1.0.1]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@1.0.0...@metamask/permission-controller@1.0.1
[1.0.0]: https://github.com/MetaMask/core/releases/tag/@metamask/permission-controller@1.0.0

@@ -135,2 +135,9 @@ import { Patch } from 'immer';

/**
* Updates a caveat value for a specified caveat type belonging to a specific target and origin.
*/
export declare type UpdateCaveat = {
type: `${typeof controllerName}:updateCaveat`;
handler: GenericPermissionController['updateCaveat'];
};
/**
* Clears all permissions from the {@link PermissionController}.

@@ -152,3 +159,3 @@ */

*/
export declare type PermissionControllerActions = ClearPermissions | GetEndowments | GetPermissionControllerState | GetSubjects | GetPermissions | HasPermission | HasPermissions | GrantPermissions | RequestPermissions | RevokeAllPermissions | RevokePermissionForAllSubjects | RevokePermissions;
export declare type PermissionControllerActions = ClearPermissions | GetEndowments | GetPermissionControllerState | GetSubjects | GetPermissions | HasPermission | HasPermissions | GrantPermissions | RequestPermissions | RevokeAllPermissions | RevokePermissionForAllSubjects | RevokePermissions | UpdateCaveat;
/**

@@ -155,0 +162,0 @@ * The generic state change event of the {@link PermissionController}.

@@ -204,2 +204,5 @@ "use strict";

this.messagingSystem.registerActionHandler(`${controllerName}:revokePermissions`, this.revokePermissions.bind(this));
this.messagingSystem.registerActionHandler(`${controllerName}:updateCaveat`, (origin, target, caveatType, caveatValue) => {
this.updateCaveat(origin, target, caveatType, caveatValue);
});
}

@@ -206,0 +209,0 @@ /**

{
"name": "@metamask/permission-controller",
"version": "1.0.2",
"version": "2.0.0",
"description": "Mediates access to JSON-RPC methods, used to interact with pieces of the MetaMask stack, via middleware for json-rpc-engine",

@@ -9,9 +9,9 @@ "keywords": [

],
"homepage": "https://github.com/MetaMask/controllers/tree/main/packages/permission-controller#readme",
"homepage": "https://github.com/MetaMask/core/tree/main/packages/permission-controller#readme",
"bugs": {
"url": "https://github.com/MetaMask/controllers/issues"
"url": "https://github.com/MetaMask/core/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/MetaMask/controllers.git"
"url": "https://github.com/MetaMask/core.git"
},

@@ -33,5 +33,5 @@ "license": "MIT",

"dependencies": {
"@metamask/approval-controller": "^1.0.1",
"@metamask/base-controller": "^1.1.1",
"@metamask/controller-utils": "^1.0.0",
"@metamask/approval-controller": "^1.1.0",
"@metamask/base-controller": "^1.1.2",
"@metamask/controller-utils": "^2.0.0",
"@metamask/types": "^1.1.0",

@@ -56,3 +56,3 @@ "@types/deep-freeze-strict": "^1.1.0",

"peerDependencies": {
"@metamask/approval-controller": "^1.0.1"
"@metamask/approval-controller": "^1.1.0"
},

@@ -59,0 +59,0 @@ "engines": {

@@ -19,2 +19,2 @@ # `@metamask/permission-controller`

This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/controllers#readme).
This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/core#readme).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc