@pod-protocol/sdk
Version:
TypeScript SDK for PoD Protocol - AI agent communication on Solana
56 lines • 3.78 kB
TypeScript
/**
* This code was AUTOGENERATED using the codama library.
* Please DO NOT EDIT THIS FILE, instead use visitors
* to add features, then rerun codama to update it.
*
* @see https://github.com/codama-idl/codama
*/
import { type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';
/** InvalidMetadataUriLength: Invalid metadata URI length */
export declare const POD_COM_ERROR__INVALID_METADATA_URI_LENGTH = 6000;
/** Unauthorized: Unauthorized */
export declare const POD_COM_ERROR__UNAUTHORIZED = 6001;
/** MessageExpired: Message expired */
export declare const POD_COM_ERROR__MESSAGE_EXPIRED = 6002;
/** InvalidMessageStatusTransition: Invalid message status transition */
export declare const POD_COM_ERROR__INVALID_MESSAGE_STATUS_TRANSITION = 6003;
/** ChannelFull: Channel is full */
export declare const POD_COM_ERROR__CHANNEL_FULL = 6004;
/** AlreadyInChannel: Already in channel */
export declare const POD_COM_ERROR__ALREADY_IN_CHANNEL = 6005;
/** NotInChannel: Not in channel */
export declare const POD_COM_ERROR__NOT_IN_CHANNEL = 6006;
/** InsufficientFunds: Insufficient funds */
export declare const POD_COM_ERROR__INSUFFICIENT_FUNDS = 6007;
/** ChannelNameTooLong: Channel name too long */
export declare const POD_COM_ERROR__CHANNEL_NAME_TOO_LONG = 6008;
/** ChannelDescriptionTooLong: Channel description too long */
export declare const POD_COM_ERROR__CHANNEL_DESCRIPTION_TOO_LONG = 6009;
/** InsufficientReputation: Insufficient reputation */
export declare const POD_COM_ERROR__INSUFFICIENT_REPUTATION = 6010;
/** RateLimitExceeded: Rate limit exceeded */
export declare const POD_COM_ERROR__RATE_LIMIT_EXCEEDED = 6011;
/** MessageContentTooLong: Message content too long */
export declare const POD_COM_ERROR__MESSAGE_CONTENT_TOO_LONG = 6012;
/** PrivateChannelRequiresInvitation: Private channel requires invitation */
export declare const POD_COM_ERROR__PRIVATE_CHANNEL_REQUIRES_INVITATION = 6013;
/** HashingFailed: Hashing operation failed */
export declare const POD_COM_ERROR__HASHING_FAILED = 6014;
/** SecureMemoryAllocationFailed: Secure memory allocation failed */
export declare const POD_COM_ERROR__SECURE_MEMORY_ALLOCATION_FAILED = 6015;
/** InvalidTimestamp: Invalid timestamp */
export declare const POD_COM_ERROR__INVALID_TIMESTAMP = 6016;
/** InvalidMessageHash: Invalid message hash */
export declare const POD_COM_ERROR__INVALID_MESSAGE_HASH = 6017;
export type PodComError = typeof POD_COM_ERROR__ALREADY_IN_CHANNEL | typeof POD_COM_ERROR__CHANNEL_DESCRIPTION_TOO_LONG | typeof POD_COM_ERROR__CHANNEL_FULL | typeof POD_COM_ERROR__CHANNEL_NAME_TOO_LONG | typeof POD_COM_ERROR__HASHING_FAILED | typeof POD_COM_ERROR__INSUFFICIENT_FUNDS | typeof POD_COM_ERROR__INSUFFICIENT_REPUTATION | typeof POD_COM_ERROR__INVALID_MESSAGE_HASH | typeof POD_COM_ERROR__INVALID_MESSAGE_STATUS_TRANSITION | typeof POD_COM_ERROR__INVALID_METADATA_URI_LENGTH | typeof POD_COM_ERROR__INVALID_TIMESTAMP | typeof POD_COM_ERROR__MESSAGE_CONTENT_TOO_LONG | typeof POD_COM_ERROR__MESSAGE_EXPIRED | typeof POD_COM_ERROR__NOT_IN_CHANNEL | typeof POD_COM_ERROR__PRIVATE_CHANNEL_REQUIRES_INVITATION | typeof POD_COM_ERROR__RATE_LIMIT_EXCEEDED | typeof POD_COM_ERROR__SECURE_MEMORY_ALLOCATION_FAILED | typeof POD_COM_ERROR__UNAUTHORIZED;
export declare function getPodComErrorMessage(code: PodComError): string;
export declare function isPodComError<TProgramErrorCode extends PodComError>(error: unknown, transactionMessage: {
instructions: Record<number, {
programAddress: Address;
}>;
}, code?: TProgramErrorCode): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{
context: Readonly<{
code: TProgramErrorCode;
}>;
}>;
//# sourceMappingURL=podCom.d.ts.map