{"_id":"@blockswaplab/keth-sdk","_rev":"2-3f4a859ff18c45aff4d3d1ada77253e2","name":"@blockswaplab/keth-sdk","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@blockswaplab/keth-sdk","version":"0.0.1","description":"SDK for kETH protocol","main":"./dist/config.js","type":"commonjs","exports":{".":"./dist/config.js"},"scripts":{"postinstall":"typechain --target ethers-v6 --out-dir src/contracts './src/abis/*.json' && tsc"},"dependencies":{"@ethersproject/abstract-provider":"^5.7.0","@ethersproject/contracts":"^5.7.0","@typechain/ethers-v6":"^0.5.1","@types/lodash":"^4.14.191","@types/node":"^18.15.3","axios":"^1.5.1","ethers":"^6.9.0","graphql":"^16.1.0","graphql-request":"^3.7.0","lodash":"^4.17.21","typechain":"^8.1.1","typescript":"^5.2.2"},"gitHead":"b3bd2249999f990066caccbd3f5dbc64d9839597","_id":"@blockswaplab/keth-sdk@0.0.1","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-wCVVg13YovEvXtndaSN1Ni/lRnI6LBH9fx1vXnSA+COIIEGrgfygcCkg271vVJPT/A5E8ZFo5p0vdwLMe2ZKGA==","shasum":"a8d8e3088bd3e4de2727db2d2f21bf97bf4c9df5","tarball":"https://registry.npmjs.org/@blockswaplab/keth-sdk/-/keth-sdk-0.0.1.tgz","fileCount":33,"unpackedSize":98231,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLtniDNUsaIODIhMivmQGjOKtxxXb4j/VjrvX79SmDLwIgEvjy38gNgbeKCNUcBP/xiYs441ZpZXOUBDecg91nnKI="}]},"_npmUser":{"name":"blockswapnpm","email":"engineering@blockswap.network"},"directories":{},"maintainers":[{"name":"blockswapnpm","email":"engineering@blockswap.network"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/keth-sdk_0.0.1_1715678510492_0.044146605759189717"},"_hasShrinkwrap":false},"0.0.2":{"name":"@blockswaplab/keth-sdk","version":"0.0.2","description":"SDK for kETH protocol","main":"./dist/config.js","type":"commonjs","exports":{".":"./dist/config.js"},"scripts":{"postinstall":"typechain --target ethers-v6 --out-dir src/contracts './src/abis/*.json' && tsc"},"dependencies":{"@ethersproject/abstract-provider":"^5.7.0","@ethersproject/contracts":"^5.7.0","@typechain/ethers-v6":"^0.5.1","@types/lodash":"^4.14.191","@types/node":"^18.15.3","axios":"^1.5.1","ethers":"^6.9.0","graphql":"^16.1.0","graphql-request":"^3.7.0","lodash":"^4.17.21","typechain":"^8.1.1","typescript":"^5.2.2"},"gitHead":"07bda23837eb1e2aa2c4547219e217b458d27868","_id":"@blockswaplab/keth-sdk@0.0.2","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-jOVUE+MpFGPBVNYhIrlHoA+1mclBB19wIhvGBw3Ui5grAaKS5ZPlHlphrsM5/uWIoO/Oof4z1pf76TMpoRBC/A==","shasum":"89a9645b92f00a9c03a25a248032f940827e7df5","tarball":"https://registry.npmjs.org/@blockswaplab/keth-sdk/-/keth-sdk-0.0.2.tgz","fileCount":33,"unpackedSize":99225,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJqz8/2CqqlynVRJtbirOHBfaV3BrdL001uV6VGHyWegIhAJUXRmsYvKCdcAIYB1I/p6H4Mv4FWIgIkydghS9ljL1I"}]},"_npmUser":{"name":"blockswapnpm","email":"engineering@blockswap.network"},"directories":{},"maintainers":[{"name":"blockswapnpm","email":"engineering@blockswap.network"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/keth-sdk_0.0.2_1715853818044_0.13653206931126016"},"_hasShrinkwrap":false},"0.0.3":{"name":"@blockswaplab/keth-sdk","version":"0.0.3","description":"SDK for kETH protocol","main":"./dist/config.js","type":"commonjs","exports":{".":"./dist/config.js"},"scripts":{"postinstall":"typechain --target ethers-v6 --out-dir src/contracts './src/abis/*.json' && tsc"},"dependencies":{"@ethersproject/abstract-provider":"^5.7.0","@ethersproject/contracts":"^5.7.0","@typechain/ethers-v6":"^0.5.1","@types/lodash":"^4.14.191","@types/node":"^18.15.3","axios":"^1.5.1","ethers":"^6.9.0","graphql":"^16.1.0","graphql-request":"^3.7.0","lodash":"^4.17.21","typechain":"^8.1.1","typescript":"^5.2.2"},"gitHead":"53ada6862b163b0f504d6e3f316c264af5852aee","_id":"@blockswaplab/keth-sdk@0.0.3","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-0LdULfYdfD1dalq/aAOuxjJ/r3ifR1BlBiE89B//K7d7YWLZJYK6JwOtrc0LVcGD8if1DRwg5KrJ6+RAUk32Ww==","shasum":"22ded3350660ecac0aa7201f6dfced84829f03ab","tarball":"https://registry.npmjs.org/@blockswaplab/keth-sdk/-/keth-sdk-0.0.3.tgz","fileCount":45,"unpackedSize":140271,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGaeS+9PNQC+d32xER8CdZlObXZKQkoU2BeV4EMHM0qAIhAL9nVvUyUXjwAcEhNSBSRy5Wqv/pRoGB5aLdqJ72nqoA"}]},"_npmUser":{"name":"blockswapnpm","email":"engineering@blockswap.network"},"directories":{},"maintainers":[{"name":"blockswapnpm","email":"engineering@blockswap.network"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/keth-sdk_0.0.3_1716316469975_0.24898805154365333"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-14T09:21:50.383Z","0.0.1":"2024-05-14T09:21:50.729Z","modified":"2024-05-21T18:34:30.433Z","0.0.2":"2024-05-16T10:03:38.182Z","0.0.3":"2024-05-21T18:34:30.210Z"},"maintainers":[{"name":"blockswapnpm","email":"engineering@blockswap.network"}],"description":"SDK for kETH protocol","readme":"# @blockswaplab/keth-sdk\nKETH SDK is a typescript SDK which can be used to interact with the kETH protocol.  \n\n## Installation\nTo install the SDK use the command `npm i @blockswaplab/keth-sdk`\n\n## Using the KETH SDK\nOne of the ways to import and initialise the SDK is:\n```\nimport { KETH } from \"@blockswaplab/keth-sdk\";\nimport { ethers } from \"ethers\";\n\nconst provider = new ethers.InfuraProvider(\n  \"mainnet\",\n  INFURA_PROJECT_ID,\n  INFURA_PROJECT_SECRET\n);\n\nconst signer = new ethers.Wallet(PRIV_KEY, provider);\n\nconst sdk = new KETH(signer);\n```\n\n> The SDK supports both `holesky` and `mainnet`, hence the user should choose the network as per the need. \n\n> Please note that the SDK is an `ethers.js` based SDK and hence requires `ethers` based signer instance. It also returns values in `ethers.js` supported format. For example, it returns `BigInt` for the smart contract view functions that might return `uint` (`BigNumber` in case of ethers v5).\n\n> Also note that KETH SDK uses ethers v6. If you are using ethers v5 (not recommended), please create the signer and provider instances in the following way:\n\n```\nconst provider = new ethers.providers.InfuraProvider(\"mainnet\", {\n    projectId: INFURA_PROJECT_ID,\n    projectSecret: INFURA_PROJECT_SECRET\n});\nconst signer = new ethers.Wallet(PRIV_KEY, provider);\n```\n\nThe SDK exposed following sub-classes:  \n* [utils](#utils-sub-class)  \n* [contracts](#contracts-sub-class)  \n* [assetRegistry](#assetRegistry-sub-class)  \n* [dETHVault](#dETHVault-sub-class)  \n* [kETHStrategy](#kETHStrategy-sub-class)  \n* [kETHVault](#kETHVault-sub-class)\n* [kontroller](#kontroller-sub-class)\n* [priceAggregators](#priceAgregators-sub-class)\n* [swappers](#swappers-sub-class)\n* constants  \n\n## utils sub-class\nThe following readme describes all the functions and their parameters exposed by the `utils` class of the KETH SDK.  \n\n### add0x function\nThis function can be used to append `0x` towards the start of a string to convert it into a hex string accepted by the contracts. If the input string already contains the `0x`, the function will return the string as is.  \n\n#### Input Parameters\ndata: string which needs to be appended by `0x`\n\n#### Using add0x function\n```js\nawait sdk.utils.add0x(data);\n```\n\n#### Return Parameter\nReturns hex string\n\n### remove0x function\nThis function removes `0x` from the beginning of a string. If the input string doesn't contain `0x`, it will return the string as is.  \n\n#### Input Parameters\ndata: string to remove `0x` from  \n\n#### Using remove0x function\n```js\nawait sdk.utils.remove0x(data);\n```\n\n#### Return Parameter\nReturns string without `0x` in the beginning.  \n\n## contracts sub-class\nThe SDK also exposes the contractInstance sub-class which provides an instance for contracts used in the KETH protocol. These instances can be used to call smart contract functions that may or may not exist in the SDK.  \n\n### Contract instances exposed by the sub-class\n* assetRegistry\n* dETHVault\n* kETHStrategy\n* kETHVault\n* kontroller\n* ETHToDETH\n* ETHToGiantLP\n* GiantLPToDETH\n* RETHToDETH\n* RETHToETH\n* RETHToGiantLP\n* WstETHToDETH\n* WstETHToETH\n* WstETHToGiantLP\n* YETHToDETH\n* YETHToETH\n* YETHToGiantLP\n* yETHAggregator\n\n#### Using the contracts class\n```ts\nconst assetRegistryContractInstance = await sdk.contracts.assetRegistry();\nconst dETHVaultContractInstance = await sdk.contracts.dETHVault();\nconst kETHStrategyContractInstance = await sdk.contracts.kETHStrategy();\nconst kETHVaultContractInstance = await sdk.contracts.kETHVault();\nconst kontrollerContractInstance = await sdk.contracts.kontroller();\nconst ETHToDETHContractInstance = await sdk.contracts.ETHToDETH();\nconst ETHToGiantLPContractInstance = await sdk.contracts.ETHToGiantLP();\nconst GiantLPToDETHContractInstance = await sdk.contracts.GiantLPToDETH();\nconst RETHToDETHContractInstance = await sdk.contracts.RETHToDETH();\nconst RETHToETHContractInstance = await sdk.contracts.RETHToETH();\nconst RETHToGiantLPContractInstance = await sdk.contracts.RETHToGiantLP();\nconst WstETHToDETHContractInstance = await sdk.contracts.WstETHToDETH();\nconst WstETHToETHContractInstance = await sdk.contracts.WstETHToETH();\nconst WstETHToGiantLPContractInstance = await sdk.contracts.WstETHToGiantLP();\nconst YETHToDETHContractInstance = await sdk.contracts.YETHToDETH();\nconst YETHToETHContractInstance = await sdk.contracts.YETHToETH();\nconst YETHToGiantLPContractInstance = await sdk.contracts.YETHToGiantLP();\nconst yETHAggregatorContractInstance = await sdk.contracts.yETHAggregator();\n```\n\nAll the contract instances can be directly accessed without any input parameter.  \n\n## assetRegistry sub-class\nThe following readme describes all the functions and their parameters exposed by the `assetRegistry` class of the KETH SDK.  \n\n### assetValue function\nThis function returns the ETH value for a given asset from the following: ETH, dETH, GiantLP, wstETH, rETH, savETH.\n\n#### Input Parameters\nasset: The asset contract address       \nbalance: The asset balance      \n\n#### Using assetValue function\n```js\nawait sdk.assetRegistry.assetValue(asset, balance);\n```\n\n#### Return Parameter\nReturns the asset ETH value\n\n## dETHVault sub-class\nThe following readme describes all the functions and their parameters exposed by the `dETHVault` class of the KETH SDK.  \n\n### amountToShare function\nThis function takes the ETH/dETH amount as the input and converts it to the equivalent LP Token amount.\n\n#### Input Parameters\namount: The ETH/dETH amount     \n\n#### Using amountToShare function\n```js\nawait sdk.dETHVault.amountToShare(amount);\n```\n\n#### Return Parameter\nReturns the LP Token amount\n\n### deposit function\nThis function allows the user to deposit dETH and get LP Tokens in return.\n\n#### Input Parameters\namount: Amount of dETH to be deposited      \nrecipient: The recipient address        \n\n#### Using deposit function\n```js\nawait sdk.dETHVault.deposit(amount, recipient);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n### reserves function\nThis function returns the reserve value of the given token.\n\n#### Input Parameters\ntoken: The token address        \n\n#### Using reserves function\n```js\nawait sdk.dETHVault.reserves(token);\n```\n\n#### Return Parameter\nReturns the reserve value of the token\n\n### shareToAmount function\nThis function takes the LP Token amount as the input and converts it to the equivalent ETH/dETH amount.\n\n#### Input Parameters\nshare: The LP Token amount      \n\n#### Using shareToAmount function\n```js\nawait sdk.dETHVault.shareToAmount(share);\n```\n\n#### Return Parameter\nReturns the ETH/dETH amount\n\n### swapETHToDETH function\nThis function allows the user to deposit ETH and get dETH in return.\n\n#### Input Parameters\nrecipient: The recipient address\nvalue: The ETH value to be deposited\n\n#### Using swapETHToDETH function\n```js\nawait sdk.dETHVault.swapETHToDETH(recipient, value);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n### totalAssets function\nThis function returns the total ETH/dETH balance of the vault.\n\n#### Using totalAssets function\n```js\nawait sdk.dETHVault.totalAssets();\n```\n\n#### Return Parameter\nReturns the total ETH/dETH balance of the vault\n\n### withdrawToDETH function\nThis function allows the user to burn their LP Tokens and get their deposited dETH back.\n\n#### Input Parameters\nshare: The LP Token amount to be burnt      \nrecipient: The recipient address\n\n#### Using withdrawToDETH function\n```js\nawait sdk.dETHVault.withdrawToDETH(share, recipient);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n### withdrawToETH function\nThis function allows the user to burn their LP Tokens and get their deposited ETH back.\n\n#### Input Parameters\nshare: The LP Token amount to be burnt      \nrecipient: The recipient address        \n\n#### Using withdrawToETH function\n```js\nawait sdk.dETHVault.withdrawToETH(share, recipient);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n## kETHStrategy sub-class\nThe following readme describes all the functions and their parameters exposed by the `kETHStrategy` class of the KETH SDK.  \n (asset: string, balance: bigint | string)   \n\n### assetValue function\nThis function returns the ETH value for a given asset from the following: ETH, dETH, GiantLP, wstETH, rETH, savETH.\n\n#### Input Parameters\nasset: The asset contract address       \nbalance: The asset balance \n\n#### Using assetValue function\n```js\nawait sdk.kETHStrategy.assetValue(asset, balance);\n```\n\n#### Return Parameter\nReturns the asset ETH value\n\n### assetsRatio function\nThis function returns the assets ratio.\n\n#### Using assetsRatio function\n```js\nawait sdk.kETHStrategy.assetsRatio();\n```\n\n#### Return Parameter\nReturns the assets ratio.\n\n### balance function\nThis function returns the current balance of the strategy contract for the given token.\n\n#### Input Parameters\ntoken: The token address        \n\n#### Using balance function\n```js\nawait sdk.kETHStrategy.balance(token);\n```\n\n#### Return Parameter\nReturns the token balance of the strategy.\n\n### invokeSwap function\nThis function allows the user to invoke the swap function for a pair of tokens.\n\n#### Input Parameters\nswapper: The swapper contract address       \ntokenIn: The input token address        \namountIn: The input token amount        \ntokenOut: The output token address      \nminAmountOut: The minimum output token amount       \nextraData: Optional extra calldata to be attached       \n\n#### Using invokeSwap function\n```js\nawait sdk.kETHStrategy.invokeSwap(swapper, tokenIn, amountIn, tokenOut, minAmountOut, extraData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n### isHoldingAsset function\nThis function returns true if the given holding asset is supported, else false.\n\n#### Input Parameters\nasset: The asset address        \n\n#### Using isHoldingAsset function\n```js\nawait sdk.kETHStrategy.isHoldingAsset(asset);\n```\n\n#### Return Parameter\nReturns true if the given holding asset is supported, else false\n\n### isUnderlyingAsset function\nThis function returns true if the given underlying asset is supported, else false\n\n#### Input Parameters\nunderlying: The underlying asset address\n\n#### Using isUnderlyingAsset function\n```js\nawait sdk.kETHStrategy.isUnderlyingAsset(underlying);\n```\n\n#### Return Parameter\nReturns true if the given underlying asset is supported, else false\n\n### totalAssets function\nThis function returns the total assets value of strategy in ETH.\n\n#### Using totalAssets function\n```js\nawait sdk.kETHStrategy.totalAssets();\n```\n\n#### Return Parameter\nReturns the total assets value of strategy in ETH\n\n### underlyingAssets function\nThis function returns a list of the supported underlying assets.\n\n#### Using underlyingAssets function\n```js\nawait sdk.kETHStrategy.underlyingAssets();\n```\n\n#### Return Parameter\nReturns an array of supported underlying assets\n\n## kETHVault sub-class\nThe following readme describes all the functions and their parameters exposed by the `kETHVault` class of the KETH SDK.  \n\n### deposit function\nThis function allows the user to deposit the underlying asset.\n\n#### Input Parameters\nunderlying: The underlying asset adddress       \namount: The underlying asset amount     \nrecipient: The recipient address        \nsell: If true then autosell is enabled      \nvalue: ETH value to be deposited if underlying asset is ETH     \nreferralAddress: \n\n#### Using deposit function\n```js\nawait sdk.kETHVault.deposit(underlying, amount, recipient, sell, value, referralAddress);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n### totalAssets function\nThis function returns the total assets value of vault in ETH\n\n#### Using totalAssets function\n```js\nawait sdk.kETHVault.totalAssets();\n```\n\n#### Return Parameter\nReturns the total assets value of vault in ETH.\n\n### withdraw function\nThis function allows the user to burn their kETH and get their deposited ETH and dETH back.\n\n#### Input Parameters\nshare: The kETH amount to be burnt\nrecipient: The recipient address\n\n#### Using withdraw function\n```js\nawait sdk.kETHVault.withdraw(share, recipient);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n## priceAggregators sub-class\nThe following readme describes all the functions and their parameters exposed by the `priceAggregators` class of the KETH SDK. This sub-class exposes the values returned by priceAggregators individually.\n\n### latestRoundDataYETH function\nThis function returns the latest round data for the yETH token.\n\n#### Using latestRoundDataYETH function\n```js\nawait sdk.priceAggregators.latestRoundDataYETH();\n```\n\n#### Return Parameter\nReturns the latest round data for the yETH token.\n\n## swappers sub-class\nThe following readme describes all the functions and their parameters exposed by the `swappers` class of the KETH SDK. This sub-class exposes the swap functions on the different swapper contracts induvidually as a part of a single class.\n\n### swapETHToDETH function\nThis function allows the user to swap ETH for dETH.\n\n#### Input Parameters\namountIn: The input token amount    \nvalue: ETH value to be deposited, equal to amountIn     \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapETHToDETH function\n```js\nawait sdk.swappers.swapETHToDETH(amountIn, value, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n### swapETHToGiantLP function\nThis function allows the user to swap ETH for GiantLP.\n\n#### Input Parameters\namountIn: The input token amount    \nvalue: ETH value to be deposited, equal to amountIn     \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapETHToGiantLP function\n```js\nawait sdk.swappers.swapETHToGiantLP(amountIn, value, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful.  \n\n### swapGiantLPToDETH function\nThis function allows the user to swap GiantLP for dETH.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapGiantLPToDETH function\n```js\nawait sdk.swappers.swapGiantLPToDETH(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapRETHToDETH function\nThis function allows the user to swap RETH for dETH.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapRETHToDETH function\n```js\nawait sdk.swappers.swapRETHToDETH(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapRETHToETH function\nThis function allows the user to swap RETH for ETH.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapRETHToETH function\n```js\nawait sdk.swappers.swapRETHToETH(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapRETHToGiantLP function\nThis function allows the user to swap RETH for GiantLP.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapRETHToGiantLP function\n```js\nawait sdk.swappers.swapRETHToGiantLP(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapWstETHToDETH function\nThis function allows the user to swap WstETH for dETH.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapWstETHToDETH function\n```js\nawait sdk.swappers.swapWstETHToDETH(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapWstETHToETH function\nThis function allows the user to swap WstETH for ETH.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapWstETHToETH function\n```js\nawait sdk.swappers.swapWstETHToETH(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapWstETHToGiantLP function\nThis function allows the user to swap WstETH for GiantLP.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapWstETHToGiantLP function\n```js\nawait sdk.swappers.swapWstETHToGiantLP(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapYETHToDETH function\nThis function allows the user to swap yETH for dETH.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapYETHToDETH function\n```js\nawait sdk.swappers.swapYETHToDETH(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapYETHToETH function\nThis function allows the user to swap yETH for ETH.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapYETHToETH function\n```js\nawait sdk.swappers.swapYETHToETH(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n\n### swapYETHToGiantLP\nThis function allows the user to swap yETH for GiantLP.\n\n#### Input Parameters\namountIn: The input token amount    \nminAmountOut: The minimum output token amount, 0 by default           \ncallData: Optional extra calldata to be attached    \n\n#### Using swapYETHToGiantLP function\n```js\nawait sdk.swappers.swapYETHToGiantLP(amountIn, minAmountOut, callData);\n```\n\n#### Return Parameter\nTransaction details if the transaction is successful. \n","readmeFilename":"README.md"}