UNPKG

@suiware/ai-tools

Version:

Pluggable tools for Vercel AI SDK which allow AI assistants to interact with Sui Network and perform various actions.

1 lines 1.03 kB
{"version":3,"sources":["../src/ai/tools/suiStakeTool.ts"],"names":[],"mappings":";;;;;AAIO,IAAM,eAAe,IAAK,CAAA;AAAA,EAC/B,WAAa,EAAA,WAAA;AAAA,EACb,UAAA,EAAY,EAAE,MAAO,CAAA;AAAA,IACnB,MAAA,EAAQ,EAAE,MAAO,EAAA,CAAE,IAAI,CAAC,CAAA,CAAE,SAAS,4BAA4B;AAAA,GAChE,CAAA;AAAA,EACD,OAAA,EAAS,CAAO,EAAe,KAAA,OAAA,CAAA,IAAA,EAAA,CAAf,KAAe,WAAf,EAAE,QAAa,EAAA;AAC7B,IAAM,MAAA,iBAAA,GAAoB,IAAI,iBAAkB,EAAA;AAEhD,IAAA,MAAM,MAAS,GAAA,MAAM,iBAAkB,CAAA,KAAA,CAAM,MAAM,CAAA;AAEnD,IAAA,OAAO,EAAE,MAAO,EAAA;AAAA,GAClB;AACF,CAAC","file":"chunk-2UWKDBSM.mjs","sourcesContent":["import { tool } from 'ai'\nimport z from 'zod'\nimport { SuiStakingService } from '../../services/SuiStakingService'\n\nexport const suiStakeTool = tool({\n description: 'Stake Sui',\n parameters: z.object({\n amount: z.number().min(1).describe('The amount of SUI to stake'),\n }),\n execute: async ({ amount }) => {\n const suiStakingService = new SuiStakingService()\n\n const digest = await suiStakingService.stake(amount)\n\n return { digest }\n },\n})\n"]}