@zyfai/sdk 0.2.33 → 0.2.34
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/README.md +5 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -1
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -722,6 +722,11 @@ Returns per-position APY breakdowns with per-token weighted averages.
|
|
|
722
722
|
const apyHistory = await sdk.getDailyApyHistory(walletAddress, "30D");
|
|
723
723
|
// Per-token weighted APY: { "USDC": 4.64, "WETH": 1.94 }
|
|
724
724
|
console.log("Weighted APY after fee:", apyHistory.weightedApyAfterFee);
|
|
725
|
+
console.log("Weighted APY (with rZFI Merkl):", apyHistory.weightedApyWithRzfiAfterFee);
|
|
726
|
+
console.log("Avg rZFI Merkl APR:", apyHistory.averageRzfiMerklApr);
|
|
727
|
+
// Per-chain breakdowns: { "8453": { "USDC": 4.59 }, "42161": { "WETH": 1.82 } }
|
|
728
|
+
console.log("By chain:", apyHistory.weightedApyAfterFeeByChain);
|
|
729
|
+
console.log("By chain (with rZFI):", apyHistory.weightedApyWithRzfiAfterFeeByChain);
|
|
725
730
|
// Each date entry has positions (with tokenSymbol), and per-token weighted_apy, fee, etc.
|
|
726
731
|
```
|
|
727
732
|
|
package/dist/index.d.mts
CHANGED
|
@@ -345,6 +345,7 @@ interface ApyPosition {
|
|
|
345
345
|
tokenSymbol?: string;
|
|
346
346
|
}
|
|
347
347
|
type TokenApy = Record<string, number>;
|
|
348
|
+
type ChainTokenApy = Record<string, TokenApy>;
|
|
348
349
|
interface DailyApyEntry {
|
|
349
350
|
positions: ApyPosition[];
|
|
350
351
|
weighted_apy: TokenApy;
|
|
@@ -361,6 +362,9 @@ interface DailyApyHistoryResponse {
|
|
|
361
362
|
requestedDays?: number;
|
|
362
363
|
weightedApyWithRzfiAfterFee?: TokenApy;
|
|
363
364
|
weightedApyAfterFee?: TokenApy;
|
|
365
|
+
averageRzfiMerklApr?: TokenApy;
|
|
366
|
+
weightedApyAfterFeeByChain?: ChainTokenApy;
|
|
367
|
+
weightedApyWithRzfiAfterFeeByChain?: ChainTokenApy;
|
|
364
368
|
}
|
|
365
369
|
interface RebalanceFrequencyResponse {
|
|
366
370
|
success: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -345,6 +345,7 @@ interface ApyPosition {
|
|
|
345
345
|
tokenSymbol?: string;
|
|
346
346
|
}
|
|
347
347
|
type TokenApy = Record<string, number>;
|
|
348
|
+
type ChainTokenApy = Record<string, TokenApy>;
|
|
348
349
|
interface DailyApyEntry {
|
|
349
350
|
positions: ApyPosition[];
|
|
350
351
|
weighted_apy: TokenApy;
|
|
@@ -361,6 +362,9 @@ interface DailyApyHistoryResponse {
|
|
|
361
362
|
requestedDays?: number;
|
|
362
363
|
weightedApyWithRzfiAfterFee?: TokenApy;
|
|
363
364
|
weightedApyAfterFee?: TokenApy;
|
|
365
|
+
averageRzfiMerklApr?: TokenApy;
|
|
366
|
+
weightedApyAfterFeeByChain?: ChainTokenApy;
|
|
367
|
+
weightedApyWithRzfiAfterFeeByChain?: ChainTokenApy;
|
|
364
368
|
}
|
|
365
369
|
interface RebalanceFrequencyResponse {
|
|
366
370
|
success: boolean;
|
package/dist/index.js
CHANGED
|
@@ -2849,7 +2849,10 @@ var _ZyfaiSDK = class _ZyfaiSDK {
|
|
|
2849
2849
|
totalDays: data.total_days || data.totalDays || 0,
|
|
2850
2850
|
requestedDays: data.requested_days || data.requestedDays,
|
|
2851
2851
|
weightedApyWithRzfiAfterFee: data.average_final_weighted_apy_after_fee_with_rzfi,
|
|
2852
|
-
weightedApyAfterFee: data.average_final_weighted_apy_after_fee
|
|
2852
|
+
weightedApyAfterFee: data.average_final_weighted_apy_after_fee,
|
|
2853
|
+
averageRzfiMerklApr: data.average_rzfi_merkl_apr,
|
|
2854
|
+
weightedApyAfterFeeByChain: data.average_final_weighted_apy_after_fee_by_chain,
|
|
2855
|
+
weightedApyWithRzfiAfterFeeByChain: data.average_final_weighted_apy_after_fee_with_rzfi_by_chain
|
|
2853
2856
|
};
|
|
2854
2857
|
} catch (error) {
|
|
2855
2858
|
throw new Error(
|
package/dist/index.mjs
CHANGED
|
@@ -2825,7 +2825,10 @@ var _ZyfaiSDK = class _ZyfaiSDK {
|
|
|
2825
2825
|
totalDays: data.total_days || data.totalDays || 0,
|
|
2826
2826
|
requestedDays: data.requested_days || data.requestedDays,
|
|
2827
2827
|
weightedApyWithRzfiAfterFee: data.average_final_weighted_apy_after_fee_with_rzfi,
|
|
2828
|
-
weightedApyAfterFee: data.average_final_weighted_apy_after_fee
|
|
2828
|
+
weightedApyAfterFee: data.average_final_weighted_apy_after_fee,
|
|
2829
|
+
averageRzfiMerklApr: data.average_rzfi_merkl_apr,
|
|
2830
|
+
weightedApyAfterFeeByChain: data.average_final_weighted_apy_after_fee_by_chain,
|
|
2831
|
+
weightedApyWithRzfiAfterFeeByChain: data.average_final_weighted_apy_after_fee_with_rzfi_by_chain
|
|
2829
2832
|
};
|
|
2830
2833
|
} catch (error) {
|
|
2831
2834
|
throw new Error(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zyfai/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.34",
|
|
4
4
|
"description": "TypeScript SDK for Zyfai Yield Optimization Engine - Deploy Safe smart wallets, manage session keys, and interact with DeFi protocols",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|