@compass-labs/api-sdk 2.2.76 → 2.2.77-rc.1
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 +9 -3
- package/codeSamples_typescript.yaml +18 -0
- package/dist/commonjs/funcs/creditCreditLoop.d.ts +31 -0
- package/dist/commonjs/funcs/creditCreditLoop.d.ts.map +1 -0
- package/dist/commonjs/funcs/creditCreditLoop.js +132 -0
- package/dist/commonjs/funcs/creditCreditLoop.js.map +1 -0
- package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts +26 -0
- package/dist/commonjs/funcs/creditCreditLoopedPositions.d.ts.map +1 -0
- package/dist/commonjs/funcs/creditCreditLoopedPositions.js +131 -0
- package/dist/commonjs/funcs/creditCreditLoopedPositions.js.map +1 -0
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.d.ts +24 -0
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.d.ts.map +1 -0
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.js +128 -0
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/aavelooprequest.d.ts +16 -16
- package/dist/commonjs/models/components/aavelooprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/aavelooprequest.js +17 -17
- package/dist/commonjs/models/components/aavelooprequest.js.map +1 -1
- package/dist/commonjs/models/components/accountsummary.d.ts +4 -0
- package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/accountsummary.js.map +1 -1
- package/dist/commonjs/models/components/collateralposition.d.ts +12 -0
- package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/collateralposition.js +4 -0
- package/dist/commonjs/models/components/collateralposition.js.map +1 -1
- package/dist/commonjs/models/components/createaccountrequest.d.ts +1 -0
- package/dist/commonjs/models/components/createaccountrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createaccountrequest.js +1 -0
- package/dist/commonjs/models/components/createaccountrequest.js.map +1 -1
- package/dist/commonjs/models/components/createcreditaccountrequest.d.ts +1 -0
- package/dist/commonjs/models/components/createcreditaccountrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createcreditaccountrequest.js +1 -0
- package/dist/commonjs/models/components/createcreditaccountrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.d.ts +9 -0
- package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.js +2 -0
- package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.d.ts +9 -0
- package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.js +2 -0
- package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +4 -0
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/commonjs/models/components/creditloopedpositionsresponse.d.ts +26 -0
- package/dist/commonjs/models/components/creditloopedpositionsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/creditloopedpositionsresponse.js +60 -0
- package/dist/commonjs/models/components/creditloopedpositionsresponse.js.map +1 -0
- package/dist/commonjs/models/components/creditlooppreview.d.ts +45 -0
- package/dist/commonjs/models/components/creditlooppreview.d.ts.map +1 -0
- package/dist/commonjs/models/components/creditlooppreview.js +68 -0
- package/dist/commonjs/models/components/creditlooppreview.js.map +1 -0
- package/dist/commonjs/models/components/creditlooprequest.d.ts +125 -0
- package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/creditlooprequest.js +98 -0
- package/dist/commonjs/models/components/creditlooprequest.js.map +1 -0
- package/dist/commonjs/models/components/creditloopresponse.d.ts +27 -0
- package/dist/commonjs/models/components/creditloopresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/creditloopresponse.js +61 -0
- package/dist/commonjs/models/components/creditloopresponse.js.map +1 -0
- package/dist/commonjs/models/components/creditprotocol.d.ts +9 -0
- package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.js +5 -0
- package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.d.ts +9 -0
- package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.js +2 -0
- package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.d.ts +9 -0
- package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.js +2 -0
- package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.d.ts +9 -0
- package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.js +2 -0
- package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts +9 -0
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.js +2 -0
- package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/commonjs/models/components/debtposition.d.ts +12 -0
- package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/debtposition.js +4 -0
- package/dist/commonjs/models/components/debtposition.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +12 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +12 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/loopedposition.d.ts +88 -0
- package/dist/commonjs/models/components/loopedposition.d.ts.map +1 -0
- package/dist/commonjs/models/components/loopedposition.js +85 -0
- package/dist/commonjs/models/components/loopedposition.js.map +1 -0
- package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts +58 -0
- package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts.map +1 -0
- package/dist/commonjs/models/components/loopedpositioncurrentstate.js +77 -0
- package/dist/commonjs/models/components/loopedpositioncurrentstate.js.map +1 -0
- package/dist/commonjs/models/components/loopedpositionhistoryentry.d.ts +71 -0
- package/dist/commonjs/models/components/loopedpositionhistoryentry.d.ts.map +1 -0
- package/dist/commonjs/models/components/loopedpositionhistoryentry.js +85 -0
- package/dist/commonjs/models/components/loopedpositionhistoryentry.js.map +1 -0
- package/dist/commonjs/models/components/loopedpositiontotals.d.ts +40 -0
- package/dist/commonjs/models/components/loopedpositiontotals.d.ts.map +1 -0
- package/dist/commonjs/models/components/loopedpositiontotals.js +67 -0
- package/dist/commonjs/models/components/loopedpositiontotals.js.map +1 -0
- package/dist/commonjs/models/components/looplegpreview.d.ts +24 -0
- package/dist/commonjs/models/components/looplegpreview.d.ts.map +1 -0
- package/dist/commonjs/models/components/looplegpreview.js +59 -0
- package/dist/commonjs/models/components/looplegpreview.js.map +1 -0
- package/dist/commonjs/models/components/morpholendingmarket.d.ts +80 -0
- package/dist/commonjs/models/components/morpholendingmarket.d.ts.map +1 -0
- package/dist/commonjs/models/components/morpholendingmarket.js +82 -0
- package/dist/commonjs/models/components/morpholendingmarket.js.map +1 -0
- package/dist/commonjs/models/components/morphomarketsresponse.d.ts +21 -0
- package/dist/commonjs/models/components/morphomarketsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphomarketsresponse.js +52 -0
- package/dist/commonjs/models/components/morphomarketsresponse.js.map +1 -0
- package/dist/commonjs/models/components/swapinfo.d.ts +48 -0
- package/dist/commonjs/models/components/swapinfo.d.ts.map +1 -0
- package/dist/commonjs/models/components/swapinfo.js +66 -0
- package/dist/commonjs/models/components/swapinfo.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/v2creditbalances.d.ts +1 -0
- package/dist/commonjs/models/operations/v2creditbalances.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2creditbalances.js +1 -0
- package/dist/commonjs/models/operations/v2creditbalances.js.map +1 -1
- package/dist/commonjs/models/operations/v2crediteulermarkets.d.ts +1 -0
- package/dist/commonjs/models/operations/v2crediteulermarkets.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2crediteulermarkets.js +1 -0
- package/dist/commonjs/models/operations/v2crediteulermarkets.js.map +1 -1
- package/dist/commonjs/models/operations/v2creditloopedpositions.d.ts +28 -0
- package/dist/commonjs/models/operations/v2creditloopedpositions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/v2creditloopedpositions.js +59 -0
- package/dist/commonjs/models/operations/v2creditloopedpositions.js.map +1 -0
- package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts +23 -0
- package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts.map +1 -0
- package/dist/commonjs/models/operations/v2creditmorphomarkets.js +58 -0
- package/dist/commonjs/models/operations/v2creditmorphomarkets.js.map +1 -0
- package/dist/commonjs/models/operations/v2creditpositions.d.ts +1 -0
- package/dist/commonjs/models/operations/v2creditpositions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2creditpositions.js +1 -0
- package/dist/commonjs/models/operations/v2creditpositions.js.map +1 -1
- package/dist/commonjs/models/operations/v2earnbalances.d.ts +1 -0
- package/dist/commonjs/models/operations/v2earnbalances.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2earnbalances.js +1 -0
- package/dist/commonjs/models/operations/v2earnbalances.js.map +1 -1
- package/dist/commonjs/models/operations/v2earnpositions.d.ts +1 -0
- package/dist/commonjs/models/operations/v2earnpositions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2earnpositions.js +1 -0
- package/dist/commonjs/models/operations/v2earnpositions.js.map +1 -1
- package/dist/commonjs/sdk/credit.d.ts +46 -0
- package/dist/commonjs/sdk/credit.d.ts.map +1 -1
- package/dist/commonjs/sdk/credit.js +55 -0
- package/dist/commonjs/sdk/credit.js.map +1 -1
- package/dist/esm/funcs/creditCreditLoop.d.ts +31 -0
- package/dist/esm/funcs/creditCreditLoop.d.ts.map +1 -0
- package/dist/esm/funcs/creditCreditLoop.js +96 -0
- package/dist/esm/funcs/creditCreditLoop.js.map +1 -0
- package/dist/esm/funcs/creditCreditLoopedPositions.d.ts +26 -0
- package/dist/esm/funcs/creditCreditLoopedPositions.d.ts.map +1 -0
- package/dist/esm/funcs/creditCreditLoopedPositions.js +95 -0
- package/dist/esm/funcs/creditCreditLoopedPositions.js.map +1 -0
- package/dist/esm/funcs/creditCreditMorphoMarkets.d.ts +24 -0
- package/dist/esm/funcs/creditCreditMorphoMarkets.d.ts.map +1 -0
- package/dist/esm/funcs/creditCreditMorphoMarkets.js +92 -0
- package/dist/esm/funcs/creditCreditMorphoMarkets.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/aavelooprequest.d.ts +16 -16
- package/dist/esm/models/components/aavelooprequest.d.ts.map +1 -1
- package/dist/esm/models/components/aavelooprequest.js +12 -12
- package/dist/esm/models/components/aavelooprequest.js.map +1 -1
- package/dist/esm/models/components/accountsummary.d.ts +4 -0
- package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
- package/dist/esm/models/components/accountsummary.js.map +1 -1
- package/dist/esm/models/components/collateralposition.d.ts +12 -0
- package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
- package/dist/esm/models/components/collateralposition.js +4 -0
- package/dist/esm/models/components/collateralposition.js.map +1 -1
- package/dist/esm/models/components/createaccountrequest.d.ts +1 -0
- package/dist/esm/models/components/createaccountrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createaccountrequest.js +1 -0
- package/dist/esm/models/components/createaccountrequest.js.map +1 -1
- package/dist/esm/models/components/createcreditaccountrequest.d.ts +1 -0
- package/dist/esm/models/components/createcreditaccountrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createcreditaccountrequest.js +1 -0
- package/dist/esm/models/components/createcreditaccountrequest.js.map +1 -1
- package/dist/esm/models/components/creditborrowparams.d.ts +9 -0
- package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowparams.js +2 -0
- package/dist/esm/models/components/creditborrowparams.js.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.d.ts +9 -0
- package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.js +2 -0
- package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.d.ts +4 -0
- package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/esm/models/components/creditloopedpositionsresponse.d.ts +26 -0
- package/dist/esm/models/components/creditloopedpositionsresponse.d.ts.map +1 -0
- package/dist/esm/models/components/creditloopedpositionsresponse.js +23 -0
- package/dist/esm/models/components/creditloopedpositionsresponse.js.map +1 -0
- package/dist/esm/models/components/creditlooppreview.d.ts +45 -0
- package/dist/esm/models/components/creditlooppreview.d.ts.map +1 -0
- package/dist/esm/models/components/creditlooppreview.js +31 -0
- package/dist/esm/models/components/creditlooppreview.js.map +1 -0
- package/dist/esm/models/components/creditlooprequest.d.ts +125 -0
- package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -0
- package/dist/esm/models/components/creditlooprequest.js +57 -0
- package/dist/esm/models/components/creditlooprequest.js.map +1 -0
- package/dist/esm/models/components/creditloopresponse.d.ts +27 -0
- package/dist/esm/models/components/creditloopresponse.d.ts.map +1 -0
- package/dist/esm/models/components/creditloopresponse.js +24 -0
- package/dist/esm/models/components/creditloopresponse.js.map +1 -0
- package/dist/esm/models/components/creditprotocol.d.ts +9 -0
- package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/esm/models/components/creditprotocol.js +5 -0
- package/dist/esm/models/components/creditprotocol.js.map +1 -1
- package/dist/esm/models/components/creditrepayparams.d.ts +9 -0
- package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayparams.js +2 -0
- package/dist/esm/models/components/creditrepayparams.js.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.d.ts +9 -0
- package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.js +2 -0
- package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.d.ts +9 -0
- package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.js +2 -0
- package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts +9 -0
- package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.js +2 -0
- package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/esm/models/components/debtposition.d.ts +12 -0
- package/dist/esm/models/components/debtposition.d.ts.map +1 -1
- package/dist/esm/models/components/debtposition.js +4 -0
- package/dist/esm/models/components/debtposition.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +12 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +12 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/loopedposition.d.ts +88 -0
- package/dist/esm/models/components/loopedposition.d.ts.map +1 -0
- package/dist/esm/models/components/loopedposition.js +48 -0
- package/dist/esm/models/components/loopedposition.js.map +1 -0
- package/dist/esm/models/components/loopedpositioncurrentstate.d.ts +58 -0
- package/dist/esm/models/components/loopedpositioncurrentstate.d.ts.map +1 -0
- package/dist/esm/models/components/loopedpositioncurrentstate.js +40 -0
- package/dist/esm/models/components/loopedpositioncurrentstate.js.map +1 -0
- package/dist/esm/models/components/loopedpositionhistoryentry.d.ts +71 -0
- package/dist/esm/models/components/loopedpositionhistoryentry.d.ts.map +1 -0
- package/dist/esm/models/components/loopedpositionhistoryentry.js +48 -0
- package/dist/esm/models/components/loopedpositionhistoryentry.js.map +1 -0
- package/dist/esm/models/components/loopedpositiontotals.d.ts +40 -0
- package/dist/esm/models/components/loopedpositiontotals.d.ts.map +1 -0
- package/dist/esm/models/components/loopedpositiontotals.js +30 -0
- package/dist/esm/models/components/loopedpositiontotals.js.map +1 -0
- package/dist/esm/models/components/looplegpreview.d.ts +24 -0
- package/dist/esm/models/components/looplegpreview.d.ts.map +1 -0
- package/dist/esm/models/components/looplegpreview.js +22 -0
- package/dist/esm/models/components/looplegpreview.js.map +1 -0
- package/dist/esm/models/components/morpholendingmarket.d.ts +80 -0
- package/dist/esm/models/components/morpholendingmarket.d.ts.map +1 -0
- package/dist/esm/models/components/morpholendingmarket.js +45 -0
- package/dist/esm/models/components/morpholendingmarket.js.map +1 -0
- package/dist/esm/models/components/morphomarketsresponse.d.ts +21 -0
- package/dist/esm/models/components/morphomarketsresponse.d.ts.map +1 -0
- package/dist/esm/models/components/morphomarketsresponse.js +15 -0
- package/dist/esm/models/components/morphomarketsresponse.js.map +1 -0
- package/dist/esm/models/components/swapinfo.d.ts +48 -0
- package/dist/esm/models/components/swapinfo.d.ts.map +1 -0
- package/dist/esm/models/components/swapinfo.js +29 -0
- package/dist/esm/models/components/swapinfo.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/v2creditbalances.d.ts +1 -0
- package/dist/esm/models/operations/v2creditbalances.d.ts.map +1 -1
- package/dist/esm/models/operations/v2creditbalances.js +1 -0
- package/dist/esm/models/operations/v2creditbalances.js.map +1 -1
- package/dist/esm/models/operations/v2crediteulermarkets.d.ts +1 -0
- package/dist/esm/models/operations/v2crediteulermarkets.d.ts.map +1 -1
- package/dist/esm/models/operations/v2crediteulermarkets.js +1 -0
- package/dist/esm/models/operations/v2crediteulermarkets.js.map +1 -1
- package/dist/esm/models/operations/v2creditloopedpositions.d.ts +28 -0
- package/dist/esm/models/operations/v2creditloopedpositions.d.ts.map +1 -0
- package/dist/esm/models/operations/v2creditloopedpositions.js +22 -0
- package/dist/esm/models/operations/v2creditloopedpositions.js.map +1 -0
- package/dist/esm/models/operations/v2creditmorphomarkets.d.ts +23 -0
- package/dist/esm/models/operations/v2creditmorphomarkets.d.ts.map +1 -0
- package/dist/esm/models/operations/v2creditmorphomarkets.js +21 -0
- package/dist/esm/models/operations/v2creditmorphomarkets.js.map +1 -0
- package/dist/esm/models/operations/v2creditpositions.d.ts +1 -0
- package/dist/esm/models/operations/v2creditpositions.d.ts.map +1 -1
- package/dist/esm/models/operations/v2creditpositions.js +1 -0
- package/dist/esm/models/operations/v2creditpositions.js.map +1 -1
- package/dist/esm/models/operations/v2earnbalances.d.ts +1 -0
- package/dist/esm/models/operations/v2earnbalances.d.ts.map +1 -1
- package/dist/esm/models/operations/v2earnbalances.js +1 -0
- package/dist/esm/models/operations/v2earnbalances.js.map +1 -1
- package/dist/esm/models/operations/v2earnpositions.d.ts +1 -0
- package/dist/esm/models/operations/v2earnpositions.d.ts.map +1 -1
- package/dist/esm/models/operations/v2earnpositions.js +1 -0
- package/dist/esm/models/operations/v2earnpositions.js.map +1 -1
- package/dist/esm/sdk/credit.d.ts +46 -0
- package/dist/esm/sdk/credit.d.ts.map +1 -1
- package/dist/esm/sdk/credit.js +55 -0
- package/dist/esm/sdk/credit.js.map +1 -1
- package/docs/models/components/aavelooprequest.md +4 -4
- package/docs/models/components/{initialcollateralamount.md → aavelooprequestinitialcollateralamount.md} +1 -1
- package/docs/models/components/{loantovalue.md → aavelooprequestloantovalue.md} +1 -1
- package/docs/models/components/{maxslippagepercent.md → aavelooprequestmaxslippagepercent.md} +1 -1
- package/docs/models/components/{multiplier.md → aavelooprequestmultiplier.md} +1 -1
- package/docs/models/components/accountsummary.md +10 -10
- package/docs/models/components/classification.md +17 -0
- package/docs/models/components/collateralposition.md +16 -14
- package/docs/models/components/createaccountrequestchain.md +1 -1
- package/docs/models/components/createcreditaccountrequestchain.md +1 -1
- package/docs/models/components/creditborrowparams.md +10 -9
- package/docs/models/components/creditborrowrequest.md +20 -19
- package/docs/models/components/creditenablecollateralparams.md +6 -6
- package/docs/models/components/creditloopedpositionsresponse.md +30 -0
- package/docs/models/components/creditlooppreview.md +33 -0
- package/docs/models/components/creditlooprequest.md +41 -0
- package/docs/models/components/creditlooprequestinitialcollateralamount.md +19 -0
- package/docs/models/components/creditlooprequestloantovalue.md +19 -0
- package/docs/models/components/creditlooprequestmaxslippagepercent.md +19 -0
- package/docs/models/components/creditlooprequestmultiplier.md +19 -0
- package/docs/models/components/creditloopresponse.md +30 -0
- package/docs/models/components/creditprotocol.md +5 -1
- package/docs/models/components/creditrepayparams.md +9 -8
- package/docs/models/components/creditrepayrequest.md +19 -18
- package/docs/models/components/creditsupplyparams.md +8 -7
- package/docs/models/components/creditwithdrawparams.md +8 -7
- package/docs/models/components/debtposition.md +15 -13
- package/docs/models/components/healthfactorscope.md +17 -0
- package/docs/models/components/loopedposition.md +46 -0
- package/docs/models/components/loopedpositioncurrentstate.md +28 -0
- package/docs/models/components/loopedpositionhistoryentry.md +33 -0
- package/docs/models/components/loopedpositionstatus.md +17 -0
- package/docs/models/components/loopedpositiontotals.md +31 -0
- package/docs/models/components/looplegpreview.md +21 -0
- package/docs/models/components/morpholendingmarket.md +49 -0
- package/docs/models/components/morphomarketsresponse.md +21 -0
- package/docs/models/components/swapinfo.md +36 -0
- package/docs/models/operations/v2creditbalanceschain.md +1 -1
- package/docs/models/operations/v2crediteulermarketschain.md +1 -1
- package/docs/models/operations/v2creditloopedpositionschain.md +15 -0
- package/docs/models/operations/v2creditloopedpositionsrequest.md +19 -0
- package/docs/models/operations/v2creditmorphomarketschain.md +15 -0
- package/docs/models/operations/v2creditmorphomarketsrequest.md +17 -0
- package/docs/models/operations/v2creditpositionschain.md +1 -1
- package/docs/models/operations/v2earnbalanceschain.md +1 -1
- package/docs/models/operations/v2earnpositionschain.md +1 -1
- package/docs/sdks/credit/README.md +270 -0
- package/openapi_prepped_for_speakeasy.json +1331 -157
- package/package.json +1 -1
- package/src/funcs/creditCreditLoop.ts +184 -0
- package/src/funcs/creditCreditLoopedPositions.ts +185 -0
- package/src/funcs/creditCreditMorphoMarkets.ts +182 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/aavelooprequest.ts +43 -30
- package/src/models/components/accountsummary.ts +4 -0
- package/src/models/components/collateralposition.ts +16 -0
- package/src/models/components/createaccountrequest.ts +1 -0
- package/src/models/components/createcreditaccountrequest.ts +1 -0
- package/src/models/components/creditborrowparams.ts +11 -0
- package/src/models/components/creditborrowrequest.ts +11 -0
- package/src/models/components/creditenablecollateralparams.ts +4 -0
- package/src/models/components/creditloopedpositionsresponse.ts +61 -0
- package/src/models/components/creditlooppreview.ts +86 -0
- package/src/models/components/creditlooprequest.ts +235 -0
- package/src/models/components/creditloopresponse.ts +65 -0
- package/src/models/components/creditprotocol.ts +9 -0
- package/src/models/components/creditrepayparams.ts +11 -0
- package/src/models/components/creditrepayrequest.ts +11 -0
- package/src/models/components/creditsupplyparams.ts +11 -0
- package/src/models/components/creditwithdrawparams.ts +11 -0
- package/src/models/components/debtposition.ts +16 -0
- package/src/models/components/index.ts +12 -0
- package/src/models/components/loopedposition.ts +149 -0
- package/src/models/components/loopedpositioncurrentstate.ts +101 -0
- package/src/models/components/loopedpositionhistoryentry.ts +115 -0
- package/src/models/components/loopedpositiontotals.ts +78 -0
- package/src/models/components/looplegpreview.ts +54 -0
- package/src/models/components/morpholendingmarket.ts +133 -0
- package/src/models/components/morphomarketsresponse.ts +46 -0
- package/src/models/components/swapinfo.ts +85 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/v2creditbalances.ts +1 -0
- package/src/models/operations/v2crediteulermarkets.ts +1 -0
- package/src/models/operations/v2creditloopedpositions.ts +56 -0
- package/src/models/operations/v2creditmorphomarkets.ts +50 -0
- package/src/models/operations/v2creditpositions.ts +1 -0
- package/src/models/operations/v2earnbalances.ts +1 -0
- package/src/models/operations/v2earnpositions.ts +1 -0
- package/src/sdk/credit.ts +79 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { Chain, Chain$outboundSchema } from "./chain.js";
|
|
8
|
+
import {
|
|
9
|
+
CreditProtocol,
|
|
10
|
+
CreditProtocol$outboundSchema,
|
|
11
|
+
} from "./creditprotocol.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Collateral (in token units) already held in the Credit Account to seed the loop.
|
|
15
|
+
*/
|
|
16
|
+
export type CreditLoopRequestInitialCollateralAmount = number | string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Target leverage: total collateral exposure = multiplier × initial_collateral_amount. Must be achievable at the requested loan_to_value (max ≈ 0.9 / (1 − LTV)).
|
|
20
|
+
*/
|
|
21
|
+
export type CreditLoopRequestMultiplier = number | string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary.
|
|
25
|
+
*/
|
|
26
|
+
export type CreditLoopRequestLoanToValue = number | string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Per-swap slippage tolerance in percent. Loop dust is bounded by this per iteration, so tighter slippage means less dust.
|
|
30
|
+
*/
|
|
31
|
+
export type CreditLoopRequestMaxSlippagePercent = number | string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Open a leveraged loop: repeatedly supply collateral, borrow, and swap the
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* borrow back to collateral — all in ONE atomic transaction from the Credit
|
|
38
|
+
* Account.
|
|
39
|
+
*/
|
|
40
|
+
export type CreditLoopRequest = {
|
|
41
|
+
/**
|
|
42
|
+
* The address that owns the Credit Account.
|
|
43
|
+
*/
|
|
44
|
+
owner: string;
|
|
45
|
+
/**
|
|
46
|
+
* The chain to use.
|
|
47
|
+
*/
|
|
48
|
+
chain: Chain;
|
|
49
|
+
/**
|
|
50
|
+
* Which lending protocol a credit action targets.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
*
|
|
54
|
+
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
55
|
+
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
56
|
+
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
57
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
58
|
+
* currently read-only: positions and market discovery only — transaction
|
|
59
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
60
|
+
* endpoints reject it with a 422.
|
|
61
|
+
*/
|
|
62
|
+
protocol?: CreditProtocol | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
|
|
65
|
+
*/
|
|
66
|
+
marketId?: string | null | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Token supplied as collateral each iteration. Must already be in the Credit Account for the initial amount. For MORPHO it must be the market's collateral token.
|
|
69
|
+
*/
|
|
70
|
+
collateralToken: string;
|
|
71
|
+
/**
|
|
72
|
+
* Token borrowed each iteration and swapped back to the collateral token. For MORPHO it must be the market's loan token.
|
|
73
|
+
*/
|
|
74
|
+
borrowToken: string;
|
|
75
|
+
/**
|
|
76
|
+
* Collateral (in token units) already held in the Credit Account to seed the loop.
|
|
77
|
+
*/
|
|
78
|
+
initialCollateralAmount: number | string;
|
|
79
|
+
/**
|
|
80
|
+
* Target leverage: total collateral exposure = multiplier × initial_collateral_amount. Must be achievable at the requested loan_to_value (max ≈ 0.9 / (1 − LTV)).
|
|
81
|
+
*/
|
|
82
|
+
multiplier: number | string;
|
|
83
|
+
/**
|
|
84
|
+
* Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary.
|
|
85
|
+
*/
|
|
86
|
+
loanToValue: number | string;
|
|
87
|
+
/**
|
|
88
|
+
* Per-swap slippage tolerance in percent. Loop dust is bounded by this per iteration, so tighter slippage means less dust.
|
|
89
|
+
*/
|
|
90
|
+
maxSlippagePercent?: number | string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated).
|
|
93
|
+
*/
|
|
94
|
+
emodeCategory?: number | null | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction.
|
|
97
|
+
*/
|
|
98
|
+
gasSponsorship?: boolean | undefined;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export type CreditLoopRequestInitialCollateralAmount$Outbound = number | string;
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const CreditLoopRequestInitialCollateralAmount$outboundSchema: z.ZodType<
|
|
106
|
+
CreditLoopRequestInitialCollateralAmount$Outbound,
|
|
107
|
+
z.ZodTypeDef,
|
|
108
|
+
CreditLoopRequestInitialCollateralAmount
|
|
109
|
+
> = z.union([z.number(), z.string()]);
|
|
110
|
+
|
|
111
|
+
export function creditLoopRequestInitialCollateralAmountToJSON(
|
|
112
|
+
creditLoopRequestInitialCollateralAmount:
|
|
113
|
+
CreditLoopRequestInitialCollateralAmount,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
CreditLoopRequestInitialCollateralAmount$outboundSchema.parse(
|
|
117
|
+
creditLoopRequestInitialCollateralAmount,
|
|
118
|
+
),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export type CreditLoopRequestMultiplier$Outbound = number | string;
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const CreditLoopRequestMultiplier$outboundSchema: z.ZodType<
|
|
127
|
+
CreditLoopRequestMultiplier$Outbound,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
CreditLoopRequestMultiplier
|
|
130
|
+
> = z.union([z.number(), z.string()]);
|
|
131
|
+
|
|
132
|
+
export function creditLoopRequestMultiplierToJSON(
|
|
133
|
+
creditLoopRequestMultiplier: CreditLoopRequestMultiplier,
|
|
134
|
+
): string {
|
|
135
|
+
return JSON.stringify(
|
|
136
|
+
CreditLoopRequestMultiplier$outboundSchema.parse(
|
|
137
|
+
creditLoopRequestMultiplier,
|
|
138
|
+
),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
export type CreditLoopRequestLoanToValue$Outbound = number | string;
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const CreditLoopRequestLoanToValue$outboundSchema: z.ZodType<
|
|
147
|
+
CreditLoopRequestLoanToValue$Outbound,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
CreditLoopRequestLoanToValue
|
|
150
|
+
> = z.union([z.number(), z.string()]);
|
|
151
|
+
|
|
152
|
+
export function creditLoopRequestLoanToValueToJSON(
|
|
153
|
+
creditLoopRequestLoanToValue: CreditLoopRequestLoanToValue,
|
|
154
|
+
): string {
|
|
155
|
+
return JSON.stringify(
|
|
156
|
+
CreditLoopRequestLoanToValue$outboundSchema.parse(
|
|
157
|
+
creditLoopRequestLoanToValue,
|
|
158
|
+
),
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export type CreditLoopRequestMaxSlippagePercent$Outbound = number | string;
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
export const CreditLoopRequestMaxSlippagePercent$outboundSchema: z.ZodType<
|
|
167
|
+
CreditLoopRequestMaxSlippagePercent$Outbound,
|
|
168
|
+
z.ZodTypeDef,
|
|
169
|
+
CreditLoopRequestMaxSlippagePercent
|
|
170
|
+
> = z.union([z.number(), z.string()]);
|
|
171
|
+
|
|
172
|
+
export function creditLoopRequestMaxSlippagePercentToJSON(
|
|
173
|
+
creditLoopRequestMaxSlippagePercent: CreditLoopRequestMaxSlippagePercent,
|
|
174
|
+
): string {
|
|
175
|
+
return JSON.stringify(
|
|
176
|
+
CreditLoopRequestMaxSlippagePercent$outboundSchema.parse(
|
|
177
|
+
creditLoopRequestMaxSlippagePercent,
|
|
178
|
+
),
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** @internal */
|
|
183
|
+
export type CreditLoopRequest$Outbound = {
|
|
184
|
+
owner: string;
|
|
185
|
+
chain: string;
|
|
186
|
+
protocol?: string | undefined;
|
|
187
|
+
market_id?: string | null | undefined;
|
|
188
|
+
collateral_token: string;
|
|
189
|
+
borrow_token: string;
|
|
190
|
+
initial_collateral_amount: number | string;
|
|
191
|
+
multiplier: number | string;
|
|
192
|
+
loan_to_value: number | string;
|
|
193
|
+
max_slippage_percent?: number | string | undefined;
|
|
194
|
+
emode_category?: number | null | undefined;
|
|
195
|
+
gas_sponsorship?: boolean | undefined;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/** @internal */
|
|
199
|
+
export const CreditLoopRequest$outboundSchema: z.ZodType<
|
|
200
|
+
CreditLoopRequest$Outbound,
|
|
201
|
+
z.ZodTypeDef,
|
|
202
|
+
CreditLoopRequest
|
|
203
|
+
> = z.object({
|
|
204
|
+
owner: z.string(),
|
|
205
|
+
chain: Chain$outboundSchema,
|
|
206
|
+
protocol: CreditProtocol$outboundSchema.optional(),
|
|
207
|
+
marketId: z.nullable(z.string()).optional(),
|
|
208
|
+
collateralToken: z.string(),
|
|
209
|
+
borrowToken: z.string(),
|
|
210
|
+
initialCollateralAmount: z.union([z.number(), z.string()]),
|
|
211
|
+
multiplier: z.union([z.number(), z.string()]),
|
|
212
|
+
loanToValue: z.union([z.number(), z.string()]),
|
|
213
|
+
maxSlippagePercent: z.union([z.number(), z.string()]).optional(),
|
|
214
|
+
emodeCategory: z.nullable(z.number().int()).optional(),
|
|
215
|
+
gasSponsorship: z.boolean().optional(),
|
|
216
|
+
}).transform((v) => {
|
|
217
|
+
return remap$(v, {
|
|
218
|
+
marketId: "market_id",
|
|
219
|
+
collateralToken: "collateral_token",
|
|
220
|
+
borrowToken: "borrow_token",
|
|
221
|
+
initialCollateralAmount: "initial_collateral_amount",
|
|
222
|
+
loanToValue: "loan_to_value",
|
|
223
|
+
maxSlippagePercent: "max_slippage_percent",
|
|
224
|
+
emodeCategory: "emode_category",
|
|
225
|
+
gasSponsorship: "gas_sponsorship",
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
export function creditLoopRequestToJSON(
|
|
230
|
+
creditLoopRequest: CreditLoopRequest,
|
|
231
|
+
): string {
|
|
232
|
+
return JSON.stringify(
|
|
233
|
+
CreditLoopRequest$outboundSchema.parse(creditLoopRequest),
|
|
234
|
+
);
|
|
235
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
BatchedSafeOperationsResponseOutput,
|
|
12
|
+
BatchedSafeOperationsResponseOutput$inboundSchema,
|
|
13
|
+
} from "./batchedsafeoperationsresponseoutput.js";
|
|
14
|
+
import {
|
|
15
|
+
CreditLoopPreview,
|
|
16
|
+
CreditLoopPreview$inboundSchema,
|
|
17
|
+
} from "./creditlooppreview.js";
|
|
18
|
+
import {
|
|
19
|
+
UnsignedTransaction,
|
|
20
|
+
UnsignedTransaction$inboundSchema,
|
|
21
|
+
} from "./unsignedtransaction.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The atomic loop transaction plus its guaranteed-floor preview.
|
|
25
|
+
*/
|
|
26
|
+
export type CreditLoopResponse = {
|
|
27
|
+
/**
|
|
28
|
+
* Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false.
|
|
29
|
+
*/
|
|
30
|
+
transaction?: UnsignedTransaction | null | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true.
|
|
33
|
+
*/
|
|
34
|
+
eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Projected end state of the loop, computed on GUARANTEED swap floors.
|
|
37
|
+
*/
|
|
38
|
+
preview: CreditLoopPreview;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const CreditLoopResponse$inboundSchema: z.ZodType<
|
|
43
|
+
CreditLoopResponse,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
unknown
|
|
46
|
+
> = z.object({
|
|
47
|
+
transaction: z.nullable(UnsignedTransaction$inboundSchema).optional(),
|
|
48
|
+
eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
49
|
+
.optional(),
|
|
50
|
+
preview: CreditLoopPreview$inboundSchema,
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
"eip_712": "eip712",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export function creditLoopResponseFromJSON(
|
|
58
|
+
jsonString: string,
|
|
59
|
+
): SafeParseResult<CreditLoopResponse, SDKValidationError> {
|
|
60
|
+
return safeParse(
|
|
61
|
+
jsonString,
|
|
62
|
+
(x) => CreditLoopResponse$inboundSchema.parse(JSON.parse(x)),
|
|
63
|
+
`Failed to parse 'CreditLoopResponse' from JSON`,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -13,10 +13,15 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
13
13
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
14
14
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
15
15
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
16
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
17
|
+
* currently read-only: positions and market discovery only — transaction
|
|
18
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
19
|
+
* endpoints reject it with a 422.
|
|
16
20
|
*/
|
|
17
21
|
export const CreditProtocol = {
|
|
18
22
|
Aave: "AAVE",
|
|
19
23
|
Euler: "EULER",
|
|
24
|
+
Morpho: "MORPHO",
|
|
20
25
|
} as const;
|
|
21
26
|
/**
|
|
22
27
|
* Which lending protocol a credit action targets.
|
|
@@ -26,6 +31,10 @@ export const CreditProtocol = {
|
|
|
26
31
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
27
32
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
28
33
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
34
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
35
|
+
* currently read-only: positions and market discovery only — transaction
|
|
36
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
37
|
+
* endpoints reject it with a 422.
|
|
29
38
|
*/
|
|
30
39
|
export type CreditProtocol = ClosedEnum<typeof CreditProtocol>;
|
|
31
40
|
|
|
@@ -47,12 +47,20 @@ export type CreditRepayParams = {
|
|
|
47
47
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
48
48
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
49
49
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
50
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
51
|
+
* currently read-only: positions and market discovery only — transaction
|
|
52
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
53
|
+
* endpoints reject it with a 422.
|
|
50
54
|
*/
|
|
51
55
|
protocol?: CreditProtocol | undefined;
|
|
52
56
|
/**
|
|
53
57
|
* Euler only: the EVK vault the debt is owed to. Required when protocol=EULER.
|
|
54
58
|
*/
|
|
55
59
|
borrowVault?: string | null | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
|
|
62
|
+
*/
|
|
63
|
+
marketId?: string | null | undefined;
|
|
56
64
|
};
|
|
57
65
|
|
|
58
66
|
/** @internal */
|
|
@@ -81,6 +89,7 @@ export type CreditRepayParams$Outbound = {
|
|
|
81
89
|
interest_rate_mode?: string | undefined;
|
|
82
90
|
protocol?: string | undefined;
|
|
83
91
|
borrow_vault?: string | null | undefined;
|
|
92
|
+
market_id?: string | null | undefined;
|
|
84
93
|
};
|
|
85
94
|
|
|
86
95
|
/** @internal */
|
|
@@ -95,11 +104,13 @@ export const CreditRepayParams$outboundSchema: z.ZodType<
|
|
|
95
104
|
interestRateMode: InterestRateMode$outboundSchema.optional(),
|
|
96
105
|
protocol: CreditProtocol$outboundSchema.optional(),
|
|
97
106
|
borrowVault: z.nullable(z.string()).optional(),
|
|
107
|
+
marketId: z.nullable(z.string()).optional(),
|
|
98
108
|
}).transform((v) => {
|
|
99
109
|
return remap$(v, {
|
|
100
110
|
actionType: "action_type",
|
|
101
111
|
interestRateMode: "interest_rate_mode",
|
|
102
112
|
borrowVault: "borrow_vault",
|
|
113
|
+
marketId: "market_id",
|
|
103
114
|
});
|
|
104
115
|
});
|
|
105
116
|
|
|
@@ -46,12 +46,20 @@ export type CreditRepayRequest = {
|
|
|
46
46
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
47
47
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
48
48
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
49
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
50
|
+
* currently read-only: positions and market discovery only — transaction
|
|
51
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
52
|
+
* endpoints reject it with a 422.
|
|
49
53
|
*/
|
|
50
54
|
protocol?: CreditProtocol | undefined;
|
|
51
55
|
/**
|
|
52
56
|
* Euler only: the EVK vault the debt is owed to (repay target). Required when protocol=EULER.
|
|
53
57
|
*/
|
|
54
58
|
borrowVault?: string | null | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
|
|
61
|
+
*/
|
|
62
|
+
marketId?: string | null | undefined;
|
|
55
63
|
/**
|
|
56
64
|
* Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER and withdrawing collateral.
|
|
57
65
|
*/
|
|
@@ -158,6 +166,7 @@ export type CreditRepayRequest$Outbound = {
|
|
|
158
166
|
chain: string;
|
|
159
167
|
protocol?: string | undefined;
|
|
160
168
|
borrow_vault?: string | null | undefined;
|
|
169
|
+
market_id?: string | null | undefined;
|
|
161
170
|
collateral_vault?: string | null | undefined;
|
|
162
171
|
repay_token: string;
|
|
163
172
|
repay_amount: number | string;
|
|
@@ -182,6 +191,7 @@ export const CreditRepayRequest$outboundSchema: z.ZodType<
|
|
|
182
191
|
chain: Chain$outboundSchema,
|
|
183
192
|
protocol: CreditProtocol$outboundSchema.optional(),
|
|
184
193
|
borrowVault: z.nullable(z.string()).optional(),
|
|
194
|
+
marketId: z.nullable(z.string()).optional(),
|
|
185
195
|
collateralVault: z.nullable(z.string()).optional(),
|
|
186
196
|
repayToken: z.string(),
|
|
187
197
|
repayAmount: z.union([z.number(), z.string()]),
|
|
@@ -197,6 +207,7 @@ export const CreditRepayRequest$outboundSchema: z.ZodType<
|
|
|
197
207
|
}).transform((v) => {
|
|
198
208
|
return remap$(v, {
|
|
199
209
|
borrowVault: "borrow_vault",
|
|
210
|
+
marketId: "market_id",
|
|
200
211
|
collateralVault: "collateral_vault",
|
|
201
212
|
repayToken: "repay_token",
|
|
202
213
|
repayAmount: "repay_amount",
|
|
@@ -35,12 +35,20 @@ export type CreditSupplyParams = {
|
|
|
35
35
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
36
36
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
37
37
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
38
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
39
|
+
* currently read-only: positions and market discovery only — transaction
|
|
40
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
41
|
+
* endpoints reject it with a 422.
|
|
38
42
|
*/
|
|
39
43
|
protocol?: CreditProtocol | undefined;
|
|
40
44
|
/**
|
|
41
45
|
* Euler only: the EVK collateral vault to supply into. Required when protocol=EULER.
|
|
42
46
|
*/
|
|
43
47
|
collateralVault?: string | null | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
|
|
50
|
+
*/
|
|
51
|
+
marketId?: string | null | undefined;
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
/** @internal */
|
|
@@ -68,6 +76,7 @@ export type CreditSupplyParams$Outbound = {
|
|
|
68
76
|
amount: number | string;
|
|
69
77
|
protocol?: string | undefined;
|
|
70
78
|
collateral_vault?: string | null | undefined;
|
|
79
|
+
market_id?: string | null | undefined;
|
|
71
80
|
};
|
|
72
81
|
|
|
73
82
|
/** @internal */
|
|
@@ -81,10 +90,12 @@ export const CreditSupplyParams$outboundSchema: z.ZodType<
|
|
|
81
90
|
amount: z.union([z.number(), z.string()]),
|
|
82
91
|
protocol: CreditProtocol$outboundSchema.optional(),
|
|
83
92
|
collateralVault: z.nullable(z.string()).optional(),
|
|
93
|
+
marketId: z.nullable(z.string()).optional(),
|
|
84
94
|
}).transform((v) => {
|
|
85
95
|
return remap$(v, {
|
|
86
96
|
actionType: "action_type",
|
|
87
97
|
collateralVault: "collateral_vault",
|
|
98
|
+
marketId: "market_id",
|
|
88
99
|
});
|
|
89
100
|
});
|
|
90
101
|
|
|
@@ -35,12 +35,20 @@ export type CreditWithdrawParams = {
|
|
|
35
35
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
36
36
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
37
37
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
38
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
39
|
+
* currently read-only: positions and market discovery only — transaction
|
|
40
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
41
|
+
* endpoints reject it with a 422.
|
|
38
42
|
*/
|
|
39
43
|
protocol?: CreditProtocol | undefined;
|
|
40
44
|
/**
|
|
41
45
|
* Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER.
|
|
42
46
|
*/
|
|
43
47
|
collateralVault?: string | null | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
|
|
50
|
+
*/
|
|
51
|
+
marketId?: string | null | undefined;
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
/** @internal */
|
|
@@ -68,6 +76,7 @@ export type CreditWithdrawParams$Outbound = {
|
|
|
68
76
|
amount: number | string;
|
|
69
77
|
protocol?: string | undefined;
|
|
70
78
|
collateral_vault?: string | null | undefined;
|
|
79
|
+
market_id?: string | null | undefined;
|
|
71
80
|
};
|
|
72
81
|
|
|
73
82
|
/** @internal */
|
|
@@ -81,10 +90,12 @@ export const CreditWithdrawParams$outboundSchema: z.ZodType<
|
|
|
81
90
|
amount: z.union([z.number(), z.string()]),
|
|
82
91
|
protocol: CreditProtocol$outboundSchema.optional(),
|
|
83
92
|
collateralVault: z.nullable(z.string()).optional(),
|
|
93
|
+
marketId: z.nullable(z.string()).optional(),
|
|
84
94
|
}).transform((v) => {
|
|
85
95
|
return remap$(v, {
|
|
86
96
|
actionType: "action_type",
|
|
87
97
|
collateralVault: "collateral_vault",
|
|
98
|
+
marketId: "market_id",
|
|
88
99
|
});
|
|
89
100
|
});
|
|
90
101
|
|
|
@@ -33,12 +33,24 @@ export type DebtPosition = {
|
|
|
33
33
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
34
34
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
35
35
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
36
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
37
|
+
* currently read-only: positions and market discovery only — transaction
|
|
38
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
39
|
+
* endpoints reject it with a 422.
|
|
36
40
|
*/
|
|
37
41
|
protocol?: CreditProtocol | undefined;
|
|
38
42
|
/**
|
|
39
43
|
* Euler only: the EVK borrow vault this debt is owed to.
|
|
40
44
|
*/
|
|
41
45
|
vault?: string | null | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Morpho only: the bytes32 id of the isolated market this debt is owed to.
|
|
48
|
+
*/
|
|
49
|
+
marketId?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Morpho only: this market's health factor (markets are isolated, so health is per market — below 1 the position is liquidatable). Null for other protocols and when the oracle read fails.
|
|
52
|
+
*/
|
|
53
|
+
healthFactor?: string | null | undefined;
|
|
42
54
|
/**
|
|
43
55
|
* Current on-chain debt balance (the vault's underlying asset for Euler).
|
|
44
56
|
*/
|
|
@@ -79,6 +91,8 @@ export const DebtPosition$inboundSchema: z.ZodType<
|
|
|
79
91
|
symbol: z.string(),
|
|
80
92
|
protocol: CreditProtocol$inboundSchema.optional(),
|
|
81
93
|
vault: z.nullable(z.string()).optional(),
|
|
94
|
+
market_id: z.nullable(z.string()).optional(),
|
|
95
|
+
health_factor: z.nullable(z.string()).optional(),
|
|
82
96
|
amount_borrowed: z.nullable(z.string()),
|
|
83
97
|
usd_value: z.nullable(z.string()).optional(),
|
|
84
98
|
borrow_apy: z.nullable(z.string()).optional(),
|
|
@@ -88,6 +102,8 @@ export const DebtPosition$inboundSchema: z.ZodType<
|
|
|
88
102
|
events: z.array(CreditEvent$inboundSchema).optional(),
|
|
89
103
|
}).transform((v) => {
|
|
90
104
|
return remap$(v, {
|
|
105
|
+
"market_id": "marketId",
|
|
106
|
+
"health_factor": "healthFactor",
|
|
91
107
|
"amount_borrowed": "amountBorrowed",
|
|
92
108
|
"usd_value": "usdValue",
|
|
93
109
|
"borrow_apy": "borrowApy",
|
|
@@ -102,6 +102,10 @@ export * from "./creditbundleresponse.js";
|
|
|
102
102
|
export * from "./creditenablecollateralparams.js";
|
|
103
103
|
export * from "./creditevent.js";
|
|
104
104
|
export * from "./creditfee.js";
|
|
105
|
+
export * from "./creditloopedpositionsresponse.js";
|
|
106
|
+
export * from "./creditlooppreview.js";
|
|
107
|
+
export * from "./creditlooprequest.js";
|
|
108
|
+
export * from "./creditloopresponse.js";
|
|
105
109
|
export * from "./creditpositionsresponse.js";
|
|
106
110
|
export * from "./creditprotocol.js";
|
|
107
111
|
export * from "./creditrepayparams.js";
|
|
@@ -182,6 +186,11 @@ export * from "./globalmarketsperpswithdrawrequest.js";
|
|
|
182
186
|
export * from "./interestratemode.js";
|
|
183
187
|
export * from "./liquidationcall.js";
|
|
184
188
|
export * from "./listaavemarketsresponse.js";
|
|
189
|
+
export * from "./loopedposition.js";
|
|
190
|
+
export * from "./loopedpositioncurrentstate.js";
|
|
191
|
+
export * from "./loopedpositionhistoryentry.js";
|
|
192
|
+
export * from "./loopedpositiontotals.js";
|
|
193
|
+
export * from "./looplegpreview.js";
|
|
185
194
|
export * from "./lpbalance.js";
|
|
186
195
|
export * from "./marketallocation.js";
|
|
187
196
|
export * from "./marketdetail.js";
|
|
@@ -201,7 +210,9 @@ export * from "./morphodepositrequest.js";
|
|
|
201
210
|
export * from "./morphogetmarketresponse.js";
|
|
202
211
|
export * from "./morphogetmarketsresponse.js";
|
|
203
212
|
export * from "./morphogetvaultsresponse.js";
|
|
213
|
+
export * from "./morpholendingmarket.js";
|
|
204
214
|
export * from "./morphomarket.js";
|
|
215
|
+
export * from "./morphomarketsresponse.js";
|
|
205
216
|
export * from "./morphorepayparams.js";
|
|
206
217
|
export * from "./morphorepayrequest.js";
|
|
207
218
|
export * from "./morphosupplycollateralparams.js";
|
|
@@ -293,6 +304,7 @@ export * from "./sponsorgasresponse.js";
|
|
|
293
304
|
export * from "./supply.js";
|
|
294
305
|
export * from "./supportedchaininfo.js";
|
|
295
306
|
export * from "./swapborrowrate.js";
|
|
307
|
+
export * from "./swapinfo.js";
|
|
296
308
|
export * from "./syposition.js";
|
|
297
309
|
export * from "./tokenamount.js";
|
|
298
310
|
export * from "./tokenbalanceresponse.js";
|