export { Agent, createSigner, createUser, filter, getTestUrl } from '@xmtp/agent-sdk'; import { XmtpClient, Plugin, PluginContext } from '@hybrd/types'; export { HonoVariables, Plugin, XmtpClient, XmtpConversation, XmtpMessage, XmtpSender, XmtpSubjects } from '@hybrd/types'; import { Signer } from '@xmtp/node-sdk'; export { Client, DecodedMessage, Dm, IdentifierKind, LogLevel, Signer, XmtpEnv } from '@xmtp/node-sdk'; export { ContentTypeTransactionReference, TransactionReference } from '@xmtp/content-type-transaction-reference'; export { ContentTypeText, TextParameters } from '@xmtp/content-type-text'; export { ContentTypeReaction, Reaction } from '@xmtp/content-type-reaction'; export { ContentTypeReply, Reply, ReplyCodec } from '@xmtp/content-type-reply'; export { ContentTypeGroupUpdated, GroupUpdated, GroupUpdatedCodec } from '@xmtp/content-type-group-updated'; export { ContentTypeWalletSendCalls, WalletSendCallsParams } from '@xmtp/content-type-wallet-send-calls'; declare const DEFAULT_OPTIONS: string[]; declare const DEFAULT_AMOUNT = "0.1"; declare const MAX_USDC_AMOUNT = 10; /** * Derives a deterministic 32-byte secret from an agent wallet private key. * * Uses BIP-32 HD key derivation at path m/44'/60'/0'/0/41 (coin type 60 = ETH, * index 41 is arbitrary but fixed — chosen to avoid collision with standard * account derivation paths). The child private key is used directly as the * 32-byte secret, returned as a 64-character hex string. */ declare function deriveAgentSecret(walletKey: string): string; /** * Resolves the database encryption secret by deriving it from the provided wallet key. * * The wallet key must be passed explicitly — this function does not * read from environment variables or external stores. */ declare function resolveAgentSecret(walletKey: string): string; declare const createSigner: (key: string) => Signer; declare function createXMTPClient(privateKey: string, opts?: { persist?: boolean; maxRetries?: number; storagePath?: string; }): Promise; declare const getDbPath: (description?: string, storagePath?: string) => Promise; declare const logAgentDetails: (clients: XmtpClient | XmtpClient[]) => Promise; declare function validateEnvironment(vars: string[]): Record; interface XMTPConnectionConfig { maxRetries?: number; retryDelayMs?: number; healthCheckIntervalMs?: number; connectionTimeoutMs?: number; reconnectOnFailure?: boolean; } interface XMTPConnectionHealth { isConnected: boolean; lastHealthCheck: Date; consecutiveFailures: number; totalReconnects: number; avgResponseTime: number; } declare class XMTPConnectionManager { private client; private privateKey; private config; private health; private healthCheckTimer; private isReconnecting; constructor(privateKey: string, config?: XMTPConnectionConfig); connect(persist?: boolean): Promise; private startHealthMonitoring; private performHealthCheck; private handleConnectionFailure; private sleep; getHealth(): XMTPConnectionHealth; getClient(): XmtpClient | null; disconnect(): Promise; } /** * XMTP Plugin that provides XMTP functionality to the agent * * @description * This plugin integrates XMTP messaging capabilities into the agent's * HTTP server. It mounts the XMTP endpoints for handling XMTP tools requests. */ declare function XMTPPlugin(): Plugin; interface XMTPToolsPayload { action: "send" | "reply" | "react" | "transaction" | "blockchain-event"; conversationId: string; content?: string; referenceMessageId?: string; emoji?: string; actionType?: "added" | "removed"; fromAddress?: string; chainId?: string; calls?: Array<{ to: string; data: string; metadata?: { description: string; transactionType: string; }; }>; issued: number; expires: number; } /** * Generates a signed JWT token for XMTP tools authentication * * @param {Omit} payload - Token payload without timestamp fields * @returns {string} Signed JWT token * * @description * Creates a JWT token with automatic timestamp fields: * - issued: Current timestamp * - expires: Current timestamp + JWT_EXPIRY * * @example * ```typescript * const token = generateXMTPToolsToken({ * action: "send", * conversationId: "0x123..." * }); * ``` */ declare function generateXMTPToolsToken(payload: Omit): string; export { DEFAULT_AMOUNT, DEFAULT_OPTIONS, MAX_USDC_AMOUNT, type XMTPConnectionConfig, XMTPConnectionManager, XMTPPlugin, type XMTPToolsPayload, createXMTPClient, createSigner as createXMTPSigner, deriveAgentSecret, generateXMTPToolsToken, getDbPath, logAgentDetails, resolveAgentSecret, validateEnvironment };