@drift-labs/sdk 2.76.0-beta.4 → 2.76.0-beta.6

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.76.0-beta.4
1
+ 2.76.0-beta.6
@@ -258,7 +258,7 @@ exports.DevnetPerpMarkets = [
258
258
  exports.MainnetPerpMarkets = [
259
259
  {
260
260
  fullName: 'Solana',
261
- category: ['L1', 'Infra'],
261
+ category: ['L1', 'Infra', 'Solana'],
262
262
  symbol: 'SOL-PERP',
263
263
  baseAssetSymbol: 'SOL',
264
264
  marketIndex: 0,
@@ -298,7 +298,7 @@ exports.MainnetPerpMarkets = [
298
298
  },
299
299
  {
300
300
  fullName: 'Bonk',
301
- category: ['Meme'],
301
+ category: ['Meme', 'Solana'],
302
302
  symbol: '1MBONK-PERP',
303
303
  baseAssetSymbol: '1MBONK',
304
304
  marketIndex: 4,
@@ -378,7 +378,7 @@ exports.MainnetPerpMarkets = [
378
378
  },
379
379
  {
380
380
  fullName: 'RNDR',
381
- category: ['Infra'],
381
+ category: ['Infra', 'Solana'],
382
382
  symbol: 'RNDR-PERP',
383
383
  baseAssetSymbol: 'RNDR',
384
384
  marketIndex: 12,
@@ -398,7 +398,7 @@ exports.MainnetPerpMarkets = [
398
398
  },
399
399
  {
400
400
  fullName: 'HNT',
401
- category: ['IoT'],
401
+ category: ['IoT', 'Solana'],
402
402
  symbol: 'HNT-PERP',
403
403
  baseAssetSymbol: 'HNT',
404
404
  marketIndex: 14,
@@ -438,7 +438,7 @@ exports.MainnetPerpMarkets = [
438
438
  },
439
439
  {
440
440
  fullName: 'Pyth',
441
- category: ['Oracle'],
441
+ category: ['Oracle', 'Solana'],
442
442
  symbol: 'PYTH-PERP',
443
443
  baseAssetSymbol: 'PYTH',
444
444
  marketIndex: 18,
@@ -458,7 +458,7 @@ exports.MainnetPerpMarkets = [
458
458
  },
459
459
  {
460
460
  fullName: 'Jito',
461
- category: ['MEV'],
461
+ category: ['MEV', 'Solana'],
462
462
  symbol: 'JTO-PERP',
463
463
  baseAssetSymbol: 'JTO',
464
464
  marketIndex: 20,
@@ -488,7 +488,7 @@ exports.MainnetPerpMarkets = [
488
488
  },
489
489
  {
490
490
  fullName: 'WIF',
491
- category: ['Meme', 'Dog'],
491
+ category: ['Meme', 'Dog', 'Solana'],
492
492
  symbol: 'WIF-PERP',
493
493
  baseAssetSymbol: 'WIF',
494
494
  marketIndex: 23,
@@ -498,7 +498,7 @@ exports.MainnetPerpMarkets = [
498
498
  },
499
499
  {
500
500
  fullName: 'JUP',
501
- category: ['Exchange', 'Infra'],
501
+ category: ['Exchange', 'Infra', 'Solana'],
502
502
  symbol: 'JUP-PERP',
503
503
  baseAssetSymbol: 'JUP',
504
504
  marketIndex: 24,
@@ -536,6 +536,16 @@ exports.MainnetPerpMarkets = [
536
536
  launchTs: 1710418343000,
537
537
  oracleSource: __1.OracleSource.PYTH,
538
538
  },
539
+ {
540
+ fullName: 'Kamino',
541
+ category: ['Lending', 'Solana'],
542
+ symbol: 'KMNO-PERP',
543
+ baseAssetSymbol: 'KMNO',
544
+ marketIndex: 28,
545
+ oracle: new web3_js_1.PublicKey('sDAQaZQJQ4RXAxH3x526mbEXyQZT15ktkL84d7hmk7M'),
546
+ launchTs: 1712240681000,
547
+ oracleSource: __1.OracleSource.Prelaunch,
548
+ },
539
549
  ];
540
550
  exports.PerpMarkets = {
541
551
  devnet: exports.DevnetPerpMarkets,
@@ -8,7 +8,7 @@ const baseTxSender_1 = require("./baseTxSender");
8
8
  const DEFAULT_TIMEOUT = 35000;
9
9
  const DEFAULT_BLOCKHASH_REFRESH = 10000;
10
10
  class FastSingleTxSender extends baseTxSender_1.BaseTxSender {
11
- constructor({ connection, wallet, opts = anchor_1.AnchorProvider.defaultOptions(), timeout = DEFAULT_TIMEOUT, blockhashRefreshInterval = DEFAULT_BLOCKHASH_REFRESH, additionalConnections = new Array(), skipConfirmation = false, blockhashCommitment = 'finalized', confirmationStrategy = types_1.ConfirmationStrategy.Combo, }) {
11
+ constructor({ connection, wallet, opts = { ...anchor_1.AnchorProvider.defaultOptions(), maxRetries: 0 }, timeout = DEFAULT_TIMEOUT, blockhashRefreshInterval = DEFAULT_BLOCKHASH_REFRESH, additionalConnections = new Array(), skipConfirmation = false, blockhashCommitment = 'finalized', confirmationStrategy = types_1.ConfirmationStrategy.Combo, }) {
12
12
  super({
13
13
  connection,
14
14
  wallet,
@@ -5,9 +5,9 @@ const types_1 = require("./types");
5
5
  const anchor_1 = require("@coral-xyz/anchor");
6
6
  const baseTxSender_1 = require("./baseTxSender");
7
7
  const DEFAULT_TIMEOUT = 35000;
8
- const DEFAULT_RETRY = 8000;
8
+ const DEFAULT_RETRY = 3000;
9
9
  class RetryTxSender extends baseTxSender_1.BaseTxSender {
10
- constructor({ connection, wallet, opts = anchor_1.AnchorProvider.defaultOptions(), timeout = DEFAULT_TIMEOUT, retrySleep = DEFAULT_RETRY, additionalConnections = new Array(), confirmationStrategy = types_1.ConfirmationStrategy.Combo, additionalTxSenderCallbacks = [], }) {
10
+ constructor({ connection, wallet, opts = { ...anchor_1.AnchorProvider.defaultOptions(), maxRetries: 0 }, timeout = DEFAULT_TIMEOUT, retrySleep = DEFAULT_RETRY, additionalConnections = new Array(), confirmationStrategy = types_1.ConfirmationStrategy.Combo, additionalTxSenderCallbacks = [], }) {
11
11
  super({
12
12
  connection,
13
13
  wallet,
@@ -8,9 +8,9 @@ const web3_js_1 = require("@solana/web3.js");
8
8
  const anchor_1 = require("@coral-xyz/anchor");
9
9
  const baseTxSender_1 = require("./baseTxSender");
10
10
  const bs58_1 = __importDefault(require("bs58"));
11
- const DEFAULT_RETRY = 8000;
11
+ const DEFAULT_RETRY = 3000;
12
12
  class WhileValidTxSender extends baseTxSender_1.BaseTxSender {
13
- constructor({ connection, wallet, opts = anchor_1.AnchorProvider.defaultOptions(), retrySleep = DEFAULT_RETRY, additionalConnections = new Array(), additionalTxSenderCallbacks = [], }) {
13
+ constructor({ connection, wallet, opts = { ...anchor_1.AnchorProvider.defaultOptions(), maxRetries: 0 }, retrySleep = DEFAULT_RETRY, additionalConnections = new Array(), additionalTxSenderCallbacks = [], }) {
14
14
  super({
15
15
  connection,
16
16
  wallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.76.0-beta.4",
3
+ "version": "2.76.0-beta.6",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -269,7 +269,7 @@ export const DevnetPerpMarkets: PerpMarketConfig[] = [
269
269
  export const MainnetPerpMarkets: PerpMarketConfig[] = [
270
270
  {
271
271
  fullName: 'Solana',
272
- category: ['L1', 'Infra'],
272
+ category: ['L1', 'Infra', 'Solana'],
273
273
  symbol: 'SOL-PERP',
274
274
  baseAssetSymbol: 'SOL',
275
275
  marketIndex: 0,
@@ -309,7 +309,7 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
309
309
  },
310
310
  {
311
311
  fullName: 'Bonk',
312
- category: ['Meme'],
312
+ category: ['Meme', 'Solana'],
313
313
  symbol: '1MBONK-PERP',
314
314
  baseAssetSymbol: '1MBONK',
315
315
  marketIndex: 4,
@@ -389,7 +389,7 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
389
389
  },
390
390
  {
391
391
  fullName: 'RNDR',
392
- category: ['Infra'],
392
+ category: ['Infra', 'Solana'],
393
393
  symbol: 'RNDR-PERP',
394
394
  baseAssetSymbol: 'RNDR',
395
395
  marketIndex: 12,
@@ -409,7 +409,7 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
409
409
  },
410
410
  {
411
411
  fullName: 'HNT',
412
- category: ['IoT'],
412
+ category: ['IoT', 'Solana'],
413
413
  symbol: 'HNT-PERP',
414
414
  baseAssetSymbol: 'HNT',
415
415
  marketIndex: 14,
@@ -449,7 +449,7 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
449
449
  },
450
450
  {
451
451
  fullName: 'Pyth',
452
- category: ['Oracle'],
452
+ category: ['Oracle', 'Solana'],
453
453
  symbol: 'PYTH-PERP',
454
454
  baseAssetSymbol: 'PYTH',
455
455
  marketIndex: 18,
@@ -469,7 +469,7 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
469
469
  },
470
470
  {
471
471
  fullName: 'Jito',
472
- category: ['MEV'],
472
+ category: ['MEV', 'Solana'],
473
473
  symbol: 'JTO-PERP',
474
474
  baseAssetSymbol: 'JTO',
475
475
  marketIndex: 20,
@@ -499,7 +499,7 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
499
499
  },
500
500
  {
501
501
  fullName: 'WIF',
502
- category: ['Meme', 'Dog'],
502
+ category: ['Meme', 'Dog', 'Solana'],
503
503
  symbol: 'WIF-PERP',
504
504
  baseAssetSymbol: 'WIF',
505
505
  marketIndex: 23,
@@ -509,7 +509,7 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
509
509
  },
510
510
  {
511
511
  fullName: 'JUP',
512
- category: ['Exchange', 'Infra'],
512
+ category: ['Exchange', 'Infra', 'Solana'],
513
513
  symbol: 'JUP-PERP',
514
514
  baseAssetSymbol: 'JUP',
515
515
  marketIndex: 24,
@@ -547,6 +547,16 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
547
547
  launchTs: 1710418343000,
548
548
  oracleSource: OracleSource.PYTH,
549
549
  },
550
+ {
551
+ fullName: 'Kamino',
552
+ category: ['Lending', 'Solana'],
553
+ symbol: 'KMNO-PERP',
554
+ baseAssetSymbol: 'KMNO',
555
+ marketIndex: 28,
556
+ oracle: new PublicKey('sDAQaZQJQ4RXAxH3x526mbEXyQZT15ktkL84d7hmk7M'),
557
+ launchTs: 1712240681000,
558
+ oracleSource: OracleSource.Prelaunch,
559
+ },
550
560
  ];
551
561
 
552
562
  export const PerpMarkets: { [key in DriftEnv]: PerpMarketConfig[] } = {
@@ -33,7 +33,7 @@ export class FastSingleTxSender extends BaseTxSender {
33
33
  public constructor({
34
34
  connection,
35
35
  wallet,
36
- opts = AnchorProvider.defaultOptions(),
36
+ opts = { ...AnchorProvider.defaultOptions(), maxRetries: 0 },
37
37
  timeout = DEFAULT_TIMEOUT,
38
38
  blockhashRefreshInterval = DEFAULT_BLOCKHASH_REFRESH,
39
39
  additionalConnections = new Array<Connection>(),
@@ -5,7 +5,7 @@ import { IWallet } from '../types';
5
5
  import { BaseTxSender } from './baseTxSender';
6
6
 
7
7
  const DEFAULT_TIMEOUT = 35000;
8
- const DEFAULT_RETRY = 8000;
8
+ const DEFAULT_RETRY = 3000;
9
9
 
10
10
  type ResolveReference = {
11
11
  resolve?: () => void;
@@ -23,7 +23,7 @@ export class RetryTxSender extends BaseTxSender {
23
23
  public constructor({
24
24
  connection,
25
25
  wallet,
26
- opts = AnchorProvider.defaultOptions(),
26
+ opts = { ...AnchorProvider.defaultOptions(), maxRetries: 0 },
27
27
  timeout = DEFAULT_TIMEOUT,
28
28
  retrySleep = DEFAULT_RETRY,
29
29
  additionalConnections = new Array<Connection>(),
@@ -14,7 +14,7 @@ import { IWallet } from '../types';
14
14
  import { BaseTxSender } from './baseTxSender';
15
15
  import bs58 from 'bs58';
16
16
 
17
- const DEFAULT_RETRY = 8000;
17
+ const DEFAULT_RETRY = 3000;
18
18
 
19
19
  type ResolveReference = {
20
20
  resolve?: () => void;
@@ -36,7 +36,7 @@ export class WhileValidTxSender extends BaseTxSender {
36
36
  public constructor({
37
37
  connection,
38
38
  wallet,
39
- opts = AnchorProvider.defaultOptions(),
39
+ opts = { ...AnchorProvider.defaultOptions(), maxRetries: 0 },
40
40
  retrySleep = DEFAULT_RETRY,
41
41
  additionalConnections = new Array<Connection>(),
42
42
  additionalTxSenderCallbacks = [],