import type { Prisma } from '../generated/prisma'; /** * DatabaseService - A simplified interface for database operations * Optimized for Next.js and edge runtime environments */ export declare class DatabaseService { private static instance; private db; private constructor(); static getInstance(): DatabaseService; init(): Promise; cleanup(): Promise; createAgent(data: { name: string; walletAddress?: string; description?: string; personality?: any; traits?: any; }): Promise<{ name: string; description: string | null; id: string; traits: Prisma.JsonValue | null; personality: Prisma.JsonValue | null; walletAddress: string | null; merkleRoot: string | null; createdAt: Date; avatar: string | null; evolutionLevel: number; experiencePoints: number; memoryData: Prisma.JsonValue | null; isActive: boolean; updatedAt: Date; }>; getAgent(id: string): Promise<{ name: string; description: string | null; id: string; traits: Prisma.JsonValue | null; personality: Prisma.JsonValue | null; walletAddress: string | null; merkleRoot: string | null; createdAt: Date; avatar: string | null; evolutionLevel: number; experiencePoints: number; memoryData: Prisma.JsonValue | null; isActive: boolean; updatedAt: Date; } | null>; getAgentByName(name: string): Promise<{ name: string; description: string | null; id: string; traits: Prisma.JsonValue | null; personality: Prisma.JsonValue | null; walletAddress: string | null; merkleRoot: string | null; createdAt: Date; avatar: string | null; evolutionLevel: number; experiencePoints: number; memoryData: Prisma.JsonValue | null; isActive: boolean; updatedAt: Date; } | null>; getAgentByWallet(walletAddress: string): Promise<{ name: string; description: string | null; id: string; traits: Prisma.JsonValue | null; personality: Prisma.JsonValue | null; walletAddress: string | null; merkleRoot: string | null; createdAt: Date; avatar: string | null; evolutionLevel: number; experiencePoints: number; memoryData: Prisma.JsonValue | null; isActive: boolean; updatedAt: Date; } | null>; updateAgent(id: string, data: Prisma.AgentPersonaUpdateInput): Promise<{ name: string; description: string | null; id: string; traits: Prisma.JsonValue | null; personality: Prisma.JsonValue | null; walletAddress: string | null; merkleRoot: string | null; createdAt: Date; avatar: string | null; evolutionLevel: number; experiencePoints: number; memoryData: Prisma.JsonValue | null; isActive: boolean; updatedAt: Date; }>; listAgents(params?: { limit?: number; offset?: number; search?: string; }): Promise<{ name: string; description: string | null; id: string; traits: Prisma.JsonValue | null; personality: Prisma.JsonValue | null; walletAddress: string | null; merkleRoot: string | null; createdAt: Date; avatar: string | null; evolutionLevel: number; experiencePoints: number; memoryData: Prisma.JsonValue | null; isActive: boolean; updatedAt: Date; }[]>; recordAction(data: { personaId: string; actionType: string; actionData: string; actionParameters?: any; transactionHash?: string; isSuccessful?: boolean; result?: string | null; }): Promise<{ amount: number | null; id: string; result: string | null; tokenAddress: string | null; createdAt: Date; actionType: string; actionData: string; actionParameters: Prisma.JsonValue | null; transactionHash: string | null; blockNumber: string | null; isSuccessful: boolean; gasUsed: number | null; errorMessage: string | null; personaId: string; }>; getActionsByAgent(personaId: string): Promise<{ amount: number | null; id: string; result: string | null; tokenAddress: string | null; createdAt: Date; actionType: string; actionData: string; actionParameters: Prisma.JsonValue | null; transactionHash: string | null; blockNumber: string | null; isSuccessful: boolean; gasUsed: number | null; errorMessage: string | null; personaId: string; }[]>; recordEvidence(data: { personaId: string; evidenceType: string; evidenceData: string; sourceType?: string; isVerified?: boolean; confidenceScore?: number; }): Promise<{ id: string; metadata: Prisma.JsonValue | null; hash: string | null; createdAt: Date; personaId: string; evidenceType: string; evidenceData: string; sourceType: string | null; sourceUrl: string | null; isVerified: boolean; confidenceScore: number; verificationMethod: string | null; }>; recordEvolution(data: { personaId: string; evolutionType: string; previousState: any; newState: any; changes: any; reasoning?: string; }): Promise<{ id: string; version: number; createdAt: Date; personaId: string; evolutionType: string; previousState: Prisma.JsonValue; newState: Prisma.JsonValue; changes: Prisma.JsonValue; reasoning: string | null; trigger: string | null; isReversible: boolean; impactScore: number; merkleProof: string | null; }>; saveMemorySnapshot(data: { personaId: string; snapshotType: string; memoryData: any; merkleRoot: string; description?: string; }): Promise<{ description: string | null; id: string; metadata: Prisma.JsonValue | null; merkleRoot: string; createdAt: Date; memoryData: Prisma.JsonValue; personaId: string; snapshotType: string; merkleProofs: Prisma.JsonValue | null; nodeCount: number; sizeBytes: bigint; compressionMethod: string | null; isCompressed: boolean; }>; recordTransaction(data: { transactionHash: string; agentWallet?: string; status?: string; fee?: bigint; memo?: string; }): Promise<{ status: string; instructions: Prisma.JsonValue | null; id: string; memo: string | null; logs: Prisma.JsonValue | null; createdAt: Date; fee: bigint; updatedAt: Date; transactionHash: string; blockNumber: string | null; errorMessage: string | null; agentWallet: string | null; blockTime: Date | null; slot: number; confirmations: number | null; accountKeys: Prisma.JsonValue | null; balanceChanges: Prisma.JsonValue | null; tokenBalanceChanges: Prisma.JsonValue | null; }>; updateTransaction(id: string, data: Prisma.SolanaTransactionUpdateInput): Promise<{ status: string; instructions: Prisma.JsonValue | null; id: string; memo: string | null; logs: Prisma.JsonValue | null; createdAt: Date; fee: bigint; updatedAt: Date; transactionHash: string; blockNumber: string | null; errorMessage: string | null; agentWallet: string | null; blockTime: Date | null; slot: number; confirmations: number | null; accountKeys: Prisma.JsonValue | null; balanceChanges: Prisma.JsonValue | null; tokenBalanceChanges: Prisma.JsonValue | null; }>; getTransactionsByWallet(walletAddress: string): Promise<{ status: string; instructions: Prisma.JsonValue | null; id: string; memo: string | null; logs: Prisma.JsonValue | null; createdAt: Date; fee: bigint; updatedAt: Date; transactionHash: string; blockNumber: string | null; errorMessage: string | null; agentWallet: string | null; blockTime: Date | null; slot: number; confirmations: number | null; accountKeys: Prisma.JsonValue | null; balanceChanges: Prisma.JsonValue | null; tokenBalanceChanges: Prisma.JsonValue | null; }[]>; saveTokenMetadata(data: { mintAddress: string; name?: string; symbol?: string; description?: string; logoUri?: string; decimals?: number; price?: number; }): Promise<{ symbol: string | null; price: number | null; name: string | null; decimals: number; description: string | null; website: string | null; id: string; tags: Prisma.JsonValue | null; priceChange24h: number | null; createdAt: Date; isActive: boolean; updatedAt: Date; isVerified: boolean; mintAddress: string; logoUri: string | null; totalSupply: number | null; circulatingSupply: number | null; marketCap: number | null; volume24h: number | null; social: Prisma.JsonValue | null; extensions: Prisma.JsonValue | null; }>; getTokenByMint(mintAddress: string): Promise<{ symbol: string | null; price: number | null; name: string | null; decimals: number; description: string | null; website: string | null; id: string; tags: Prisma.JsonValue | null; priceChange24h: number | null; createdAt: Date; isActive: boolean; updatedAt: Date; isVerified: boolean; mintAddress: string; logoUri: string | null; totalSupply: number | null; circulatingSupply: number | null; marketCap: number | null; volume24h: number | null; social: Prisma.JsonValue | null; extensions: Prisma.JsonValue | null; } | null>; searchTokens(symbol: string): Promise<{ symbol: string | null; price: number | null; name: string | null; decimals: number; description: string | null; website: string | null; id: string; tags: Prisma.JsonValue | null; priceChange24h: number | null; createdAt: Date; isActive: boolean; updatedAt: Date; isVerified: boolean; mintAddress: string; logoUri: string | null; totalSupply: number | null; circulatingSupply: number | null; marketCap: number | null; volume24h: number | null; social: Prisma.JsonValue | null; extensions: Prisma.JsonValue | null; }[]>; isHealthy(): Promise; getAgentStatistics(personaId: string): Promise<{ totalActions: number; successfulActions: number; totalEvidence: number; totalEvolution: number; totalMemories: number; lastAction: { amount: number | null; id: string; result: string | null; tokenAddress: string | null; createdAt: Date; actionType: string; actionData: string; actionParameters: Prisma.JsonValue | null; transactionHash: string | null; blockNumber: string | null; isSuccessful: boolean; gasUsed: number | null; errorMessage: string | null; personaId: string; } | null; }>; getPrisma(): import("../generated/prisma").PrismaClient; close(): Promise; } //# sourceMappingURL=database.service.d.ts.map