Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@metamask/gator-permissions-controller

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/gator-permissions-controller

Controller for managing gator permissions with profile sync integration

Source
npmnpm
Version
2.1.1
Version published
Maintainers
4
Created
Source

@metamask/gator-permissions-controller

A dedicated controller for reading gator permissions from profile sync storage. This controller fetches data from the encrypted user storage database and caches it locally, providing fast access to permissions across devices while maintaining privacy through client-side encryption.

Installation

yarn add @metamask/gator-permissions-controller

or

npm install @metamask/gator-permissions-controller

Usage

Basic Setup

import { GatorPermissionsController } from '@metamask/gator-permissions-controller';

// Create the controller with required config
const gatorPermissionsController = new GatorPermissionsController({
  messenger: yourMessenger,
  config: {
    supportedPermissionTypes: [
      'native-token-stream',
      'native-token-periodic',
      'erc20-token-stream',
      'erc20-token-periodic',
      'erc20-token-revocation',
    ],
    // Optional: override the default gator permissions provider Snap id
    // gatorPermissionsProviderSnapId: 'npm:@metamask/gator-permissions-snap',
  },
});

Fetch from Profile Sync

// Fetch all permissions
const permissions =
  await gatorPermissionsController.fetchAndUpdateGatorPermissions();

// Fetch permissions and update internal state
const permissions =
  await gatorPermissionsController.fetchAndUpdateGatorPermissions();

Contributing

This package is part of a monorepo. Instructions for contributing can be found in the monorepo README.

Keywords

MetaMask

FAQs

Package last updated on 17 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts