lighter-sdk-client 0.2.11

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 (360) hide show
  1. package/README.md +574 -0
  2. package/dist/api/exchange/change-account-tier.cjs +6 -0
  3. package/dist/api/exchange/change-account-tier.d.cts +14 -0
  4. package/dist/api/exchange/change-account-tier.d.ts +14 -0
  5. package/dist/api/exchange/change-account-tier.js +6 -0
  6. package/dist/api/exchange/fastwithdraw.cjs +6 -0
  7. package/dist/api/exchange/fastwithdraw.d.cts +14 -0
  8. package/dist/api/exchange/fastwithdraw.d.ts +14 -0
  9. package/dist/api/exchange/fastwithdraw.js +6 -0
  10. package/dist/api/exchange/index.cjs +37 -0
  11. package/dist/api/exchange/index.d.cts +8 -0
  12. package/dist/api/exchange/index.d.ts +8 -0
  13. package/dist/api/exchange/index.js +37 -0
  14. package/dist/api/exchange/notification-ack.cjs +6 -0
  15. package/dist/api/exchange/notification-ack.d.cts +13 -0
  16. package/dist/api/exchange/notification-ack.d.ts +13 -0
  17. package/dist/api/exchange/notification-ack.js +6 -0
  18. package/dist/api/exchange/send-tx-batch.cjs +6 -0
  19. package/dist/api/exchange/send-tx-batch.d.cts +22 -0
  20. package/dist/api/exchange/send-tx-batch.d.ts +22 -0
  21. package/dist/api/exchange/send-tx-batch.js +6 -0
  22. package/dist/api/exchange/send-tx.cjs +12 -0
  23. package/dist/api/exchange/send-tx.d.cts +33 -0
  24. package/dist/api/exchange/send-tx.d.ts +33 -0
  25. package/dist/api/exchange/send-tx.js +12 -0
  26. package/dist/api/exchange/tokens-create.cjs +6 -0
  27. package/dist/api/exchange/tokens-create.d.cts +24 -0
  28. package/dist/api/exchange/tokens-create.d.ts +24 -0
  29. package/dist/api/exchange/tokens-create.js +6 -0
  30. package/dist/api/exchange/tokens-revoke.cjs +6 -0
  31. package/dist/api/exchange/tokens-revoke.d.cts +15 -0
  32. package/dist/api/exchange/tokens-revoke.d.ts +15 -0
  33. package/dist/api/exchange/tokens-revoke.js +6 -0
  34. package/dist/api/info/account-by-l1-address.cjs +6 -0
  35. package/dist/api/info/account-by-l1-address.d.cts +28 -0
  36. package/dist/api/info/account-by-l1-address.d.ts +28 -0
  37. package/dist/api/info/account-by-l1-address.js +6 -0
  38. package/dist/api/info/account.cjs +6 -0
  39. package/dist/api/info/account.d.cts +67 -0
  40. package/dist/api/info/account.d.ts +67 -0
  41. package/dist/api/info/account.js +6 -0
  42. package/dist/api/info/announcement.cjs +6 -0
  43. package/dist/api/info/announcement.d.cts +15 -0
  44. package/dist/api/info/announcement.d.ts +15 -0
  45. package/dist/api/info/announcement.js +6 -0
  46. package/dist/api/info/api-keys.cjs +6 -0
  47. package/dist/api/info/api-keys.d.cts +19 -0
  48. package/dist/api/info/api-keys.d.ts +19 -0
  49. package/dist/api/info/api-keys.js +6 -0
  50. package/dist/api/info/asset-details.cjs +6 -0
  51. package/dist/api/info/asset-details.d.cts +26 -0
  52. package/dist/api/info/asset-details.d.ts +26 -0
  53. package/dist/api/info/asset-details.js +6 -0
  54. package/dist/api/info/candles.cjs +6 -0
  55. package/dist/api/info/candles.d.cts +23 -0
  56. package/dist/api/info/candles.d.ts +23 -0
  57. package/dist/api/info/candles.js +6 -0
  58. package/dist/api/info/exchange-stats.cjs +6 -0
  59. package/dist/api/info/exchange-stats.d.cts +11 -0
  60. package/dist/api/info/exchange-stats.d.ts +11 -0
  61. package/dist/api/info/exchange-stats.js +6 -0
  62. package/dist/api/info/fastbridge-info.cjs +6 -0
  63. package/dist/api/info/fastbridge-info.d.cts +10 -0
  64. package/dist/api/info/fastbridge-info.d.ts +10 -0
  65. package/dist/api/info/fastbridge-info.js +6 -0
  66. package/dist/api/info/funding-rates.cjs +6 -0
  67. package/dist/api/info/funding-rates.d.cts +16 -0
  68. package/dist/api/info/funding-rates.d.ts +16 -0
  69. package/dist/api/info/funding-rates.js +6 -0
  70. package/dist/api/info/fundings.cjs +6 -0
  71. package/dist/api/info/fundings.d.cts +21 -0
  72. package/dist/api/info/fundings.d.ts +21 -0
  73. package/dist/api/info/fundings.js +6 -0
  74. package/dist/api/info/index.cjs +85 -0
  75. package/dist/api/info/index.d.cts +22 -0
  76. package/dist/api/info/index.d.ts +22 -0
  77. package/dist/api/info/index.js +85 -0
  78. package/dist/api/info/next-nonce.cjs +6 -0
  79. package/dist/api/info/next-nonce.d.cts +14 -0
  80. package/dist/api/info/next-nonce.d.ts +14 -0
  81. package/dist/api/info/next-nonce.js +6 -0
  82. package/dist/api/info/order-book-details.cjs +8 -0
  83. package/dist/api/info/order-book-details.d.cts +95 -0
  84. package/dist/api/info/order-book-details.d.ts +95 -0
  85. package/dist/api/info/order-book-details.js +8 -0
  86. package/dist/api/info/order-books.cjs +6 -0
  87. package/dist/api/info/order-books.d.cts +16 -0
  88. package/dist/api/info/order-books.d.ts +16 -0
  89. package/dist/api/info/order-books.js +6 -0
  90. package/dist/api/info/recent-trades.cjs +6 -0
  91. package/dist/api/info/recent-trades.d.cts +11 -0
  92. package/dist/api/info/recent-trades.d.ts +11 -0
  93. package/dist/api/info/recent-trades.js +6 -0
  94. package/dist/api/info/root-info.cjs +6 -0
  95. package/dist/api/info/root-info.d.cts +8 -0
  96. package/dist/api/info/root-info.d.ts +8 -0
  97. package/dist/api/info/root-info.js +6 -0
  98. package/dist/api/info/root-status.cjs +6 -0
  99. package/dist/api/info/root-status.d.cts +10 -0
  100. package/dist/api/info/root-status.d.ts +10 -0
  101. package/dist/api/info/root-status.js +6 -0
  102. package/dist/api/info/tx-from-l1-hash.cjs +6 -0
  103. package/dist/api/info/tx-from-l1-hash.d.cts +9 -0
  104. package/dist/api/info/tx-from-l1-hash.d.ts +9 -0
  105. package/dist/api/info/tx-from-l1-hash.js +6 -0
  106. package/dist/api/info/tx.cjs +6 -0
  107. package/dist/api/info/tx.d.cts +33 -0
  108. package/dist/api/info/tx.d.ts +33 -0
  109. package/dist/api/info/tx.js +6 -0
  110. package/dist/api/info/txs.cjs +6 -0
  111. package/dist/api/info/txs.d.cts +11 -0
  112. package/dist/api/info/txs.d.ts +11 -0
  113. package/dist/api/info/txs.js +6 -0
  114. package/dist/api/info/withdrawal-delay.cjs +6 -0
  115. package/dist/api/info/withdrawal-delay.d.cts +8 -0
  116. package/dist/api/info/withdrawal-delay.d.ts +8 -0
  117. package/dist/api/info/withdrawal-delay.js +6 -0
  118. package/dist/api/info-private/account-active-orders.cjs +6 -0
  119. package/dist/api/info-private/account-active-orders.d.cts +11 -0
  120. package/dist/api/info-private/account-active-orders.d.ts +11 -0
  121. package/dist/api/info-private/account-active-orders.js +6 -0
  122. package/dist/api/info-private/account-inactive-orders.cjs +6 -0
  123. package/dist/api/info-private/account-inactive-orders.d.cts +52 -0
  124. package/dist/api/info-private/account-inactive-orders.d.ts +52 -0
  125. package/dist/api/info-private/account-inactive-orders.js +6 -0
  126. package/dist/api/info-private/account-limits.cjs +6 -0
  127. package/dist/api/info-private/account-limits.d.cts +16 -0
  128. package/dist/api/info-private/account-limits.d.ts +16 -0
  129. package/dist/api/info-private/account-limits.js +6 -0
  130. package/dist/api/info-private/account-metadata.cjs +6 -0
  131. package/dist/api/info-private/account-metadata.d.cts +22 -0
  132. package/dist/api/info-private/account-metadata.d.ts +22 -0
  133. package/dist/api/info-private/account-metadata.js +6 -0
  134. package/dist/api/info-private/deposit-history.cjs +6 -0
  135. package/dist/api/info-private/deposit-history.d.cts +27 -0
  136. package/dist/api/info-private/deposit-history.d.ts +27 -0
  137. package/dist/api/info-private/deposit-history.js +6 -0
  138. package/dist/api/info-private/export.cjs +6 -0
  139. package/dist/api/info-private/export.d.cts +16 -0
  140. package/dist/api/info-private/export.d.ts +16 -0
  141. package/dist/api/info-private/export.js +6 -0
  142. package/dist/api/info-private/fastwithdraw-info.cjs +6 -0
  143. package/dist/api/info-private/fastwithdraw-info.d.cts +16 -0
  144. package/dist/api/info-private/fastwithdraw-info.d.ts +16 -0
  145. package/dist/api/info-private/fastwithdraw-info.js +6 -0
  146. package/dist/api/info-private/index.cjs +75 -0
  147. package/dist/api/info-private/index.d.cts +19 -0
  148. package/dist/api/info-private/index.d.ts +19 -0
  149. package/dist/api/info-private/index.js +75 -0
  150. package/dist/api/info-private/l1-metadata.cjs +6 -0
  151. package/dist/api/info-private/l1-metadata.d.cts +16 -0
  152. package/dist/api/info-private/l1-metadata.d.ts +16 -0
  153. package/dist/api/info-private/l1-metadata.js +6 -0
  154. package/dist/api/info-private/liquidations.cjs +6 -0
  155. package/dist/api/info-private/liquidations.d.cts +66 -0
  156. package/dist/api/info-private/liquidations.d.ts +66 -0
  157. package/dist/api/info-private/liquidations.js +6 -0
  158. package/dist/api/info-private/pnl.cjs +6 -0
  159. package/dist/api/info-private/pnl.d.cts +24 -0
  160. package/dist/api/info-private/pnl.d.ts +24 -0
  161. package/dist/api/info-private/pnl.js +6 -0
  162. package/dist/api/info-private/position-funding.cjs +6 -0
  163. package/dist/api/info-private/position-funding.d.cts +28 -0
  164. package/dist/api/info-private/position-funding.d.ts +28 -0
  165. package/dist/api/info-private/position-funding.js +6 -0
  166. package/dist/api/info-private/public-pools-metadata.cjs +6 -0
  167. package/dist/api/info-private/public-pools-metadata.d.cts +24 -0
  168. package/dist/api/info-private/public-pools-metadata.d.ts +24 -0
  169. package/dist/api/info-private/public-pools-metadata.js +6 -0
  170. package/dist/api/info-private/referral-points.cjs +6 -0
  171. package/dist/api/info-private/referral-points.d.cts +24 -0
  172. package/dist/api/info-private/referral-points.d.ts +24 -0
  173. package/dist/api/info-private/referral-points.js +6 -0
  174. package/dist/api/info-private/tokens.cjs +6 -0
  175. package/dist/api/info-private/tokens.d.cts +24 -0
  176. package/dist/api/info-private/tokens.d.ts +24 -0
  177. package/dist/api/info-private/tokens.js +6 -0
  178. package/dist/api/info-private/trades.cjs +6 -0
  179. package/dist/api/info-private/trades.d.cts +49 -0
  180. package/dist/api/info-private/trades.d.ts +49 -0
  181. package/dist/api/info-private/trades.js +6 -0
  182. package/dist/api/info-private/transfer-fee-info.cjs +6 -0
  183. package/dist/api/info-private/transfer-fee-info.d.cts +15 -0
  184. package/dist/api/info-private/transfer-fee-info.d.ts +15 -0
  185. package/dist/api/info-private/transfer-fee-info.js +6 -0
  186. package/dist/api/info-private/transfer-history.cjs +6 -0
  187. package/dist/api/info-private/transfer-history.d.cts +27 -0
  188. package/dist/api/info-private/transfer-history.d.ts +27 -0
  189. package/dist/api/info-private/transfer-history.js +6 -0
  190. package/dist/api/info-private/withdraw-history.cjs +6 -0
  191. package/dist/api/info-private/withdraw-history.d.cts +27 -0
  192. package/dist/api/info-private/withdraw-history.d.ts +27 -0
  193. package/dist/api/info-private/withdraw-history.js +6 -0
  194. package/dist/chunk-2R5COGAH.cjs +10 -0
  195. package/dist/chunk-3OSXAPI3.js +8 -0
  196. package/dist/chunk-3R4OL3TU.cjs +17 -0
  197. package/dist/chunk-3SKO62BC.js +0 -0
  198. package/dist/chunk-3Y76Q54G.js +18 -0
  199. package/dist/chunk-3ZIFHX7Q.cjs +1 -0
  200. package/dist/chunk-467IJZRE.js +14 -0
  201. package/dist/chunk-472ULOSN.js +10 -0
  202. package/dist/chunk-4LNJ2577.js +17 -0
  203. package/dist/chunk-4MZ3XQUJ.cjs +13 -0
  204. package/dist/chunk-4TIJW7PH.cjs +14 -0
  205. package/dist/chunk-4VAZ7ZA2.js +10 -0
  206. package/dist/chunk-5JDRAN7L.cjs +22 -0
  207. package/dist/chunk-5P5CPB5A.js +18 -0
  208. package/dist/chunk-5U6X6DI7.cjs +13 -0
  209. package/dist/chunk-5WEMEUUI.js +22 -0
  210. package/dist/chunk-5YGIBBTZ.js +357 -0
  211. package/dist/chunk-62KDFQ7D.js +367 -0
  212. package/dist/chunk-6CD3YMMG.cjs +1 -0
  213. package/dist/chunk-6GCE6YQR.cjs +8 -0
  214. package/dist/chunk-6LUEPRL7.cjs +16 -0
  215. package/dist/chunk-76SPKVHT.js +48 -0
  216. package/dist/chunk-77QSYYAW.js +13 -0
  217. package/dist/chunk-7U2USLAM.cjs +8 -0
  218. package/dist/chunk-A2APDMN3.js +13 -0
  219. package/dist/chunk-AKEQDKGA.js +167 -0
  220. package/dist/chunk-AMNDQGYL.js +18 -0
  221. package/dist/chunk-BA2QFD27.cjs +19 -0
  222. package/dist/chunk-BES73YEF.js +8 -0
  223. package/dist/chunk-BKIL4UXV.cjs +22 -0
  224. package/dist/chunk-BKJGDTS3.js +8 -0
  225. package/dist/chunk-BVC2AA7Y.cjs +8 -0
  226. package/dist/chunk-BXMXWCMD.js +13 -0
  227. package/dist/chunk-C7OTZCGC.js +0 -0
  228. package/dist/chunk-DCKMNDS3.js +0 -0
  229. package/dist/chunk-DOZF64YC.cjs +17 -0
  230. package/dist/chunk-DW6W5SX2.cjs +18 -0
  231. package/dist/chunk-E3GJJZER.cjs +8 -0
  232. package/dist/chunk-EBSW5ZYW.js +19 -0
  233. package/dist/chunk-F24JA2OV.cjs +22 -0
  234. package/dist/chunk-FJJWUBKM.js +17 -0
  235. package/dist/chunk-FM4WWIRI.cjs +17 -0
  236. package/dist/chunk-FODEDUT4.js +8 -0
  237. package/dist/chunk-GEWTGUEG.cjs +1 -0
  238. package/dist/chunk-GI4WUHSL.cjs +1 -0
  239. package/dist/chunk-GYABNQWH.js +8 -0
  240. package/dist/chunk-GYQ6HJQY.cjs +21 -0
  241. package/dist/chunk-INCL3WRA.cjs +13 -0
  242. package/dist/chunk-IQQRFW4A.cjs +8 -0
  243. package/dist/chunk-IT6LK2G5.cjs +19 -0
  244. package/dist/chunk-IXF4QUC6.js +8 -0
  245. package/dist/chunk-J3UZK77O.cjs +18 -0
  246. package/dist/chunk-J7GXRK7R.cjs +19 -0
  247. package/dist/chunk-JNTYHWDJ.js +22 -0
  248. package/dist/chunk-JTE4UBAX.js +8 -0
  249. package/dist/chunk-JTP6DTDN.js +0 -0
  250. package/dist/chunk-K7ZQARON.js +8 -0
  251. package/dist/chunk-KV6G2ZCR.js +539 -0
  252. package/dist/chunk-L5SDFTHR.cjs +242 -0
  253. package/dist/chunk-LBVNEQ5R.cjs +21 -0
  254. package/dist/chunk-LYNZNSLV.js +18 -0
  255. package/dist/chunk-MAPH47LH.cjs +1 -0
  256. package/dist/chunk-MO4PMYTS.js +0 -0
  257. package/dist/chunk-MOMFTZ7N.cjs +357 -0
  258. package/dist/chunk-MZCKU6FF.js +8 -0
  259. package/dist/chunk-NIMYOIVU.cjs +1 -0
  260. package/dist/chunk-NIT6TCVS.cjs +8 -0
  261. package/dist/chunk-NOFXPTLU.js +8 -0
  262. package/dist/chunk-NRZGE42C.js +23 -0
  263. package/dist/chunk-NSFKW27X.js +0 -0
  264. package/dist/chunk-O3PA6HV2.js +18 -0
  265. package/dist/chunk-ON64OVOQ.cjs +20 -0
  266. package/dist/chunk-OPSCTD6W.js +17 -0
  267. package/dist/chunk-P32EPCEM.js +19 -0
  268. package/dist/chunk-PEALQBVN.js +19 -0
  269. package/dist/chunk-PP4Q2W66.cjs +10 -0
  270. package/dist/chunk-PPU2VWXX.js +12 -0
  271. package/dist/chunk-Q2MT7FZ7.js +242 -0
  272. package/dist/chunk-QCE5PEXE.cjs +8 -0
  273. package/dist/chunk-QMXZQNBK.cjs +8 -0
  274. package/dist/chunk-QNM3HYIV.cjs +8 -0
  275. package/dist/chunk-QXGO7TJ2.js +17 -0
  276. package/dist/chunk-RGVFMOQI.js +20 -0
  277. package/dist/chunk-RYDJEI67.cjs +48 -0
  278. package/dist/chunk-S4OE3IME.js +13 -0
  279. package/dist/chunk-SA6CXVP6.js +22 -0
  280. package/dist/chunk-SK6Y2YH6.js +0 -0
  281. package/dist/chunk-TELGVFFP.js +13 -0
  282. package/dist/chunk-TPGO4YD3.js +21 -0
  283. package/dist/chunk-TSHQJVUP.js +0 -0
  284. package/dist/chunk-TWGXKYO2.cjs +23 -0
  285. package/dist/chunk-U25GSCR7.cjs +17 -0
  286. package/dist/chunk-U2SM46CP.cjs +17 -0
  287. package/dist/chunk-UICTRTWB.cjs +367 -0
  288. package/dist/chunk-UORSMHI2.js +21 -0
  289. package/dist/chunk-VDBWTSBC.cjs +1 -0
  290. package/dist/chunk-VNQKWIQG.cjs +13 -0
  291. package/dist/chunk-VT3N7TOX.js +325 -0
  292. package/dist/chunk-VW77SNCY.js +24 -0
  293. package/dist/chunk-W2BVNVOC.cjs +1 -0
  294. package/dist/chunk-W2CTGWUW.cjs +539 -0
  295. package/dist/chunk-W5VY4TWP.js +16 -0
  296. package/dist/chunk-WDQ4YM6C.cjs +167 -0
  297. package/dist/chunk-WK6OQRMG.cjs +8 -0
  298. package/dist/chunk-WWLOQFSW.cjs +12 -0
  299. package/dist/chunk-X7E6XJVQ.cjs +18 -0
  300. package/dist/chunk-XOG6T533.cjs +18 -0
  301. package/dist/chunk-XPZBVL56.cjs +325 -0
  302. package/dist/chunk-XQGOXCT4.js +22 -0
  303. package/dist/chunk-YVJVFJ24.cjs +19 -0
  304. package/dist/chunk-YWN57BJF.js +8 -0
  305. package/dist/chunk-Z5XTWR2A.cjs +8 -0
  306. package/dist/chunk-ZDNQFOED.js +17 -0
  307. package/dist/chunk-ZGWYI7Q2.cjs +24 -0
  308. package/dist/chunk-ZIMFMYT2.cjs +22 -0
  309. package/dist/chunk-ZJVQD6JD.cjs +18 -0
  310. package/dist/chunk-ZKFXRN6W.cjs +13 -0
  311. package/dist/chunk-ZWYNOAL3.js +19 -0
  312. package/dist/client/exchange-client.cjs +14 -0
  313. package/dist/client/exchange-client.d.cts +352 -0
  314. package/dist/client/exchange-client.d.ts +352 -0
  315. package/dist/client/exchange-client.js +14 -0
  316. package/dist/client/index.cjs +71 -0
  317. package/dist/client/index.d.cts +53 -0
  318. package/dist/client/index.d.ts +53 -0
  319. package/dist/client/index.js +71 -0
  320. package/dist/client/info-client.cjs +27 -0
  321. package/dist/client/info-client.d.cts +255 -0
  322. package/dist/client/info-client.d.ts +255 -0
  323. package/dist/client/info-client.js +27 -0
  324. package/dist/client/info-private-client.cjs +25 -0
  325. package/dist/client/info-private-client.d.cts +293 -0
  326. package/dist/client/info-private-client.d.ts +293 -0
  327. package/dist/client/info-private-client.js +25 -0
  328. package/dist/client/l1-bridge-client.cjs +6 -0
  329. package/dist/client/l1-bridge-client.d.cts +45 -0
  330. package/dist/client/l1-bridge-client.d.ts +45 -0
  331. package/dist/client/l1-bridge-client.js +6 -0
  332. package/dist/client/ws-client.cjs +6 -0
  333. package/dist/client/ws-client.d.cts +63 -0
  334. package/dist/client/ws-client.d.ts +63 -0
  335. package/dist/client/ws-client.js +6 -0
  336. package/dist/index.cjs +79 -0
  337. package/dist/index.d.cts +53 -0
  338. package/dist/index.d.ts +53 -0
  339. package/dist/index.js +79 -0
  340. package/dist/signing/index.cjs +7 -0
  341. package/dist/signing/index.d.cts +1 -0
  342. package/dist/signing/index.d.ts +1 -0
  343. package/dist/signing/index.js +7 -0
  344. package/dist/signing/wasm-signer.cjs +6 -0
  345. package/dist/signing/wasm-signer.d.cts +101 -0
  346. package/dist/signing/wasm-signer.d.ts +101 -0
  347. package/dist/signing/wasm-signer.js +6 -0
  348. package/dist/types/bridge.cjs +1 -0
  349. package/dist/types/bridge.d.cts +24 -0
  350. package/dist/types/bridge.d.ts +24 -0
  351. package/dist/types/bridge.js +1 -0
  352. package/dist/types/index.cjs +3 -0
  353. package/dist/types/index.d.cts +2 -0
  354. package/dist/types/index.d.ts +2 -0
  355. package/dist/types/index.js +3 -0
  356. package/dist/types/ws.cjs +1 -0
  357. package/dist/types/ws.d.cts +351 -0
  358. package/dist/types/ws.d.ts +351 -0
  359. package/dist/types/ws.js +1 -0
  360. package/package.json +52 -0
