@defisaver/positions-sdk 2.1.127-midnight-dev → 2.1.127-uniswap-dev

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 (88) hide show
  1. package/cjs/claiming/index.d.ts +2 -1
  2. package/cjs/claiming/index.js +3 -1
  3. package/cjs/claiming/uniswap.d.ts +4 -0
  4. package/cjs/claiming/uniswap.js +70 -0
  5. package/cjs/config/contracts.d.ts +22 -249
  6. package/cjs/config/contracts.js +10 -11
  7. package/cjs/contracts.d.ts +35 -1510
  8. package/cjs/contracts.js +3 -3
  9. package/cjs/helpers/index.d.ts +0 -1
  10. package/cjs/helpers/index.js +1 -2
  11. package/cjs/helpers/morphoBlueHelpers/index.js +1 -0
  12. package/cjs/index.d.ts +1 -2
  13. package/cjs/index.js +1 -3
  14. package/cjs/markets/index.d.ts +0 -1
  15. package/cjs/markets/index.js +1 -4
  16. package/cjs/morphoBlue/index.d.ts +8 -6
  17. package/cjs/morphoBlue/index.js +69 -40
  18. package/cjs/portfolio/discovery.js +0 -4
  19. package/cjs/portfolio/index.js +30 -45
  20. package/cjs/services/viem.d.ts +11 -11
  21. package/cjs/types/claiming.d.ts +2 -0
  22. package/cjs/types/claiming.js +2 -0
  23. package/cjs/types/index.d.ts +0 -1
  24. package/cjs/types/index.js +0 -1
  25. package/cjs/types/morphoBlue.d.ts +9 -0
  26. package/cjs/types/portfolio.d.ts +0 -4
  27. package/esm/claiming/index.d.ts +2 -1
  28. package/esm/claiming/index.js +2 -1
  29. package/esm/claiming/uniswap.d.ts +4 -0
  30. package/esm/claiming/uniswap.js +62 -0
  31. package/esm/config/contracts.d.ts +22 -249
  32. package/esm/config/contracts.js +8 -9
  33. package/esm/contracts.d.ts +35 -1510
  34. package/esm/contracts.js +1 -1
  35. package/esm/helpers/index.d.ts +0 -1
  36. package/esm/helpers/index.js +0 -1
  37. package/esm/helpers/morphoBlueHelpers/index.js +1 -0
  38. package/esm/index.d.ts +1 -2
  39. package/esm/index.js +1 -2
  40. package/esm/markets/index.d.ts +0 -1
  41. package/esm/markets/index.js +0 -1
  42. package/esm/morphoBlue/index.d.ts +8 -6
  43. package/esm/morphoBlue/index.js +62 -39
  44. package/esm/portfolio/discovery.js +1 -5
  45. package/esm/portfolio/index.js +32 -47
  46. package/esm/services/viem.d.ts +11 -11
  47. package/esm/types/claiming.d.ts +2 -0
  48. package/esm/types/claiming.js +2 -0
  49. package/esm/types/index.d.ts +0 -1
  50. package/esm/types/index.js +0 -1
  51. package/esm/types/morphoBlue.d.ts +9 -0
  52. package/esm/types/portfolio.d.ts +0 -4
  53. package/package.json +1 -1
  54. package/src/claiming/index.ts +2 -0
  55. package/src/claiming/uniswap.ts +65 -0
  56. package/src/config/contracts.ts +9 -9
  57. package/src/contracts.ts +2 -1
  58. package/src/helpers/index.ts +0 -1
  59. package/src/helpers/morphoBlueHelpers/index.ts +1 -0
  60. package/src/index.ts +0 -2
  61. package/src/markets/index.ts +0 -1
  62. package/src/morphoBlue/index.ts +101 -44
  63. package/src/portfolio/discovery.ts +0 -6
  64. package/src/portfolio/index.ts +30 -46
  65. package/src/types/claiming.ts +2 -0
  66. package/src/types/index.ts +0 -1
  67. package/src/types/morphoBlue.ts +11 -0
  68. package/src/types/portfolio.ts +0 -4
  69. package/cjs/helpers/morphoMidnightHelpers/index.d.ts +0 -16
  70. package/cjs/helpers/morphoMidnightHelpers/index.js +0 -68
  71. package/cjs/markets/morphoMidnight/index.d.ts +0 -16
  72. package/cjs/markets/morphoMidnight/index.js +0 -159
  73. package/cjs/morphoMidnight/index.d.ts +0 -14
  74. package/cjs/morphoMidnight/index.js +0 -220
  75. package/cjs/types/morphoMidnight.d.ts +0 -91
  76. package/cjs/types/morphoMidnight.js +0 -15
  77. package/esm/helpers/morphoMidnightHelpers/index.d.ts +0 -16
  78. package/esm/helpers/morphoMidnightHelpers/index.js +0 -61
  79. package/esm/markets/morphoMidnight/index.d.ts +0 -16
  80. package/esm/markets/morphoMidnight/index.js +0 -148
  81. package/esm/morphoMidnight/index.d.ts +0 -14
  82. package/esm/morphoMidnight/index.js +0 -207
  83. package/esm/types/morphoMidnight.d.ts +0 -91
  84. package/esm/types/morphoMidnight.js +0 -12
  85. package/src/helpers/morphoMidnightHelpers/index.ts +0 -86
  86. package/src/markets/morphoMidnight/index.ts +0 -161
  87. package/src/morphoMidnight/index.ts +0 -234
  88. package/src/types/morphoMidnight.ts +0 -104
