@goat-sdk/plugin-plunderswap
Version:
<div align="center"> <a href="https://github.com/goat-sdk/goat">
2 lines (1 loc) • 2.52 kB
JavaScript
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())});import{createToolParameters as r}from"@goat-sdk/core";import{z as e}from"zod";var b=class b extends r(e.object({})){};c(b,"TokensParameters");var u=b,C=e.object({tokens:e.string().array().describe("symbols for tokens registered with PlunderSwap")}),d=class d extends r(e.object({token:e.string().describe("symbol for the token to check the user's balance of")})){};c(d,"BalanceParameters");var l=d,E=e.object({amount:e.string().describe("how much of the token the user holds")}),p=class p extends r(e.object({fromToken:e.string().describe("symbol for the token to swap"),fromAmount:e.string().describe("how much of the token to swap"),toToken:e.string().describe("symbol for the other token to receive in exchange")})){};c(p,"QuoteParameters");var k=p,F=e.object({amount:e.string().describe("how much would be received"),tokenPath:e.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 r(e.object({fromToken:e.string().describe("symbol for the token to swap"),fromAmount:e.string().describe("how much of the token to swap"),toToken:e.string().describe("symbol for the other token to receive in exchange"),toAmount:e.string().describe("minimum bound on how much of the other token, the last in the token path, must be received in exchange"),deadline:e.coerce.date().describe("by when the exchange must be completed")})){};c(a,"SwapParameters");var w=a,G=e.object({txHashes:e.string().array().describe("the hashes of all transactions used to achieve the swap")}),x=class x extends r(e.object({amount:e.string().describe("how much WZIL to deposit")})){};c(x,"WZilDepositParameters");var j=x,J=e.object({txHash:e.string().describe("the hash of the WZIL deposit transaction")}),f=class f extends r(e.object({amount:e.string().describe("how much WZIL to withdraw")})){};c(f,"WZilWithdrawParameters");var y=f,K=e.object({txHash:e.string().describe("the hash of the WZIL withdrawal transaction")});export{c as a,T as b,A as c,u as d,C as e,l as f,E as g,k as h,F as i,w as j,G as k,j as l,J as m,y as n,K as o};