import type { CaveatSpecificationConstraint, EndowmentGetterParams, PermissionConstraint, PermissionSpecificationBuilder, PermissionValidatorConstraint } from "@metamask/permission-controller"; import { PermissionType, SubjectType } from "@metamask/permission-controller"; import type { KeyringCapabilities, KeyringOrigins } from "@metamask/snaps-utils"; import { SnapCaveatType } from "@metamask/snaps-utils"; import type { Json, NonEmptyArray } from "@metamask/utils"; import { SnapEndowments } from "./enum.mjs"; declare const permissionName = SnapEndowments.Keyring; export declare const keyringEndowmentBuilder: Readonly<{ readonly targetName: SnapEndowments.Keyring; 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 getKeyringCaveatMapper(value: Json): Pick; /** * Getter function to get the {@link KeyringOrigins} caveat value from a * permission. * * @param permission - The permission to get the caveat value from. * @returns The caveat value. */ export declare function getKeyringCaveatOrigins(permission?: PermissionConstraint): KeyringOrigins; /** * Getter function to get the {@link KeyringCapabilities} caveat value from a * permission. * * @param permission - The permission to get the caveat value from. * @returns The caveat value, or `null` if the permission does not have a * {@link KeyringCapabilities} caveat. */ export declare function getKeyringCaveatCapabilities(permission?: PermissionConstraint): KeyringCapabilities | null; export declare const keyringCaveatSpecifications: Record; export {}; //# sourceMappingURL=keyring.d.mts.map