lighter-sdk-client 0.2.22
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.
Potentially problematic release.
This version of lighter-sdk-client might be problematic. Click here for more details.
- package/README.md +816 -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-24BJYHI5.cjs +166 -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-4UDAN2FX.js +225 -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-6CD3YMMG.cjs +1 -0
- package/dist/chunk-6GCE6YQR.cjs +8 -0
- package/dist/chunk-6LUEPRL7.cjs +16 -0
- package/dist/chunk-6M6GRSDD.cjs +370 -0
- package/dist/chunk-6NEX2QS6.js +370 -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-AHCELOTZ.js +325 -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-JLCOD3WH.cjs +325 -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-L5SDFTHR.cjs +242 -0
- package/dist/chunk-LBVNEQ5R.cjs +21 -0
- package/dist/chunk-LXNCAKJZ.js +0 -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-MOOGM3DW.cjs +1 -0
- package/dist/chunk-MZCKU6FF.js +8 -0
- package/dist/chunk-NIT6TCVS.cjs +8 -0
- package/dist/chunk-NOFXPTLU.js +8 -0
- package/dist/chunk-NOREYPFC.js +612 -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-OBR3B6S7.cjs +367 -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-QILV2ZMV.js +166 -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-R37XMGAI.cjs +612 -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-TELGVFFP.js +13 -0
- package/dist/chunk-TM3CNEVD.js +367 -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-UORSMHI2.js +21 -0
- package/dist/chunk-VDBWTSBC.cjs +1 -0
- package/dist/chunk-VNQKWIQG.cjs +13 -0
- package/dist/chunk-VW77SNCY.js +24 -0
- package/dist/chunk-VWX5CLM4.cjs +225 -0
- package/dist/chunk-W2BVNVOC.cjs +1 -0
- package/dist/chunk-W5VY4TWP.js +16 -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-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 +409 -0
- package/dist/client/exchange-client.d.ts +409 -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 +64 -0
- package/dist/client/ws-client.d.ts +64 -0
- package/dist/client/ws-client.js +6 -0
- package/dist/index.cjs +225 -0
- package/dist/index.d.cts +54 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +225 -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/constant.cjs +148 -0
- package/dist/types/constant.d.cts +142 -0
- package/dist/types/constant.d.ts +142 -0
- package/dist/types/constant.js +148 -0
- package/dist/types/index.cjs +151 -0
- package/dist/types/index.d.cts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +151 -0
- package/dist/types/ws.cjs +1 -0
- package/dist/types/ws.d.cts +362 -0
- package/dist/types/ws.d.ts +362 -0
- package/dist/types/ws.js +1 -0
- package/package.json +53 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import "./chunk-LXNCAKJZ.js";
|
|
2
|
+
import "./chunk-NSFKW27X.js";
|
|
3
|
+
import {
|
|
4
|
+
ApiMaxOrderType,
|
|
5
|
+
AssetMarginMode,
|
|
6
|
+
AssetRouteType,
|
|
7
|
+
CancelAllOrdersTimeInForce,
|
|
8
|
+
FeeTick,
|
|
9
|
+
GroupingType,
|
|
10
|
+
InitialPoolShareValue,
|
|
11
|
+
MarginFractionTick,
|
|
12
|
+
MarginUpdateDirection,
|
|
13
|
+
MaxAccountIndex,
|
|
14
|
+
MaxApiKeyIndex,
|
|
15
|
+
MaxAssetIndex,
|
|
16
|
+
MaxBurntShareUSDCValue,
|
|
17
|
+
MaxClientOrderIndex,
|
|
18
|
+
MaxExchangeUSDC,
|
|
19
|
+
MaxGroupedOrderCount,
|
|
20
|
+
MaxInitialTotalShares,
|
|
21
|
+
MaxInvestedPublicPoolCount,
|
|
22
|
+
MaxMasterAccountIndex,
|
|
23
|
+
MaxOrderBaseAmount,
|
|
24
|
+
MaxOrderCancelAllPeriod,
|
|
25
|
+
MaxOrderExpiry,
|
|
26
|
+
MaxOrderExpiryPeriod,
|
|
27
|
+
MaxOrderIndex,
|
|
28
|
+
MaxOrderNonce,
|
|
29
|
+
MaxOrderPrice,
|
|
30
|
+
MaxOrderTriggerPrice,
|
|
31
|
+
MaxPerpsMarketIndex,
|
|
32
|
+
MaxPoolEntryUSDC,
|
|
33
|
+
MaxPoolShares,
|
|
34
|
+
MaxPoolSharesToMintOrBurn,
|
|
35
|
+
MaxSpotMarketIndex,
|
|
36
|
+
MaxTimestamp,
|
|
37
|
+
MaxTransferAmount,
|
|
38
|
+
MaxWithdrawalAmount,
|
|
39
|
+
MinAccountIndex,
|
|
40
|
+
MinApiKeyIndex,
|
|
41
|
+
MinAssetIndex,
|
|
42
|
+
MinClientOrderIndex,
|
|
43
|
+
MinInitialTotalShares,
|
|
44
|
+
MinMarketIndex,
|
|
45
|
+
MinNonce,
|
|
46
|
+
MinOrderBaseAmount,
|
|
47
|
+
MinOrderCancelAllPeriod,
|
|
48
|
+
MinOrderExpiry,
|
|
49
|
+
MinOrderExpiryPeriod,
|
|
50
|
+
MinOrderIndex,
|
|
51
|
+
MinOrderNonce,
|
|
52
|
+
MinOrderPrice,
|
|
53
|
+
MinOrderTriggerPrice,
|
|
54
|
+
MinPerpsMarketIndex,
|
|
55
|
+
MinPoolSharesToMintOrBurn,
|
|
56
|
+
MinSpotMarketIndex,
|
|
57
|
+
MinSubAccountIndex,
|
|
58
|
+
MinTransferAmount,
|
|
59
|
+
MinWithdrawalAmount,
|
|
60
|
+
NativeAssetIndex,
|
|
61
|
+
NilAssetIndex,
|
|
62
|
+
NilClientOrderIndex,
|
|
63
|
+
NilMarketIndex,
|
|
64
|
+
NilOrderBaseAmount,
|
|
65
|
+
NilOrderExpiry,
|
|
66
|
+
NilOrderIndex,
|
|
67
|
+
NilOrderPrice,
|
|
68
|
+
NilOrderTriggerPrice,
|
|
69
|
+
OneUSDC,
|
|
70
|
+
OrderTimeInForce,
|
|
71
|
+
OrderType,
|
|
72
|
+
PositionMarginMode,
|
|
73
|
+
ShareTick,
|
|
74
|
+
TxType,
|
|
75
|
+
USDCAssetIndex
|
|
76
|
+
} from "./chunk-4UDAN2FX.js";
|
|
77
|
+
import "./chunk-C7OTZCGC.js";
|
|
78
|
+
import "./chunk-JTP6DTDN.js";
|
|
79
|
+
import {
|
|
80
|
+
ExchangeClient
|
|
81
|
+
} from "./chunk-NOREYPFC.js";
|
|
82
|
+
import "./chunk-DCKMNDS3.js";
|
|
83
|
+
import "./chunk-FJJWUBKM.js";
|
|
84
|
+
import "./chunk-JNTYHWDJ.js";
|
|
85
|
+
import "./chunk-76SPKVHT.js";
|
|
86
|
+
import "./chunk-VW77SNCY.js";
|
|
87
|
+
import "./chunk-UORSMHI2.js";
|
|
88
|
+
import "./chunk-5WEMEUUI.js";
|
|
89
|
+
import "./chunk-SA6CXVP6.js";
|
|
90
|
+
import {
|
|
91
|
+
InfoClient
|
|
92
|
+
} from "./chunk-AHCELOTZ.js";
|
|
93
|
+
import "./chunk-MO4PMYTS.js";
|
|
94
|
+
import "./chunk-GYABNQWH.js";
|
|
95
|
+
import "./chunk-K7ZQARON.js";
|
|
96
|
+
import "./chunk-77QSYYAW.js";
|
|
97
|
+
import "./chunk-ZWYNOAL3.js";
|
|
98
|
+
import "./chunk-3OSXAPI3.js";
|
|
99
|
+
import "./chunk-BXMXWCMD.js";
|
|
100
|
+
import "./chunk-IXF4QUC6.js";
|
|
101
|
+
import "./chunk-NOFXPTLU.js";
|
|
102
|
+
import "./chunk-PPU2VWXX.js";
|
|
103
|
+
import "./chunk-TELGVFFP.js";
|
|
104
|
+
import "./chunk-S4OE3IME.js";
|
|
105
|
+
import "./chunk-A2APDMN3.js";
|
|
106
|
+
import "./chunk-JTE4UBAX.js";
|
|
107
|
+
import "./chunk-BKJGDTS3.js";
|
|
108
|
+
import "./chunk-BES73YEF.js";
|
|
109
|
+
import "./chunk-FODEDUT4.js";
|
|
110
|
+
import "./chunk-MZCKU6FF.js";
|
|
111
|
+
import "./chunk-4VAZ7ZA2.js";
|
|
112
|
+
import "./chunk-472ULOSN.js";
|
|
113
|
+
import "./chunk-YWN57BJF.js";
|
|
114
|
+
import {
|
|
115
|
+
InfoPrivateClient
|
|
116
|
+
} from "./chunk-TM3CNEVD.js";
|
|
117
|
+
import "./chunk-TSHQJVUP.js";
|
|
118
|
+
import "./chunk-OPSCTD6W.js";
|
|
119
|
+
import "./chunk-467IJZRE.js";
|
|
120
|
+
import "./chunk-LYNZNSLV.js";
|
|
121
|
+
import "./chunk-3Y76Q54G.js";
|
|
122
|
+
import "./chunk-PEALQBVN.js";
|
|
123
|
+
import "./chunk-ZDNQFOED.js";
|
|
124
|
+
import "./chunk-QXGO7TJ2.js";
|
|
125
|
+
import "./chunk-RGVFMOQI.js";
|
|
126
|
+
import "./chunk-NRZGE42C.js";
|
|
127
|
+
import "./chunk-TPGO4YD3.js";
|
|
128
|
+
import "./chunk-O3PA6HV2.js";
|
|
129
|
+
import "./chunk-W5VY4TWP.js";
|
|
130
|
+
import "./chunk-AMNDQGYL.js";
|
|
131
|
+
import "./chunk-XQGOXCT4.js";
|
|
132
|
+
import "./chunk-4LNJ2577.js";
|
|
133
|
+
import "./chunk-5P5CPB5A.js";
|
|
134
|
+
import "./chunk-P32EPCEM.js";
|
|
135
|
+
import "./chunk-EBSW5ZYW.js";
|
|
136
|
+
import {
|
|
137
|
+
L1BridgeClient
|
|
138
|
+
} from "./chunk-Q2MT7FZ7.js";
|
|
139
|
+
import {
|
|
140
|
+
WsClient
|
|
141
|
+
} from "./chunk-6NEX2QS6.js";
|
|
142
|
+
import "./chunk-3SKO62BC.js";
|
|
143
|
+
import {
|
|
144
|
+
WasmSigner
|
|
145
|
+
} from "./chunk-QILV2ZMV.js";
|
|
146
|
+
export {
|
|
147
|
+
ApiMaxOrderType,
|
|
148
|
+
AssetMarginMode,
|
|
149
|
+
AssetRouteType,
|
|
150
|
+
CancelAllOrdersTimeInForce,
|
|
151
|
+
ExchangeClient,
|
|
152
|
+
FeeTick,
|
|
153
|
+
GroupingType,
|
|
154
|
+
InfoClient,
|
|
155
|
+
InfoPrivateClient,
|
|
156
|
+
InitialPoolShareValue,
|
|
157
|
+
L1BridgeClient,
|
|
158
|
+
MarginFractionTick,
|
|
159
|
+
MarginUpdateDirection,
|
|
160
|
+
MaxAccountIndex,
|
|
161
|
+
MaxApiKeyIndex,
|
|
162
|
+
MaxAssetIndex,
|
|
163
|
+
MaxBurntShareUSDCValue,
|
|
164
|
+
MaxClientOrderIndex,
|
|
165
|
+
MaxExchangeUSDC,
|
|
166
|
+
MaxGroupedOrderCount,
|
|
167
|
+
MaxInitialTotalShares,
|
|
168
|
+
MaxInvestedPublicPoolCount,
|
|
169
|
+
MaxMasterAccountIndex,
|
|
170
|
+
MaxOrderBaseAmount,
|
|
171
|
+
MaxOrderCancelAllPeriod,
|
|
172
|
+
MaxOrderExpiry,
|
|
173
|
+
MaxOrderExpiryPeriod,
|
|
174
|
+
MaxOrderIndex,
|
|
175
|
+
MaxOrderNonce,
|
|
176
|
+
MaxOrderPrice,
|
|
177
|
+
MaxOrderTriggerPrice,
|
|
178
|
+
MaxPerpsMarketIndex,
|
|
179
|
+
MaxPoolEntryUSDC,
|
|
180
|
+
MaxPoolShares,
|
|
181
|
+
MaxPoolSharesToMintOrBurn,
|
|
182
|
+
MaxSpotMarketIndex,
|
|
183
|
+
MaxTimestamp,
|
|
184
|
+
MaxTransferAmount,
|
|
185
|
+
MaxWithdrawalAmount,
|
|
186
|
+
MinAccountIndex,
|
|
187
|
+
MinApiKeyIndex,
|
|
188
|
+
MinAssetIndex,
|
|
189
|
+
MinClientOrderIndex,
|
|
190
|
+
MinInitialTotalShares,
|
|
191
|
+
MinMarketIndex,
|
|
192
|
+
MinNonce,
|
|
193
|
+
MinOrderBaseAmount,
|
|
194
|
+
MinOrderCancelAllPeriod,
|
|
195
|
+
MinOrderExpiry,
|
|
196
|
+
MinOrderExpiryPeriod,
|
|
197
|
+
MinOrderIndex,
|
|
198
|
+
MinOrderNonce,
|
|
199
|
+
MinOrderPrice,
|
|
200
|
+
MinOrderTriggerPrice,
|
|
201
|
+
MinPerpsMarketIndex,
|
|
202
|
+
MinPoolSharesToMintOrBurn,
|
|
203
|
+
MinSpotMarketIndex,
|
|
204
|
+
MinSubAccountIndex,
|
|
205
|
+
MinTransferAmount,
|
|
206
|
+
MinWithdrawalAmount,
|
|
207
|
+
NativeAssetIndex,
|
|
208
|
+
NilAssetIndex,
|
|
209
|
+
NilClientOrderIndex,
|
|
210
|
+
NilMarketIndex,
|
|
211
|
+
NilOrderBaseAmount,
|
|
212
|
+
NilOrderExpiry,
|
|
213
|
+
NilOrderIndex,
|
|
214
|
+
NilOrderPrice,
|
|
215
|
+
NilOrderTriggerPrice,
|
|
216
|
+
OneUSDC,
|
|
217
|
+
OrderTimeInForce,
|
|
218
|
+
OrderType,
|
|
219
|
+
PositionMarginMode,
|
|
220
|
+
ShareTick,
|
|
221
|
+
TxType,
|
|
222
|
+
USDCAssetIndex,
|
|
223
|
+
WasmSigner,
|
|
224
|
+
WsClient
|
|
225
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { APIKeyResponse, AuthTokenResponse, CreateOrderRequest, ErrorResponse, TxResponse, WasmConfig, WasmSigner } from './wasm-signer.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { APIKeyResponse, AuthTokenResponse, CreateOrderRequest, ErrorResponse, TxResponse, WasmConfig, WasmSigner } from './wasm-signer.js';
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
interface WasmConfig {
|
|
2
|
+
url?: string;
|
|
3
|
+
chainId?: number;
|
|
4
|
+
wasmPath?: string;
|
|
5
|
+
wasmExecPath?: string;
|
|
6
|
+
}
|
|
7
|
+
interface TxResponse {
|
|
8
|
+
txType?: string;
|
|
9
|
+
txInfo?: string;
|
|
10
|
+
txHash?: string;
|
|
11
|
+
messageToSign?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AuthTokenResponse {
|
|
15
|
+
authToken?: string;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
interface APIKeyResponse {
|
|
19
|
+
privateKey?: string;
|
|
20
|
+
publicKey?: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
interface ErrorResponse {
|
|
24
|
+
error?: string;
|
|
25
|
+
}
|
|
26
|
+
interface CreateOrderRequest {
|
|
27
|
+
MarketIndex: number;
|
|
28
|
+
ClientOrderIndex: number;
|
|
29
|
+
BaseAmount: number;
|
|
30
|
+
Price: number;
|
|
31
|
+
IsAsk: number;
|
|
32
|
+
Type: number;
|
|
33
|
+
TimeInForce: number;
|
|
34
|
+
ReduceOnly: number;
|
|
35
|
+
TriggerPrice: number;
|
|
36
|
+
OrderExpiry: number;
|
|
37
|
+
}
|
|
38
|
+
declare global {
|
|
39
|
+
interface Window {
|
|
40
|
+
Go: any;
|
|
41
|
+
GenerateAPIKey: (seed: string) => APIKeyResponse;
|
|
42
|
+
CreateClient: (url: string, privateKey: string, chainId: number, apiKeyIndex: number, accountIndex: number) => ErrorResponse;
|
|
43
|
+
CheckClient: (apiKeyIndex: number, accountIndex: number) => ErrorResponse;
|
|
44
|
+
CreateAuthToken: (deadline: number, apiKeyIndex: number, accountIndex: number) => AuthTokenResponse;
|
|
45
|
+
SignChangePubKey: (pubKeyHex: string, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
46
|
+
SignCreateOrder: (marketIndex: number, clientOrderIndex: number, baseAmount: number, price: number, isAsk: number, orderType: number, timeInForce: number, reduceOnly: number, triggerPrice: number, orderExpiry: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
47
|
+
SignCancelOrder: (marketIndex: number, orderIndex: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
48
|
+
SignCancelAllOrders: (timeInForce: number, time: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
49
|
+
SignTransfer: (toAccountIndex: number, assetIndex: number, fromRouterType: number, toRouterType: number, amount: number, usdcFee: number, memo: string, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
50
|
+
SignWithdraw: (usdcAmount: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
51
|
+
SignUpdateLeverage: (marketIndex: number, fraction: number, marginMode: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
52
|
+
SignModifyOrder: (marketIndex: number, index: number, baseAmount: number, price: number, triggerPrice: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
53
|
+
SignCreateSubAccount: (nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
54
|
+
SignCreatePublicPool: (operatorFee: number, initialTotalShares: number, minOperatorShareRate: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
55
|
+
SignUpdatePublicPool: (publicPoolIndex: number, status: number, operatorFee: number, minOperatorShareRate: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
56
|
+
SignMintShares: (publicPoolIndex: number, shareAmount: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
57
|
+
SignBurnShares: (publicPoolIndex: number, shareAmount: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
58
|
+
SignUpdateMargin: (marketIndex: number, usdcAmount: number, direction: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
59
|
+
SignCreateGroupedOrders: (groupingType: number, orders: CreateOrderRequest[], nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
declare class WasmSigner {
|
|
63
|
+
private readonly url;
|
|
64
|
+
private readonly chainId;
|
|
65
|
+
private readonly wasmPath;
|
|
66
|
+
private readonly wasmExecPath;
|
|
67
|
+
private apiKeyIndex;
|
|
68
|
+
private accountIndex;
|
|
69
|
+
private privateKey;
|
|
70
|
+
constructor(config?: WasmConfig);
|
|
71
|
+
initialize(): Promise<void>;
|
|
72
|
+
generateAPIKey(seed: string): APIKeyResponse;
|
|
73
|
+
setAccount(privateKey: string, apiKeyIndex: number, accountIndex: number): void;
|
|
74
|
+
getAccount(): {
|
|
75
|
+
privateKey: string;
|
|
76
|
+
apiKeyIndex: number;
|
|
77
|
+
accountIndex: number;
|
|
78
|
+
};
|
|
79
|
+
createClient(): ErrorResponse;
|
|
80
|
+
checkClient(): ErrorResponse;
|
|
81
|
+
createAuthToken(deadline: number): AuthTokenResponse;
|
|
82
|
+
signChangePubKey(pubKeyHex: string, nonce: number): TxResponse;
|
|
83
|
+
signCreateOrder(marketIndex: number, clientOrderIndex: number, baseAmount: number, price: number, isAsk: number, orderType: number, timeInForce: number, reduceOnly: number, triggerPrice: number, orderExpiry: number, nonce: number): TxResponse;
|
|
84
|
+
signCancelOrder(marketIndex: number, orderIndex: number, nonce: number): TxResponse;
|
|
85
|
+
signCancelAllOrders(timeInForce: number, time: number, nonce: number): TxResponse;
|
|
86
|
+
signTransfer(toAccountIndex: number, assetIndex: number, fromRouterType: number, toRouterType: number, amount: number, usdcFee: number, memo: string, nonce: number): TxResponse;
|
|
87
|
+
signWithdraw(usdcAmount: number, nonce: number): TxResponse;
|
|
88
|
+
signUpdateLeverage(marketIndex: number, fraction: number, marginMode: number, nonce: number): TxResponse;
|
|
89
|
+
signModifyOrder(marketIndex: number, index: number, baseAmount: number, price: number, triggerPrice: number, nonce: number): TxResponse;
|
|
90
|
+
signCreateSubAccount(nonce: number): TxResponse;
|
|
91
|
+
signCreatePublicPool(operatorFee: number, initialTotalShares: number, minOperatorShareRate: number, nonce: number): TxResponse;
|
|
92
|
+
signUpdatePublicPool(publicPoolIndex: number, status: number, operatorFee: number, minOperatorShareRate: number, nonce: number): TxResponse;
|
|
93
|
+
signMintShares(publicPoolIndex: number, shareAmount: number, nonce: number): TxResponse;
|
|
94
|
+
signBurnShares(publicPoolIndex: number, shareAmount: number, nonce: number): TxResponse;
|
|
95
|
+
signUpdateMargin(marketIndex: number, usdcAmount: number, direction: number, nonce: number): TxResponse;
|
|
96
|
+
signCreateGroupedOrders(groupingType: number, orders: CreateOrderRequest[], nonce: number): TxResponse;
|
|
97
|
+
private loadScript;
|
|
98
|
+
private loadWasm;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { type APIKeyResponse, type AuthTokenResponse, type CreateOrderRequest, type ErrorResponse, type TxResponse, type WasmConfig, WasmSigner };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
interface WasmConfig {
|
|
2
|
+
url?: string;
|
|
3
|
+
chainId?: number;
|
|
4
|
+
wasmPath?: string;
|
|
5
|
+
wasmExecPath?: string;
|
|
6
|
+
}
|
|
7
|
+
interface TxResponse {
|
|
8
|
+
txType?: string;
|
|
9
|
+
txInfo?: string;
|
|
10
|
+
txHash?: string;
|
|
11
|
+
messageToSign?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AuthTokenResponse {
|
|
15
|
+
authToken?: string;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
interface APIKeyResponse {
|
|
19
|
+
privateKey?: string;
|
|
20
|
+
publicKey?: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
interface ErrorResponse {
|
|
24
|
+
error?: string;
|
|
25
|
+
}
|
|
26
|
+
interface CreateOrderRequest {
|
|
27
|
+
MarketIndex: number;
|
|
28
|
+
ClientOrderIndex: number;
|
|
29
|
+
BaseAmount: number;
|
|
30
|
+
Price: number;
|
|
31
|
+
IsAsk: number;
|
|
32
|
+
Type: number;
|
|
33
|
+
TimeInForce: number;
|
|
34
|
+
ReduceOnly: number;
|
|
35
|
+
TriggerPrice: number;
|
|
36
|
+
OrderExpiry: number;
|
|
37
|
+
}
|
|
38
|
+
declare global {
|
|
39
|
+
interface Window {
|
|
40
|
+
Go: any;
|
|
41
|
+
GenerateAPIKey: (seed: string) => APIKeyResponse;
|
|
42
|
+
CreateClient: (url: string, privateKey: string, chainId: number, apiKeyIndex: number, accountIndex: number) => ErrorResponse;
|
|
43
|
+
CheckClient: (apiKeyIndex: number, accountIndex: number) => ErrorResponse;
|
|
44
|
+
CreateAuthToken: (deadline: number, apiKeyIndex: number, accountIndex: number) => AuthTokenResponse;
|
|
45
|
+
SignChangePubKey: (pubKeyHex: string, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
46
|
+
SignCreateOrder: (marketIndex: number, clientOrderIndex: number, baseAmount: number, price: number, isAsk: number, orderType: number, timeInForce: number, reduceOnly: number, triggerPrice: number, orderExpiry: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
47
|
+
SignCancelOrder: (marketIndex: number, orderIndex: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
48
|
+
SignCancelAllOrders: (timeInForce: number, time: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
49
|
+
SignTransfer: (toAccountIndex: number, assetIndex: number, fromRouterType: number, toRouterType: number, amount: number, usdcFee: number, memo: string, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
50
|
+
SignWithdraw: (usdcAmount: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
51
|
+
SignUpdateLeverage: (marketIndex: number, fraction: number, marginMode: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
52
|
+
SignModifyOrder: (marketIndex: number, index: number, baseAmount: number, price: number, triggerPrice: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
53
|
+
SignCreateSubAccount: (nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
54
|
+
SignCreatePublicPool: (operatorFee: number, initialTotalShares: number, minOperatorShareRate: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
55
|
+
SignUpdatePublicPool: (publicPoolIndex: number, status: number, operatorFee: number, minOperatorShareRate: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
56
|
+
SignMintShares: (publicPoolIndex: number, shareAmount: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
57
|
+
SignBurnShares: (publicPoolIndex: number, shareAmount: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
58
|
+
SignUpdateMargin: (marketIndex: number, usdcAmount: number, direction: number, nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
59
|
+
SignCreateGroupedOrders: (groupingType: number, orders: CreateOrderRequest[], nonce: number, apiKeyIndex: number, accountIndex: number) => TxResponse;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
declare class WasmSigner {
|
|
63
|
+
private readonly url;
|
|
64
|
+
private readonly chainId;
|
|
65
|
+
private readonly wasmPath;
|
|
66
|
+
private readonly wasmExecPath;
|
|
67
|
+
private apiKeyIndex;
|
|
68
|
+
private accountIndex;
|
|
69
|
+
private privateKey;
|
|
70
|
+
constructor(config?: WasmConfig);
|
|
71
|
+
initialize(): Promise<void>;
|
|
72
|
+
generateAPIKey(seed: string): APIKeyResponse;
|
|
73
|
+
setAccount(privateKey: string, apiKeyIndex: number, accountIndex: number): void;
|
|
74
|
+
getAccount(): {
|
|
75
|
+
privateKey: string;
|
|
76
|
+
apiKeyIndex: number;
|
|
77
|
+
accountIndex: number;
|
|
78
|
+
};
|
|
79
|
+
createClient(): ErrorResponse;
|
|
80
|
+
checkClient(): ErrorResponse;
|
|
81
|
+
createAuthToken(deadline: number): AuthTokenResponse;
|
|
82
|
+
signChangePubKey(pubKeyHex: string, nonce: number): TxResponse;
|
|
83
|
+
signCreateOrder(marketIndex: number, clientOrderIndex: number, baseAmount: number, price: number, isAsk: number, orderType: number, timeInForce: number, reduceOnly: number, triggerPrice: number, orderExpiry: number, nonce: number): TxResponse;
|
|
84
|
+
signCancelOrder(marketIndex: number, orderIndex: number, nonce: number): TxResponse;
|
|
85
|
+
signCancelAllOrders(timeInForce: number, time: number, nonce: number): TxResponse;
|
|
86
|
+
signTransfer(toAccountIndex: number, assetIndex: number, fromRouterType: number, toRouterType: number, amount: number, usdcFee: number, memo: string, nonce: number): TxResponse;
|
|
87
|
+
signWithdraw(usdcAmount: number, nonce: number): TxResponse;
|
|
88
|
+
signUpdateLeverage(marketIndex: number, fraction: number, marginMode: number, nonce: number): TxResponse;
|
|
89
|
+
signModifyOrder(marketIndex: number, index: number, baseAmount: number, price: number, triggerPrice: number, nonce: number): TxResponse;
|
|
90
|
+
signCreateSubAccount(nonce: number): TxResponse;
|
|
91
|
+
signCreatePublicPool(operatorFee: number, initialTotalShares: number, minOperatorShareRate: number, nonce: number): TxResponse;
|
|
92
|
+
signUpdatePublicPool(publicPoolIndex: number, status: number, operatorFee: number, minOperatorShareRate: number, nonce: number): TxResponse;
|
|
93
|
+
signMintShares(publicPoolIndex: number, shareAmount: number, nonce: number): TxResponse;
|
|
94
|
+
signBurnShares(publicPoolIndex: number, shareAmount: number, nonce: number): TxResponse;
|
|
95
|
+
signUpdateMargin(marketIndex: number, usdcAmount: number, direction: number, nonce: number): TxResponse;
|
|
96
|
+
signCreateGroupedOrders(groupingType: number, orders: CreateOrderRequest[], nonce: number): TxResponse;
|
|
97
|
+
private loadScript;
|
|
98
|
+
private loadWasm;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export { type APIKeyResponse, type AuthTokenResponse, type CreateOrderRequest, type ErrorResponse, type TxResponse, type WasmConfig, WasmSigner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('../chunk-VDBWTSBC.cjs');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface L1DepositParams {
|
|
2
|
+
ethPrivateKey: string;
|
|
3
|
+
usdcAmount: number;
|
|
4
|
+
l2AccountIndex: number;
|
|
5
|
+
rpcUrl?: string;
|
|
6
|
+
gasPrice?: string;
|
|
7
|
+
gasLimit?: number;
|
|
8
|
+
}
|
|
9
|
+
interface L1DepositResult {
|
|
10
|
+
l1TxHash: string;
|
|
11
|
+
l2AccountIndex: number;
|
|
12
|
+
amount: string;
|
|
13
|
+
status: "pending" | "completed" | "failed";
|
|
14
|
+
blockNumber?: number;
|
|
15
|
+
gasUsed?: string;
|
|
16
|
+
}
|
|
17
|
+
interface L1BridgeConfig {
|
|
18
|
+
l1BridgeContract: string;
|
|
19
|
+
usdcContract: string;
|
|
20
|
+
rpcUrl: string;
|
|
21
|
+
chainId: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type { L1BridgeConfig, L1DepositParams, L1DepositResult };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface L1DepositParams {
|
|
2
|
+
ethPrivateKey: string;
|
|
3
|
+
usdcAmount: number;
|
|
4
|
+
l2AccountIndex: number;
|
|
5
|
+
rpcUrl?: string;
|
|
6
|
+
gasPrice?: string;
|
|
7
|
+
gasLimit?: number;
|
|
8
|
+
}
|
|
9
|
+
interface L1DepositResult {
|
|
10
|
+
l1TxHash: string;
|
|
11
|
+
l2AccountIndex: number;
|
|
12
|
+
amount: string;
|
|
13
|
+
status: "pending" | "completed" | "failed";
|
|
14
|
+
blockNumber?: number;
|
|
15
|
+
gasUsed?: string;
|
|
16
|
+
}
|
|
17
|
+
interface L1BridgeConfig {
|
|
18
|
+
l1BridgeContract: string;
|
|
19
|
+
usdcContract: string;
|
|
20
|
+
rpcUrl: string;
|
|
21
|
+
chainId: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type { L1BridgeConfig, L1DepositParams, L1DepositResult };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../chunk-NSFKW27X.js";
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
var _chunkVWX5CLM4cjs = require('../chunk-VWX5CLM4.cjs');
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
exports.ApiMaxOrderType = _chunkVWX5CLM4cjs.ApiMaxOrderType; exports.AssetMarginMode = _chunkVWX5CLM4cjs.AssetMarginMode; exports.AssetRouteType = _chunkVWX5CLM4cjs.AssetRouteType; exports.CancelAllOrdersTimeInForce = _chunkVWX5CLM4cjs.CancelAllOrdersTimeInForce; exports.FeeTick = _chunkVWX5CLM4cjs.FeeTick; exports.GroupingType = _chunkVWX5CLM4cjs.GroupingType; exports.InitialPoolShareValue = _chunkVWX5CLM4cjs.InitialPoolShareValue; exports.MarginFractionTick = _chunkVWX5CLM4cjs.MarginFractionTick; exports.MarginUpdateDirection = _chunkVWX5CLM4cjs.MarginUpdateDirection; exports.MaxAccountIndex = _chunkVWX5CLM4cjs.MaxAccountIndex; exports.MaxApiKeyIndex = _chunkVWX5CLM4cjs.MaxApiKeyIndex; exports.MaxAssetIndex = _chunkVWX5CLM4cjs.MaxAssetIndex; exports.MaxBurntShareUSDCValue = _chunkVWX5CLM4cjs.MaxBurntShareUSDCValue; exports.MaxClientOrderIndex = _chunkVWX5CLM4cjs.MaxClientOrderIndex; exports.MaxExchangeUSDC = _chunkVWX5CLM4cjs.MaxExchangeUSDC; exports.MaxGroupedOrderCount = _chunkVWX5CLM4cjs.MaxGroupedOrderCount; exports.MaxInitialTotalShares = _chunkVWX5CLM4cjs.MaxInitialTotalShares; exports.MaxInvestedPublicPoolCount = _chunkVWX5CLM4cjs.MaxInvestedPublicPoolCount; exports.MaxMasterAccountIndex = _chunkVWX5CLM4cjs.MaxMasterAccountIndex; exports.MaxOrderBaseAmount = _chunkVWX5CLM4cjs.MaxOrderBaseAmount; exports.MaxOrderCancelAllPeriod = _chunkVWX5CLM4cjs.MaxOrderCancelAllPeriod; exports.MaxOrderExpiry = _chunkVWX5CLM4cjs.MaxOrderExpiry; exports.MaxOrderExpiryPeriod = _chunkVWX5CLM4cjs.MaxOrderExpiryPeriod; exports.MaxOrderIndex = _chunkVWX5CLM4cjs.MaxOrderIndex; exports.MaxOrderNonce = _chunkVWX5CLM4cjs.MaxOrderNonce; exports.MaxOrderPrice = _chunkVWX5CLM4cjs.MaxOrderPrice; exports.MaxOrderTriggerPrice = _chunkVWX5CLM4cjs.MaxOrderTriggerPrice; exports.MaxPerpsMarketIndex = _chunkVWX5CLM4cjs.MaxPerpsMarketIndex; exports.MaxPoolEntryUSDC = _chunkVWX5CLM4cjs.MaxPoolEntryUSDC; exports.MaxPoolShares = _chunkVWX5CLM4cjs.MaxPoolShares; exports.MaxPoolSharesToMintOrBurn = _chunkVWX5CLM4cjs.MaxPoolSharesToMintOrBurn; exports.MaxSpotMarketIndex = _chunkVWX5CLM4cjs.MaxSpotMarketIndex; exports.MaxTimestamp = _chunkVWX5CLM4cjs.MaxTimestamp; exports.MaxTransferAmount = _chunkVWX5CLM4cjs.MaxTransferAmount; exports.MaxWithdrawalAmount = _chunkVWX5CLM4cjs.MaxWithdrawalAmount; exports.MinAccountIndex = _chunkVWX5CLM4cjs.MinAccountIndex; exports.MinApiKeyIndex = _chunkVWX5CLM4cjs.MinApiKeyIndex; exports.MinAssetIndex = _chunkVWX5CLM4cjs.MinAssetIndex; exports.MinClientOrderIndex = _chunkVWX5CLM4cjs.MinClientOrderIndex; exports.MinInitialTotalShares = _chunkVWX5CLM4cjs.MinInitialTotalShares; exports.MinMarketIndex = _chunkVWX5CLM4cjs.MinMarketIndex; exports.MinNonce = _chunkVWX5CLM4cjs.MinNonce; exports.MinOrderBaseAmount = _chunkVWX5CLM4cjs.MinOrderBaseAmount; exports.MinOrderCancelAllPeriod = _chunkVWX5CLM4cjs.MinOrderCancelAllPeriod; exports.MinOrderExpiry = _chunkVWX5CLM4cjs.MinOrderExpiry; exports.MinOrderExpiryPeriod = _chunkVWX5CLM4cjs.MinOrderExpiryPeriod; exports.MinOrderIndex = _chunkVWX5CLM4cjs.MinOrderIndex; exports.MinOrderNonce = _chunkVWX5CLM4cjs.MinOrderNonce; exports.MinOrderPrice = _chunkVWX5CLM4cjs.MinOrderPrice; exports.MinOrderTriggerPrice = _chunkVWX5CLM4cjs.MinOrderTriggerPrice; exports.MinPerpsMarketIndex = _chunkVWX5CLM4cjs.MinPerpsMarketIndex; exports.MinPoolSharesToMintOrBurn = _chunkVWX5CLM4cjs.MinPoolSharesToMintOrBurn; exports.MinSpotMarketIndex = _chunkVWX5CLM4cjs.MinSpotMarketIndex; exports.MinSubAccountIndex = _chunkVWX5CLM4cjs.MinSubAccountIndex; exports.MinTransferAmount = _chunkVWX5CLM4cjs.MinTransferAmount; exports.MinWithdrawalAmount = _chunkVWX5CLM4cjs.MinWithdrawalAmount; exports.NativeAssetIndex = _chunkVWX5CLM4cjs.NativeAssetIndex; exports.NilAssetIndex = _chunkVWX5CLM4cjs.NilAssetIndex; exports.NilClientOrderIndex = _chunkVWX5CLM4cjs.NilClientOrderIndex; exports.NilMarketIndex = _chunkVWX5CLM4cjs.NilMarketIndex; exports.NilOrderBaseAmount = _chunkVWX5CLM4cjs.NilOrderBaseAmount; exports.NilOrderExpiry = _chunkVWX5CLM4cjs.NilOrderExpiry; exports.NilOrderIndex = _chunkVWX5CLM4cjs.NilOrderIndex; exports.NilOrderPrice = _chunkVWX5CLM4cjs.NilOrderPrice; exports.NilOrderTriggerPrice = _chunkVWX5CLM4cjs.NilOrderTriggerPrice; exports.OneUSDC = _chunkVWX5CLM4cjs.OneUSDC; exports.OrderTimeInForce = _chunkVWX5CLM4cjs.OrderTimeInForce; exports.OrderType = _chunkVWX5CLM4cjs.OrderType; exports.PositionMarginMode = _chunkVWX5CLM4cjs.PositionMarginMode; exports.ShareTick = _chunkVWX5CLM4cjs.ShareTick; exports.TxType = _chunkVWX5CLM4cjs.TxType; exports.USDCAssetIndex = _chunkVWX5CLM4cjs.USDCAssetIndex;
|