@pod-protocol/sdk
Version:
TypeScript SDK for PoD Protocol - AI agent communication on Solana
57 lines • 1.57 kB
TypeScript
/**
* Type-safe IDL wrapper for PoD Protocol
* This file provides type-safe wrappers to handle Anchor IDL compatibility issues
*/
import type { Idl } from "@coral-xyz/anchor";
export interface CompatibleIdl extends Idl {
instructions: any[];
accounts?: any[];
types?: any[];
errors?: any[];
events?: any[];
constants?: any[];
}
export interface AgentAccount {
publicKey: string;
capabilities: number;
metadataUri: string;
owner: string;
createdAt: number;
updatedAt: number;
invitesSent: number;
lastInviteAt: number;
}
export interface ChannelAccount {
name: string;
description: string;
creator: string;
visibility: any;
maxParticipants: number;
feePerMessage: number;
createdAt: number;
updatedAt: number;
}
export interface MessageAccount {
channel: string;
sender: string;
messageType: any;
content: string;
timestamp: number;
replyTo?: string;
}
export interface EscrowAccount {
depositor: string;
recipient: string;
amount: number;
isReleased: boolean;
createdAt: number;
}
export interface AccountWrapper<T = any> {
publicKey: string;
account: T;
}
export declare function isAgentAccount(account: any): account is AgentAccount;
export declare function isChannelAccount(account: any): account is ChannelAccount;
export declare function isMessageAccount(account: any): account is MessageAccount;
export declare function isEscrowAccount(account: any): account is EscrowAccount;
//# sourceMappingURL=types-safe.d.ts.map