@@ -0,0 +1,367 @@
1
+ import {
2
+ getTrades
3
+ } from "./chunk-467IJZRE.js";
4
+ import {
5
+ getTransferFeeInfo
6
+ } from "./chunk-LYNZNSLV.js";
7
+ import {
8
+ getTransferHistory
9
+ } from "./chunk-3Y76Q54G.js";
10
+ import {
11
+ getWithdrawHistory
12
+ } from "./chunk-PEALQBVN.js";
13
+ import {
14
+ getL1Metadata
15
+ } from "./chunk-QXGO7TJ2.js";
16
+ import {
17
+ getLiquidations
18
+ } from "./chunk-RGVFMOQI.js";
19
+ import {
20
+ getPnL
21
+ } from "./chunk-NRZGE42C.js";
22
+ import {
23
+ getPositionFunding
24
+ } from "./chunk-TPGO4YD3.js";
25
+ import {
26
+ getPublicPools
27
+ } from "./chunk-O3PA6HV2.js";
28
+ import {
29
+ getReferralPoints
30
+ } from "./chunk-W5VY4TWP.js";
31
+ import {
32
+ getTokens
33
+ } from "./chunk-OPSCTD6W.js";
34
+ import {
35
+ getAccountActiveOrders
36
+ } from "./chunk-AMNDQGYL.js";
37
+ import {
38
+ getAccountInactiveOrders
39
+ } from "./chunk-XQGOXCT4.js";
40
+ import {
41
+ getAccountLimits
42
+ } from "./chunk-4LNJ2577.js";
43
+ import {
44
+ getAccountMetadata
45
+ } from "./chunk-5P5CPB5A.js";
46
+ import {
47
+ getDepositHistory
48
+ } from "./chunk-P32EPCEM.js";
49
+ import {
50
+ getExport
51
+ } from "./chunk-EBSW5ZYW.js";
52
+ import {
53
+ getFastWithdrawInfo
54
+ } from "./chunk-ZDNQFOED.js";
55
+
56
+ // src/client/info-private-client.ts
57
+ import axios from "axios";
58
+ var DEFAULT_DEADLINE = 120;
59
+ var InfoPrivateClient = class {
60
+ constructor(config) {
61
+ this.baseURL = config.baseURL || "https://mainnet.zklighter.elliot.ai";
62
+ this.wasmSigner = config.wasmSigner;
63
+ this.axiosInstance = this.createAxiosInstance();
64
+ }
65
+ createAxiosInstance() {
66
+ return axios.create({
67
+ baseURL: this.baseURL
68
+ });
69
+ }
70
+ /**
71
+ * Get active orders for an account in a specific market
72
+ * @param params - Account index and market ID to retrieve active orders for
73
+ * @returns List of active orders
74
+ * @example
75
+ * ```typescript
76
+ * const orders = await client.getAccountActiveOrders({
77
+ * account_index: 0,
78
+ * market_id: 1
79
+ * });
80
+ * ```
81
+ */
82
+ async getAccountActiveOrders(params) {
83
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
84
+ return getAccountActiveOrders(this.axiosInstance, params, auth.authToken);
85
+ }
86
+ /**
87
+ * Get inactive orders for an account
88
+ * @param params - Account index and optional filters for inactive orders
89
+ * @returns List of inactive orders with pagination support
90
+ * @example
91
+ * ```typescript
92
+ * const orders = await client.getAccountInactiveOrders({
93
+ * account_index: 0,
94
+ * limit: 50,
95
+ * market_id: 1
96
+ * });
97
+ * ```
98
+ */
99
+ async getAccountInactiveOrders(params) {
100
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
101
+ return getAccountInactiveOrders(this.axiosInstance, params, auth.authToken);
102
+ }
103
+ /**
104
+ * Get account limits and tier information
105
+ * @param params - Account index to retrieve limits for
106
+ * @returns Account limits including max LLP percentage, user tier, and pool creation permissions
107
+ * @example
108
+ * ```typescript
109
+ * const limits = await client.getAccountLimits({ account_index: 0 });
110
+ * ```
111
+ */
112
+ async getAccountLimits(params) {
113
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
114
+ return getAccountLimits(this.axiosInstance, params, auth.authToken);
115
+ }
116
+ /**
117
+ * Get account metadata by index or L1 address
118
+ * @param params - Account lookup parameters (by index or L1 address)
119
+ * @returns Account metadata including name, description, and referral information
120
+ * @example
121
+ * ```typescript
122
+ * const metadata = await client.getAccountMetadata({
123
+ * by: "index",
124
+ * value: "0"
125
+ * });
126
+ * ```
127
+ */
128
+ async getAccountMetadata(params) {
129
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
130
+ return getAccountMetadata(this.axiosInstance, params, auth.authToken);
131
+ }
132
+ /**
133
+ * Get L1 metadata for an address
134
+ * @param params - L1 address to retrieve metadata for
135
+ * @returns L1 metadata including referral information
136
+ * @example
137
+ * ```typescript
138
+ * const l1Metadata = await client.getL1Metadata({
139
+ * l1_address: "0x..."
140
+ * });
141
+ * ```
142
+ */
143
+ async getL1Metadata(params) {
144
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
145
+ return getL1Metadata(this.axiosInstance, params, auth.authToken);
146
+ }
147
+ /**
148
+ * Get API tokens for an account
149
+ * @param params - Account index to retrieve API tokens for
150
+ * @returns List of API tokens with details including name, expiry, scopes, and status
151
+ * @example
152
+ * ```typescript
153
+ * const tokens = await client.getTokens({ account_index: 0 });
154
+ * ```
155
+ */
156
+ async getTokens(params) {
157
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
158
+ return getTokens(this.axiosInstance, params, auth.authToken);
159
+ }
160
+ /**
161
+ * Get deposit history for an account
162
+ * @param params - Account index, L1 address, and optional filters
163
+ * @returns List of deposits with status and timestamps
164
+ * @example
165
+ * ```typescript
166
+ * const deposits = await client.getDepositHistory({
167
+ * account_index: 0,
168
+ * l1_address: "0x...",
169
+ * filter: "pending"
170
+ * });
171
+ * ```
172
+ */
173
+ async getDepositHistory(params) {
174
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
175
+ return getDepositHistory(this.axiosInstance, params, auth.authToken);
176
+ }
177
+ /**
178
+ * Get withdrawal history for an account
179
+ * @param params - Account index, L1 address, and optional filters
180
+ * @returns List of withdrawals with status and timestamps
181
+ * @example
182
+ * ```typescript
183
+ * const withdrawals = await client.getWithdrawHistory({
184
+ * account_index: 0,
185
+ * l1_address: "0x...",
186
+ * filter: "completed"
187
+ * });
188
+ * ```
189
+ */
190
+ async getWithdrawHistory(params) {
191
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
192
+ return getWithdrawHistory(this.axiosInstance, params, auth.authToken);
193
+ }
194
+ /**
195
+ * Get fast withdraw information for an account
196
+ * @param params - Account index to retrieve fast withdraw info for
197
+ * @returns Fast withdraw limits and account information
198
+ * @example
199
+ * ```typescript
200
+ * const fastWithdrawInfo = await client.getFastWithdrawInfo({
201
+ * account_index: 0
202
+ * });
203
+ * ```
204
+ */
205
+ async getFastWithdrawInfo(params) {
206
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
207
+ return getFastWithdrawInfo(this.axiosInstance, params, auth.authToken);
208
+ }
209
+ /**
210
+ * Get transfer fee information between accounts
211
+ * @param params - Account indices to calculate transfer fee for
212
+ * @returns Transfer fee in USDC
213
+ * @example
214
+ * ```typescript
215
+ * const feeInfo = await client.getTransferFeeInfo({
216
+ * account_index: 0,
217
+ * to_account_index: 1
218
+ * });
219
+ * ```
220
+ */
221
+ async getTransferFeeInfo(params) {
222
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
223
+ return getTransferFeeInfo(this.axiosInstance, params, auth.authToken);
224
+ }
225
+ /**
226
+ * Get transfer history for an account
227
+ * @param params - Account index and optional cursor for pagination
228
+ * @returns Transfer history with pagination support
229
+ * @example
230
+ * ```typescript
231
+ * const transfers = await client.getTransferHistory({
232
+ * account_index: 0,
233
+ * cursor: 'optional-cursor-for-pagination'
234
+ * });
235
+ * ```
236
+ */
237
+ async getTransferHistory(params) {
238
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
239
+ return getTransferHistory(this.axiosInstance, params, auth.authToken);
240
+ }
241
+ /**
242
+ * Get liquidation history for an account
243
+ * @param params - Account index, limit, and optional market/cursor filters
244
+ * @returns List of liquidations with pagination support
245
+ * @example
246
+ * ```typescript
247
+ * const liquidations = await client.getLiquidations({
248
+ * account_index: 0,
249
+ * limit: 50,
250
+ * market_id: 1
251
+ * });
252
+ * ```
253
+ */
254
+ async getLiquidations(params) {
255
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
256
+ return getLiquidations(this.axiosInstance, params, auth.authToken);
257
+ }
258
+ /**
259
+ * Get profit and loss data for an account or market
260
+ * @param params - PnL query parameters including resolution, time range, and account/market filters
261
+ * @returns PnL entries with timestamp, pnl, and cumulative pnl
262
+ * @example
263
+ * ```typescript
264
+ * const pnl = await client.getPnL({
265
+ * by: "account_index",
266
+ * value: "0",
267
+ * resolution: "1d",
268
+ * start_timestamp: 1234567890,
269
+ * end_timestamp: 1234567900,
270
+ * count_back: 30
271
+ * });
272
+ * ```
273
+ */
274
+ async getPnL(params) {
275
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
276
+ return getPnL(this.axiosInstance, params, auth.authToken);
277
+ }
278
+ /**
279
+ * Get position funding history for an account
280
+ * @param params - Position funding query parameters including account_index, limit, and optional filters
281
+ * @returns Position funding entries with timestamp, funding rate, and position details
282
+ * @example
283
+ * ```typescript
284
+ * const funding = await client.getPositionFunding({
285
+ * account_index: 0,
286
+ * limit: 50,
287
+ * market_id: 1,
288
+ * side: "long"
289
+ * });
290
+ * ```
291
+ */
292
+ async getPositionFunding(params) {
293
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
294
+ return getPositionFunding(this.axiosInstance, params, auth.authToken);
295
+ }
296
+ /**
297
+ * Get public liquidity pools metadata
298
+ * @param params - Optional filters for pool queries (filter, limit, index)
299
+ * @returns List of public pools with TVL, APY, and share information
300
+ * @example
301
+ * ```typescript
302
+ * const pools = await client.getPublicPools({
303
+ * filter: "all",
304
+ * limit: 10,
305
+ * index: 0
306
+ * });
307
+ * ```
308
+ */
309
+ async getPublicPools(params) {
310
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
311
+ return getPublicPools(this.axiosInstance, params, auth.authToken);
312
+ }
313
+ /**
314
+ * Get referral points for an account
315
+ * @param params - Account index to retrieve referral points for
316
+ * @returns Referral points data including user points and referral list
317
+ * @example
318
+ * ```typescript
319
+ * const points = await client.getReferralPoints({ account_index: 0 });
320
+ * ```
321
+ */
322
+ async getReferralPoints(params) {
323
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
324
+ return getReferralPoints(this.axiosInstance, params, auth.authToken);
325
+ }
326
+ /**
327
+ * Get trades for an account or market
328
+ * @param params - Trade query parameters including sort_by, limit, and optional filters
329
+ * @returns List of trades with details including price, size, side, and timestamps
330
+ * @example
331
+ * ```typescript
332
+ * const trades = await client.getTrades({
333
+ * sort_by: 'timestamp',
334
+ * limit: 50,
335
+ * account_index: 0,
336
+ * market_id: 1,
337
+ * sort_dir: 'desc'
338
+ * });
339
+ * ```
340
+ */
341
+ async getTrades(params) {
342
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
343
+ return getTrades(this.axiosInstance, params, auth.authToken);
344
+ }
345
+ /**
346
+ * Export data (funding or trade data) for an account
347
+ * @param params - Export parameters including type (funding or trade) and optional filters
348
+ * @returns Export response with data URL for downloading the export
349
+ * @example
350
+ * ```typescript
351
+ * const exportData = await client.getExport({
352
+ * type: 'trade',
353
+ * account_index: 0,
354
+ * market_id: 1
355
+ * });
356
+ * console.log('Download URL:', exportData.data_url);
357
+ * ```
358
+ */
359
+ async getExport(params) {
360
+ const auth = this.wasmSigner.createAuthToken(Math.floor(Date.now() / 1e3) + DEFAULT_DEADLINE);
361
+ return getExport(this.axiosInstance, params, auth.authToken);
362
+ }
363
+ };
364
+
365
+ export {
366
+ InfoPrivateClient
367
+ };
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/api/info/exchange-stats.ts
2
+ async function getExchangeStats(client) {
3
+ return client.get("/api/v1/exchangeStats").then((response) => response.data);
4
+ }
5
+
6
+
7
+
8
+ exports.getExchangeStats = getExchangeStats;
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/api/info-private/referral-points.ts
2
+ async function getReferralPoints(client, params, authorization) {
3
+ const config = {
4
+ params: {
5
+ account_index: params.account_index
6
+ }
7
+ };
8
+ if (authorization) {
9
+ config.headers = { Authorization: authorization };
10
+ }
11
+ return client.get("/api/v1/referral/points", config).then((response) => response.data);
12
+ }
13
+
14
+
15
+
16
+ exports.getReferralPoints = getReferralPoints;
@@ -0,0 +1,48 @@
1
+ // src/api/exchange/send-tx.ts
2
+ async function sendTransaction(client, params) {
3
+ return client.post("/api/v1/sendTx", {
4
+ account_index: params.account_index,
5
+ api_key_index: params.api_key_index,
6
+ transaction: params.transaction,
7
+ ...params.price_protection !== void 0 ? { price_protection: params.price_protection } : {}
8
+ }).then((response) => response.data);
9
+ }
10
+ async function sendTx(client, params) {
11
+ const urlParams = new URLSearchParams();
12
+ urlParams.append("tx_type", params.tx_type.toString());
13
+ urlParams.append("tx_info", params.tx_info);
14
+ urlParams.append("price_protection", params.price_protection !== false ? "true" : "false");
15
+ return client.post("/api/v1/sendTx", urlParams, {
16
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
17
+ }).then((response) => response.data);
18
+ }
19
+ async function sendTxWithIndices(client, params) {
20
+ const urlParams = new URLSearchParams();
21
+ urlParams.append("tx_type", params.tx_type.toString());
22
+ urlParams.append("tx_info", params.tx_info);
23
+ urlParams.append("account_index", params.account_index.toString());
24
+ urlParams.append("api_key_index", params.api_key_index.toString());
25
+ urlParams.append("price_protection", params.price_protection !== false ? "true" : "false");
26
+ return client.post("/api/v1/sendTx", urlParams, {
27
+ headers: { "Content-Type": "application/x-www-form-urlencoded" }
28
+ }).then((response) => response.data);
29
+ }
30
+ async function sendTxJson(client, params) {
31
+ const payload = {
32
+ tx_type: params.tx_type,
33
+ tx_info: params.tx_info,
34
+ account_index: params.account_index,
35
+ api_key_index: params.api_key_index,
36
+ price_protection: params.price_protection !== false
37
+ };
38
+ return client.post("/api/v1/sendTx", payload, {
39
+ headers: { "Content-Type": "application/json" }
40
+ }).then((response) => response.data);
41
+ }
42
+
43
+ export {
44
+ sendTransaction,
45
+ sendTx,
46
+ sendTxWithIndices,
47
+ sendTxJson
48
+ };
@@ -0,0 +1,13 @@
1
+ // src/api/info/next-nonce.ts
2
+ async function getNextNonce(client, params) {
3
+ return client.get("/api/v1/nextNonce", {
4
+ params: {
5
+ account_index: params.account_index,
6
+ api_key_index: params.api_key_index
7
+ }
8
+ }).then((response) => response.data);
9
+ }
10
+
11
+ export {
12
+ getNextNonce
13
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/api/info/txs.ts
2
+ async function getTransactions(client, params) {
3
+ return client.get("/api/v1/txs", { params }).then((response) => response.data);
4
+ }
5
+
6
+
7
+
8
+ exports.getTransactions = getTransactions;
@@ -0,0 +1,13 @@
1
+ // src/api/info/asset-details.ts
2
+ async function getAssetDetails(client, params) {
3
+ const config = {
4
+ params: {
5
+ ...params?.asset_index !== void 0 ? { asset_index: params.asset_index } : {}
6
+ }
7
+ };
8
+ return client.get("/api/v1/assetDetails", config).then((response) => response.data);
9
+ }
10
+
11
+ export {
12
+ getAssetDetails
13
+ };
@@ -0,0 +1,167 @@
1
+ // src/signing/wasm-signer.ts
2
+ var WasmSigner = class {
3
+ constructor(config) {
4
+ this.apiKeyIndex = 0;
5
+ this.accountIndex = 0;
6
+ this.privateKey = "";
7
+ this.url = config?.url || "https://mainnet.zklighter.elliot.ai";
8
+ this.chainId = config?.chainId || 304;
9
+ this.wasmPath = config?.wasmPath || "/wasm/lighter-signer.wasm";
10
+ this.wasmExecPath = config?.wasmExecPath || "/wasm/lighter-wasm-exec.js";
11
+ }
12
+ async initialize() {
13
+ await this.loadScript(this.wasmExecPath);
14
+ const wasmBytes = await this.loadWasm(this.wasmPath);
15
+ const Go = window.Go;
16
+ const go = new Go();
17
+ const result = await WebAssembly.instantiate(wasmBytes, go.importObject);
18
+ go.run(result.instance);
19
+ await new Promise((resolve) => setTimeout(resolve, 2e3));
20
+ }
21
+ generateAPIKey(seed) {
22
+ if (!window.GenerateAPIKey) {
23
+ throw new Error("WASM not initialized. Call initialize() first.");
24
+ }
25
+ return window.GenerateAPIKey(seed);
26
+ }
27
+ setAccount(privateKey, apiKeyIndex, accountIndex) {
28
+ this.privateKey = privateKey;
29
+ this.apiKeyIndex = apiKeyIndex;
30
+ this.accountIndex = accountIndex;
31
+ }
32
+ getAccount() {
33
+ return {
34
+ privateKey: this.privateKey,
35
+ apiKeyIndex: this.apiKeyIndex,
36
+ accountIndex: this.accountIndex
37
+ };
38
+ }
39
+ createClient() {
40
+ if (!window.CreateClient) {
41
+ throw new Error("WASM not initialized. Call initialize() first.");
42
+ }
43
+ return window.CreateClient(this.url, this.privateKey, this.chainId, this.apiKeyIndex, this.accountIndex);
44
+ }
45
+ checkClient() {
46
+ if (!window.CheckClient) {
47
+ throw new Error("WASM not initialized. Call initialize() first.");
48
+ }
49
+ return window.CheckClient(this.apiKeyIndex, this.accountIndex);
50
+ }
51
+ createAuthToken(deadline) {
52
+ if (!window.CreateAuthToken) {
53
+ throw new Error("WASM not initialized. Call initialize() first.");
54
+ }
55
+ return window.CreateAuthToken(deadline, this.apiKeyIndex, this.accountIndex);
56
+ }
57
+ signChangePubKey(pubKeyHex, nonce) {
58
+ if (!window.SignChangePubKey) {
59
+ throw new Error("WASM not initialized. Call initialize() first.");
60
+ }
61
+ return window.SignChangePubKey(pubKeyHex, nonce, this.apiKeyIndex, this.accountIndex);
62
+ }
63
+ signCreateOrder(marketIndex, clientOrderIndex, baseAmount, price, isAsk, orderType, timeInForce, reduceOnly, triggerPrice, orderExpiry, nonce) {
64
+ if (!window.SignCreateOrder) {
65
+ throw new Error("WASM not initialized. Call initialize() first.");
66
+ }
67
+ return window.SignCreateOrder(marketIndex, clientOrderIndex, baseAmount, price, isAsk, orderType, timeInForce, reduceOnly, triggerPrice, orderExpiry, nonce, this.apiKeyIndex, this.accountIndex);
68
+ }
69
+ signCancelOrder(marketIndex, orderIndex, nonce) {
70
+ if (!window.SignCancelOrder) {
71
+ throw new Error("WASM not initialized. Call initialize() first.");
72
+ }
73
+ return window.SignCancelOrder(marketIndex, orderIndex, nonce, this.apiKeyIndex, this.accountIndex);
74
+ }
75
+ signCancelAllOrders(timeInForce, time, nonce) {
76
+ if (!window.SignCancelAllOrders) {
77
+ throw new Error("WASM not initialized. Call initialize() first.");
78
+ }
79
+ return window.SignCancelAllOrders(timeInForce, time, nonce, this.apiKeyIndex, this.accountIndex);
80
+ }
81
+ signTransfer(toAccount, usdcAmount, fee, memo, nonce) {
82
+ if (!window.SignTransfer) {
83
+ throw new Error("WASM not initialized. Call initialize() first.");
84
+ }
85
+ return window.SignTransfer(toAccount, usdcAmount, fee, memo, nonce, this.apiKeyIndex, this.accountIndex);
86
+ }
87
+ signWithdraw(usdcAmount, nonce) {
88
+ if (!window.SignWithdraw) {
89
+ throw new Error("WASM not initialized. Call initialize() first.");
90
+ }
91
+ return window.SignWithdraw(usdcAmount, nonce, this.apiKeyIndex, this.accountIndex);
92
+ }
93
+ signUpdateLeverage(marketIndex, fraction, marginMode, nonce) {
94
+ if (!window.SignUpdateLeverage) {
95
+ throw new Error("WASM not initialized. Call initialize() first.");
96
+ }
97
+ return window.SignUpdateLeverage(marketIndex, fraction, marginMode, nonce, this.apiKeyIndex, this.accountIndex);
98
+ }
99
+ signModifyOrder(marketIndex, index, baseAmount, price, triggerPrice, nonce) {
100
+ if (!window.SignModifyOrder) {
101
+ throw new Error("WASM not initialized. Call initialize() first.");
102
+ }
103
+ return window.SignModifyOrder(marketIndex, index, baseAmount, price, triggerPrice, nonce, this.apiKeyIndex, this.accountIndex);
104
+ }
105
+ signCreateSubAccount(nonce) {
106
+ if (!window.SignCreateSubAccount) {
107
+ throw new Error("WASM not initialized. Call initialize() first.");
108
+ }
109
+ return window.SignCreateSubAccount(nonce, this.apiKeyIndex, this.accountIndex);
110
+ }
111
+ signCreatePublicPool(operatorFee, initialTotalShares, minOperatorShareRate, nonce) {
112
+ if (!window.SignCreatePublicPool) {
113
+ throw new Error("WASM not initialized. Call initialize() first.");
114
+ }
115
+ return window.SignCreatePublicPool(operatorFee, initialTotalShares, minOperatorShareRate, nonce, this.apiKeyIndex, this.accountIndex);
116
+ }
117
+ signUpdatePublicPool(publicPoolIndex, status, operatorFee, minOperatorShareRate, nonce) {
118
+ if (!window.SignUpdatePublicPool) {
119
+ throw new Error("WASM not initialized. Call initialize() first.");
120
+ }
121
+ return window.SignUpdatePublicPool(publicPoolIndex, status, operatorFee, minOperatorShareRate, nonce, this.apiKeyIndex, this.accountIndex);
122
+ }
123
+ signMintShares(publicPoolIndex, shareAmount, nonce) {
124
+ if (!window.SignMintShares) {
125
+ throw new Error("WASM not initialized. Call initialize() first.");
126
+ }
127
+ return window.SignMintShares(publicPoolIndex, shareAmount, nonce, this.apiKeyIndex, this.accountIndex);
128
+ }
129
+ signBurnShares(publicPoolIndex, shareAmount, nonce) {
130
+ if (!window.SignBurnShares) {
131
+ throw new Error("WASM not initialized. Call initialize() first.");
132
+ }
133
+ return window.SignBurnShares(publicPoolIndex, shareAmount, nonce, this.apiKeyIndex, this.accountIndex);
134
+ }
135
+ signUpdateMargin(marketIndex, usdcAmount, direction, nonce) {
136
+ if (!window.SignUpdateMargin) {
137
+ throw new Error("WASM not initialized. Call initialize() first.");
138
+ }
139
+ return window.SignUpdateMargin(marketIndex, usdcAmount, direction, nonce, this.apiKeyIndex, this.accountIndex);
140
+ }
141
+ signCreateGroupedOrders(groupingType, orders, nonce) {
142
+ if (!window.SignCreateGroupedOrders) {
143
+ throw new Error("WASM not initialized. Call initialize() first.");
144
+ }
145
+ return window.SignCreateGroupedOrders(groupingType, orders, nonce, this.apiKeyIndex, this.accountIndex);
146
+ }
147
+ async loadScript(src) {
148
+ return new Promise((resolve, reject) => {
149
+ const script = document.createElement("script");
150
+ script.src = src;
151
+ script.onload = () => resolve();
152
+ script.onerror = () => reject(new Error(`Failed to load script: ${src}`));
153
+ document.head.appendChild(script);
154
+ });
155
+ }
156
+ async loadWasm(path) {
157
+ const response = await fetch(path);
158
+ if (!response.ok) {
159
+ throw new Error(`Failed to load WASM binary: ${response.statusText}`);
160
+ }
161
+ return response.arrayBuffer();
162
+ }
163
+ };
164
+
165
+ export {
166
+ WasmSigner
167
+ };
@@ -0,0 +1,18 @@
1
+ // src/api/info-private/account-active-orders.ts
2
+ async function getAccountActiveOrders(client, params, authorization) {
3
+ const config = {
4
+ params: {
5
+ account_index: params.account_index,
6
+ market_id: params.market_id,
7
+ ...params.auth ? { auth: params.auth } : {}
8
+ }
9
+ };
10
+ if (authorization) {
11
+ config.headers = { Authorization: authorization };
12
+ }
13
+ return client.get("/api/v1/accountActiveOrders", config).then((response) => response.data);
14
+ }
15
+
16
+ export {
17
+ getAccountActiveOrders
18
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/api/info/order-book-details.ts
2
+ async function getOrderBookDetails(client, params) {
3
+ return client.get("/api/v1/orderBookDetails", {
4
+ params: _optionalChain([params, 'optionalAccess', _ => _.market_id]) !== void 0 ? { market_id: params.market_id } : void 0
5
+ }).then((response) => response.data);
6
+ }
7
+ async function getOrderBookOrders(client, params) {
8
+ return client.get("/api/v1/orderBookOrders", {
9
+ params: {
10
+ market_id: params.market_id,
11
+ ...params.limit !== void 0 ? { limit: params.limit } : {}
12
+ }
13
+ }).then((response) => response.data);
14
+ }
15
+
16
+
17
+
18
+
19
+ exports.getOrderBookDetails = getOrderBookDetails; exports.getOrderBookOrders = getOrderBookOrders;