{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AACA,uDAAyD;AAEzD,2CAA4E;AAE5E,iCAAiC;AACpB,QAAA,0BAA0B,GAAG,IAAA,oBAAM,EAAC;IAC/C,OAAO,EAAE,gCAAwB;IACjC,OAAO,EAAE,IAAA,sBAAQ,EAAC,uBAAe,CAAC;CACnC,CAAC,CAAC;AAEU,QAAA,mCAAmC,GAAG,IAAA,oBAAM,EAAC;IACxD,OAAO,EAAE,gCAAwB;IACjC,OAAO,EAAE,IAAA,sBAAQ,EAAC,uBAAe,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"]}