@pear-protocol/hyperliquid-sdk 0.1.16 → 0.1.17

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/dist/index.d.ts CHANGED
@@ -593,7 +593,7 @@ interface HLChannelDataMap {
593
593
  allDexsAssetCtxs: AllDexsAssetCtxsData;
594
594
  userFills: any;
595
595
  }
596
- type UserAbstraction = 'dexAbstraction' | 'disabled' | 'unifiedAccount';
596
+ type UserAbstraction = 'dexAbstraction' | 'disabled' | 'unifiedAccount' | 'portfolioMargin';
597
597
  interface WebData3UserState {
598
598
  agentAddress?: string;
599
599
  agentValidUntil?: number;
package/dist/index.js CHANGED
@@ -7100,7 +7100,7 @@ const buildPositionValue = (rawPositions, clearinghouseState, getAssetByName) =>
7100
7100
  mappedPosition.marginUsed += mappedPositionAssets.marginUsed;
7101
7101
  entryMarginUsed += mappedPositionAssets.entryMarginUsed;
7102
7102
  mappedPosition.entryRatio *= Math.pow(longAsset.entryPrice, mappedPositionAssets.initialWeight);
7103
- mappedPosition.markRatio *= Math.pow(currentPrice, mappedPositionAssets.currentWeight);
7103
+ mappedPosition.markRatio *= Math.pow(currentPrice, mappedPositionAssets.initialWeight);
7104
7104
  return mappedPositionAssets;
7105
7105
  });
7106
7106
  mappedPosition.shortAssets = position.shortAssets.map((shortAsset) => {
package/dist/types.d.ts CHANGED
@@ -565,7 +565,7 @@ export interface HLChannelDataMap {
565
565
  allDexsAssetCtxs: AllDexsAssetCtxsData;
566
566
  userFills: any;
567
567
  }
568
- export type UserAbstraction = 'dexAbstraction' | 'disabled' | 'unifiedAccount';
568
+ export type UserAbstraction = 'dexAbstraction' | 'disabled' | 'unifiedAccount' | 'portfolioMargin';
569
569
  export interface WebData3UserState {
570
570
  agentAddress?: string;
571
571
  agentValidUntil?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/hyperliquid-sdk",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "React SDK for Pear Protocol Hyperliquid API integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",