@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,947 @@
|
|
|
1
|
+
# UniswapV3
|
|
2
|
+
(*uniswapV3*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [uniswapQuoteBuyExactly](#uniswapquotebuyexactly) - Get Quote - to Specified Amount
|
|
9
|
+
* [uniswapQuoteSellExactly](#uniswapquotesellexactly) - Get quote - From Specified Amount
|
|
10
|
+
* [uniswapPoolPrice](#uniswappoolprice) - Pool Price
|
|
11
|
+
* [uniswapLiquidityProvisionInRange](#uniswapliquidityprovisioninrange) - Check if LP is Active.
|
|
12
|
+
* [uniswapLiquidityProvisionPositions](#uniswapliquidityprovisionpositions) - List LP
|
|
13
|
+
* [uniswapSwapBuyExactly](#uniswapswapbuyexactly) - Buy exact amount
|
|
14
|
+
* [uniswapSwapSellExactly](#uniswapswapsellexactly) - Sell exact amount
|
|
15
|
+
* [uniswapLiquidityProvisionMint](#uniswapliquidityprovisionmint) - Open a new LP position
|
|
16
|
+
* [uniswapLiquidityProvisionIncrease](#uniswapliquidityprovisionincrease) - Increase an LP position
|
|
17
|
+
* [uniswapLiquidityProvisionWithdraw](#uniswapliquidityprovisionwithdraw) - Withdraw an LP position
|
|
18
|
+
|
|
19
|
+
## uniswapQuoteBuyExactly
|
|
20
|
+
|
|
21
|
+
This endpoint calculates the amount of input tokens required to purchase a
|
|
22
|
+
specified amount of output tokens from a Uniswap pool.
|
|
23
|
+
|
|
24
|
+
It also provides the resulting price after the transaction. The calculation takes
|
|
25
|
+
into account the current pool state and the specified fee tier.
|
|
26
|
+
|
|
27
|
+
### Example Usage
|
|
28
|
+
|
|
29
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_quote_buy_exactly" method="get" path="/v1/uniswap/quote/buy_exactly" -->
|
|
30
|
+
```typescript
|
|
31
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
32
|
+
|
|
33
|
+
const compassApiSDK = new CompassApiSDK({
|
|
34
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
async function run() {
|
|
38
|
+
const result = await compassApiSDK.uniswapV3.uniswapQuoteBuyExactly({
|
|
39
|
+
chain: "arbitrum",
|
|
40
|
+
tokenIn: "USDC",
|
|
41
|
+
tokenOut: "USDT",
|
|
42
|
+
fee: "0.01",
|
|
43
|
+
amountOut: 1,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
console.log(result);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
run();
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Standalone function
|
|
53
|
+
|
|
54
|
+
The standalone function version of this method:
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
58
|
+
import { uniswapV3UniswapQuoteBuyExactly } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapQuoteBuyExactly.js";
|
|
59
|
+
|
|
60
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
61
|
+
// You can create one instance of it to use across an application.
|
|
62
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
63
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
async function run() {
|
|
67
|
+
const res = await uniswapV3UniswapQuoteBuyExactly(compassApiSDK, {
|
|
68
|
+
chain: "arbitrum",
|
|
69
|
+
tokenIn: "USDC",
|
|
70
|
+
tokenOut: "USDT",
|
|
71
|
+
fee: "0.01",
|
|
72
|
+
amountOut: 1,
|
|
73
|
+
});
|
|
74
|
+
if (res.ok) {
|
|
75
|
+
const { value: result } = res;
|
|
76
|
+
console.log(result);
|
|
77
|
+
} else {
|
|
78
|
+
console.log("uniswapV3UniswapQuoteBuyExactly failed:", res.error);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
run();
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Parameters
|
|
86
|
+
|
|
87
|
+
| Parameter | Type | Required | Description |
|
|
88
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
89
|
+
| `request` | [operations.V1UniswapQuoteBuyExactlyRequest](../../models/operations/v1uniswapquotebuyexactlyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
90
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
91
|
+
| `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. |
|
|
92
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
93
|
+
|
|
94
|
+
### Response
|
|
95
|
+
|
|
96
|
+
**Promise\<[components.UniswapBuyQuoteInfoResponse](../../models/components/uniswapbuyquoteinforesponse.md)\>**
|
|
97
|
+
|
|
98
|
+
### Errors
|
|
99
|
+
|
|
100
|
+
| Error Type | Status Code | Content Type |
|
|
101
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
102
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
103
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
104
|
+
|
|
105
|
+
## uniswapQuoteSellExactly
|
|
106
|
+
|
|
107
|
+
This endpoint calculates the amount of input tokens required to purchase a
|
|
108
|
+
specified amount of output tokens from a Uniswap pool.
|
|
109
|
+
|
|
110
|
+
It also provides the resulting price after the transaction. The calculation takes
|
|
111
|
+
into account the current pool state and the specified fee tier.
|
|
112
|
+
|
|
113
|
+
### Example Usage
|
|
114
|
+
|
|
115
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_quote_sell_exactly" method="get" path="/v1/uniswap/quote/sell_exactly" -->
|
|
116
|
+
```typescript
|
|
117
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
118
|
+
|
|
119
|
+
const compassApiSDK = new CompassApiSDK({
|
|
120
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
async function run() {
|
|
124
|
+
const result = await compassApiSDK.uniswapV3.uniswapQuoteSellExactly({
|
|
125
|
+
chain: "arbitrum",
|
|
126
|
+
tokenIn: "USDC",
|
|
127
|
+
tokenOut: "USDT",
|
|
128
|
+
fee: "0.01",
|
|
129
|
+
amountIn: 1,
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
console.log(result);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
run();
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Standalone function
|
|
139
|
+
|
|
140
|
+
The standalone function version of this method:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
144
|
+
import { uniswapV3UniswapQuoteSellExactly } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapQuoteSellExactly.js";
|
|
145
|
+
|
|
146
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
147
|
+
// You can create one instance of it to use across an application.
|
|
148
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
149
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
async function run() {
|
|
153
|
+
const res = await uniswapV3UniswapQuoteSellExactly(compassApiSDK, {
|
|
154
|
+
chain: "arbitrum",
|
|
155
|
+
tokenIn: "USDC",
|
|
156
|
+
tokenOut: "USDT",
|
|
157
|
+
fee: "0.01",
|
|
158
|
+
amountIn: 1,
|
|
159
|
+
});
|
|
160
|
+
if (res.ok) {
|
|
161
|
+
const { value: result } = res;
|
|
162
|
+
console.log(result);
|
|
163
|
+
} else {
|
|
164
|
+
console.log("uniswapV3UniswapQuoteSellExactly failed:", res.error);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
run();
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Parameters
|
|
172
|
+
|
|
173
|
+
| Parameter | Type | Required | Description |
|
|
174
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
175
|
+
| `request` | [operations.V1UniswapQuoteSellExactlyRequest](../../models/operations/v1uniswapquotesellexactlyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
176
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
177
|
+
| `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. |
|
|
178
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
179
|
+
|
|
180
|
+
### Response
|
|
181
|
+
|
|
182
|
+
**Promise\<[components.UniswapSellQuoteInfoResponse](../../models/components/uniswapsellquoteinforesponse.md)\>**
|
|
183
|
+
|
|
184
|
+
### Errors
|
|
185
|
+
|
|
186
|
+
| Error Type | Status Code | Content Type |
|
|
187
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
188
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
189
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
190
|
+
|
|
191
|
+
## uniswapPoolPrice
|
|
192
|
+
|
|
193
|
+
This endpoint calculates the price of a token in a Uniswap pool.
|
|
194
|
+
|
|
195
|
+
The price is calculated based on the current pool state and the specified fee tier.
|
|
196
|
+
|
|
197
|
+
### Example Usage
|
|
198
|
+
|
|
199
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_pool_price" method="get" path="/v1/uniswap/pool_price" -->
|
|
200
|
+
```typescript
|
|
201
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
202
|
+
|
|
203
|
+
const compassApiSDK = new CompassApiSDK({
|
|
204
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
async function run() {
|
|
208
|
+
const result = await compassApiSDK.uniswapV3.uniswapPoolPrice({
|
|
209
|
+
chain: "arbitrum",
|
|
210
|
+
tokenIn: "USDC",
|
|
211
|
+
tokenOut: "USDT",
|
|
212
|
+
fee: "0.01",
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
console.log(result);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
run();
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Standalone function
|
|
222
|
+
|
|
223
|
+
The standalone function version of this method:
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
227
|
+
import { uniswapV3UniswapPoolPrice } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapPoolPrice.js";
|
|
228
|
+
|
|
229
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
230
|
+
// You can create one instance of it to use across an application.
|
|
231
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
232
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
async function run() {
|
|
236
|
+
const res = await uniswapV3UniswapPoolPrice(compassApiSDK, {
|
|
237
|
+
chain: "arbitrum",
|
|
238
|
+
tokenIn: "USDC",
|
|
239
|
+
tokenOut: "USDT",
|
|
240
|
+
fee: "0.01",
|
|
241
|
+
});
|
|
242
|
+
if (res.ok) {
|
|
243
|
+
const { value: result } = res;
|
|
244
|
+
console.log(result);
|
|
245
|
+
} else {
|
|
246
|
+
console.log("uniswapV3UniswapPoolPrice failed:", res.error);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
run();
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Parameters
|
|
254
|
+
|
|
255
|
+
| Parameter | Type | Required | Description |
|
|
256
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
257
|
+
| `request` | [operations.V1UniswapPoolPriceRequest](../../models/operations/v1uniswappoolpricerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
258
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
259
|
+
| `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. |
|
|
260
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
261
|
+
|
|
262
|
+
### Response
|
|
263
|
+
|
|
264
|
+
**Promise\<[components.UniswapPoolPriceResponse](../../models/components/uniswappoolpriceresponse.md)\>**
|
|
265
|
+
|
|
266
|
+
### Errors
|
|
267
|
+
|
|
268
|
+
| Error Type | Status Code | Content Type |
|
|
269
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
270
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
271
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
272
|
+
|
|
273
|
+
## uniswapLiquidityProvisionInRange
|
|
274
|
+
|
|
275
|
+
This endpoint allows users to check whether a specific liquidity provider ()
|
|
276
|
+
position is within the active tick range on the uniswap platform.
|
|
277
|
+
|
|
278
|
+
by providing the token id associated with the position, users can verify if the
|
|
279
|
+
position is currently within the tick range where trading occurs. this information
|
|
280
|
+
is essential for users to monitor the status of their lp positions and ensure that
|
|
281
|
+
they are actively participating in the trading activities within the liquidity pool
|
|
282
|
+
and earning trading fees.
|
|
283
|
+
|
|
284
|
+
### Example Usage
|
|
285
|
+
|
|
286
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_liquidity_provision_in_range" method="get" path="/v1/uniswap/liquidity_provision/in_range" -->
|
|
287
|
+
```typescript
|
|
288
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
289
|
+
|
|
290
|
+
const compassApiSDK = new CompassApiSDK({
|
|
291
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
async function run() {
|
|
295
|
+
const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionInRange({
|
|
296
|
+
chain: "arbitrum",
|
|
297
|
+
tokenId: 4318185,
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
console.log(result);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
run();
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Standalone function
|
|
307
|
+
|
|
308
|
+
The standalone function version of this method:
|
|
309
|
+
|
|
310
|
+
```typescript
|
|
311
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
312
|
+
import { uniswapV3UniswapLiquidityProvisionInRange } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapLiquidityProvisionInRange.js";
|
|
313
|
+
|
|
314
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
315
|
+
// You can create one instance of it to use across an application.
|
|
316
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
317
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
async function run() {
|
|
321
|
+
const res = await uniswapV3UniswapLiquidityProvisionInRange(compassApiSDK, {
|
|
322
|
+
chain: "arbitrum",
|
|
323
|
+
tokenId: 4318185,
|
|
324
|
+
});
|
|
325
|
+
if (res.ok) {
|
|
326
|
+
const { value: result } = res;
|
|
327
|
+
console.log(result);
|
|
328
|
+
} else {
|
|
329
|
+
console.log("uniswapV3UniswapLiquidityProvisionInRange failed:", res.error);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
run();
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Parameters
|
|
337
|
+
|
|
338
|
+
| Parameter | Type | Required | Description |
|
|
339
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
340
|
+
| `request` | [operations.V1UniswapLiquidityProvisionInRangeRequest](../../models/operations/v1uniswapliquidityprovisioninrangerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
341
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
342
|
+
| `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. |
|
|
343
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
344
|
+
|
|
345
|
+
### Response
|
|
346
|
+
|
|
347
|
+
**Promise\<[components.UniswapCheckInRangeResponse](../../models/components/uniswapcheckinrangeresponse.md)\>**
|
|
348
|
+
|
|
349
|
+
### Errors
|
|
350
|
+
|
|
351
|
+
| Error Type | Status Code | Content Type |
|
|
352
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
353
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
354
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
355
|
+
|
|
356
|
+
## uniswapLiquidityProvisionPositions
|
|
357
|
+
|
|
358
|
+
This endpoint retrieves the number of Liquidity Provider (LP) positions
|
|
359
|
+
associated with a specific sender address on the Uniswap platform.
|
|
360
|
+
|
|
361
|
+
Users can query this endpoint to obtain detailed information about their LP
|
|
362
|
+
positions, including the total number of positions and relevant metadata. This
|
|
363
|
+
information is crucial for users to manage and analyze their liquidity provision
|
|
364
|
+
activities effectively.
|
|
365
|
+
|
|
366
|
+
### Example Usage
|
|
367
|
+
|
|
368
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_liquidity_provision_positions" method="get" path="/v1/uniswap/liquidity_provision/positions" -->
|
|
369
|
+
```typescript
|
|
370
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
371
|
+
|
|
372
|
+
const compassApiSDK = new CompassApiSDK({
|
|
373
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
async function run() {
|
|
377
|
+
const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionPositions({
|
|
378
|
+
chain: "arbitrum",
|
|
379
|
+
user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
console.log(result);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
run();
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### Standalone function
|
|
389
|
+
|
|
390
|
+
The standalone function version of this method:
|
|
391
|
+
|
|
392
|
+
```typescript
|
|
393
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
394
|
+
import { uniswapV3UniswapLiquidityProvisionPositions } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapLiquidityProvisionPositions.js";
|
|
395
|
+
|
|
396
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
397
|
+
// You can create one instance of it to use across an application.
|
|
398
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
399
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
async function run() {
|
|
403
|
+
const res = await uniswapV3UniswapLiquidityProvisionPositions(compassApiSDK, {
|
|
404
|
+
chain: "arbitrum",
|
|
405
|
+
user: "0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
406
|
+
});
|
|
407
|
+
if (res.ok) {
|
|
408
|
+
const { value: result } = res;
|
|
409
|
+
console.log(result);
|
|
410
|
+
} else {
|
|
411
|
+
console.log("uniswapV3UniswapLiquidityProvisionPositions failed:", res.error);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
run();
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### Parameters
|
|
419
|
+
|
|
420
|
+
| Parameter | Type | Required | Description |
|
|
421
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
422
|
+
| `request` | [operations.V1UniswapLiquidityProvisionPositionsRequest](../../models/operations/v1uniswapliquidityprovisionpositionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
423
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
424
|
+
| `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. |
|
|
425
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
426
|
+
|
|
427
|
+
### Response
|
|
428
|
+
|
|
429
|
+
**Promise\<[components.UniswapLPPositionsInfoResponse](../../models/components/uniswaplppositionsinforesponse.md)\>**
|
|
430
|
+
|
|
431
|
+
### Errors
|
|
432
|
+
|
|
433
|
+
| Error Type | Status Code | Content Type |
|
|
434
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
435
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
436
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
437
|
+
|
|
438
|
+
## uniswapSwapBuyExactly
|
|
439
|
+
|
|
440
|
+
This endpoint allows users to trade a variable amount of one token to receive an
|
|
441
|
+
exact amount of another token using the Uniswap protocol.
|
|
442
|
+
|
|
443
|
+
The transaction is executed on the specified blockchain network, and the user must
|
|
444
|
+
provide the necessary transaction details, including the token to buy, the token to
|
|
445
|
+
pay with, and the exact amount to receive. If the token being paid with is ETH and
|
|
446
|
+
needs to be wrapped, the appropriate amount will be wrapped automatically.
|
|
447
|
+
<Info>
|
|
448
|
+
**Required Allowances**
|
|
449
|
+
|
|
450
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
451
|
+
|
|
452
|
+
- `UniswapV3Router`
|
|
453
|
+
</Info>
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
### Example Usage
|
|
457
|
+
|
|
458
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_swap_buy_exactly" method="post" path="/v1/uniswap/swap/buy_exactly" -->
|
|
459
|
+
```typescript
|
|
460
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
461
|
+
|
|
462
|
+
const compassApiSDK = new CompassApiSDK({
|
|
463
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
async function run() {
|
|
467
|
+
const result = await compassApiSDK.uniswapV3.uniswapSwapBuyExactly({
|
|
468
|
+
tokenIn: "USDC",
|
|
469
|
+
tokenOut: "USDT",
|
|
470
|
+
fee: "0.01",
|
|
471
|
+
amountOut: 0.1,
|
|
472
|
+
maxSlippagePercent: 0.5,
|
|
473
|
+
chain: "base",
|
|
474
|
+
sender: "0x7a27794511C14F6afFDE618D3d8ef7B9C24058Ac",
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
console.log(result);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
run();
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### Standalone function
|
|
484
|
+
|
|
485
|
+
The standalone function version of this method:
|
|
486
|
+
|
|
487
|
+
```typescript
|
|
488
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
489
|
+
import { uniswapV3UniswapSwapBuyExactly } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapSwapBuyExactly.js";
|
|
490
|
+
|
|
491
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
492
|
+
// You can create one instance of it to use across an application.
|
|
493
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
494
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
async function run() {
|
|
498
|
+
const res = await uniswapV3UniswapSwapBuyExactly(compassApiSDK, {
|
|
499
|
+
tokenIn: "USDC",
|
|
500
|
+
tokenOut: "USDT",
|
|
501
|
+
fee: "0.01",
|
|
502
|
+
amountOut: 0.1,
|
|
503
|
+
maxSlippagePercent: 0.5,
|
|
504
|
+
chain: "base",
|
|
505
|
+
sender: "0x7a27794511C14F6afFDE618D3d8ef7B9C24058Ac",
|
|
506
|
+
});
|
|
507
|
+
if (res.ok) {
|
|
508
|
+
const { value: result } = res;
|
|
509
|
+
console.log(result);
|
|
510
|
+
} else {
|
|
511
|
+
console.log("uniswapV3UniswapSwapBuyExactly failed:", res.error);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
run();
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### Parameters
|
|
519
|
+
|
|
520
|
+
| Parameter | Type | Required | Description |
|
|
521
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
522
|
+
| `request` | [components.UniswapBuyExactlyRequest](../../models/components/uniswapbuyexactlyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
523
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
524
|
+
| `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. |
|
|
525
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
526
|
+
|
|
527
|
+
### Response
|
|
528
|
+
|
|
529
|
+
**Promise\<[components.UniswapBuyExactlyTransactionResponse](../../models/components/uniswapbuyexactlytransactionresponse.md)\>**
|
|
530
|
+
|
|
531
|
+
### Errors
|
|
532
|
+
|
|
533
|
+
| Error Type | Status Code | Content Type |
|
|
534
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
535
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
536
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
537
|
+
|
|
538
|
+
## uniswapSwapSellExactly
|
|
539
|
+
|
|
540
|
+
This endpoint allows users to trade a specific amount of one token into another
|
|
541
|
+
token using the Uniswap protocol.
|
|
542
|
+
|
|
543
|
+
The transaction is executed on the specified blockchain network, and the user must
|
|
544
|
+
provide the necessary transaction details, including the token to sell, the token to
|
|
545
|
+
receive, and the amount to sell. If the token being sold is ETH and needs to be
|
|
546
|
+
wrapped, the appropriate amount will be wrapped automatically.
|
|
547
|
+
<Info>
|
|
548
|
+
**Required Allowances**
|
|
549
|
+
|
|
550
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
551
|
+
|
|
552
|
+
- `UniswapV3Router`
|
|
553
|
+
</Info>
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
### Example Usage
|
|
557
|
+
|
|
558
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_swap_sell_exactly" method="post" path="/v1/uniswap/swap/sell_exactly" -->
|
|
559
|
+
```typescript
|
|
560
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
561
|
+
|
|
562
|
+
const compassApiSDK = new CompassApiSDK({
|
|
563
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
564
|
+
});
|
|
565
|
+
|
|
566
|
+
async function run() {
|
|
567
|
+
const result = await compassApiSDK.uniswapV3.uniswapSwapSellExactly({
|
|
568
|
+
tokenIn: "USDC",
|
|
569
|
+
tokenOut: "USDT",
|
|
570
|
+
fee: "0.01",
|
|
571
|
+
amountIn: 0.1,
|
|
572
|
+
maxSlippagePercent: 0.5,
|
|
573
|
+
chain: "base",
|
|
574
|
+
sender: "0xA7DeA16238DdF6ed8AaC73A348bbdE6da20C20B5",
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
console.log(result);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
run();
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### Standalone function
|
|
584
|
+
|
|
585
|
+
The standalone function version of this method:
|
|
586
|
+
|
|
587
|
+
```typescript
|
|
588
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
589
|
+
import { uniswapV3UniswapSwapSellExactly } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapSwapSellExactly.js";
|
|
590
|
+
|
|
591
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
592
|
+
// You can create one instance of it to use across an application.
|
|
593
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
594
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
async function run() {
|
|
598
|
+
const res = await uniswapV3UniswapSwapSellExactly(compassApiSDK, {
|
|
599
|
+
tokenIn: "USDC",
|
|
600
|
+
tokenOut: "USDT",
|
|
601
|
+
fee: "0.01",
|
|
602
|
+
amountIn: 0.1,
|
|
603
|
+
maxSlippagePercent: 0.5,
|
|
604
|
+
chain: "base",
|
|
605
|
+
sender: "0xA7DeA16238DdF6ed8AaC73A348bbdE6da20C20B5",
|
|
606
|
+
});
|
|
607
|
+
if (res.ok) {
|
|
608
|
+
const { value: result } = res;
|
|
609
|
+
console.log(result);
|
|
610
|
+
} else {
|
|
611
|
+
console.log("uniswapV3UniswapSwapSellExactly failed:", res.error);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
run();
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
### Parameters
|
|
619
|
+
|
|
620
|
+
| Parameter | Type | Required | Description |
|
|
621
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
622
|
+
| `request` | [components.UniswapSellExactlyRequest](../../models/components/uniswapsellexactlyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
623
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
624
|
+
| `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. |
|
|
625
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
626
|
+
|
|
627
|
+
### Response
|
|
628
|
+
|
|
629
|
+
**Promise\<[components.UniswapSellExactlyTransactionResponse](../../models/components/uniswapsellexactlytransactionresponse.md)\>**
|
|
630
|
+
|
|
631
|
+
### Errors
|
|
632
|
+
|
|
633
|
+
| Error Type | Status Code | Content Type |
|
|
634
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
635
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
636
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
637
|
+
|
|
638
|
+
## uniswapLiquidityProvisionMint
|
|
639
|
+
|
|
640
|
+
This endpoint allows users to open a new Liquidity Provider (LP) position on the
|
|
641
|
+
Uniswap platform.
|
|
642
|
+
|
|
643
|
+
By providing the necessary parameters, users can initiate a minting process to
|
|
644
|
+
create a new LP token, which represents their stake in a specific liquidity pool.
|
|
645
|
+
This operation is essential for users looking to participate in liquidity provision,
|
|
646
|
+
enabling them to earn fees from trades that occur within the pool. The endpoint
|
|
647
|
+
requires details such as the token pair, amount, and any additional parameters
|
|
648
|
+
needed for the minting process.
|
|
649
|
+
<Info>
|
|
650
|
+
**Required Allowances**
|
|
651
|
+
|
|
652
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
653
|
+
|
|
654
|
+
- `UniswapV3NFTPositionManager`
|
|
655
|
+
</Info>
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
### Example Usage
|
|
659
|
+
|
|
660
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_liquidity_provision_mint" method="post" path="/v1/uniswap/liquidity_provision/mint" -->
|
|
661
|
+
```typescript
|
|
662
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
663
|
+
|
|
664
|
+
const compassApiSDK = new CompassApiSDK({
|
|
665
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
async function run() {
|
|
669
|
+
const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionMint({
|
|
670
|
+
token0: "USDC",
|
|
671
|
+
token1: "USDT",
|
|
672
|
+
fee: "1.0",
|
|
673
|
+
tickLower: 1823,
|
|
674
|
+
tickUpper: 2623,
|
|
675
|
+
amount0Desired: "0.05",
|
|
676
|
+
amount1Desired: "0.00",
|
|
677
|
+
amount0Min: "0",
|
|
678
|
+
amount1Min: "0",
|
|
679
|
+
recipient: "0x41096de529D54718a5600185F8C4460979ed75C9",
|
|
680
|
+
chain: "base",
|
|
681
|
+
sender: "0x41096de529D54718a5600185F8C4460979ed75C9",
|
|
682
|
+
});
|
|
683
|
+
|
|
684
|
+
console.log(result);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
run();
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
### Standalone function
|
|
691
|
+
|
|
692
|
+
The standalone function version of this method:
|
|
693
|
+
|
|
694
|
+
```typescript
|
|
695
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
696
|
+
import { uniswapV3UniswapLiquidityProvisionMint } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapLiquidityProvisionMint.js";
|
|
697
|
+
|
|
698
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
699
|
+
// You can create one instance of it to use across an application.
|
|
700
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
701
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
async function run() {
|
|
705
|
+
const res = await uniswapV3UniswapLiquidityProvisionMint(compassApiSDK, {
|
|
706
|
+
token0: "USDC",
|
|
707
|
+
token1: "USDT",
|
|
708
|
+
fee: "1.0",
|
|
709
|
+
tickLower: 1823,
|
|
710
|
+
tickUpper: 2623,
|
|
711
|
+
amount0Desired: "0.05",
|
|
712
|
+
amount1Desired: "0.00",
|
|
713
|
+
amount0Min: "0",
|
|
714
|
+
amount1Min: "0",
|
|
715
|
+
recipient: "0x41096de529D54718a5600185F8C4460979ed75C9",
|
|
716
|
+
chain: "base",
|
|
717
|
+
sender: "0x41096de529D54718a5600185F8C4460979ed75C9",
|
|
718
|
+
});
|
|
719
|
+
if (res.ok) {
|
|
720
|
+
const { value: result } = res;
|
|
721
|
+
console.log(result);
|
|
722
|
+
} else {
|
|
723
|
+
console.log("uniswapV3UniswapLiquidityProvisionMint failed:", res.error);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
run();
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
### Parameters
|
|
731
|
+
|
|
732
|
+
| Parameter | Type | Required | Description |
|
|
733
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
734
|
+
| `request` | [components.UniswapMintLiquidityProvisionRequest](../../models/components/uniswapmintliquidityprovisionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
735
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
736
|
+
| `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. |
|
|
737
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
738
|
+
|
|
739
|
+
### Response
|
|
740
|
+
|
|
741
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
742
|
+
|
|
743
|
+
### Errors
|
|
744
|
+
|
|
745
|
+
| Error Type | Status Code | Content Type |
|
|
746
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
747
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
748
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
749
|
+
|
|
750
|
+
## uniswapLiquidityProvisionIncrease
|
|
751
|
+
|
|
752
|
+
This endpoint allows users to increase their existing Liquidity Provider (LP)
|
|
753
|
+
positions on the Uniswap platform.
|
|
754
|
+
|
|
755
|
+
By providing the necessary parameters, users can add more liquidity to their current
|
|
756
|
+
positions, thereby increasing their stake in the liquidity pool. This operation is
|
|
757
|
+
beneficial for users who wish to enhance their potential earnings from trading fees
|
|
758
|
+
within the pool. The endpoint requires details such as the token pair, additional
|
|
759
|
+
amount to be added, and any other parameters necessary for the liquidity increase
|
|
760
|
+
process.
|
|
761
|
+
<Info>
|
|
762
|
+
**Required Allowances**
|
|
763
|
+
|
|
764
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
765
|
+
|
|
766
|
+
- `AerodromeSlipstreamRouter`
|
|
767
|
+
</Info>
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
### Example Usage
|
|
771
|
+
|
|
772
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_liquidity_provision_increase" method="post" path="/v1/uniswap/liquidity_provision/increase" -->
|
|
773
|
+
```typescript
|
|
774
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
775
|
+
|
|
776
|
+
const compassApiSDK = new CompassApiSDK({
|
|
777
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
async function run() {
|
|
781
|
+
const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionIncrease({
|
|
782
|
+
tokenId: 3432182,
|
|
783
|
+
amount0Desired: "0.3",
|
|
784
|
+
amount1Desired: "0.0",
|
|
785
|
+
amount0Min: "0.00",
|
|
786
|
+
amount1Min: "0.00",
|
|
787
|
+
chain: "base",
|
|
788
|
+
sender: "0x41096de529D54718a5600185F8C4460979ed75C9",
|
|
789
|
+
});
|
|
790
|
+
|
|
791
|
+
console.log(result);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
run();
|
|
795
|
+
```
|
|
796
|
+
|
|
797
|
+
### Standalone function
|
|
798
|
+
|
|
799
|
+
The standalone function version of this method:
|
|
800
|
+
|
|
801
|
+
```typescript
|
|
802
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
803
|
+
import { uniswapV3UniswapLiquidityProvisionIncrease } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapLiquidityProvisionIncrease.js";
|
|
804
|
+
|
|
805
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
806
|
+
// You can create one instance of it to use across an application.
|
|
807
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
808
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
async function run() {
|
|
812
|
+
const res = await uniswapV3UniswapLiquidityProvisionIncrease(compassApiSDK, {
|
|
813
|
+
tokenId: 3432182,
|
|
814
|
+
amount0Desired: "0.3",
|
|
815
|
+
amount1Desired: "0.0",
|
|
816
|
+
amount0Min: "0.00",
|
|
817
|
+
amount1Min: "0.00",
|
|
818
|
+
chain: "base",
|
|
819
|
+
sender: "0x41096de529D54718a5600185F8C4460979ed75C9",
|
|
820
|
+
});
|
|
821
|
+
if (res.ok) {
|
|
822
|
+
const { value: result } = res;
|
|
823
|
+
console.log(result);
|
|
824
|
+
} else {
|
|
825
|
+
console.log("uniswapV3UniswapLiquidityProvisionIncrease failed:", res.error);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
run();
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
### Parameters
|
|
833
|
+
|
|
834
|
+
| Parameter | Type | Required | Description |
|
|
835
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
836
|
+
| `request` | [components.UniswapIncreaseLiquidityProvisionRequest](../../models/components/uniswapincreaseliquidityprovisionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
837
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
838
|
+
| `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. |
|
|
839
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
840
|
+
|
|
841
|
+
### Response
|
|
842
|
+
|
|
843
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
844
|
+
|
|
845
|
+
### Errors
|
|
846
|
+
|
|
847
|
+
| Error Type | Status Code | Content Type |
|
|
848
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
849
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
850
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
851
|
+
|
|
852
|
+
## uniswapLiquidityProvisionWithdraw
|
|
853
|
+
|
|
854
|
+
This endpoint allows users to withdraw their Liquidity Provider (LP) positions
|
|
855
|
+
from the Uniswap platform.
|
|
856
|
+
|
|
857
|
+
By specifying the necessary parameters, users can initiate the withdrawal process to
|
|
858
|
+
remove their stake from a specific liquidity pool. This operation is crucial for
|
|
859
|
+
users who wish to reclaim their assets or reallocate their liquidity to different
|
|
860
|
+
pools or investments. The endpoint requires details such as the token pair, the
|
|
861
|
+
amount to be withdrawn, and any additional parameters needed for the withdrawal
|
|
862
|
+
process. Users should ensure they meet any protocol requirements or conditions
|
|
863
|
+
before initiating a withdrawal to avoid potential issues or penalties.
|
|
864
|
+
<Info>
|
|
865
|
+
**Required Allowances**
|
|
866
|
+
|
|
867
|
+
In order to make this transaction, token allowances need to be set for the following contracts.
|
|
868
|
+
|
|
869
|
+
- `UniswapV3NFTPositionManager`
|
|
870
|
+
</Info>
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
### Example Usage
|
|
874
|
+
|
|
875
|
+
<!-- UsageSnippet language="typescript" operationID="v1_uniswap_liquidity_provision_withdraw" method="post" path="/v1/uniswap/liquidity_provision/withdraw" -->
|
|
876
|
+
```typescript
|
|
877
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
878
|
+
|
|
879
|
+
const compassApiSDK = new CompassApiSDK({
|
|
880
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
async function run() {
|
|
884
|
+
const result = await compassApiSDK.uniswapV3.uniswapLiquidityProvisionWithdraw({
|
|
885
|
+
tokenId: 3432182,
|
|
886
|
+
percentageForWithdrawal: 1,
|
|
887
|
+
chain: "base",
|
|
888
|
+
sender: "0x41096de529D54718a5600185F8C4460979ed75C9",
|
|
889
|
+
});
|
|
890
|
+
|
|
891
|
+
console.log(result);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
run();
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
### Standalone function
|
|
898
|
+
|
|
899
|
+
The standalone function version of this method:
|
|
900
|
+
|
|
901
|
+
```typescript
|
|
902
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
903
|
+
import { uniswapV3UniswapLiquidityProvisionWithdraw } from "@compass-labs/api-sdk/funcs/uniswapV3UniswapLiquidityProvisionWithdraw.js";
|
|
904
|
+
|
|
905
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
906
|
+
// You can create one instance of it to use across an application.
|
|
907
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
908
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
909
|
+
});
|
|
910
|
+
|
|
911
|
+
async function run() {
|
|
912
|
+
const res = await uniswapV3UniswapLiquidityProvisionWithdraw(compassApiSDK, {
|
|
913
|
+
tokenId: 3432182,
|
|
914
|
+
percentageForWithdrawal: 1,
|
|
915
|
+
chain: "base",
|
|
916
|
+
sender: "0x41096de529D54718a5600185F8C4460979ed75C9",
|
|
917
|
+
});
|
|
918
|
+
if (res.ok) {
|
|
919
|
+
const { value: result } = res;
|
|
920
|
+
console.log(result);
|
|
921
|
+
} else {
|
|
922
|
+
console.log("uniswapV3UniswapLiquidityProvisionWithdraw failed:", res.error);
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
run();
|
|
927
|
+
```
|
|
928
|
+
|
|
929
|
+
### Parameters
|
|
930
|
+
|
|
931
|
+
| Parameter | Type | Required | Description |
|
|
932
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
933
|
+
| `request` | [components.UniswapWithdrawLiquidityProvisionRequest](../../models/components/uniswapwithdrawliquidityprovisionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
934
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
935
|
+
| `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. |
|
|
936
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
937
|
+
|
|
938
|
+
### Response
|
|
939
|
+
|
|
940
|
+
**Promise\<[components.TransactionResponse](../../models/components/transactionresponse.md)\>**
|
|
941
|
+
|
|
942
|
+
### Errors
|
|
943
|
+
|
|
944
|
+
| Error Type | Status Code | Content Type |
|
|
945
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
946
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
947
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|