@goat-sdk/plugin-plunderswap
Version:
<div align="center"> <a href="https://github.com/goat-sdk/goat">
2 lines (1 loc) • 3.14 kB
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});var g=Object.defineProperty;var L=(t,o,s)=>o in t?g(t,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[o]=s;var c=(t,o)=>g(t,"name",{value:o,configurable:!0});var T=(t,o,s)=>L(t,typeof o!="symbol"?o+"":o,s);var A=(t,o,s)=>new Promise((R,m)=>{var v=n=>{try{h(s.next(n))}catch(i){m(i)}},I=n=>{try{h(s.throw(n))}catch(i){m(i)}},h=n=>n.done?R(n.value):Promise.resolve(n.value).then(v,I);h((s=s.apply(t,o)).next())});var _core = require('@goat-sdk/core');var _zod = require('zod');var b=class b extends _core.createToolParameters.call(void 0, _zod.z.object({})){};c(b,"TokensParameters");var u=b,q= exports.e =_zod.z.object({tokens:_zod.z.string().array().describe("symbols for tokens registered with PlunderSwap")}),d=class d extends _core.createToolParameters.call(void 0, _zod.z.object({token:_zod.z.string().describe("symbol for the token to check the user's balance of")})){};c(d,"BalanceParameters");var l=d,C= exports.g =_zod.z.object({amount:_zod.z.string().describe("how much of the token the user holds")}),p=class p extends _core.createToolParameters.call(void 0, _zod.z.object({fromToken:_zod.z.string().describe("symbol for the token to swap"),fromAmount:_zod.z.string().describe("how much of the token to swap"),toToken:_zod.z.string().describe("symbol for the other token to receive in exchange")})){};c(p,"QuoteParameters");var k=p,E= exports.i =_zod.z.object({amount:_zod.z.string().describe("how much would be received"),tokenPath:_zod.z.string().array().describe("ordered list of the symbols of the tokens to be used in a series of swaps to effect the exchange")}),a=class a extends _core.createToolParameters.call(void 0, _zod.z.object({fromToken:_zod.z.string().describe("symbol for the token to swap"),fromAmount:_zod.z.string().describe("how much of the token to swap"),toToken:_zod.z.string().describe("symbol for the other token to receive in exchange"),toAmount:_zod.z.string().describe("minimum bound on how much of the other token, the last in the token path, must be received in exchange"),deadline:_zod.z.coerce.date().describe("by when the exchange must be completed")})){};c(a,"SwapParameters");var w=a,F= exports.k =_zod.z.object({txHashes:_zod.z.string().array().describe("the hashes of all transactions used to achieve the swap")}),x=class x extends _core.createToolParameters.call(void 0, _zod.z.object({amount:_zod.z.string().describe("how much WZIL to deposit")})){};c(x,"WZilDepositParameters");var j=x,G= exports.m =_zod.z.object({txHash:_zod.z.string().describe("the hash of the WZIL deposit transaction")}),f=class f extends _core.createToolParameters.call(void 0, _zod.z.object({amount:_zod.z.string().describe("how much WZIL to withdraw")})){};c(f,"WZilWithdrawParameters");var y=f,J= exports.o =_zod.z.object({txHash:_zod.z.string().describe("the hash of the WZIL withdrawal transaction")});exports.a = c; exports.b = T; exports.c = A; exports.d = u; exports.e = q; exports.f = l; exports.g = C; exports.h = k; exports.i = E; exports.j = w; exports.k = F; exports.l = j; exports.m = G; exports.n = y; exports.o = J;