@defisaver/positions-sdk 2.1.79-aave-v4-10-dev → 2.1.79-aave-v4-12-dev-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.
@@ -30,6 +30,16 @@ export interface AaveV4TokenizationSpokeDataParsed {
30
30
  key: string | null;
31
31
  symbol: string;
32
32
  hubKey: string;
33
+ spokeActive: boolean;
34
+ spokeHalted: boolean;
35
+ /** Deposit cap in asset units (wei string) */
36
+ spokeDepositCap: string;
37
+ /** Total assets currently in spoke in asset units (wei string) */
38
+ spokeTotalAssets: string;
39
+ /** Available hub liquidity in asset units (wei string) */
40
+ hubLiquidity: string;
41
+ /** The conversion rate from assets to shares expressed in asset units. */
42
+ convertToShares: string;
33
43
  userSuppliedAssetsEth: string;
34
44
  userSuppliedSharesEth: string;
35
45
  userSuppliedAssets: string;
@@ -17,37 +17,23 @@ const viem_1 = require("../services/viem");
17
17
  const utils_1 = require("../services/utils");
18
18
  const common_1 = require("../types/common");
19
19
  exports.AAVE_V4_TOKENIZED_SPOKES = {
20
- AAVE_CORE: '0x0A65197b16C5969F92672051c9C9C0C75B369135',
21
20
  EURC_CORE: '0x6D9e2Cdd61CaF69af99b275704B6e272C41c6718',
22
21
  GHO_CORE: '0x58C14a5E061c9bC6926c5b853445290F296C2F7B',
23
- LBTC_CORE: '0x7961F140B570490849DB878AE222570ea838799d',
24
- LINK_CORE: '0xE69C2045095C8Ab3E2a7d77de2328faE5baF797c',
25
22
  RLUSD_CORE: '0xC8a125AE4275a78AADc53B46Ca10566Bc9B249E0',
26
23
  USDC_CORE: '0x531E90a2376902DE8915789Fcc1075e3B0c153E7',
27
24
  USDG_CORE: '0xAC2435E3C25e8246870D33ce0a26988A46d5DB68',
28
25
  USDT_CORE: '0x5eC44a70F309854fe04d495cFE1B5dA63DD1cc73',
29
26
  WBTC_CORE: '0x82A9CC4656784E55Ef2E78F704028B5E1Bfc1732',
30
27
  WETH_CORE: '0x7320CF22Ac095bA2a2e0a652F77efB836c2E751b',
31
- XAUt_CORE: '0x4E712562fcb5337011398B6C630f55b60641cd5e',
32
28
  cbBTC_CORE: '0x33B41B74366F55327d959FfF6D6b6fBc2853dbB1',
33
29
  frxUSD_CORE: '0x2226749630775ee20230Ad65214fB339087eF30D',
34
- rsETH_CORE: '0x45a04Ca1A5cbEeA4B44356c75EDd29b33eB2527a',
35
- weETH_CORE: '0x559cEc2C840D9DBB18936Afc5E5341D78bfC7Cbe',
36
- wstETH_CORE: '0xcb0E7dA9c635628f6d4827355AeCa75aB8d3560f',
37
30
  GHO_PLUS: '0xA54382db40EC602c0a173A08f9E86Ed40F9D4D10',
38
- PT_USDe_7MAY2026_PLUS: '0xdd2Eb78BF9e6aC5068B95aD2d451e8c9Af10ac81',
39
- PT_sUSDE_7MAY2026_PLUS: '0x90774889c22D2F2Adf44da1f04C7c95542590df4',
40
31
  USDC_PLUS: '0xc94bdd83D2c7655C280655D60954e79E88D4F949',
41
32
  USDT_PLUS: '0x80835EB50694EE0e519743f67e5401e6FD300006',
42
33
  USDe_PLUS: '0x502Cd81da6a8F1785eb2eEE72713B7388E16A854',
43
- sUSDe_PLUS: '0x24f8c062e1E0451736C1D6E023510DA262a41df4',
44
34
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
45
35
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
46
36
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
47
- WBTC_PRIME: '0x5AE3d87De89CA6Ce501e8317887F71EABED69E18',
48
- WETH_PRIME: '0x2087513383330B961A3753B47627Bbf149F31c70',
49
- cbBTC_PRIME: '0xD38098faf52D8E915EdED84fBF30F81C17906938',
50
- wstETH_PRIME: '0xFCD3D3C69cd032DE0cc78fE529B7447D2fe7F666',
51
37
  };
52
38
  exports.AAVE_V4_TOKENIZED_SPOKE_ADDRESSES = {
53
39
  [common_1.NetworkNumber.Eth]: Object.values(exports.AAVE_V4_TOKENIZED_SPOKES),
@@ -108,7 +94,7 @@ function getAaveV4TokenizationSpokesData(provider, network, userAddress) {
108
94
  const viewContract = (0, contracts_1.AaveV4ViewContractViem)(client, network);
109
95
  const raw = yield viewContract.read.getTokenizationSpokesData([spokes, userAddress]);
110
96
  return raw.map((r, i) => {
111
- var _a, _b, _c, _d, _e;
97
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
112
98
  const vaultAddress = spokes[i];
113
99
  const key = (_a = AAVE_V4_TOKENIZED_SPOKE_ADDRESS_TO_KEY[vaultAddress.toLowerCase()]) !== null && _a !== void 0 ? _a : null;
114
100
  const symbol = (0, utils_1.wethToEth)((0, tokens_1.getAssetInfoByAddress)(r.underlyingAsset, network).symbol);
@@ -126,6 +112,12 @@ function getAaveV4TokenizationSpokesData(provider, network, userAddress) {
126
112
  key,
127
113
  symbol,
128
114
  hubKey,
115
+ spokeActive: (_f = r.spokeActive) !== null && _f !== void 0 ? _f : true,
116
+ spokeHalted: (_g = r.spokeHalted) !== null && _g !== void 0 ? _g : false,
117
+ spokeDepositCap: ((_h = r.spokeDepositCap) !== null && _h !== void 0 ? _h : 0).toString(),
118
+ spokeTotalAssets: ((_j = r.spokeTotalAssets) !== null && _j !== void 0 ? _j : 0).toString(),
119
+ hubLiquidity: ((_k = r.hubLiquidity) !== null && _k !== void 0 ? _k : 0).toString(),
120
+ convertToShares: ((_l = r.convertToShares) !== null && _l !== void 0 ? _l : 0).toString(),
129
121
  userSuppliedAssetsEth,
130
122
  userSuppliedSharesEth,
131
123
  userSuppliedAssets: userSuppliedAssetsRaw.toString(),
@@ -30,6 +30,16 @@ export interface AaveV4TokenizationSpokeDataParsed {
30
30
  key: string | null;
31
31
  symbol: string;
32
32
  hubKey: string;
33
+ spokeActive: boolean;
34
+ spokeHalted: boolean;
35
+ /** Deposit cap in asset units (wei string) */
36
+ spokeDepositCap: string;
37
+ /** Total assets currently in spoke in asset units (wei string) */
38
+ spokeTotalAssets: string;
39
+ /** Available hub liquidity in asset units (wei string) */
40
+ hubLiquidity: string;
41
+ /** The conversion rate from assets to shares expressed in asset units. */
42
+ convertToShares: string;
33
43
  userSuppliedAssetsEth: string;
34
44
  userSuppliedSharesEth: string;
35
45
  userSuppliedAssets: string;
@@ -13,37 +13,23 @@ import { getViemProvider } from '../services/viem';
13
13
  import { wethToEth } from '../services/utils';
14
14
  import { NetworkNumber, } from '../types/common';
15
15
  export const AAVE_V4_TOKENIZED_SPOKES = {
16
- AAVE_CORE: '0x0A65197b16C5969F92672051c9C9C0C75B369135',
17
16
  EURC_CORE: '0x6D9e2Cdd61CaF69af99b275704B6e272C41c6718',
18
17
  GHO_CORE: '0x58C14a5E061c9bC6926c5b853445290F296C2F7B',
19
- LBTC_CORE: '0x7961F140B570490849DB878AE222570ea838799d',
20
- LINK_CORE: '0xE69C2045095C8Ab3E2a7d77de2328faE5baF797c',
21
18
  RLUSD_CORE: '0xC8a125AE4275a78AADc53B46Ca10566Bc9B249E0',
22
19
  USDC_CORE: '0x531E90a2376902DE8915789Fcc1075e3B0c153E7',
23
20
  USDG_CORE: '0xAC2435E3C25e8246870D33ce0a26988A46d5DB68',
24
21
  USDT_CORE: '0x5eC44a70F309854fe04d495cFE1B5dA63DD1cc73',
25
22
  WBTC_CORE: '0x82A9CC4656784E55Ef2E78F704028B5E1Bfc1732',
26
23
  WETH_CORE: '0x7320CF22Ac095bA2a2e0a652F77efB836c2E751b',
27
- XAUt_CORE: '0x4E712562fcb5337011398B6C630f55b60641cd5e',
28
24
  cbBTC_CORE: '0x33B41B74366F55327d959FfF6D6b6fBc2853dbB1',
29
25
  frxUSD_CORE: '0x2226749630775ee20230Ad65214fB339087eF30D',
30
- rsETH_CORE: '0x45a04Ca1A5cbEeA4B44356c75EDd29b33eB2527a',
31
- weETH_CORE: '0x559cEc2C840D9DBB18936Afc5E5341D78bfC7Cbe',
32
- wstETH_CORE: '0xcb0E7dA9c635628f6d4827355AeCa75aB8d3560f',
33
26
  GHO_PLUS: '0xA54382db40EC602c0a173A08f9E86Ed40F9D4D10',
34
- PT_USDe_7MAY2026_PLUS: '0xdd2Eb78BF9e6aC5068B95aD2d451e8c9Af10ac81',
35
- PT_sUSDE_7MAY2026_PLUS: '0x90774889c22D2F2Adf44da1f04C7c95542590df4',
36
27
  USDC_PLUS: '0xc94bdd83D2c7655C280655D60954e79E88D4F949',
37
28
  USDT_PLUS: '0x80835EB50694EE0e519743f67e5401e6FD300006',
38
29
  USDe_PLUS: '0x502Cd81da6a8F1785eb2eEE72713B7388E16A854',
39
- sUSDe_PLUS: '0x24f8c062e1E0451736C1D6E023510DA262a41df4',
40
30
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
41
31
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
42
32
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
43
- WBTC_PRIME: '0x5AE3d87De89CA6Ce501e8317887F71EABED69E18',
44
- WETH_PRIME: '0x2087513383330B961A3753B47627Bbf149F31c70',
45
- cbBTC_PRIME: '0xD38098faf52D8E915EdED84fBF30F81C17906938',
46
- wstETH_PRIME: '0xFCD3D3C69cd032DE0cc78fE529B7447D2fe7F666',
47
33
  };
48
34
  export const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES = {
49
35
  [NetworkNumber.Eth]: Object.values(AAVE_V4_TOKENIZED_SPOKES),
@@ -101,7 +87,7 @@ export function getAaveV4TokenizationSpokesData(provider, network, userAddress)
101
87
  const viewContract = AaveV4ViewContractViem(client, network);
102
88
  const raw = yield viewContract.read.getTokenizationSpokesData([spokes, userAddress]);
103
89
  return raw.map((r, i) => {
104
- var _a, _b, _c, _d, _e;
90
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
105
91
  const vaultAddress = spokes[i];
106
92
  const key = (_a = AAVE_V4_TOKENIZED_SPOKE_ADDRESS_TO_KEY[vaultAddress.toLowerCase()]) !== null && _a !== void 0 ? _a : null;
107
93
  const symbol = wethToEth(getAssetInfoByAddress(r.underlyingAsset, network).symbol);
@@ -119,6 +105,12 @@ export function getAaveV4TokenizationSpokesData(provider, network, userAddress)
119
105
  key,
120
106
  symbol,
121
107
  hubKey,
108
+ spokeActive: (_f = r.spokeActive) !== null && _f !== void 0 ? _f : true,
109
+ spokeHalted: (_g = r.spokeHalted) !== null && _g !== void 0 ? _g : false,
110
+ spokeDepositCap: ((_h = r.spokeDepositCap) !== null && _h !== void 0 ? _h : 0).toString(),
111
+ spokeTotalAssets: ((_j = r.spokeTotalAssets) !== null && _j !== void 0 ? _j : 0).toString(),
112
+ hubLiquidity: ((_k = r.hubLiquidity) !== null && _k !== void 0 ? _k : 0).toString(),
113
+ convertToShares: ((_l = r.convertToShares) !== null && _l !== void 0 ? _l : 0).toString(),
122
114
  userSuppliedAssetsEth,
123
115
  userSuppliedSharesEth,
124
116
  userSuppliedAssets: userSuppliedAssetsRaw.toString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/positions-sdk",
3
- "version": "2.1.79-aave-v4-10-dev",
3
+ "version": "2.1.79-aave-v4-12-dev-dev",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -29,39 +29,25 @@ export interface AaveV4TokenizationSpokeData {
29
29
  }
30
30
 
31
31
  export const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress> = {
32
- AAVE_CORE: '0x0A65197b16C5969F92672051c9C9C0C75B369135',
33
32
  EURC_CORE: '0x6D9e2Cdd61CaF69af99b275704B6e272C41c6718',
34
33
  GHO_CORE: '0x58C14a5E061c9bC6926c5b853445290F296C2F7B',
35
- LBTC_CORE: '0x7961F140B570490849DB878AE222570ea838799d',
36
- LINK_CORE: '0xE69C2045095C8Ab3E2a7d77de2328faE5baF797c',
37
34
  RLUSD_CORE: '0xC8a125AE4275a78AADc53B46Ca10566Bc9B249E0',
38
35
  USDC_CORE: '0x531E90a2376902DE8915789Fcc1075e3B0c153E7',
39
36
  USDG_CORE: '0xAC2435E3C25e8246870D33ce0a26988A46d5DB68',
40
37
  USDT_CORE: '0x5eC44a70F309854fe04d495cFE1B5dA63DD1cc73',
41
38
  WBTC_CORE: '0x82A9CC4656784E55Ef2E78F704028B5E1Bfc1732',
42
39
  WETH_CORE: '0x7320CF22Ac095bA2a2e0a652F77efB836c2E751b',
43
- XAUt_CORE: '0x4E712562fcb5337011398B6C630f55b60641cd5e',
44
40
  cbBTC_CORE: '0x33B41B74366F55327d959FfF6D6b6fBc2853dbB1',
45
41
  frxUSD_CORE: '0x2226749630775ee20230Ad65214fB339087eF30D',
46
- rsETH_CORE: '0x45a04Ca1A5cbEeA4B44356c75EDd29b33eB2527a',
47
- weETH_CORE: '0x559cEc2C840D9DBB18936Afc5E5341D78bfC7Cbe',
48
- wstETH_CORE: '0xcb0E7dA9c635628f6d4827355AeCa75aB8d3560f',
49
42
 
50
43
  GHO_PLUS: '0xA54382db40EC602c0a173A08f9E86Ed40F9D4D10',
51
- PT_USDe_7MAY2026_PLUS: '0xdd2Eb78BF9e6aC5068B95aD2d451e8c9Af10ac81',
52
- PT_sUSDE_7MAY2026_PLUS: '0x90774889c22D2F2Adf44da1f04C7c95542590df4',
53
44
  USDC_PLUS: '0xc94bdd83D2c7655C280655D60954e79E88D4F949',
54
45
  USDT_PLUS: '0x80835EB50694EE0e519743f67e5401e6FD300006',
55
46
  USDe_PLUS: '0x502Cd81da6a8F1785eb2eEE72713B7388E16A854',
56
- sUSDe_PLUS: '0x24f8c062e1E0451736C1D6E023510DA262a41df4',
57
47
 
58
48
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
59
49
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
60
50
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
61
- WBTC_PRIME: '0x5AE3d87De89CA6Ce501e8317887F71EABED69E18',
62
- WETH_PRIME: '0x2087513383330B961A3753B47627Bbf149F31c70',
63
- cbBTC_PRIME: '0xD38098faf52D8E915EdED84fBF30F81C17906938',
64
- wstETH_PRIME: '0xFCD3D3C69cd032DE0cc78fE529B7447D2fe7F666',
65
51
  };
66
52
 
67
53
  export const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>> = {
@@ -115,6 +101,19 @@ export interface AaveV4TokenizationSpokeDataParsed {
115
101
  key: string | null;
116
102
  symbol: string;
117
103
  hubKey: string;
104
+ // ---- Spoke ----
105
+ spokeActive: boolean;
106
+ spokeHalted: boolean;
107
+ /** Deposit cap in asset units (wei string) */
108
+ spokeDepositCap: string;
109
+ /** Total assets currently in spoke in asset units (wei string) */
110
+ spokeTotalAssets: string;
111
+ // ---- Hub ----
112
+ /** Available hub liquidity in asset units (wei string) */
113
+ hubLiquidity: string;
114
+ /** The conversion rate from assets to shares expressed in asset units. */
115
+ convertToShares: string;
116
+ // ---- User ----
118
117
  userSuppliedAssetsEth: string;
119
118
  userSuppliedSharesEth: string;
120
119
  userSuppliedAssets: string;
@@ -166,6 +165,12 @@ export async function getAaveV4TokenizationSpokesData(
166
165
  key,
167
166
  symbol,
168
167
  hubKey,
168
+ spokeActive: r.spokeActive ?? true,
169
+ spokeHalted: r.spokeHalted ?? false,
170
+ spokeDepositCap: (r.spokeDepositCap ?? 0).toString(),
171
+ spokeTotalAssets: (r.spokeTotalAssets ?? 0).toString(),
172
+ hubLiquidity: (r.hubLiquidity ?? 0).toString(),
173
+ convertToShares: (r.convertToShares ?? 0).toString(),
169
174
  userSuppliedAssetsEth,
170
175
  userSuppliedSharesEth,
171
176
  userSuppliedAssets: userSuppliedAssetsRaw.toString(),