import type { CaipAccountId, CaipChainId, Hex, Json } from '@metamask/utils'; import type { Caip25CaveatValue } from '../caip25Permission.js'; import type { InternalScopesObject, NormalizedScopesObject } from '../scope/types.js'; /** * Converts an NormalizedScopesObject to a InternalScopesObject. * * @param normalizedScopesObject - The NormalizedScopesObject to convert. * @returns An InternalScopesObject. */ export declare const getInternalScopesObject: (normalizedScopesObject: NormalizedScopesObject) => InternalScopesObject; /** * Takes the scopes from an endowment:caip25 permission caveat value, * hydrates them with supported methods and notifications, and returns a NormalizedScopesObject. * * @param caip25CaveatValue - The CAIP-25 CaveatValue to convert. * @param hooks - An object containing the following properties: * @param hooks.getNonEvmSupportedMethods - A function that returns the supported methods for a non EVM scope. * @param [hooks.sortAccountIdsByLastSelected] - Optional function that accepts an array of CaipAccountId and returns an array of CaipAccountId sorted by last selected. * @returns A NormalizedScopesObject. */ export declare const getSessionScopes: (caip25CaveatValue: Pick, { getNonEvmSupportedMethods, sortAccountIdsByLastSelected, }: { getNonEvmSupportedMethods: (scope: CaipChainId) => string[]; sortAccountIdsByLastSelected?: (accounts: CaipAccountId[]) => CaipAccountId[]; }) => NormalizedScopesObject; /** * Builds the session properties for an endowment:caip25 permission caveat value, * hydrating the persisted session properties with an `eip155Capabilities` record * that maps each permitted EVM account address to its per-chain capabilities. * * @param caip25CaveatValue - The CAIP-25 CaveatValue to get the session properties from. * @param hooks - An object containing the following properties: * @param hooks.getCapabilities - A function that resolves the per-chain capabilities for a given address. * @returns A promise that resolves to the session properties merged with an `eip155Capabilities` record keyed by account address. */ export declare const getSessionProperties: (caip25CaveatValue: Pick, { getCapabilities, }: { getCapabilities: (params: { address: string; }) => Promise>>; }) => Promise>; /** * Get the permitted accounts for the given scopes. * * @param caip25CaveatValue - The CAIP-25 CaveatValue to get the permitted accounts for * @param scopes - The scopes to get the permitted accounts for * @returns An array of permitted accounts */ export declare const getPermittedAccountsForScopes: (caip25CaveatValue: Pick, scopes: CaipChainId[]) => CaipAccountId[]; //# sourceMappingURL=caip-permission-operator-session-scopes.d.ts.map