@@ -1111,15 +1111,6 @@ export const MorphoBlueView = {
1111
1111
  }
1112
1112
  },
1113
1113
  };
1114
- export const MidnightView = {
1115
- "abi": [{ "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalUnits", "type": "uint128" }, { "internalType": "uint128", "name": "lossFactor", "type": "uint128" }, { "internalType": "uint128", "name": "withdrawable", "type": "uint128" }, { "internalType": "uint128", "name": "continuousFeeCredit", "type": "uint128" }, { "internalType": "uint16[7]", "name": "settlementFees", "type": "uint16[7]" }, { "internalType": "uint32", "name": "continuousFee", "type": "uint32" }, { "internalType": "uint8", "name": "tickSpacing", "type": "uint8" }, { "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "internalType": "struct MidnightView.MarketInfo", "name": "info", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getPositionInfo", "outputs": [{ "components": [{ "internalType": "uint128", "name": "credit", "type": "uint128" }, { "internalType": "uint128", "name": "pendingFee", "type": "uint128" }, { "internalType": "uint128", "name": "debt", "type": "uint128" }, { "internalType": "uint128", "name": "collateralBitmap", "type": "uint128" }, { "internalType": "uint128[]", "name": "collateral", "type": "uint128[]" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }], "internalType": "struct MidnightView.PositionInfo", "name": "pos", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "ratio", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "_market", "type": "tuple" }], "name": "toId", "outputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "toMarket", "outputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "market", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
1116
- "networks": {
1117
- "8453": {
1118
- "address": "0x3aa272f329E8B562A3bA56Bb6979a44D23A28839",
1119
- "createdBlock": 48932293,
1120
- }
1121
- },
1122
- };
1123
1114
  export const FeedRegistry = {
1124
1115
  "abi": [{ "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }], "name": "OwnershipTransferRequested", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "address", "name": "aggregator", "type": "address" }], "name": "confirmFeed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "description", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getAccessController", "outputs": [{ "internalType": "contract AccessControllerInterface", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint256", "name": "roundId", "type": "uint256" }], "name": "getAnswer", "outputs": [{ "internalType": "int256", "name": "answer", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "getCurrentPhaseId", "outputs": [{ "internalType": "uint16", "name": "currentPhaseId", "type": "uint16" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "getFeed", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "aggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "roundId", "type": "uint80" }], "name": "getNextRoundId", "outputs": [{ "internalType": "uint80", "name": "nextRoundId", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint16", "name": "phaseId", "type": "uint16" }], "name": "getPhase", "outputs": [{ "components": [{ "internalType": "uint16", "name": "phaseId", "type": "uint16" }, { "internalType": "uint80", "name": "startingAggregatorRoundId", "type": "uint80" }, { "internalType": "uint80", "name": "endingAggregatorRoundId", "type": "uint80" }], "internalType": "struct FeedRegistryInterface.Phase", "name": "phase", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint16", "name": "phaseId", "type": "uint16" }], "name": "getPhaseFeed", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "aggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint16", "name": "phaseId", "type": "uint16" }], "name": "getPhaseRange", "outputs": [{ "internalType": "uint80", "name": "startingRoundId", "type": "uint80" }, { "internalType": "uint80", "name": "endingRoundId", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "roundId", "type": "uint80" }], "name": "getPreviousRoundId", "outputs": [{ "internalType": "uint80", "name": "previousRoundId", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "getProposedFeed", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "proposedAggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "getRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "roundId", "type": "uint80" }], "name": "getRoundFeed", "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "aggregator", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint256", "name": "roundId", "type": "uint256" }], "name": "getTimestamp", "outputs": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "aggregator", "type": "address" }], "name": "isFeedEnabled", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestAnswer", "outputs": [{ "internalType": "int256", "name": "answer", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestRound", "outputs": [{ "internalType": "uint256", "name": "roundId", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "latestTimestamp", "outputs": [{ "internalType": "uint256", "name": "timestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "address", "name": "aggregator", "type": "address" }], "name": "proposeFeed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }, { "internalType": "uint80", "name": "roundId", "type": "uint80" }], "name": "proposedGetRoundData", "outputs": [{ "internalType": "uint80", "name": "id", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "proposedLatestRoundData", "outputs": [{ "internalType": "uint80", "name": "id", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "contract AccessControllerInterface", "name": "_accessController", "type": "address" }], "name": "setAccessController", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "typeAndVersion", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "base", "type": "address" }, { "internalType": "address", "name": "quote", "type": "address" }], "name": "version", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }],
1125
1116
  "networks": {
@@ -1358,3 +1349,11 @@ export const AaveV4View = {
1358
1349
  }
1359
1350
  }
1360
1351
  };
1352
+ export const UniswapTokenDistributor = {
1353
+ "abi": [{ "inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "isClaimed", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }],
1354
+ "networks": {
1355
+ "1": {
1356
+ "address": "0x090D4613473dEE047c3f2706764f49E0821D256e",
1357
+ }
1358
+ }
1359
+ };