import { type Address, type Hex } from "viem"; import { type HookConfig } from "./actions/common/types.js"; import { type InstallValidationParams } from "./actions/install-validation/installValidation.js"; import type { ModularAccountV2Client } from "./client/client.js"; import { type DeferredActionTypedData } from "./actions/deferralActions.js"; export declare enum PermissionType { NATIVE_TOKEN_TRANSFER = "native-token-transfer", ERC20_TOKEN_TRANSFER = "erc20-token-transfer", GAS_LIMIT = "gas-limit", CONTRACT_ACCESS = "contract-access", ACCOUNT_FUNCTIONS = "account-functions", FUNCTIONS_ON_ALL_CONTRACTS = "functions-on-all-contracts", FUNCTIONS_ON_CONTRACT = "functions-on-contract", ROOT = "root" } type Key = { publicKey: Hex; type: "secp256k1" | "contract"; }; export type Permission = { type: PermissionType.NATIVE_TOKEN_TRANSFER; data: { allowance: Hex; }; } | { type: PermissionType.ERC20_TOKEN_TRANSFER; data: { address: Address; allowance: Hex; }; } | { type: PermissionType.GAS_LIMIT; data: { limit: Hex; }; } | { type: PermissionType.CONTRACT_ACCESS; data: { address: Address; }; } | { type: PermissionType.ACCOUNT_FUNCTIONS; data: { functions: Hex[]; }; } | { type: PermissionType.FUNCTIONS_ON_ALL_CONTRACTS; data: { functions: Hex[]; }; } | { type: PermissionType.FUNCTIONS_ON_CONTRACT; data: { address: Address; functions: Hex[]; }; } | { type: PermissionType.ROOT; data?: never; }; type Hook = { hookConfig: HookConfig; initData: Hex; }; export declare class PermissionBuilder { private client; private validationConfig; private selectors; private installData; private permissions; private hooks; private nonce; private hasAssociatedExecHooks; private deadline; constructor({ client, key, entityId, nonce, selectors, hooks, deadline, }: { client: ModularAccountV2Client; key: Key; entityId: number; nonce: bigint; selectors?: Hex[]; hooks?: Hook[]; deadline?: number; }); addSelector({ selector }: { selector: Hex; }): this; addPermission({ permission }: { permission: Permission; }): this; addPermissions({ permissions }: { permissions: Permission[]; }): this; compileDeferred(): Promise<{ typedData: DeferredActionTypedData; fullPreSignatureDeferredActionDigest: Hex; }>; compileRaw(): Promise; compileInstallArgs(): Promise; private validateConfiguration; private translatePermissions; private addHooks; } export declare function assertNever(_valid: never): never; export {}; //# sourceMappingURL=permissionBuilder.d.ts.map