damm-sdk 1.3.82 → 1.4.0

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.
Files changed (30) hide show
  1. package/dist/index.cjs +91 -101
  2. package/dist/index.cjs.map +6 -5
  3. package/dist/index.js +19716 -27923
  4. package/dist/index.js.map +62 -131
  5. package/dist/integrations/index.d.ts +1 -1
  6. package/dist/integrations/index.d.ts.map +1 -1
  7. package/dist/integrations/pendle/index.d.ts +4 -0
  8. package/dist/integrations/pendle/index.d.ts.map +1 -0
  9. package/dist/integrations/pendle/pendle.d.ts +25 -0
  10. package/dist/integrations/pendle/pendle.d.ts.map +1 -0
  11. package/dist/integrations/pendle/pendle.merkle-distributor.abi.d.ts +53 -0
  12. package/dist/integrations/pendle/pendle.merkle-distributor.abi.d.ts.map +1 -0
  13. package/dist/integrations/pendle/pendle.router.abi.d.ts +31 -0
  14. package/dist/integrations/pendle/pendle.router.abi.d.ts.map +1 -0
  15. package/package.json +1 -1
  16. package/src/integrations/index.ts +1 -1
  17. package/src/integrations/pendle/index.ts +3 -0
  18. package/src/integrations/pendle/pendle.merkle-distributor.abi.ts +30 -0
  19. package/src/integrations/pendle/pendle.router.abi.ts +20 -0
  20. package/src/integrations/pendle/pendle.ts +78 -0
  21. package/src/lib/contractsRegistry.json +2 -13
  22. package/dist/integrations/fluidLite/fluid-lite.abi.d.ts +0 -69
  23. package/dist/integrations/fluidLite/fluid-lite.abi.d.ts.map +0 -1
  24. package/dist/integrations/fluidLite/fluid-lite.d.ts +0 -42
  25. package/dist/integrations/fluidLite/fluid-lite.d.ts.map +0 -1
  26. package/dist/integrations/fluidLite/index.d.ts +0 -3
  27. package/dist/integrations/fluidLite/index.d.ts.map +0 -1
  28. package/src/integrations/fluidLite/fluid-lite.abi.ts +0 -38
  29. package/src/integrations/fluidLite/fluid-lite.ts +0 -104
  30. package/src/integrations/fluidLite/index.ts +0 -2
package/dist/index.cjs CHANGED
@@ -37232,7 +37232,7 @@ var require_lib21 = __commonJS((exports2) => {
37232
37232
  } });
37233
37233
  });
37234
37234
 
