{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,8BAA8B;AAEzD,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,wBAAwB;AAE5E,iCAAiC;AACjC,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;IAC/C,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mCAAmC,GAAG,MAAM,CAAC;IACxD,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAC;CACnC,CAAC,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport { object, optional } from '@metamask/superstruct';\nimport type { Hex } from '@metamask/utils';\nimport { HexChecksumAddressStruct, StrictHexStruct } from '@metamask/utils';\n\n// Superstruct validation schemas\nexport const UpgradeAccountParamsStruct = object({\n  account: HexChecksumAddressStruct,\n  chainId: optional(StrictHexStruct),\n});\n\nexport const GetAccountUpgradeStatusParamsStruct = object({\n  account: HexChecksumAddressStruct,\n  chainId: optional(StrictHexStruct),\n});\n\n// Type definitions derived from schemas\nexport type UpgradeAccountParams = Infer<typeof UpgradeAccountParamsStruct>;\n\nexport type UpgradeAccountResult = {\n  transactionHash: Hex; // Hash of the EIP-7702 authorization transaction\n  upgradedAccount: Hex; // Address of the upgraded account (same as input)\n  delegatedTo: Hex; // Address of the contract delegated to (determined by wallet)\n};\n\nexport type GetAccountUpgradeStatusParams = Infer<\n  typeof GetAccountUpgradeStatusParamsStruct\n>;\n\nexport type GetAccountUpgradeStatusResult = {\n  account: Hex; // Address of the checked account\n  chainId: Hex; // Chain ID where the check was performed\n  isSupported: boolean; // Whether upgrade to smart account is supported on the chain\n  isUpgraded: boolean; // Whether the account is upgraded\n  upgradedAddress: Hex | null; // Address to which the account is upgraded\n};\n"]}