@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
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
export * from "./aaveborrowparams.js";
|
|
6
6
|
export * from "./aaveborrowrequest.js";
|
|
7
|
-
export * from "./aavehistoricaltransactionbase.js";
|
|
8
7
|
export * from "./aavehistoricaltransactionsresponse.js";
|
|
9
8
|
export * from "./aaveliquiditychangeresponse.js";
|
|
9
|
+
export * from "./aavelooprequest.js";
|
|
10
10
|
export * from "./aaverateresponse.js";
|
|
11
11
|
export * from "./aaverepayparams.js";
|
|
12
12
|
export * from "./aaverepayrequest.js";
|
|
@@ -18,7 +18,6 @@ export * from "./aaveuserpositionpertokenresponse.js";
|
|
|
18
18
|
export * from "./aaveuserpositionsummaryresponse.js";
|
|
19
19
|
export * from "./aavewithdrawparams.js";
|
|
20
20
|
export * from "./aavewithdrawrequest.js";
|
|
21
|
-
export * from "./action.js";
|
|
22
21
|
export * from "./aerodromelppositionsresponse.js";
|
|
23
22
|
export * from "./aerodromeposition.js";
|
|
24
23
|
export * from "./aerodromeslipstreambuyexactlyparams.js";
|
|
@@ -36,7 +35,6 @@ export * from "./allowanceinforesponse.js";
|
|
|
36
35
|
export * from "./borrow.js";
|
|
37
36
|
export * from "./chain.js";
|
|
38
37
|
export * from "./chaininfo.js";
|
|
39
|
-
export * from "./collateralreserve.js";
|
|
40
38
|
export * from "./compassapibackendmodelsmorphoreadresponsegetmarketsasset.js";
|
|
41
39
|
export * from "./compassapibackendmodelsmorphoreadresponsegetvaultsasset.js";
|
|
42
40
|
export * from "./contractname.js";
|
|
@@ -68,7 +66,6 @@ export * from "./multicallauthorizationrequest.js";
|
|
|
68
66
|
export * from "./multicallauthorizationresponse.js";
|
|
69
67
|
export * from "./multicallexecuterequest.js";
|
|
70
68
|
export * from "./portfolio.js";
|
|
71
|
-
export * from "./principalreserve.js";
|
|
72
69
|
export * from "./redeemunderlying.js";
|
|
73
70
|
export * from "./repay.js";
|
|
74
71
|
export * from "./reserve.js";
|
|
@@ -7,25 +7,33 @@ 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
9
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./
|
|
15
|
-
import {
|
|
16
|
-
PrincipalReserve,
|
|
17
|
-
PrincipalReserve$inboundSchema,
|
|
18
|
-
PrincipalReserve$Outbound,
|
|
19
|
-
PrincipalReserve$outboundSchema,
|
|
20
|
-
} from "./principalreserve.js";
|
|
10
|
+
Reserve,
|
|
11
|
+
Reserve$inboundSchema,
|
|
12
|
+
Reserve$Outbound,
|
|
13
|
+
Reserve$outboundSchema,
|
|
14
|
+
} from "./reserve.js";
|
|
21
15
|
|
|
22
16
|
export type LiquidationCall = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
+
collateralAmount: number;
|
|
30
|
+
collateralReserve: Reserve;
|
|
31
|
+
principalAmount: number;
|
|
32
|
+
principalReserve: Reserve;
|
|
33
|
+
collateralAssetPriceUSD: number;
|
|
34
|
+
borrowAssetPriceUSD: number;
|
|
35
|
+
action?: "LiquidationCall" | undefined;
|
|
36
|
+
block: number;
|
|
29
37
|
};
|
|
30
38
|
|
|
31
39
|
/** @internal */
|
|
@@ -34,22 +42,32 @@ export const LiquidationCall$inboundSchema: z.ZodType<
|
|
|
34
42
|
z.ZodTypeDef,
|
|
35
43
|
unknown
|
|
36
44
|
> = z.object({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
id: z.string(),
|
|
46
|
+
timestamp: z.number().int(),
|
|
47
|
+
txHash: z.string(),
|
|
48
|
+
collateralAmount: z.number(),
|
|
49
|
+
collateralReserve: Reserve$inboundSchema,
|
|
50
|
+
principalAmount: z.number(),
|
|
51
|
+
principalReserve: Reserve$inboundSchema,
|
|
52
|
+
collateralAssetPriceUSD: z.number(),
|
|
53
|
+
borrowAssetPriceUSD: z.number(),
|
|
54
|
+
action: z.literal("LiquidationCall").optional(),
|
|
55
|
+
block: z.number().int(),
|
|
43
56
|
});
|
|
44
57
|
|
|
45
58
|
/** @internal */
|
|
46
59
|
export type LiquidationCall$Outbound = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
id: string;
|
|
61
|
+
timestamp: number;
|
|
62
|
+
txHash: string;
|
|
63
|
+
collateralAmount: number;
|
|
64
|
+
collateralReserve: Reserve$Outbound;
|
|
65
|
+
principalAmount: number;
|
|
66
|
+
principalReserve: Reserve$Outbound;
|
|
67
|
+
collateralAssetPriceUSD: number;
|
|
68
|
+
borrowAssetPriceUSD: number;
|
|
69
|
+
action: "LiquidationCall";
|
|
70
|
+
block: number;
|
|
53
71
|
};
|
|
54
72
|
|
|
55
73
|
/** @internal */
|
|
@@ -58,12 +76,17 @@ export const LiquidationCall$outboundSchema: z.ZodType<
|
|
|
58
76
|
z.ZodTypeDef,
|
|
59
77
|
LiquidationCall
|
|
60
78
|
> = z.object({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
id: z.string(),
|
|
80
|
+
timestamp: z.number().int(),
|
|
81
|
+
txHash: z.string(),
|
|
82
|
+
collateralAmount: z.number(),
|
|
83
|
+
collateralReserve: Reserve$outboundSchema,
|
|
84
|
+
principalAmount: z.number(),
|
|
85
|
+
principalReserve: Reserve$outboundSchema,
|
|
86
|
+
collateralAssetPriceUSD: z.number(),
|
|
87
|
+
borrowAssetPriceUSD: z.number(),
|
|
88
|
+
action: z.literal("LiquidationCall").default("LiquidationCall" as const),
|
|
89
|
+
block: z.number().int(),
|
|
67
90
|
});
|
|
68
91
|
|
|
69
92
|
/**
|
|
@@ -5,15 +5,23 @@
|
|
|
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
|
-
import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Amount of the token to borrow from the market.
|
|
14
14
|
*/
|
|
15
15
|
export type MorphoBorrowRequestAmount = number | string;
|
|
16
16
|
|
|
17
|
+
export const MorphoBorrowRequestChain = {
|
|
18
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
19
|
+
BaseMainnet: "base:mainnet",
|
|
20
|
+
} as const;
|
|
21
|
+
export type MorphoBorrowRequestChain = ClosedEnum<
|
|
22
|
+
typeof MorphoBorrowRequestChain
|
|
23
|
+
>;
|
|
24
|
+
|
|
17
25
|
export type MorphoBorrowRequest = {
|
|
18
26
|
/**
|
|
19
27
|
* Amount of the token to borrow from the market.
|
|
@@ -31,10 +39,7 @@ export type MorphoBorrowRequest = {
|
|
|
31
39
|
* The address of the receiver of the tokens borrowed. Defaults to the transaction sender.
|
|
32
40
|
*/
|
|
33
41
|
receiver?: string | null | undefined;
|
|
34
|
-
|
|
35
|
-
* The chain to use.
|
|
36
|
-
*/
|
|
37
|
-
chain: Chain;
|
|
42
|
+
chain: MorphoBorrowRequestChain;
|
|
38
43
|
/**
|
|
39
44
|
* The address of the transaction sender.
|
|
40
45
|
*/
|
|
@@ -89,6 +94,27 @@ export function morphoBorrowRequestAmountFromJSON(
|
|
|
89
94
|
);
|
|
90
95
|
}
|
|
91
96
|
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const MorphoBorrowRequestChain$inboundSchema: z.ZodNativeEnum<
|
|
99
|
+
typeof MorphoBorrowRequestChain
|
|
100
|
+
> = z.nativeEnum(MorphoBorrowRequestChain);
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const MorphoBorrowRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
104
|
+
typeof MorphoBorrowRequestChain
|
|
105
|
+
> = MorphoBorrowRequestChain$inboundSchema;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
110
|
+
*/
|
|
111
|
+
export namespace MorphoBorrowRequestChain$ {
|
|
112
|
+
/** @deprecated use `MorphoBorrowRequestChain$inboundSchema` instead. */
|
|
113
|
+
export const inboundSchema = MorphoBorrowRequestChain$inboundSchema;
|
|
114
|
+
/** @deprecated use `MorphoBorrowRequestChain$outboundSchema` instead. */
|
|
115
|
+
export const outboundSchema = MorphoBorrowRequestChain$outboundSchema;
|
|
116
|
+
}
|
|
117
|
+
|
|
92
118
|
/** @internal */
|
|
93
119
|
export const MorphoBorrowRequest$inboundSchema: z.ZodType<
|
|
94
120
|
MorphoBorrowRequest,
|
|
@@ -99,7 +125,7 @@ export const MorphoBorrowRequest$inboundSchema: z.ZodType<
|
|
|
99
125
|
unique_market_key: z.string(),
|
|
100
126
|
on_behalf_of: z.nullable(z.string()).optional(),
|
|
101
127
|
receiver: z.nullable(z.string()).optional(),
|
|
102
|
-
chain:
|
|
128
|
+
chain: MorphoBorrowRequestChain$inboundSchema,
|
|
103
129
|
sender: z.string(),
|
|
104
130
|
}).transform((v) => {
|
|
105
131
|
return remap$(v, {
|
|
@@ -128,7 +154,7 @@ export const MorphoBorrowRequest$outboundSchema: z.ZodType<
|
|
|
128
154
|
uniqueMarketKey: z.string(),
|
|
129
155
|
onBehalfOf: z.nullable(z.string()).optional(),
|
|
130
156
|
receiver: z.nullable(z.string()).optional(),
|
|
131
|
-
chain:
|
|
157
|
+
chain: MorphoBorrowRequestChain$outboundSchema,
|
|
132
158
|
sender: z.string(),
|
|
133
159
|
}).transform((v) => {
|
|
134
160
|
return remap$(v, {
|
|
@@ -5,15 +5,23 @@
|
|
|
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
|
-
import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The amount of tokens to deposit into the vault.
|
|
14
14
|
*/
|
|
15
15
|
export type MorphoDepositRequestAmount = number | string;
|
|
16
16
|
|
|
17
|
+
export const MorphoDepositRequestChain = {
|
|
18
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
19
|
+
BaseMainnet: "base:mainnet",
|
|
20
|
+
} as const;
|
|
21
|
+
export type MorphoDepositRequestChain = ClosedEnum<
|
|
22
|
+
typeof MorphoDepositRequestChain
|
|
23
|
+
>;
|
|
24
|
+
|
|
17
25
|
export type MorphoDepositRequest = {
|
|
18
26
|
/**
|
|
19
27
|
* The vault address you are depositing to.
|
|
@@ -27,10 +35,7 @@ export type MorphoDepositRequest = {
|
|
|
27
35
|
* The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender.
|
|
28
36
|
*/
|
|
29
37
|
receiver?: string | null | undefined;
|
|
30
|
-
|
|
31
|
-
* The chain to use.
|
|
32
|
-
*/
|
|
33
|
-
chain: Chain;
|
|
38
|
+
chain: MorphoDepositRequestChain;
|
|
34
39
|
/**
|
|
35
40
|
* The address of the transaction sender.
|
|
36
41
|
*/
|
|
@@ -85,6 +90,27 @@ export function morphoDepositRequestAmountFromJSON(
|
|
|
85
90
|
);
|
|
86
91
|
}
|
|
87
92
|
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const MorphoDepositRequestChain$inboundSchema: z.ZodNativeEnum<
|
|
95
|
+
typeof MorphoDepositRequestChain
|
|
96
|
+
> = z.nativeEnum(MorphoDepositRequestChain);
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const MorphoDepositRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
100
|
+
typeof MorphoDepositRequestChain
|
|
101
|
+
> = MorphoDepositRequestChain$inboundSchema;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
106
|
+
*/
|
|
107
|
+
export namespace MorphoDepositRequestChain$ {
|
|
108
|
+
/** @deprecated use `MorphoDepositRequestChain$inboundSchema` instead. */
|
|
109
|
+
export const inboundSchema = MorphoDepositRequestChain$inboundSchema;
|
|
110
|
+
/** @deprecated use `MorphoDepositRequestChain$outboundSchema` instead. */
|
|
111
|
+
export const outboundSchema = MorphoDepositRequestChain$outboundSchema;
|
|
112
|
+
}
|
|
113
|
+
|
|
88
114
|
/** @internal */
|
|
89
115
|
export const MorphoDepositRequest$inboundSchema: z.ZodType<
|
|
90
116
|
MorphoDepositRequest,
|
|
@@ -94,7 +120,7 @@ export const MorphoDepositRequest$inboundSchema: z.ZodType<
|
|
|
94
120
|
vault_address: z.string(),
|
|
95
121
|
amount: z.union([z.number(), z.string()]),
|
|
96
122
|
receiver: z.nullable(z.string()).optional(),
|
|
97
|
-
chain:
|
|
123
|
+
chain: MorphoDepositRequestChain$inboundSchema,
|
|
98
124
|
sender: z.string(),
|
|
99
125
|
}).transform((v) => {
|
|
100
126
|
return remap$(v, {
|
|
@@ -120,7 +146,7 @@ export const MorphoDepositRequest$outboundSchema: z.ZodType<
|
|
|
120
146
|
vaultAddress: z.string(),
|
|
121
147
|
amount: z.union([z.number(), z.string()]),
|
|
122
148
|
receiver: z.nullable(z.string()).optional(),
|
|
123
|
-
chain:
|
|
149
|
+
chain: MorphoDepositRequestChain$outboundSchema,
|
|
124
150
|
sender: z.string(),
|
|
125
151
|
}).transform((v) => {
|
|
126
152
|
return remap$(v, {
|
|
@@ -6,9 +6,17 @@ import * as z from "zod";
|
|
|
6
6
|
import * as b64$ from "../../lib/base64.js";
|
|
7
7
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
8
|
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
export const MorphoRepayRequestChain = {
|
|
14
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
15
|
+
BaseMainnet: "base:mainnet",
|
|
16
|
+
} as const;
|
|
17
|
+
export type MorphoRepayRequestChain = ClosedEnum<
|
|
18
|
+
typeof MorphoRepayRequestChain
|
|
19
|
+
>;
|
|
12
20
|
|
|
13
21
|
export type MorphoRepayRequest = {
|
|
14
22
|
/**
|
|
@@ -27,16 +35,34 @@ export type MorphoRepayRequest = {
|
|
|
27
35
|
* An optional field for callback byte data that will be triggered upon successful repaying of debt.
|
|
28
36
|
*/
|
|
29
37
|
callbackData?: Uint8Array | string | null | undefined;
|
|
30
|
-
|
|
31
|
-
* The chain to use.
|
|
32
|
-
*/
|
|
33
|
-
chain: Chain;
|
|
38
|
+
chain: MorphoRepayRequestChain;
|
|
34
39
|
/**
|
|
35
40
|
* The address of the transaction sender.
|
|
36
41
|
*/
|
|
37
42
|
sender: string;
|
|
38
43
|
};
|
|
39
44
|
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const MorphoRepayRequestChain$inboundSchema: z.ZodNativeEnum<
|
|
47
|
+
typeof MorphoRepayRequestChain
|
|
48
|
+
> = z.nativeEnum(MorphoRepayRequestChain);
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const MorphoRepayRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
52
|
+
typeof MorphoRepayRequestChain
|
|
53
|
+
> = MorphoRepayRequestChain$inboundSchema;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
+
*/
|
|
59
|
+
export namespace MorphoRepayRequestChain$ {
|
|
60
|
+
/** @deprecated use `MorphoRepayRequestChain$inboundSchema` instead. */
|
|
61
|
+
export const inboundSchema = MorphoRepayRequestChain$inboundSchema;
|
|
62
|
+
/** @deprecated use `MorphoRepayRequestChain$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema = MorphoRepayRequestChain$outboundSchema;
|
|
64
|
+
}
|
|
65
|
+
|
|
40
66
|
/** @internal */
|
|
41
67
|
export const MorphoRepayRequest$inboundSchema: z.ZodType<
|
|
42
68
|
MorphoRepayRequest,
|
|
@@ -47,7 +73,7 @@ export const MorphoRepayRequest$inboundSchema: z.ZodType<
|
|
|
47
73
|
unique_market_key: z.string(),
|
|
48
74
|
on_behalf_of: z.nullable(z.string()).optional(),
|
|
49
75
|
callback_data: z.nullable(b64$.zodInbound).optional(),
|
|
50
|
-
chain:
|
|
76
|
+
chain: MorphoRepayRequestChain$inboundSchema,
|
|
51
77
|
sender: z.string(),
|
|
52
78
|
}).transform((v) => {
|
|
53
79
|
return remap$(v, {
|
|
@@ -77,7 +103,7 @@ export const MorphoRepayRequest$outboundSchema: z.ZodType<
|
|
|
77
103
|
uniqueMarketKey: z.string(),
|
|
78
104
|
onBehalfOf: z.nullable(z.string()).optional(),
|
|
79
105
|
callbackData: z.nullable(b64$.zodOutbound).optional(),
|
|
80
|
-
chain:
|
|
106
|
+
chain: MorphoRepayRequestChain$outboundSchema,
|
|
81
107
|
sender: z.string(),
|
|
82
108
|
}).transform((v) => {
|
|
83
109
|
return remap$(v, {
|
|
@@ -5,15 +5,23 @@
|
|
|
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
|
-
import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The amount of tokens to increase the allowance by.
|
|
14
14
|
*/
|
|
15
15
|
export type MorphoSetVaultAllowanceRequestAmount = number | string;
|
|
16
16
|
|
|
17
|
+
export const MorphoSetVaultAllowanceRequestChain = {
|
|
18
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
19
|
+
BaseMainnet: "base:mainnet",
|
|
20
|
+
} as const;
|
|
21
|
+
export type MorphoSetVaultAllowanceRequestChain = ClosedEnum<
|
|
22
|
+
typeof MorphoSetVaultAllowanceRequestChain
|
|
23
|
+
>;
|
|
24
|
+
|
|
17
25
|
export type MorphoSetVaultAllowanceRequest = {
|
|
18
26
|
/**
|
|
19
27
|
* The vault address you are increasing the allowance for.
|
|
@@ -23,10 +31,7 @@ export type MorphoSetVaultAllowanceRequest = {
|
|
|
23
31
|
* The amount of tokens to increase the allowance by.
|
|
24
32
|
*/
|
|
25
33
|
amount: number | string;
|
|
26
|
-
|
|
27
|
-
* The chain to use.
|
|
28
|
-
*/
|
|
29
|
-
chain: Chain;
|
|
34
|
+
chain: MorphoSetVaultAllowanceRequestChain;
|
|
30
35
|
/**
|
|
31
36
|
* The address of the transaction sender.
|
|
32
37
|
*/
|
|
@@ -86,6 +91,29 @@ export function morphoSetVaultAllowanceRequestAmountFromJSON(
|
|
|
86
91
|
);
|
|
87
92
|
}
|
|
88
93
|
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const MorphoSetVaultAllowanceRequestChain$inboundSchema: z.ZodNativeEnum<
|
|
96
|
+
typeof MorphoSetVaultAllowanceRequestChain
|
|
97
|
+
> = z.nativeEnum(MorphoSetVaultAllowanceRequestChain);
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const MorphoSetVaultAllowanceRequestChain$outboundSchema:
|
|
101
|
+
z.ZodNativeEnum<typeof MorphoSetVaultAllowanceRequestChain> =
|
|
102
|
+
MorphoSetVaultAllowanceRequestChain$inboundSchema;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
107
|
+
*/
|
|
108
|
+
export namespace MorphoSetVaultAllowanceRequestChain$ {
|
|
109
|
+
/** @deprecated use `MorphoSetVaultAllowanceRequestChain$inboundSchema` instead. */
|
|
110
|
+
export const inboundSchema =
|
|
111
|
+
MorphoSetVaultAllowanceRequestChain$inboundSchema;
|
|
112
|
+
/** @deprecated use `MorphoSetVaultAllowanceRequestChain$outboundSchema` instead. */
|
|
113
|
+
export const outboundSchema =
|
|
114
|
+
MorphoSetVaultAllowanceRequestChain$outboundSchema;
|
|
115
|
+
}
|
|
116
|
+
|
|
89
117
|
/** @internal */
|
|
90
118
|
export const MorphoSetVaultAllowanceRequest$inboundSchema: z.ZodType<
|
|
91
119
|
MorphoSetVaultAllowanceRequest,
|
|
@@ -94,7 +122,7 @@ export const MorphoSetVaultAllowanceRequest$inboundSchema: z.ZodType<
|
|
|
94
122
|
> = z.object({
|
|
95
123
|
vault_address: z.string(),
|
|
96
124
|
amount: z.union([z.number(), z.string()]),
|
|
97
|
-
chain:
|
|
125
|
+
chain: MorphoSetVaultAllowanceRequestChain$inboundSchema,
|
|
98
126
|
sender: z.string(),
|
|
99
127
|
}).transform((v) => {
|
|
100
128
|
return remap$(v, {
|
|
@@ -118,7 +146,7 @@ export const MorphoSetVaultAllowanceRequest$outboundSchema: z.ZodType<
|
|
|
118
146
|
> = z.object({
|
|
119
147
|
vaultAddress: z.string(),
|
|
120
148
|
amount: z.union([z.number(), z.string()]),
|
|
121
|
-
chain:
|
|
149
|
+
chain: MorphoSetVaultAllowanceRequestChain$outboundSchema,
|
|
122
150
|
sender: z.string(),
|
|
123
151
|
}).transform((v) => {
|
|
124
152
|
return remap$(v, {
|
|
@@ -6,15 +6,23 @@ import * as z from "zod";
|
|
|
6
6
|
import * as b64$ from "../../lib/base64.js";
|
|
7
7
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
8
8
|
import { safeParse } from "../../lib/schemas.js";
|
|
9
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Amount of the token to supply to the market as collateral.
|
|
15
15
|
*/
|
|
16
16
|
export type MorphoSupplyCollateralRequestAmount = number | string;
|
|
17
17
|
|
|
18
|
+
export const MorphoSupplyCollateralRequestChain = {
|
|
19
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
20
|
+
BaseMainnet: "base:mainnet",
|
|
21
|
+
} as const;
|
|
22
|
+
export type MorphoSupplyCollateralRequestChain = ClosedEnum<
|
|
23
|
+
typeof MorphoSupplyCollateralRequestChain
|
|
24
|
+
>;
|
|
25
|
+
|
|
18
26
|
export type MorphoSupplyCollateralRequest = {
|
|
19
27
|
/**
|
|
20
28
|
* Amount of the token to supply to the market as collateral.
|
|
@@ -32,10 +40,7 @@ export type MorphoSupplyCollateralRequest = {
|
|
|
32
40
|
* An optional field for callback byte data that will be triggered upon successful supplying of collateral.
|
|
33
41
|
*/
|
|
34
42
|
callbackData?: Uint8Array | string | null | undefined;
|
|
35
|
-
|
|
36
|
-
* The chain to use.
|
|
37
|
-
*/
|
|
38
|
-
chain: Chain;
|
|
43
|
+
chain: MorphoSupplyCollateralRequestChain;
|
|
39
44
|
/**
|
|
40
45
|
* The address of the transaction sender.
|
|
41
46
|
*/
|
|
@@ -95,6 +100,28 @@ export function morphoSupplyCollateralRequestAmountFromJSON(
|
|
|
95
100
|
);
|
|
96
101
|
}
|
|
97
102
|
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const MorphoSupplyCollateralRequestChain$inboundSchema: z.ZodNativeEnum<
|
|
105
|
+
typeof MorphoSupplyCollateralRequestChain
|
|
106
|
+
> = z.nativeEnum(MorphoSupplyCollateralRequestChain);
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const MorphoSupplyCollateralRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
110
|
+
typeof MorphoSupplyCollateralRequestChain
|
|
111
|
+
> = MorphoSupplyCollateralRequestChain$inboundSchema;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
116
|
+
*/
|
|
117
|
+
export namespace MorphoSupplyCollateralRequestChain$ {
|
|
118
|
+
/** @deprecated use `MorphoSupplyCollateralRequestChain$inboundSchema` instead. */
|
|
119
|
+
export const inboundSchema = MorphoSupplyCollateralRequestChain$inboundSchema;
|
|
120
|
+
/** @deprecated use `MorphoSupplyCollateralRequestChain$outboundSchema` instead. */
|
|
121
|
+
export const outboundSchema =
|
|
122
|
+
MorphoSupplyCollateralRequestChain$outboundSchema;
|
|
123
|
+
}
|
|
124
|
+
|
|
98
125
|
/** @internal */
|
|
99
126
|
export const MorphoSupplyCollateralRequest$inboundSchema: z.ZodType<
|
|
100
127
|
MorphoSupplyCollateralRequest,
|
|
@@ -105,7 +132,7 @@ export const MorphoSupplyCollateralRequest$inboundSchema: z.ZodType<
|
|
|
105
132
|
unique_market_key: z.string(),
|
|
106
133
|
on_behalf_of: z.nullable(z.string()).optional(),
|
|
107
134
|
callback_data: z.nullable(b64$.zodInbound).optional(),
|
|
108
|
-
chain:
|
|
135
|
+
chain: MorphoSupplyCollateralRequestChain$inboundSchema,
|
|
109
136
|
sender: z.string(),
|
|
110
137
|
}).transform((v) => {
|
|
111
138
|
return remap$(v, {
|
|
@@ -135,7 +162,7 @@ export const MorphoSupplyCollateralRequest$outboundSchema: z.ZodType<
|
|
|
135
162
|
uniqueMarketKey: z.string(),
|
|
136
163
|
onBehalfOf: z.nullable(z.string()).optional(),
|
|
137
164
|
callbackData: z.nullable(b64$.zodOutbound).optional(),
|
|
138
|
-
chain:
|
|
165
|
+
chain: MorphoSupplyCollateralRequestChain$outboundSchema,
|
|
139
166
|
sender: z.string(),
|
|
140
167
|
}).transform((v) => {
|
|
141
168
|
return remap$(v, {
|
|
@@ -5,15 +5,23 @@
|
|
|
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
|
-
import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Amount of the token to supply to the market as collateral.
|
|
14
14
|
*/
|
|
15
15
|
export type MorphoWithdrawCollateralRequestAmount = number | string;
|
|
16
16
|
|
|
17
|
+
export const MorphoWithdrawCollateralRequestChain = {
|
|
18
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
19
|
+
BaseMainnet: "base:mainnet",
|
|
20
|
+
} as const;
|
|
21
|
+
export type MorphoWithdrawCollateralRequestChain = ClosedEnum<
|
|
22
|
+
typeof MorphoWithdrawCollateralRequestChain
|
|
23
|
+
>;
|
|
24
|
+
|
|
17
25
|
export type MorphoWithdrawCollateralRequest = {
|
|
18
26
|
/**
|
|
19
27
|
* Amount of the token to supply to the market as collateral.
|
|
@@ -31,10 +39,7 @@ export type MorphoWithdrawCollateralRequest = {
|
|
|
31
39
|
* The address where the withdrawn collateral will be received. Defaults to sender.
|
|
32
40
|
*/
|
|
33
41
|
receiver?: string | null | undefined;
|
|
34
|
-
|
|
35
|
-
* The chain to use.
|
|
36
|
-
*/
|
|
37
|
-
chain: Chain;
|
|
42
|
+
chain: MorphoWithdrawCollateralRequestChain;
|
|
38
43
|
/**
|
|
39
44
|
* The address of the transaction sender.
|
|
40
45
|
*/
|
|
@@ -94,6 +99,30 @@ export function morphoWithdrawCollateralRequestAmountFromJSON(
|
|
|
94
99
|
);
|
|
95
100
|
}
|
|
96
101
|
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const MorphoWithdrawCollateralRequestChain$inboundSchema:
|
|
104
|
+
z.ZodNativeEnum<typeof MorphoWithdrawCollateralRequestChain> = z.nativeEnum(
|
|
105
|
+
MorphoWithdrawCollateralRequestChain,
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const MorphoWithdrawCollateralRequestChain$outboundSchema:
|
|
110
|
+
z.ZodNativeEnum<typeof MorphoWithdrawCollateralRequestChain> =
|
|
111
|
+
MorphoWithdrawCollateralRequestChain$inboundSchema;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
116
|
+
*/
|
|
117
|
+
export namespace MorphoWithdrawCollateralRequestChain$ {
|
|
118
|
+
/** @deprecated use `MorphoWithdrawCollateralRequestChain$inboundSchema` instead. */
|
|
119
|
+
export const inboundSchema =
|
|
120
|
+
MorphoWithdrawCollateralRequestChain$inboundSchema;
|
|
121
|
+
/** @deprecated use `MorphoWithdrawCollateralRequestChain$outboundSchema` instead. */
|
|
122
|
+
export const outboundSchema =
|
|
123
|
+
MorphoWithdrawCollateralRequestChain$outboundSchema;
|
|
124
|
+
}
|
|
125
|
+
|
|
97
126
|
/** @internal */
|
|
98
127
|
export const MorphoWithdrawCollateralRequest$inboundSchema: z.ZodType<
|
|
99
128
|
MorphoWithdrawCollateralRequest,
|
|
@@ -104,7 +133,7 @@ export const MorphoWithdrawCollateralRequest$inboundSchema: z.ZodType<
|
|
|
104
133
|
unique_market_key: z.string(),
|
|
105
134
|
on_behalf_of: z.nullable(z.string()).optional(),
|
|
106
135
|
receiver: z.nullable(z.string()).optional(),
|
|
107
|
-
chain:
|
|
136
|
+
chain: MorphoWithdrawCollateralRequestChain$inboundSchema,
|
|
108
137
|
sender: z.string(),
|
|
109
138
|
}).transform((v) => {
|
|
110
139
|
return remap$(v, {
|
|
@@ -133,7 +162,7 @@ export const MorphoWithdrawCollateralRequest$outboundSchema: z.ZodType<
|
|
|
133
162
|
uniqueMarketKey: z.string(),
|
|
134
163
|
onBehalfOf: z.nullable(z.string()).optional(),
|
|
135
164
|
receiver: z.nullable(z.string()).optional(),
|
|
136
|
-
chain:
|
|
165
|
+
chain: MorphoWithdrawCollateralRequestChain$outboundSchema,
|
|
137
166
|
sender: z.string(),
|
|
138
167
|
}).transform((v) => {
|
|
139
168
|
return remap$(v, {
|