/** * Types for the XMTP integration. */ export interface XmtpConfig { /** XMTP network environment */ env?: 'local' | 'dev' | 'production'; /** * Path to the XMTP local database directory. * CRITICAL: Must persist across restarts and deploys. * Limited to 10 installations per inbox — each lost DB = new installation. * If not set, defaults to the clawtomaton state directory. */ dbPath?: string; /** * Encryption key for the XMTP local database (64 hex chars / 32 bytes). * If not set, derived deterministically from the wallet private key. */ dbEncryptionKey?: string; /** * Allowlist of Ethereum addresses that can message the agent. * If empty/undefined, all addresses are allowed. * Case-insensitive comparison. */ allowlist?: string[]; /** * Maximum number of messages to queue before oldest are dropped. * Default: 100 */ maxQueueSize?: number; } export type XmtpMessageType = 'text' | 'transaction_request' | 'transaction_confirmed'; export interface XmtpMessage { /** Message ID from XMTP */ id: string; /** Conversation ID */ conversationId: string; /** Sender's Ethereum address or inbox ID */ senderAddress: string; /** Text content (for text messages) or summary (for transaction messages) */ content: string; /** Timestamp in ms */ sentAt: number; /** Whether this is a DM */ isDm: boolean; /** Whether this is a group chat */ isGroup: boolean; /** Message type — text, payment request, or confirmed transaction */ type?: XmtpMessageType; /** Transaction metadata (present for transaction_confirmed messages) */ transaction?: XmtpTransactionRef; } export interface XmtpTransactionRef { /** Chain ID (decimal) */ chainId: number; /** Transaction hash */ txHash: string; /** Transaction type (e.g. 'transfer') */ transactionType?: string; /** Token symbol or 'ETH' */ currency?: string; /** Human-readable amount */ amount?: string; /** Sender address */ from?: string; /** Receiver address */ to?: string; } export interface XmtpConversationInfo { /** Conversation ID */ id: string; /** Whether this is a DM (vs group) */ isDm: boolean; /** Number of members */ memberCount: number; /** Timestamp of last message in ms */ lastMessageAt: number; /** Preview of last message (truncated) */ lastMessagePreview?: string; } //# sourceMappingURL=types.d.ts.map