@drift-labs/common 1.0.0
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/lib/Config.d.ts +26 -0
- package/lib/Config.js +29 -0
- package/lib/Config.js.map +1 -0
- package/lib/EnvironmentConstants.d.ts +40 -0
- package/lib/EnvironmentConstants.js +64 -0
- package/lib/EnvironmentConstants.js.map +1 -0
- package/lib/actions/actionHelpers/accountDeletionHelpers.d.ts +16 -0
- package/lib/actions/actionHelpers/accountDeletionHelpers.js +151 -0
- package/lib/actions/actionHelpers/accountDeletionHelpers.js.map +1 -0
- package/lib/actions/actionHelpers/actionHelpers.d.ts +13 -0
- package/lib/actions/actionHelpers/actionHelpers.js +8 -0
- package/lib/actions/actionHelpers/actionHelpers.js.map +1 -0
- package/lib/chartConstants.d.ts +2 -0
- package/lib/chartConstants.js +14 -0
- package/lib/chartConstants.js.map +1 -0
- package/lib/clients/candleClient.d.ts +74 -0
- package/lib/clients/candleClient.js +364 -0
- package/lib/clients/candleClient.js.map +1 -0
- package/lib/clients/dataApiWsClient.d.ts +33 -0
- package/lib/clients/dataApiWsClient.js +118 -0
- package/lib/clients/dataApiWsClient.js.map +1 -0
- package/lib/clients/index.d.ts +1 -0
- package/lib/clients/index.js +19 -0
- package/lib/clients/index.js.map +1 -0
- package/lib/clients/marketDataFeed.d.ts +42 -0
- package/lib/clients/marketDataFeed.js +422 -0
- package/lib/clients/marketDataFeed.js.map +1 -0
- package/lib/clients/redisClient.d.ts +89 -0
- package/lib/clients/redisClient.js +647 -0
- package/lib/clients/redisClient.js.map +1 -0
- package/lib/clients/swiftClient.d.ts +57 -0
- package/lib/clients/swiftClient.js +289 -0
- package/lib/clients/swiftClient.js.map +1 -0
- package/lib/clients/tvFeed.d.ts +63 -0
- package/lib/clients/tvFeed.js +351 -0
- package/lib/clients/tvFeed.js.map +1 -0
- package/lib/common-ui-utils/commonUiUtils.d.ts +211 -0
- package/lib/common-ui-utils/commonUiUtils.js +624 -0
- package/lib/common-ui-utils/commonUiUtils.js.map +1 -0
- package/lib/common-ui-utils/index.d.ts +6 -0
- package/lib/common-ui-utils/index.js +23 -0
- package/lib/common-ui-utils/index.js.map +1 -0
- package/lib/common-ui-utils/market.d.ts +27 -0
- package/lib/common-ui-utils/market.js +80 -0
- package/lib/common-ui-utils/market.js.map +1 -0
- package/lib/common-ui-utils/order.d.ts +11 -0
- package/lib/common-ui-utils/order.js +161 -0
- package/lib/common-ui-utils/order.js.map +1 -0
- package/lib/common-ui-utils/settings/settings.d.ts +51 -0
- package/lib/common-ui-utils/settings/settings.js +84 -0
- package/lib/common-ui-utils/settings/settings.js.map +1 -0
- package/lib/common-ui-utils/trading.d.ts +56 -0
- package/lib/common-ui-utils/trading.js +200 -0
- package/lib/common-ui-utils/trading.js.map +1 -0
- package/lib/common-ui-utils/user.d.ts +13 -0
- package/lib/common-ui-utils/user.js +124 -0
- package/lib/common-ui-utils/user.js.map +1 -0
- package/lib/constants/autogenerated/driftErrors.json +1787 -0
- package/lib/constants/autogenerated/jup-v4-error-codes.json +67 -0
- package/lib/constants/autogenerated/jup-v6-error-codes.json +115 -0
- package/lib/constants/dev.d.ts +15 -0
- package/lib/constants/dev.js +19 -0
- package/lib/constants/dev.js.map +1 -0
- package/lib/constants/geoblockList.d.ts +4 -0
- package/lib/constants/geoblockList.js +32 -0
- package/lib/constants/geoblockList.js.map +1 -0
- package/lib/constants/index.d.ts +9 -0
- package/lib/constants/index.js +26 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/markets.d.ts +1 -0
- package/lib/constants/markets.js +5 -0
- package/lib/constants/markets.js.map +1 -0
- package/lib/constants/misc.d.ts +23 -0
- package/lib/constants/misc.js +27 -0
- package/lib/constants/misc.js.map +1 -0
- package/lib/constants/orders.d.ts +12 -0
- package/lib/constants/orders.js +79 -0
- package/lib/constants/orders.js.map +1 -0
- package/lib/constants/pools.d.ts +5 -0
- package/lib/constants/pools.js +9 -0
- package/lib/constants/pools.js.map +1 -0
- package/lib/constants/predictionMarket.d.ts +3 -0
- package/lib/constants/predictionMarket.js +7 -0
- package/lib/constants/predictionMarket.js.map +1 -0
- package/lib/constants/superstake.d.ts +22 -0
- package/lib/constants/superstake.js +45 -0
- package/lib/constants/superstake.js.map +1 -0
- package/lib/constants/trade.d.ts +2 -0
- package/lib/constants/trade.js +9 -0
- package/lib/constants/trade.js.map +1 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftL2OrderbookManager.d.ts +68 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftL2OrderbookManager.js +146 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftL2OrderbookManager.js.map +1 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftOperations/index.d.ts +204 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftOperations/index.js +530 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftOperations/index.js.map +1 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftOperations/types.d.ts +90 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftOperations/types.js +3 -0
- package/lib/drift/Drift/clients/AuthorityDrift/DriftOperations/types.js.map +1 -0
- package/lib/drift/Drift/clients/AuthorityDrift/SubscriptionManager.d.ts +139 -0
- package/lib/drift/Drift/clients/AuthorityDrift/SubscriptionManager.js +287 -0
- package/lib/drift/Drift/clients/AuthorityDrift/SubscriptionManager.js.map +1 -0
- package/lib/drift/Drift/clients/AuthorityDrift/index.d.ts +242 -0
- package/lib/drift/Drift/clients/AuthorityDrift/index.js +503 -0
- package/lib/drift/Drift/clients/AuthorityDrift/index.js.map +1 -0
- package/lib/drift/Drift/clients/CentralServerDrift.d.ts +91 -0
- package/lib/drift/Drift/clients/CentralServerDrift.js +326 -0
- package/lib/drift/Drift/clients/CentralServerDrift.js.map +1 -0
- package/lib/drift/Drift/clients/index.d.ts +3 -0
- package/lib/drift/Drift/clients/index.js +20 -0
- package/lib/drift/Drift/clients/index.js.map +1 -0
- package/lib/drift/Drift/constants/blockchain.d.ts +24 -0
- package/lib/drift/Drift/constants/blockchain.js +32 -0
- package/lib/drift/Drift/constants/blockchain.js.map +1 -0
- package/lib/drift/Drift/constants/errors.d.ts +6 -0
- package/lib/drift/Drift/constants/errors.js +14 -0
- package/lib/drift/Drift/constants/errors.js.map +1 -0
- package/lib/drift/Drift/constants/index.d.ts +3 -0
- package/lib/drift/Drift/constants/index.js +20 -0
- package/lib/drift/Drift/constants/index.js.map +1 -0
- package/lib/drift/Drift/constants/orderbook.d.ts +7 -0
- package/lib/drift/Drift/constants/orderbook.js +10 -0
- package/lib/drift/Drift/constants/orderbook.js.map +1 -0
- package/lib/drift/Drift/data/PollingDlob.d.ts +154 -0
- package/lib/drift/Drift/data/PollingDlob.js +387 -0
- package/lib/drift/Drift/data/PollingDlob.js.map +1 -0
- package/lib/drift/Drift/data/index.d.ts +1 -0
- package/lib/drift/Drift/data/index.js +18 -0
- package/lib/drift/Drift/data/index.js.map +1 -0
- package/lib/drift/Drift/index.d.ts +4 -0
- package/lib/drift/Drift/index.js +21 -0
- package/lib/drift/Drift/index.js.map +1 -0
- package/lib/drift/Drift/stores/MarkPriceCache.d.ts +27 -0
- package/lib/drift/Drift/stores/MarkPriceCache.js +59 -0
- package/lib/drift/Drift/stores/MarkPriceCache.js.map +1 -0
- package/lib/drift/Drift/stores/OraclePriceCache.d.ts +21 -0
- package/lib/drift/Drift/stores/OraclePriceCache.js +57 -0
- package/lib/drift/Drift/stores/OraclePriceCache.js.map +1 -0
- package/lib/drift/Drift/stores/UserAccountCache.d.ts +49 -0
- package/lib/drift/Drift/stores/UserAccountCache.js +107 -0
- package/lib/drift/Drift/stores/UserAccountCache.js.map +1 -0
- package/lib/drift/Drift/stores/index.d.ts +3 -0
- package/lib/drift/Drift/stores/index.js +20 -0
- package/lib/drift/Drift/stores/index.js.map +1 -0
- package/lib/drift/base/actions/index.d.ts +4 -0
- package/lib/drift/base/actions/index.js +21 -0
- package/lib/drift/base/actions/index.js.map +1 -0
- package/lib/drift/base/actions/perp/index.d.ts +2 -0
- package/lib/drift/base/actions/perp/index.js +19 -0
- package/lib/drift/base/actions/perp/index.js.map +1 -0
- package/lib/drift/base/actions/perp/settleFunding.d.ts +25 -0
- package/lib/drift/base/actions/perp/settleFunding.js +41 -0
- package/lib/drift/base/actions/perp/settleFunding.js.map +1 -0
- package/lib/drift/base/actions/perp/settlePnl.d.ts +35 -0
- package/lib/drift/base/actions/perp/settlePnl.js +44 -0
- package/lib/drift/base/actions/perp/settlePnl.js.map +1 -0
- package/lib/drift/base/actions/spot/borrow.d.ts +1 -0
- package/lib/drift/base/actions/spot/borrow.js +8 -0
- package/lib/drift/base/actions/spot/borrow.js.map +1 -0
- package/lib/drift/base/actions/spot/deposit.d.ts +40 -0
- package/lib/drift/base/actions/spot/deposit.js +82 -0
- package/lib/drift/base/actions/spot/deposit.js.map +1 -0
- package/lib/drift/base/actions/spot/index.d.ts +3 -0
- package/lib/drift/base/actions/spot/index.js +20 -0
- package/lib/drift/base/actions/spot/index.js.map +1 -0
- package/lib/drift/base/actions/spot/withdraw.d.ts +16 -0
- package/lib/drift/base/actions/spot/withdraw.js +39 -0
- package/lib/drift/base/actions/spot/withdraw.js.map +1 -0
- package/lib/drift/base/actions/trade/cancelOrder.d.ts +47 -0
- package/lib/drift/base/actions/trade/cancelOrder.js +55 -0
- package/lib/drift/base/actions/trade/cancelOrder.js.map +1 -0
- package/lib/drift/base/actions/trade/editOrder.d.ts +55 -0
- package/lib/drift/base/actions/trade/editOrder.js +35 -0
- package/lib/drift/base/actions/trade/editOrder.js.map +1 -0
- package/lib/drift/base/actions/trade/index.d.ts +4 -0
- package/lib/drift/base/actions/trade/index.js +21 -0
- package/lib/drift/base/actions/trade/index.js.map +1 -0
- package/lib/drift/base/actions/trade/openPerpOrder/index.d.ts +3 -0
- package/lib/drift/base/actions/trade/openPerpOrder/index.js +20 -0
- package/lib/drift/base/actions/trade/openPerpOrder/index.js.map +1 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openPerpMarketOrder/index.d.ts +84 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openPerpMarketOrder/index.js +293 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openPerpMarketOrder/index.js.map +1 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openPerpNonMarketOrder/index.d.ts +19 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openPerpNonMarketOrder/index.js +161 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openPerpNonMarketOrder/index.js.map +1 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openSwiftOrder/index.d.ts +166 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openSwiftOrder/index.js +156 -0
- package/lib/drift/base/actions/trade/openPerpOrder/openSwiftOrder/index.js.map +1 -0
- package/lib/drift/base/actions/trade/swap.d.ts +62 -0
- package/lib/drift/base/actions/trade/swap.js +60 -0
- package/lib/drift/base/actions/trade/swap.js.map +1 -0
- package/lib/drift/base/actions/user/create.d.ts +75 -0
- package/lib/drift/base/actions/user/create.js +104 -0
- package/lib/drift/base/actions/user/create.js.map +1 -0
- package/lib/drift/base/actions/user/delete.d.ts +47 -0
- package/lib/drift/base/actions/user/delete.js +39 -0
- package/lib/drift/base/actions/user/delete.js.map +1 -0
- package/lib/drift/base/actions/user/index.d.ts +1 -0
- package/lib/drift/base/actions/user/index.js +18 -0
- package/lib/drift/base/actions/user/index.js.map +1 -0
- package/lib/drift/base/constants/accountNames.d.ts +1 -0
- package/lib/drift/base/constants/accountNames.js +13 -0
- package/lib/drift/base/constants/accountNames.js.map +1 -0
- package/lib/drift/base/details/index.d.ts +2 -0
- package/lib/drift/base/details/index.js +19 -0
- package/lib/drift/base/details/index.js.map +1 -0
- package/lib/drift/base/details/market/funding.d.ts +9 -0
- package/lib/drift/base/details/market/funding.js +50 -0
- package/lib/drift/base/details/market/funding.js.map +1 -0
- package/lib/drift/base/details/market/index.d.ts +2 -0
- package/lib/drift/base/details/market/index.js +19 -0
- package/lib/drift/base/details/market/index.js.map +1 -0
- package/lib/drift/base/details/market/openInterest.d.ts +5 -0
- package/lib/drift/base/details/market/openInterest.js +12 -0
- package/lib/drift/base/details/market/openInterest.js.map +1 -0
- package/lib/drift/base/details/user/balances.d.ts +40 -0
- package/lib/drift/base/details/user/balances.js +39 -0
- package/lib/drift/base/details/user/balances.js.map +1 -0
- package/lib/drift/base/details/user/index.d.ts +4 -0
- package/lib/drift/base/details/user/index.js +21 -0
- package/lib/drift/base/details/user/index.js.map +1 -0
- package/lib/drift/base/details/user/marginInfo.d.ts +29 -0
- package/lib/drift/base/details/user/marginInfo.js +49 -0
- package/lib/drift/base/details/user/marginInfo.js.map +1 -0
- package/lib/drift/base/details/user/orders.d.ts +3 -0
- package/lib/drift/base/details/user/orders.js +11 -0
- package/lib/drift/base/details/user/orders.js.map +1 -0
- package/lib/drift/base/details/user/positions.d.ts +70 -0
- package/lib/drift/base/details/user/positions.js +146 -0
- package/lib/drift/base/details/user/positions.js.map +1 -0
- package/lib/drift/cli.d.ts +25 -0
- package/lib/drift/cli.js +900 -0
- package/lib/drift/cli.js.map +1 -0
- package/lib/drift/constants/apiUrls.d.ts +27 -0
- package/lib/drift/constants/apiUrls.js +31 -0
- package/lib/drift/constants/apiUrls.js.map +1 -0
- package/lib/drift/example.d.ts +19 -0
- package/lib/drift/example.js +249 -0
- package/lib/drift/example.js.map +1 -0
- package/lib/drift/index.d.ts +3 -0
- package/lib/drift/index.js +20 -0
- package/lib/drift/index.js.map +1 -0
- package/lib/drift/utils/auctionParamsResponseMapper.d.ts +45 -0
- package/lib/drift/utils/auctionParamsResponseMapper.js +148 -0
- package/lib/drift/utils/auctionParamsResponseMapper.js.map +1 -0
- package/lib/drift/utils/funding.d.ts +2 -0
- package/lib/drift/utils/funding.js +9 -0
- package/lib/drift/utils/funding.js.map +1 -0
- package/lib/drift/utils/index.d.ts +3 -0
- package/lib/drift/utils/index.js +23 -0
- package/lib/drift/utils/index.js.map +1 -0
- package/lib/drift/utils/orderParams.d.ts +48 -0
- package/lib/drift/utils/orderParams.js +140 -0
- package/lib/drift/utils/orderParams.js.map +1 -0
- package/lib/index.d.ts +45 -0
- package/lib/index.js +68 -0
- package/lib/index.js.map +1 -0
- package/lib/serializableTypes.d.ts +961 -0
- package/lib/serializableTypes.js +3887 -0
- package/lib/serializableTypes.js.map +1 -0
- package/lib/types/MarketId.d.ts +26 -0
- package/lib/types/MarketId.js +64 -0
- package/lib/types/MarketId.js.map +1 -0
- package/lib/types/Superstake.d.ts +7 -0
- package/lib/types/Superstake.js +3 -0
- package/lib/types/Superstake.js.map +1 -0
- package/lib/types/UIEnv.d.ts +26 -0
- package/lib/types/UIEnv.js +49 -0
- package/lib/types/UIEnv.js.map +1 -0
- package/lib/types/UIMarket.d.ts +94 -0
- package/lib/types/UIMarket.js +224 -0
- package/lib/types/UIMarket.js.map +1 -0
- package/lib/types/candles.d.ts +4 -0
- package/lib/types/candles.js +9 -0
- package/lib/types/candles.js.map +1 -0
- package/lib/types/dataServer.d.ts +53 -0
- package/lib/types/dataServer.js +3 -0
- package/lib/types/dataServer.js.map +1 -0
- package/lib/types/historyServer.d.ts +38 -0
- package/lib/types/historyServer.js +11 -0
- package/lib/types/historyServer.js.map +1 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/index.js +29 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/leaderboard.d.ts +80 -0
- package/lib/types/leaderboard.js +11 -0
- package/lib/types/leaderboard.js.map +1 -0
- package/lib/types/remote-configs.d.ts +61 -0
- package/lib/types/remote-configs.js +3 -0
- package/lib/types/remote-configs.js.map +1 -0
- package/lib/types/trade.d.ts +18 -0
- package/lib/types/trade.js +3 -0
- package/lib/types/trade.js.map +1 -0
- package/lib/types/user.d.ts +40 -0
- package/lib/types/user.js +3 -0
- package/lib/types/user.js.map +1 -0
- package/lib/types/utility.d.ts +15 -0
- package/lib/types/utility.js +3 -0
- package/lib/types/utility.js.map +1 -0
- package/lib/utils/CircularBuffers/CircularBuffer.d.ts +22 -0
- package/lib/utils/CircularBuffers/CircularBuffer.js +73 -0
- package/lib/utils/CircularBuffers/CircularBuffer.js.map +1 -0
- package/lib/utils/CircularBuffers/UniqueCircularBuffer.d.ts +19 -0
- package/lib/utils/CircularBuffers/UniqueCircularBuffer.js +78 -0
- package/lib/utils/CircularBuffers/UniqueCircularBuffer.js.map +1 -0
- package/lib/utils/CircularBuffers/index.d.ts +2 -0
- package/lib/utils/CircularBuffers/index.js +19 -0
- package/lib/utils/CircularBuffers/index.js.map +1 -0
- package/lib/utils/MultiplexWebSocket.d.ts +95 -0
- package/lib/utils/MultiplexWebSocket.js +416 -0
- package/lib/utils/MultiplexWebSocket.js.map +1 -0
- package/lib/utils/NumLib.d.ts +106 -0
- package/lib/utils/NumLib.js +300 -0
- package/lib/utils/NumLib.js.map +1 -0
- package/lib/utils/SharedInterval.d.ts +21 -0
- package/lib/utils/SharedInterval.js +47 -0
- package/lib/utils/SharedInterval.js.map +1 -0
- package/lib/utils/SlotBasedResultValidator.d.ts +9 -0
- package/lib/utils/SlotBasedResultValidator.js +27 -0
- package/lib/utils/SlotBasedResultValidator.js.map +1 -0
- package/lib/utils/Stopwatch.d.ts +15 -0
- package/lib/utils/Stopwatch.js +31 -0
- package/lib/utils/Stopwatch.js.map +1 -0
- package/lib/utils/StrictEventEmitter.d.ts +15 -0
- package/lib/utils/StrictEventEmitter.js +55 -0
- package/lib/utils/StrictEventEmitter.js.map +1 -0
- package/lib/utils/WalletConnectionState.d.ts +31 -0
- package/lib/utils/WalletConnectionState.js +83 -0
- package/lib/utils/WalletConnectionState.js.map +1 -0
- package/lib/utils/assert.d.ts +1 -0
- package/lib/utils/assert.js +10 -0
- package/lib/utils/assert.js.map +1 -0
- package/lib/utils/candles/Candle.d.ts +94 -0
- package/lib/utils/candles/Candle.js +580 -0
- package/lib/utils/candles/Candle.js.map +1 -0
- package/lib/utils/candles/types.d.ts +8 -0
- package/lib/utils/candles/types.js +3 -0
- package/lib/utils/candles/types.js.map +1 -0
- package/lib/utils/dlob-server/DlobServerWebsocketUtils.d.ts +57 -0
- package/lib/utils/dlob-server/DlobServerWebsocketUtils.js +137 -0
- package/lib/utils/dlob-server/DlobServerWebsocketUtils.js.map +1 -0
- package/lib/utils/driftEvents.d.ts +10 -0
- package/lib/utils/driftEvents.js +123 -0
- package/lib/utils/driftEvents.js.map +1 -0
- package/lib/utils/equalityChecks.d.ts +12 -0
- package/lib/utils/equalityChecks.js +71 -0
- package/lib/utils/equalityChecks.js.map +1 -0
- package/lib/utils/featureFlags.d.ts +3 -0
- package/lib/utils/featureFlags.js +7 -0
- package/lib/utils/featureFlags.js.map +1 -0
- package/lib/utils/geoblock/index.d.ts +4 -0
- package/lib/utils/geoblock/index.js +20 -0
- package/lib/utils/geoblock/index.js.map +1 -0
- package/lib/utils/index.d.ts +181 -0
- package/lib/utils/index.js +608 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/insuranceFund.d.ts +15 -0
- package/lib/utils/insuranceFund.js +84 -0
- package/lib/utils/insuranceFund.js.map +1 -0
- package/lib/utils/logger.d.ts +5 -0
- package/lib/utils/logger.js +53 -0
- package/lib/utils/logger.js.map +1 -0
- package/lib/utils/math.d.ts +10 -0
- package/lib/utils/math.js +89 -0
- package/lib/utils/math.js.map +1 -0
- package/lib/utils/orderbook/index.d.ts +65 -0
- package/lib/utils/orderbook/index.js +80 -0
- package/lib/utils/orderbook/index.js.map +1 -0
- package/lib/utils/pollingSequenceGuard.d.ts +9 -0
- package/lib/utils/pollingSequenceGuard.js +24 -0
- package/lib/utils/pollingSequenceGuard.js.map +1 -0
- package/lib/utils/priority-fees/PriorityFeeCalculator.d.ts +24 -0
- package/lib/utils/priority-fees/PriorityFeeCalculator.js +53 -0
- package/lib/utils/priority-fees/PriorityFeeCalculator.js.map +1 -0
- package/lib/utils/priority-fees/PriorityFeeStrategies.d.ts +5 -0
- package/lib/utils/priority-fees/PriorityFeeStrategies.js +43 -0
- package/lib/utils/priority-fees/PriorityFeeStrategies.js.map +1 -0
- package/lib/utils/priority-fees/index.d.ts +2 -0
- package/lib/utils/priority-fees/index.js +19 -0
- package/lib/utils/priority-fees/index.js.map +1 -0
- package/lib/utils/priorityFees.d.ts +14 -0
- package/lib/utils/priorityFees.js +68 -0
- package/lib/utils/priorityFees.js.map +1 -0
- package/lib/utils/rpcLatency.d.ts +7 -0
- package/lib/utils/rpcLatency.js +49 -0
- package/lib/utils/rpcLatency.js.map +1 -0
- package/lib/utils/rxjs.d.ts +11 -0
- package/lib/utils/rxjs.js +24 -0
- package/lib/utils/rxjs.js.map +1 -0
- package/lib/utils/s3Buckets.d.ts +43 -0
- package/lib/utils/s3Buckets.js +108 -0
- package/lib/utils/s3Buckets.js.map +1 -0
- package/lib/utils/superstake.d.ts +86 -0
- package/lib/utils/superstake.js +224 -0
- package/lib/utils/superstake.js.map +1 -0
- package/lib/utils/token.d.ts +16 -0
- package/lib/utils/token.js +44 -0
- package/lib/utils/token.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"programId": "JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB",
|
|
3
|
+
"errorsList": {
|
|
4
|
+
"EmptyRoute": {
|
|
5
|
+
"code": 6000,
|
|
6
|
+
"name": "EmptyRoute",
|
|
7
|
+
"msg": "Empty route"
|
|
8
|
+
},
|
|
9
|
+
"SlippageToleranceExceeded": {
|
|
10
|
+
"code": 6001,
|
|
11
|
+
"name": "SlippageToleranceExceeded",
|
|
12
|
+
"msg": "Slippage tolerance exceeded"
|
|
13
|
+
},
|
|
14
|
+
"InvalidCalculation": {
|
|
15
|
+
"code": 6002,
|
|
16
|
+
"name": "InvalidCalculation",
|
|
17
|
+
"msg": "Invalid calculation"
|
|
18
|
+
},
|
|
19
|
+
"MissingPlatformFeeAccount": {
|
|
20
|
+
"code": 6003,
|
|
21
|
+
"name": "MissingPlatformFeeAccount",
|
|
22
|
+
"msg": "Missing platform fee account"
|
|
23
|
+
},
|
|
24
|
+
"InvalidSlippage": {
|
|
25
|
+
"code": 6004,
|
|
26
|
+
"name": "InvalidSlippage",
|
|
27
|
+
"msg": "Invalid slippage"
|
|
28
|
+
},
|
|
29
|
+
"NotEnoughPercent": {
|
|
30
|
+
"code": 6005,
|
|
31
|
+
"name": "NotEnoughPercent",
|
|
32
|
+
"msg": "Not enough percent to 100"
|
|
33
|
+
},
|
|
34
|
+
"InAmountsStackIsEmpty": {
|
|
35
|
+
"code": 6006,
|
|
36
|
+
"name": "InAmountsStackIsEmpty",
|
|
37
|
+
"msg": "In amounts stack is empty"
|
|
38
|
+
},
|
|
39
|
+
"OutAmountsStackIsEmpty": {
|
|
40
|
+
"code": 6007,
|
|
41
|
+
"name": "OutAmountsStackIsEmpty",
|
|
42
|
+
"msg": "Out amounts stack is empty"
|
|
43
|
+
},
|
|
44
|
+
"NotEnoughAccountKeys": {
|
|
45
|
+
"code": 6008,
|
|
46
|
+
"name": "NotEnoughAccountKeys",
|
|
47
|
+
"msg": "Not Enough Account keys"
|
|
48
|
+
},
|
|
49
|
+
"NonZeroMinimumOutAmountNotSupported": {
|
|
50
|
+
"code": 6009,
|
|
51
|
+
"name": "NonZeroMinimumOutAmountNotSupported",
|
|
52
|
+
"msg": "Non zero minimum out amount not supported"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"errorCodesMap": {
|
|
56
|
+
"6000": "EmptyRoute",
|
|
57
|
+
"6001": "SlippageToleranceExceeded",
|
|
58
|
+
"6002": "InvalidCalculation",
|
|
59
|
+
"6003": "MissingPlatformFeeAccount",
|
|
60
|
+
"6004": "InvalidSlippage",
|
|
61
|
+
"6005": "NotEnoughPercent",
|
|
62
|
+
"6006": "InAmountsStackIsEmpty",
|
|
63
|
+
"6007": "OutAmountsStackIsEmpty",
|
|
64
|
+
"6008": "NotEnoughAccountKeys",
|
|
65
|
+
"6009": "NonZeroMinimumOutAmountNotSupported"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"programId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
|
|
3
|
+
"errorsList": {
|
|
4
|
+
"EmptyRoute": {
|
|
5
|
+
"code": 6000,
|
|
6
|
+
"name": "EmptyRoute",
|
|
7
|
+
"msg": "Empty route"
|
|
8
|
+
},
|
|
9
|
+
"SlippageToleranceExceeded": {
|
|
10
|
+
"code": 6001,
|
|
11
|
+
"name": "SlippageToleranceExceeded",
|
|
12
|
+
"msg": "Slippage tolerance exceeded"
|
|
13
|
+
},
|
|
14
|
+
"InvalidCalculation": {
|
|
15
|
+
"code": 6002,
|
|
16
|
+
"name": "InvalidCalculation",
|
|
17
|
+
"msg": "Invalid calculation"
|
|
18
|
+
},
|
|
19
|
+
"MissingPlatformFeeAccount": {
|
|
20
|
+
"code": 6003,
|
|
21
|
+
"name": "MissingPlatformFeeAccount",
|
|
22
|
+
"msg": "Missing platform fee account"
|
|
23
|
+
},
|
|
24
|
+
"InvalidSlippage": {
|
|
25
|
+
"code": 6004,
|
|
26
|
+
"name": "InvalidSlippage",
|
|
27
|
+
"msg": "Invalid slippage"
|
|
28
|
+
},
|
|
29
|
+
"NotEnoughPercent": {
|
|
30
|
+
"code": 6005,
|
|
31
|
+
"name": "NotEnoughPercent",
|
|
32
|
+
"msg": "Not enough percent to 100"
|
|
33
|
+
},
|
|
34
|
+
"InvalidInputIndex": {
|
|
35
|
+
"code": 6006,
|
|
36
|
+
"name": "InvalidInputIndex",
|
|
37
|
+
"msg": "Token input index is invalid"
|
|
38
|
+
},
|
|
39
|
+
"InvalidOutputIndex": {
|
|
40
|
+
"code": 6007,
|
|
41
|
+
"name": "InvalidOutputIndex",
|
|
42
|
+
"msg": "Token output index is invalid"
|
|
43
|
+
},
|
|
44
|
+
"NotEnoughAccountKeys": {
|
|
45
|
+
"code": 6008,
|
|
46
|
+
"name": "NotEnoughAccountKeys",
|
|
47
|
+
"msg": "Not Enough Account keys"
|
|
48
|
+
},
|
|
49
|
+
"NonZeroMinimumOutAmountNotSupported": {
|
|
50
|
+
"code": 6009,
|
|
51
|
+
"name": "NonZeroMinimumOutAmountNotSupported",
|
|
52
|
+
"msg": "Non zero minimum out amount not supported"
|
|
53
|
+
},
|
|
54
|
+
"InvalidRoutePlan": {
|
|
55
|
+
"code": 6010,
|
|
56
|
+
"name": "InvalidRoutePlan",
|
|
57
|
+
"msg": "Invalid route plan"
|
|
58
|
+
},
|
|
59
|
+
"InvalidReferralAuthority": {
|
|
60
|
+
"code": 6011,
|
|
61
|
+
"name": "InvalidReferralAuthority",
|
|
62
|
+
"msg": "Invalid referral authority"
|
|
63
|
+
},
|
|
64
|
+
"LedgerTokenAccountDoesNotMatch": {
|
|
65
|
+
"code": 6012,
|
|
66
|
+
"name": "LedgerTokenAccountDoesNotMatch",
|
|
67
|
+
"msg": "Token account doesn't match the ledger"
|
|
68
|
+
},
|
|
69
|
+
"InvalidTokenLedger": {
|
|
70
|
+
"code": 6013,
|
|
71
|
+
"name": "InvalidTokenLedger",
|
|
72
|
+
"msg": "Invalid token ledger"
|
|
73
|
+
},
|
|
74
|
+
"IncorrectTokenProgramID": {
|
|
75
|
+
"code": 6014,
|
|
76
|
+
"name": "IncorrectTokenProgramID",
|
|
77
|
+
"msg": "Token program ID is invalid"
|
|
78
|
+
},
|
|
79
|
+
"TokenProgramNotProvided": {
|
|
80
|
+
"code": 6015,
|
|
81
|
+
"name": "TokenProgramNotProvided",
|
|
82
|
+
"msg": "Token program not provided"
|
|
83
|
+
},
|
|
84
|
+
"SwapNotSupported": {
|
|
85
|
+
"code": 6016,
|
|
86
|
+
"name": "SwapNotSupported",
|
|
87
|
+
"msg": "Swap not supported"
|
|
88
|
+
},
|
|
89
|
+
"ExactOutAmountNotMatched": {
|
|
90
|
+
"code": 6017,
|
|
91
|
+
"name": "ExactOutAmountNotMatched",
|
|
92
|
+
"msg": "Exact out amount doesn't match"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"errorCodesMap": {
|
|
96
|
+
"6000": "EmptyRoute",
|
|
97
|
+
"6001": "SlippageToleranceExceeded",
|
|
98
|
+
"6002": "InvalidCalculation",
|
|
99
|
+
"6003": "MissingPlatformFeeAccount",
|
|
100
|
+
"6004": "InvalidSlippage",
|
|
101
|
+
"6005": "NotEnoughPercent",
|
|
102
|
+
"6006": "InvalidInputIndex",
|
|
103
|
+
"6007": "InvalidOutputIndex",
|
|
104
|
+
"6008": "NotEnoughAccountKeys",
|
|
105
|
+
"6009": "NonZeroMinimumOutAmountNotSupported",
|
|
106
|
+
"6010": "InvalidRoutePlan",
|
|
107
|
+
"6011": "InvalidReferralAuthority",
|
|
108
|
+
"6012": "LedgerTokenAccountDoesNotMatch",
|
|
109
|
+
"6013": "InvalidTokenLedger",
|
|
110
|
+
"6014": "IncorrectTokenProgramID",
|
|
111
|
+
"6015": "TokenProgramNotProvided",
|
|
112
|
+
"6016": "SwapNotSupported",
|
|
113
|
+
"6017": "ExactOutAmountNotMatched"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const PERFORMANCE_TESTING_LABELS: {
|
|
2
|
+
totalRenders: string;
|
|
3
|
+
totalActualDuration: string;
|
|
4
|
+
min: string;
|
|
5
|
+
median: string;
|
|
6
|
+
max: string;
|
|
7
|
+
p90: string;
|
|
8
|
+
mean: string;
|
|
9
|
+
totalDurationMs: string;
|
|
10
|
+
totalDurationSec: string;
|
|
11
|
+
avgRendersPerSec: string;
|
|
12
|
+
avgDurationPerSec: string;
|
|
13
|
+
avgFPS: string;
|
|
14
|
+
avgEventLoopLag: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PERFORMANCE_TESTING_LABELS = void 0;
|
|
4
|
+
exports.PERFORMANCE_TESTING_LABELS = {
|
|
5
|
+
totalRenders: 'Total Renders',
|
|
6
|
+
totalActualDuration: 'Total Render Duration',
|
|
7
|
+
min: 'Min Duration',
|
|
8
|
+
median: 'Median Duration',
|
|
9
|
+
max: 'Max Duration',
|
|
10
|
+
p90: '90th Percentile Duration',
|
|
11
|
+
mean: 'Mean Duration',
|
|
12
|
+
totalDurationMs: 'Total Profiling Duration',
|
|
13
|
+
totalDurationSec: 'Total Profiling Duration',
|
|
14
|
+
avgRendersPerSec: 'Average Renders Per Second',
|
|
15
|
+
avgDurationPerSec: 'Average Render Duration Per Second',
|
|
16
|
+
avgFPS: 'Avg FPS',
|
|
17
|
+
avgEventLoopLag: 'Avg Event Loop Lag',
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=dev.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/constants/dev.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAAG;IACzC,YAAY,EAAE,eAAe;IAC7B,mBAAmB,EAAE,uBAAuB;IAC5C,GAAG,EAAE,cAAc;IACnB,MAAM,EAAE,iBAAiB;IACzB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,0BAA0B;IAC/B,IAAI,EAAE,eAAe;IACrB,eAAe,EAAE,0BAA0B;IAC3C,gBAAgB,EAAE,0BAA0B;IAC5C,gBAAgB,EAAE,4BAA4B;IAC9C,iBAAiB,EAAE,oCAAoC;IACvD,MAAM,EAAE,SAAS;IACjB,eAAe,EAAE,oBAAoB;CACrC,CAAC","sourcesContent":["export const PERFORMANCE_TESTING_LABELS = {\n\ttotalRenders: 'Total Renders',\n\ttotalActualDuration: 'Total Render Duration',\n\tmin: 'Min Duration',\n\tmedian: 'Median Duration',\n\tmax: 'Max Duration',\n\tp90: '90th Percentile Duration',\n\tmean: 'Mean Duration',\n\ttotalDurationMs: 'Total Profiling Duration',\n\ttotalDurationSec: 'Total Profiling Duration',\n\tavgRendersPerSec: 'Average Renders Per Second',\n\tavgDurationPerSec: 'Average Render Duration Per Second',\n\tavgFPS: 'Avg FPS',\n\tavgEventLoopLag: 'Avg Event Loop Lag',\n};\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEOBLOCK_LIST = void 0;
|
|
4
|
+
exports.GEOBLOCK_LIST = [
|
|
5
|
+
{ code: 'AG', name: 'Antigua and Barbuda' },
|
|
6
|
+
{ code: 'DZ', name: 'Algeria' },
|
|
7
|
+
{ code: 'BD', name: 'Bangladesh' },
|
|
8
|
+
{ code: 'BO', name: 'Bolivia' },
|
|
9
|
+
{ code: 'BY', name: 'Belarus' },
|
|
10
|
+
{ code: 'BI', name: 'Burundi' },
|
|
11
|
+
{ code: 'MM', name: 'Burma (Myanmar)' },
|
|
12
|
+
{ code: 'CI', name: "Cote D'Ivoire (Ivory Coast)" },
|
|
13
|
+
{ code: 'CU', name: 'Cuba' },
|
|
14
|
+
{ code: 'CD', name: 'Democratic Republic of Congo' },
|
|
15
|
+
{ code: 'EC', name: 'Ecuador' },
|
|
16
|
+
{ code: 'IR', name: 'Iran' },
|
|
17
|
+
{ code: 'IQ', name: 'Iraq' },
|
|
18
|
+
{ code: 'LR', name: 'Liberia' },
|
|
19
|
+
{ code: 'LY', name: 'Libya' },
|
|
20
|
+
{ code: 'ML', name: 'Mali' },
|
|
21
|
+
{ code: 'MA', name: 'Morocco' },
|
|
22
|
+
{ code: 'NP', name: 'Nepal' },
|
|
23
|
+
{ code: 'KP', name: 'North Korea' },
|
|
24
|
+
{ code: 'SO', name: 'Somalia' },
|
|
25
|
+
{ code: 'SD', name: 'Sudan' },
|
|
26
|
+
{ code: 'SY', name: 'Syria' },
|
|
27
|
+
{ code: 'VE', name: 'Venezuela' },
|
|
28
|
+
{ code: 'YE', name: 'Yemen' },
|
|
29
|
+
{ code: 'ZW', name: 'Zimbabwe' },
|
|
30
|
+
{ code: 'US', name: 'United States' },
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=geoblockList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geoblockList.js","sourceRoot":"","sources":["../../src/constants/geoblockList.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC5B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC3C,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE;IAClC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE;IACvC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,6BAA6B,EAAE;IACnD,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,8BAA8B,EAAE;IACpD,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;IAC7B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;IAC7B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE;IACnC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;IAC7B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;IAC7B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE;IACjC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;IAC7B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE;IAChC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE;CACrC,CAAC","sourcesContent":["export const GEOBLOCK_LIST = [\n\t{ code: 'AG', name: 'Antigua and Barbuda' },\n\t{ code: 'DZ', name: 'Algeria' },\n\t{ code: 'BD', name: 'Bangladesh' },\n\t{ code: 'BO', name: 'Bolivia' },\n\t{ code: 'BY', name: 'Belarus' },\n\t{ code: 'BI', name: 'Burundi' },\n\t{ code: 'MM', name: 'Burma (Myanmar)' },\n\t{ code: 'CI', name: \"Cote D'Ivoire (Ivory Coast)\" },\n\t{ code: 'CU', name: 'Cuba' },\n\t{ code: 'CD', name: 'Democratic Republic of Congo' },\n\t{ code: 'EC', name: 'Ecuador' },\n\t{ code: 'IR', name: 'Iran' },\n\t{ code: 'IQ', name: 'Iraq' },\n\t{ code: 'LR', name: 'Liberia' },\n\t{ code: 'LY', name: 'Libya' },\n\t{ code: 'ML', name: 'Mali' },\n\t{ code: 'MA', name: 'Morocco' },\n\t{ code: 'NP', name: 'Nepal' },\n\t{ code: 'KP', name: 'North Korea' },\n\t{ code: 'SO', name: 'Somalia' },\n\t{ code: 'SD', name: 'Sudan' },\n\t{ code: 'SY', name: 'Syria' },\n\t{ code: 'VE', name: 'Venezuela' },\n\t{ code: 'YE', name: 'Yemen' },\n\t{ code: 'ZW', name: 'Zimbabwe' },\n\t{ code: 'US', name: 'United States' },\n];\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dev"), exports);
|
|
18
|
+
__exportStar(require("./orders"), exports);
|
|
19
|
+
__exportStar(require("./geoblockList"), exports);
|
|
20
|
+
__exportStar(require("./misc"), exports);
|
|
21
|
+
__exportStar(require("./superstake"), exports);
|
|
22
|
+
__exportStar(require("./pools"), exports);
|
|
23
|
+
__exportStar(require("./trade"), exports);
|
|
24
|
+
__exportStar(require("./markets"), exports);
|
|
25
|
+
__exportStar(require("./predictionMarket"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2CAAyB;AACzB,iDAA+B;AAC/B,yCAAuB;AACvB,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,qDAAmC","sourcesContent":["export * from './dev';\nexport * from './orders';\nexport * from './geoblockList';\nexport * from './misc';\nexport * from './superstake';\nexport * from './pools';\nexport * from './trade';\nexport * from './markets';\nexport * from './predictionMarket';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const USDC_SPOT_MARKET_INDEX = 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markets.js","sourceRoot":"","sources":["../../src/constants/markets.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,CAAC,CAAC","sourcesContent":["export const USDC_SPOT_MARKET_INDEX = 0;\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BigNum } from '@drift-labs/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Equal to 0.0001
|
|
4
|
+
*/
|
|
5
|
+
export declare const NEW_ACCOUNT_DONATION: BigNum;
|
|
6
|
+
/**
|
|
7
|
+
* Equal to 0.035
|
|
8
|
+
*/
|
|
9
|
+
export declare const NEW_ACCOUNT_BASE_RENT: BigNum;
|
|
10
|
+
export declare const SWIFT_ACCOUNT_BASE_RENT: BigNum;
|
|
11
|
+
/**
|
|
12
|
+
* Equal to NEW_ACCOUNT_DONATION + NEW_ACCOUNT_BASE_RENT
|
|
13
|
+
*/
|
|
14
|
+
export declare const NEW_ACCOUNT_BASE_COST: BigNum;
|
|
15
|
+
/**
|
|
16
|
+
* Equal to 0.002
|
|
17
|
+
*/
|
|
18
|
+
export declare const IF_STAKE_ACCOUNT_BASE_RENT: BigNum;
|
|
19
|
+
/**
|
|
20
|
+
* Equal to 0.015 SOL
|
|
21
|
+
*/
|
|
22
|
+
export declare const MIN_LEFTOVER_SOL: BigNum;
|
|
23
|
+
export declare const ONE_DAY_MS: number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ONE_DAY_MS = exports.MIN_LEFTOVER_SOL = exports.IF_STAKE_ACCOUNT_BASE_RENT = exports.NEW_ACCOUNT_BASE_COST = exports.SWIFT_ACCOUNT_BASE_RENT = exports.NEW_ACCOUNT_BASE_RENT = exports.NEW_ACCOUNT_DONATION = void 0;
|
|
4
|
+
const sdk_1 = require("@drift-labs/sdk");
|
|
5
|
+
/**
|
|
6
|
+
* Equal to 0.0001
|
|
7
|
+
*/
|
|
8
|
+
exports.NEW_ACCOUNT_DONATION = sdk_1.BigNum.fromPrint('0.0001', sdk_1.LAMPORTS_EXP);
|
|
9
|
+
/**
|
|
10
|
+
* Equal to 0.035
|
|
11
|
+
*/
|
|
12
|
+
exports.NEW_ACCOUNT_BASE_RENT = new sdk_1.BigNum('31347840', sdk_1.LAMPORTS_EXP);
|
|
13
|
+
exports.SWIFT_ACCOUNT_BASE_RENT = new sdk_1.BigNum('2756160', sdk_1.LAMPORTS_EXP);
|
|
14
|
+
/**
|
|
15
|
+
* Equal to NEW_ACCOUNT_DONATION + NEW_ACCOUNT_BASE_RENT
|
|
16
|
+
*/
|
|
17
|
+
exports.NEW_ACCOUNT_BASE_COST = exports.NEW_ACCOUNT_BASE_RENT.add(exports.NEW_ACCOUNT_DONATION).add(exports.SWIFT_ACCOUNT_BASE_RENT);
|
|
18
|
+
/**
|
|
19
|
+
* Equal to 0.002
|
|
20
|
+
*/
|
|
21
|
+
exports.IF_STAKE_ACCOUNT_BASE_RENT = sdk_1.BigNum.fromPrint('0.002', sdk_1.LAMPORTS_EXP);
|
|
22
|
+
/**
|
|
23
|
+
* Equal to 0.015 SOL
|
|
24
|
+
*/
|
|
25
|
+
exports.MIN_LEFTOVER_SOL = sdk_1.BigNum.fromPrint('0.015', sdk_1.LAMPORTS_EXP);
|
|
26
|
+
exports.ONE_DAY_MS = 1000 * 60 * 60 * 24;
|
|
27
|
+
//# sourceMappingURL=misc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/constants/misc.ts"],"names":[],"mappings":";;;AAAA,yCAAuD;AAEvD;;GAEG;AACU,QAAA,oBAAoB,GAAG,YAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,kBAAY,CAAC,CAAC;AAE7E;;GAEG;AACU,QAAA,qBAAqB,GAAG,IAAI,YAAM,CAAC,UAAU,EAAE,kBAAY,CAAC,CAAC;AAE7D,QAAA,uBAAuB,GAAG,IAAI,YAAM,CAAC,SAAS,EAAE,kBAAY,CAAC,CAAC;AAE3E;;GAEG;AACU,QAAA,qBAAqB,GAAG,6BAAqB,CAAC,GAAG,CAC7D,4BAAoB,CACpB,CAAC,GAAG,CAAC,+BAAuB,CAAC,CAAC;AAE/B;;GAEG;AACU,QAAA,0BAA0B,GAAG,YAAM,CAAC,SAAS,CACzD,OAAO,EACP,kBAAY,CACZ,CAAC;AAEF;;GAEG;AACU,QAAA,gBAAgB,GAAG,YAAM,CAAC,SAAS,CAAC,OAAO,EAAE,kBAAY,CAAC,CAAC;AAE3D,QAAA,UAAU,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC","sourcesContent":["import { BigNum, LAMPORTS_EXP } from '@drift-labs/sdk';\n\n/**\n * Equal to 0.0001\n */\nexport const NEW_ACCOUNT_DONATION = BigNum.fromPrint('0.0001', LAMPORTS_EXP);\n\n/**\n * Equal to 0.035\n */\nexport const NEW_ACCOUNT_BASE_RENT = new BigNum('31347840', LAMPORTS_EXP);\n\nexport const SWIFT_ACCOUNT_BASE_RENT = new BigNum('2756160', LAMPORTS_EXP);\n\n/**\n * Equal to NEW_ACCOUNT_DONATION + NEW_ACCOUNT_BASE_RENT\n */\nexport const NEW_ACCOUNT_BASE_COST = NEW_ACCOUNT_BASE_RENT.add(\n\tNEW_ACCOUNT_DONATION\n).add(SWIFT_ACCOUNT_BASE_RENT);\n\n/**\n * Equal to 0.002\n */\nexport const IF_STAKE_ACCOUNT_BASE_RENT = BigNum.fromPrint(\n\t'0.002',\n\tLAMPORTS_EXP\n);\n\n/**\n * Equal to 0.015 SOL\n */\nexport const MIN_LEFTOVER_SOL = BigNum.fromPrint('0.015', LAMPORTS_EXP);\n\nexport const ONE_DAY_MS = 1000 * 60 * 60 * 24;\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UIOrderTypeLookup, UIOrderTypeValue } from '../types';
|
|
2
|
+
export declare const MARKET_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
3
|
+
export declare const LIMIT_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
4
|
+
export declare const STOP_MARKET_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
5
|
+
export declare const STOP_LIMIT_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
6
|
+
export declare const TAKE_PROFIT_MARKET_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
7
|
+
export declare const TAKE_PROFIT_LIMIT_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
8
|
+
export declare const ORACLE_MARKET_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
9
|
+
export declare const ORACLE_LIMIT_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
10
|
+
export declare const SCALED_ORDERS_ORDER_TYPE_CONFIG: UIOrderTypeValue;
|
|
11
|
+
export declare const UI_ORDER_TYPES: UIOrderTypeLookup;
|
|
12
|
+
export declare const UI_ORDER_TYPES_LIST: UIOrderTypeValue[];
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UI_ORDER_TYPES_LIST = exports.UI_ORDER_TYPES = exports.SCALED_ORDERS_ORDER_TYPE_CONFIG = exports.ORACLE_LIMIT_ORDER_TYPE_CONFIG = exports.ORACLE_MARKET_ORDER_TYPE_CONFIG = exports.TAKE_PROFIT_LIMIT_ORDER_TYPE_CONFIG = exports.TAKE_PROFIT_MARKET_ORDER_TYPE_CONFIG = exports.STOP_LIMIT_ORDER_TYPE_CONFIG = exports.STOP_MARKET_ORDER_TYPE_CONFIG = exports.LIMIT_ORDER_TYPE_CONFIG = exports.MARKET_ORDER_TYPE_CONFIG = void 0;
|
|
4
|
+
const sdk_1 = require("@drift-labs/sdk");
|
|
5
|
+
// Market order type
|
|
6
|
+
exports.MARKET_ORDER_TYPE_CONFIG = {
|
|
7
|
+
label: 'Market',
|
|
8
|
+
value: 'market',
|
|
9
|
+
orderType: sdk_1.OrderType.MARKET,
|
|
10
|
+
description: 'A Market Order is an order to buy or sell an asset immediately at the current Market Price. Users can set a maximum slippage tolerance.',
|
|
11
|
+
};
|
|
12
|
+
// Limit order type
|
|
13
|
+
exports.LIMIT_ORDER_TYPE_CONFIG = {
|
|
14
|
+
label: 'Limit',
|
|
15
|
+
value: 'limit',
|
|
16
|
+
orderType: sdk_1.OrderType.LIMIT,
|
|
17
|
+
description: 'A Limit Order is an order to buy or sell a given asset at a specified price. Limit Orders are triggered once Oracle Price reaches the specified price.',
|
|
18
|
+
};
|
|
19
|
+
// Stop Market order type
|
|
20
|
+
exports.STOP_MARKET_ORDER_TYPE_CONFIG = {
|
|
21
|
+
label: 'Stop Market',
|
|
22
|
+
value: 'stopMarket',
|
|
23
|
+
orderType: sdk_1.OrderType.TRIGGER_MARKET,
|
|
24
|
+
description: 'A Stop Market Order is an order to close the position of a given asset if its specified Trigger Price is reached. If this happens, the position is closed at Market Price.',
|
|
25
|
+
};
|
|
26
|
+
// Stop Limit order type
|
|
27
|
+
exports.STOP_LIMIT_ORDER_TYPE_CONFIG = {
|
|
28
|
+
label: 'Stop Limit',
|
|
29
|
+
value: 'stopLimit',
|
|
30
|
+
orderType: sdk_1.OrderType.TRIGGER_LIMIT,
|
|
31
|
+
description: 'A Stop Limit Order will only execute where the specified Trigger Price of a given asset is reached. If this happens, a Limit Order at the specified Limit Price will be placed.',
|
|
32
|
+
};
|
|
33
|
+
// Take Profit Market order type
|
|
34
|
+
exports.TAKE_PROFIT_MARKET_ORDER_TYPE_CONFIG = {
|
|
35
|
+
label: 'Take Profit',
|
|
36
|
+
value: 'takeProfitMarket',
|
|
37
|
+
orderType: sdk_1.OrderType.TRIGGER_MARKET,
|
|
38
|
+
description: 'A Take Profit Order is an order to close the position of a given asset if its Oracle Price reaches the specified Trigger Price. If this happens, the position is closed at Market Price.',
|
|
39
|
+
};
|
|
40
|
+
// Take Profit Limit order type
|
|
41
|
+
exports.TAKE_PROFIT_LIMIT_ORDER_TYPE_CONFIG = {
|
|
42
|
+
label: 'Take Profit Limit',
|
|
43
|
+
value: 'takeProfitLimit',
|
|
44
|
+
orderType: sdk_1.OrderType.TRIGGER_LIMIT,
|
|
45
|
+
description: 'A Take Profit Limit Order will only execute where the Oracle Price of a given asset reaches the Trigger Price. If this happens, a Limit Order at the specified Limit Price will be placed.',
|
|
46
|
+
};
|
|
47
|
+
// Oracle Market order type
|
|
48
|
+
exports.ORACLE_MARKET_ORDER_TYPE_CONFIG = {
|
|
49
|
+
label: 'Oracle Market',
|
|
50
|
+
value: 'oracle',
|
|
51
|
+
orderType: sdk_1.OrderType.ORACLE,
|
|
52
|
+
};
|
|
53
|
+
// Oracle Limit order type
|
|
54
|
+
exports.ORACLE_LIMIT_ORDER_TYPE_CONFIG = {
|
|
55
|
+
label: 'Oracle Limit',
|
|
56
|
+
value: 'oracleLimit',
|
|
57
|
+
orderType: sdk_1.OrderType.LIMIT,
|
|
58
|
+
description: 'An Oracle Limit Order allows you to specify an offset rather than limit price to execute your order. The offset represents the price above/below the current Oracle Price you want to be filled at. Learn more.',
|
|
59
|
+
};
|
|
60
|
+
// Scaled Orders order type
|
|
61
|
+
exports.SCALED_ORDERS_ORDER_TYPE_CONFIG = {
|
|
62
|
+
label: 'Scale',
|
|
63
|
+
value: 'scaledOrders',
|
|
64
|
+
orderType: sdk_1.OrderType.LIMIT,
|
|
65
|
+
description: 'A scaled order automatically generates multiple limit orders within a specified price range. It splits the order amount into several suborders and places them separately without significantly impacting the market.',
|
|
66
|
+
};
|
|
67
|
+
exports.UI_ORDER_TYPES = {
|
|
68
|
+
market: exports.MARKET_ORDER_TYPE_CONFIG,
|
|
69
|
+
limit: exports.LIMIT_ORDER_TYPE_CONFIG,
|
|
70
|
+
stopMarket: exports.STOP_MARKET_ORDER_TYPE_CONFIG,
|
|
71
|
+
stopLimit: exports.STOP_LIMIT_ORDER_TYPE_CONFIG,
|
|
72
|
+
takeProfitMarket: exports.TAKE_PROFIT_MARKET_ORDER_TYPE_CONFIG,
|
|
73
|
+
takeProfitLimit: exports.TAKE_PROFIT_LIMIT_ORDER_TYPE_CONFIG,
|
|
74
|
+
oracle: exports.ORACLE_MARKET_ORDER_TYPE_CONFIG,
|
|
75
|
+
oracleLimit: exports.ORACLE_LIMIT_ORDER_TYPE_CONFIG,
|
|
76
|
+
scaledOrders: exports.SCALED_ORDERS_ORDER_TYPE_CONFIG,
|
|
77
|
+
};
|
|
78
|
+
exports.UI_ORDER_TYPES_LIST = Object.values(exports.UI_ORDER_TYPES);
|
|
79
|
+
//# sourceMappingURL=orders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orders.js","sourceRoot":"","sources":["../../src/constants/orders.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAG5C,oBAAoB;AACP,QAAA,wBAAwB,GAAqB;IACzD,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,eAAS,CAAC,MAAM;IAC3B,WAAW,EACV,yIAAyI;CAC1I,CAAC;AAEF,mBAAmB;AACN,QAAA,uBAAuB,GAAqB;IACxD,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,eAAS,CAAC,KAAK;IAC1B,WAAW,EACV,wJAAwJ;CACzJ,CAAC;AAEF,yBAAyB;AACZ,QAAA,6BAA6B,GAAqB;IAC9D,KAAK,EAAE,aAAa;IACpB,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,eAAS,CAAC,cAAc;IACnC,WAAW,EACV,4KAA4K;CAC7K,CAAC;AAEF,wBAAwB;AACX,QAAA,4BAA4B,GAAqB;IAC7D,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,eAAS,CAAC,aAAa;IAClC,WAAW,EACV,iLAAiL;CAClL,CAAC;AAEF,gCAAgC;AACnB,QAAA,oCAAoC,GAAqB;IACrE,KAAK,EAAE,aAAa;IACpB,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,eAAS,CAAC,cAAc;IACnC,WAAW,EACV,0LAA0L;CAC3L,CAAC;AAEF,+BAA+B;AAClB,QAAA,mCAAmC,GAAqB;IACpE,KAAK,EAAE,mBAAmB;IAC1B,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,eAAS,CAAC,aAAa;IAClC,WAAW,EACV,4LAA4L;CAC7L,CAAC;AAEF,2BAA2B;AACd,QAAA,+BAA+B,GAAqB;IAChE,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,eAAS,CAAC,MAAM;CAC3B,CAAC;AAEF,0BAA0B;AACb,QAAA,8BAA8B,GAAqB;IAC/D,KAAK,EAAE,cAAc;IACrB,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,eAAS,CAAC,KAAK;IAC1B,WAAW,EACV,iNAAiN;CAClN,CAAC;AAEF,2BAA2B;AACd,QAAA,+BAA+B,GAAqB;IAChE,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,eAAS,CAAC,KAAK;IAC1B,WAAW,EACV,uNAAuN;CACxN,CAAC;AAEW,QAAA,cAAc,GAAsB;IAChD,MAAM,EAAE,gCAAwB;IAChC,KAAK,EAAE,+BAAuB;IAC9B,UAAU,EAAE,qCAA6B;IACzC,SAAS,EAAE,oCAA4B;IACvC,gBAAgB,EAAE,4CAAoC;IACtD,eAAe,EAAE,2CAAmC;IACpD,MAAM,EAAE,uCAA+B;IACvC,WAAW,EAAE,sCAA8B;IAC3C,YAAY,EAAE,uCAA+B;CAC7C,CAAC;AAEW,QAAA,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAc,CAAC,CAAC","sourcesContent":["import { OrderType } from '@drift-labs/sdk';\nimport { UIOrderTypeLookup, UIOrderTypeValue } from '../types';\n\n// Market order type\nexport const MARKET_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Market',\n\tvalue: 'market',\n\torderType: OrderType.MARKET,\n\tdescription:\n\t\t'A Market Order is an order to buy or sell an asset immediately at the current Market Price. Users can set a maximum slippage tolerance.',\n};\n\n// Limit order type\nexport const LIMIT_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Limit',\n\tvalue: 'limit',\n\torderType: OrderType.LIMIT,\n\tdescription:\n\t\t'A Limit Order is an order to buy or sell a given asset at a specified price. Limit Orders are triggered once Oracle Price reaches the specified price.',\n};\n\n// Stop Market order type\nexport const STOP_MARKET_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Stop Market',\n\tvalue: 'stopMarket',\n\torderType: OrderType.TRIGGER_MARKET,\n\tdescription:\n\t\t'A Stop Market Order is an order to close the position of a given asset if its specified Trigger Price is reached. If this happens, the position is closed at Market Price.',\n};\n\n// Stop Limit order type\nexport const STOP_LIMIT_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Stop Limit',\n\tvalue: 'stopLimit',\n\torderType: OrderType.TRIGGER_LIMIT,\n\tdescription:\n\t\t'A Stop Limit Order will only execute where the specified Trigger Price of a given asset is reached. If this happens, a Limit Order at the specified Limit Price will be placed.',\n};\n\n// Take Profit Market order type\nexport const TAKE_PROFIT_MARKET_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Take Profit',\n\tvalue: 'takeProfitMarket',\n\torderType: OrderType.TRIGGER_MARKET,\n\tdescription:\n\t\t'A Take Profit Order is an order to close the position of a given asset if its Oracle Price reaches the specified Trigger Price. If this happens, the position is closed at Market Price.',\n};\n\n// Take Profit Limit order type\nexport const TAKE_PROFIT_LIMIT_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Take Profit Limit',\n\tvalue: 'takeProfitLimit',\n\torderType: OrderType.TRIGGER_LIMIT,\n\tdescription:\n\t\t'A Take Profit Limit Order will only execute where the Oracle Price of a given asset reaches the Trigger Price. If this happens, a Limit Order at the specified Limit Price will be placed.',\n};\n\n// Oracle Market order type\nexport const ORACLE_MARKET_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Oracle Market',\n\tvalue: 'oracle',\n\torderType: OrderType.ORACLE,\n};\n\n// Oracle Limit order type\nexport const ORACLE_LIMIT_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Oracle Limit',\n\tvalue: 'oracleLimit',\n\torderType: OrderType.LIMIT,\n\tdescription:\n\t\t'An Oracle Limit Order allows you to specify an offset rather than limit price to execute your order. The offset represents the price above/below the current Oracle Price you want to be filled at. Learn more.',\n};\n\n// Scaled Orders order type\nexport const SCALED_ORDERS_ORDER_TYPE_CONFIG: UIOrderTypeValue = {\n\tlabel: 'Scale',\n\tvalue: 'scaledOrders',\n\torderType: OrderType.LIMIT,\n\tdescription:\n\t\t'A scaled order automatically generates multiple limit orders within a specified price range. It splits the order amount into several suborders and places them separately without significantly impacting the market.',\n};\n\nexport const UI_ORDER_TYPES: UIOrderTypeLookup = {\n\tmarket: MARKET_ORDER_TYPE_CONFIG,\n\tlimit: LIMIT_ORDER_TYPE_CONFIG,\n\tstopMarket: STOP_MARKET_ORDER_TYPE_CONFIG,\n\tstopLimit: STOP_LIMIT_ORDER_TYPE_CONFIG,\n\ttakeProfitMarket: TAKE_PROFIT_MARKET_ORDER_TYPE_CONFIG,\n\ttakeProfitLimit: TAKE_PROFIT_LIMIT_ORDER_TYPE_CONFIG,\n\toracle: ORACLE_MARKET_ORDER_TYPE_CONFIG,\n\toracleLimit: ORACLE_LIMIT_ORDER_TYPE_CONFIG,\n\tscaledOrders: SCALED_ORDERS_ORDER_TYPE_CONFIG,\n};\n\nexport const UI_ORDER_TYPES_LIST = Object.values(UI_ORDER_TYPES);\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SACRED_POOL_ID = exports.EXPONENT_POOL_ID = exports.LST_POOL_ID = exports.JLP_POOL_ID = exports.MAIN_POOL_ID = void 0;
|
|
4
|
+
exports.MAIN_POOL_ID = 0;
|
|
5
|
+
exports.JLP_POOL_ID = 1;
|
|
6
|
+
exports.LST_POOL_ID = 2;
|
|
7
|
+
exports.EXPONENT_POOL_ID = 3;
|
|
8
|
+
exports.SACRED_POOL_ID = 4;
|
|
9
|
+
//# sourceMappingURL=pools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../src/constants/pools.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,gBAAgB,GAAG,CAAC,CAAC;AACrB,QAAA,cAAc,GAAG,CAAC,CAAC","sourcesContent":["export const MAIN_POOL_ID = 0;\nexport const JLP_POOL_ID = 1;\nexport const LST_POOL_ID = 2;\nexport const EXPONENT_POOL_ID = 3;\nexport const SACRED_POOL_ID = 4;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_PREDICTION_PRICE_BIG_NUM = exports.MAX_PREDICTION_PRICE_NUM = void 0;
|
|
4
|
+
const sdk_1 = require("@drift-labs/sdk");
|
|
5
|
+
exports.MAX_PREDICTION_PRICE_NUM = sdk_1.MAX_PREDICTION_PRICE.div(sdk_1.PRICE_PRECISION).toNumber();
|
|
6
|
+
exports.MAX_PREDICTION_PRICE_BIG_NUM = sdk_1.BigNum.from(sdk_1.MAX_PREDICTION_PRICE, sdk_1.PRICE_PRECISION_EXP);
|
|
7
|
+
//# sourceMappingURL=predictionMarket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predictionMarket.js","sourceRoot":"","sources":["../../src/constants/predictionMarket.ts"],"names":[],"mappings":";;;AAAA,yCAKyB;AAEZ,QAAA,wBAAwB,GACpC,0BAAoB,CAAC,GAAG,CAAC,qBAAe,CAAC,CAAC,QAAQ,EAAE,CAAC;AAEzC,QAAA,4BAA4B,GAAG,YAAM,CAAC,IAAI,CACtD,0BAAoB,EACpB,yBAAmB,CACnB,CAAC","sourcesContent":["import {\n\tMAX_PREDICTION_PRICE,\n\tBigNum,\n\tPRICE_PRECISION,\n\tPRICE_PRECISION_EXP,\n} from '@drift-labs/sdk';\n\nexport const MAX_PREDICTION_PRICE_NUM =\n\tMAX_PREDICTION_PRICE.div(PRICE_PRECISION).toNumber();\n\nexport const MAX_PREDICTION_PRICE_BIG_NUM = BigNum.from(\n\tMAX_PREDICTION_PRICE,\n\tPRICE_PRECISION_EXP\n);\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SpotMarketConfig } from '@drift-labs/sdk';
|
|
2
|
+
export type LST = {
|
|
3
|
+
symbol: string;
|
|
4
|
+
driftAccountName: string;
|
|
5
|
+
spotMarket: SpotMarketConfig;
|
|
6
|
+
logoUrl: string;
|
|
7
|
+
maxLeverage: number;
|
|
8
|
+
defaultLeverage: number;
|
|
9
|
+
emissionsTokenSymbol?: string;
|
|
10
|
+
onlyDirectRoute?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const M_SOL: LST;
|
|
13
|
+
export declare const JITO_SOL: LST;
|
|
14
|
+
export declare const B_SOL: LST;
|
|
15
|
+
/**
|
|
16
|
+
* All LSTs that support one-click superstaking
|
|
17
|
+
*/
|
|
18
|
+
export declare const SUPERSTAKE_ALL_LST: LST[];
|
|
19
|
+
/**
|
|
20
|
+
* All LSTs that support one-click superstaking
|
|
21
|
+
*/
|
|
22
|
+
export declare const SUPERSTAKE_ALL_LST_MAP: Record<string, LST>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPERSTAKE_ALL_LST_MAP = exports.SUPERSTAKE_ALL_LST = exports.B_SOL = exports.JITO_SOL = exports.M_SOL = void 0;
|
|
4
|
+
const sdk_1 = require("@drift-labs/sdk");
|
|
5
|
+
exports.M_SOL = {
|
|
6
|
+
symbol: 'mSOL',
|
|
7
|
+
driftAccountName: 'Super Stake SOL',
|
|
8
|
+
spotMarket: sdk_1.MainnetSpotMarkets[2],
|
|
9
|
+
logoUrl: '/mSol.svg',
|
|
10
|
+
maxLeverage: 3,
|
|
11
|
+
defaultLeverage: 2,
|
|
12
|
+
onlyDirectRoute: true,
|
|
13
|
+
};
|
|
14
|
+
exports.JITO_SOL = {
|
|
15
|
+
symbol: 'JitoSOL',
|
|
16
|
+
driftAccountName: 'Super Stake JitoSOL',
|
|
17
|
+
spotMarket: sdk_1.MainnetSpotMarkets[6],
|
|
18
|
+
logoUrl: '/jitoSol.svg',
|
|
19
|
+
maxLeverage: 1.8,
|
|
20
|
+
defaultLeverage: 1.4,
|
|
21
|
+
onlyDirectRoute: true,
|
|
22
|
+
};
|
|
23
|
+
exports.B_SOL = {
|
|
24
|
+
symbol: 'bSOL',
|
|
25
|
+
driftAccountName: 'Super Stake bSOL',
|
|
26
|
+
spotMarket: sdk_1.MainnetSpotMarkets[8],
|
|
27
|
+
logoUrl: '/bsol.svg',
|
|
28
|
+
maxLeverage: 2.5,
|
|
29
|
+
defaultLeverage: 1.8,
|
|
30
|
+
emissionsTokenSymbol: 'BLZE',
|
|
31
|
+
onlyDirectRoute: true,
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* All LSTs that support one-click superstaking
|
|
35
|
+
*/
|
|
36
|
+
exports.SUPERSTAKE_ALL_LST = [exports.M_SOL, exports.JITO_SOL, exports.B_SOL];
|
|
37
|
+
/**
|
|
38
|
+
* All LSTs that support one-click superstaking
|
|
39
|
+
*/
|
|
40
|
+
exports.SUPERSTAKE_ALL_LST_MAP = {
|
|
41
|
+
[exports.M_SOL.symbol]: exports.M_SOL,
|
|
42
|
+
[exports.JITO_SOL.symbol]: exports.JITO_SOL,
|
|
43
|
+
[exports.B_SOL.symbol]: exports.B_SOL,
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=superstake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"superstake.js","sourceRoot":"","sources":["../../src/constants/superstake.ts"],"names":[],"mappings":";;;AAAA,yCAAuE;AAiB1D,QAAA,KAAK,GAAQ;IACzB,MAAM,EAAE,MAAM;IACd,gBAAgB,EAAE,iBAAiB;IACnC,UAAU,EAAE,wBAAkB,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,WAAW;IACpB,WAAW,EAAE,CAAC;IACd,eAAe,EAAE,CAAC;IAClB,eAAe,EAAE,IAAI;CACrB,CAAC;AAEW,QAAA,QAAQ,GAAQ;IAC5B,MAAM,EAAE,SAAS;IACjB,gBAAgB,EAAE,qBAAqB;IACvC,UAAU,EAAE,wBAAkB,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,GAAG;IAChB,eAAe,EAAE,GAAG;IACpB,eAAe,EAAE,IAAI;CACrB,CAAC;AAEW,QAAA,KAAK,GAAQ;IACzB,MAAM,EAAE,MAAM;IACd,gBAAgB,EAAE,kBAAkB;IACpC,UAAU,EAAE,wBAAkB,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,WAAW;IACpB,WAAW,EAAE,GAAG;IAChB,eAAe,EAAE,GAAG;IACpB,oBAAoB,EAAE,MAAM;IAC5B,eAAe,EAAE,IAAI;CACrB,CAAC;AAEF;;GAEG;AACU,QAAA,kBAAkB,GAAU,CAAC,aAAK,EAAE,gBAAQ,EAAE,aAAK,CAAC,CAAC;AAElE;;GAEG;AACU,QAAA,sBAAsB,GAAwB;IAC1D,CAAC,aAAK,CAAC,MAAM,CAAC,EAAE,aAAK;IACrB,CAAC,gBAAQ,CAAC,MAAM,CAAC,EAAE,gBAAQ;IAC3B,CAAC,aAAK,CAAC,MAAM,CAAC,EAAE,aAAK;CACrB,CAAC","sourcesContent":["import { MainnetSpotMarkets, SpotMarketConfig } from '@drift-labs/sdk';\n\nexport type LST = {\n\tsymbol: string; // symbol is added as a config because JitoSOL's symbol in the spotMarket is jitoSOL\n\tdriftAccountName: string;\n\tspotMarket: SpotMarketConfig;\n\tlogoUrl: string;\n\t// maxLeverage set manually for now, but would be nice if we make it derived from the asset weight later on\n\tmaxLeverage: number;\n\t// Default leverage to start the form out with when switching to the lst\n\tdefaultLeverage: number;\n\t// Symbol of the token offered as emissions if there's an emissions APY on top of the normal APY\n\temissionsTokenSymbol?: string;\n\t// use direct route for Jupiter swap\n\tonlyDirectRoute?: boolean;\n};\n\nexport const M_SOL: LST = {\n\tsymbol: 'mSOL',\n\tdriftAccountName: 'Super Stake SOL',\n\tspotMarket: MainnetSpotMarkets[2],\n\tlogoUrl: '/mSol.svg',\n\tmaxLeverage: 3,\n\tdefaultLeverage: 2,\n\tonlyDirectRoute: true,\n};\n\nexport const JITO_SOL: LST = {\n\tsymbol: 'JitoSOL',\n\tdriftAccountName: 'Super Stake JitoSOL',\n\tspotMarket: MainnetSpotMarkets[6],\n\tlogoUrl: '/jitoSol.svg',\n\tmaxLeverage: 1.8,\n\tdefaultLeverage: 1.4,\n\tonlyDirectRoute: true,\n};\n\nexport const B_SOL: LST = {\n\tsymbol: 'bSOL',\n\tdriftAccountName: 'Super Stake bSOL',\n\tspotMarket: MainnetSpotMarkets[8],\n\tlogoUrl: '/bsol.svg',\n\tmaxLeverage: 2.5,\n\tdefaultLeverage: 1.8,\n\temissionsTokenSymbol: 'BLZE',\n\tonlyDirectRoute: true,\n};\n\n/**\n * All LSTs that support one-click superstaking\n */\nexport const SUPERSTAKE_ALL_LST: LST[] = [M_SOL, JITO_SOL, B_SOL];\n\n/**\n * All LSTs that support one-click superstaking\n */\nexport const SUPERSTAKE_ALL_LST_MAP: Record<string, LST> = {\n\t[M_SOL.symbol]: M_SOL,\n\t[JITO_SOL.symbol]: JITO_SOL,\n\t[B_SOL.symbol]: B_SOL,\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EMPTY_AUCTION_PARAMS = void 0;
|
|
4
|
+
exports.EMPTY_AUCTION_PARAMS = {
|
|
5
|
+
auctionStartPrice: null,
|
|
6
|
+
auctionEndPrice: null,
|
|
7
|
+
auctionDuration: null,
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=trade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trade.js","sourceRoot":"","sources":["../../src/constants/trade.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAkB;IAClD,iBAAiB,EAAE,IAAI;IACvB,eAAe,EAAE,IAAI;IACrB,eAAe,EAAE,IAAI;CACrB,CAAC","sourcesContent":["import { AuctionParams } from 'src/types';\n\nexport const EMPTY_AUCTION_PARAMS: AuctionParams = {\n\tauctionStartPrice: null,\n\tauctionEndPrice: null,\n\tauctionDuration: null,\n};\n"]}
|