@defisaver/positions-sdk 2.1.114-aave-v4-hub-dev → 2.1.114-aave-v4-hub-2-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.
@@ -20,7 +20,7 @@ export interface AaveV4TokenizationSpokeData {
20
20
  }
21
21
  export declare const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress>;
22
22
  export declare const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>>;
23
- export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME';
23
+ export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME' | 'PAXOS';
24
24
  export declare const aaveV4GetTokenizedHubKey: (hubNameOrKey?: string | null) => AaveV4TokenizedHubKey | null;
25
25
  export declare const aaveV4GetTokenizedVaultKey: (symbol: string, hubNameOrKey?: string | null) => string | null;
26
26
  export declare const aaveV4GetTokenizedVaultAddress: (network: NetworkNumber, symbol: string, hubNameOrKey?: string | null) => EthAddress | undefined;
@@ -34,6 +34,8 @@ exports.AAVE_V4_TOKENIZED_SPOKES = {
34
34
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
35
35
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
36
36
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
37
+ // USDC_PAXOS: '0x0',
38
+ // USDT_PAXOS: '0x0',
37
39
  };
38
40
  exports.AAVE_V4_TOKENIZED_SPOKE_ADDRESSES = {
39
41
  [common_1.NetworkNumber.Eth]: Object.values(exports.AAVE_V4_TOKENIZED_SPOKES),
@@ -48,12 +50,16 @@ const aaveV4GetTokenizedHubKey = (hubNameOrKey) => {
48
50
  return 'PLUS';
49
51
  if (normalized === 'PRIME' || normalized === 'PRIME HUB')
50
52
  return 'PRIME';
53
+ if (normalized === 'PAXOS' || normalized === 'PAXOS HUB')
54
+ return 'PAXOS';
51
55
  if (normalized.includes('CORE'))
52
56
  return 'CORE';
53
57
  if (normalized.includes('PLUS'))
54
58
  return 'PLUS';
55
59
  if (normalized.includes('PRIME'))
56
60
  return 'PRIME';
61
+ if (normalized.includes('PAXOS'))
62
+ return 'PAXOS';
57
63
  return null;
58
64
  };
59
65
  exports.aaveV4GetTokenizedHubKey = aaveV4GetTokenizedHubKey;
@@ -33,7 +33,7 @@ exports.STABLE_ASSETS = [
33
33
  'USDe', 'sUSDe', 'USDS', 'sUSDS', 'USR', 'EURC', 'BOLD', 'BOLD Legacy', 'RLUSD', 'PT sUSDe July', 'PT eUSDe May',
34
34
  'USDtb', 'eUSDe', 'PT USDe July', 'PT eUSDe Aug', 'PT sUSDe Sep', 'PT USDe Sep', 'PT sUSDe Nov', 'PT USDe Nov', 'PT sUSDe Jan', 'PT USDe Jan',
35
35
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'frxUSD', 'PT sUSDe June',
36
- 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov',
36
+ 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov', 'PT USDG Sep',
37
37
  ];
38
38
  const isLeveragedPos = (usedAssets, dustLimit = 5) => {
39
39
  let borrowUnstable = 0;
@@ -73,7 +73,7 @@ exports.STAKING_ASSETS = [
73
73
  'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS', 'tETH', 'PT sUSDe Sep', 'PT USDe Sep',
74
74
  'PT sUSDe Nov', 'PT USDe Nov', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH', 'syrupUSDT', 'syrupUSDC', 'wstUSR',
75
75
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'GHO',
76
- 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov',
76
+ 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov', 'PT USDG Sep',
77
77
  ];
78
78
  exports.getStakingApy = (0, memoizee_1.default)((asset_1, ...args_1) => __awaiter(void 0, [asset_1, ...args_1], void 0, function* (asset, network = common_1.NetworkNumber.Eth) {
79
79
  try {
@@ -155,6 +155,8 @@ exports.getStakingApy = (0, memoizee_1.default)((asset_1, ...args_1) => __awaite
155
155
  return yield getApyFromDfsApi('PT USDe June', network);
156
156
  if (asset === 'PT USDG May')
157
157
  return yield getApyFromDfsApi('PT USDG May', network);
158
+ if (asset === 'PT USDG Sep')
159
+ return yield getApyFromDfsApi('PT USDG Sep', network);
158
160
  if (asset === 'PT sUSDS Nov')
159
161
  return yield getApyFromDfsApi('PT sUSDS Nov', network);
160
162
  if (asset === 'GHO')
@@ -20,7 +20,7 @@ export interface AaveV4TokenizationSpokeData {
20
20
  }
21
21
  export declare const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress>;
22
22
  export declare const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>>;
23
- export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME';
23
+ export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME' | 'PAXOS';
24
24
  export declare const aaveV4GetTokenizedHubKey: (hubNameOrKey?: string | null) => AaveV4TokenizedHubKey | null;
25
25
  export declare const aaveV4GetTokenizedVaultKey: (symbol: string, hubNameOrKey?: string | null) => string | null;
26
26
  export declare const aaveV4GetTokenizedVaultAddress: (network: NetworkNumber, symbol: string, hubNameOrKey?: string | null) => EthAddress | undefined;
@@ -30,6 +30,8 @@ export const AAVE_V4_TOKENIZED_SPOKES = {
30
30
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
31
31
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
32
32
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
33
+ // USDC_PAXOS: '0x0',
34
+ // USDT_PAXOS: '0x0',
33
35
  };
34
36
  export const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES = {
35
37
  [NetworkNumber.Eth]: Object.values(AAVE_V4_TOKENIZED_SPOKES),
@@ -44,12 +46,16 @@ export const aaveV4GetTokenizedHubKey = (hubNameOrKey) => {
44
46
  return 'PLUS';
45
47
  if (normalized === 'PRIME' || normalized === 'PRIME HUB')
46
48
  return 'PRIME';
49
+ if (normalized === 'PAXOS' || normalized === 'PAXOS HUB')
50
+ return 'PAXOS';
47
51
  if (normalized.includes('CORE'))
48
52
  return 'CORE';
49
53
  if (normalized.includes('PLUS'))
50
54
  return 'PLUS';
51
55
  if (normalized.includes('PRIME'))
52
56
  return 'PRIME';
57
+ if (normalized.includes('PAXOS'))
58
+ return 'PAXOS';
53
59
  return null;
54
60
  };
55
61
  export const aaveV4GetTokenizedVaultKey = (symbol, hubNameOrKey) => {
@@ -22,7 +22,7 @@ export const STABLE_ASSETS = [
22
22
  'USDe', 'sUSDe', 'USDS', 'sUSDS', 'USR', 'EURC', 'BOLD', 'BOLD Legacy', 'RLUSD', 'PT sUSDe July', 'PT eUSDe May',
23
23
  'USDtb', 'eUSDe', 'PT USDe July', 'PT eUSDe Aug', 'PT sUSDe Sep', 'PT USDe Sep', 'PT sUSDe Nov', 'PT USDe Nov', 'PT sUSDe Jan', 'PT USDe Jan',
24
24
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'frxUSD', 'PT sUSDe June',
25
- 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov',
25
+ 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov', 'PT USDG Sep',
26
26
  ];
27
27
  export const isLeveragedPos = (usedAssets, dustLimit = 5) => {
28
28
  let borrowUnstable = 0;
@@ -67,7 +67,7 @@ export const STAKING_ASSETS = [
67
67
  'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS', 'tETH', 'PT sUSDe Sep', 'PT USDe Sep',
68
68
  'PT sUSDe Nov', 'PT USDe Nov', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH', 'syrupUSDT', 'syrupUSDC', 'wstUSR',
69
69
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'GHO',
70
- 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov',
70
+ 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov', 'PT USDG Sep',
71
71
  ];
72
72
  export const getStakingApy = memoize((asset_1, ...args_1) => __awaiter(void 0, [asset_1, ...args_1], void 0, function* (asset, network = NetworkNumber.Eth) {
73
73
  try {
@@ -149,6 +149,8 @@ export const getStakingApy = memoize((asset_1, ...args_1) => __awaiter(void 0, [
149
149
  return yield getApyFromDfsApi('PT USDe June', network);
150
150
  if (asset === 'PT USDG May')
151
151
  return yield getApyFromDfsApi('PT USDG May', network);
152
+ if (asset === 'PT USDG Sep')
153
+ return yield getApyFromDfsApi('PT USDG Sep', network);
152
154
  if (asset === 'PT sUSDS Nov')
153
155
  return yield getApyFromDfsApi('PT sUSDS Nov', network);
154
156
  if (asset === 'GHO')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/positions-sdk",
3
- "version": "2.1.114-aave-v4-hub-dev",
3
+ "version": "2.1.114-aave-v4-hub-2-dev",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -48,13 +48,16 @@ export const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress> = {
48
48
  GHO_PRIME: '0x900fD46d565d1ac8995928c0179052ec02a6D0E1',
49
49
  USDC_PRIME: '0x486415fb1F8b062c89ED548f871cf64304AACb31',
50
50
  USDT_PRIME: '0x46c588DD8453aC259c1f6a54b4C9A93C2aC3762D',
51
+
52
+ // USDC_PAXOS: '0x0',
53
+ // USDT_PAXOS: '0x0',
51
54
  };
52
55
 
53
56
  export const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>> = {
54
57
  [NetworkNumber.Eth]: Object.values(AAVE_V4_TOKENIZED_SPOKES),
55
58
  };
56
59
 
57
- export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME';
60
+ export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME' | 'PAXOS';
58
61
 
59
62
  export const aaveV4GetTokenizedHubKey = (hubNameOrKey?: string | null): AaveV4TokenizedHubKey | null => {
60
63
  if (!hubNameOrKey) return null;
@@ -63,10 +66,12 @@ export const aaveV4GetTokenizedHubKey = (hubNameOrKey?: string | null): AaveV4To
63
66
  if (normalized === 'CORE' || normalized === 'CORE HUB') return 'CORE';
64
67
  if (normalized === 'PLUS' || normalized === 'PLUS HUB') return 'PLUS';
65
68
  if (normalized === 'PRIME' || normalized === 'PRIME HUB') return 'PRIME';
69
+ if (normalized === 'PAXOS' || normalized === 'PAXOS HUB') return 'PAXOS';
66
70
 
67
71
  if (normalized.includes('CORE')) return 'CORE';
68
72
  if (normalized.includes('PLUS')) return 'PLUS';
69
73
  if (normalized.includes('PRIME')) return 'PRIME';
74
+ if (normalized.includes('PAXOS')) return 'PAXOS';
70
75
 
71
76
  return null;
72
77
  };
@@ -25,7 +25,7 @@ export const STABLE_ASSETS = [
25
25
  'USDe', 'sUSDe', 'USDS', 'sUSDS', 'USR', 'EURC', 'BOLD', 'BOLD Legacy', 'RLUSD', 'PT sUSDe July', 'PT eUSDe May',
26
26
  'USDtb', 'eUSDe', 'PT USDe July', 'PT eUSDe Aug', 'PT sUSDe Sep', 'PT USDe Sep', 'PT sUSDe Nov', 'PT USDe Nov', 'PT sUSDe Jan', 'PT USDe Jan',
27
27
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'frxUSD', 'PT sUSDe June',
28
- 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov',
28
+ 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov', 'PT USDG Sep',
29
29
  ];
30
30
 
31
31
  export const isLeveragedPos = (usedAssets: MMUsedAssets, dustLimit = 5) => {
@@ -65,7 +65,7 @@ export const STAKING_ASSETS = [
65
65
  'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS', 'tETH', 'PT sUSDe Sep', 'PT USDe Sep',
66
66
  'PT sUSDe Nov', 'PT USDe Nov', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH', 'syrupUSDT', 'syrupUSDC', 'wstUSR',
67
67
  'PT sUSDe Feb', 'PT USDe Feb', 'PT sUSDe Apr', 'PT USDe Apr', 'PT sUSDe May', 'PT USDe May', 'PT srUSDe Apr', 'GHO',
68
- 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov',
68
+ 'PT sUSDe June', 'PT USDe June', 'PT srUSDe Jun', 'PT USDG May', 'PT sUSDS Nov', 'PT USDG Sep',
69
69
  ];
70
70
 
71
71
  export const getStakingApy = memoize(async (asset: string, network: number = NetworkNumber.Eth) => {
@@ -109,6 +109,7 @@ export const getStakingApy = memoize(async (asset: string, network: number = Net
109
109
  if (asset === 'PT sUSDe June') return await getApyFromDfsApi('PT sUSDe June', network);
110
110
  if (asset === 'PT USDe June') return await getApyFromDfsApi('PT USDe June', network);
111
111
  if (asset === 'PT USDG May') return await getApyFromDfsApi('PT USDG May', network);
112
+ if (asset === 'PT USDG Sep') return await getApyFromDfsApi('PT USDG Sep', network);
112
113
  if (asset === 'PT sUSDS Nov') return await getApyFromDfsApi('PT sUSDS Nov', network);
113
114
  if (asset === 'GHO') return await getApyFromDfsApi('GHO', network);
114
115
  } catch (e) {