37235
- // node_modules/@ethersproject/json-wallets/node_modules/aes-js/index.js
37235
+ // node_modules/aes-js/index.js
37236
37236
  var require_aes_js = __commonJS((exports2, module2) => {
37237
37237
  (function(root) {
37238
37238
  function checkInt2(value) {
@@ -44302,7 +44302,6 @@ __export(exports_src, {
44302
44302
  withdrawGearboxVaultTrx: () => withdrawGearboxVaultTrx,
44303
44303
  withdrawFromLendleTrx: () => withdrawFromLendleTrx,
44304
44304
  withdrawFromAaveV3Trx: () => withdrawFromAaveV3Trx,
44305
- withdrawFluidLiteTrx: () => withdrawFluidLiteTrx,
44306
44305
  withdrawCollateralMorphoBlueTrx: () => withdrawCollateralMorphoBlueTrx,
44307
44306
  updateTotalAssetsLifespanTrx: () => updateTotalAssetsLifespanTrx,
44308
44307
  updateOrderTrx: () => updateOrderTrx,
@@ -44363,8 +44362,13 @@ __export(exports_src, {
44363
44362
  redeemMorphoVaultTrx: () => redeemMorphoVaultTrx,
44364
44363
  redeemIporFusionTrx: () => redeemIporFusionTrx,
44365
44364
  redeemGearboxVaultTrx: () => redeemGearboxVaultTrx,
44366
- redeemFluidLiteTrx: () => redeemFluidLiteTrx,
44367
44365
  receiveMessageFromCctpTrx: () => receiveMessageFromCctpTrx,
44366
+ pendleRouterAbi: () => pendle_router_abi_default,
44367
+ pendleRedeemRewardsTrx: () => pendleRedeemRewardsTrx,
44368
+ pendleRedeemRewardsCalldata: () => pendleRedeemRewardsCalldata,
44369
+ pendleMerkleDistributorAbi: () => pendle_merkle_distributor_abi_default,
44370
+ pendleMerkleClaimTrx: () => pendleMerkleClaimTrx,
44371
+ pendleMerkleClaimCalldata: () => pendleMerkleClaimCalldata,
44368
44372
  pauseVaultTrx: () => pauseVaultTrx,
44369
44373
  merklClaimTrx: () => merklClaimTrx,
44370
44374
  merklClaimCalldata: () => merklClaimCalldata,
@@ -44394,7 +44398,6 @@ __export(exports_src, {
44394
44398
  depositIporFusionTrx: () => depositIporFusionTrx,
44395
44399
  depositGearboxVaultTrx: () => depositGearboxVaultTrx,
44396
44400
  depositForBurnToCctpTrx: () => depositForBurnToCctpTrx,
44397
- depositFluidLiteTrx: () => depositFluidLiteTrx,
44398
44401
  createVaultProxyTrx: () => createVaultProxyTrx,
44399
44402
  createOrderTrx: () => createOrderTrx,
44400
44403
  createCall: () => createCall,
@@ -44423,7 +44426,6 @@ __export(exports_src, {
44423
44426
  WithdrawFromLendleCalldata: () => WithdrawFromLendleCalldata,
44424
44427
  WithdrawFromAaveV3L2Calldata: () => WithdrawFromAaveV3L2Calldata,
44425
44428
  WithdrawFromAaveV3L1Calldata: () => WithdrawFromAaveV3L1Calldata,
44426
- WithdrawFluidLiteCalldata: () => WithdrawFluidLiteCalldata,
44427
44429
  WithdrawCollateralMorphoBlueCalldata: () => WithdrawCollateralMorphoBlueCalldata,
44428
44430
  WethAbi: () => weth_abi_default,
44429
44431
  UpdateTotalAssetsLifespanCalldata: () => UpdateTotalAssetsLifespanCalldata,
@@ -44494,7 +44496,6 @@ __export(exports_src, {
44494
44496
  RedeemMorphoVaultCalldata: () => RedeemMorphoVaultCalldata,
44495
44497
  RedeemIporFusionCalldata: () => RedeemIporFusionCalldata,
44496
44498
  RedeemGearboxVaultCalldata: () => RedeemGearboxVaultCalldata,
44497
- RedeemFluidLiteCalldata: () => RedeemFluidLiteCalldata,
44498
44499
  ReceiveMessageCalldata: () => ReceiveMessageCalldata,
44499
44500
  QuoteSendTrx: () => QuoteSendTrx,
44500
44501
  QuoteSendCalldata: () => QuoteSendCalldata,
@@ -44511,7 +44512,6 @@ __export(exports_src, {
44511
44512
  InitiateClosingCalldata: () => InitiateClosingCalldata,
44512
44513
  GMX_EXCHANGE_ROUTER_ARB: () => GMX_EXCHANGE_ROUTER_ARB,
44513
44514
  GMXExchangeRouterAbi: () => exchange_router_abi_default,
44514
- FluidLiteAbi: () => fluid_lite_abi_default,
44515
44515
  Erc721Abi: () => erc721_abi_default2,
44516
44516
  Erc20Abi: () => erc20_abi_default,
44517
44517
  ERC721: () => erc721_abi_default,
@@ -44524,7 +44524,6 @@ __export(exports_src, {
44524
44524
  DepositIporFusionCalldata: () => DepositIporFusionCalldata,
44525
44525
  DepositGearboxVaultCalldata: () => DepositGearboxVaultCalldata,
44526
44526
  DepositForBurnCalldata: () => DepositForBurnCalldata,
44527
- DepositFluidLiteCalldata: () => DepositFluidLiteCalldata,
44528
44527
  DelayedTransactionCalldata: () => DelayedTransactionCalldata,
44529
44528
  DecreasePositionSwapType: () => DecreasePositionSwapType,
44530
44529
  DELEGATE_CALL_OP_CODE: () => DELEGATE_CALL_OP_CODE,
@@ -53787,8 +53786,7 @@ var contractsRegistry_default = {
53787
53786
  cvx: "0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B",
53788
53787
  crv: "0xD533a949740bb3306d119CC777fa900bA034cd52",
53789
53788
  ausd: "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
53790
- pendle: "0x808507121B80c02388FAd14726482e061B8da827",
53791
- usdg: "0xe343167631d89B6Ffc58B88d6b7fB0228795491D"
53789
+ pendle: "0x808507121B80c02388FAd14726482e061B8da827"
53792
53790
  },
53793
53791
  morpho: {
53794
53792
  morphoBlue: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
@@ -53871,11 +53869,6 @@ var contractsRegistry_default = {
53871
53869
  },
53872
53870
  iporFusion: {
53873
53871
  vault: "0x604117f0c94561231060f56cd2ddd16245d434c5"
53874
- },
53875
- pendle: {
53876
- routerV4: "0x888888888889758f76e7103c6cbf23abbf58f946",
53877
- routerV4ActionMisc: "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
53878
- merkleDistributor: "0x33305665f69b4642d1275f4ce81c23651674d21c"
53879
53872
  }
53880
53873
  },
53881
53874
  unichain: {
@@ -53967,15 +53960,10 @@ var contractsRegistry_default = {
53967
53960
  tokens: {
53968
53961
  ausd: "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
53969
53962
  usdc: "0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9",
53970
- usdt0: "0x779ded0c9e1022225f8e0630b35a9b54be713736",
53963
+ usdt: "0x201eba5cc46d216ce6dc03f6a759e8e766e956ae",
53971
53964
  usde: "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
53972
53965
  cmeth: "0xe6829d9a7ee3040e1276fa75293bde931859e8fa"
53973
53966
  },
53974
- OFTAdapters: {
53975
- "0x779ded0c9e1022225f8e0630b35a9b54be713736": "0xcb768e263fb1c62214e7cab4aa8d036d76dc59cc",
53976
- "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34": "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34"
53977
- },
53978
- multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
53979
53967
  lagoonV0_4: {
53980
53968
  factory: "0x57D969B556C6AebB3Ac8f54c98CF3a3f921d5659",
53981
53969
  registry: "0x47A144e67834408716cB40Fa87fc886D63362ddC",
@@ -87043,85 +87031,6 @@ var redeemGearboxVaultTrx = ({
87043
87031
  data: RedeemGearboxVaultCalldata(args)
87044
87032
  });
87045
87033
  };
87046
- // src/integrations/fluidLite/fluid-lite.abi.ts
87047
- var fluid_lite_abi_default = [
87048
- {
87049
- inputs: [
87050
- { internalType: "uint256", name: "assets", type: "uint256" },
87051
- { internalType: "address", name: "receiver", type: "address" }
87052
- ],
87053
- name: "deposit",
87054
- outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
87055
- stateMutability: "nonpayable",
87056
- type: "function"
87057
- },
87058
- {
87059
- inputs: [
87060
- { internalType: "uint256", name: "assets", type: "uint256" },
87061
- { internalType: "address", name: "receiver", type: "address" },
87062
- { internalType: "address", name: "owner", type: "address" }
87063
- ],
87064
- name: "withdraw",
87065
- outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
87066
- stateMutability: "nonpayable",
87067
- type: "function"
87068
- },
87069
- {
87070
- inputs: [
87071
- { internalType: "uint256", name: "shares", type: "uint256" },
87072
- { internalType: "address", name: "receiver", type: "address" },
87073
- { internalType: "address", name: "owner", type: "address" }
87074
- ],
87075
- name: "redeem",
87076
- outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
87077
- stateMutability: "nonpayable",
87078
- type: "function"
87079
- }
87080
- ];
87081
- // src/integrations/fluidLite/fluid-lite.ts
87082
- var fluidLiteInterface = new exports_ethers.utils.Interface(fluid_lite_abi_default);
87083
- var DepositFluidLiteCalldata = ({ assets, receiver }) => {
87084
- return fluidLiteInterface.encodeFunctionData("deposit", [assets, receiver]);
87085
- };
87086
- var depositFluidLiteTrx = ({
87087
- args,
87088
- vault
87089
- }) => {
87090
- return createCall({
87091
- operation: 0,
87092
- to: vault,
87093
- value: 0n,
87094
- data: DepositFluidLiteCalldata(args)
87095
- });
87096
- };
87097
- var RedeemFluidLiteCalldata = ({ shares, receiver, owner }) => {
87098
- return fluidLiteInterface.encodeFunctionData("redeem", [shares, receiver, owner]);
87099
- };
87100
- var redeemFluidLiteTrx = ({
87101
- args,
87102
- vault
87103
- }) => {
87104
- return createCall({
87105
- operation: 0,
87106
- to: vault,
87107
- value: 0n,
87108
- data: RedeemFluidLiteCalldata(args)
87109
- });
87110
- };
87111
- var WithdrawFluidLiteCalldata = ({ assets, receiver, owner }) => {
87112
- return fluidLiteInterface.encodeFunctionData("withdraw", [assets, receiver, owner]);
87113
- };
87114
- var withdrawFluidLiteTrx = ({
87115
- args,
87116
- vault
87117
- }) => {
87118
- return createCall({
87119
- operation: 0,
87120
- to: vault,
87121
- value: 0n,
87122
- data: WithdrawFluidLiteCalldata(args)
87123
- });
87124
- };
87125
87034
  // src/integrations/weth/weth.abi.ts
87126
87035
  var weth_abi_default = [
87127
87036
  {
@@ -87170,6 +87079,87 @@ var unwrapWethTrx = ({ weth, amount }) => {
87170
87079
  operation: 0
87171
87080
  });
87172
87081
  };
87082
+ // src/integrations/pendle/pendle.router.abi.ts
87083
+ var pendle_router_abi_default = [
87084
+ {
87085
+ inputs: [
87086
+ { internalType: "address", name: "user", type: "address" },
87087
+ { internalType: "address[]", name: "sys", type: "address[]" },
87088
+ { internalType: "address[]", name: "yts", type: "address[]" },
87089
+ { internalType: "address[]", name: "markets", type: "address[]" }
87090
+ ],
87091
+ name: "redeemDueInterestAndRewards",
87092
+ outputs: [],
87093
+ stateMutability: "nonpayable",
87094
+ type: "function"
87095
+ }
87096
+ ];
87097
+ // src/integrations/pendle/pendle.merkle-distributor.abi.ts
87098
+ var pendle_merkle_distributor_abi_default = [
87099
+ {
87100
+ inputs: [
87101
+ { internalType: "address", name: "receiver", type: "address" },
87102
+ { internalType: "address[]", name: "tokens", type: "address[]" },
87103
+ { internalType: "uint256[]", name: "totalAccrueds", type: "uint256[]" },
87104
+ { internalType: "bytes32[][]", name: "proofs", type: "bytes32[][]" }
87105
+ ],
87106
+ name: "claim",
87107
+ outputs: [{ internalType: "uint256[]", name: "amountOuts", type: "uint256[]" }],
87108
+ stateMutability: "nonpayable",
87109
+ type: "function"
87110
+ },
87111
+ {
87112
+ inputs: [
87113
+ { internalType: "address", name: "token", type: "address" },
87114
+ { internalType: "address", name: "user", type: "address" }
87115
+ ],
87116
+ name: "claimed",
87117
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
87118
+ stateMutability: "view",
87119
+ type: "function"
87120
+ }
87121
+ ];
87122
+ // src/integrations/pendle/pendle.ts
87123
+ var routerInterface = new exports_ethers.utils.Interface(pendle_router_abi_default);
87124
+ var merkleDistributorInterface = new exports_ethers.utils.Interface(pendle_merkle_distributor_abi_default);
87125
+ var pendleRedeemRewardsCalldata = ({ user, sys, yts, markets }) => {
87126
+ return routerInterface.encodeFunctionData("redeemDueInterestAndRewards", [user, sys, yts, markets]);
87127
+ };
87128
+ var pendleRedeemRewardsTrx = ({
87129
+ args,
87130
+ routerAddress
87131
+ }) => {
87132
+ return createCall({
87133
+ to: routerAddress,
87134
+ data: pendleRedeemRewardsCalldata(args),
87135
+ operation: 0,
87136
+ value: 0n
87137
+ });
87138
+ };
87139
+ var pendleMerkleClaimCalldata = ({
87140
+ receiver,
87141
+ tokens,
87142
+ totalAccrueds,
87143
+ proofs
87144
+ }) => {
87145
+ return merkleDistributorInterface.encodeFunctionData("claim", [
87146
+ receiver,
87147
+ tokens,
87148
+ totalAccrueds,
87149
+ proofs
87150
+ ]);
87151
+ };
87152
+ var pendleMerkleClaimTrx = ({
87153
+ args,
87154
+ distributorAddress
87155
+ }) => {
87156
+ return createCall({
87157
+ to: distributorAddress,
87158
+ data: pendleMerkleClaimCalldata(args),
87159
+ operation: 0,
87160
+ value: 0n
87161
+ });
87162
+ };
87173
87163
  // src/lib/utils.ts
87174
87164
  var executeTrx = ({
87175
87165
  client,
@@ -87264,4 +87254,4 @@ var simulateOrThrow = async (env2) => {
87264
87254
  };
87265
87255
  };
87266
87256
 
87267
- //# debugId=F0354992C931074F64756E2164756E21
87257
+ //# debugId=912568F67A8C097664756E2164756E21