@drift-labs/sdk 2.49.0-beta.12 → 2.49.0-beta.14

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.49.0-beta.12
1
+ 2.49.0-beta.14
@@ -204,6 +204,16 @@ exports.DevnetPerpMarkets = [
204
204
  launchTs: 1701880540000,
205
205
  oracleSource: __1.OracleSource.PYTH,
206
206
  },
207
+ {
208
+ fullName: 'Jito',
209
+ category: ['MEV'],
210
+ symbol: 'JTO-PERP',
211
+ baseAssetSymbol: 'JTO',
212
+ marketIndex: 20,
213
+ oracle: new web3_js_1.PublicKey('29xQnTzyyuRtgJ7RtSKEgBWwRzZqtrrKmyQQ5m3x629f'),
214
+ launchTs: 1701967240000,
215
+ oracleSource: __1.OracleSource.PYTH,
216
+ },
207
217
  ];
208
218
  exports.MainnetPerpMarkets = [
209
219
  {
@@ -406,6 +416,16 @@ exports.MainnetPerpMarkets = [
406
416
  launchTs: 1701880540000,
407
417
  oracleSource: __1.OracleSource.PYTH,
408
418
  },
419
+ {
420
+ fullName: 'Jito',
421
+ category: ['MEV'],
422
+ symbol: 'JTO-PERP',
423
+ baseAssetSymbol: 'JTO',
424
+ marketIndex: 20,
425
+ oracle: new web3_js_1.PublicKey('D8UUgr8a3aR3yUeHLu7v8FWK7E8Y5sSU7qrYBXUJXBQ5'),
426
+ launchTs: 1701967240000,
427
+ oracleSource: __1.OracleSource.PYTH,
428
+ },
409
429
  ];
410
430
  exports.PerpMarkets = {
411
431
  devnet: exports.DevnetPerpMarkets,
@@ -130,6 +130,16 @@ exports.MainnetSpotMarkets = [
130
130
  precisionExp: numericConstants_1.NINE,
131
131
  serumMarket: new web3_js_1.PublicKey('ARjaHVxGCQfTvvKjLd7U7srvk6orthZSE6uqWchCczZc'),
132
132
  },
133
+ {
134
+ symbol: 'JTO',
135
+ marketIndex: 9,
136
+ oracle: new web3_js_1.PublicKey('D8UUgr8a3aR3yUeHLu7v8FWK7E8Y5sSU7qrYBXUJXBQ5'),
137
+ oracleSource: __1.OracleSource.PYTH,
138
+ mint: new web3_js_1.PublicKey('jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL'),
139
+ precision: new __1.BN(10).pow(numericConstants_1.NINE),
140
+ precisionExp: numericConstants_1.NINE,
141
+ serumMarket: new web3_js_1.PublicKey('H87FfmHABiZLRGrDsXRZtqq25YpARzaokCzL1vMYGiep'),
142
+ },
133
143
  ];
134
144
  exports.SpotMarkets = {
135
145
  devnet: exports.DevnetSpotMarkets,
@@ -107,7 +107,7 @@ class OrderSubscriber {
107
107
  order.slot.toNumber() <= slot;
108
108
  });
109
109
  if (newOrders.length > 0) {
110
- this.eventEmitter.emit('onUpdate', userAccount, newOrders, new web3_js_1.PublicKey(key), slot);
110
+ this.eventEmitter.emit('onUpdate', userAccount, newOrders, new web3_js_1.PublicKey(key), slot, dataType);
111
111
  }
112
112
  if (userAccount.hasOpenOrder) {
113
113
  this.usersAccounts.set(key, { slot, userAccount });
@@ -15,5 +15,5 @@ export type OrderSubscriberConfig = {
15
15
  };
16
16
  };
17
17
  export interface OrderSubscriberEvents {
18
- onUpdate: (account: UserAccount, updatedOrders: Order[], pubkey: PublicKey, slot: number) => void;
18
+ onUpdate: (account: UserAccount, updatedOrders: Order[], pubkey: PublicKey, slot: number, dataType: 'raw' | 'decoded') => void;
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.49.0-beta.12",
3
+ "version": "2.49.0-beta.14",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -214,6 +214,16 @@ export const DevnetPerpMarkets: PerpMarketConfig[] = [
214
214
  launchTs: 1701880540000,
215
215
  oracleSource: OracleSource.PYTH,
216
216
  },
217
+ {
218
+ fullName: 'Jito',
219
+ category: ['MEV'],
220
+ symbol: 'JTO-PERP',
221
+ baseAssetSymbol: 'JTO',
222
+ marketIndex: 20,
223
+ oracle: new PublicKey('29xQnTzyyuRtgJ7RtSKEgBWwRzZqtrrKmyQQ5m3x629f'),
224
+ launchTs: 1701967240000,
225
+ oracleSource: OracleSource.PYTH,
226
+ },
217
227
  ];
218
228
 
219
229
  export const MainnetPerpMarkets: PerpMarketConfig[] = [
@@ -417,6 +427,16 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
417
427
  launchTs: 1701880540000,
418
428
  oracleSource: OracleSource.PYTH,
419
429
  },
430
+ {
431
+ fullName: 'Jito',
432
+ category: ['MEV'],
433
+ symbol: 'JTO-PERP',
434
+ baseAssetSymbol: 'JTO',
435
+ marketIndex: 20,
436
+ oracle: new PublicKey('D8UUgr8a3aR3yUeHLu7v8FWK7E8Y5sSU7qrYBXUJXBQ5'),
437
+ launchTs: 1701967240000,
438
+ oracleSource: OracleSource.PYTH,
439
+ },
420
440
  ];
421
441
 
422
442
  export const PerpMarkets: { [key in DriftEnv]: PerpMarketConfig[] } = {
@@ -160,6 +160,16 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
160
160
  precisionExp: NINE,
161
161
  serumMarket: new PublicKey('ARjaHVxGCQfTvvKjLd7U7srvk6orthZSE6uqWchCczZc'),
162
162
  },
163
+ {
164
+ symbol: 'JTO',
165
+ marketIndex: 9,
166
+ oracle: new PublicKey('D8UUgr8a3aR3yUeHLu7v8FWK7E8Y5sSU7qrYBXUJXBQ5'),
167
+ oracleSource: OracleSource.PYTH,
168
+ mint: new PublicKey('jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL'),
169
+ precision: new BN(10).pow(NINE),
170
+ precisionExp: NINE,
171
+ serumMarket: new PublicKey('H87FfmHABiZLRGrDsXRZtqq25YpARzaokCzL1vMYGiep'),
172
+ },
163
173
  ];
164
174
 
165
175
  export const SpotMarkets: { [key in DriftEnv]: SpotMarketConfig[] } = {
@@ -163,7 +163,8 @@ export class OrderSubscriber {
163
163
  userAccount,
164
164
  newOrders,
165
165
  new PublicKey(key),
166
- slot
166
+ slot,
167
+ dataType
167
168
  );
168
169
  }
169
170
  if (userAccount.hasOpenOrder) {
@@ -23,6 +23,7 @@ export interface OrderSubscriberEvents {
23
23
  account: UserAccount,
24
24
  updatedOrders: Order[],
25
25
  pubkey: PublicKey,
26
- slot: number
26
+ slot: number,
27
+ dataType: 'raw' | 'decoded'
27
28
  ) => void;
28
29
  }