import { Action } from "../../types/action"; import { z } from "zod"; import type { SolanaAgentKit } from "../../agent"; const useParaPregenWalletAction: Action = { name: "USE_PARA_PREGEN_WALLET", similes: [ "use para pregen wallet" ], description: "Create a pregen wallet for Para", examples: [ [ { input: { email: "sdsd@gmail.com" }, output: { status: "success", message: "Pre-generated wallet used successfully.", address: "0xdasdnas", email:"sdsd@gmail.com" }, explanation: "Use a pregen wallet created with the CREATE_PARA_PREGEN_WALLET action", }, ], ], schema: z.object({ email: z .string() .describe("The user share to use the wallet for") }), handler: async ( agent: SolanaAgentKit , input: Record) => { try { const { email } = input; const response = await agent.useParaPregenWallet(email); return { status: "success", ...response }; } catch (error: any) { return { status: "error", message: error.message, }; } }, }; export default useParaPregenWalletAction;