@compass-labs/api-sdk 2.1.11 → 2.1.12-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/CONTRIBUTING.md +26 -0
- package/USAGE.md +20 -0
- package/codeSamples_typescript.yaml +551 -0
- package/dist/commonjs/funcs/bridgeCctpBurn.d.ts +1 -1
- package/dist/commonjs/funcs/bridgeCctpBurn.js +1 -1
- package/dist/commonjs/funcs/bridgeCctpMint.d.ts +2 -4
- package/dist/commonjs/funcs/bridgeCctpMint.d.ts.map +1 -1
- package/dist/commonjs/funcs/bridgeCctpMint.js +2 -4
- package/dist/commonjs/funcs/bridgeCctpMint.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/sdk/bridge.d.ts +3 -5
- package/dist/commonjs/sdk/bridge.d.ts.map +1 -1
- package/dist/commonjs/sdk/bridge.js +3 -5
- package/dist/commonjs/sdk/bridge.js.map +1 -1
- package/dist/esm/funcs/bridgeCctpBurn.d.ts +1 -1
- package/dist/esm/funcs/bridgeCctpBurn.js +1 -1
- package/dist/esm/funcs/bridgeCctpMint.d.ts +2 -4
- package/dist/esm/funcs/bridgeCctpMint.d.ts.map +1 -1
- package/dist/esm/funcs/bridgeCctpMint.js +2 -4
- package/dist/esm/funcs/bridgeCctpMint.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/sdk/bridge.d.ts +3 -5
- package/dist/esm/sdk/bridge.d.ts.map +1 -1
- package/dist/esm/sdk/bridge.js +3 -5
- package/dist/esm/sdk/bridge.js.map +1 -1
- package/docs/lib/utils/retryconfig.md +24 -0
- package/docs/models/components/aaveavgrateresponse.md +27 -0
- package/docs/models/components/aaveborrowparams.md +24 -0
- package/docs/models/components/aaveborrowparamsamount.md +19 -0
- package/docs/models/components/aaveborrowrequest.md +29 -0
- package/docs/models/components/aaveborrowrequestamount.md +19 -0
- package/docs/models/components/aaveborrowrequestchain.md +15 -0
- package/docs/models/components/aavehistoricaltransactionsresponse.md +23 -0
- package/docs/models/components/aavehistoricaltransactionsresponsetransaction.md +148 -0
- package/docs/models/components/aaveliquiditychangeresponse.md +21 -0
- package/docs/models/components/aavelooprequest.md +46 -0
- package/docs/models/components/aavelooprequestchain.md +15 -0
- package/docs/models/components/aaveposition.md +25 -0
- package/docs/models/components/aaverateresponse.md +27 -0
- package/docs/models/components/aaverepayparams.md +24 -0
- package/docs/models/components/aaverepayparamsamount.md +19 -0
- package/docs/models/components/aaverepayrequest.md +29 -0
- package/docs/models/components/aaverepayrequestamount.md +19 -0
- package/docs/models/components/aaverepayrequestchain.md +15 -0
- package/docs/models/components/aavereserveoverviewresponse.md +21 -0
- package/docs/models/components/aavestdrateresponse.md +27 -0
- package/docs/models/components/aavesupplyparams.md +22 -0
- package/docs/models/components/aavesupplyparamsamount.md +19 -0
- package/docs/models/components/aavesupplyrequest.md +26 -0
- package/docs/models/components/aavesupplyrequestamount.md +19 -0
- package/docs/models/components/aavesupplyrequestchain.md +15 -0
- package/docs/models/components/aavesupportedtokenmetadata.md +23 -0
- package/docs/models/components/aavesupportedtokensresponse.md +24 -0
- package/docs/models/components/aavetokenpriceresponse.md +17 -0
- package/docs/models/components/aaveusdcratesresponse.md +40 -0
- package/docs/models/components/aaveuserpositionpertokenresponse.md +33 -0
- package/docs/models/components/aaveuserpositionsummaryresponse.md +27 -0
- package/docs/models/components/aavevenue.md +19 -0
- package/docs/models/components/aavewithdrawparams.md +23 -0
- package/docs/models/components/aavewithdrawparamsamount.md +19 -0
- package/docs/models/components/aavewithdrawrequest.md +27 -0
- package/docs/models/components/aavewithdrawrequestamount.md +19 -0
- package/docs/models/components/aavewithdrawrequestchain.md +15 -0
- package/docs/models/components/aerodromelppositionsresponse.md +17 -0
- package/docs/models/components/aerodromeposition.md +41 -0
- package/docs/models/components/aerodromeslipstreambuyexactlyparams.md +29 -0
- package/docs/models/components/aerodromeslipstreambuyexactlyparamsamountinmaximum.md +19 -0
- package/docs/models/components/aerodromeslipstreambuyexactlyparamsamountout.md +19 -0
- package/docs/models/components/aerodromeslipstreambuyexactlyrequest.md +33 -0
- package/docs/models/components/aerodromeslipstreambuyexactlyrequestamountinmaximum.md +19 -0
- package/docs/models/components/aerodromeslipstreambuyexactlyrequestamountout.md +19 -0
- package/docs/models/components/aerodromeslipstreambuyexactlyrequestchain.md +15 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionparams.md +32 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionparamsamount0desired.md +19 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionparamsamount0min.md +19 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionparamsamount1desired.md +19 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionparamsamount1min.md +19 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequest.md +31 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount0desired.md +19 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount0min.md +19 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount1desired.md +19 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount1min.md +19 -0
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestchain.md +15 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionparams.md +38 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionparamsamount0desired.md +19 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionparamsamount0min.md +19 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionparamsamount1desired.md +19 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionparamsamount1min.md +19 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequest.md +43 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount0desired.md +19 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount0min.md +19 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount1desired.md +19 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount1min.md +19 -0
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestchain.md +15 -0
- package/docs/models/components/aerodromeslipstreampoolpriceresponse.md +23 -0
- package/docs/models/components/aerodromeslipstreamsellexactlyparams.md +29 -0
- package/docs/models/components/aerodromeslipstreamsellexactlyparamsamountin.md +19 -0
- package/docs/models/components/aerodromeslipstreamsellexactlyparamsamountoutminimum.md +19 -0
- package/docs/models/components/aerodromeslipstreamsellexactlyrequest.md +33 -0
- package/docs/models/components/aerodromeslipstreamsellexactlyrequestamountin.md +19 -0
- package/docs/models/components/aerodromeslipstreamsellexactlyrequestamountoutminimum.md +19 -0
- package/docs/models/components/aerodromeslipstreamsellexactlyrequestchain.md +15 -0
- package/docs/models/components/aerodromeslipstreamwithdrawliquidityprovisionparams.md +26 -0
- package/docs/models/components/aerodromeslipstreamwithdrawliquidityprovisionparamspercentageforwithdrawal.md +19 -0
- package/docs/models/components/aerodromeslipstreamwithdrawliquidityprovisionrequest.md +25 -0
- package/docs/models/components/aerodromeslipstreamwithdrawliquidityprovisionrequestchain.md +15 -0
- package/docs/models/components/aerodromeslipstreamwithdrawliquidityprovisionrequestpercentageforwithdrawal.md +19 -0
- package/docs/models/components/allowanceinforesponse.md +27 -0
- package/docs/models/components/approvetransferrequest.md +22 -0
- package/docs/models/components/approvetransferresponse.md +48 -0
- package/docs/models/components/apy.md +23 -0
- package/docs/models/components/batchedsafeoperationsresponseinput.md +47 -0
- package/docs/models/components/batchedsafeoperationsresponseoutput.md +47 -0
- package/docs/models/components/batcheduseroperationsrequest.md +36 -0
- package/docs/models/components/batcheduseroperationsrequestchain.md +15 -0
- package/docs/models/components/batcheduseroperationsresponse.md +17 -0
- package/docs/models/components/body.md +424 -0
- package/docs/models/components/borrow.md +37 -0
- package/docs/models/components/borrowratemode.md +17 -0
- package/docs/models/components/bundlertransactionresponse.md +28 -0
- package/docs/models/components/chain.md +17 -0
- package/docs/models/components/chaininfo.md +18 -0
- package/docs/models/components/chainratedata.md +21 -0
- package/docs/models/components/compassapibackendv1modelsgenericreadresponseportfoliotokenbalance.md +27 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsecheckuserpositionapydata.md +20 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsecheckuserpositionasset.md +27 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsecheckuserpositionmarketstate.md +34 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsecheckuserpositionvaultposition.md +52 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsecheckuserpositionvaultstate.md +24 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsegetmarketapydata.md +23 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsegetmarketasset.md +27 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsegetmarketmarketstate.md +28 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsegetmarketsasset.md +23 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsegetmarketsmarketstate.md +31 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsegetvaultsasset.md +25 -0
- package/docs/models/components/compassapibackendv1modelsmorphoreadresponsegetvaultsvaultstate.md +28 -0
- package/docs/models/components/compassapibackendv1modelspendlereadresponsemarketuserposition.md +28 -0
- package/docs/models/components/compassapibackendv1modelspendlereadresponsepositionstokenbalance.md +19 -0
- package/docs/models/components/compassapibackendv1modelsvaultsreadresponsevaultuserposition.md +19 -0
- package/docs/models/components/compassapibackendv1modelswildcatreadresponsemarketuserposition.md +19 -0
- package/docs/models/components/compassapibackendv2modelsearnreadresponsepositionsvaultposition.md +27 -0
- package/docs/models/components/compassapibackendv2modelsgassponsorshippermit2typeddataeip712domain.md +21 -0
- package/docs/models/components/compassapibackendv2modelsgassponsorshippermit2typeddataeip712types.md +61 -0
- package/docs/models/components/compassapibackendv2modelsgassponsorshippermittypeddataeip712domain.md +26 -0
- package/docs/models/components/compassapibackendv2modelsgassponsorshippermittypeddataeip712types.md +21 -0
- package/docs/models/components/compassapibackendv2modelssafetransactresponsebatchedsafeoperationseip712domain.md +23 -0
- package/docs/models/components/compassapibackendv2modelssafetransactresponsebatchedsafeoperationseip712types.md +23 -0
- package/docs/models/components/cooldownend.md +19 -0
- package/docs/models/components/cooldownposition.md +21 -0
- package/docs/models/components/createaccountrequest.md +24 -0
- package/docs/models/components/createaccountrequestchain.md +15 -0
- package/docs/models/components/createaccountresponse.md +31 -0
- package/docs/models/components/denomination.md +17 -0
- package/docs/models/components/depositforburnrequest.md +27 -0
- package/docs/models/components/depositforburnrequestamount.md +19 -0
- package/docs/models/components/depositforburnrequestchain.md +17 -0
- package/docs/models/components/depositforburnrequesttransfermode.md +17 -0
- package/docs/models/components/depositforburnresponse.md +68 -0
- package/docs/models/components/depositforburnresponsetransfermode.md +17 -0
- package/docs/models/components/destinationchain.md +17 -0
- package/docs/models/components/details.md +33 -0
- package/docs/models/components/earnmanagerequest.md +30 -0
- package/docs/models/components/earnmanagerequestaction.md +17 -0
- package/docs/models/components/earnmanageresponse.md +29 -0
- package/docs/models/components/earnpositionresponse.md +26 -0
- package/docs/models/components/earnpositionsresponse.md +17 -0
- package/docs/models/components/earnswaprequest.md +29 -0
- package/docs/models/components/earnswaprequestamountin.md +19 -0
- package/docs/models/components/earnswapresponse.md +58 -0
- package/docs/models/components/earntransferrequest.md +27 -0
- package/docs/models/components/earntransferrequestaction.md +17 -0
- package/docs/models/components/earntransferrequestamount.md +19 -0
- package/docs/models/components/earntransferresponse.md +56 -0
- package/docs/models/components/earntransferresponseeip712.md +102 -0
- package/docs/models/components/eip712domainfield.md +21 -0
- package/docs/models/components/eip712field.md +19 -0
- package/docs/models/components/ensnameinforesponse.md +21 -0
- package/docs/models/components/erc20data.md +23 -0
- package/docs/models/components/ethenadepositparams.md +20 -0
- package/docs/models/components/ethenadepositparamsamount.md +19 -0
- package/docs/models/components/ethenadepositrequest.md +24 -0
- package/docs/models/components/ethenadepositrequestamount.md +19 -0
- package/docs/models/components/ethenadepositrequestchain.md +15 -0
- package/docs/models/components/ethenagetvaultresponse.md +45 -0
- package/docs/models/components/ethenarequesttowithdrawparams.md +19 -0
- package/docs/models/components/ethenarequesttowithdrawrequest.md +23 -0
- package/docs/models/components/ethenarequesttowithdrawrequestchain.md +15 -0
- package/docs/models/components/ethenarequesttowithdrawtransactionresponse.md +29 -0
- package/docs/models/components/ethenarequesttowithdrawtransactionresponsetransaction.md +33 -0
- package/docs/models/components/ethenaunstakeparams.md +18 -0
- package/docs/models/components/ethenaunstakerequest.md +22 -0
- package/docs/models/components/ethenaunstakerequestchain.md +15 -0
- package/docs/models/components/fee.md +21 -0
- package/docs/models/components/feeamount.md +19 -0
- package/docs/models/components/feeenum.md +19 -0
- package/docs/models/components/initialcollateralamount.md +19 -0
- package/docs/models/components/interestratemode.md +19 -0
- package/docs/models/components/liquidationcall.md +45 -0
- package/docs/models/components/loantovalue.md +19 -0
- package/docs/models/components/loc.md +17 -0
- package/docs/models/components/lpbalance.md +21 -0
- package/docs/models/components/market.md +17 -0
- package/docs/models/components/marketposition.md +35 -0
- package/docs/models/components/markettokens.md +50 -0
- package/docs/models/components/maxslippagepercent.md +19 -0
- package/docs/models/components/maxsupplyapydata.md +24 -0
- package/docs/models/components/mintpreparecompletedresponse.md +27 -0
- package/docs/models/components/mintpreparependingresponse.md +33 -0
- package/docs/models/components/mintpreparereadyresponse.md +36 -0
- package/docs/models/components/mintpreparerequest.md +22 -0
- package/docs/models/components/morphoborrowparams.md +23 -0
- package/docs/models/components/morphoborrowparamsamount.md +19 -0
- package/docs/models/components/morphoborrowrequest.md +28 -0
- package/docs/models/components/morphoborrowrequestamount.md +19 -0
- package/docs/models/components/morphoborrowrequestchain.md +15 -0
- package/docs/models/components/morphocheckmarketpositionresponse.md +25 -0
- package/docs/models/components/morphocheckuserpositionresponse.md +28 -0
- package/docs/models/components/morphodepositparams.md +22 -0
- package/docs/models/components/morphodepositparamsamount.md +19 -0
- package/docs/models/components/morphodepositrequest.md +26 -0
- package/docs/models/components/morphodepositrequestamount.md +19 -0
- package/docs/models/components/morphodepositrequestchain.md +15 -0
- package/docs/models/components/morphogetmarketresponse.md +71 -0
- package/docs/models/components/morphogetmarketsresponse.md +17 -0
- package/docs/models/components/morphogetvaultsresponse.md +17 -0
- package/docs/models/components/morphomarket.md +49 -0
- package/docs/models/components/morphorepayparams.md +23 -0
- package/docs/models/components/morphorepayrequest.md +28 -0
- package/docs/models/components/morphorepayrequestchain.md +15 -0
- package/docs/models/components/morphosupplycollateralparams.md +23 -0
- package/docs/models/components/morphosupplycollateralparamsamount.md +19 -0
- package/docs/models/components/morphosupplycollateralrequest.md +28 -0
- package/docs/models/components/morphosupplycollateralrequestamount.md +19 -0
- package/docs/models/components/morphosupplycollateralrequestchain.md +15 -0
- package/docs/models/components/morphovault.md +51 -0
- package/docs/models/components/morphowithdrawcollateralparams.md +23 -0
- package/docs/models/components/morphowithdrawcollateralparamsamount.md +19 -0
- package/docs/models/components/morphowithdrawcollateralrequest.md +28 -0
- package/docs/models/components/morphowithdrawcollateralrequestamount.md +19 -0
- package/docs/models/components/morphowithdrawcollateralrequestchain.md +15 -0
- package/docs/models/components/morphowithdrawparams.md +22 -0
- package/docs/models/components/morphowithdrawrequest.md +26 -0
- package/docs/models/components/morphowithdrawrequestchain.md +15 -0
- package/docs/models/components/movement10percent.md +18 -0
- package/docs/models/components/multicallauthorizationrequest.md +25 -0
- package/docs/models/components/multicallauthorizationrequestchain.md +15 -0
- package/docs/models/components/multicallauthorizationresponse.md +23 -0
- package/docs/models/components/multicallexecuterequest.md +84 -0
- package/docs/models/components/multicallexecuterequestchain.md +15 -0
- package/docs/models/components/multiplier.md +19 -0
- package/docs/models/components/odosswapparams.md +25 -0
- package/docs/models/components/odosswapparamsamountin.md +19 -0
- package/docs/models/components/odosswaprequest.md +29 -0
- package/docs/models/components/odosswaprequestamountin.md +19 -0
- package/docs/models/components/odosswaprequestchain.md +15 -0
- package/docs/models/components/odostransactionresponse.md +23 -0
- package/docs/models/components/odostransactionresponsetransaction.md +33 -0
- package/docs/models/components/openposition.md +33 -0
- package/docs/models/components/operationtype.md +17 -0
- package/docs/models/components/pendlegetmarketresponse.md +55 -0
- package/docs/models/components/pendlelistmarketsresponse.md +42 -0
- package/docs/models/components/pendlelistuserpositionsresponse.md +67 -0
- package/docs/models/components/pendlemanageliquidityparams.md +27 -0
- package/docs/models/components/pendlemanageliquidityparamsaction.md +17 -0
- package/docs/models/components/pendlemanageliquidityparamsamountin.md +19 -0
- package/docs/models/components/pendlemanageliquidityrequest.md +31 -0
- package/docs/models/components/pendlemanageliquidityrequestaction.md +17 -0
- package/docs/models/components/pendlemanageliquidityrequestamountin.md +19 -0
- package/docs/models/components/pendlemanageliquidityrequestchain.md +15 -0
- package/docs/models/components/pendlemarket.md +48 -0
- package/docs/models/components/pendleredeemyieldparams.md +19 -0
- package/docs/models/components/pendleredeemyieldrequest.md +23 -0
- package/docs/models/components/pendleredeemyieldrequestchain.md +15 -0
- package/docs/models/components/pendletradeptparams.md +27 -0
- package/docs/models/components/pendletradeptparamsaction.md +17 -0
- package/docs/models/components/pendletradeptparamsamountin.md +19 -0
- package/docs/models/components/pendletradeptrequest.md +31 -0
- package/docs/models/components/pendletradeptrequestaction.md +17 -0
- package/docs/models/components/pendletradeptrequestamountin.md +19 -0
- package/docs/models/components/pendletradeptrequestchain.md +15 -0
- package/docs/models/components/pendletradeytparams.md +27 -0
- package/docs/models/components/pendletradeytparamsaction.md +17 -0
- package/docs/models/components/pendletradeytparamsamountin.md +19 -0
- package/docs/models/components/pendletradeytrequest.md +31 -0
- package/docs/models/components/pendletradeytrequestaction.md +17 -0
- package/docs/models/components/pendletradeytrequestamountin.md +19 -0
- package/docs/models/components/pendletradeytrequestchain.md +15 -0
- package/docs/models/components/pendletxresponse.md +29 -0
- package/docs/models/components/pendletxresponsetransaction.md +33 -0
- package/docs/models/components/permit2typeddatainput.md +76 -0
- package/docs/models/components/permit2typeddataoutput.md +76 -0
- package/docs/models/components/permitfield.md +21 -0
- package/docs/models/components/permitmessage.md +27 -0
- package/docs/models/components/permittransferfrommessage.md +26 -0
- package/docs/models/components/permittypeddataresponseinput.md +39 -0
- package/docs/models/components/permittypeddataresponseoutput.md +39 -0
- package/docs/models/components/portfolio.md +28 -0
- package/docs/models/components/position.md +70 -0
- package/docs/models/components/positionunion.md +32 -0
- package/docs/models/components/protocol.md +15 -0
- package/docs/models/components/r.md +19 -0
- package/docs/models/components/repay.md +35 -0
- package/docs/models/components/reserve.md +22 -0
- package/docs/models/components/s.md +19 -0
- package/docs/models/components/safetxfield.md +21 -0
- package/docs/models/components/safetxmessage.md +37 -0
- package/docs/models/components/security.md +17 -0
- package/docs/models/components/setallowanceparams.md +25 -0
- package/docs/models/components/setallowanceparamsamount.md +19 -0
- package/docs/models/components/setallowanceparamscontractenum.md +15 -0
- package/docs/models/components/setallowanceparamscontractunion.md +20 -0
- package/docs/models/components/setallowancerequest.md +29 -0
- package/docs/models/components/setallowancerequestamount.md +19 -0
- package/docs/models/components/setallowancerequestchain.md +15 -0
- package/docs/models/components/setallowancerequestcontractenum.md +15 -0
- package/docs/models/components/setallowancerequestcontractunion.md +19 -0
- package/docs/models/components/signedauthorization.md +27 -0
- package/docs/models/components/skybuyparams.md +21 -0
- package/docs/models/components/skybuyparamsamount.md +19 -0
- package/docs/models/components/skybuyparamstokenin.md +17 -0
- package/docs/models/components/skybuyrequest.md +25 -0
- package/docs/models/components/skybuyrequestamount.md +19 -0
- package/docs/models/components/skybuyrequestchain.md +15 -0
- package/docs/models/components/skybuyrequesttokenin.md +17 -0
- package/docs/models/components/skycheckpositionresponse.md +19 -0
- package/docs/models/components/skydepositparams.md +20 -0
- package/docs/models/components/skydepositparamsamount.md +19 -0
- package/docs/models/components/skydepositrequest.md +24 -0
- package/docs/models/components/skydepositrequestamount.md +19 -0
- package/docs/models/components/skydepositrequestchain.md +15 -0
- package/docs/models/components/skysellparams.md +21 -0
- package/docs/models/components/skysellparamsamount.md +19 -0
- package/docs/models/components/skysellparamstokenout.md +17 -0
- package/docs/models/components/skysellrequest.md +25 -0
- package/docs/models/components/skysellrequestamount.md +19 -0
- package/docs/models/components/skysellrequestchain.md +15 -0
- package/docs/models/components/skysellrequesttokenout.md +17 -0
- package/docs/models/components/skywithdrawparams.md +20 -0
- package/docs/models/components/skywithdrawrequest.md +24 -0
- package/docs/models/components/skywithdrawrequestchain.md +15 -0
- package/docs/models/components/slippage.md +19 -0
- package/docs/models/components/sponsorgasrequest.md +84 -0
- package/docs/models/components/sponsorgasrequesteip712.md +129 -0
- package/docs/models/components/sponsorgasresponse.md +27 -0
- package/docs/models/components/supply.md +35 -0
- package/docs/models/components/supportedchaininfo.md +19 -0
- package/docs/models/components/swapborrowrate.md +39 -0
- package/docs/models/components/syposition.md +19 -0
- package/docs/models/components/tokenbalanceresponse.md +25 -0
- package/docs/models/components/tokenconfig.md +23 -0
- package/docs/models/components/tokenlistresponse.md +26 -0
- package/docs/models/components/tokenpermissions.md +19 -0
- package/docs/models/components/tokenpriceresponse.md +17 -0
- package/docs/models/components/tokentransferparams.md +25 -0
- package/docs/models/components/tokentransferparamsamount.md +19 -0
- package/docs/models/components/tokentransferrequest.md +29 -0
- package/docs/models/components/tokentransferrequestamount.md +19 -0
- package/docs/models/components/tokentransferrequestchain.md +15 -0
- package/docs/models/components/transactionresponse.md +21 -0
- package/docs/models/components/transactionresponsetransaction.md +33 -0
- package/docs/models/components/underlyingtoken.md +23 -0
- package/docs/models/components/uniswapbuyexactlyparams.md +27 -0
- package/docs/models/components/uniswapbuyexactlyparamsamountout.md +19 -0
- package/docs/models/components/uniswapbuyexactlyrequest.md +33 -0
- package/docs/models/components/uniswapbuyexactlyrequestamountout.md +19 -0
- package/docs/models/components/uniswapbuyexactlyrequestchain.md +15 -0
- package/docs/models/components/uniswapbuyexactlytransactionresponse.md +29 -0
- package/docs/models/components/uniswapbuyexactlytransactionresponsetransaction.md +33 -0
- package/docs/models/components/uniswapbuyquoteinforesponse.md +19 -0
- package/docs/models/components/uniswapcheckinrangeresponse.md +17 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionparams.md +27 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionparamsamount0desired.md +19 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionparamsamount0min.md +19 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionparamsamount1desired.md +19 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionparamsamount1min.md +19 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionrequest.md +33 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount0desired.md +19 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount0min.md +19 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount1desired.md +19 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount1min.md +19 -0
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestchain.md +15 -0
- package/docs/models/components/uniswaplppositionsinforesponse.md +17 -0
- package/docs/models/components/uniswapmintliquidityprovisionparams.md +36 -0
- package/docs/models/components/uniswapmintliquidityprovisionparamsamount0desired.md +19 -0
- package/docs/models/components/uniswapmintliquidityprovisionparamsamount0min.md +19 -0
- package/docs/models/components/uniswapmintliquidityprovisionparamsamount1desired.md +19 -0
- package/docs/models/components/uniswapmintliquidityprovisionparamsamount1min.md +19 -0
- package/docs/models/components/uniswapmintliquidityprovisionrequest.md +43 -0
- package/docs/models/components/uniswapmintliquidityprovisionrequestamount0desired.md +19 -0
- package/docs/models/components/uniswapmintliquidityprovisionrequestamount0min.md +19 -0
- package/docs/models/components/uniswapmintliquidityprovisionrequestamount1desired.md +19 -0
- package/docs/models/components/uniswapmintliquidityprovisionrequestamount1min.md +19 -0
- package/docs/models/components/uniswapmintliquidityprovisionrequestchain.md +15 -0
- package/docs/models/components/uniswappoolpriceresponse.md +23 -0
- package/docs/models/components/uniswappositionssolidityresponse.md +40 -0
- package/docs/models/components/uniswapsellexactlyparams.md +29 -0
- package/docs/models/components/uniswapsellexactlyparamsamountin.md +19 -0
- package/docs/models/components/uniswapsellexactlyrequest.md +33 -0
- package/docs/models/components/uniswapsellexactlyrequestamountin.md +19 -0
- package/docs/models/components/uniswapsellexactlyrequestchain.md +15 -0
- package/docs/models/components/uniswapsellexactlytransactionresponse.md +23 -0
- package/docs/models/components/uniswapsellexactlytransactionresponsetransaction.md +33 -0
- package/docs/models/components/uniswapsellquoteinforesponse.md +19 -0
- package/docs/models/components/uniswapwithdrawliquidityprovisionparams.md +26 -0
- package/docs/models/components/uniswapwithdrawliquidityprovisionparamspercentageforwithdrawal.md +19 -0
- package/docs/models/components/uniswapwithdrawliquidityprovisionrequest.md +25 -0
- package/docs/models/components/uniswapwithdrawliquidityprovisionrequestchain.md +15 -0
- package/docs/models/components/uniswapwithdrawliquidityprovisionrequestpercentageforwithdrawal.md +19 -0
- package/docs/models/components/unsignedmulticalltransaction.md +35 -0
- package/docs/models/components/unsignedtransaction.md +33 -0
- package/docs/models/components/unwrapwethparams.md +21 -0
- package/docs/models/components/unwrapwethparamsamount.md +19 -0
- package/docs/models/components/unwrapwethrequest.md +25 -0
- package/docs/models/components/unwrapwethrequestamount.md +19 -0
- package/docs/models/components/unwrapwethrequestchain.md +15 -0
- package/docs/models/components/usageascollateral.md +35 -0
- package/docs/models/components/useroperation.md +21 -0
- package/docs/models/components/useroperationresponse.md +21 -0
- package/docs/models/components/userposition.md +30 -0
- package/docs/models/components/userstate.md +27 -0
- package/docs/models/components/validationerror.md +23 -0
- package/docs/models/components/vault.md +47 -0
- package/docs/models/components/vaultdepositparams.md +22 -0
- package/docs/models/components/vaultdepositparamsamount.md +19 -0
- package/docs/models/components/vaultdepositrequest.md +26 -0
- package/docs/models/components/vaultdepositrequestamount.md +19 -0
- package/docs/models/components/vaultdepositrequestchain.md +15 -0
- package/docs/models/components/vaultgetvaultresponse.md +42 -0
- package/docs/models/components/vaultinfo.md +57 -0
- package/docs/models/components/vaultslistresponse.md +25 -0
- package/docs/models/components/vaultvenue.md +19 -0
- package/docs/models/components/vaultwithdrawparams.md +22 -0
- package/docs/models/components/vaultwithdrawrequest.md +26 -0
- package/docs/models/components/vaultwithdrawrequestchain.md +15 -0
- package/docs/models/components/venue.md +25 -0
- package/docs/models/components/weeklyapys.md +23 -0
- package/docs/models/components/wildcatgetmarketresponse.md +57 -0
- package/docs/models/components/withdraw.md +35 -0
- package/docs/models/components/wrapethparams.md +21 -0
- package/docs/models/components/wrapethparamsamount.md +19 -0
- package/docs/models/components/wrapethrequest.md +25 -0
- package/docs/models/components/wrapethrequestamount.md +19 -0
- package/docs/models/components/wrapethrequestchain.md +15 -0
- package/docs/models/components/yieldrange.md +19 -0
- package/docs/models/errors/httpvalidationerror.md +15 -0
- package/docs/models/errors/mintpreparenotfoundresponseerror.md +22 -0
- package/docs/models/operations/amountin.md +19 -0
- package/docs/models/operations/amountout.md +19 -0
- package/docs/models/operations/contract.md +19 -0
- package/docs/models/operations/contractenum.md +15 -0
- package/docs/models/operations/direction.md +17 -0
- package/docs/models/operations/response200v2cctpmint.md +38 -0
- package/docs/models/operations/responsev1transactionbundleraaveloop.md +34 -0
- package/docs/models/operations/v1aaveaavesupportedtokenschain.md +15 -0
- package/docs/models/operations/v1aaveaavesupportedtokensrequest.md +18 -0
- package/docs/models/operations/v1aaveavgratechain.md +15 -0
- package/docs/models/operations/v1aaveavgraterequest.md +22 -0
- package/docs/models/operations/v1aavehistoricaltransactionschain.md +15 -0
- package/docs/models/operations/v1aavehistoricaltransactionsrequest.md +23 -0
- package/docs/models/operations/v1aaveliquiditychangechain.md +15 -0
- package/docs/models/operations/v1aaveliquiditychangerequest.md +23 -0
- package/docs/models/operations/v1aaveratechain.md +15 -0
- package/docs/models/operations/v1aaveraterequest.md +20 -0
- package/docs/models/operations/v1aavereserveoverviewchain.md +15 -0
- package/docs/models/operations/v1aavereserveoverviewrequest.md +20 -0
- package/docs/models/operations/v1aavestdratechain.md +15 -0
- package/docs/models/operations/v1aavestdraterequest.md +22 -0
- package/docs/models/operations/v1aavetokenpricechain.md +15 -0
- package/docs/models/operations/v1aavetokenpricerequest.md +20 -0
- package/docs/models/operations/v1aaveuserpositionpertokenchain.md +15 -0
- package/docs/models/operations/v1aaveuserpositionpertokenrequest.md +22 -0
- package/docs/models/operations/v1aaveuserpositionsummarychain.md +15 -0
- package/docs/models/operations/v1aaveuserpositionsummaryrequest.md +20 -0
- package/docs/models/operations/v1aerodromeslipstreamliquidityprovisionpositionschain.md +15 -0
- package/docs/models/operations/v1aerodromeslipstreamliquidityprovisionpositionsrequest.md +19 -0
- package/docs/models/operations/v1aerodromeslipstreampoolpricechain.md +15 -0
- package/docs/models/operations/v1aerodromeslipstreampoolpricerequest.md +23 -0
- package/docs/models/operations/v1ethenavaultchain.md +15 -0
- package/docs/models/operations/v1ethenavaultrequest.md +20 -0
- package/docs/models/operations/v1genericallowancechain.md +15 -0
- package/docs/models/operations/v1genericallowancerequest.md +23 -0
- package/docs/models/operations/v1genericenschain.md +15 -0
- package/docs/models/operations/v1genericensrequest.md +19 -0
- package/docs/models/operations/v1genericportfoliochain.md +15 -0
- package/docs/models/operations/v1genericportfoliorequest.md +19 -0
- package/docs/models/operations/v1genericsupportedchainsrequest.md +17 -0
- package/docs/models/operations/v1morphomarketchain.md +15 -0
- package/docs/models/operations/v1morphomarketpositionchain.md +15 -0
- package/docs/models/operations/v1morphomarketpositionrequest.md +22 -0
- package/docs/models/operations/v1morphomarketrequest.md +20 -0
- package/docs/models/operations/v1morphomarketschain.md +15 -0
- package/docs/models/operations/v1morphomarketsrequest.md +21 -0
- package/docs/models/operations/v1morphouserpositionchain.md +15 -0
- package/docs/models/operations/v1morphouserpositionrequest.md +19 -0
- package/docs/models/operations/v1morphovaultchain.md +15 -0
- package/docs/models/operations/v1morphovaultrequest.md +22 -0
- package/docs/models/operations/v1morphovaultschain.md +15 -0
- package/docs/models/operations/v1morphovaultsrequest.md +19 -0
- package/docs/models/operations/v1pendlemarketchain.md +15 -0
- package/docs/models/operations/v1pendlemarketrequest.md +22 -0
- package/docs/models/operations/v1pendlemarketschain.md +15 -0
- package/docs/models/operations/v1pendlemarketsrequest.md +17 -0
- package/docs/models/operations/v1pendlepositionschain.md +15 -0
- package/docs/models/operations/v1pendlepositionsrequest.md +19 -0
- package/docs/models/operations/v1skypositionchain.md +15 -0
- package/docs/models/operations/v1skypositionrequest.md +19 -0
- package/docs/models/operations/v1tokenbalancechain.md +15 -0
- package/docs/models/operations/v1tokenbalancerequest.md +21 -0
- package/docs/models/operations/v1tokenlistchain.md +15 -0
- package/docs/models/operations/v1tokenlistrequest.md +17 -0
- package/docs/models/operations/v1tokenpricechain.md +15 -0
- package/docs/models/operations/v1tokenpricerequest.md +20 -0
- package/docs/models/operations/v1uniswapliquidityprovisioninrangechain.md +15 -0
- package/docs/models/operations/v1uniswapliquidityprovisioninrangerequest.md +19 -0
- package/docs/models/operations/v1uniswapliquidityprovisionpositionschain.md +15 -0
- package/docs/models/operations/v1uniswapliquidityprovisionpositionsrequest.md +19 -0
- package/docs/models/operations/v1uniswappoolpricechain.md +15 -0
- package/docs/models/operations/v1uniswappoolpricefeeenum.md +19 -0
- package/docs/models/operations/v1uniswappoolpricerequest.md +23 -0
- package/docs/models/operations/v1uniswapquotebuyexactlychain.md +15 -0
- package/docs/models/operations/v1uniswapquotebuyexactlyfeeenum.md +19 -0
- package/docs/models/operations/v1uniswapquotebuyexactlyrequest.md +25 -0
- package/docs/models/operations/v1uniswapquotesellexactlychain.md +15 -0
- package/docs/models/operations/v1uniswapquotesellexactlyfeeenum.md +19 -0
- package/docs/models/operations/v1uniswapquotesellexactlyrequest.md +25 -0
- package/docs/models/operations/v1vaultsvaultchain.md +15 -0
- package/docs/models/operations/v1vaultsvaultrequest.md +22 -0
- package/docs/models/operations/v1wildcatmarketchain.md +15 -0
- package/docs/models/operations/v1wildcatmarketrequest.md +22 -0
- package/docs/models/operations/v2cctpmintresponse.md +26 -0
- package/docs/models/operations/v2earnaavetokenratesrequest.md +17 -0
- package/docs/models/operations/v2earnpositionschain.md +15 -0
- package/docs/models/operations/v2earnpositionspositionidrequest.md +21 -0
- package/docs/models/operations/v2earnpositionsrequest.md +25 -0
- package/docs/models/operations/v2earnvaultschain.md +15 -0
- package/docs/models/operations/v2earnvaultsrequest.md +25 -0
- package/docs/sdks/aavev3/README.md +1247 -0
- package/docs/sdks/aerodromeslipstream/README.md +702 -0
- package/docs/sdks/bridge/README.md +222 -0
- package/docs/sdks/earn/README.md +696 -0
- package/docs/sdks/erc4626vaults/README.md +264 -0
- package/docs/sdks/ethena/README.md +357 -0
- package/docs/sdks/gassponsorship/README.md +296 -0
- package/docs/sdks/morpho/README.md +1066 -0
- package/docs/sdks/pendle/README.md +630 -0
- package/docs/sdks/sky/README.md +458 -0
- package/docs/sdks/smartaccount/README.md +106 -0
- package/docs/sdks/swap/README.md +100 -0
- package/docs/sdks/token/README.md +481 -0
- package/docs/sdks/transactionbundler/README.md +411 -0
- package/docs/sdks/uniswapv3/README.md +947 -0
- package/docs/sdks/universal/README.md +419 -0
- package/docs/sdks/wildcat/README.md +88 -0
- package/eslint.config.mjs +22 -0
- package/examples/README.md +31 -0
- package/examples/node_modules/@esbuild/linux-x64/README.md +3 -0
- package/examples/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- package/examples/node_modules/@types/node/LICENSE +21 -0
- package/examples/node_modules/@types/node/README.md +15 -0
- package/examples/node_modules/dotenv/CHANGELOG.md +520 -0
- package/examples/node_modules/dotenv/LICENSE +23 -0
- package/examples/node_modules/dotenv/README-es.md +411 -0
- package/examples/node_modules/dotenv/README.md +645 -0
- package/examples/node_modules/dotenv/SECURITY.md +1 -0
- package/examples/node_modules/esbuild/LICENSE.md +21 -0
- package/examples/node_modules/esbuild/README.md +3 -0
- package/examples/node_modules/esbuild/bin/esbuild +0 -0
- package/examples/node_modules/get-tsconfig/LICENSE +21 -0
- package/examples/node_modules/get-tsconfig/README.md +235 -0
- package/examples/node_modules/get-tsconfig/dist/index.cjs +7 -0
- package/examples/node_modules/get-tsconfig/dist/index.d.cts +2088 -0
- package/examples/node_modules/get-tsconfig/dist/index.d.mts +2088 -0
- package/examples/node_modules/get-tsconfig/dist/index.mjs +0 -0
- package/examples/node_modules/resolve-pkg-maps/LICENSE +21 -0
- package/examples/node_modules/resolve-pkg-maps/README.md +216 -0
- package/examples/node_modules/resolve-pkg-maps/dist/index.cjs +1 -0
- package/examples/node_modules/resolve-pkg-maps/dist/index.d.cts +11 -0
- package/examples/node_modules/resolve-pkg-maps/dist/index.d.mts +11 -0
- package/examples/node_modules/resolve-pkg-maps/dist/index.mjs +0 -0
- package/examples/node_modules/tsx/LICENSE +21 -0
- package/examples/node_modules/tsx/README.md +32 -0
- package/examples/node_modules/tsx/dist/cjs/api/index.cjs +1 -0
- package/examples/node_modules/tsx/dist/cjs/api/index.d.cts +35 -0
- package/examples/node_modules/tsx/dist/cjs/api/index.d.mts +35 -0
- package/examples/node_modules/tsx/dist/cjs/api/index.mjs +0 -0
- package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -0
- package/examples/node_modules/tsx/dist/cjs/index.mjs +0 -0
- package/examples/node_modules/tsx/dist/cli.cjs +54 -0
- package/examples/node_modules/tsx/dist/cli.mjs +0 -0
- package/examples/node_modules/tsx/dist/client-D6NvIMSC.cjs +1 -0
- package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -0
- package/examples/node_modules/tsx/dist/esm/api/index.d.cts +35 -0
- package/examples/node_modules/tsx/dist/esm/api/index.d.mts +35 -0
- package/examples/node_modules/tsx/dist/esm/api/index.mjs +0 -0
- package/examples/node_modules/tsx/dist/esm/index.cjs +2 -0
- package/examples/node_modules/tsx/dist/esm/index.mjs +0 -0
- package/examples/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +1 -0
- package/examples/node_modules/tsx/dist/index-BWFBUo6r.cjs +1 -0
- package/examples/node_modules/tsx/dist/index-gckBtVBf.cjs +14 -0
- package/examples/node_modules/tsx/dist/lexer-DgIbo0BU.cjs +3 -0
- package/examples/node_modules/tsx/dist/loader.cjs +1 -0
- package/examples/node_modules/tsx/dist/loader.mjs +0 -0
- package/examples/node_modules/tsx/dist/node-features-roYmp9jK.cjs +1 -0
- package/examples/node_modules/tsx/dist/package-Dxt5kIHw.cjs +1 -0
- package/examples/node_modules/tsx/dist/patch-repl.cjs +1 -0
- package/examples/node_modules/tsx/dist/patch-repl.mjs +0 -0
- package/examples/node_modules/tsx/dist/preflight.cjs +1 -0
- package/examples/node_modules/tsx/dist/preflight.mjs +0 -0
- package/examples/node_modules/tsx/dist/register-2sWVXuRQ.cjs +1 -0
- package/examples/node_modules/tsx/dist/register-D46fvsV_.cjs +4 -0
- package/examples/node_modules/tsx/dist/repl.cjs +3 -0
- package/examples/node_modules/tsx/dist/repl.mjs +0 -0
- package/examples/node_modules/tsx/dist/require-D4F1Lv60.cjs +1 -0
- package/examples/node_modules/tsx/dist/suppress-warnings.cjs +1 -0
- package/examples/node_modules/tsx/dist/suppress-warnings.mjs +0 -0
- package/examples/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +1 -0
- package/examples/node_modules/undici-types/LICENSE +21 -0
- package/examples/node_modules/undici-types/README.md +6 -0
- package/package.json +1 -1
- package/src/funcs/bridgeCctpBurn.ts +1 -1
- package/src/funcs/bridgeCctpMint.ts +2 -4
- package/src/lib/config.ts +2 -2
- package/src/sdk/bridge.ts +3 -5
- package/tsconfig.json +1 -1
- package/examples/node_modules/.package-lock.json +0 -159
|
@@ -0,0 +1,1066 @@
|
|
|
1
|
+
# Morpho
|
|
2
|
+
(*morpho*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [morphoVaults](#morphovaults) - Get Vaults
|
|
9
|
+
* [morphoVault](#morphovault) - Get Vault & User Position
|
|
10
|
+
* [morphoMarkets](#morphomarkets) - Get Markets
|
|
11
|
+
* [morphoMarket](#morphomarket) - Get Market
|
|
12
|
+
* [morphoMarketPosition](#morphomarketposition) - Check Market Position
|
|
13
|
+
* [morphoUserPosition](#morphouserposition) - Check User Position
|
|
14
|
+
* [morphoDeposit](#morphodeposit) - Deposit to Vault
|
|
15
|
+
* [morphoWithdraw](#morphowithdraw) - Withdraw from Vault
|
|
16
|
+
* [morphoSupplyCollateral](#morphosupplycollateral) - Supply Collateral to Market
|
|
17
|
+
* [morphoWithdrawCollateral](#morphowithdrawcollateral) - Withdraw Collateral from Market
|
|
18
|
+
* [morphoBorrow](#morphoborrow) - Borrow from Market
|
|
19
|
+
* [morphoRepay](#morphorepay) - Repay to Market
|
|
20
|
+
|
|
21
|
+
## morphoVaults
|
|
22
|
+
|
|
23
|
+
Query a list of vaults you can deposit into.
|
|
24
|
+
|
|
25
|
+
Each vault has one unique token that can be deposited. In exchange for depositing
|
|
26
|
+
tokens into a vault you receive shares. You earn yield on these shares by their
|
|
27
|
+
exchange value increasing over time.
|
|
28
|
+
|
|
29
|
+
### Example Usage
|
|
30
|
+
|
|
31
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_vaults" method="get" path="/v1/morpho/vaults" -->
|
|
32
|
+
```typescript
|
|
33
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
34
|
+
|
|
35
|
+
const compassApiSDK = new CompassApiSDK({
|
|
36
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
async function run() {
|
|
40
|
+
const result = await compassApiSDK.morpho.morphoVaults({
|
|
41
|
+
chain: "base",
|
|
42
|
+
depositToken: "USDC",
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
console.log(result);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
run();
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Standalone function
|
|
52
|
+
|
|
53
|
+
The standalone function version of this method:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
57
|
+
import { morphoMorphoVaults } from "@compass-labs/api-sdk/funcs/morphoMorphoVaults.js";
|
|
58
|
+
|
|
59
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
60
|
+
// You can create one instance of it to use across an application.
|
|
61
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
62
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
async function run() {
|
|
66
|
+
const res = await morphoMorphoVaults(compassApiSDK, {
|
|
67
|
+
chain: "base",
|
|
68
|
+
depositToken: "USDC",
|
|
69
|
+
});
|
|
70
|
+
if (res.ok) {
|
|
71
|
+
const { value: result } = res;
|
|
72
|
+
console.log(result);
|
|
73
|
+
} else {
|
|
74
|
+
console.log("morphoMorphoVaults failed:", res.error);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
run();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Parameters
|
|
82
|
+
|
|
83
|
+
| Parameter | Type | Required | Description |
|
|
84
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
85
|
+
| `request` | [operations.V1MorphoVaultsRequest](../../models/operations/v1morphovaultsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
86
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
87
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
88
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
89
|
+
|
|
90
|
+
### Response
|
|
91
|
+
|
|
92
|
+
**Promise\<[components.MorphoGetVaultsResponse](../../models/components/morphogetvaultsresponse.md)\>**
|
|
93
|
+
|
|
94
|
+
### Errors
|
|
95
|
+
|
|
96
|
+
| Error Type | Status Code | Content Type |
|
|
97
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
98
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
99
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
100
|
+
|
|
101
|
+
## morphoVault
|
|
102
|
+
|
|
103
|
+
Get Vault data & User Position.
|
|
104
|
+
|
|
105
|
+
The user position is only included if 'user_address' parameter is included.
|
|
106
|
+
|
|
107
|
+
### Example Usage
|
|
108
|
+
|
|
109
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_vault" method="get" path="/v1/morpho/vault" -->
|
|
110
|
+
```typescript
|
|
111
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
112
|
+
|
|
113
|
+
const compassApiSDK = new CompassApiSDK({
|
|
114
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
async function run() {
|
|
118
|
+
const result = await compassApiSDK.morpho.morphoVault({
|
|
119
|
+
chain: "ethereum",
|
|
120
|
+
vaultAddress: "0x182863131F9a4630fF9E27830d945B1413e347E8",
|
|
121
|
+
userAddress: "0xb8340945eBc917D2Aa0368a5e4E79C849c461511",
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
console.log(result);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
run();
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Standalone function
|
|
131
|
+
|
|
132
|
+
The standalone function version of this method:
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
136
|
+
import { morphoMorphoVault } from "@compass-labs/api-sdk/funcs/morphoMorphoVault.js";
|
|
137
|
+
|
|
138
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
139
|
+
// You can create one instance of it to use across an application.
|
|
140
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
141
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
async function run() {
|
|
145
|
+
const res = await morphoMorphoVault(compassApiSDK, {
|
|
146
|
+
chain: "ethereum",
|
|
147
|
+
vaultAddress: "0x182863131F9a4630fF9E27830d945B1413e347E8",
|
|
148
|
+
userAddress: "0xb8340945eBc917D2Aa0368a5e4E79C849c461511",
|
|
149
|
+
});
|
|
150
|
+
if (res.ok) {
|
|
151
|
+
const { value: result } = res;
|
|
152
|
+
console.log(result);
|
|
153
|
+
} else {
|
|
154
|
+
console.log("morphoMorphoVault failed:", res.error);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
run();
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Parameters
|
|
162
|
+
|
|
163
|
+
| Parameter | Type | Required | Description |
|
|
164
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
165
|
+
| `request` | [operations.V1MorphoVaultRequest](../../models/operations/v1morphovaultrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
166
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
167
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
168
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
169
|
+
|
|
170
|
+
### Response
|
|
171
|
+
|
|
172
|
+
**Promise\<[components.VaultGetVaultResponse](../../models/components/vaultgetvaultresponse.md)\>**
|
|
173
|
+
|
|
174
|
+
### Errors
|
|
175
|
+
|
|
176
|
+
| Error Type | Status Code | Content Type |
|
|
177
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
178
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
179
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
180
|
+
|
|
181
|
+
## morphoMarkets
|
|
182
|
+
|
|
183
|
+
Query a list of markets you can borrow from.
|
|
184
|
+
|
|
185
|
+
Each market has one unique token that can be borrowed against one unique token that
|
|
186
|
+
can be used as collateral.
|
|
187
|
+
|
|
188
|
+
### Example Usage
|
|
189
|
+
|
|
190
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_markets" method="get" path="/v1/morpho/markets" -->
|
|
191
|
+
```typescript
|
|
192
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
193
|
+
|
|
194
|
+
const compassApiSDK = new CompassApiSDK({
|
|
195
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
async function run() {
|
|
199
|
+
const result = await compassApiSDK.morpho.morphoMarkets({
|
|
200
|
+
chain: "base",
|
|
201
|
+
collateralToken: "USDC",
|
|
202
|
+
loanToken: "WETH",
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
console.log(result);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
run();
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Standalone function
|
|
212
|
+
|
|
213
|
+
The standalone function version of this method:
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
217
|
+
import { morphoMorphoMarkets } from "@compass-labs/api-sdk/funcs/morphoMorphoMarkets.js";
|
|
218
|
+
|
|
219
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
220
|
+
// You can create one instance of it to use across an application.
|
|
221
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
222
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
async function run() {
|
|
226
|
+
const res = await morphoMorphoMarkets(compassApiSDK, {
|
|
227
|
+
chain: "base",
|
|
228
|
+
collateralToken: "USDC",
|
|
229
|
+
loanToken: "WETH",
|
|
230
|
+
});
|
|
231
|
+
if (res.ok) {
|
|
232
|
+
const { value: result } = res;
|
|
233
|
+
console.log(result);
|
|
234
|
+
} else {
|
|
235
|
+
console.log("morphoMorphoMarkets failed:", res.error);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
run();
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Parameters
|
|
243
|
+
|
|
244
|
+
| Parameter | Type | Required | Description |
|
|
245
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
246
|
+
| `request` | [operations.V1MorphoMarketsRequest](../../models/operations/v1morphomarketsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
247
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
248
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
249
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
250
|
+
|
|
251
|
+
### Response
|
|
252
|
+
|
|
253
|
+
**Promise\<[components.MorphoGetMarketsResponse](../../models/components/morphogetmarketsresponse.md)\>**
|
|
254
|
+
|
|
255
|
+
### Errors
|
|
256
|
+
|
|
257
|
+
| Error Type | Status Code | Content Type |
|
|
258
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
259
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
260
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
261
|
+
|
|
262
|
+
## morphoMarket
|
|
263
|
+
|
|
264
|
+
Get data & metrics for a specific Morpho market.
|
|
265
|
+
|
|
266
|
+
Including:
|
|
267
|
+
- Current, daily, weekly, monthly, yearly APY
|
|
268
|
+
- Collateral & loan asset data
|
|
269
|
+
- Liquidation loan-to-value ratio
|
|
270
|
+
- Collateral, borrow & liquidity value
|
|
271
|
+
- Utilization ratio
|
|
272
|
+
- Pertinent metadata
|
|
273
|
+
- Whitelist status
|
|
274
|
+
|
|
275
|
+
### Example Usage
|
|
276
|
+
|
|
277
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_market" method="get" path="/v1/morpho/market" -->
|
|
278
|
+
```typescript
|
|
279
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
280
|
+
|
|
281
|
+
const compassApiSDK = new CompassApiSDK({
|
|
282
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
async function run() {
|
|
286
|
+
const result = await compassApiSDK.morpho.morphoMarket({
|
|
287
|
+
chain: "base",
|
|
288
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
console.log(result);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
run();
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Standalone function
|
|
298
|
+
|
|
299
|
+
The standalone function version of this method:
|
|
300
|
+
|
|
301
|
+
```typescript
|
|
302
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
303
|
+
import { morphoMorphoMarket } from "@compass-labs/api-sdk/funcs/morphoMorphoMarket.js";
|
|
304
|
+
|
|
305
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
306
|
+
// You can create one instance of it to use across an application.
|
|
307
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
308
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
async function run() {
|
|
312
|
+
const res = await morphoMorphoMarket(compassApiSDK, {
|
|
313
|
+
chain: "base",
|
|
314
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
315
|
+
});
|
|
316
|
+
if (res.ok) {
|
|
317
|
+
const { value: result } = res;
|
|
318
|
+
console.log(result);
|
|
319
|
+
} else {
|
|
320
|
+
console.log("morphoMorphoMarket failed:", res.error);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
run();
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Parameters
|
|
328
|
+
|
|
329
|
+
| Parameter | Type | Required | Description |
|
|
330
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
331
|
+
| `request` | [operations.V1MorphoMarketRequest](../../models/operations/v1morphomarketrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
332
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
333
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
334
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
335
|
+
|
|
336
|
+
### Response
|
|
337
|
+
|
|
338
|
+
**Promise\<[components.MorphoGetMarketResponse](../../models/components/morphogetmarketresponse.md)\>**
|
|
339
|
+
|
|
340
|
+
### Errors
|
|
341
|
+
|
|
342
|
+
| Error Type | Status Code | Content Type |
|
|
343
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
344
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
345
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
346
|
+
|
|
347
|
+
## morphoMarketPosition
|
|
348
|
+
|
|
349
|
+
Check how many shares you've borrowed and the equivalent token amount of a given
|
|
350
|
+
market.
|
|
351
|
+
|
|
352
|
+
### Example Usage
|
|
353
|
+
|
|
354
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_market_position" method="get" path="/v1/morpho/market_position" -->
|
|
355
|
+
```typescript
|
|
356
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
357
|
+
|
|
358
|
+
const compassApiSDK = new CompassApiSDK({
|
|
359
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
async function run() {
|
|
363
|
+
const result = await compassApiSDK.morpho.morphoMarketPosition({
|
|
364
|
+
chain: "base",
|
|
365
|
+
userAddress: "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4",
|
|
366
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
console.log(result);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
run();
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### Standalone function
|
|
376
|
+
|
|
377
|
+
The standalone function version of this method:
|
|
378
|
+
|
|
379
|
+
```typescript
|
|
380
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
381
|
+
import { morphoMorphoMarketPosition } from "@compass-labs/api-sdk/funcs/morphoMorphoMarketPosition.js";
|
|
382
|
+
|
|
383
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
384
|
+
// You can create one instance of it to use across an application.
|
|
385
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
386
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
async function run() {
|
|
390
|
+
const res = await morphoMorphoMarketPosition(compassApiSDK, {
|
|
391
|
+
chain: "base",
|
|
392
|
+
userAddress: "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4",
|
|
393
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
394
|
+
});
|
|
395
|
+
if (res.ok) {
|
|
396
|
+
const { value: result } = res;
|
|
397
|
+
console.log(result);
|
|
398
|
+
} else {
|
|
399
|
+
console.log("morphoMorphoMarketPosition failed:", res.error);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
run();
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Parameters
|
|
407
|
+
|
|
408
|
+
| Parameter | Type | Required | Description |
|
|
409
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
410
|
+
| `request` | [operations.V1MorphoMarketPositionRequest](../../models/operations/v1morphomarketpositionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
411
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
412
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
413
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
414
|
+
|
|
415
|
+
### Response
|
|
416
|
+
|
|
417
|
+
**Promise\<[components.MorphoCheckMarketPositionResponse](../../models/components/morphocheckmarketpositionresponse.md)\>**
|
|
418
|
+
|
|
419
|
+
### Errors
|
|
420
|
+
|
|
421
|
+
| Error Type | Status Code | Content Type |
|
|
422
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
423
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
424
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
425
|
+
|
|
426
|
+
## morphoUserPosition
|
|
427
|
+
|
|
428
|
+
Check user's overall position across the entire Morpho ecosystem.
|
|
429
|
+
|
|
430
|
+
Inlcuding all vault and market position metrics and relavant metadata of said vaults
|
|
431
|
+
and markets.
|
|
432
|
+
|
|
433
|
+
### Example Usage
|
|
434
|
+
|
|
435
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_user_position" method="get" path="/v1/morpho/user_position" -->
|
|
436
|
+
```typescript
|
|
437
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
438
|
+
|
|
439
|
+
const compassApiSDK = new CompassApiSDK({
|
|
440
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
async function run() {
|
|
444
|
+
const result = await compassApiSDK.morpho.morphoUserPosition({
|
|
445
|
+
chain: "base",
|
|
446
|
+
userAddress: "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4",
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
console.log(result);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
run();
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### Standalone function
|
|
456
|
+
|
|
457
|
+
The standalone function version of this method:
|
|
458
|
+
|
|
459
|
+
```typescript
|
|
460
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
461
|
+
import { morphoMorphoUserPosition } from "@compass-labs/api-sdk/funcs/morphoMorphoUserPosition.js";
|
|
462
|
+
|
|
463
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
464
|
+
// You can create one instance of it to use across an application.
|
|
465
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
466
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
async function run() {
|
|
470
|
+
const res = await morphoMorphoUserPosition(compassApiSDK, {
|
|
471
|
+
chain: "base",
|
|
472
|
+
userAddress: "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4",
|
|
473
|
+
});
|
|
474
|
+
if (res.ok) {
|
|
475
|
+
const { value: result } = res;
|
|
476
|
+
console.log(result);
|
|
477
|
+
} else {
|
|
478
|
+
console.log("morphoMorphoUserPosition failed:", res.error);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
run();
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### Parameters
|
|
486
|
+
|
|
487
|
+
| Parameter | Type | Required | Description |
|
|
488
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
489
|
+
| `request` | [operations.V1MorphoUserPositionRequest](../../models/operations/v1morphouserpositionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
490
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
491
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
492
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
493
|
+
|
|
494
|
+
### Response
|
|
495
|
+
|
|
496
|
+
**Promise\<[components.MorphoCheckUserPositionResponse](../../models/components/morphocheckuserpositionresponse.md)\>**
|
|
497
|
+
|
|
498
|
+
### Errors
|
|
499
|
+
|
|
500
|
+
| Error Type | Status Code | Content Type |
|
|
501
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
502
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
503
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
504
|
+
|
|
505
|
+
## morphoDeposit
|
|
506
|
+
|
|
507
|
+
Deposit tokens into a Morpho Vault to earn passive yield from interest paid by
|
|
508
|
+
borrowers.
|
|
509
|
+
|
|
510
|
+
Each vault accepts one unique token that can be deposited.
|
|
511
|
+
|
|
512
|
+
A Morpho Vault has one loan asset and can allocate deposits to multiple Morpho
|
|
513
|
+
markets. Users can deposit into a vault to start earning passive yield from interest
|
|
514
|
+
paid by borrowers. Vaults feature automated risk management, actively curating risk
|
|
515
|
+
exposure for all deposited assets so users don't need to make these decisions
|
|
516
|
+
themselves. Users maintain full control over their assets, can monitor the vault's
|
|
517
|
+
state at any time, and withdraw their liquidity at their discretion.
|
|
518
|
+
<Info>
|
|
519
|
+
**Required Allowances**
|
|
520
|
+
|
|
521
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
522
|
+
|
|
523
|
+
- `<vault-contract-address>`
|
|
524
|
+
</Info>
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
### Example Usage
|
|
528
|
+
|
|
529
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_deposit" method="post" path="/v1/morpho/deposit" -->
|
|
530
|
+
```typescript
|
|
531
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
532
|
+
|
|
533
|
+
const compassApiSDK = new CompassApiSDK({
|
|
534
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
async function run() {
|
|
538
|
+
const result = await compassApiSDK.morpho.morphoDeposit({
|
|
539
|
+
vaultAddress: "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
|
|
540
|
+
amount: 0.5,
|
|
541
|
+
chain: "base",
|
|
542
|
+
sender: "0xF85272345eDa6aA3c6469C97065a676737e73f87",
|
|
543
|
+
});
|
|
544
|
+
|
|
545
|
+
console.log(result);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
run();
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### Standalone function
|
|
552
|
+
|
|
553
|
+
The standalone function version of this method:
|
|
554
|
+
|
|
555
|
+
```typescript
|
|
556
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
557
|
+
import { morphoMorphoDeposit } from "@compass-labs/api-sdk/funcs/morphoMorphoDeposit.js";
|
|
558
|
+
|
|
559
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
560
|
+
// You can create one instance of it to use across an application.
|
|
561
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
562
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
async function run() {
|
|
566
|
+
const res = await morphoMorphoDeposit(compassApiSDK, {
|
|
567
|
+
vaultAddress: "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
|
|
568
|
+
amount: 0.5,
|
|
569
|
+
chain: "base",
|
|
570
|
+
sender: "0xF85272345eDa6aA3c6469C97065a676737e73f87",
|
|
571
|
+
});
|
|
572
|
+
if (res.ok) {
|
|
573
|
+
const { value: result } = res;
|
|
574
|
+
console.log(result);
|
|
575
|
+
} else {
|
|
576
|
+
console.log("morphoMorphoDeposit failed:", res.error);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
run();
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### Parameters
|
|
584
|
+
|
|
585
|
+
| Parameter | Type | Required | Description |
|
|
586
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
587
|
+
| `request` | [components.MorphoDepositRequest](../../models/components/morphodepositrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
588
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
589
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
590
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
591
|
+
|
|
592
|
+
### Response
|
|
593
|
+
|
|
594
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
595
|
+
|
|
596
|
+
### Errors
|
|
597
|
+
|
|
598
|
+
| Error Type | Status Code | Content Type |
|
|
599
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
600
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
601
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
602
|
+
|
|
603
|
+
## morphoWithdraw
|
|
604
|
+
|
|
605
|
+
Withdraw deposited tokens from a Morpho Vault.
|
|
606
|
+
|
|
607
|
+
The passive yield earned on token deposits is represented by the increased value of
|
|
608
|
+
the shares received upon depositing tokens.
|
|
609
|
+
|
|
610
|
+
A Morpho Vault has one loan asset and can allocate deposits to multiple Morpho
|
|
611
|
+
markets. Users can deposit into a vault to start earning passive yield from interest
|
|
612
|
+
paid by borrowers. Vaults feature automated risk management, actively curating risk
|
|
613
|
+
exposure for all deposited assets so users don't need to make these decisions
|
|
614
|
+
themselves. Users maintain full control over their assets, can monitor the vault's
|
|
615
|
+
state at any time, and withdraw their liquidity at their discretion.
|
|
616
|
+
|
|
617
|
+
### Example Usage
|
|
618
|
+
|
|
619
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_withdraw" method="post" path="/v1/morpho/withdraw" -->
|
|
620
|
+
```typescript
|
|
621
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
622
|
+
|
|
623
|
+
const compassApiSDK = new CompassApiSDK({
|
|
624
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
async function run() {
|
|
628
|
+
const result = await compassApiSDK.morpho.morphoWithdraw({
|
|
629
|
+
vaultAddress: "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
|
|
630
|
+
amount: "ALL",
|
|
631
|
+
chain: "base",
|
|
632
|
+
sender: "0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418",
|
|
633
|
+
});
|
|
634
|
+
|
|
635
|
+
console.log(result);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
run();
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### Standalone function
|
|
642
|
+
|
|
643
|
+
The standalone function version of this method:
|
|
644
|
+
|
|
645
|
+
```typescript
|
|
646
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
647
|
+
import { morphoMorphoWithdraw } from "@compass-labs/api-sdk/funcs/morphoMorphoWithdraw.js";
|
|
648
|
+
|
|
649
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
650
|
+
// You can create one instance of it to use across an application.
|
|
651
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
652
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
653
|
+
});
|
|
654
|
+
|
|
655
|
+
async function run() {
|
|
656
|
+
const res = await morphoMorphoWithdraw(compassApiSDK, {
|
|
657
|
+
vaultAddress: "0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca",
|
|
658
|
+
amount: "ALL",
|
|
659
|
+
chain: "base",
|
|
660
|
+
sender: "0xB3B45f5aCBb58a432BDe58724c1C959E11D5A418",
|
|
661
|
+
});
|
|
662
|
+
if (res.ok) {
|
|
663
|
+
const { value: result } = res;
|
|
664
|
+
console.log(result);
|
|
665
|
+
} else {
|
|
666
|
+
console.log("morphoMorphoWithdraw failed:", res.error);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
run();
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### Parameters
|
|
674
|
+
|
|
675
|
+
| Parameter | Type | Required | Description |
|
|
676
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
677
|
+
| `request` | [components.MorphoWithdrawRequest](../../models/components/morphowithdrawrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
678
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
679
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
680
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
681
|
+
|
|
682
|
+
### Response
|
|
683
|
+
|
|
684
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
685
|
+
|
|
686
|
+
### Errors
|
|
687
|
+
|
|
688
|
+
| Error Type | Status Code | Content Type |
|
|
689
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
690
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
691
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
692
|
+
|
|
693
|
+
## morphoSupplyCollateral
|
|
694
|
+
|
|
695
|
+
Supply collateral to a Morpho Market in order to borrow against it.
|
|
696
|
+
|
|
697
|
+
A Morpho Market is a primitive lending pool that pairs one collateral asset with one
|
|
698
|
+
loan asset. Each market is isolated (meaning risks are contained within each
|
|
699
|
+
individual market), immutable (cannot be changed after deployment), and will persist
|
|
700
|
+
as long as the blockchain it is deployed on is live.
|
|
701
|
+
<Info>
|
|
702
|
+
**Required Allowances**
|
|
703
|
+
|
|
704
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
705
|
+
|
|
706
|
+
- `MorphoMarket`
|
|
707
|
+
</Info>
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
### Example Usage
|
|
711
|
+
|
|
712
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_supply_collateral" method="post" path="/v1/morpho/supply_collateral" -->
|
|
713
|
+
```typescript
|
|
714
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
715
|
+
|
|
716
|
+
const compassApiSDK = new CompassApiSDK({
|
|
717
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
718
|
+
});
|
|
719
|
+
|
|
720
|
+
async function run() {
|
|
721
|
+
const result = await compassApiSDK.morpho.morphoSupplyCollateral({
|
|
722
|
+
amount: 0.5,
|
|
723
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
724
|
+
chain: "base",
|
|
725
|
+
sender: "0x62e25C7CAADca07b5dFB6C52E01329451048632E",
|
|
726
|
+
});
|
|
727
|
+
|
|
728
|
+
console.log(result);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
run();
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
### Standalone function
|
|
735
|
+
|
|
736
|
+
The standalone function version of this method:
|
|
737
|
+
|
|
738
|
+
```typescript
|
|
739
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
740
|
+
import { morphoMorphoSupplyCollateral } from "@compass-labs/api-sdk/funcs/morphoMorphoSupplyCollateral.js";
|
|
741
|
+
|
|
742
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
743
|
+
// You can create one instance of it to use across an application.
|
|
744
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
745
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
746
|
+
});
|
|
747
|
+
|
|
748
|
+
async function run() {
|
|
749
|
+
const res = await morphoMorphoSupplyCollateral(compassApiSDK, {
|
|
750
|
+
amount: 0.5,
|
|
751
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
752
|
+
chain: "base",
|
|
753
|
+
sender: "0x62e25C7CAADca07b5dFB6C52E01329451048632E",
|
|
754
|
+
});
|
|
755
|
+
if (res.ok) {
|
|
756
|
+
const { value: result } = res;
|
|
757
|
+
console.log(result);
|
|
758
|
+
} else {
|
|
759
|
+
console.log("morphoMorphoSupplyCollateral failed:", res.error);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
run();
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
### Parameters
|
|
767
|
+
|
|
768
|
+
| Parameter | Type | Required | Description |
|
|
769
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
770
|
+
| `request` | [components.MorphoSupplyCollateralRequest](../../models/components/morphosupplycollateralrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
771
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
772
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
773
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
774
|
+
|
|
775
|
+
### Response
|
|
776
|
+
|
|
777
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
778
|
+
|
|
779
|
+
### Errors
|
|
780
|
+
|
|
781
|
+
| Error Type | Status Code | Content Type |
|
|
782
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
783
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
784
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
785
|
+
|
|
786
|
+
## morphoWithdrawCollateral
|
|
787
|
+
|
|
788
|
+
Withdraw collateral that has been supplied to a Morpho Market.
|
|
789
|
+
|
|
790
|
+
A Morpho Market is a primitive lending pool that pairs one collateral asset with one
|
|
791
|
+
loan asset. Each market is isolated (meaning risks are contained within each
|
|
792
|
+
individual market), immutable (cannot be changed after deployment), and will persist
|
|
793
|
+
as long as the blockchain it is deployed on is live.
|
|
794
|
+
<Info>
|
|
795
|
+
**Required Allowances**
|
|
796
|
+
|
|
797
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
798
|
+
|
|
799
|
+
- `MorphoMarket`
|
|
800
|
+
</Info>
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
### Example Usage
|
|
804
|
+
|
|
805
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_withdraw_collateral" method="post" path="/v1/morpho/withdraw_collateral" -->
|
|
806
|
+
```typescript
|
|
807
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
808
|
+
|
|
809
|
+
const compassApiSDK = new CompassApiSDK({
|
|
810
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
async function run() {
|
|
814
|
+
const result = await compassApiSDK.morpho.morphoWithdrawCollateral({
|
|
815
|
+
amount: 0.5,
|
|
816
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
817
|
+
chain: "base",
|
|
818
|
+
sender: "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4",
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
console.log(result);
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
run();
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
### Standalone function
|
|
828
|
+
|
|
829
|
+
The standalone function version of this method:
|
|
830
|
+
|
|
831
|
+
```typescript
|
|
832
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
833
|
+
import { morphoMorphoWithdrawCollateral } from "@compass-labs/api-sdk/funcs/morphoMorphoWithdrawCollateral.js";
|
|
834
|
+
|
|
835
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
836
|
+
// You can create one instance of it to use across an application.
|
|
837
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
838
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
839
|
+
});
|
|
840
|
+
|
|
841
|
+
async function run() {
|
|
842
|
+
const res = await morphoMorphoWithdrawCollateral(compassApiSDK, {
|
|
843
|
+
amount: 0.5,
|
|
844
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
845
|
+
chain: "base",
|
|
846
|
+
sender: "0x81d310Eb515E05EB26322e2DeDE9e75b754885A4",
|
|
847
|
+
});
|
|
848
|
+
if (res.ok) {
|
|
849
|
+
const { value: result } = res;
|
|
850
|
+
console.log(result);
|
|
851
|
+
} else {
|
|
852
|
+
console.log("morphoMorphoWithdrawCollateral failed:", res.error);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
run();
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
### Parameters
|
|
860
|
+
|
|
861
|
+
| Parameter | Type | Required | Description |
|
|
862
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
863
|
+
| `request` | [components.MorphoWithdrawCollateralRequest](../../models/components/morphowithdrawcollateralrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
864
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
865
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
866
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
867
|
+
|
|
868
|
+
### Response
|
|
869
|
+
|
|
870
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
871
|
+
|
|
872
|
+
### Errors
|
|
873
|
+
|
|
874
|
+
| Error Type | Status Code | Content Type |
|
|
875
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
876
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
877
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
878
|
+
|
|
879
|
+
## morphoBorrow
|
|
880
|
+
|
|
881
|
+
Borrow tokens from a Morpho Market against supplied collateral.
|
|
882
|
+
|
|
883
|
+
The position could be liquidated when a borrower's Loan-To-Value (LTV) exceeds the
|
|
884
|
+
Liquidation Loan-To-Value (LLTV) threshold of the market.
|
|
885
|
+
|
|
886
|
+
A Morpho Market is a primitive lending pool that pairs one collateral asset with one
|
|
887
|
+
loan asset. Each market is isolated (meaning risks are contained within each
|
|
888
|
+
individual market), immutable (cannot be changed after deployment), and will persist
|
|
889
|
+
as long as the blockchain it is deployed on is live.
|
|
890
|
+
<Info>
|
|
891
|
+
**Required Allowances**
|
|
892
|
+
|
|
893
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
894
|
+
|
|
895
|
+
- `MorphoMarket`
|
|
896
|
+
</Info>
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
### Example Usage
|
|
900
|
+
|
|
901
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_borrow" method="post" path="/v1/morpho/borrow" -->
|
|
902
|
+
```typescript
|
|
903
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
904
|
+
|
|
905
|
+
const compassApiSDK = new CompassApiSDK({
|
|
906
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
907
|
+
});
|
|
908
|
+
|
|
909
|
+
async function run() {
|
|
910
|
+
const result = await compassApiSDK.morpho.morphoBorrow({
|
|
911
|
+
amount: 0.00005,
|
|
912
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
913
|
+
chain: "base",
|
|
914
|
+
sender: "0x7c90Ee2D90160B072940498DB129E0D6eC14F830",
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
console.log(result);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
run();
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
### Standalone function
|
|
924
|
+
|
|
925
|
+
The standalone function version of this method:
|
|
926
|
+
|
|
927
|
+
```typescript
|
|
928
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
929
|
+
import { morphoMorphoBorrow } from "@compass-labs/api-sdk/funcs/morphoMorphoBorrow.js";
|
|
930
|
+
|
|
931
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
932
|
+
// You can create one instance of it to use across an application.
|
|
933
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
934
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
935
|
+
});
|
|
936
|
+
|
|
937
|
+
async function run() {
|
|
938
|
+
const res = await morphoMorphoBorrow(compassApiSDK, {
|
|
939
|
+
amount: 0.00005,
|
|
940
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
941
|
+
chain: "base",
|
|
942
|
+
sender: "0x7c90Ee2D90160B072940498DB129E0D6eC14F830",
|
|
943
|
+
});
|
|
944
|
+
if (res.ok) {
|
|
945
|
+
const { value: result } = res;
|
|
946
|
+
console.log(result);
|
|
947
|
+
} else {
|
|
948
|
+
console.log("morphoMorphoBorrow failed:", res.error);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
run();
|
|
953
|
+
```
|
|
954
|
+
|
|
955
|
+
### Parameters
|
|
956
|
+
|
|
957
|
+
| Parameter | Type | Required | Description |
|
|
958
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
959
|
+
| `request` | [components.MorphoBorrowRequest](../../models/components/morphoborrowrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
960
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
961
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
962
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
963
|
+
|
|
964
|
+
### Response
|
|
965
|
+
|
|
966
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
967
|
+
|
|
968
|
+
### Errors
|
|
969
|
+
|
|
970
|
+
| Error Type | Status Code | Content Type |
|
|
971
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
972
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
973
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
974
|
+
|
|
975
|
+
## morphoRepay
|
|
976
|
+
|
|
977
|
+
Repay borrowed tokens to a market in order to reduce or eliminate debt.
|
|
978
|
+
|
|
979
|
+
A Morpho Market is a primitive lending pool that pairs one collateral asset with one
|
|
980
|
+
loan asset. Each market is isolated (meaning risks are contained within each
|
|
981
|
+
individual market), immutable (cannot be changed after deployment), and will persist
|
|
982
|
+
as long as the blockchain it is deployed on is live.
|
|
983
|
+
<Info>
|
|
984
|
+
**Required Allowances**
|
|
985
|
+
|
|
986
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
987
|
+
|
|
988
|
+
- `MorphoMarket`
|
|
989
|
+
</Info>
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
### Example Usage
|
|
993
|
+
|
|
994
|
+
<!-- UsageSnippet language="typescript" operationID="v1_morpho_repay" method="post" path="/v1/morpho/repay" -->
|
|
995
|
+
```typescript
|
|
996
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
997
|
+
|
|
998
|
+
const compassApiSDK = new CompassApiSDK({
|
|
999
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
1000
|
+
});
|
|
1001
|
+
|
|
1002
|
+
async function run() {
|
|
1003
|
+
const result = await compassApiSDK.morpho.morphoRepay({
|
|
1004
|
+
amount: 0.000005,
|
|
1005
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
1006
|
+
chain: "base",
|
|
1007
|
+
sender: "0xbc267D24E58b429347026346c0C103b8Fa95D93d",
|
|
1008
|
+
});
|
|
1009
|
+
|
|
1010
|
+
console.log(result);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
run();
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
### Standalone function
|
|
1017
|
+
|
|
1018
|
+
The standalone function version of this method:
|
|
1019
|
+
|
|
1020
|
+
```typescript
|
|
1021
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
1022
|
+
import { morphoMorphoRepay } from "@compass-labs/api-sdk/funcs/morphoMorphoRepay.js";
|
|
1023
|
+
|
|
1024
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
1025
|
+
// You can create one instance of it to use across an application.
|
|
1026
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
1027
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
1028
|
+
});
|
|
1029
|
+
|
|
1030
|
+
async function run() {
|
|
1031
|
+
const res = await morphoMorphoRepay(compassApiSDK, {
|
|
1032
|
+
amount: 0.000005,
|
|
1033
|
+
uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
|
|
1034
|
+
chain: "base",
|
|
1035
|
+
sender: "0xbc267D24E58b429347026346c0C103b8Fa95D93d",
|
|
1036
|
+
});
|
|
1037
|
+
if (res.ok) {
|
|
1038
|
+
const { value: result } = res;
|
|
1039
|
+
console.log(result);
|
|
1040
|
+
} else {
|
|
1041
|
+
console.log("morphoMorphoRepay failed:", res.error);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
run();
|
|
1046
|
+
```
|
|
1047
|
+
|
|
1048
|
+
### Parameters
|
|
1049
|
+
|
|
1050
|
+
| Parameter | Type | Required | Description |
|
|
1051
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1052
|
+
| `request` | [components.MorphoRepayRequest](../../models/components/morphorepayrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1053
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1054
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1055
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1056
|
+
|
|
1057
|
+
### Response
|
|
1058
|
+
|
|
1059
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
1060
|
+
|
|
1061
|
+
### Errors
|
|
1062
|
+
|
|
1063
|
+
| Error Type | Status Code | Content Type |
|
|
1064
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
1065
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
1066
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|