damm-sdk 1.4.24 → 1.4.26
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/dist/index.cjs +2017 -2001
- package/dist/index.cjs.map +16 -17
- package/dist/index.js +51 -5
- package/dist/index.js.map +4 -4
- package/dist/integrations/aaveV3/aave.v3.d.ts +17 -0
- package/dist/integrations/aaveV3/aave.v3.d.ts.map +1 -1
- package/dist/integrations/enso/enso.route.api.d.ts +18 -2
- package/dist/integrations/enso/enso.route.api.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/integrations/aaveV3/aave.v3.ts +64 -0
- package/src/integrations/enso/enso.route.api.ts +31 -6
package/dist/index.js
CHANGED
|
@@ -58070,6 +58070,37 @@ var repayToAaveV3Trx = ({
|
|
|
58070
58070
|
data
|
|
58071
58071
|
});
|
|
58072
58072
|
};
|
|
58073
|
+
var SetUserEModeOnAaveV3Calldata = ({ categoryId }) => {
|
|
58074
|
+
return poolInterface_L1.encodeFunctionData("setUserEMode", [categoryId]);
|
|
58075
|
+
};
|
|
58076
|
+
var setUserEModeOnAaveV3Trx = ({
|
|
58077
|
+
poolAddress,
|
|
58078
|
+
args
|
|
58079
|
+
}) => {
|
|
58080
|
+
return createCall({
|
|
58081
|
+
operation: 0,
|
|
58082
|
+
to: poolAddress,
|
|
58083
|
+
value: 0n,
|
|
58084
|
+
data: SetUserEModeOnAaveV3Calldata(args)
|
|
58085
|
+
});
|
|
58086
|
+
};
|
|
58087
|
+
var SetUserUseReserveAsCollateralOnAaveV3Calldata = ({
|
|
58088
|
+
asset,
|
|
58089
|
+
useAsCollateral
|
|
58090
|
+
}) => {
|
|
58091
|
+
return poolInterface_L1.encodeFunctionData("setUserUseReserveAsCollateral", [asset, useAsCollateral]);
|
|
58092
|
+
};
|
|
58093
|
+
var setUserUseReserveAsCollateralOnAaveV3Trx = ({
|
|
58094
|
+
poolAddress,
|
|
58095
|
+
args
|
|
58096
|
+
}) => {
|
|
58097
|
+
return createCall({
|
|
58098
|
+
operation: 0,
|
|
58099
|
+
to: poolAddress,
|
|
58100
|
+
value: 0n,
|
|
58101
|
+
data: SetUserUseReserveAsCollateralOnAaveV3Calldata(args)
|
|
58102
|
+
});
|
|
58103
|
+
};
|
|
58073
58104
|
// src/integrations/uniswapV3/swap.router.01.abi.ts
|
|
58074
58105
|
var swap_router_01_abi_default = [
|
|
58075
58106
|
{
|
|
@@ -89434,6 +89465,13 @@ var enso_router_abi_default = [
|
|
|
89434
89465
|
// src/integrations/enso/enso.route.api.ts
|
|
89435
89466
|
var ENSO_API_BASE = "https://api.enso.finance";
|
|
89436
89467
|
|
|
89468
|
+
class EnsoApiKeyMissingError extends Error {
|
|
89469
|
+
constructor() {
|
|
89470
|
+
super("Enso API key required; pass `apiKey`.");
|
|
89471
|
+
this.name = "EnsoApiKeyMissingError";
|
|
89472
|
+
}
|
|
89473
|
+
}
|
|
89474
|
+
|
|
89437
89475
|
class EnsoRouteApiError extends Error {
|
|
89438
89476
|
status;
|
|
89439
89477
|
statusText;
|
|
@@ -89465,6 +89503,9 @@ var fetchEnsoRoute = async (args) => {
|
|
|
89465
89503
|
apiKey,
|
|
89466
89504
|
apiBase = ENSO_API_BASE
|
|
89467
89505
|
} = args;
|
|
89506
|
+
if (!apiKey) {
|
|
89507
|
+
throw new EnsoApiKeyMissingError;
|
|
89508
|
+
}
|
|
89468
89509
|
const params = new URLSearchParams({
|
|
89469
89510
|
chainId: String(chainId),
|
|
89470
89511
|
fromAddress,
|
|
@@ -89474,10 +89515,10 @@ var fetchEnsoRoute = async (args) => {
|
|
|
89474
89515
|
amountIn,
|
|
89475
89516
|
slippage: String(slippageBips)
|
|
89476
89517
|
});
|
|
89477
|
-
const headers = {
|
|
89478
|
-
|
|
89479
|
-
|
|
89480
|
-
}
|
|
89518
|
+
const headers = {
|
|
89519
|
+
Accept: "application/json",
|
|
89520
|
+
Authorization: `Bearer ${apiKey}`
|
|
89521
|
+
};
|
|
89481
89522
|
const response = await fetch(`${apiBase}/api/v1/shortcuts/route?${params.toString()}`, {
|
|
89482
89523
|
headers
|
|
89483
89524
|
});
|
|
@@ -89722,6 +89763,8 @@ export {
|
|
|
89722
89763
|
simulateGnosisTrx,
|
|
89723
89764
|
simulateAndExecuteGnosisTrx,
|
|
89724
89765
|
signGnosisTrxWithEOA,
|
|
89766
|
+
setUserUseReserveAsCollateralOnAaveV3Trx,
|
|
89767
|
+
setUserEModeOnAaveV3Trx,
|
|
89725
89768
|
setUpTransactionUnwrapperCalldata,
|
|
89726
89769
|
setUpTransactionUnwrapper,
|
|
89727
89770
|
setApprovalForAllErc721Trx,
|
|
@@ -89893,6 +89936,8 @@ export {
|
|
|
89893
89936
|
SlipstreamDecreaseLiquidityCalldata,
|
|
89894
89937
|
SlipstreamCollectFeesCalldata,
|
|
89895
89938
|
SlipstreamBurnPositionCalldata,
|
|
89939
|
+
SetUserUseReserveAsCollateralOnAaveV3Calldata,
|
|
89940
|
+
SetUserEModeOnAaveV3Calldata,
|
|
89896
89941
|
SetApprovalForAllErc721CallData,
|
|
89897
89942
|
SendOFTCalldata,
|
|
89898
89943
|
SafeTransferFromWithDataErc721CallData,
|
|
@@ -89937,6 +89982,7 @@ export {
|
|
|
89937
89982
|
EnsoUnexpectedRouterError,
|
|
89938
89983
|
EnsoTokenType,
|
|
89939
89984
|
EnsoRouteApiError,
|
|
89985
|
+
EnsoApiKeyMissingError,
|
|
89940
89986
|
erc721_abi_default as ERC721,
|
|
89941
89987
|
ENSO_API_BASE,
|
|
89942
89988
|
DepositToLendleCalldata,
|
|
@@ -89982,4 +90028,4 @@ export {
|
|
|
89982
90028
|
AXELAR_GMP_API_MAINNET
|
|
89983
90029
|
};
|
|
89984
90030
|
|
|
89985
|
-
//# debugId=
|
|
90031
|
+
//# debugId=8C09F9D5BAB8588D64756E2164756E21
|