@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
|
@@ -21,22 +21,22 @@ export type AaveLoopRequestChain = ClosedEnum<typeof AaveLoopRequestChain>;
|
|
|
21
21
|
/**
|
|
22
22
|
* Amount of collateral token to supply to Aave
|
|
23
23
|
*/
|
|
24
|
-
export type
|
|
24
|
+
export type AaveLoopRequestInitialCollateralAmount = number | string;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Leverage multiplier. Total loop collateral will be calculated as `multiplier` x `initial_collateral_amount`
|
|
28
28
|
*/
|
|
29
|
-
export type
|
|
29
|
+
export type AaveLoopRequestMultiplier = number | string;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Maximum allowed slippage for token swaps in percentage
|
|
33
33
|
*/
|
|
34
|
-
export type
|
|
34
|
+
export type AaveLoopRequestMaxSlippagePercent = number | string;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Loan To Value percentage of the loop
|
|
38
38
|
*/
|
|
39
|
-
export type
|
|
39
|
+
export type AaveLoopRequestLoanToValue = number | string;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Request model for executing an Aave loop strategy.
|
|
@@ -99,67 +99,80 @@ export const AaveLoopRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
|
99
99
|
> = z.nativeEnum(AaveLoopRequestChain);
|
|
100
100
|
|
|
101
101
|
/** @internal */
|
|
102
|
-
export type
|
|
102
|
+
export type AaveLoopRequestInitialCollateralAmount$Outbound = number | string;
|
|
103
103
|
|
|
104
104
|
/** @internal */
|
|
105
|
-
export const
|
|
106
|
-
|
|
105
|
+
export const AaveLoopRequestInitialCollateralAmount$outboundSchema: z.ZodType<
|
|
106
|
+
AaveLoopRequestInitialCollateralAmount$Outbound,
|
|
107
107
|
z.ZodTypeDef,
|
|
108
|
-
|
|
108
|
+
AaveLoopRequestInitialCollateralAmount
|
|
109
109
|
> = z.union([z.number(), z.string()]);
|
|
110
110
|
|
|
111
|
-
export function
|
|
112
|
-
|
|
111
|
+
export function aaveLoopRequestInitialCollateralAmountToJSON(
|
|
112
|
+
aaveLoopRequestInitialCollateralAmount:
|
|
113
|
+
AaveLoopRequestInitialCollateralAmount,
|
|
113
114
|
): string {
|
|
114
115
|
return JSON.stringify(
|
|
115
|
-
|
|
116
|
+
AaveLoopRequestInitialCollateralAmount$outboundSchema.parse(
|
|
117
|
+
aaveLoopRequestInitialCollateralAmount,
|
|
118
|
+
),
|
|
116
119
|
);
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
/** @internal */
|
|
120
|
-
export type
|
|
123
|
+
export type AaveLoopRequestMultiplier$Outbound = number | string;
|
|
121
124
|
|
|
122
125
|
/** @internal */
|
|
123
|
-
export const
|
|
124
|
-
|
|
126
|
+
export const AaveLoopRequestMultiplier$outboundSchema: z.ZodType<
|
|
127
|
+
AaveLoopRequestMultiplier$Outbound,
|
|
125
128
|
z.ZodTypeDef,
|
|
126
|
-
|
|
129
|
+
AaveLoopRequestMultiplier
|
|
127
130
|
> = z.union([z.number(), z.string()]);
|
|
128
131
|
|
|
129
|
-
export function
|
|
130
|
-
|
|
132
|
+
export function aaveLoopRequestMultiplierToJSON(
|
|
133
|
+
aaveLoopRequestMultiplier: AaveLoopRequestMultiplier,
|
|
134
|
+
): string {
|
|
135
|
+
return JSON.stringify(
|
|
136
|
+
AaveLoopRequestMultiplier$outboundSchema.parse(aaveLoopRequestMultiplier),
|
|
137
|
+
);
|
|
131
138
|
}
|
|
132
139
|
|
|
133
140
|
/** @internal */
|
|
134
|
-
export type
|
|
141
|
+
export type AaveLoopRequestMaxSlippagePercent$Outbound = number | string;
|
|
135
142
|
|
|
136
143
|
/** @internal */
|
|
137
|
-
export const
|
|
138
|
-
|
|
144
|
+
export const AaveLoopRequestMaxSlippagePercent$outboundSchema: z.ZodType<
|
|
145
|
+
AaveLoopRequestMaxSlippagePercent$Outbound,
|
|
139
146
|
z.ZodTypeDef,
|
|
140
|
-
|
|
147
|
+
AaveLoopRequestMaxSlippagePercent
|
|
141
148
|
> = z.union([z.number(), z.string()]);
|
|
142
149
|
|
|
143
|
-
export function
|
|
144
|
-
|
|
150
|
+
export function aaveLoopRequestMaxSlippagePercentToJSON(
|
|
151
|
+
aaveLoopRequestMaxSlippagePercent: AaveLoopRequestMaxSlippagePercent,
|
|
145
152
|
): string {
|
|
146
153
|
return JSON.stringify(
|
|
147
|
-
|
|
154
|
+
AaveLoopRequestMaxSlippagePercent$outboundSchema.parse(
|
|
155
|
+
aaveLoopRequestMaxSlippagePercent,
|
|
156
|
+
),
|
|
148
157
|
);
|
|
149
158
|
}
|
|
150
159
|
|
|
151
160
|
/** @internal */
|
|
152
|
-
export type
|
|
161
|
+
export type AaveLoopRequestLoanToValue$Outbound = number | string;
|
|
153
162
|
|
|
154
163
|
/** @internal */
|
|
155
|
-
export const
|
|
156
|
-
|
|
164
|
+
export const AaveLoopRequestLoanToValue$outboundSchema: z.ZodType<
|
|
165
|
+
AaveLoopRequestLoanToValue$Outbound,
|
|
157
166
|
z.ZodTypeDef,
|
|
158
|
-
|
|
167
|
+
AaveLoopRequestLoanToValue
|
|
159
168
|
> = z.union([z.number(), z.string()]);
|
|
160
169
|
|
|
161
|
-
export function
|
|
162
|
-
|
|
170
|
+
export function aaveLoopRequestLoanToValueToJSON(
|
|
171
|
+
aaveLoopRequestLoanToValue: AaveLoopRequestLoanToValue,
|
|
172
|
+
): string {
|
|
173
|
+
return JSON.stringify(
|
|
174
|
+
AaveLoopRequestLoanToValue$outboundSchema.parse(aaveLoopRequestLoanToValue),
|
|
175
|
+
);
|
|
163
176
|
}
|
|
164
177
|
|
|
165
178
|
/** @internal */
|
|
@@ -30,6 +30,10 @@ export type AccountSummary = {
|
|
|
30
30
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
31
31
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
32
32
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
33
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
34
|
+
* currently read-only: positions and market discovery only — transaction
|
|
35
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
36
|
+
* endpoints reject it with a 422.
|
|
33
37
|
*/
|
|
34
38
|
protocol?: CreditProtocol | undefined;
|
|
35
39
|
/**
|
|
@@ -33,12 +33,24 @@ export type CollateralPosition = {
|
|
|
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 collateral vault holding this position.
|
|
40
44
|
*/
|
|
41
45
|
vault?: string | null | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Morpho only: the bytes32 id of the isolated market holding this position.
|
|
48
|
+
*/
|
|
49
|
+
marketId?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Morpho only: true when this is a loan-asset supply position (earning supply APY) rather than collateral backing borrows.
|
|
52
|
+
*/
|
|
53
|
+
isPureSupply?: boolean | null | undefined;
|
|
42
54
|
/**
|
|
43
55
|
* Current on-chain collateral balance (the vault's underlying asset for Euler).
|
|
44
56
|
*/
|
|
@@ -83,6 +95,8 @@ export const CollateralPosition$inboundSchema: z.ZodType<
|
|
|
83
95
|
symbol: z.string(),
|
|
84
96
|
protocol: CreditProtocol$inboundSchema.optional(),
|
|
85
97
|
vault: z.nullable(z.string()).optional(),
|
|
98
|
+
market_id: z.nullable(z.string()).optional(),
|
|
99
|
+
is_pure_supply: z.nullable(z.boolean()).optional(),
|
|
86
100
|
amount_supplied: z.nullable(z.string()),
|
|
87
101
|
usd_value: z.nullable(z.string()).optional(),
|
|
88
102
|
supply_apy: z.nullable(z.string()).optional(),
|
|
@@ -93,6 +107,8 @@ export const CollateralPosition$inboundSchema: z.ZodType<
|
|
|
93
107
|
events: z.array(CreditEvent$inboundSchema).optional(),
|
|
94
108
|
}).transform((v) => {
|
|
95
109
|
return remap$(v, {
|
|
110
|
+
"market_id": "marketId",
|
|
111
|
+
"is_pure_supply": "isPureSupply",
|
|
96
112
|
"amount_supplied": "amountSupplied",
|
|
97
113
|
"usd_value": "usdValue",
|
|
98
114
|
"supply_apy": "supplyApy",
|
|
@@ -56,12 +56,20 @@ export type CreditBorrowParams = {
|
|
|
56
56
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
57
57
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
58
58
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
59
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
60
|
+
* currently read-only: positions and market discovery only — transaction
|
|
61
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
62
|
+
* endpoints reject it with a 422.
|
|
59
63
|
*/
|
|
60
64
|
protocol?: CreditProtocol | undefined;
|
|
61
65
|
/**
|
|
62
66
|
* Euler only: the EVK vault to borrow from. Required when protocol=EULER.
|
|
63
67
|
*/
|
|
64
68
|
borrowVault?: string | null | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
|
|
71
|
+
*/
|
|
72
|
+
marketId?: string | null | undefined;
|
|
65
73
|
};
|
|
66
74
|
|
|
67
75
|
/** @internal */
|
|
@@ -91,6 +99,7 @@ export type CreditBorrowParams$Outbound = {
|
|
|
91
99
|
fee?: CreditFee$Outbound | null | undefined;
|
|
92
100
|
protocol?: string | undefined;
|
|
93
101
|
borrow_vault?: string | null | undefined;
|
|
102
|
+
market_id?: string | null | undefined;
|
|
94
103
|
};
|
|
95
104
|
|
|
96
105
|
/** @internal */
|
|
@@ -106,11 +115,13 @@ export const CreditBorrowParams$outboundSchema: z.ZodType<
|
|
|
106
115
|
fee: z.nullable(CreditFee$outboundSchema).optional(),
|
|
107
116
|
protocol: CreditProtocol$outboundSchema.optional(),
|
|
108
117
|
borrowVault: z.nullable(z.string()).optional(),
|
|
118
|
+
marketId: z.nullable(z.string()).optional(),
|
|
109
119
|
}).transform((v) => {
|
|
110
120
|
return remap$(v, {
|
|
111
121
|
actionType: "action_type",
|
|
112
122
|
interestRateMode: "interest_rate_mode",
|
|
113
123
|
borrowVault: "borrow_vault",
|
|
124
|
+
marketId: "market_id",
|
|
114
125
|
});
|
|
115
126
|
});
|
|
116
127
|
|
|
@@ -51,6 +51,10 @@ export type CreditBorrowRequest = {
|
|
|
51
51
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
52
52
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
53
53
|
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
54
|
+
* ``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
55
|
+
* currently read-only: positions and market discovery only — transaction
|
|
56
|
+
* builders land with the looping work (COM-7106/7107/7108), so transact
|
|
57
|
+
* endpoints reject it with a 422.
|
|
54
58
|
*/
|
|
55
59
|
protocol?: CreditProtocol | undefined;
|
|
56
60
|
/**
|
|
@@ -61,6 +65,10 @@ export type CreditBorrowRequest = {
|
|
|
61
65
|
* Euler only: the EVK vault to borrow from. Required when protocol=EULER.
|
|
62
66
|
*/
|
|
63
67
|
borrowVault?: string | null | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO.
|
|
70
|
+
*/
|
|
71
|
+
marketId?: string | null | undefined;
|
|
64
72
|
/**
|
|
65
73
|
* Token currently held in the Credit Account to use as input. If the same as collateral_token, no swap is performed. Omit together with amount_in and collateral_token to borrow against existing collateral.
|
|
66
74
|
*/
|
|
@@ -176,6 +184,7 @@ export type CreditBorrowRequest$Outbound = {
|
|
|
176
184
|
protocol?: string | undefined;
|
|
177
185
|
collateral_vault?: string | null | undefined;
|
|
178
186
|
borrow_vault?: string | null | undefined;
|
|
187
|
+
market_id?: string | null | undefined;
|
|
179
188
|
token_in?: string | null | undefined;
|
|
180
189
|
amount_in?: number | string | null | undefined;
|
|
181
190
|
collateral_token?: string | null | undefined;
|
|
@@ -201,6 +210,7 @@ export const CreditBorrowRequest$outboundSchema: z.ZodType<
|
|
|
201
210
|
protocol: CreditProtocol$outboundSchema.optional(),
|
|
202
211
|
collateralVault: z.nullable(z.string()).optional(),
|
|
203
212
|
borrowVault: z.nullable(z.string()).optional(),
|
|
213
|
+
marketId: z.nullable(z.string()).optional(),
|
|
204
214
|
tokenIn: z.nullable(z.string()).optional(),
|
|
205
215
|
amountIn: z.nullable(z.union([z.number(), z.string()])).optional(),
|
|
206
216
|
collateralToken: z.nullable(z.string()).optional(),
|
|
@@ -217,6 +227,7 @@ export const CreditBorrowRequest$outboundSchema: z.ZodType<
|
|
|
217
227
|
return remap$(v, {
|
|
218
228
|
collateralVault: "collateral_vault",
|
|
219
229
|
borrowVault: "borrow_vault",
|
|
230
|
+
marketId: "market_id",
|
|
220
231
|
tokenIn: "token_in",
|
|
221
232
|
amountIn: "amount_in",
|
|
222
233
|
collateralToken: "collateral_token",
|
|
@@ -31,6 +31,10 @@ export type CreditEnableCollateralParams = {
|
|
|
31
31
|
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
32
32
|
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
33
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.
|
|
34
38
|
*/
|
|
35
39
|
protocol?: CreditProtocol | undefined;
|
|
36
40
|
/**
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
AccountSummary,
|
|
12
|
+
AccountSummary$inboundSchema,
|
|
13
|
+
} from "./accountsummary.js";
|
|
14
|
+
import {
|
|
15
|
+
LoopedPosition,
|
|
16
|
+
LoopedPosition$inboundSchema,
|
|
17
|
+
} from "./loopedposition.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Looped positions across Aave V3 and Morpho Blue for a credit account.
|
|
21
|
+
*/
|
|
22
|
+
export type CreditLoopedPositionsResponse = {
|
|
23
|
+
/**
|
|
24
|
+
* The credit product account address derived from the owner.
|
|
25
|
+
*/
|
|
26
|
+
creditAccountAddress: string;
|
|
27
|
+
/**
|
|
28
|
+
* All looped positions, on both Aave and Morpho.
|
|
29
|
+
*/
|
|
30
|
+
positions?: Array<LoopedPosition> | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Aave account-level summary (health factor, LTV, borrow capacity). Present when the account holds any open Aave looped position, since Aave collateral is pooled and health is account-level. Null for Morpho-only accounts.
|
|
33
|
+
*/
|
|
34
|
+
aaveAccountSummary?: AccountSummary | null | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const CreditLoopedPositionsResponse$inboundSchema: z.ZodType<
|
|
39
|
+
CreditLoopedPositionsResponse,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
credit_account_address: z.string(),
|
|
44
|
+
positions: z.array(LoopedPosition$inboundSchema).optional(),
|
|
45
|
+
aave_account_summary: z.nullable(AccountSummary$inboundSchema).optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"credit_account_address": "creditAccountAddress",
|
|
49
|
+
"aave_account_summary": "aaveAccountSummary",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function creditLoopedPositionsResponseFromJSON(
|
|
54
|
+
jsonString: string,
|
|
55
|
+
): SafeParseResult<CreditLoopedPositionsResponse, SDKValidationError> {
|
|
56
|
+
return safeParse(
|
|
57
|
+
jsonString,
|
|
58
|
+
(x) => CreditLoopedPositionsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
59
|
+
`Failed to parse 'CreditLoopedPositionsResponse' from JSON`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
LoopLegPreview,
|
|
12
|
+
LoopLegPreview$inboundSchema,
|
|
13
|
+
} from "./looplegpreview.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Projected end state of the loop, computed on GUARANTEED swap floors.
|
|
17
|
+
*/
|
|
18
|
+
export type CreditLoopPreview = {
|
|
19
|
+
/**
|
|
20
|
+
* Number of loop iterations bundled.
|
|
21
|
+
*/
|
|
22
|
+
iterations: number;
|
|
23
|
+
/**
|
|
24
|
+
* Guaranteed minimum total collateral supplied (token units); actual can only be higher (swap fills above the floor become dust).
|
|
25
|
+
*/
|
|
26
|
+
totalCollateralSupplied: string;
|
|
27
|
+
/**
|
|
28
|
+
* Total loan tokens borrowed across iterations.
|
|
29
|
+
*/
|
|
30
|
+
totalBorrowed: string;
|
|
31
|
+
/**
|
|
32
|
+
* Guaranteed leverage floor: total_collateral_supplied / initial_collateral_amount.
|
|
33
|
+
*/
|
|
34
|
+
achievedMultiplier: string;
|
|
35
|
+
/**
|
|
36
|
+
* Projected end loan-to-value in percent, at the sizing oracle prices.
|
|
37
|
+
*/
|
|
38
|
+
projectedLtv: string;
|
|
39
|
+
/**
|
|
40
|
+
* Projected health factor (liquidation threshold / projected LTV). Below 1 would be liquidatable — the request is rejected long before that.
|
|
41
|
+
*/
|
|
42
|
+
projectedHealthFactor: string;
|
|
43
|
+
/**
|
|
44
|
+
* Upper bound of collateral-token surplus the swaps can leave in the Credit Account (sum of quote − guaranteed floor per swap). It is bounded by max_slippage_percent per iteration, stays in the account, and is never lost.
|
|
45
|
+
*/
|
|
46
|
+
estimatedMaxDust: string;
|
|
47
|
+
/**
|
|
48
|
+
* Per-iteration breakdown.
|
|
49
|
+
*/
|
|
50
|
+
legs?: Array<LoopLegPreview> | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const CreditLoopPreview$inboundSchema: z.ZodType<
|
|
55
|
+
CreditLoopPreview,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
unknown
|
|
58
|
+
> = z.object({
|
|
59
|
+
iterations: z.number().int(),
|
|
60
|
+
total_collateral_supplied: z.string(),
|
|
61
|
+
total_borrowed: z.string(),
|
|
62
|
+
achieved_multiplier: z.string(),
|
|
63
|
+
projected_ltv: z.string(),
|
|
64
|
+
projected_health_factor: z.string(),
|
|
65
|
+
estimated_max_dust: z.string(),
|
|
66
|
+
legs: z.array(LoopLegPreview$inboundSchema).optional(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
"total_collateral_supplied": "totalCollateralSupplied",
|
|
70
|
+
"total_borrowed": "totalBorrowed",
|
|
71
|
+
"achieved_multiplier": "achievedMultiplier",
|
|
72
|
+
"projected_ltv": "projectedLtv",
|
|
73
|
+
"projected_health_factor": "projectedHealthFactor",
|
|
74
|
+
"estimated_max_dust": "estimatedMaxDust",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export function creditLoopPreviewFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<CreditLoopPreview, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => CreditLoopPreview$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'CreditLoopPreview' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|