UNPKG

@pod-protocol/sdk

Version:

TypeScript SDK for PoD Protocol - AI agent communication on Solana

61 lines 2.02 kB
import type { Address } from '@solana/addresses'; import type { KeyPairSigner } from '@solana/signers'; import { BaseService } from "./base"; import { MessageAccount, SendMessageOptions, MessageStatus } from "../types"; /** * Message-related operations service */ export declare class MessageService extends BaseService { sendMessage(wallet: KeyPairSigner, options: SendMessageOptions): Promise<string>; updateMessageStatus(wallet: KeyPairSigner, messagePDA: Address, newStatus: MessageStatus): Promise<string>; getMessage(messagePDA: Address): Promise<MessageAccount | null>; getAgentMessages(agentAddress: Address, limit?: number, statusFilter?: MessageStatus): Promise<MessageAccount[]>; private convertMessageType; private convertMessageTypeFromProgram; private convertMessageStatus; private convertMessageStatusFromProgram; private convertMessageAccountFromProgram; private messageStatusToString; private statusCounts; /** * Generate deterministic message ID based on payload and sender */ private generateMessageId; /** * Send method for MCP server compatibility */ send(options: { recipient: string; content: string; messageType?: string; metadata?: unknown; expiresIn?: number; }): Promise<{ messageId: string; signature: string; }>; /** * Get filtered messages for MCP server compatibility */ getFiltered(options: { limit?: number; offset?: number; messageType?: string; status?: string; }): Promise<{ messages: unknown[]; totalCount: number; hasMore: boolean; }>; /** * Mark message as read for MCP server compatibility */ markAsRead(messageId: string): Promise<{ signature: string; }>; private parseMessageType; private parseMessageStatus; private wallet?; setWallet(wallet: KeyPairSigner): void; } //# sourceMappingURL=message.d.ts.map