UNPKG

sei-agent-kit

Version:

A package for building AI agents on the SEI blockchain

21 lines 956 B
import { StructuredTool } from "langchain/tools"; import { z } from "zod"; const CitrexCancelOrderInputSchema = z.object({ orderId: z.string().startsWith("0x").describe("The unique order ID of the order to be cancelled"), productId: z.number().int().positive().describe("The product ID of the order to be cancelled"), }); export class SeiCitrexCancelOrderTool extends StructuredTool { seiKit; name = "citrex_cancel_order"; description = "Cancels a specific order on the Citrex Protocol. You need both the order ID and the product ID to cancel an order. Returns a success flag indicating whether the cancellation was successful."; schema = CitrexCancelOrderInputSchema; constructor(seiKit) { super(); this.seiKit = seiKit; } async _call(input) { const { orderId, productId } = input; return this.seiKit.citrexCancelOrder(orderId, productId); } } //# sourceMappingURL=cancelOrder.js.map