/** * @module plugin/schemas * @description Zod schemas for every SAP v2 plugin tool. * * Each schema is an `{ input, output }` pair that drives: * 1. Runtime validation (LLM → tool call) * 2. LangChain StructuredTool generation * 3. MCP/Vercel AI tool descriptors * * Conventions: * - Solana public keys → `z.string().describe('Base58 public key …')` * - BN/bigint amounts → `z.string().describe('Amount in lamports …')` * - Hashes ([u8;32]) → `z.array(z.number()).length(32)` * - Tool outputs always include `txSignature` for write ops * * @category Plugin * @since v0.1.0 */ import { z } from "zod"; /** * Zod input/output schemas for the **sap-agent** protocol (8 tools). * * @name agentSchemas * @description Covers agent registration, updates, activation lifecycle, * call reporting, reputation metrics, and on-chain data fetching. * @category Plugin * @since v0.1.0 */ export declare const agentSchemas: { readonly registerAgent: { readonly input: z.ZodObject<{ name: z.ZodString; description: z.ZodString; capabilities: z.ZodArray>; protocolId: z.ZodOptional>; version: z.ZodOptional>; }, z.core.$strip>>; pricing: z.ZodArray>; maxPricePerCall: z.ZodOptional>; rateLimit: z.ZodNumber; maxCallsPerSession: z.ZodNumber; burstLimit: z.ZodOptional>; tokenType: z.ZodEnum<{ sol: "sol"; usdc: "usdc"; spl: "spl"; }>; tokenMint: z.ZodOptional>; tokenDecimals: z.ZodOptional>; settlementMode: z.ZodOptional>>; minEscrowDeposit: z.ZodOptional>; batchIntervalSec: z.ZodOptional>; volumeCurve: z.ZodOptional>>>; }, z.core.$strip>>; protocols: z.ZodArray; agentId: z.ZodOptional>; agentUri: z.ZodOptional>; x402Endpoint: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly updateAgent: { readonly input: z.ZodObject<{ name: z.ZodOptional>; description: z.ZodOptional>; capabilities: z.ZodOptional>; protocolId: z.ZodOptional>; version: z.ZodOptional>; }, z.core.$strip>>>>; pricing: z.ZodOptional>; maxPricePerCall: z.ZodOptional>; rateLimit: z.ZodNumber; maxCallsPerSession: z.ZodNumber; burstLimit: z.ZodOptional>; tokenType: z.ZodEnum<{ sol: "sol"; usdc: "usdc"; spl: "spl"; }>; tokenMint: z.ZodOptional>; tokenDecimals: z.ZodOptional>; settlementMode: z.ZodOptional>>; minEscrowDeposit: z.ZodOptional>; batchIntervalSec: z.ZodOptional>; volumeCurve: z.ZodOptional>>>; }, z.core.$strip>>>>; protocols: z.ZodOptional>>; agentId: z.ZodOptional>; agentUri: z.ZodOptional>; x402Endpoint: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly deactivateAgent: { readonly input: z.ZodObject<{}, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly reactivateAgent: { readonly input: z.ZodObject<{}, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly reportCalls: { readonly input: z.ZodObject<{ callsServed: z.ZodNumber; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly updateReputation: { readonly input: z.ZodObject<{ avgLatencyMs: z.ZodNumber; uptimePercent: z.ZodNumber; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly fetchAgent: { readonly input: z.ZodObject<{ wallet: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ name: z.ZodString; description: z.ZodString; isActive: z.ZodBoolean; reputationScore: z.ZodNumber; totalCallsServed: z.ZodString; totalFeedbacks: z.ZodNumber; avgLatencyMs: z.ZodNumber; uptimePercent: z.ZodNumber; wallet: z.ZodString; agentId: z.ZodOptional>; x402Endpoint: z.ZodOptional>; capabilities: z.ZodArray>; protocolId: z.ZodOptional>; version: z.ZodOptional>; }, z.core.$strip>>; pricing: z.ZodArray>; maxPricePerCall: z.ZodOptional>; rateLimit: z.ZodNumber; maxCallsPerSession: z.ZodNumber; burstLimit: z.ZodOptional>; tokenType: z.ZodEnum<{ sol: "sol"; usdc: "usdc"; spl: "spl"; }>; tokenMint: z.ZodOptional>; tokenDecimals: z.ZodOptional>; settlementMode: z.ZodOptional>>; minEscrowDeposit: z.ZodOptional>; batchIntervalSec: z.ZodOptional>; volumeCurve: z.ZodOptional>>>; }, z.core.$strip>>; protocols: z.ZodArray; }, z.core.$strip>; }; readonly fetchGlobalRegistry: { readonly input: z.ZodObject<{}, z.core.$strip>; readonly output: z.ZodObject<{ totalAgents: z.ZodString; activeAgents: z.ZodString; totalFeedbacks: z.ZodString; totalCapabilities: z.ZodNumber; totalProtocols: z.ZodNumber; totalTools: z.ZodNumber; totalVaults: z.ZodNumber; totalEscrows: z.ZodNumber; totalAttestations: z.ZodNumber; authority: z.ZodString; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **sap-feedback** protocol (4 tools). * * @name feedbackSchemas * @description Covers giving, updating, revoking, and fetching on-chain * feedback entries tied to agent identity PDAs. * @category Plugin * @since v0.1.0 */ export declare const feedbackSchemas: { readonly giveFeedback: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; score: z.ZodNumber; tag: z.ZodString; commentHash: z.ZodOptional>>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly updateFeedback: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; newScore: z.ZodNumber; newTag: z.ZodOptional>; commentHash: z.ZodOptional>>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly revokeFeedback: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly fetchFeedback: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; reviewer: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ agent: z.ZodString; reviewer: z.ZodString; score: z.ZodNumber; tag: z.ZodString; isRevoked: z.ZodBoolean; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **sap-attestation** protocol (3 tools). * * @name attestationSchemas * @description Covers creating, revoking, and fetching on-chain attestations * between agents in the SAP Web of Trust. * @category Plugin * @since v0.1.0 */ export declare const attestationSchemas: { readonly createAttestation: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; attestationType: z.ZodString; metadataHash: z.ZodArray; expiresAt: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly revokeAttestation: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly fetchAttestation: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; attester: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ agent: z.ZodString; attester: z.ZodString; attestationType: z.ZodString; isActive: z.ZodBoolean; expiresAt: z.ZodString; createdAt: z.ZodString; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **sap-escrow** protocol (6 tools). * * @name escrowSchemas * @description Covers escrow creation, deposits, settlement (single and batch), * withdrawal, and account data fetching for x402 micropayments. * @category Plugin * @since v0.1.0 */ export declare const escrowSchemas: { readonly createEscrow: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; pricePerCall: z.ZodString; maxCalls: z.ZodString; initialDeposit: z.ZodString; expiresAt: z.ZodString; volumeCurve: z.ZodDefault>>; tokenMint: z.ZodOptional>; tokenDecimals: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly depositEscrow: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; amount: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly settleEscrow: { readonly input: z.ZodObject<{ depositorWallet: z.ZodString; callsToSettle: z.ZodString; serviceHash: z.ZodArray; priorityFeeMicroLamports: z.ZodOptional>; computeUnits: z.ZodOptional>; skipPreflight: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly withdrawEscrow: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; amount: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly batchSettle: { readonly input: z.ZodObject<{ depositorWallet: z.ZodString; settlements: z.ZodArray; }, z.core.$strip>>; priorityFeeMicroLamports: z.ZodOptional>; computeUnits: z.ZodOptional>; skipPreflight: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly fetchEscrow: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; depositor: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ agent: z.ZodString; depositor: z.ZodString; agentWallet: z.ZodString; balance: z.ZodString; totalDeposited: z.ZodString; totalSettled: z.ZodString; totalCallsSettled: z.ZodString; pricePerCall: z.ZodString; maxCalls: z.ZodString; expiresAt: z.ZodString; tokenDecimals: z.ZodNumber; tokenMint: z.ZodOptional>; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **sap-tools** protocol (7 tools). * * @name toolsSchemas * @description Covers tool publishing, schema inscription, updates, * activation lifecycle, invocation reporting, and descriptor fetching. * @category Plugin * @since v0.1.0 */ export declare const toolsSchemas: { readonly publishToolByName: { readonly input: z.ZodObject<{ toolName: z.ZodString; protocolId: z.ZodString; description: z.ZodString; inputSchema: z.ZodString; outputSchema: z.ZodString; httpMethod: z.ZodEnum<{ get: "get"; post: "post"; put: "put"; delete: "delete"; compound: "compound"; }>; category: z.ZodEnum<{ stake: "stake"; data: "data"; custom: "custom"; swap: "swap"; lend: "lend"; nft: "nft"; payment: "payment"; governance: "governance"; bridge: "bridge"; analytics: "analytics"; }>; paramsCount: z.ZodNumber; requiredParams: z.ZodNumber; isCompound: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly inscribeToolSchema: { readonly input: z.ZodObject<{ toolName: z.ZodString; schemaType: z.ZodEnum<{ description: "description"; input: "input"; output: "output"; }>; schemaData: z.ZodString; compression: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly updateTool: { readonly input: z.ZodObject<{ toolName: z.ZodString; httpMethod: z.ZodOptional>>; category: z.ZodOptional>>; paramsCount: z.ZodOptional>; requiredParams: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly deactivateTool: { readonly input: z.ZodObject<{ toolName: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly reactivateTool: { readonly input: z.ZodObject<{ toolName: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly reportInvocations: { readonly input: z.ZodObject<{ toolName: z.ZodString; invocations: z.ZodNumber; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly fetchTool: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; toolName: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ toolName: z.ZodString; version: z.ZodNumber; isActive: z.ZodBoolean; totalInvocations: z.ZodString; paramsCount: z.ZodNumber; requiredParams: z.ZodNumber; isCompound: z.ZodBoolean; agent: z.ZodString; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **sap-vault** protocol (10 tools). * * @name vaultSchemas * @description Covers vault initialization, session management, encrypted * memory inscription, nonce rotation, delegate authorization, and * vault/session data fetching. * @category Plugin * @since v0.1.0 */ export declare const vaultSchemas: { readonly initVault: { readonly input: z.ZodObject<{ vaultNonce: z.ZodArray; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly openSession: { readonly input: z.ZodObject<{ sessionHash: z.ZodArray; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly inscribeMemory: { readonly input: z.ZodObject<{ sessionHash: z.ZodString; sequence: z.ZodNumber; encryptedData: z.ZodString; nonce: z.ZodArray; contentHash: z.ZodArray; totalFragments: z.ZodDefault; fragmentIndex: z.ZodDefault; compression: z.ZodDefault; epochIndex: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly closeSession: { readonly input: z.ZodObject<{ sessionHash: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly closeVault: { readonly input: z.ZodObject<{}, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly rotateNonce: { readonly input: z.ZodObject<{ newNonce: z.ZodArray; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly addDelegate: { readonly input: z.ZodObject<{ delegatePubkey: z.ZodString; permissions: z.ZodNumber; expiresAt: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly revokeDelegate: { readonly input: z.ZodObject<{ delegatePubkey: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly fetchVault: { readonly input: z.ZodObject<{ agentWallet: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ agent: z.ZodString; wallet: z.ZodString; totalSessions: z.ZodNumber; totalInscriptions: z.ZodString; totalBytesInscribed: z.ZodString; protocolVersion: z.ZodNumber; nonceVersion: z.ZodNumber; createdAt: z.ZodString; }, z.core.$strip>; }; readonly fetchSession: { readonly input: z.ZodObject<{ agentWallet: z.ZodString; sessionHash: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ vault: z.ZodString; sequenceCounter: z.ZodNumber; totalBytes: z.ZodString; currentEpoch: z.ZodNumber; totalEpochs: z.ZodNumber; isClosed: z.ZodBoolean; createdAt: z.ZodString; lastInscribedAt: z.ZodString; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **sap-indexing** protocol (8 tools). * * @name indexingSchemas * @description Covers capability and protocol index creation, agent * registration/removal within indexes, and index data fetching. * @category Plugin * @since v0.1.0 */ export declare const indexingSchemas: { readonly initCapabilityIndex: { readonly input: z.ZodObject<{ capabilityId: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly addToCapabilityIndex: { readonly input: z.ZodObject<{ capabilityId: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly removeFromCapabilityIndex: { readonly input: z.ZodObject<{ capabilityId: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly initProtocolIndex: { readonly input: z.ZodObject<{ protocolId: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly addToProtocolIndex: { readonly input: z.ZodObject<{ protocolId: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly removeFromProtocolIndex: { readonly input: z.ZodObject<{ protocolId: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly fetchCapabilityIndex: { readonly input: z.ZodObject<{ capabilityId: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ capabilityId: z.ZodString; agents: z.ZodArray; totalPages: z.ZodNumber; lastUpdated: z.ZodString; }, z.core.$strip>; }; readonly fetchProtocolIndex: { readonly input: z.ZodObject<{ protocolId: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ protocolId: z.ZodString; agents: z.ZodArray; totalPages: z.ZodNumber; lastUpdated: z.ZodString; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **sap-ledger** protocol (6 tools). * * @name ledgerSchemas * @description Covers ledger initialization, ring-buffer writes, sealing * to permanent pages, ledger closure, and metadata/page fetching. * @category Plugin * @since v0.1.0 */ export declare const ledgerSchemas: { readonly initLedger: { readonly input: z.ZodObject<{ sessionHash: z.ZodString; agentWallet: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly writeLedger: { readonly input: z.ZodObject<{ sessionHash: z.ZodString; agentWallet: z.ZodOptional>; data: z.ZodString; contentHash: z.ZodArray; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly sealLedger: { readonly input: z.ZodObject<{ sessionHash: z.ZodString; agentWallet: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly closeLedger: { readonly input: z.ZodObject<{ sessionHash: z.ZodString; agentWallet: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ txSignature: z.ZodString; }, z.core.$strip>; }; readonly fetchLedger: { readonly input: z.ZodObject<{ sessionHash: z.ZodString; agentWallet: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ session: z.ZodString; authority: z.ZodString; numEntries: z.ZodNumber; totalDataSize: z.ZodString; numPages: z.ZodNumber; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; }; readonly fetchLedgerPage: { readonly input: z.ZodObject<{ sessionHash: z.ZodString; agentWallet: z.ZodOptional>; pageIndex: z.ZodNumber; }, z.core.$strip>; readonly output: z.ZodObject<{ ledger: z.ZodString; pageIndex: z.ZodNumber; sealedAt: z.ZodString; entriesInPage: z.ZodNumber; dataSize: z.ZodNumber; data: z.ZodArray; }, z.core.$strip>; }; }; //# sourceMappingURL=schemas.d.ts.map