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.
- package/README.md +574 -0
- package/dist/api/exchange/change-account-tier.cjs +6 -0
- package/dist/api/exchange/change-account-tier.d.cts +14 -0
- package/dist/api/exchange/change-account-tier.d.ts +14 -0
- package/dist/api/exchange/change-account-tier.js +6 -0
- package/dist/api/exchange/fastwithdraw.cjs +6 -0
- package/dist/api/exchange/fastwithdraw.d.cts +14 -0
- package/dist/api/exchange/fastwithdraw.d.ts +14 -0
- package/dist/api/exchange/fastwithdraw.js +6 -0
- package/dist/api/exchange/index.cjs +37 -0
- package/dist/api/exchange/index.d.cts +8 -0
- package/dist/api/exchange/index.d.ts +8 -0
- package/dist/api/exchange/index.js +37 -0
- package/dist/api/exchange/notification-ack.cjs +6 -0
- package/dist/api/exchange/notification-ack.d.cts +13 -0
- package/dist/api/exchange/notification-ack.d.ts +13 -0
- package/dist/api/exchange/notification-ack.js +6 -0
- package/dist/api/exchange/send-tx-batch.cjs +6 -0
- package/dist/api/exchange/send-tx-batch.d.cts +22 -0
- package/dist/api/exchange/send-tx-batch.d.ts +22 -0
- package/dist/api/exchange/send-tx-batch.js +6 -0
- package/dist/api/exchange/send-tx.cjs +12 -0
- package/dist/api/exchange/send-tx.d.cts +33 -0
- package/dist/api/exchange/send-tx.d.ts +33 -0
- package/dist/api/exchange/send-tx.js +12 -0
- package/dist/api/exchange/tokens-create.cjs +6 -0
- package/dist/api/exchange/tokens-create.d.cts +24 -0
- package/dist/api/exchange/tokens-create.d.ts +24 -0
- package/dist/api/exchange/tokens-create.js +6 -0
- package/dist/api/exchange/tokens-revoke.cjs +6 -0
- package/dist/api/exchange/tokens-revoke.d.cts +15 -0
- package/dist/api/exchange/tokens-revoke.d.ts +15 -0
- package/dist/api/exchange/tokens-revoke.js +6 -0
- package/dist/api/info/account-by-l1-address.cjs +6 -0
- package/dist/api/info/account-by-l1-address.d.cts +28 -0
- package/dist/api/info/account-by-l1-address.d.ts +28 -0
- package/dist/api/info/account-by-l1-address.js +6 -0
- package/dist/api/info/account.cjs +6 -0
- package/dist/api/info/account.d.cts +67 -0
- package/dist/api/info/account.d.ts +67 -0
- package/dist/api/info/account.js +6 -0
- package/dist/api/info/announcement.cjs +6 -0
- package/dist/api/info/announcement.d.cts +15 -0
- package/dist/api/info/announcement.d.ts +15 -0
- package/dist/api/info/announcement.js +6 -0
- package/dist/api/info/api-keys.cjs +6 -0
- package/dist/api/info/api-keys.d.cts +19 -0
- package/dist/api/info/api-keys.d.ts +19 -0
- package/dist/api/info/api-keys.js +6 -0
- package/dist/api/info/asset-details.cjs +6 -0
- package/dist/api/info/asset-details.d.cts +26 -0
- package/dist/api/info/asset-details.d.ts +26 -0
- package/dist/api/info/asset-details.js +6 -0
- package/dist/api/info/candles.cjs +6 -0
- package/dist/api/info/candles.d.cts +23 -0
- package/dist/api/info/candles.d.ts +23 -0
- package/dist/api/info/candles.js +6 -0
- package/dist/api/info/exchange-stats.cjs +6 -0
- package/dist/api/info/exchange-stats.d.cts +11 -0
- package/dist/api/info/exchange-stats.d.ts +11 -0
- package/dist/api/info/exchange-stats.js +6 -0
- package/dist/api/info/fastbridge-info.cjs +6 -0
- package/dist/api/info/fastbridge-info.d.cts +10 -0
- package/dist/api/info/fastbridge-info.d.ts +10 -0
- package/dist/api/info/fastbridge-info.js +6 -0
- package/dist/api/info/funding-rates.cjs +6 -0
- package/dist/api/info/funding-rates.d.cts +16 -0
- package/dist/api/info/funding-rates.d.ts +16 -0
- package/dist/api/info/funding-rates.js +6 -0
- package/dist/api/info/fundings.cjs +6 -0
- package/dist/api/info/fundings.d.cts +21 -0
- package/dist/api/info/fundings.d.ts +21 -0
- package/dist/api/info/fundings.js +6 -0
- package/dist/api/info/index.cjs +85 -0
- package/dist/api/info/index.d.cts +22 -0
- package/dist/api/info/index.d.ts +22 -0
- package/dist/api/info/index.js +85 -0
- package/dist/api/info/next-nonce.cjs +6 -0
- package/dist/api/info/next-nonce.d.cts +14 -0
- package/dist/api/info/next-nonce.d.ts +14 -0
- package/dist/api/info/next-nonce.js +6 -0
- package/dist/api/info/order-book-details.cjs +8 -0
- package/dist/api/info/order-book-details.d.cts +95 -0
- package/dist/api/info/order-book-details.d.ts +95 -0
- package/dist/api/info/order-book-details.js +8 -0
- package/dist/api/info/order-books.cjs +6 -0
- package/dist/api/info/order-books.d.cts +16 -0
- package/dist/api/info/order-books.d.ts +16 -0
- package/dist/api/info/order-books.js +6 -0
- package/dist/api/info/recent-trades.cjs +6 -0
- package/dist/api/info/recent-trades.d.cts +11 -0
- package/dist/api/info/recent-trades.d.ts +11 -0
- package/dist/api/info/recent-trades.js +6 -0
- package/dist/api/info/root-info.cjs +6 -0
- package/dist/api/info/root-info.d.cts +8 -0
- package/dist/api/info/root-info.d.ts +8 -0
- package/dist/api/info/root-info.js +6 -0
- package/dist/api/info/root-status.cjs +6 -0
- package/dist/api/info/root-status.d.cts +10 -0
- package/dist/api/info/root-status.d.ts +10 -0
- package/dist/api/info/root-status.js +6 -0
- package/dist/api/info/tx-from-l1-hash.cjs +6 -0
- package/dist/api/info/tx-from-l1-hash.d.cts +9 -0
- package/dist/api/info/tx-from-l1-hash.d.ts +9 -0
- package/dist/api/info/tx-from-l1-hash.js +6 -0
- package/dist/api/info/tx.cjs +6 -0
- package/dist/api/info/tx.d.cts +33 -0
- package/dist/api/info/tx.d.ts +33 -0
- package/dist/api/info/tx.js +6 -0
- package/dist/api/info/txs.cjs +6 -0
- package/dist/api/info/txs.d.cts +11 -0
- package/dist/api/info/txs.d.ts +11 -0
- package/dist/api/info/txs.js +6 -0
- package/dist/api/info/withdrawal-delay.cjs +6 -0
- package/dist/api/info/withdrawal-delay.d.cts +8 -0
- package/dist/api/info/withdrawal-delay.d.ts +8 -0
- package/dist/api/info/withdrawal-delay.js +6 -0
- package/dist/api/info-private/account-active-orders.cjs +6 -0
- package/dist/api/info-private/account-active-orders.d.cts +11 -0
- package/dist/api/info-private/account-active-orders.d.ts +11 -0
- package/dist/api/info-private/account-active-orders.js +6 -0
- package/dist/api/info-private/account-inactive-orders.cjs +6 -0
- package/dist/api/info-private/account-inactive-orders.d.cts +52 -0
- package/dist/api/info-private/account-inactive-orders.d.ts +52 -0
- package/dist/api/info-private/account-inactive-orders.js +6 -0
- package/dist/api/info-private/account-limits.cjs +6 -0
- package/dist/api/info-private/account-limits.d.cts +16 -0
- package/dist/api/info-private/account-limits.d.ts +16 -0
- package/dist/api/info-private/account-limits.js +6 -0
- package/dist/api/info-private/account-metadata.cjs +6 -0
- package/dist/api/info-private/account-metadata.d.cts +22 -0
- package/dist/api/info-private/account-metadata.d.ts +22 -0
- package/dist/api/info-private/account-metadata.js +6 -0
- package/dist/api/info-private/deposit-history.cjs +6 -0
- package/dist/api/info-private/deposit-history.d.cts +27 -0
- package/dist/api/info-private/deposit-history.d.ts +27 -0
- package/dist/api/info-private/deposit-history.js +6 -0
- package/dist/api/info-private/export.cjs +6 -0
- package/dist/api/info-private/export.d.cts +16 -0
- package/dist/api/info-private/export.d.ts +16 -0
- package/dist/api/info-private/export.js +6 -0
- package/dist/api/info-private/fastwithdraw-info.cjs +6 -0
- package/dist/api/info-private/fastwithdraw-info.d.cts +16 -0
- package/dist/api/info-private/fastwithdraw-info.d.ts +16 -0
- package/dist/api/info-private/fastwithdraw-info.js +6 -0
- package/dist/api/info-private/index.cjs +75 -0
- package/dist/api/info-private/index.d.cts +19 -0
- package/dist/api/info-private/index.d.ts +19 -0
- package/dist/api/info-private/index.js +75 -0
- package/dist/api/info-private/l1-metadata.cjs +6 -0
- package/dist/api/info-private/l1-metadata.d.cts +16 -0
- package/dist/api/info-private/l1-metadata.d.ts +16 -0
- package/dist/api/info-private/l1-metadata.js +6 -0
- package/dist/api/info-private/liquidations.cjs +6 -0
- package/dist/api/info-private/liquidations.d.cts +66 -0
- package/dist/api/info-private/liquidations.d.ts +66 -0
- package/dist/api/info-private/liquidations.js +6 -0
- package/dist/api/info-private/pnl.cjs +6 -0
- package/dist/api/info-private/pnl.d.cts +24 -0
- package/dist/api/info-private/pnl.d.ts +24 -0
- package/dist/api/info-private/pnl.js +6 -0
- package/dist/api/info-private/position-funding.cjs +6 -0
- package/dist/api/info-private/position-funding.d.cts +28 -0
- package/dist/api/info-private/position-funding.d.ts +28 -0
- package/dist/api/info-private/position-funding.js +6 -0
- package/dist/api/info-private/public-pools-metadata.cjs +6 -0
- package/dist/api/info-private/public-pools-metadata.d.cts +24 -0
- package/dist/api/info-private/public-pools-metadata.d.ts +24 -0
- package/dist/api/info-private/public-pools-metadata.js +6 -0
- package/dist/api/info-private/referral-points.cjs +6 -0
- package/dist/api/info-private/referral-points.d.cts +24 -0
- package/dist/api/info-private/referral-points.d.ts +24 -0
- package/dist/api/info-private/referral-points.js +6 -0
- package/dist/api/info-private/tokens.cjs +6 -0
- package/dist/api/info-private/tokens.d.cts +24 -0
- package/dist/api/info-private/tokens.d.ts +24 -0
- package/dist/api/info-private/tokens.js +6 -0
- package/dist/api/info-private/trades.cjs +6 -0
- package/dist/api/info-private/trades.d.cts +49 -0
- package/dist/api/info-private/trades.d.ts +49 -0
- package/dist/api/info-private/trades.js +6 -0
- package/dist/api/info-private/transfer-fee-info.cjs +6 -0
- package/dist/api/info-private/transfer-fee-info.d.cts +15 -0
- package/dist/api/info-private/transfer-fee-info.d.ts +15 -0
- package/dist/api/info-private/transfer-fee-info.js +6 -0
- package/dist/api/info-private/transfer-history.cjs +6 -0
- package/dist/api/info-private/transfer-history.d.cts +27 -0
- package/dist/api/info-private/transfer-history.d.ts +27 -0
- package/dist/api/info-private/transfer-history.js +6 -0
- package/dist/api/info-private/withdraw-history.cjs +6 -0
- package/dist/api/info-private/withdraw-history.d.cts +27 -0
- package/dist/api/info-private/withdraw-history.d.ts +27 -0
- package/dist/api/info-private/withdraw-history.js +6 -0
- package/dist/chunk-2R5COGAH.cjs +10 -0
- package/dist/chunk-3OSXAPI3.js +8 -0
- package/dist/chunk-3R4OL3TU.cjs +17 -0
- package/dist/chunk-3SKO62BC.js +0 -0
- package/dist/chunk-3Y76Q54G.js +18 -0
- package/dist/chunk-3ZIFHX7Q.cjs +1 -0
- package/dist/chunk-467IJZRE.js +14 -0
- package/dist/chunk-472ULOSN.js +10 -0
- package/dist/chunk-4LNJ2577.js +17 -0
- package/dist/chunk-4MZ3XQUJ.cjs +13 -0
- package/dist/chunk-4TIJW7PH.cjs +14 -0
- package/dist/chunk-4VAZ7ZA2.js +10 -0
- package/dist/chunk-5JDRAN7L.cjs +22 -0
- package/dist/chunk-5P5CPB5A.js +18 -0
- package/dist/chunk-5U6X6DI7.cjs +13 -0
- package/dist/chunk-5WEMEUUI.js +22 -0
- package/dist/chunk-5YGIBBTZ.js +357 -0
- package/dist/chunk-62KDFQ7D.js +367 -0
- package/dist/chunk-6CD3YMMG.cjs +1 -0
- package/dist/chunk-6GCE6YQR.cjs +8 -0
- package/dist/chunk-6LUEPRL7.cjs +16 -0
- package/dist/chunk-76SPKVHT.js +48 -0
- package/dist/chunk-77QSYYAW.js +13 -0
- package/dist/chunk-7U2USLAM.cjs +8 -0
- package/dist/chunk-A2APDMN3.js +13 -0
- package/dist/chunk-AKEQDKGA.js +167 -0
- package/dist/chunk-AMNDQGYL.js +18 -0
- package/dist/chunk-BA2QFD27.cjs +19 -0
- package/dist/chunk-BES73YEF.js +8 -0
- package/dist/chunk-BKIL4UXV.cjs +22 -0
- package/dist/chunk-BKJGDTS3.js +8 -0
- package/dist/chunk-BVC2AA7Y.cjs +8 -0
- package/dist/chunk-BXMXWCMD.js +13 -0
- package/dist/chunk-C7OTZCGC.js +0 -0
- package/dist/chunk-DCKMNDS3.js +0 -0
- package/dist/chunk-DOZF64YC.cjs +17 -0
- package/dist/chunk-DW6W5SX2.cjs +18 -0
- package/dist/chunk-E3GJJZER.cjs +8 -0
- package/dist/chunk-EBSW5ZYW.js +19 -0
- package/dist/chunk-F24JA2OV.cjs +22 -0
- package/dist/chunk-FJJWUBKM.js +17 -0
- package/dist/chunk-FM4WWIRI.cjs +17 -0
- package/dist/chunk-FODEDUT4.js +8 -0
- package/dist/chunk-GEWTGUEG.cjs +1 -0
- package/dist/chunk-GI4WUHSL.cjs +1 -0
- package/dist/chunk-GYABNQWH.js +8 -0
- package/dist/chunk-GYQ6HJQY.cjs +21 -0
- package/dist/chunk-INCL3WRA.cjs +13 -0
- package/dist/chunk-IQQRFW4A.cjs +8 -0
- package/dist/chunk-IT6LK2G5.cjs +19 -0
- package/dist/chunk-IXF4QUC6.js +8 -0
- package/dist/chunk-J3UZK77O.cjs +18 -0
- package/dist/chunk-J7GXRK7R.cjs +19 -0
- package/dist/chunk-JNTYHWDJ.js +22 -0
- package/dist/chunk-JTE4UBAX.js +8 -0
- package/dist/chunk-JTP6DTDN.js +0 -0
- package/dist/chunk-K7ZQARON.js +8 -0
- package/dist/chunk-KV6G2ZCR.js +539 -0
- package/dist/chunk-L5SDFTHR.cjs +242 -0
- package/dist/chunk-LBVNEQ5R.cjs +21 -0
- package/dist/chunk-LYNZNSLV.js +18 -0
- package/dist/chunk-MAPH47LH.cjs +1 -0
- package/dist/chunk-MO4PMYTS.js +0 -0
- package/dist/chunk-MOMFTZ7N.cjs +357 -0
- package/dist/chunk-MZCKU6FF.js +8 -0
- package/dist/chunk-NIMYOIVU.cjs +1 -0
- package/dist/chunk-NIT6TCVS.cjs +8 -0
- package/dist/chunk-NOFXPTLU.js +8 -0
- package/dist/chunk-NRZGE42C.js +23 -0
- package/dist/chunk-NSFKW27X.js +0 -0
- package/dist/chunk-O3PA6HV2.js +18 -0
- package/dist/chunk-ON64OVOQ.cjs +20 -0
- package/dist/chunk-OPSCTD6W.js +17 -0
- package/dist/chunk-P32EPCEM.js +19 -0
- package/dist/chunk-PEALQBVN.js +19 -0
- package/dist/chunk-PP4Q2W66.cjs +10 -0
- package/dist/chunk-PPU2VWXX.js +12 -0
- package/dist/chunk-Q2MT7FZ7.js +242 -0
- package/dist/chunk-QCE5PEXE.cjs +8 -0
- package/dist/chunk-QMXZQNBK.cjs +8 -0
- package/dist/chunk-QNM3HYIV.cjs +8 -0
- package/dist/chunk-QXGO7TJ2.js +17 -0
- package/dist/chunk-RGVFMOQI.js +20 -0
- package/dist/chunk-RYDJEI67.cjs +48 -0
- package/dist/chunk-S4OE3IME.js +13 -0
- package/dist/chunk-SA6CXVP6.js +22 -0
- package/dist/chunk-SK6Y2YH6.js +0 -0
- package/dist/chunk-TELGVFFP.js +13 -0
- package/dist/chunk-TPGO4YD3.js +21 -0
- package/dist/chunk-TSHQJVUP.js +0 -0
- package/dist/chunk-TWGXKYO2.cjs +23 -0
- package/dist/chunk-U25GSCR7.cjs +17 -0
- package/dist/chunk-U2SM46CP.cjs +17 -0
- package/dist/chunk-UICTRTWB.cjs +367 -0
- package/dist/chunk-UORSMHI2.js +21 -0
- package/dist/chunk-VDBWTSBC.cjs +1 -0
- package/dist/chunk-VNQKWIQG.cjs +13 -0
- package/dist/chunk-VT3N7TOX.js +325 -0
- package/dist/chunk-VW77SNCY.js +24 -0
- package/dist/chunk-W2BVNVOC.cjs +1 -0
- package/dist/chunk-W2CTGWUW.cjs +539 -0
- package/dist/chunk-W5VY4TWP.js +16 -0
- package/dist/chunk-WDQ4YM6C.cjs +167 -0
- package/dist/chunk-WK6OQRMG.cjs +8 -0
- package/dist/chunk-WWLOQFSW.cjs +12 -0
- package/dist/chunk-X7E6XJVQ.cjs +18 -0
- package/dist/chunk-XOG6T533.cjs +18 -0
- package/dist/chunk-XPZBVL56.cjs +325 -0
- package/dist/chunk-XQGOXCT4.js +22 -0
- package/dist/chunk-YVJVFJ24.cjs +19 -0
- package/dist/chunk-YWN57BJF.js +8 -0
- package/dist/chunk-Z5XTWR2A.cjs +8 -0
- package/dist/chunk-ZDNQFOED.js +17 -0
- package/dist/chunk-ZGWYI7Q2.cjs +24 -0
- package/dist/chunk-ZIMFMYT2.cjs +22 -0
- package/dist/chunk-ZJVQD6JD.cjs +18 -0
- package/dist/chunk-ZKFXRN6W.cjs +13 -0
- package/dist/chunk-ZWYNOAL3.js +19 -0
- package/dist/client/exchange-client.cjs +14 -0
- package/dist/client/exchange-client.d.cts +352 -0
- package/dist/client/exchange-client.d.ts +352 -0
- package/dist/client/exchange-client.js +14 -0
- package/dist/client/index.cjs +71 -0
- package/dist/client/index.d.cts +53 -0
- package/dist/client/index.d.ts +53 -0
- package/dist/client/index.js +71 -0
- package/dist/client/info-client.cjs +27 -0
- package/dist/client/info-client.d.cts +255 -0
- package/dist/client/info-client.d.ts +255 -0
- package/dist/client/info-client.js +27 -0
- package/dist/client/info-private-client.cjs +25 -0
- package/dist/client/info-private-client.d.cts +293 -0
- package/dist/client/info-private-client.d.ts +293 -0
- package/dist/client/info-private-client.js +25 -0
- package/dist/client/l1-bridge-client.cjs +6 -0
- package/dist/client/l1-bridge-client.d.cts +45 -0
- package/dist/client/l1-bridge-client.d.ts +45 -0
- package/dist/client/l1-bridge-client.js +6 -0
- package/dist/client/ws-client.cjs +6 -0
- package/dist/client/ws-client.d.cts +63 -0
- package/dist/client/ws-client.d.ts +63 -0
- package/dist/client/ws-client.js +6 -0
- package/dist/index.cjs +79 -0
- package/dist/index.d.cts +53 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.js +79 -0
- package/dist/signing/index.cjs +7 -0
- package/dist/signing/index.d.cts +1 -0
- package/dist/signing/index.d.ts +1 -0
- package/dist/signing/index.js +7 -0
- package/dist/signing/wasm-signer.cjs +6 -0
- package/dist/signing/wasm-signer.d.cts +101 -0
- package/dist/signing/wasm-signer.d.ts +101 -0
- package/dist/signing/wasm-signer.js +6 -0
- package/dist/types/bridge.cjs +1 -0
- package/dist/types/bridge.d.cts +24 -0
- package/dist/types/bridge.d.ts +24 -0
- package/dist/types/bridge.js +1 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +3 -0
- package/dist/types/ws.cjs +1 -0
- package/dist/types/ws.d.cts +351 -0
- package/dist/types/ws.d.ts +351 -0
- package/dist/types/ws.js +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { AccountActiveOrdersRequest } from '../api/info-private/account-active-orders.cjs';
|
|
2
|
+
import { Orders, AccountInactiveOrdersRequest } from '../api/info-private/account-inactive-orders.cjs';
|
|
3
|
+
import { AccountLimitsRequest, AccountLimitsResponse } from '../api/info-private/account-limits.cjs';
|
|
4
|
+
import { AccountMetadataRequest, AccountMetadataResponse } from '../api/info-private/account-metadata.cjs';
|
|
5
|
+
import { DepositHistoryRequest, DepositHistoryResponse } from '../api/info-private/deposit-history.cjs';
|
|
6
|
+
import { ExportRequest, ExportResponse } from '../api/info-private/export.cjs';
|
|
7
|
+
import { FastWithdrawInfoRequest, FastWithdrawInfoResponse } from '../api/info-private/fastwithdraw-info.cjs';
|
|
8
|
+
import { L1MetadataRequest, L1MetadataResponse } from '../api/info-private/l1-metadata.cjs';
|
|
9
|
+
import { LiquidationsRequest, LiquidationsResponse } from '../api/info-private/liquidations.cjs';
|
|
10
|
+
import { PnLRequest, PnLResponse } from '../api/info-private/pnl.cjs';
|
|
11
|
+
import { PositionFundingRequest, PositionFundingResponse } from '../api/info-private/position-funding.cjs';
|
|
12
|
+
import { PublicPoolsRequest, PublicPoolsResponse } from '../api/info-private/public-pools-metadata.cjs';
|
|
13
|
+
import { ReferralPointsRequest, ReferralPointsResponse } from '../api/info-private/referral-points.cjs';
|
|
14
|
+
import { TokensRequest, TokensResponse } from '../api/info-private/tokens.cjs';
|
|
15
|
+
import { TradesRequest, TradesResponse } from '../api/info-private/trades.cjs';
|
|
16
|
+
import { TransferFeeInfoRequest, TransferFeeInfoResponse } from '../api/info-private/transfer-fee-info.cjs';
|
|
17
|
+
import { TransferHistoryRequest, TransferHistoryResponse } from '../api/info-private/transfer-history.cjs';
|
|
18
|
+
import { WithdrawHistoryRequest, WithdrawHistoryResponse } from '../api/info-private/withdraw-history.cjs';
|
|
19
|
+
import { WasmSigner } from '../signing/wasm-signer.cjs';
|
|
20
|
+
import 'axios';
|
|
21
|
+
|
|
22
|
+
interface InfoPrivateClientConfig {
|
|
23
|
+
baseURL?: string;
|
|
24
|
+
wasmSigner: WasmSigner;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* InfoPrivateClient - Client for private/authenticated info endpoints
|
|
28
|
+
*
|
|
29
|
+
* Provides access to API endpoints that require authentication via WASM signing.
|
|
30
|
+
* Authentication is handled automatically using the provided WasmSigner.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const wasmSigner = new WasmSigner(...);
|
|
35
|
+
* const client = new InfoPrivateClient({
|
|
36
|
+
* baseURL: "https://mainnet.zklighter.elliot.ai",
|
|
37
|
+
* wasmSigning: wasmSigner
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* const orders = await client.getAccountActiveOrders({
|
|
41
|
+
* account_index: 0,
|
|
42
|
+
* market_id: 1
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare class InfoPrivateClient {
|
|
47
|
+
private readonly baseURL;
|
|
48
|
+
private readonly axiosInstance;
|
|
49
|
+
private readonly wasmSigner;
|
|
50
|
+
constructor(config: InfoPrivateClientConfig);
|
|
51
|
+
private createAxiosInstance;
|
|
52
|
+
/**
|
|
53
|
+
* Get active orders for an account in a specific market
|
|
54
|
+
* @param params - Account index and market ID to retrieve active orders for
|
|
55
|
+
* @returns List of active orders
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const orders = await client.getAccountActiveOrders({
|
|
59
|
+
* account_index: 0,
|
|
60
|
+
* market_id: 1
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
getAccountActiveOrders(params: AccountActiveOrdersRequest): Promise<Orders>;
|
|
65
|
+
/**
|
|
66
|
+
* Get inactive orders for an account
|
|
67
|
+
* @param params - Account index and optional filters for inactive orders
|
|
68
|
+
* @returns List of inactive orders with pagination support
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const orders = await client.getAccountInactiveOrders({
|
|
72
|
+
* account_index: 0,
|
|
73
|
+
* limit: 50,
|
|
74
|
+
* market_id: 1
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
getAccountInactiveOrders(params: AccountInactiveOrdersRequest): Promise<Orders>;
|
|
79
|
+
/**
|
|
80
|
+
* Get account limits and tier information
|
|
81
|
+
* @param params - Account index to retrieve limits for
|
|
82
|
+
* @returns Account limits including max LLP percentage, user tier, and pool creation permissions
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const limits = await client.getAccountLimits({ account_index: 0 });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
getAccountLimits(params: AccountLimitsRequest): Promise<AccountLimitsResponse>;
|
|
89
|
+
/**
|
|
90
|
+
* Get account metadata by index or L1 address
|
|
91
|
+
* @param params - Account lookup parameters (by index or L1 address)
|
|
92
|
+
* @returns Account metadata including name, description, and referral information
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* const metadata = await client.getAccountMetadata({
|
|
96
|
+
* by: "index",
|
|
97
|
+
* value: "0"
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
getAccountMetadata(params: AccountMetadataRequest): Promise<AccountMetadataResponse>;
|
|
102
|
+
/**
|
|
103
|
+
* Get L1 metadata for an address
|
|
104
|
+
* @param params - L1 address to retrieve metadata for
|
|
105
|
+
* @returns L1 metadata including referral information
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* const l1Metadata = await client.getL1Metadata({
|
|
109
|
+
* l1_address: "0x..."
|
|
110
|
+
* });
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
getL1Metadata(params: L1MetadataRequest): Promise<L1MetadataResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Get API tokens for an account
|
|
116
|
+
* @param params - Account index to retrieve API tokens for
|
|
117
|
+
* @returns List of API tokens with details including name, expiry, scopes, and status
|
|
118
|
+
* @example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* const tokens = await client.getTokens({ account_index: 0 });
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
getTokens(params: TokensRequest): Promise<TokensResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Get deposit history for an account
|
|
126
|
+
* @param params - Account index, L1 address, and optional filters
|
|
127
|
+
* @returns List of deposits with status and timestamps
|
|
128
|
+
* @example
|
|
129
|
+
* ```typescript
|
|
130
|
+
* const deposits = await client.getDepositHistory({
|
|
131
|
+
* account_index: 0,
|
|
132
|
+
* l1_address: "0x...",
|
|
133
|
+
* filter: "pending"
|
|
134
|
+
* });
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
getDepositHistory(params: DepositHistoryRequest): Promise<DepositHistoryResponse>;
|
|
138
|
+
/**
|
|
139
|
+
* Get withdrawal history for an account
|
|
140
|
+
* @param params - Account index, L1 address, and optional filters
|
|
141
|
+
* @returns List of withdrawals with status and timestamps
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* const withdrawals = await client.getWithdrawHistory({
|
|
145
|
+
* account_index: 0,
|
|
146
|
+
* l1_address: "0x...",
|
|
147
|
+
* filter: "completed"
|
|
148
|
+
* });
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
getWithdrawHistory(params: WithdrawHistoryRequest): Promise<WithdrawHistoryResponse>;
|
|
152
|
+
/**
|
|
153
|
+
* Get fast withdraw information for an account
|
|
154
|
+
* @param params - Account index to retrieve fast withdraw info for
|
|
155
|
+
* @returns Fast withdraw limits and account information
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* const fastWithdrawInfo = await client.getFastWithdrawInfo({
|
|
159
|
+
* account_index: 0
|
|
160
|
+
* });
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
getFastWithdrawInfo(params: FastWithdrawInfoRequest): Promise<FastWithdrawInfoResponse>;
|
|
164
|
+
/**
|
|
165
|
+
* Get transfer fee information between accounts
|
|
166
|
+
* @param params - Account indices to calculate transfer fee for
|
|
167
|
+
* @returns Transfer fee in USDC
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* const feeInfo = await client.getTransferFeeInfo({
|
|
171
|
+
* account_index: 0,
|
|
172
|
+
* to_account_index: 1
|
|
173
|
+
* });
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
getTransferFeeInfo(params: TransferFeeInfoRequest): Promise<TransferFeeInfoResponse>;
|
|
177
|
+
/**
|
|
178
|
+
* Get transfer history for an account
|
|
179
|
+
* @param params - Account index and optional cursor for pagination
|
|
180
|
+
* @returns Transfer history with pagination support
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* const transfers = await client.getTransferHistory({
|
|
184
|
+
* account_index: 0,
|
|
185
|
+
* cursor: 'optional-cursor-for-pagination'
|
|
186
|
+
* });
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
getTransferHistory(params: TransferHistoryRequest): Promise<TransferHistoryResponse>;
|
|
190
|
+
/**
|
|
191
|
+
* Get liquidation history for an account
|
|
192
|
+
* @param params - Account index, limit, and optional market/cursor filters
|
|
193
|
+
* @returns List of liquidations with pagination support
|
|
194
|
+
* @example
|
|
195
|
+
* ```typescript
|
|
196
|
+
* const liquidations = await client.getLiquidations({
|
|
197
|
+
* account_index: 0,
|
|
198
|
+
* limit: 50,
|
|
199
|
+
* market_id: 1
|
|
200
|
+
* });
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
getLiquidations(params: LiquidationsRequest): Promise<LiquidationsResponse>;
|
|
204
|
+
/**
|
|
205
|
+
* Get profit and loss data for an account or market
|
|
206
|
+
* @param params - PnL query parameters including resolution, time range, and account/market filters
|
|
207
|
+
* @returns PnL entries with timestamp, pnl, and cumulative pnl
|
|
208
|
+
* @example
|
|
209
|
+
* ```typescript
|
|
210
|
+
* const pnl = await client.getPnL({
|
|
211
|
+
* by: "account_index",
|
|
212
|
+
* value: "0",
|
|
213
|
+
* resolution: "1d",
|
|
214
|
+
* start_timestamp: 1234567890,
|
|
215
|
+
* end_timestamp: 1234567900,
|
|
216
|
+
* count_back: 30
|
|
217
|
+
* });
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
getPnL(params: PnLRequest): Promise<PnLResponse>;
|
|
221
|
+
/**
|
|
222
|
+
* Get position funding history for an account
|
|
223
|
+
* @param params - Position funding query parameters including account_index, limit, and optional filters
|
|
224
|
+
* @returns Position funding entries with timestamp, funding rate, and position details
|
|
225
|
+
* @example
|
|
226
|
+
* ```typescript
|
|
227
|
+
* const funding = await client.getPositionFunding({
|
|
228
|
+
* account_index: 0,
|
|
229
|
+
* limit: 50,
|
|
230
|
+
* market_id: 1,
|
|
231
|
+
* side: "long"
|
|
232
|
+
* });
|
|
233
|
+
* ```
|
|
234
|
+
*/
|
|
235
|
+
getPositionFunding(params: PositionFundingRequest): Promise<PositionFundingResponse>;
|
|
236
|
+
/**
|
|
237
|
+
* Get public liquidity pools metadata
|
|
238
|
+
* @param params - Optional filters for pool queries (filter, limit, index)
|
|
239
|
+
* @returns List of public pools with TVL, APY, and share information
|
|
240
|
+
* @example
|
|
241
|
+
* ```typescript
|
|
242
|
+
* const pools = await client.getPublicPools({
|
|
243
|
+
* filter: "all",
|
|
244
|
+
* limit: 10,
|
|
245
|
+
* index: 0
|
|
246
|
+
* });
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
getPublicPools(params?: PublicPoolsRequest): Promise<PublicPoolsResponse>;
|
|
250
|
+
/**
|
|
251
|
+
* Get referral points for an account
|
|
252
|
+
* @param params - Account index to retrieve referral points for
|
|
253
|
+
* @returns Referral points data including user points and referral list
|
|
254
|
+
* @example
|
|
255
|
+
* ```typescript
|
|
256
|
+
* const points = await client.getReferralPoints({ account_index: 0 });
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
getReferralPoints(params: ReferralPointsRequest): Promise<ReferralPointsResponse>;
|
|
260
|
+
/**
|
|
261
|
+
* Get trades for an account or market
|
|
262
|
+
* @param params - Trade query parameters including sort_by, limit, and optional filters
|
|
263
|
+
* @returns List of trades with details including price, size, side, and timestamps
|
|
264
|
+
* @example
|
|
265
|
+
* ```typescript
|
|
266
|
+
* const trades = await client.getTrades({
|
|
267
|
+
* sort_by: 'timestamp',
|
|
268
|
+
* limit: 50,
|
|
269
|
+
* account_index: 0,
|
|
270
|
+
* market_id: 1,
|
|
271
|
+
* sort_dir: 'desc'
|
|
272
|
+
* });
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
getTrades(params: TradesRequest): Promise<TradesResponse>;
|
|
276
|
+
/**
|
|
277
|
+
* Export data (funding or trade data) for an account
|
|
278
|
+
* @param params - Export parameters including type (funding or trade) and optional filters
|
|
279
|
+
* @returns Export response with data URL for downloading the export
|
|
280
|
+
* @example
|
|
281
|
+
* ```typescript
|
|
282
|
+
* const exportData = await client.getExport({
|
|
283
|
+
* type: 'trade',
|
|
284
|
+
* account_index: 0,
|
|
285
|
+
* market_id: 1
|
|
286
|
+
* });
|
|
287
|
+
* console.log('Download URL:', exportData.data_url);
|
|
288
|
+
* ```
|
|
289
|
+
*/
|
|
290
|
+
getExport(params: ExportRequest): Promise<ExportResponse>;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export { InfoPrivateClient, type InfoPrivateClientConfig };
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { AccountActiveOrdersRequest } from '../api/info-private/account-active-orders.js';
|
|
2
|
+
import { Orders, AccountInactiveOrdersRequest } from '../api/info-private/account-inactive-orders.js';
|
|
3
|
+
import { AccountLimitsRequest, AccountLimitsResponse } from '../api/info-private/account-limits.js';
|
|
4
|
+
import { AccountMetadataRequest, AccountMetadataResponse } from '../api/info-private/account-metadata.js';
|
|
5
|
+
import { DepositHistoryRequest, DepositHistoryResponse } from '../api/info-private/deposit-history.js';
|
|
6
|
+
import { ExportRequest, ExportResponse } from '../api/info-private/export.js';
|
|
7
|
+
import { FastWithdrawInfoRequest, FastWithdrawInfoResponse } from '../api/info-private/fastwithdraw-info.js';
|
|
8
|
+
import { L1MetadataRequest, L1MetadataResponse } from '../api/info-private/l1-metadata.js';
|
|
9
|
+
import { LiquidationsRequest, LiquidationsResponse } from '../api/info-private/liquidations.js';
|
|
10
|
+
import { PnLRequest, PnLResponse } from '../api/info-private/pnl.js';
|
|
11
|
+
import { PositionFundingRequest, PositionFundingResponse } from '../api/info-private/position-funding.js';
|
|
12
|
+
import { PublicPoolsRequest, PublicPoolsResponse } from '../api/info-private/public-pools-metadata.js';
|
|
13
|
+
import { ReferralPointsRequest, ReferralPointsResponse } from '../api/info-private/referral-points.js';
|
|
14
|
+
import { TokensRequest, TokensResponse } from '../api/info-private/tokens.js';
|
|
15
|
+
import { TradesRequest, TradesResponse } from '../api/info-private/trades.js';
|
|
16
|
+
import { TransferFeeInfoRequest, TransferFeeInfoResponse } from '../api/info-private/transfer-fee-info.js';
|
|
17
|
+
import { TransferHistoryRequest, TransferHistoryResponse } from '../api/info-private/transfer-history.js';
|
|
18
|
+
import { WithdrawHistoryRequest, WithdrawHistoryResponse } from '../api/info-private/withdraw-history.js';
|
|
19
|
+
import { WasmSigner } from '../signing/wasm-signer.js';
|
|
20
|
+
import 'axios';
|
|
21
|
+
|
|
22
|
+
interface InfoPrivateClientConfig {
|
|
23
|
+
baseURL?: string;
|
|
24
|
+
wasmSigner: WasmSigner;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* InfoPrivateClient - Client for private/authenticated info endpoints
|
|
28
|
+
*
|
|
29
|
+
* Provides access to API endpoints that require authentication via WASM signing.
|
|
30
|
+
* Authentication is handled automatically using the provided WasmSigner.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const wasmSigner = new WasmSigner(...);
|
|
35
|
+
* const client = new InfoPrivateClient({
|
|
36
|
+
* baseURL: "https://mainnet.zklighter.elliot.ai",
|
|
37
|
+
* wasmSigning: wasmSigner
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* const orders = await client.getAccountActiveOrders({
|
|
41
|
+
* account_index: 0,
|
|
42
|
+
* market_id: 1
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare class InfoPrivateClient {
|
|
47
|
+
private readonly baseURL;
|
|
48
|
+
private readonly axiosInstance;
|
|
49
|
+
private readonly wasmSigner;
|
|
50
|
+
constructor(config: InfoPrivateClientConfig);
|
|
51
|
+
private createAxiosInstance;
|
|
52
|
+
/**
|
|
53
|
+
* Get active orders for an account in a specific market
|
|
54
|
+
* @param params - Account index and market ID to retrieve active orders for
|
|
55
|
+
* @returns List of active orders
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const orders = await client.getAccountActiveOrders({
|
|
59
|
+
* account_index: 0,
|
|
60
|
+
* market_id: 1
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
getAccountActiveOrders(params: AccountActiveOrdersRequest): Promise<Orders>;
|
|
65
|
+
/**
|
|
66
|
+
* Get inactive orders for an account
|
|
67
|
+
* @param params - Account index and optional filters for inactive orders
|
|
68
|
+
* @returns List of inactive orders with pagination support
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const orders = await client.getAccountInactiveOrders({
|
|
72
|
+
* account_index: 0,
|
|
73
|
+
* limit: 50,
|
|
74
|
+
* market_id: 1
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
getAccountInactiveOrders(params: AccountInactiveOrdersRequest): Promise<Orders>;
|
|
79
|
+
/**
|
|
80
|
+
* Get account limits and tier information
|
|
81
|
+
* @param params - Account index to retrieve limits for
|
|
82
|
+
* @returns Account limits including max LLP percentage, user tier, and pool creation permissions
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const limits = await client.getAccountLimits({ account_index: 0 });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
getAccountLimits(params: AccountLimitsRequest): Promise<AccountLimitsResponse>;
|
|
89
|
+
/**
|
|
90
|
+
* Get account metadata by index or L1 address
|
|
91
|
+
* @param params - Account lookup parameters (by index or L1 address)
|
|
92
|
+
* @returns Account metadata including name, description, and referral information
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* const metadata = await client.getAccountMetadata({
|
|
96
|
+
* by: "index",
|
|
97
|
+
* value: "0"
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
getAccountMetadata(params: AccountMetadataRequest): Promise<AccountMetadataResponse>;
|
|
102
|
+
/**
|
|
103
|
+
* Get L1 metadata for an address
|
|
104
|
+
* @param params - L1 address to retrieve metadata for
|
|
105
|
+
* @returns L1 metadata including referral information
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* const l1Metadata = await client.getL1Metadata({
|
|
109
|
+
* l1_address: "0x..."
|
|
110
|
+
* });
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
getL1Metadata(params: L1MetadataRequest): Promise<L1MetadataResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Get API tokens for an account
|
|
116
|
+
* @param params - Account index to retrieve API tokens for
|
|
117
|
+
* @returns List of API tokens with details including name, expiry, scopes, and status
|
|
118
|
+
* @example
|
|
119
|
+
* ```typescript
|
|
120
|
+
* const tokens = await client.getTokens({ account_index: 0 });
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
getTokens(params: TokensRequest): Promise<TokensResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Get deposit history for an account
|
|
126
|
+
* @param params - Account index, L1 address, and optional filters
|
|
127
|
+
* @returns List of deposits with status and timestamps
|
|
128
|
+
* @example
|
|
129
|
+
* ```typescript
|
|
130
|
+
* const deposits = await client.getDepositHistory({
|
|
131
|
+
* account_index: 0,
|
|
132
|
+
* l1_address: "0x...",
|
|
133
|
+
* filter: "pending"
|
|
134
|
+
* });
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
getDepositHistory(params: DepositHistoryRequest): Promise<DepositHistoryResponse>;
|
|
138
|
+
/**
|
|
139
|
+
* Get withdrawal history for an account
|
|
140
|
+
* @param params - Account index, L1 address, and optional filters
|
|
141
|
+
* @returns List of withdrawals with status and timestamps
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* const withdrawals = await client.getWithdrawHistory({
|
|
145
|
+
* account_index: 0,
|
|
146
|
+
* l1_address: "0x...",
|
|
147
|
+
* filter: "completed"
|
|
148
|
+
* });
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
getWithdrawHistory(params: WithdrawHistoryRequest): Promise<WithdrawHistoryResponse>;
|
|
152
|
+
/**
|
|
153
|
+
* Get fast withdraw information for an account
|
|
154
|
+
* @param params - Account index to retrieve fast withdraw info for
|
|
155
|
+
* @returns Fast withdraw limits and account information
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* const fastWithdrawInfo = await client.getFastWithdrawInfo({
|
|
159
|
+
* account_index: 0
|
|
160
|
+
* });
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
getFastWithdrawInfo(params: FastWithdrawInfoRequest): Promise<FastWithdrawInfoResponse>;
|
|
164
|
+
/**
|
|
165
|
+
* Get transfer fee information between accounts
|
|
166
|
+
* @param params - Account indices to calculate transfer fee for
|
|
167
|
+
* @returns Transfer fee in USDC
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* const feeInfo = await client.getTransferFeeInfo({
|
|
171
|
+
* account_index: 0,
|
|
172
|
+
* to_account_index: 1
|
|
173
|
+
* });
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
getTransferFeeInfo(params: TransferFeeInfoRequest): Promise<TransferFeeInfoResponse>;
|
|
177
|
+
/**
|
|
178
|
+
* Get transfer history for an account
|
|
179
|
+
* @param params - Account index and optional cursor for pagination
|
|
180
|
+
* @returns Transfer history with pagination support
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* const transfers = await client.getTransferHistory({
|
|
184
|
+
* account_index: 0,
|
|
185
|
+
* cursor: 'optional-cursor-for-pagination'
|
|
186
|
+
* });
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
getTransferHistory(params: TransferHistoryRequest): Promise<TransferHistoryResponse>;
|
|
190
|
+
/**
|
|
191
|
+
* Get liquidation history for an account
|
|
192
|
+
* @param params - Account index, limit, and optional market/cursor filters
|
|
193
|
+
* @returns List of liquidations with pagination support
|
|
194
|
+
* @example
|
|
195
|
+
* ```typescript
|
|
196
|
+
* const liquidations = await client.getLiquidations({
|
|
197
|
+
* account_index: 0,
|
|
198
|
+
* limit: 50,
|
|
199
|
+
* market_id: 1
|
|
200
|
+
* });
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
getLiquidations(params: LiquidationsRequest): Promise<LiquidationsResponse>;
|
|
204
|
+
/**
|
|
205
|
+
* Get profit and loss data for an account or market
|
|
206
|
+
* @param params - PnL query parameters including resolution, time range, and account/market filters
|
|
207
|
+
* @returns PnL entries with timestamp, pnl, and cumulative pnl
|
|
208
|
+
* @example
|
|
209
|
+
* ```typescript
|
|
210
|
+
* const pnl = await client.getPnL({
|
|
211
|
+
* by: "account_index",
|
|
212
|
+
* value: "0",
|
|
213
|
+
* resolution: "1d",
|
|
214
|
+
* start_timestamp: 1234567890,
|
|
215
|
+
* end_timestamp: 1234567900,
|
|
216
|
+
* count_back: 30
|
|
217
|
+
* });
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
getPnL(params: PnLRequest): Promise<PnLResponse>;
|
|
221
|
+
/**
|
|
222
|
+
* Get position funding history for an account
|
|
223
|
+
* @param params - Position funding query parameters including account_index, limit, and optional filters
|
|
224
|
+
* @returns Position funding entries with timestamp, funding rate, and position details
|
|
225
|
+
* @example
|
|
226
|
+
* ```typescript
|
|
227
|
+
* const funding = await client.getPositionFunding({
|
|
228
|
+
* account_index: 0,
|
|
229
|
+
* limit: 50,
|
|
230
|
+
* market_id: 1,
|
|
231
|
+
* side: "long"
|
|
232
|
+
* });
|
|
233
|
+
* ```
|
|
234
|
+
*/
|
|
235
|
+
getPositionFunding(params: PositionFundingRequest): Promise<PositionFundingResponse>;
|
|
236
|
+
/**
|
|
237
|
+
* Get public liquidity pools metadata
|
|
238
|
+
* @param params - Optional filters for pool queries (filter, limit, index)
|
|
239
|
+
* @returns List of public pools with TVL, APY, and share information
|
|
240
|
+
* @example
|
|
241
|
+
* ```typescript
|
|
242
|
+
* const pools = await client.getPublicPools({
|
|
243
|
+
* filter: "all",
|
|
244
|
+
* limit: 10,
|
|
245
|
+
* index: 0
|
|
246
|
+
* });
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
getPublicPools(params?: PublicPoolsRequest): Promise<PublicPoolsResponse>;
|
|
250
|
+
/**
|
|
251
|
+
* Get referral points for an account
|
|
252
|
+
* @param params - Account index to retrieve referral points for
|
|
253
|
+
* @returns Referral points data including user points and referral list
|
|
254
|
+
* @example
|
|
255
|
+
* ```typescript
|
|
256
|
+
* const points = await client.getReferralPoints({ account_index: 0 });
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
getReferralPoints(params: ReferralPointsRequest): Promise<ReferralPointsResponse>;
|
|
260
|
+
/**
|
|
261
|
+
* Get trades for an account or market
|
|
262
|
+
* @param params - Trade query parameters including sort_by, limit, and optional filters
|
|
263
|
+
* @returns List of trades with details including price, size, side, and timestamps
|
|
264
|
+
* @example
|
|
265
|
+
* ```typescript
|
|
266
|
+
* const trades = await client.getTrades({
|
|
267
|
+
* sort_by: 'timestamp',
|
|
268
|
+
* limit: 50,
|
|
269
|
+
* account_index: 0,
|
|
270
|
+
* market_id: 1,
|
|
271
|
+
* sort_dir: 'desc'
|
|
272
|
+
* });
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
getTrades(params: TradesRequest): Promise<TradesResponse>;
|
|
276
|
+
/**
|
|
277
|
+
* Export data (funding or trade data) for an account
|
|
278
|
+
* @param params - Export parameters including type (funding or trade) and optional filters
|
|
279
|
+
* @returns Export response with data URL for downloading the export
|
|
280
|
+
* @example
|
|
281
|
+
* ```typescript
|
|
282
|
+
* const exportData = await client.getExport({
|
|
283
|
+
* type: 'trade',
|
|
284
|
+
* account_index: 0,
|
|
285
|
+
* market_id: 1
|
|
286
|
+
* });
|
|
287
|
+
* console.log('Download URL:', exportData.data_url);
|
|
288
|
+
* ```
|
|
289
|
+
*/
|
|
290
|
+
getExport(params: ExportRequest): Promise<ExportResponse>;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export { InfoPrivateClient, type InfoPrivateClientConfig };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
InfoPrivateClient
|
|
3
|
+
} from "../chunk-62KDFQ7D.js";
|
|
4
|
+
import "../chunk-TSHQJVUP.js";
|
|
5
|
+
import "../chunk-467IJZRE.js";
|
|
6
|
+
import "../chunk-LYNZNSLV.js";
|
|
7
|
+
import "../chunk-3Y76Q54G.js";
|
|
8
|
+
import "../chunk-PEALQBVN.js";
|
|
9
|
+
import "../chunk-QXGO7TJ2.js";
|
|
10
|
+
import "../chunk-RGVFMOQI.js";
|
|
11
|
+
import "../chunk-NRZGE42C.js";
|
|
12
|
+
import "../chunk-TPGO4YD3.js";
|
|
13
|
+
import "../chunk-O3PA6HV2.js";
|
|
14
|
+
import "../chunk-W5VY4TWP.js";
|
|
15
|
+
import "../chunk-OPSCTD6W.js";
|
|
16
|
+
import "../chunk-AMNDQGYL.js";
|
|
17
|
+
import "../chunk-XQGOXCT4.js";
|
|
18
|
+
import "../chunk-4LNJ2577.js";
|
|
19
|
+
import "../chunk-5P5CPB5A.js";
|
|
20
|
+
import "../chunk-P32EPCEM.js";
|
|
21
|
+
import "../chunk-EBSW5ZYW.js";
|
|
22
|
+
import "../chunk-ZDNQFOED.js";
|
|
23
|
+
export {
|
|
24
|
+
InfoPrivateClient
|
|
25
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { L1BridgeConfig, L1DepositParams, L1DepositResult } from '../types/bridge.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* L1 Bridge Client for handling Ethereum to Lighter L2 deposits
|
|
5
|
+
*/
|
|
6
|
+
declare class L1BridgeClient {
|
|
7
|
+
private config;
|
|
8
|
+
constructor(config: L1BridgeConfig);
|
|
9
|
+
/**
|
|
10
|
+
* Deposit USDC from L1 to L2
|
|
11
|
+
* @param params - Deposit parameters
|
|
12
|
+
* @returns Promise<L1DepositResult>
|
|
13
|
+
*/
|
|
14
|
+
depositToL2(params: L1DepositParams): Promise<L1DepositResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Check USDC balance for an address
|
|
17
|
+
* @param address - Ethereum address
|
|
18
|
+
* @returns Promise<string> - Balance in USDC units
|
|
19
|
+
*/
|
|
20
|
+
getUSDCBalance(address: string): Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Check USDC allowance for bridge contract
|
|
23
|
+
* @param address - Ethereum address
|
|
24
|
+
* @returns Promise<string> - Allowance in USDC units
|
|
25
|
+
*/
|
|
26
|
+
getUSDCAllowance(address: string): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Get transaction status
|
|
29
|
+
* @param txHash - Transaction hash
|
|
30
|
+
* @returns Promise<L1DepositResult>
|
|
31
|
+
*/
|
|
32
|
+
getTransactionStatus(txHash: string): Promise<L1DepositResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Get default bridge configuration for mainnet
|
|
35
|
+
* @returns L1BridgeConfig
|
|
36
|
+
*/
|
|
37
|
+
static getMainnetConfig(): L1BridgeConfig;
|
|
38
|
+
/**
|
|
39
|
+
* Get default bridge configuration for testnet
|
|
40
|
+
* @returns L1BridgeConfig
|
|
41
|
+
*/
|
|
42
|
+
static getTestnetConfig(): L1BridgeConfig;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { L1BridgeClient };
|