/** * @module plugin/magicblock/schemas * @description Zod schemas for every MagicBlock 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 (mirrors the SAP plugin — keep them identical): * - Solana public keys → `z.string().min(32).max(44)` * - Token amounts → `z.string()` (base-unit, BN-safe) * - Transaction output → `{ transactionBase64, sendTo, ... }` (unsigned tx) * - Read output → typed object matching the API response * * Three protocol domains: * - mb-router — ER Router JSON-RPC (6 tools, read-only) * - mb-payments — Private Payment API REST (12 tools, mixed read/write) * - mb-vrf — Solana VRF (2 tools, SDK-based) * * @category Plugin * @since v0.1.0 */ import { z } from "zod"; /** * Zod input/output schemas for the **mb-router** protocol (6 tools). * * @name routerSchemas * @description Covers getRoutes, getIdentity, getDelegationStatus, * getAccountInfo, getBlockhashForAccounts, and getSignatureStatuses. * All are read-only JSON-RPC calls to the MagicBlock Router. * @category Plugin * @since v0.1.0 */ export declare const routerSchemas: { readonly getRoutes: { readonly input: z.ZodObject<{ endpoint: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ routes: z.ZodArray>; }, z.core.$strip>; }; readonly getIdentity: { readonly input: z.ZodObject<{ endpoint: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ identity: z.ZodString; fqdn: z.ZodString; }, z.core.$strip>; }; readonly getDelegationStatus: { readonly input: z.ZodObject<{ account: z.ZodString; endpoint: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ isDelegated: z.ZodBoolean; fqdn: z.ZodOptional>; delegationRecord: z.ZodOptional>>; }, z.core.$strip>; }; readonly getAccountInfo: { readonly input: z.ZodObject<{ account: z.ZodString; encoding: z.ZodDefault>; endpoint: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ context: z.ZodObject<{ apiVersion: z.ZodString; slot: z.ZodNumber; }, z.core.$strip>; value: z.ZodObject<{ data: z.ZodArray; executable: z.ZodBoolean; lamports: z.ZodNumber; owner: z.ZodString; rentEpoch: z.ZodString; space: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; }; readonly getBlockhashForAccounts: { readonly input: z.ZodObject<{ accounts: z.ZodArray; endpoint: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ blockhash: z.ZodString; lastValidBlockHeight: z.ZodNumber; }, z.core.$strip>; }; readonly getSignatureStatuses: { readonly input: z.ZodObject<{ signatures: z.ZodArray; endpoint: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ context: z.ZodObject<{ apiVersion: z.ZodString; slot: z.ZodNumber; }, z.core.$strip>; statuses: z.ZodArray>>; confirmations: z.ZodOptional>; err: z.ZodOptional>; slot: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **mb-payments** protocol (12 tools). * * @name paymentsSchemas * @description Covers health, challenge, login, balance, private-balance, * deposit, transfer, withdraw, swap-quote, swap, initialize-mint, * and is-mint-initialized — all REST calls to the Private Payment API. * @category Plugin * @since v0.1.0 */ export declare const paymentsSchemas: { readonly health: { readonly input: z.ZodObject<{}, z.core.$strip>; readonly output: z.ZodObject<{ status: z.ZodLiteral<"ok">; }, z.core.$strip>; }; readonly challenge: { readonly input: z.ZodObject<{ pubkey: z.ZodString; cluster: z.ZodOptional>; mock: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ challenge: z.ZodString; }, z.core.$strip>; }; readonly login: { readonly input: z.ZodObject<{ pubkey: z.ZodString; challenge: z.ZodString; signature: z.ZodString; cluster: z.ZodOptional>; mock: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ token: z.ZodString; }, z.core.$strip>; }; readonly balance: { readonly input: z.ZodObject<{ address: z.ZodString; mint: z.ZodString; cluster: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ address: z.ZodString; mint: z.ZodString; ata: z.ZodString; location: z.ZodEnum<{ base: "base"; ephemeral: "ephemeral"; }>; balance: z.ZodString; }, z.core.$strip>; }; readonly privateBalance: { readonly input: z.ZodObject<{ address: z.ZodString; mint: z.ZodString; cluster: z.ZodOptional>; authToken: z.ZodString; }, z.core.$strip>; readonly output: z.ZodObject<{ address: z.ZodString; mint: z.ZodString; ata: z.ZodString; location: z.ZodEnum<{ base: "base"; ephemeral: "ephemeral"; }>; balance: z.ZodString; }, z.core.$strip>; }; readonly deposit: { readonly input: z.ZodObject<{ owner: z.ZodString; amount: z.ZodNumber; mint: z.ZodOptional>; cluster: z.ZodOptional>; validator: z.ZodOptional>; initIfMissing: z.ZodDefault; initVaultIfMissing: z.ZodDefault; initAtasIfMissing: z.ZodDefault; idempotent: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ kind: z.ZodString; version: z.ZodEnum<{ legacy: "legacy"; v0: "v0"; }>; transactionBase64: z.ZodString; sendTo: z.ZodEnum<{ base: "base"; ephemeral: "ephemeral"; }>; recentBlockhash: z.ZodString; lastValidBlockHeight: z.ZodNumber; instructionCount: z.ZodNumber; requiredSigners: z.ZodArray; validator: z.ZodOptional>; }, z.core.$strip>; }; readonly transfer: { readonly input: z.ZodObject<{ from: z.ZodString; to: z.ZodString; mint: z.ZodString; amount: z.ZodNumber; visibility: z.ZodEnum<{ public: "public"; private: "private"; }>; fromBalance: z.ZodEnum<{ base: "base"; ephemeral: "ephemeral"; }>; toBalance: z.ZodEnum<{ base: "base"; ephemeral: "ephemeral"; }>; cluster: z.ZodOptional>; validator: z.ZodOptional>; authToken: z.ZodOptional>; initIfMissing: z.ZodDefault; initAtasIfMissing: z.ZodDefault; initVaultIfMissing: z.ZodDefault; memo: z.ZodOptional>; minDelayMs: z.ZodOptional>; maxDelayMs: z.ZodOptional>; clientRefId: z.ZodOptional>; split: z.ZodDefault; gasless: z.ZodDefault; legacy: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ kind: z.ZodString; version: z.ZodEnum<{ legacy: "legacy"; v0: "v0"; }>; transactionBase64: z.ZodString; sendTo: z.ZodEnum<{ base: "base"; ephemeral: "ephemeral"; }>; recentBlockhash: z.ZodString; lastValidBlockHeight: z.ZodNumber; instructionCount: z.ZodNumber; requiredSigners: z.ZodArray; validator: z.ZodOptional>; }, z.core.$strip>; }; readonly withdraw: { readonly input: z.ZodObject<{ owner: z.ZodString; mint: z.ZodString; amount: z.ZodNumber; cluster: z.ZodOptional>; validator: z.ZodOptional>; initIfMissing: z.ZodDefault; initAtasIfMissing: z.ZodDefault; escrowIndex: z.ZodOptional>; idempotent: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ kind: z.ZodString; version: z.ZodEnum<{ legacy: "legacy"; v0: "v0"; }>; transactionBase64: z.ZodString; sendTo: z.ZodEnum<{ base: "base"; ephemeral: "ephemeral"; }>; recentBlockhash: z.ZodString; lastValidBlockHeight: z.ZodNumber; instructionCount: z.ZodNumber; requiredSigners: z.ZodArray; validator: z.ZodOptional>; }, z.core.$strip>; }; readonly swapQuote: { readonly input: z.ZodObject<{ inputMint: z.ZodString; outputMint: z.ZodString; amount: z.ZodString; slippageBps: z.ZodOptional>; swapMode: z.ZodDefault>; onlyDirectRoutes: z.ZodDefault; restrictIntermediateTokens: z.ZodDefault; platformFeeBps: z.ZodOptional>; maxAccounts: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ inputMint: z.ZodString; inAmount: z.ZodString; outputMint: z.ZodString; outAmount: z.ZodString; otherAmountThreshold: z.ZodString; swapMode: z.ZodEnum<{ ExactIn: "ExactIn"; ExactOut: "ExactOut"; }>; slippageBps: z.ZodNumber; priceImpactPct: z.ZodString; routePlan: z.ZodArray; percent: z.ZodNumber; bps: z.ZodOptional>; }, z.core.$strip>>; contextSlot: z.ZodNumber; timeTaken: z.ZodNumber; }, z.core.$strip>; }; readonly swap: { readonly input: z.ZodObject<{ userPublicKey: z.ZodString; quoteResponse: z.ZodRecord; visibility: z.ZodDefault>; destination: z.ZodOptional>; minDelayMs: z.ZodOptional>; maxDelayMs: z.ZodOptional>; split: z.ZodOptional>; clientRefId: z.ZodOptional>; validator: z.ZodOptional>; wrapAndUnwrapSol: z.ZodDefault; asLegacyTransaction: z.ZodDefault; }, z.core.$strip>; readonly output: z.ZodObject<{ swapTransaction: z.ZodString; lastValidBlockHeight: z.ZodNumber; prioritizationFeeLamports: z.ZodOptional>; privateTransfer: z.ZodOptional>>; }, z.core.$strip>; }; readonly initializeMint: { readonly input: z.ZodObject<{ owner: z.ZodString; mint: z.ZodString; cluster: z.ZodOptional>; validator: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ kind: z.ZodString; version: z.ZodEnum<{ legacy: "legacy"; v0: "v0"; }>; transactionBase64: z.ZodString; sendTo: z.ZodEnum<{ base: "base"; ephemeral: "ephemeral"; }>; recentBlockhash: z.ZodString; lastValidBlockHeight: z.ZodNumber; instructionCount: z.ZodNumber; requiredSigners: z.ZodArray; validator: z.ZodOptional>; }, z.core.$strip>; }; readonly isMintInitialized: { readonly input: z.ZodObject<{ mint: z.ZodString; cluster: z.ZodOptional>; validator: z.ZodOptional>; }, z.core.$strip>; readonly output: z.ZodObject<{ initialized: z.ZodBoolean; }, z.core.$strip>; }; }; /** * Zod input/output schemas for the **mb-vrf** protocol (2 tools). * * @name vrfSchemas * @description Covers VRF randomness request and result retrieval. * These are SDK-based and will be implemented when the VRF SDK * is available as an npm dependency. * @category Plugin * @since v0.1.0 */ export declare const vrfSchemas: { readonly requestRandomness: { readonly input: z.ZodObject<{ callerSeed: z.ZodString; callbackDiscriminator: z.ZodString; callbackAccounts: z.ZodArray; endpoint: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ requestKey: z.ZodString; txSignature: z.ZodString; }, z.core.$strip>; }; readonly getRandomnessResult: { readonly input: z.ZodObject<{ requestKey: z.ZodString; endpoint: z.ZodDefault>; }, z.core.$strip>; readonly output: z.ZodObject<{ fulfilled: z.ZodBoolean; randomBytes: z.ZodOptional>>; proof: z.ZodOptional>>; }, z.core.$strip>; }; }; //# sourceMappingURL=schemas.d.ts.map