@lifi/perps-types 0.1.1-alpha.2 → 0.1.1-alpha.21

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.
Files changed (141) hide show
  1. package/package.json +24 -7
  2. package/providers/hyperliquid/package.json +3 -3
  3. package/src/_cjs/{market.js → action.js} +1 -1
  4. package/src/_cjs/action.js.map +1 -0
  5. package/src/_cjs/{trading.js → asset.js} +1 -1
  6. package/src/_cjs/asset.js.map +1 -0
  7. package/src/_cjs/enums.js +69 -15
  8. package/src/_cjs/enums.js.map +1 -1
  9. package/src/_cjs/index.js +3 -4
  10. package/src/_cjs/index.js.map +1 -1
  11. package/src/_cjs/providers/hyperliquid/assetId.js +11 -9
  12. package/src/_cjs/providers/hyperliquid/assetId.js.map +1 -1
  13. package/src/_cjs/providers/hyperliquid/mappers/activity.js +66 -0
  14. package/src/_cjs/providers/hyperliquid/mappers/activity.js.map +1 -0
  15. package/src/_cjs/providers/hyperliquid/mappers/{market.js → asset.js} +9 -9
  16. package/src/_cjs/providers/hyperliquid/mappers/asset.js.map +1 -0
  17. package/src/_cjs/providers/hyperliquid/mappers/fill.js +64 -0
  18. package/src/_cjs/providers/hyperliquid/mappers/fill.js.map +1 -0
  19. package/src/_cjs/providers/hyperliquid/mappers/index.js +12 -7
  20. package/src/_cjs/providers/hyperliquid/mappers/index.js.map +1 -1
  21. package/src/_cjs/providers/hyperliquid/mappers/order.js +59 -10
  22. package/src/_cjs/providers/hyperliquid/mappers/order.js.map +1 -1
  23. package/src/_cjs/providers/hyperliquid/mappers/position.js +7 -5
  24. package/src/_cjs/providers/hyperliquid/mappers/position.js.map +1 -1
  25. package/src/_cjs/providers/hyperliquid/mappers/shared.js +0 -10
  26. package/src/_cjs/providers/hyperliquid/mappers/shared.js.map +1 -1
  27. package/src/_cjs/providers/hyperliquid/types.js +7 -0
  28. package/src/_cjs/providers/hyperliquid/types.js.map +1 -1
  29. package/src/_cjs/{withdrawal.js → providers.js} +1 -1
  30. package/src/_cjs/providers.js.map +1 -0
  31. package/src/_esm/action.js +2 -0
  32. package/src/_esm/action.js.map +1 -0
  33. package/src/_esm/asset.js +2 -0
  34. package/src/_esm/asset.js.map +1 -0
  35. package/src/_esm/enums.js +68 -14
  36. package/src/_esm/enums.js.map +1 -1
  37. package/src/_esm/index.js +3 -4
  38. package/src/_esm/index.js.map +1 -1
  39. package/src/_esm/providers/hyperliquid/assetId.js +13 -11
  40. package/src/_esm/providers/hyperliquid/assetId.js.map +1 -1
  41. package/src/_esm/providers/hyperliquid/mappers/activity.js +69 -0
  42. package/src/_esm/providers/hyperliquid/mappers/activity.js.map +1 -0
  43. package/src/_esm/providers/hyperliquid/mappers/{market.js → asset.js} +7 -7
  44. package/src/_esm/providers/hyperliquid/mappers/asset.js.map +1 -0
  45. package/src/_esm/providers/hyperliquid/mappers/fill.js +62 -0
  46. package/src/_esm/providers/hyperliquid/mappers/fill.js.map +1 -0
  47. package/src/_esm/providers/hyperliquid/mappers/index.js +4 -4
  48. package/src/_esm/providers/hyperliquid/mappers/index.js.map +1 -1
  49. package/src/_esm/providers/hyperliquid/mappers/order.js +56 -9
  50. package/src/_esm/providers/hyperliquid/mappers/order.js.map +1 -1
  51. package/src/_esm/providers/hyperliquid/mappers/position.js +7 -5
  52. package/src/_esm/providers/hyperliquid/mappers/position.js.map +1 -1
  53. package/src/_esm/providers/hyperliquid/mappers/shared.js +1 -12
  54. package/src/_esm/providers/hyperliquid/mappers/shared.js.map +1 -1
  55. package/src/_esm/providers/hyperliquid/types.js +12 -2
  56. package/src/_esm/providers/hyperliquid/types.js.map +1 -1
  57. package/src/_esm/providers.js +2 -0
  58. package/src/_esm/providers.js.map +1 -0
  59. package/src/_types/account.d.ts +73 -18
  60. package/src/_types/account.d.ts.map +1 -1
  61. package/src/_types/action.d.ts +136 -0
  62. package/src/_types/action.d.ts.map +1 -0
  63. package/src/_types/{market.d.ts → asset.d.ts} +23 -34
  64. package/src/_types/asset.d.ts.map +1 -0
  65. package/src/_types/enums.d.ts +54 -5
  66. package/src/_types/enums.d.ts.map +1 -1
  67. package/src/_types/index.d.ts +3 -4
  68. package/src/_types/index.d.ts.map +1 -1
  69. package/src/_types/providers/hyperliquid/assetId.d.ts +8 -6
  70. package/src/_types/providers/hyperliquid/assetId.d.ts.map +1 -1
  71. package/src/_types/providers/hyperliquid/mappers/activity.d.ts +13 -0
  72. package/src/_types/providers/hyperliquid/mappers/activity.d.ts.map +1 -0
  73. package/src/_types/providers/hyperliquid/mappers/asset.d.ts +4 -0
  74. package/src/_types/providers/hyperliquid/mappers/asset.d.ts.map +1 -0
  75. package/src/_types/providers/hyperliquid/mappers/fill.d.ts +6 -0
  76. package/src/_types/providers/hyperliquid/mappers/fill.d.ts.map +1 -0
  77. package/src/_types/providers/hyperliquid/mappers/index.d.ts +4 -4
  78. package/src/_types/providers/hyperliquid/mappers/index.d.ts.map +1 -1
  79. package/src/_types/providers/hyperliquid/mappers/order.d.ts +8 -3
  80. package/src/_types/providers/hyperliquid/mappers/order.d.ts.map +1 -1
  81. package/src/_types/providers/hyperliquid/mappers/position.d.ts +1 -1
  82. package/src/_types/providers/hyperliquid/mappers/position.d.ts.map +1 -1
  83. package/src/_types/providers/hyperliquid/mappers/shared.d.ts +0 -6
  84. package/src/_types/providers/hyperliquid/mappers/shared.d.ts.map +1 -1
  85. package/src/_types/providers/hyperliquid/types.d.ts +55 -11
  86. package/src/_types/providers/hyperliquid/types.d.ts.map +1 -1
  87. package/src/_types/providers.d.ts +22 -0
  88. package/src/_types/providers.d.ts.map +1 -0
  89. package/src/_types/subscriptions.d.ts +24 -18
  90. package/src/_types/subscriptions.d.ts.map +1 -1
  91. package/src/account.ts +94 -18
  92. package/src/action.ts +182 -0
  93. package/src/asset.ts +88 -0
  94. package/src/enums.ts +63 -3
  95. package/src/index.ts +3 -4
  96. package/src/providers/hyperliquid/assetId.ts +18 -12
  97. package/src/providers/hyperliquid/mappers/activity.ts +94 -0
  98. package/src/providers/hyperliquid/mappers/{market.ts → asset.ts} +9 -12
  99. package/src/providers/hyperliquid/mappers/fill.ts +77 -0
  100. package/src/providers/hyperliquid/mappers/index.ts +10 -4
  101. package/src/providers/hyperliquid/mappers/order.ts +62 -15
  102. package/src/providers/hyperliquid/mappers/position.ts +7 -10
  103. package/src/providers/hyperliquid/mappers/shared.ts +0 -15
  104. package/src/providers/hyperliquid/types.ts +100 -20
  105. package/src/providers.ts +25 -0
  106. package/src/subscriptions.ts +22 -20
  107. package/src/_cjs/authorization.js +0 -3
  108. package/src/_cjs/authorization.js.map +0 -1
  109. package/src/_cjs/market.js.map +0 -1
  110. package/src/_cjs/providers/hyperliquid/mappers/history.js +0 -22
  111. package/src/_cjs/providers/hyperliquid/mappers/history.js.map +0 -1
  112. package/src/_cjs/providers/hyperliquid/mappers/market.js.map +0 -1
  113. package/src/_cjs/trading.js.map +0 -1
  114. package/src/_cjs/withdrawal.js.map +0 -1
  115. package/src/_esm/authorization.js +0 -2
  116. package/src/_esm/authorization.js.map +0 -1
  117. package/src/_esm/market.js +0 -2
  118. package/src/_esm/market.js.map +0 -1
  119. package/src/_esm/providers/hyperliquid/mappers/history.js +0 -18
  120. package/src/_esm/providers/hyperliquid/mappers/history.js.map +0 -1
  121. package/src/_esm/providers/hyperliquid/mappers/market.js.map +0 -1
  122. package/src/_esm/trading.js +0 -2
  123. package/src/_esm/trading.js.map +0 -1
  124. package/src/_esm/withdrawal.js +0 -2
  125. package/src/_esm/withdrawal.js.map +0 -1
  126. package/src/_types/authorization.d.ts +0 -39
  127. package/src/_types/authorization.d.ts.map +0 -1
  128. package/src/_types/market.d.ts.map +0 -1
  129. package/src/_types/providers/hyperliquid/mappers/history.d.ts +0 -4
  130. package/src/_types/providers/hyperliquid/mappers/history.d.ts.map +0 -1
  131. package/src/_types/providers/hyperliquid/mappers/market.d.ts +0 -4
  132. package/src/_types/providers/hyperliquid/mappers/market.d.ts.map +0 -1
  133. package/src/_types/trading.d.ts +0 -82
  134. package/src/_types/trading.d.ts.map +0 -1
  135. package/src/_types/withdrawal.d.ts +0 -37
  136. package/src/_types/withdrawal.d.ts.map +0 -1
  137. package/src/authorization.ts +0 -46
  138. package/src/market.ts +0 -97
  139. package/src/providers/hyperliquid/mappers/history.ts +0 -25
  140. package/src/trading.ts +0 -99
  141. package/src/withdrawal.ts +0 -44
