{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SIWEMessage } from '@metamask/controller-utils';\n\n/**\n * AbstractMessageParams\n *\n * Represents the parameters to pass to the signing method once the signature request is approved.\n *\n * from - Address from which the message is processed\n * origin? - Added for request origin identification\n * requestId? - Original request id\n * deferSetAsSigned? - Whether to defer setting the message as signed immediately after the keyring is told to sign it\n */\nexport type AbstractMessageParams = {\n  from: string;\n  origin?: string;\n  requestId?: number;\n  deferSetAsSigned?: boolean;\n};\n\n/**\n * Eip7702AuthorizationParams\n *\n * Represents the parameters for EIP-7702 authorization signing requests.\n *\n * chainId - The chain ID\n * contractAddress - The contract address\n * nonce - The nonce\n */\nexport type Eip7702AuthorizationParams = {\n  chainId: number;\n  contractAddress: string;\n  nonce: number;\n} & AbstractMessageParams;\n\n/**\n * PersonalMessageParams\n *\n * Represents the parameters for personal signing messages.\n *\n * data - The data to sign\n * siwe? - The SIWE message\n */\nexport type PersonalMessageParams = {\n  data: string;\n  siwe?: SIWEMessage;\n} & AbstractMessageParams;\n\n/**\n * SignTypedDataMessageV3V4\n *\n * Represents the structure of a typed data message for EIP-712 signing requests.\n *\n * types - The types of the message\n * domain - The domain of the message\n * primaryType - The primary type of the message\n * message - The message\n */\nexport type SignTypedDataMessageV3V4 = {\n  types: Record<string, unknown>;\n  domain: Record<string, unknown>;\n  primaryType: string;\n  message: unknown;\n};\n\n/**\n * TypedMessageParams\n *\n * Represents the parameters for typed signing messages.\n *\n * data - The data to sign\n */\nexport type TypedMessageParams = {\n  data: Record<string, unknown>[] | string | SignTypedDataMessageV3V4;\n} & AbstractMessageParams;\n\n/**\n * Credentials for re-authenticating the keyring during sensitive operations\n * such as `exportSeedPhrase` and `exportAccount`.\n */\nexport type Credentials =\n  | { password: string }\n  | { encryptionKey: string; encryptionSalt?: string };\n"]}