@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.
Files changed (42) hide show
  1. package/lib/config.d.ts +1 -0
  2. package/lib/config.js +2 -0
  3. package/lib/constants/spotMarkets.d.ts +1 -0
  4. package/lib/constants/spotMarkets.js +1 -0
  5. package/lib/dlob/DLOB.d.ts +38 -2
  6. package/lib/dlob/DLOB.js +69 -0
  7. package/lib/dlob/DLOBApiClient.js +1 -1
  8. package/lib/dlob/DLOBSubscriber.d.ts +34 -0
  9. package/lib/dlob/DLOBSubscriber.js +100 -0
  10. package/lib/dlob/orderBookLevels.d.ts +44 -0
  11. package/lib/dlob/orderBookLevels.js +137 -0
  12. package/lib/dlob/types.d.ts +2 -0
  13. package/lib/driftClient.d.ts +28 -10
  14. package/lib/driftClient.js +158 -55
  15. package/lib/driftClientConfig.d.ts +3 -0
  16. package/lib/idl/drift.json +1 -1
  17. package/lib/index.d.ts +1 -0
  18. package/lib/index.js +1 -0
  19. package/lib/serum/serumSubscriber.d.ts +5 -1
  20. package/lib/serum/serumSubscriber.js +22 -0
  21. package/lib/types.d.ts +1 -0
  22. package/package.json +1 -1
  23. package/src/assert/assert.js +9 -0
  24. package/src/config.ts +3 -0
  25. package/src/constants/spotMarkets.ts +4 -0
  26. package/src/dlob/DLOB.ts +177 -17
  27. package/src/dlob/DLOBApiClient.ts +3 -1
  28. package/src/dlob/DLOBSubscriber.ts +141 -0
  29. package/src/dlob/orderBookLevels.ts +243 -0
  30. package/src/dlob/types.ts +2 -0
  31. package/src/driftClient.ts +231 -66
  32. package/src/driftClientConfig.ts +3 -0
  33. package/src/idl/drift.json +1 -1
  34. package/src/index.ts +1 -0
  35. package/src/serum/serumSubscriber.ts +29 -1
  36. package/src/token/index.js +38 -0
  37. package/src/types.ts +1 -0
  38. package/src/util/computeUnits.js +27 -0
  39. package/src/util/getTokenAddress.js +9 -0
  40. package/src/util/promiseTimeout.js +14 -0
  41. package/src/util/tps.js +27 -0
  42. package/tests/dlob/helpers.ts +3 -0
@@ -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,