@@ -1,5 +1,5 @@
1
1
  // ---------------------------------------------------------------------------
2
- // Hand-written Hyperliquid /info response types
2
+ // Hyperliquid /info response types
3
3
  // ---------------------------------------------------------------------------
4
4
 
5
5
  // -- metaAndAssetCtxs -------------------------------------------------------
@@ -8,16 +8,19 @@ export type HlUniverseItem = {
8
8
  name: string
9
9
  szDecimals: number
10
10
  maxLeverage: number
11
- onlyIsolated: boolean
12
- isDelisted: boolean
11
+ onlyIsolated?: boolean
12
+ isDelisted?: boolean
13
13
  }
14
14
 
15
- export type HlMeta = { universe: HlUniverseItem[] }
15
+ export type HlMeta = {
16
+ universe: HlUniverseItem[]
17
+ }
16
18
 
17
19
  export type HlAssetCtx = {
18
20
  funding: string
19
21
  openInterest: string
20
22
  dayNtlVlm: string
23
+ prevDayPx: string
21
24
  markPx: string
22
25
  }
23
26
 
@@ -44,7 +47,11 @@ export type HlCandleSnapshot = HlCandle[]
44
47
 
45
48
  // -- l2Book -----------------------------------------------------------------
46
49
 
47
- export type HlLevel = { px: string; sz: string; n: number }
50
+ export type HlLevel = {
51
+ px: string
52
+ sz: string
53
+ n: number
54
+ }
48
55
 
