@compass-labs/api-sdk 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/bin/mcp-server.js +720 -418
- package/bin/mcp-server.js.map +33 -34
- package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts +27 -0
- package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts.map +1 -0
- package/dist/commonjs/funcs/transactionBatchingAaveLoop.js +126 -0
- package/dist/commonjs/funcs/transactionBatchingAaveLoop.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts.map +1 -0
- package/dist/commonjs/{models/components/action.js → mcp-server/tools/transactionBatchingAaveLoop.js} +35 -27
- package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.js.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts +92 -5
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js +121 -6
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js.map +1 -1
- package/dist/commonjs/models/components/aavelooprequest.d.ts +109 -0
- package/dist/commonjs/models/components/aavelooprequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavelooprequest.js +132 -0
- package/dist/commonjs/models/components/aavelooprequest.js.map +1 -0
- package/dist/commonjs/models/components/borrow.d.ts +69 -12
- package/dist/commonjs/models/components/borrow.d.ts.map +1 -1
- package/dist/commonjs/models/components/borrow.js +39 -13
- package/dist/commonjs/models/components/borrow.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -4
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -4
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/liquidationcall.d.ts +32 -14
- package/dist/commonjs/models/components/liquidationcall.d.ts.map +1 -1
- package/dist/commonjs/models/components/liquidationcall.js +23 -14
- package/dist/commonjs/models/components/liquidationcall.js.map +1 -1
- package/dist/commonjs/models/components/morphoborrowrequest.d.ts +27 -5
- package/dist/commonjs/models/components/morphoborrowrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/morphoborrowrequest.js +22 -4
- package/dist/commonjs/models/components/morphoborrowrequest.js.map +1 -1
- package/dist/commonjs/models/components/morphodepositrequest.d.ts +27 -5
- package/dist/commonjs/models/components/morphodepositrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/morphodepositrequest.js +22 -4
- package/dist/commonjs/models/components/morphodepositrequest.js.map +1 -1
- package/dist/commonjs/models/components/morphorepayrequest.d.ts +27 -5
- package/dist/commonjs/models/components/morphorepayrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/morphorepayrequest.js +22 -4
- package/dist/commonjs/models/components/morphorepayrequest.js.map +1 -1
- package/dist/commonjs/models/components/morphosetvaultallowancerequest.d.ts +27 -5
- package/dist/commonjs/models/components/morphosetvaultallowancerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/morphosetvaultallowancerequest.js +22 -4
- package/dist/commonjs/models/components/morphosetvaultallowancerequest.js.map +1 -1
- package/dist/commonjs/models/components/morphosupplycollateralrequest.d.ts +27 -5
- package/dist/commonjs/models/components/morphosupplycollateralrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/morphosupplycollateralrequest.js +22 -4
- package/dist/commonjs/models/components/morphosupplycollateralrequest.js.map +1 -1
- package/dist/commonjs/models/components/morphowithdrawcollateralrequest.d.ts +27 -5
- package/dist/commonjs/models/components/morphowithdrawcollateralrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/morphowithdrawcollateralrequest.js +22 -4
- package/dist/commonjs/models/components/morphowithdrawcollateralrequest.js.map +1 -1
- package/dist/commonjs/models/components/morphowithdrawrequest.d.ts +27 -5
- package/dist/commonjs/models/components/morphowithdrawrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/morphowithdrawrequest.js +22 -4
- package/dist/commonjs/models/components/morphowithdrawrequest.js.map +1 -1
- package/dist/commonjs/models/components/redeemunderlying.d.ts +32 -4
- package/dist/commonjs/models/components/redeemunderlying.d.ts.map +1 -1
- package/dist/commonjs/models/components/redeemunderlying.js +14 -4
- package/dist/commonjs/models/components/redeemunderlying.js.map +1 -1
- package/dist/commonjs/models/components/repay.d.ts +29 -4
- package/dist/commonjs/models/components/repay.d.ts.map +1 -1
- package/dist/commonjs/models/components/repay.js +14 -4
- package/dist/commonjs/models/components/repay.js.map +1 -1
- package/dist/commonjs/models/components/reserve.d.ts +25 -3
- package/dist/commonjs/models/components/reserve.d.ts.map +1 -1
- package/dist/commonjs/models/components/reserve.js +9 -4
- package/dist/commonjs/models/components/reserve.js.map +1 -1
- package/dist/commonjs/models/components/supply.d.ts +32 -4
- package/dist/commonjs/models/components/supply.d.ts.map +1 -1
- package/dist/commonjs/models/components/supply.js +14 -4
- package/dist/commonjs/models/components/supply.js.map +1 -1
- package/dist/commonjs/models/components/swapborrowrate.d.ts +27 -8
- package/dist/commonjs/models/components/swapborrowrate.d.ts.map +1 -1
- package/dist/commonjs/models/components/swapborrowrate.js +18 -8
- package/dist/commonjs/models/components/swapborrowrate.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +15 -15
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +18 -20
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts +15 -15
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js +18 -20
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js.map +1 -1
- package/dist/commonjs/models/components/usageascollateral.d.ts +26 -4
- package/dist/commonjs/models/components/usageascollateral.d.ts.map +1 -1
- package/dist/commonjs/models/components/usageascollateral.js +14 -4
- package/dist/commonjs/models/components/usageascollateral.js.map +1 -1
- package/dist/commonjs/models/operations/morphomarketposition.d.ts +3 -15
- package/dist/commonjs/models/operations/morphomarketposition.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphomarketposition.js +1 -5
- package/dist/commonjs/models/operations/morphomarketposition.js.map +1 -1
- package/dist/commonjs/models/operations/morphomarkets.d.ts +3 -15
- package/dist/commonjs/models/operations/morphomarkets.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphomarkets.js +1 -5
- package/dist/commonjs/models/operations/morphomarkets.js.map +1 -1
- package/dist/commonjs/models/operations/morphovaultposition.d.ts +3 -15
- package/dist/commonjs/models/operations/morphovaultposition.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphovaultposition.js +1 -5
- package/dist/commonjs/models/operations/morphovaultposition.js.map +1 -1
- package/dist/commonjs/models/operations/morphovaults.d.ts +5 -17
- package/dist/commonjs/models/operations/morphovaults.d.ts.map +1 -1
- package/dist/commonjs/models/operations/morphovaults.js +3 -7
- package/dist/commonjs/models/operations/morphovaults.js.map +1 -1
- package/dist/commonjs/sdk/transactionbatching.d.ts +17 -0
- package/dist/commonjs/sdk/transactionbatching.d.ts.map +1 -1
- package/dist/commonjs/sdk/transactionbatching.js +20 -0
- package/dist/commonjs/sdk/transactionbatching.js.map +1 -1
- package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts +27 -0
- package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts.map +1 -0
- package/dist/esm/funcs/transactionBatchingAaveLoop.js +90 -0
- package/dist/esm/funcs/transactionBatchingAaveLoop.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.d.ts +8 -0
- package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js +38 -0
- package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts +92 -5
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -1
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.js +118 -5
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.js.map +1 -1
- package/dist/esm/models/components/aavelooprequest.d.ts +109 -0
- package/dist/esm/models/components/aavelooprequest.d.ts.map +1 -0
- package/dist/esm/models/components/aavelooprequest.js +92 -0
- package/dist/esm/models/components/aavelooprequest.js.map +1 -0
- package/dist/esm/models/components/borrow.d.ts +69 -12
- package/dist/esm/models/components/borrow.d.ts.map +1 -1
- package/dist/esm/models/components/borrow.js +38 -12
- package/dist/esm/models/components/borrow.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -4
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -4
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/liquidationcall.d.ts +32 -14
- package/dist/esm/models/components/liquidationcall.d.ts.map +1 -1
- package/dist/esm/models/components/liquidationcall.js +23 -14
- package/dist/esm/models/components/liquidationcall.js.map +1 -1
- package/dist/esm/models/components/morphoborrowrequest.d.ts +27 -5
- package/dist/esm/models/components/morphoborrowrequest.d.ts.map +1 -1
- package/dist/esm/models/components/morphoborrowrequest.js +21 -3
- package/dist/esm/models/components/morphoborrowrequest.js.map +1 -1
- package/dist/esm/models/components/morphodepositrequest.d.ts +27 -5
- package/dist/esm/models/components/morphodepositrequest.d.ts.map +1 -1
- package/dist/esm/models/components/morphodepositrequest.js +21 -3
- package/dist/esm/models/components/morphodepositrequest.js.map +1 -1
- package/dist/esm/models/components/morphorepayrequest.d.ts +27 -5
- package/dist/esm/models/components/morphorepayrequest.d.ts.map +1 -1
- package/dist/esm/models/components/morphorepayrequest.js +21 -3
- package/dist/esm/models/components/morphorepayrequest.js.map +1 -1
- package/dist/esm/models/components/morphosetvaultallowancerequest.d.ts +27 -5
- package/dist/esm/models/components/morphosetvaultallowancerequest.d.ts.map +1 -1
- package/dist/esm/models/components/morphosetvaultallowancerequest.js +21 -3
- package/dist/esm/models/components/morphosetvaultallowancerequest.js.map +1 -1
- package/dist/esm/models/components/morphosupplycollateralrequest.d.ts +27 -5
- package/dist/esm/models/components/morphosupplycollateralrequest.d.ts.map +1 -1
- package/dist/esm/models/components/morphosupplycollateralrequest.js +21 -3
- package/dist/esm/models/components/morphosupplycollateralrequest.js.map +1 -1
- package/dist/esm/models/components/morphowithdrawcollateralrequest.d.ts +27 -5
- package/dist/esm/models/components/morphowithdrawcollateralrequest.d.ts.map +1 -1
- package/dist/esm/models/components/morphowithdrawcollateralrequest.js +21 -3
- package/dist/esm/models/components/morphowithdrawcollateralrequest.js.map +1 -1
- package/dist/esm/models/components/morphowithdrawrequest.d.ts +27 -5
- package/dist/esm/models/components/morphowithdrawrequest.d.ts.map +1 -1
- package/dist/esm/models/components/morphowithdrawrequest.js +21 -3
- package/dist/esm/models/components/morphowithdrawrequest.js.map +1 -1
- package/dist/esm/models/components/redeemunderlying.d.ts +32 -4
- package/dist/esm/models/components/redeemunderlying.d.ts.map +1 -1
- package/dist/esm/models/components/redeemunderlying.js +14 -4
- package/dist/esm/models/components/redeemunderlying.js.map +1 -1
- package/dist/esm/models/components/repay.d.ts +29 -4
- package/dist/esm/models/components/repay.d.ts.map +1 -1
- package/dist/esm/models/components/repay.js +14 -4
- package/dist/esm/models/components/repay.js.map +1 -1
- package/dist/esm/models/components/reserve.d.ts +25 -3
- package/dist/esm/models/components/reserve.d.ts.map +1 -1
- package/dist/esm/models/components/reserve.js +9 -4
- package/dist/esm/models/components/reserve.js.map +1 -1
- package/dist/esm/models/components/supply.d.ts +32 -4
- package/dist/esm/models/components/supply.d.ts.map +1 -1
- package/dist/esm/models/components/supply.js +14 -4
- package/dist/esm/models/components/supply.js.map +1 -1
- package/dist/esm/models/components/swapborrowrate.d.ts +27 -8
- package/dist/esm/models/components/swapborrowrate.d.ts.map +1 -1
- package/dist/esm/models/components/swapborrowrate.js +18 -8
- package/dist/esm/models/components/swapborrowrate.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +15 -15
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyparams.js +15 -17
- package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts +15 -15
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js +15 -17
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js.map +1 -1
- package/dist/esm/models/components/usageascollateral.d.ts +26 -4
- package/dist/esm/models/components/usageascollateral.d.ts.map +1 -1
- package/dist/esm/models/components/usageascollateral.js +14 -4
- package/dist/esm/models/components/usageascollateral.js.map +1 -1
- package/dist/esm/models/operations/morphomarketposition.d.ts +3 -15
- package/dist/esm/models/operations/morphomarketposition.d.ts.map +1 -1
- package/dist/esm/models/operations/morphomarketposition.js +1 -5
- package/dist/esm/models/operations/morphomarketposition.js.map +1 -1
- package/dist/esm/models/operations/morphomarkets.d.ts +3 -15
- package/dist/esm/models/operations/morphomarkets.d.ts.map +1 -1
- package/dist/esm/models/operations/morphomarkets.js +1 -5
- package/dist/esm/models/operations/morphomarkets.js.map +1 -1
- package/dist/esm/models/operations/morphovaultposition.d.ts +3 -15
- package/dist/esm/models/operations/morphovaultposition.d.ts.map +1 -1
- package/dist/esm/models/operations/morphovaultposition.js +1 -5
- package/dist/esm/models/operations/morphovaultposition.js.map +1 -1
- package/dist/esm/models/operations/morphovaults.d.ts +5 -17
- package/dist/esm/models/operations/morphovaults.d.ts.map +1 -1
- package/dist/esm/models/operations/morphovaults.js +3 -7
- package/dist/esm/models/operations/morphovaults.js.map +1 -1
- package/dist/esm/sdk/transactionbatching.d.ts +17 -0
- package/dist/esm/sdk/transactionbatching.d.ts.map +1 -1
- package/dist/esm/sdk/transactionbatching.js +20 -0
- package/dist/esm/sdk/transactionbatching.js.map +1 -1
- package/docs/sdks/morpho/README.md +8 -18
- package/docs/sdks/transactionbatching/README.md +120 -2
- package/docs/sdks/uniswapv3/README.md +2 -2
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/transactionBatchingAaveLoop.ts +173 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/transactionBatchingAaveLoop.ts +47 -0
- package/src/models/components/aavehistoricaltransactionsresponse.ts +275 -13
- package/src/models/components/aavelooprequest.ts +219 -0
- package/src/models/components/borrow.ts +87 -24
- package/src/models/components/index.ts +1 -4
- package/src/models/components/liquidationcall.ts +58 -35
- package/src/models/components/morphoborrowrequest.ts +33 -7
- package/src/models/components/morphodepositrequest.ts +33 -7
- package/src/models/components/morphorepayrequest.ts +33 -7
- package/src/models/components/morphosetvaultallowancerequest.ts +35 -7
- package/src/models/components/morphosupplycollateralrequest.ts +34 -7
- package/src/models/components/morphowithdrawcollateralrequest.ts +36 -7
- package/src/models/components/morphowithdrawrequest.ts +33 -7
- package/src/models/components/redeemunderlying.ts +46 -8
- package/src/models/components/repay.ts +43 -8
- package/src/models/components/reserve.ts +37 -7
- package/src/models/components/supply.ts +46 -8
- package/src/models/components/swapborrowrate.ts +45 -16
- package/src/models/components/uniswapbuyexactlyparams.ts +26 -28
- package/src/models/components/uniswapbuyexactlyrequest.ts +26 -29
- package/src/models/components/usageascollateral.ts +40 -8
- package/src/models/operations/morphomarketposition.ts +1 -11
- package/src/models/operations/morphomarkets.ts +1 -11
- package/src/models/operations/morphovaultposition.ts +1 -11
- package/src/models/operations/morphovaults.ts +5 -15
- package/src/sdk/transactionbatching.ts +28 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts +0 -57
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts.map +0 -1
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.js +0 -97
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.js.map +0 -1
- package/dist/commonjs/models/components/action.d.ts +0 -43
- package/dist/commonjs/models/components/action.d.ts.map +0 -1
- package/dist/commonjs/models/components/action.js.map +0 -1
- package/dist/commonjs/models/components/collateralreserve.d.ts +0 -31
- package/dist/commonjs/models/components/collateralreserve.d.ts.map +0 -1
- package/dist/commonjs/models/components/collateralreserve.js +0 -71
- package/dist/commonjs/models/components/collateralreserve.js.map +0 -1
- package/dist/commonjs/models/components/principalreserve.d.ts +0 -31
- package/dist/commonjs/models/components/principalreserve.d.ts.map +0 -1
- package/dist/commonjs/models/components/principalreserve.js +0 -71
- package/dist/commonjs/models/components/principalreserve.js.map +0 -1
- package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts +0 -57
- package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts.map +0 -1
- package/dist/esm/models/components/aavehistoricaltransactionbase.js +0 -59
- package/dist/esm/models/components/aavehistoricaltransactionbase.js.map +0 -1
- package/dist/esm/models/components/action.d.ts +0 -43
- package/dist/esm/models/components/action.d.ts.map +0 -1
- package/dist/esm/models/components/action.js +0 -30
- package/dist/esm/models/components/action.js.map +0 -1
- package/dist/esm/models/components/collateralreserve.d.ts +0 -31
- package/dist/esm/models/components/collateralreserve.d.ts.map +0 -1
- package/dist/esm/models/components/collateralreserve.js +0 -33
- package/dist/esm/models/components/collateralreserve.js.map +0 -1
- package/dist/esm/models/components/principalreserve.d.ts +0 -31
- package/dist/esm/models/components/principalreserve.d.ts.map +0 -1
- package/dist/esm/models/components/principalreserve.js +0 -33
- package/dist/esm/models/components/principalreserve.js.map +0 -1
- package/src/models/components/aavehistoricaltransactionbase.ts +0 -155
- package/src/models/components/action.ts +0 -36
- package/src/models/components/collateralreserve.ts +0 -70
- package/src/models/components/principalreserve.ts +0 -70
|
@@ -5,9 +5,17 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
export const MorphoWithdrawRequestChain = {
|
|
13
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
14
|
+
BaseMainnet: "base:mainnet",
|
|
15
|
+
} as const;
|
|
16
|
+
export type MorphoWithdrawRequestChain = ClosedEnum<
|
|
17
|
+
typeof MorphoWithdrawRequestChain
|
|
18
|
+
>;
|
|
11
19
|
|
|
12
20
|
export type MorphoWithdrawRequest = {
|
|
13
21
|
/**
|
|
@@ -22,16 +30,34 @@ export type MorphoWithdrawRequest = {
|
|
|
22
30
|
* The address which will receive the tokens withdrawn. Defaults to the sender.
|
|
23
31
|
*/
|
|
24
32
|
receiver?: string | null | undefined;
|
|
25
|
-
|
|
26
|
-
* The chain to use.
|
|
27
|
-
*/
|
|
28
|
-
chain: Chain;
|
|
33
|
+
chain: MorphoWithdrawRequestChain;
|
|
29
34
|
/**
|
|
30
35
|
* The address of the transaction sender.
|
|
31
36
|
*/
|
|
32
37
|
sender: string;
|
|
33
38
|
};
|
|
34
39
|
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const MorphoWithdrawRequestChain$inboundSchema: z.ZodNativeEnum<
|
|
42
|
+
typeof MorphoWithdrawRequestChain
|
|
43
|
+
> = z.nativeEnum(MorphoWithdrawRequestChain);
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const MorphoWithdrawRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
47
|
+
typeof MorphoWithdrawRequestChain
|
|
48
|
+
> = MorphoWithdrawRequestChain$inboundSchema;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace MorphoWithdrawRequestChain$ {
|
|
55
|
+
/** @deprecated use `MorphoWithdrawRequestChain$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = MorphoWithdrawRequestChain$inboundSchema;
|
|
57
|
+
/** @deprecated use `MorphoWithdrawRequestChain$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = MorphoWithdrawRequestChain$outboundSchema;
|
|
59
|
+
}
|
|
60
|
+
|
|
35
61
|
/** @internal */
|
|
36
62
|
export const MorphoWithdrawRequest$inboundSchema: z.ZodType<
|
|
37
63
|
MorphoWithdrawRequest,
|
|
@@ -41,7 +67,7 @@ export const MorphoWithdrawRequest$inboundSchema: z.ZodType<
|
|
|
41
67
|
vault_address: z.string(),
|
|
42
68
|
amount: z.any().optional(),
|
|
43
69
|
receiver: z.nullable(z.string()).optional(),
|
|
44
|
-
chain:
|
|
70
|
+
chain: MorphoWithdrawRequestChain$inboundSchema,
|
|
45
71
|
sender: z.string(),
|
|
46
72
|
}).transform((v) => {
|
|
47
73
|
return remap$(v, {
|
|
@@ -67,7 +93,7 @@ export const MorphoWithdrawRequest$outboundSchema: z.ZodType<
|
|
|
67
93
|
vaultAddress: z.string(),
|
|
68
94
|
amount: z.any().optional(),
|
|
69
95
|
receiver: z.nullable(z.string()).optional(),
|
|
70
|
-
chain:
|
|
96
|
+
chain: MorphoWithdrawRequestChain$outboundSchema,
|
|
71
97
|
sender: z.string(),
|
|
72
98
|
}).transform((v) => {
|
|
73
99
|
return remap$(v, {
|
|
@@ -14,9 +14,32 @@ import {
|
|
|
14
14
|
} from "./reserve.js";
|
|
15
15
|
|
|
16
16
|
export type RedeemUnderlying = {
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The id of a historical transaction on aave
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* Timestamp in unix time
|
|
23
|
+
*/
|
|
24
|
+
timestamp: number;
|
|
25
|
+
/**
|
|
26
|
+
* Transaction hash. You can paste these into the search bar on etherscan
|
|
27
|
+
*/
|
|
28
|
+
txHash: string;
|
|
29
|
+
/**
|
|
30
|
+
* Quantity of token
|
|
31
|
+
*/
|
|
32
|
+
amount: number;
|
|
18
33
|
reserve: Reserve;
|
|
19
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Price of token in USD
|
|
36
|
+
*/
|
|
37
|
+
assetPriceUSD: number;
|
|
38
|
+
/**
|
|
39
|
+
* The type of transaction
|
|
40
|
+
*/
|
|
41
|
+
action: string;
|
|
42
|
+
block: number;
|
|
20
43
|
};
|
|
21
44
|
|
|
22
45
|
/** @internal */
|
|
@@ -25,16 +48,26 @@ export const RedeemUnderlying$inboundSchema: z.ZodType<
|
|
|
25
48
|
z.ZodTypeDef,
|
|
26
49
|
unknown
|
|
27
50
|
> = z.object({
|
|
28
|
-
|
|
51
|
+
id: z.string(),
|
|
52
|
+
timestamp: z.number().int(),
|
|
53
|
+
txHash: z.string(),
|
|
54
|
+
amount: z.number(),
|
|
29
55
|
reserve: Reserve$inboundSchema,
|
|
30
|
-
assetPriceUSD: z.
|
|
56
|
+
assetPriceUSD: z.number(),
|
|
57
|
+
action: z.string(),
|
|
58
|
+
block: z.number().int(),
|
|
31
59
|
});
|
|
32
60
|
|
|
33
61
|
/** @internal */
|
|
34
62
|
export type RedeemUnderlying$Outbound = {
|
|
35
|
-
|
|
63
|
+
id: string;
|
|
64
|
+
timestamp: number;
|
|
65
|
+
txHash: string;
|
|
66
|
+
amount: number;
|
|
36
67
|
reserve: Reserve$Outbound;
|
|
37
|
-
assetPriceUSD:
|
|
68
|
+
assetPriceUSD: number;
|
|
69
|
+
action: string;
|
|
70
|
+
block: number;
|
|
38
71
|
};
|
|
39
72
|
|
|
40
73
|
/** @internal */
|
|
@@ -43,9 +76,14 @@ export const RedeemUnderlying$outboundSchema: z.ZodType<
|
|
|
43
76
|
z.ZodTypeDef,
|
|
44
77
|
RedeemUnderlying
|
|
45
78
|
> = z.object({
|
|
46
|
-
|
|
79
|
+
id: z.string(),
|
|
80
|
+
timestamp: z.number().int(),
|
|
81
|
+
txHash: z.string(),
|
|
82
|
+
amount: z.number(),
|
|
47
83
|
reserve: Reserve$outboundSchema,
|
|
48
|
-
assetPriceUSD: z.
|
|
84
|
+
assetPriceUSD: z.number(),
|
|
85
|
+
action: z.string(),
|
|
86
|
+
block: z.number().int(),
|
|
49
87
|
});
|
|
50
88
|
|
|
51
89
|
/**
|
|
@@ -14,24 +14,54 @@ import {
|
|
|
14
14
|
} from "./reserve.js";
|
|
15
15
|
|
|
16
16
|
export type Repay = {
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The id of a historical transaction on aave
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* Timestamp in unix time
|
|
23
|
+
*/
|
|
24
|
+
timestamp: number;
|
|
25
|
+
/**
|
|
26
|
+
* Transaction hash. You can paste these into the search bar on etherscan
|
|
27
|
+
*/
|
|
28
|
+
txHash: string;
|
|
29
|
+
/**
|
|
30
|
+
* Quantity of token
|
|
31
|
+
*/
|
|
32
|
+
amount: number;
|
|
18
33
|
reserve: Reserve;
|
|
19
|
-
assetPriceUSD:
|
|
34
|
+
assetPriceUSD: number;
|
|
35
|
+
/**
|
|
36
|
+
* The type of transaction
|
|
37
|
+
*/
|
|
38
|
+
action?: "Repay" | undefined;
|
|
39
|
+
block: number;
|
|
20
40
|
};
|
|
21
41
|
|
|
22
42
|
/** @internal */
|
|
23
43
|
export const Repay$inboundSchema: z.ZodType<Repay, z.ZodTypeDef, unknown> = z
|
|
24
44
|
.object({
|
|
25
|
-
|
|
45
|
+
id: z.string(),
|
|
46
|
+
timestamp: z.number().int(),
|
|
47
|
+
txHash: z.string(),
|
|
48
|
+
amount: z.number(),
|
|
26
49
|
reserve: Reserve$inboundSchema,
|
|
27
|
-
assetPriceUSD: z.
|
|
50
|
+
assetPriceUSD: z.number(),
|
|
51
|
+
action: z.literal("Repay").optional(),
|
|
52
|
+
block: z.number().int(),
|
|
28
53
|
});
|
|
29
54
|
|
|
30
55
|
/** @internal */
|
|
31
56
|
export type Repay$Outbound = {
|
|
32
|
-
|
|
57
|
+
id: string;
|
|
58
|
+
timestamp: number;
|
|
59
|
+
txHash: string;
|
|
60
|
+
amount: number;
|
|
33
61
|
reserve: Reserve$Outbound;
|
|
34
|
-
assetPriceUSD:
|
|
62
|
+
assetPriceUSD: number;
|
|
63
|
+
action: "Repay";
|
|
64
|
+
block: number;
|
|
35
65
|
};
|
|
36
66
|
|
|
37
67
|
/** @internal */
|
|
@@ -40,9 +70,14 @@ export const Repay$outboundSchema: z.ZodType<
|
|
|
40
70
|
z.ZodTypeDef,
|
|
41
71
|
Repay
|
|
42
72
|
> = z.object({
|
|
43
|
-
|
|
73
|
+
id: z.string(),
|
|
74
|
+
timestamp: z.number().int(),
|
|
75
|
+
txHash: z.string(),
|
|
76
|
+
amount: z.number(),
|
|
44
77
|
reserve: Reserve$outboundSchema,
|
|
45
|
-
assetPriceUSD: z.
|
|
78
|
+
assetPriceUSD: z.number(),
|
|
79
|
+
action: z.literal("Repay").default("Repay" as const),
|
|
80
|
+
block: z.number().int(),
|
|
46
81
|
});
|
|
47
82
|
|
|
48
83
|
/**
|
|
@@ -6,23 +6,51 @@ import * as z from "zod";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
TokenEnum,
|
|
11
|
+
TokenEnum$inboundSchema,
|
|
12
|
+
TokenEnum$outboundSchema,
|
|
13
|
+
} from "./tokenenum.js";
|
|
9
14
|
|
|
10
15
|
export type Reserve = {
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A class representing the token.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*
|
|
21
|
+
* This class is used to represent the token in the system. Notice individual
|
|
22
|
+
* endpoints' documentation where per chain tokens are presented.
|
|
23
|
+
*/
|
|
24
|
+
symbol: TokenEnum;
|
|
25
|
+
/**
|
|
26
|
+
* Number of decimals of token.
|
|
27
|
+
*/
|
|
28
|
+
decimals?: number | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Name of Token
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* Checksum address of Token.
|
|
35
|
+
*/
|
|
36
|
+
underlyingAsset: string;
|
|
13
37
|
};
|
|
14
38
|
|
|
15
39
|
/** @internal */
|
|
16
40
|
export const Reserve$inboundSchema: z.ZodType<Reserve, z.ZodTypeDef, unknown> =
|
|
17
41
|
z.object({
|
|
18
|
-
symbol:
|
|
19
|
-
decimals: z.number().int(),
|
|
42
|
+
symbol: TokenEnum$inboundSchema,
|
|
43
|
+
decimals: z.nullable(z.number().int()).optional(),
|
|
44
|
+
name: z.string(),
|
|
45
|
+
underlyingAsset: z.string(),
|
|
20
46
|
});
|
|
21
47
|
|
|
22
48
|
/** @internal */
|
|
23
49
|
export type Reserve$Outbound = {
|
|
24
50
|
symbol: string;
|
|
25
|
-
decimals
|
|
51
|
+
decimals?: number | null | undefined;
|
|
52
|
+
name: string;
|
|
53
|
+
underlyingAsset: string;
|
|
26
54
|
};
|
|
27
55
|
|
|
28
56
|
/** @internal */
|
|
@@ -31,8 +59,10 @@ export const Reserve$outboundSchema: z.ZodType<
|
|
|
31
59
|
z.ZodTypeDef,
|
|
32
60
|
Reserve
|
|
33
61
|
> = z.object({
|
|
34
|
-
symbol:
|
|
35
|
-
decimals: z.number().int(),
|
|
62
|
+
symbol: TokenEnum$outboundSchema,
|
|
63
|
+
decimals: z.nullable(z.number().int()).optional(),
|
|
64
|
+
name: z.string(),
|
|
65
|
+
underlyingAsset: z.string(),
|
|
36
66
|
});
|
|
37
67
|
|
|
38
68
|
/**
|
|
@@ -14,24 +14,57 @@ import {
|
|
|
14
14
|
} from "./reserve.js";
|
|
15
15
|
|
|
16
16
|
export type Supply = {
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The id of a historical transaction on aave
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* Timestamp in unix time
|
|
23
|
+
*/
|
|
24
|
+
timestamp: number;
|
|
25
|
+
/**
|
|
26
|
+
* Transaction hash. You can paste these into the search bar on etherscan
|
|
27
|
+
*/
|
|
28
|
+
txHash: string;
|
|
29
|
+
/**
|
|
30
|
+
* Quantity of token
|
|
31
|
+
*/
|
|
32
|
+
amount: number;
|
|
18
33
|
reserve: Reserve;
|
|
19
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Price of token in USD
|
|
36
|
+
*/
|
|
37
|
+
assetPriceUSD: number;
|
|
38
|
+
/**
|
|
39
|
+
* The type of transaction
|
|
40
|
+
*/
|
|
41
|
+
action?: "Supply" | undefined;
|
|
42
|
+
block: number;
|
|
20
43
|
};
|
|
21
44
|
|
|
22
45
|
/** @internal */
|
|
23
46
|
export const Supply$inboundSchema: z.ZodType<Supply, z.ZodTypeDef, unknown> = z
|
|
24
47
|
.object({
|
|
25
|
-
|
|
48
|
+
id: z.string(),
|
|
49
|
+
timestamp: z.number().int(),
|
|
50
|
+
txHash: z.string(),
|
|
51
|
+
amount: z.number(),
|
|
26
52
|
reserve: Reserve$inboundSchema,
|
|
27
|
-
assetPriceUSD: z.
|
|
53
|
+
assetPriceUSD: z.number(),
|
|
54
|
+
action: z.literal("Supply").optional(),
|
|
55
|
+
block: z.number().int(),
|
|
28
56
|
});
|
|
29
57
|
|
|
30
58
|
/** @internal */
|
|
31
59
|
export type Supply$Outbound = {
|
|
32
|
-
|
|
60
|
+
id: string;
|
|
61
|
+
timestamp: number;
|
|
62
|
+
txHash: string;
|
|
63
|
+
amount: number;
|
|
33
64
|
reserve: Reserve$Outbound;
|
|
34
|
-
assetPriceUSD:
|
|
65
|
+
assetPriceUSD: number;
|
|
66
|
+
action: "Supply";
|
|
67
|
+
block: number;
|
|
35
68
|
};
|
|
36
69
|
|
|
37
70
|
/** @internal */
|
|
@@ -40,9 +73,14 @@ export const Supply$outboundSchema: z.ZodType<
|
|
|
40
73
|
z.ZodTypeDef,
|
|
41
74
|
Supply
|
|
42
75
|
> = z.object({
|
|
43
|
-
|
|
76
|
+
id: z.string(),
|
|
77
|
+
timestamp: z.number().int(),
|
|
78
|
+
txHash: z.string(),
|
|
79
|
+
amount: z.number(),
|
|
44
80
|
reserve: Reserve$outboundSchema,
|
|
45
|
-
assetPriceUSD: z.
|
|
81
|
+
assetPriceUSD: z.number(),
|
|
82
|
+
action: z.literal("Supply").default("Supply" as const),
|
|
83
|
+
block: z.number().int(),
|
|
46
84
|
});
|
|
47
85
|
|
|
48
86
|
/**
|
|
@@ -14,11 +14,25 @@ import {
|
|
|
14
14
|
} from "./reserve.js";
|
|
15
15
|
|
|
16
16
|
export type SwapBorrowRate = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The id of a historical transaction on aave
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* Timestamp in unix time
|
|
23
|
+
*/
|
|
24
|
+
timestamp: number;
|
|
25
|
+
/**
|
|
26
|
+
* Transaction hash. You can paste these into the search bar on etherscan
|
|
27
|
+
*/
|
|
28
|
+
txHash: string;
|
|
29
|
+
borrowRateModeFrom: number;
|
|
30
|
+
borrowRateModeTo: number;
|
|
31
|
+
variableBorrowRate: number;
|
|
32
|
+
stableBorrowRate: number;
|
|
21
33
|
reserve: Reserve;
|
|
34
|
+
action?: "SwapBorrowRate" | undefined;
|
|
35
|
+
block: number;
|
|
22
36
|
};
|
|
23
37
|
|
|
24
38
|
/** @internal */
|
|
@@ -27,20 +41,30 @@ export const SwapBorrowRate$inboundSchema: z.ZodType<
|
|
|
27
41
|
z.ZodTypeDef,
|
|
28
42
|
unknown
|
|
29
43
|
> = z.object({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
id: z.string(),
|
|
45
|
+
timestamp: z.number().int(),
|
|
46
|
+
txHash: z.string(),
|
|
47
|
+
borrowRateModeFrom: z.number().int(),
|
|
48
|
+
borrowRateModeTo: z.number().int(),
|
|
49
|
+
variableBorrowRate: z.number().int(),
|
|
50
|
+
stableBorrowRate: z.number().int(),
|
|
34
51
|
reserve: Reserve$inboundSchema,
|
|
52
|
+
action: z.literal("SwapBorrowRate").optional(),
|
|
53
|
+
block: z.number().int(),
|
|
35
54
|
});
|
|
36
55
|
|
|
37
56
|
/** @internal */
|
|
38
57
|
export type SwapBorrowRate$Outbound = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
58
|
+
id: string;
|
|
59
|
+
timestamp: number;
|
|
60
|
+
txHash: string;
|
|
61
|
+
borrowRateModeFrom: number;
|
|
62
|
+
borrowRateModeTo: number;
|
|
63
|
+
variableBorrowRate: number;
|
|
64
|
+
stableBorrowRate: number;
|
|
43
65
|
reserve: Reserve$Outbound;
|
|
66
|
+
action: "SwapBorrowRate";
|
|
67
|
+
block: number;
|
|
44
68
|
};
|
|
45
69
|
|
|
46
70
|
/** @internal */
|
|
@@ -49,11 +73,16 @@ export const SwapBorrowRate$outboundSchema: z.ZodType<
|
|
|
49
73
|
z.ZodTypeDef,
|
|
50
74
|
SwapBorrowRate
|
|
51
75
|
> = z.object({
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
76
|
+
id: z.string(),
|
|
77
|
+
timestamp: z.number().int(),
|
|
78
|
+
txHash: z.string(),
|
|
79
|
+
borrowRateModeFrom: z.number().int(),
|
|
80
|
+
borrowRateModeTo: z.number().int(),
|
|
81
|
+
variableBorrowRate: z.number().int(),
|
|
82
|
+
stableBorrowRate: z.number().int(),
|
|
56
83
|
reserve: Reserve$outboundSchema,
|
|
84
|
+
action: z.literal("SwapBorrowRate").default("SwapBorrowRate" as const),
|
|
85
|
+
block: z.number().int(),
|
|
57
86
|
});
|
|
58
87
|
|
|
59
88
|
/**
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
/**
|
|
22
22
|
* The amount of the token to swap to
|
|
23
23
|
*/
|
|
24
|
-
export type
|
|
24
|
+
export type UniswapBuyExactlyParamsAmount = number | string;
|
|
25
25
|
|
|
26
26
|
export type UniswapBuyExactlyParams = {
|
|
27
27
|
/**
|
|
@@ -53,7 +53,7 @@ export type UniswapBuyExactlyParams = {
|
|
|
53
53
|
/**
|
|
54
54
|
* The amount of the token to swap to
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
amount: number | string;
|
|
57
57
|
/**
|
|
58
58
|
* The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed.
|
|
59
59
|
*/
|
|
@@ -65,52 +65,52 @@ export type UniswapBuyExactlyParams = {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
/** @internal */
|
|
68
|
-
export const
|
|
69
|
-
|
|
68
|
+
export const UniswapBuyExactlyParamsAmount$inboundSchema: z.ZodType<
|
|
69
|
+
UniswapBuyExactlyParamsAmount,
|
|
70
70
|
z.ZodTypeDef,
|
|
71
71
|
unknown
|
|
72
72
|
> = z.union([z.number(), z.string()]);
|
|
73
73
|
|
|
74
74
|
/** @internal */
|
|
75
|
-
export type
|
|
75
|
+
export type UniswapBuyExactlyParamsAmount$Outbound = number | string;
|
|
76
76
|
|
|
77
77
|
/** @internal */
|
|
78
|
-
export const
|
|
79
|
-
|
|
78
|
+
export const UniswapBuyExactlyParamsAmount$outboundSchema: z.ZodType<
|
|
79
|
+
UniswapBuyExactlyParamsAmount$Outbound,
|
|
80
80
|
z.ZodTypeDef,
|
|
81
|
-
|
|
81
|
+
UniswapBuyExactlyParamsAmount
|
|
82
82
|
> = z.union([z.number(), z.string()]);
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* @internal
|
|
86
86
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
87
|
*/
|
|
88
|
-
export namespace
|
|
89
|
-
/** @deprecated use `
|
|
90
|
-
export const inboundSchema =
|
|
91
|
-
/** @deprecated use `
|
|
92
|
-
export const outboundSchema =
|
|
93
|
-
/** @deprecated use `
|
|
94
|
-
export type Outbound =
|
|
88
|
+
export namespace UniswapBuyExactlyParamsAmount$ {
|
|
89
|
+
/** @deprecated use `UniswapBuyExactlyParamsAmount$inboundSchema` instead. */
|
|
90
|
+
export const inboundSchema = UniswapBuyExactlyParamsAmount$inboundSchema;
|
|
91
|
+
/** @deprecated use `UniswapBuyExactlyParamsAmount$outboundSchema` instead. */
|
|
92
|
+
export const outboundSchema = UniswapBuyExactlyParamsAmount$outboundSchema;
|
|
93
|
+
/** @deprecated use `UniswapBuyExactlyParamsAmount$Outbound` instead. */
|
|
94
|
+
export type Outbound = UniswapBuyExactlyParamsAmount$Outbound;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export function
|
|
98
|
-
|
|
97
|
+
export function uniswapBuyExactlyParamsAmountToJSON(
|
|
98
|
+
uniswapBuyExactlyParamsAmount: UniswapBuyExactlyParamsAmount,
|
|
99
99
|
): string {
|
|
100
100
|
return JSON.stringify(
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
UniswapBuyExactlyParamsAmount$outboundSchema.parse(
|
|
102
|
+
uniswapBuyExactlyParamsAmount,
|
|
103
103
|
),
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
export function
|
|
107
|
+
export function uniswapBuyExactlyParamsAmountFromJSON(
|
|
108
108
|
jsonString: string,
|
|
109
|
-
): SafeParseResult<
|
|
109
|
+
): SafeParseResult<UniswapBuyExactlyParamsAmount, SDKValidationError> {
|
|
110
110
|
return safeParse(
|
|
111
111
|
jsonString,
|
|
112
|
-
(x) =>
|
|
113
|
-
`Failed to parse '
|
|
112
|
+
(x) => UniswapBuyExactlyParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
113
|
+
`Failed to parse 'UniswapBuyExactlyParamsAmount' from JSON`,
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -123,14 +123,13 @@ export const UniswapBuyExactlyParams$inboundSchema: z.ZodType<
|
|
|
123
123
|
token_in: TokenEnum$inboundSchema,
|
|
124
124
|
token_out: TokenEnum$inboundSchema,
|
|
125
125
|
fee: FeeEnum$inboundSchema,
|
|
126
|
-
|
|
126
|
+
amount: z.union([z.number(), z.string()]),
|
|
127
127
|
max_slippage_percent: z.number(),
|
|
128
128
|
wrap_eth: z.boolean().default(false),
|
|
129
129
|
}).transform((v) => {
|
|
130
130
|
return remap$(v, {
|
|
131
131
|
"token_in": "tokenIn",
|
|
132
132
|
"token_out": "tokenOut",
|
|
133
|
-
"amount_out": "amountOut",
|
|
134
133
|
"max_slippage_percent": "maxSlippagePercent",
|
|
135
134
|
"wrap_eth": "wrapEth",
|
|
136
135
|
});
|
|
@@ -141,7 +140,7 @@ export type UniswapBuyExactlyParams$Outbound = {
|
|
|
141
140
|
token_in: string;
|
|
142
141
|
token_out: string;
|
|
143
142
|
fee: string;
|
|
144
|
-
|
|
143
|
+
amount: number | string;
|
|
145
144
|
max_slippage_percent: number;
|
|
146
145
|
wrap_eth: boolean;
|
|
147
146
|
};
|
|
@@ -155,14 +154,13 @@ export const UniswapBuyExactlyParams$outboundSchema: z.ZodType<
|
|
|
155
154
|
tokenIn: TokenEnum$outboundSchema,
|
|
156
155
|
tokenOut: TokenEnum$outboundSchema,
|
|
157
156
|
fee: FeeEnum$outboundSchema,
|
|
158
|
-
|
|
157
|
+
amount: z.union([z.number(), z.string()]),
|
|
159
158
|
maxSlippagePercent: z.number(),
|
|
160
159
|
wrapEth: z.boolean().default(false),
|
|
161
160
|
}).transform((v) => {
|
|
162
161
|
return remap$(v, {
|
|
163
162
|
tokenIn: "token_in",
|
|
164
163
|
tokenOut: "token_out",
|
|
165
|
-
amountOut: "amount_out",
|
|
166
164
|
maxSlippagePercent: "max_slippage_percent",
|
|
167
165
|
wrapEth: "wrap_eth",
|
|
168
166
|
});
|