@drift-labs/jit-proxy 0.13.9 → 0.13.11

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.
@@ -45,7 +45,7 @@ export declare class JitProxyClient {
45
45
  programId: PublicKey;
46
46
  });
47
47
  jit(params: JitIxParams, txParams?: TxParams): Promise<TxSigAndSlot>;
48
- jitSwift(params: JitSwiftIxParams, txParams?: TxParams, precedingIxs?: TransactionInstruction[]): Promise<TxSigAndSlot>;
48
+ jitSwift(params: JitSwiftIxParams, txParams?: TxParams): Promise<TxSigAndSlot>;
49
49
  getJitIx({ takerKey, takerStatsKey, taker, takerOrderId, maxPosition, minPosition, bid, ask, postOnly, priceType, referrerInfo, subAccountId, }: JitIxParams): Promise<TransactionInstruction>;
50
50
  getJitSwiftIx({ takerKey, takerStatsKey, taker, maxPosition, minPosition, bid, ask, postOnly, priceType, referrerInfo, subAccountId, uuid, marketIndex, }: JitSwiftIxParams): Promise<TransactionInstruction>;
51
51
  getCheckOrderConstraintIx({ subAccountId, orderConstraints, }: {
@@ -19,15 +19,15 @@ class JitProxyClient {
19
19
  const tx = await this.driftClient.buildTransaction([ix], txParams);
20
20
  return await this.driftClient.sendTransaction(tx);
21
21
  }
22
- async jitSwift(params, txParams, precedingIxs) {
22
+ async jitSwift(params, txParams) {
23
23
  const swiftTakerIxs = await this.driftClient.getPlaceSwiftTakerPerpOrderIxs(params.signedSwiftOrderParams, params.marketIndex, {
24
24
  taker: params.takerKey,
25
25
  takerStats: params.takerStatsKey,
26
26
  takerUserAccount: params.taker,
27
27
  signingAuthority: params.authorityToUse,
28
- }, precedingIxs);
28
+ }, undefined, 3);
29
29
  const ix = await this.getJitSwiftIx(params);
30
- const tx = await this.driftClient.buildTransaction([...swiftTakerIxs, ix], txParams);
30
+ const tx = await this.driftClient.buildTransaction([...swiftTakerIxs, ix], txParams, 0);
31
31
  return await this.driftClient.sendTransaction(tx);
32
32
  }
33
33
  async getJitIx({ takerKey, takerStatsKey, taker, takerOrderId, maxPosition, minPosition, bid, ask, postOnly = null, priceType = PriceType.LIMIT, referrerInfo, subAccountId, }) {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@drift-labs/jit-proxy",
3
- "version": "0.13.9",
3
+ "version": "0.13.11",
4
4
  "scripts": {
5
5
  "clean": "rm -rf lib",
6
6
  "build": "yarn clean && tsc"
7
7
  },
8
8
  "dependencies": {
9
9
  "@coral-xyz/anchor": "0.26.0",
10
- "@drift-labs/sdk": "2.110.0-beta.9",
10
+ "@drift-labs/sdk": "2.110.0-beta.10",
11
11
  "@solana/web3.js": "1.91.7",
12
12
  "tweetnacl-util": "^0.15.1"
13
13
  },
@@ -77,8 +77,7 @@ export class JitProxyClient {
77
77
 
78
78
  public async jitSwift(
79
79
  params: JitSwiftIxParams,
80
- txParams?: TxParams,
81
- precedingIxs?: TransactionInstruction[]
80
+ txParams?: TxParams
82
81
  ): Promise<TxSigAndSlot> {
83
82
  const swiftTakerIxs = await this.driftClient.getPlaceSwiftTakerPerpOrderIxs(
84
83
  params.signedSwiftOrderParams,
@@ -89,13 +88,15 @@ export class JitProxyClient {
89
88
  takerUserAccount: params.taker,
90
89
  signingAuthority: params.authorityToUse,
91
90
  },
92
- precedingIxs
91
+ undefined,
92
+ 3
93
93
  );
94
94
 
95
95
  const ix = await this.getJitSwiftIx(params);
96
96
  const tx = await this.driftClient.buildTransaction(
97
97
  [...swiftTakerIxs, ix],
98
- txParams
98
+ txParams,
99
+ 0
99
100
  );
100
101
  return await this.driftClient.sendTransaction(tx);
101
102
  }