sei-agent-kit
Version:
A package for building AI agents on the SEI blockchain
26 lines • 1.28 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SeiCitrexGetProductTool = void 0;
const tools_1 = require("langchain/tools");
const zod_1 = require("zod");
const CitrexGetProductInputSchema = zod_1.z.object({
identifier: zod_1.z.union([
zod_1.z.number().int().positive().describe("The product ID to retrieve"),
zod_1.z.string().min(1).describe("The product symbol to retrieve (e.g., 'btcperp', 'ethperp')")
]).describe("The product ID or symbol to look up"),
});
class SeiCitrexGetProductTool extends tools_1.StructuredTool {
constructor(seiKit) {
super();
this.seiKit = seiKit;
this.name = "citrex_get_product";
this.description = "Retrieves information about a specific product on the Citrex Protocol using either its ID or symbol. Returns detailed product information including ID, symbol, base/quote assets, fees, price increment, min/max quantities, weights, mark price, and active status.";
this.schema = CitrexGetProductInputSchema;
}
async _call(input) {
const { identifier } = input;
return this.seiKit.citrexGetProduct(identifier);
}
}
exports.SeiCitrexGetProductTool = SeiCitrexGetProductTool;
//# sourceMappingURL=getProduct.js.map