@zyfai/sdk 0.2.53 → 0.2.54

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 CHANGED
@@ -750,6 +750,10 @@ history.data.forEach((tx) => {
750
750
  console.log(tx.rebalanceLog.oldApy, tx.rebalanceLog.oldApy_withFee);
751
751
  console.log(tx.rebalanceLog.newApy, tx.rebalanceLog.newApy_withFee);
752
752
  }
753
+ tx.positions?.forEach((pos) => {
754
+ console.log(pos.amount); // resulting position balance after the action
755
+ console.log(pos.deltaAmount); // amount actually moved by the action (optional, not on older entries)
756
+ });
753
757
  });
754
758
  ```
755
759
 
package/dist/index.d.mts CHANGED
@@ -266,6 +266,12 @@ interface HistoryPosition {
266
266
  token_symbol?: string;
267
267
  protocol_icon?: string;
268
268
  protocol_name?: string;
269
+ /**
270
+ * The amount actually moved by this action (deposit/withdraw/rebalance delta),
271
+ * as opposed to `amount`, which is the resulting position balance after the action.
272
+ * Optional: not present on older history entries or actions that predate this field.
273
+ */
274
+ deltaAmount?: string;
269
275
  }
270
276
  interface HistoryFeeData {
271
277
  gasCostInToken?: string;
package/dist/index.d.ts CHANGED
@@ -266,6 +266,12 @@ interface HistoryPosition {
266
266
  token_symbol?: string;
267
267
  protocol_icon?: string;
268
268
  protocol_name?: string;
269
+ /**
270
+ * The amount actually moved by this action (deposit/withdraw/rebalance delta),
271
+ * as opposed to `amount`, which is the resulting position balance after the action.
272
+ * Optional: not present on older history entries or actions that predate this field.
273
+ */
274
+ deltaAmount?: string;
269
275
  }
270
276
  interface HistoryFeeData {
271
277
  gasCostInToken?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyfai/sdk",
3
- "version": "0.2.53",
3
+ "version": "0.2.54",
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",