import type { CaveatSpecificationConstraint, EndowmentGetterParams, PermissionConstraint, PermissionSpecificationBuilder, PermissionValidatorConstraint } from "@metamask/permission-controller"; import { PermissionType, SubjectType } from "@metamask/permission-controller"; import { ProtocolScopesStruct, SnapCaveatType } from "@metamask/snaps-utils"; import type { Infer } from "@metamask/superstruct"; import type { Json, NonEmptyArray } from "@metamask/utils"; import { SnapEndowments } from "./enum.mjs"; declare const permissionName = SnapEndowments.Protocol; export declare const protocolEndowmentBuilder: Readonly<{ readonly targetName: SnapEndowments.Protocol; readonly specificationBuilder: PermissionSpecificationBuilder null; allowedCaveats: Readonly> | null; validator: PermissionValidatorConstraint; subjectTypes: readonly SubjectType[]; }>; }>; /** * Map a raw value from the `initialPermissions` to a caveat specification. * Note that this function does not do any validation, that's handled by the * PermissionsController when the permission is requested. * * @param value - The raw value from the `initialPermissions`. * @returns The caveat specification. */ export declare function getProtocolCaveatMapper(value: Json): Pick; export type ProtocolScopes = Infer; /** * Getter function to get the {@link ProtocolSnapScopes} caveat value from a * permission. * * @param permission - The permission to get the caveat value from. * @returns The caveat value. */ export declare function getProtocolCaveatScopes(permission?: PermissionConstraint): ProtocolScopes | null; export declare const protocolCaveatSpecifications: Record; export {}; //# sourceMappingURL=protocol.d.mts.map