@drift-labs/sdk 2.26.0-beta.1 → 2.26.0-beta.3
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 +1 -0
- package/lib/config.js +2 -0
- package/lib/constants/spotMarkets.d.ts +1 -0
- package/lib/constants/spotMarkets.js +1 -0
- package/lib/dlob/DLOB.d.ts +38 -2
- package/lib/dlob/DLOB.js +69 -0
- package/lib/dlob/DLOBApiClient.js +1 -1
- package/lib/dlob/DLOBSubscriber.d.ts +34 -0
- package/lib/dlob/DLOBSubscriber.js +100 -0
- package/lib/dlob/orderBookLevels.d.ts +44 -0
- package/lib/dlob/orderBookLevels.js +137 -0
- package/lib/dlob/types.d.ts +2 -0
- package/lib/driftClient.d.ts +28 -10
- package/lib/driftClient.js +158 -55
- package/lib/driftClientConfig.d.ts +3 -0
- package/lib/idl/drift.json +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/serum/serumSubscriber.d.ts +5 -1
- package/lib/serum/serumSubscriber.js +22 -0
- package/lib/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/assert/assert.js +9 -0
- package/src/config.ts +3 -0
- package/src/constants/spotMarkets.ts +4 -0
- package/src/dlob/DLOB.ts +177 -17
- package/src/dlob/DLOBApiClient.ts +3 -1
- package/src/dlob/DLOBSubscriber.ts +141 -0
- package/src/dlob/orderBookLevels.ts +243 -0
- package/src/dlob/types.ts +2 -0
- package/src/driftClient.ts +231 -66
- package/src/driftClientConfig.ts +3 -0
- package/src/idl/drift.json +1 -1
- package/src/index.ts +1 -0
- package/src/serum/serumSubscriber.ts +29 -1
- package/src/token/index.js +38 -0
- package/src/types.ts +1 -0
- package/src/util/computeUnits.js +27 -0
- package/src/util/getTokenAddress.js +9 -0
- package/src/util/promiseTimeout.js +14 -0
- package/src/util/tps.js +27 -0
- package/tests/dlob/helpers.ts +3 -0
package/tests/dlob/helpers.ts
CHANGED
|
@@ -254,6 +254,7 @@ export const mockSpotMarkets: Array<SpotMarketAccount> = [
|
|
|
254
254
|
{
|
|
255
255
|
status: MarketStatus.ACTIVE,
|
|
256
256
|
assetTier: AssetTier.COLLATERAL,
|
|
257
|
+
name: [],
|
|
257
258
|
maxTokenDeposits: new BN(100),
|
|
258
259
|
marketIndex: 0,
|
|
259
260
|
pubkey: PublicKey.default,
|
|
@@ -328,6 +329,7 @@ export const mockSpotMarkets: Array<SpotMarketAccount> = [
|
|
|
328
329
|
{
|
|
329
330
|
status: MarketStatus.ACTIVE,
|
|
330
331
|
assetTier: AssetTier.CROSS,
|
|
332
|
+
name: [],
|
|
331
333
|
maxTokenDeposits: new BN(100),
|
|
332
334
|
marketIndex: 1,
|
|
333
335
|
pubkey: PublicKey.default,
|
|
@@ -402,6 +404,7 @@ export const mockSpotMarkets: Array<SpotMarketAccount> = [
|
|
|
402
404
|
{
|
|
403
405
|
status: MarketStatus.ACTIVE,
|
|
404
406
|
assetTier: AssetTier.PROTECTED,
|
|
407
|
+
name: [],
|
|
405
408
|
maxTokenDeposits: new BN(100),
|
|
406
409
|
marketIndex: 2,
|
|
407
410
|
pubkey: PublicKey.default,
|