{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Hex } from '@metamask/utils';\n\n// ---------------------------------------------------------------------------\n// Delegations\n// ---------------------------------------------------------------------------\n\n/** A single caveat attached to a delegation. */\nexport type Caveat = {\n  /** Address of the caveat enforcer contract (0x-prefixed). */\n  enforcer: Hex;\n  /** ABI-encoded caveat terms (0x-prefixed). */\n  terms: Hex;\n  /** ABI-encoded caveat arguments (0x-prefixed). */\n  args: Hex;\n};\n\n/** An EIP-712 signed delegation. */\nexport type SignedDelegation = {\n  /** Address the delegation is granted to (0x-prefixed). */\n  delegate: Hex;\n  /** Address granting the delegation (0x-prefixed). */\n  delegator: Hex;\n  /** Root authority or parent delegation hash (0x-prefixed). */\n  authority: Hex;\n  /** Caveats restricting how the delegation may be used. */\n  caveats: Caveat[];\n  /** Unique salt to prevent replay (0x-prefixed). */\n  salt: Hex;\n  /** EIP-712 signature over the delegation (0x-prefixed). */\n  signature: Hex;\n};\n\n/** Metadata associated with a delegation. */\nexport type DelegationMetadata = {\n  /** Keccak-256 hash uniquely identifying the delegation (0x-prefixed). */\n  delegationHash: Hex;\n  /** Chain ID in hex format (0x-prefixed). */\n  chainIdHex: Hex;\n  /** Token allowance in hex format (0x-prefixed). */\n  allowance: Hex;\n  /** Symbol of the token (e.g. \"USDC\"). */\n  tokenSymbol: string;\n  /** Token contract address (0x-prefixed). */\n  tokenAddress: Hex;\n  /** Type of delegation. */\n  type: string;\n};\n\n/** Request body for submitting a new delegation. */\nexport type DelegationSubmission = {\n  signedDelegation: SignedDelegation;\n  metadata: DelegationMetadata;\n};\n\n/** A stored delegation record returned by the API. */\nexport type DelegationResponse = {\n  signedDelegation: SignedDelegation;\n  metadata: DelegationMetadata;\n};\n\n// ---------------------------------------------------------------------------\n// Preferences\n// ---------------------------------------------------------------------------\n\n/** Wallet activity tracking for a single address. */\nexport type WalletActivityAccount = {\n  /** Wallet address to track activity for (0x-prefixed). */\n  address: Hex;\n  enabled: boolean;\n};\n\nexport type WalletActivityPreference = {\n  enabled: boolean;\n  accounts: WalletActivityAccount[];\n};\n\nexport type MarketingPreference = {\n  enabled: boolean;\n};\n\nexport type PerpsWatchlistExchange = {\n  testnet: string[];\n  mainnet: string[];\n};\n\nexport type PerpsWatchlistMarkets = {\n  hyperliquid: PerpsWatchlistExchange;\n  myx: PerpsWatchlistExchange;\n};\n\nexport type PerpsPreference = {\n  enabled: boolean;\n  watchlistMarkets?: PerpsWatchlistMarkets;\n};\n\nexport type SocialAIPreference = {\n  enabled: boolean;\n  txAmountLimit?: number;\n  traderProfileIds: string[];\n};\n\n/** Notification preferences for the authenticated user. */\nexport type NotificationPreferences = {\n  walletActivity: WalletActivityPreference;\n  marketing: MarketingPreference;\n  perps: PerpsPreference;\n  socialAI: SocialAIPreference;\n};\n\n// ---------------------------------------------------------------------------\n// Shared\n// ---------------------------------------------------------------------------\n\n/** The type of client making the request. */\nexport type ClientType = 'extension' | 'mobile' | 'portfolio';\n"]}