UNPKG

@metamask/snaps-rpc-methods

Version:
28 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.homePageEndowmentBuilder = void 0; const permission_controller_1 = require("@metamask/permission-controller"); const enum_1 = require("./enum.cjs"); const permissionName = enum_1.SnapEndowments.HomePage; /** * `endowment:page-home` returns nothing; it is intended to be used as a * flag by the snap controller to detect whether the snap has the capability to * use the snap home page feature. * * @param _builderOptions - Optional specification builder options. * @returns The specification for the `snap-pages` endowment. */ const specificationBuilder = (_builderOptions) => { return { permissionType: permission_controller_1.PermissionType.Endowment, targetName: permissionName, allowedCaveats: null, endowmentGetter: (_getterOptions) => null, subjectTypes: [permission_controller_1.SubjectType.Snap], }; }; exports.homePageEndowmentBuilder = Object.freeze({ targetName: permissionName, specificationBuilder, }); //# sourceMappingURL=home-page.cjs.map