49
56
  export type HlL2Book = {
50
57
  levels: [HlLevel[], HlLevel[]]
@@ -61,15 +68,26 @@ export type HlPosition = {
61
68
  liquidationPx: string
62
69
  unrealizedPnl: string
63
70
  marginUsed: string
64
- leverage: { type: string; value: number }
71
+ leverage: {
72
+ type: string
73
+ value: number
74
+ }
65
75
  }
66
76
 
67
- export type HlAssetPosition = { position: HlPosition }
77
+ export type HlAssetPosition = {
78
+ position: HlPosition
79
+ }
68
80
 
69
81
  export type HlClearinghouseState = {
70
82
  assetPositions: HlAssetPosition[]
71
- marginSummary: { accountValue: string; totalMarginUsed: string }
72
- crossMarginSummary: { accountValue: string; totalMarginUsed: string }
83
+ marginSummary: {
84
+ accountValue: string
85
+ totalMarginUsed: string
86
+ }
87
+ crossMarginSummary: {
88
+ accountValue: string
89
+ totalMarginUsed: string
90
+ }
73
91
  }
74
92
 
75
93
  // -- spotClearinghouseState -------------------------------------------------
@@ -106,13 +124,20 @@ export type HlFrontendOpenOrder = {
106
124
  origSz: string
107
125
  reduceOnly: boolean
108
126
  timestamp: number
127
+ isTrigger: boolean
128
+ isPositionTpsl: boolean
129
+ triggerCondition: string
130
+ triggerPx: string
131
+ children: HlFrontendOpenOrder[]
132
+ tif: string | null
133
+ cloid: string | null
109
134
  }
110
135
 
111
136
  export type HlFrontendOpenOrders = HlFrontendOpenOrder[]
112
137
 
113
138
  // -- extraAgents ------------------------------------------------------------
114
139
 
115
- export type HlExtraAgents = Array<Record<string, unknown>>
140
+ export type HlExtraAgents = Record<string, unknown>[]
116
141
 
117
142
  // -- userFills / userFillsByTime --------------------------------------------
118
143
 
@@ -126,6 +151,7 @@ export type HlUserFill = {
126
151
  fee: string
127
152
  closedPnl: string
128
153
  time: number
154
+ startPosition: string
129
155
  }
130
156
 
131
157
  export type HlUserFills = HlUserFill[]
@@ -134,11 +160,6 @@ export type HlUserFillsByTime = HlUserFill[]
134
160
 
135
161
  // -- orderStatus ------------------------------------------------------------
136
162
 
137
- export type HlOrderStatusFound = {
138
- status: 'order'
139
- order: HlOrderDetail
140
- }
141
-
142
163
  export type HlOrderDetail = {
143
164
  order: {
144
165
  oid: number
@@ -159,21 +180,80 @@ export type HlOrderDetail = {
159
180
  statusTimestamp: number
160
181
  }
161
182
 
183
+ export type HlOrderStatusFound = {
184
+ status: 'order'
185
+ order: HlOrderDetail
186
+ }
187
+
162
188
  export type HlOrderStatusResponse =
163
189
  | HlOrderStatusFound
164
190
  | { status: 'unknownOid' }
165
191
 
192
+ // -- userNonFundingLedgerUpdates --------------------------------------------
193
+
194
+ export type HlLedgerDelta = {
195
+ type: string
196
+ usdc?: string
197
+ [key: string]: unknown
198
+ }
199
+
200
+ export type HlLedgerUpdate = {
201
+ time: number
202
+ hash: string
203
+ delta: HlLedgerDelta
204
+ }
205
+
206
+ export type HlUserNonFundingLedgerUpdates = HlLedgerUpdate[]
207
+
208
+ // -- userFunding ------------------------------------------------------------
209
+
210
+ export type HlFundingDelta = {
211
+ type: 'funding'
212
+ coin: string
213
+ usdc: string
214
+ szi: string
215
+ fundingRate: string
216
+ }
217
+
218
+ export type HlFundingUpdate = {
219
+ time: number
220
+ hash: string
221
+ delta: HlFundingDelta
222
+ }
223
+
224
+ export type HlUserFunding = HlFundingUpdate[]
225
+
226
+ // -- abstraction mode -------------------------------------------------------
227
+
228
+ /**
229
+ * Possible values returned by the `userAbstraction` info endpoint.
230
+ * `null` means abstraction has never been set (standard mode).
231
+ */
232
+ export const HlAbstractionMode = {
233
+ DISABLED: 'disabled',
234
+ UNIFIED_ACCOUNT: 'unifiedAccount',
235
+ PORTFOLIO_MARGIN: 'portfolioMargin',
236
+ DEX_ABSTRACTION: 'dexAbstraction',
237
+ } as const
238
+
239
+ export type HlAbstractionMode =
240
+ (typeof HlAbstractionMode)[keyof typeof HlAbstractionMode]
241
+
166
242
  // -- perpDexs ---------------------------------------------------------------
167
243
 
168
- export type HlPerpDexs = Array<null | { name: string }>
244
+ export type HlPerpDexs = (null | { name: string })[]
169
245
 
170
246
  // ---------------------------------------------------------------------------
171
- // Exchange request types
247
+ // Exchange request / response types
172
248
  // ---------------------------------------------------------------------------
173
249
 
174
250
  export type HlExchangeRequest = {
175
251
  action: Record<string, unknown>
176
- signature: { r: string; s: string; v: number }
252
+ signature: {
253
+ r: string
254
+ s: string
255
+ v: number
256
+ }
177
257
  nonce: number
178
258
  vaultAddress?: string | null
179
259
  }
@@ -185,7 +265,7 @@ export type HlExchangeResponse = {
185
265
  | {
186
266
  type: string
187
267
  data?: {
188
- statuses?: Array<
268
+ statuses?: (
189
269
  | string
190
270
  | { filled: { totalSz: string; avgPx: string; oid: number } }
191
271
  | { resting: { oid: number } }
@@ -193,7 +273,7 @@ export type HlExchangeResponse = {
193
273
  | { waitingForTrigger: { oid: number } }
194
274
  | { success: true }
195
275
  | { error: string }
196
- >
276
+ )[]
197
277
  status?: unknown
198
278
  }
199
279
  }
@@ -0,0 +1,25 @@
1
+ import type { ActionType, PerpsSigner } from './enums.js'
2
+
3
+ export interface ActionDescriptor {
4
+ type: ActionType
5
+ signers: PerpsSigner[]
6
+ }
7
+
8
+ export interface ProviderMarketInfo {
9
+ id: string
10
+ quoteAsset: string | null
11
+ }
12
+
13
+ export interface Provider {
14
+ key: string
15
+ name: string
16
+ logoURI: string
17
+ prepareAccountActions: ActionDescriptor[]
18
+ actions: ActionDescriptor[]
19
+ markets: ProviderMarketInfo[]
20
+ wsUrl?: string
21
+ }
22
+
23
+ export interface ProvidersResponse {
24
+ providers: Provider[]
25
+ }
@@ -1,12 +1,7 @@
1
1
  import type { Address } from './typedData.js'
2
- import type {
3
- Candle,
4
- OhlcvInterval,
5
- OrderbookResponse,
6
- PricesResponse,
7
- } from './market.js'
8
- import type { HistoryItem, Position } from './account.js'
9
- import type { Order } from './trading.js'
2
+ import type { Candle, OhlcvInterval, OrderbookResponse } from './asset.js'
3
+ import type { Fill, Position } from './account.js'
4
+ import type { Order } from './action.js'
10
5
 
11
6
  // --- Channels the user can subscribe to ---
12
7
 
@@ -14,17 +9,13 @@ export type PricesSubscription = { channel: 'prices'; dex: string }
14
9
  export type OrderbookSubscription = {
15
10
  channel: 'orderbook'
16
11
  dex: string
17
- symbol: string
18
- }
19
- export type TradesSubscription = {
20
- channel: 'trades'
21
- dex: string
22
- symbol: string
12
+ assetId: string
13
+ depth?: number
23
14
  }
24
15
  export type CandleSubscription = {
25
16
  channel: 'candle'
26
17
  dex: string
27
- symbol: string
18
+ assetId: string
28
19
  interval: OhlcvInterval
29
20
  }
30
21
  export type OrderUpdatesSubscription = {
@@ -42,31 +33,42 @@ export type PositionsSubscription = {
42
33
  dex: string
43
34
  address: Address
44
35
  }
36
+ export type SpotBalancesSubscription = {
37
+ channel: 'spotBalances'
38
+ dex: string
39
+ address: Address
40
+ }
45
41
 
46
42
  export type Subscription =
47
43
  | PricesSubscription
48
44
  | OrderbookSubscription
49
- | TradesSubscription
50
45
  | CandleSubscription
51
46
  | OrderUpdatesSubscription
52
47
  | FillsSubscription
53
48
  | PositionsSubscription
49
+ | SpotBalancesSubscription
54
50
 
55
51
  // --- Events emitted to listeners ---
56
52
 
57
- export type PricesEvent = { channel: 'prices'; data: PricesResponse }
53
+ export interface SpotBalance {
54
+ coin: string
55
+ total: string
56
+ hold: string
57
+ }
58
+
59
+ export type PricesEvent = { channel: 'prices'; data: Record<string, string> }
58
60
  export type OrderbookEvent = { channel: 'orderbook'; data: OrderbookResponse }
59
- export type TradesEvent = { channel: 'trades'; data: HistoryItem[] }
60
61
  export type CandleEvent = { channel: 'candle'; data: Candle }
61
62
  export type OrderUpdatesEvent = { channel: 'orderUpdates'; data: Order[] }
62
- export type FillsEvent = { channel: 'fills'; data: HistoryItem[] }
63
+ export type FillsEvent = { channel: 'fills'; data: Fill[] }
63
64
  export type PositionsEvent = { channel: 'positions'; data: Position[] }
65
+ export type SpotBalancesEvent = { channel: 'spotBalances'; data: SpotBalance[] }
64
66
 
65
67
  export type SubscriptionEvent =
66
68
  | PricesEvent
67
69
  | OrderbookEvent
68
- | TradesEvent
69
70
  | CandleEvent
70
71
  | OrderUpdatesEvent
71
72
  | FillsEvent
72
73
  | PositionsEvent
74
+ | SpotBalancesEvent
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=authorization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authorization.js","sourceRoot":"","sources":["../authorization.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"market.js","sourceRoot":"","sources":["../market.ts"],"names":[],"mappings":""}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mapHistoryItem = void 0;
4
- const enums_js_1 = require("../../../enums.js");
5
- const shared_js_1 = require("./shared.js");
6
- const mapHistoryItem = (fill, dexKey, assetIdLookup) => ({
7
- id: String(fill.tid),
8
- symbol: fill.coin,
9
- assetId: (0, shared_js_1.resolveAssetIdFromLookup)(assetIdLookup, fill.coin),
10
- dex: dexKey,
11
- side: fill.side === 'B' ? enums_js_1.OrderSide.BUY : enums_js_1.OrderSide.SELL,
12
- type: fill.dir?.includes('Limit') ? enums_js_1.OrderType.LIMIT : enums_js_1.OrderType.MARKET,
13
- size: fill.sz,
14
- price: fill.px,
15
- status: enums_js_1.HistoryItemStatus.FILLED,
16
- filledSize: fill.sz,
17
- fee: fill.fee,
18
- realizedPnl: fill.closedPnl === '0' ? null : fill.closedPnl,
19
- createdAt: new Date(fill.time).toISOString(),
20
- });
21
- exports.mapHistoryItem = mapHistoryItem;
22
- //# sourceMappingURL=history.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"history.js","sourceRoot":"","sources":["../../../../providers/hyperliquid/mappers/history.ts"],"names":[],"mappings":";;;AAAA,gDAA2E;AAI3E,2CAAsD;AAE/C,MAAM,cAAc,GAAG,CAC5B,IAAgB,EAChB,MAAc,EACd,aAAkC,EACrB,EAAE,CAAC,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,IAAI;IACjB,OAAO,EAAE,IAAA,oCAAwB,EAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC;IAC3D,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,oBAAS,CAAC,GAAG,CAAC,CAAC,CAAC,oBAAS,CAAC,IAAI;IACxD,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,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C,YAAY,EAAE,QAAQ,CAAC,YAAY,KAAK,IAAI;QAC5C,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ,CAAC,OAAO;YACtB,eAAe;SAChB;QACD,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,SAAS,EAAE,QAAQ,CAAC,MAAM;KAC3B,CAAA;AACH,CAAC,CAAA;AA5BY,QAAA,SAAS,aA4BrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"trading.js","sourceRoot":"","sources":["../trading.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"withdrawal.js","sourceRoot":"","sources":["../withdrawal.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=authorization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authorization.js","sourceRoot":"","sources":["../authorization.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=market.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"market.js","sourceRoot":"","sources":["../market.ts"],"names":[],"mappings":""}
@@ -1,18 +0,0 @@
1
- import { HistoryItemStatus, OrderSide, OrderType } from '../../../enums.js';
2
- import { resolveAssetIdFromLookup } from './shared.js';
3
- export const mapHistoryItem = (fill, dexKey, assetIdLookup) => ({
4
- id: String(fill.tid),
5
- symbol: fill.coin,
6
- assetId: resolveAssetIdFromLookup(assetIdLookup, fill.coin),
7
- dex: dexKey,
8
- side: fill.side === 'B' ? OrderSide.BUY : OrderSide.SELL,
9
- type: fill.dir?.includes('Limit') ? OrderType.LIMIT : OrderType.MARKET,
10
- size: fill.sz,
11
- price: fill.px,
12
- status: HistoryItemStatus.FILLED,
13
- filledSize: fill.sz,
14
- fee: fill.fee,
15
- realizedPnl: fill.closedPnl === '0' ? null : fill.closedPnl,
16
- createdAt: new Date(fill.time).toISOString(),
17
- });
18
- //# sourceMappingURL=history.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"history.js","sourceRoot":"","sources":["../../../../providers/hyperliquid/mappers/history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAI3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAgB,EAChB,MAAc,EACd,aAAkC,EACrB,EAAE,CAAC,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC,IAAI;IACjB,OAAO,EAAE,wBAAwB,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC;IAC3D,GAAG,EAAE,MAAM;IACX,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI;IACxD,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM;IACtE,IAAI,EAAE,IAAI,CAAC,EAAE;IACb,KAAK,EAAE,IAAI,CAAC,EAAE;IACd,MAAM,EAAE,iBAAiB,CAAC,MAAM;IAChC,UAAU,EAAE,IAAI,CAAC,EAAE;IACnB,GAAG,EAAE,IAAI,CAAC,GAAG;IACb,WAAW,EAAE,IAAI,CAAC,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS;IAC3D,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;CAC7C,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"market.js","sourceRoot":"","sources":["../../../../providers/hyperliquid/mappers/market.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAGhD,MAAM,wBAAwB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA,CAAC,SAAS;AAEzD,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,QAAwB,EACxB,QAAoB,EACpB,QAAgB,EAChB,UAAkB,EAClB,MAAc,EACN,EAAE;IACV,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACtB,MAAM,eAAe,GACnB,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,wBAAwB,CAAC,GAAG,wBAAwB,CAAA;IAEtE,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,IAAI;QACrB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,OAAO,EAAE,qCAAqC,QAAQ,CAAC,IAAI,MAAM;QACjE,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE,UAAU,CAAC;QAC/C,GAAG,EAAE,MAAM;QACX,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,YAAY,EAAE,QAAQ,CAAC,YAAY,KAAK,IAAI;QAC5C,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ,CAAC,OAAO;YACtB,eAAe;SAChB;QACD,YAAY,EAAE,QAAQ,CAAC,YAAY;QACnC,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,SAAS,EAAE,QAAQ,CAAC,MAAM;KAC3B,CAAA;AACH,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=trading.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trading.js","sourceRoot":"","sources":["../trading.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=withdrawal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withdrawal.js","sourceRoot":"","sources":["../withdrawal.ts"],"names":[],"mappings":""}
@@ -1,39 +0,0 @@
1
- import type { Address, Hex, PerpsTypedData } from './typedData.js';
2
- export interface AuthorizationInput {
3
- key: string;
4
- params?: Record<string, unknown>;
5
- }
6
- export interface CreateAuthorizationRequest {
7
- dex: string;
8
- address: Address;
9
- signerAddress?: Address;
10
- authorizations: AuthorizationInput[];
11
- }
12
- export interface AuthorizationAction {
13
- action: string;
14
- description?: string;
15
- typedData: PerpsTypedData;
16
- }
17
- export interface CreateAuthorizationResponse {
18
- actions: AuthorizationAction[];
19
- }
20
- export interface SignedAuthorization {
21
- action: string;
22
- typedData: PerpsTypedData;
23
- signature: Hex;
24
- }
25
- export interface AuthorizationsRequest {
26
- dex: string;
27
- address: Address;
28
- signerAddress?: Address;
29
- actions: SignedAuthorization[];
30
- }
31
- export interface AuthorizationResult {
32
- action: string;
33
- success: boolean;
34
- error?: string;
35
- }
36
- export interface AuthorizationsResponse {
37
- results: AuthorizationResult[];
38
- }
39
- //# sourceMappingURL=authorization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authorization.d.ts","sourceRoot":"","sources":["../authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAElE,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC;AAED,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,cAAc,EAAE,kBAAkB,EAAE,CAAA;CACrC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,cAAc,CAAA;CAC1B;AAED,MAAM,WAAW,2BAA2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A;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,cAAc,EAAE,CAAA;IACtB,IAAI,EAAE,cAAc,EAAE,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;CAClB"}
@@ -1,4 +0,0 @@
1
- import type { HistoryItem } from '../../../account.js';
2
- import type { HlUserFill } from '../types.js';
3
- export declare const mapHistoryItem: (fill: HlUserFill, dexKey: string, assetIdLookup: Map<string, number>) => HistoryItem;
4
- //# sourceMappingURL=history.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../providers/hyperliquid/mappers/history.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAI7C,eAAO,MAAM,cAAc,GACzB,MAAM,UAAU,EAChB,QAAQ,MAAM,EACd,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KACjC,WAcD,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { Market } from '../../../market.js';
2
- import type { HlAssetCtx, HlUniverseItem } from '../types.js';
3
- export declare const mapMarket: (universe: HlUniverseItem, assetCtx: HlAssetCtx, dexIndex: number, indexInDex: number, dexKey: string) => Market;
4
- //# sourceMappingURL=market.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"market.d.ts","sourceRoot":"","sources":["../../../../providers/hyperliquid/mappers/market.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAI7D,eAAO,MAAM,SAAS,GACpB,UAAU,cAAc,EACxB,UAAU,UAAU,EACpB,UAAU,MAAM,EAChB,YAAY,MAAM,EAClB,QAAQ,MAAM,KACb,MAsBF,CAAA"}
@@ -1,82 +0,0 @@
1
- import type { Address, Hex, PerpsTypedData } from './typedData.js';
2
- import type { OrderActionType, OrderSide, OrderStatus, OrderType, TimeInForce, TriggerCondition } from './enums.js';
3
- export interface TriggerOrderInput {
4
- triggerPrice: string;
5
- limitPrice?: string;
6
- }
7
- export interface CreateOrderRequest {
8
- dex: string;
9
- address: Address;
10
- signerAddress?: Address;
11
- clientOrderId?: string;
12
- symbol: string;
13
- side: OrderSide;
14
- type: OrderType;
15
- size: string;
16
- price: string;
17
- leverage?: number;
18
- reduceOnly?: boolean;
19
- timeInForce?: TimeInForce;
20
- expiresAt?: string;
21
- takeProfit?: TriggerOrderInput;
22
- stopLoss?: TriggerOrderInput;
23
- }
24
- export interface OrderAction {
25
- action: OrderActionType;
26
- description?: string;
27
- typedData: PerpsTypedData;
28
- }
29
- export interface CreateOrderResponse {
30
- actions: OrderAction[];
31
- }
32
- export interface CancelOrderRequest {
33
- dex: string;
34
- address: Address;
35
- signerAddress?: Address;
36
- ids: string[];
37
- }
38
- export interface CancelOrderPayloadResponse {
39
- actions: OrderAction[];
40
- }
41
- export interface SignedOrderAction {
42
- action: OrderActionType;
43
- typedData: PerpsTypedData;
44
- signature: Hex;
45
- }
46
- export interface SubmitOrderRequest {
47
- dex: string;
48
- address: Address;
49
- signerAddress?: Address;
50
- actions: SignedOrderAction[];
51
- }
52
- export interface OrderActionResult {
53
- action: OrderActionType;
54
- success: boolean;
55
- orderId?: string;
56
- error?: string;
57
- }
58
- export interface SubmitOrderResponse {
59
- results: OrderActionResult[];
60
- }
61
- export interface Order {
62
- orderId: string;
63
- clientOrderId?: string;
64
- symbol: string;
65
- side: OrderSide;
66
- type: OrderType;
67
- price?: string;
68
- originalSize: string;
69
- remainingSize: string;
70
- filledSize: string;
71
- timeInForce?: TimeInForce;
72
- expiresAt?: string;
73
- reduceOnly?: boolean;
74
- isTrigger?: boolean;
75
- triggerPrice?: string;
76
- triggerCondition?: TriggerCondition;
77
- status: OrderStatus;
78
- averagePrice?: string;
79
- createdAt: string;
80
- updatedAt: string;
81
- }
82
- //# sourceMappingURL=trading.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trading.d.ts","sourceRoot":"","sources":["../trading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,KAAK,EACV,eAAe,EACf,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,gBAAgB,EACjB,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,EAAE,SAAS,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,eAAe,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,cAAc,CAAA;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,EAAE,CAAA;CACvB;AAED,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AAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,MAAM,EAAE,WAAW,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB"}
@@ -1,37 +0,0 @@
1
- import type { Address, Hex, PerpsTypedData } from './typedData.js';
2
- export interface WithdrawalInput {
3
- destination: Address;
4
- amount: string;
5
- }
6
- export interface CreateWithdrawalRequest {
7
- dex: string;
8
- address: Address;
9
- withdrawal: WithdrawalInput;
10
- }
11
- export interface WithdrawalAction {
12
- action: string;
13
- description?: string;
14
- typedData: PerpsTypedData;
15
- }
16
- export interface CreateWithdrawalResponse {
17
- action: WithdrawalAction;
18
- }
19
- export interface SignedWithdrawal {
20
- action: string;
21
- typedData: PerpsTypedData;
22
- signature: Hex;
23
- }
24
- export interface SubmitWithdrawalRequest {
25
- dex: string;
26
- address: Address;
27
- action: SignedWithdrawal;
28
- }
29
- export interface WithdrawalResult {
30
- action: string;
31
- success: boolean;
32
- error?: string;
33
- }
34
- export interface SubmitWithdrawalResponse {
35
- result: WithdrawalResult;
36
- }
37
- //# sourceMappingURL=withdrawal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"withdrawal.d.ts","sourceRoot":"","sources":["../withdrawal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAElE,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,eAAe,CAAA;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,cAAc,CAAA;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,gBAAgB,CAAA;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,cAAc,CAAA;IACzB,SAAS,EAAE,GAAG,CAAA;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,gBAAgB,CAAA;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,gBAAgB,CAAA;CACzB"}