@drift-labs/sdk 2.29.0 → 2.30.0-beta.0

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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { AnchorProvider, BN, Program, ProgramAccount } from '@coral-xyz/anchor';
3
- import { StateAccount, IWallet, PositionDirection, UserAccount, PerpMarketAccount, OrderParams, Order, SpotMarketAccount, SpotPosition, MakerInfo, TakerInfo, OptionalOrderParams, ReferrerInfo, MarketType, TxParams, SerumV3FulfillmentConfigAccount, ReferrerNameAccount, OrderTriggerCondition, PerpMarketExtendedInfo, UserStatsAccount, ModifyOrderParams, PhoenixV1FulfillmentConfigAccount } from './types';
3
+ import { StateAccount, IWallet, PositionDirection, UserAccount, PerpMarketAccount, OrderParams, Order, SpotMarketAccount, SpotPosition, MakerInfo, TakerInfo, OptionalOrderParams, ReferrerInfo, MarketType, TxParams, SerumV3FulfillmentConfigAccount, ReferrerNameAccount, OrderTriggerCondition, PerpMarketExtendedInfo, UserStatsAccount, PhoenixV1FulfillmentConfigAccount, ModifyOrderPolicy } from './types';
4
4
  import * as anchor from '@coral-xyz/anchor';
5
5
  import { Connection, PublicKey, TransactionSignature, ConfirmOptions, Transaction, TransactionInstruction, AccountMeta, Signer, AddressLookupTableAccount, TransactionVersion, VersionedTransaction } from '@solana/web3.js';
6
6
  import { TokenFaucet } from './tokenFaucet';
@@ -345,7 +345,7 @@ export declare class DriftClient {
345
345
  postOnly?: boolean;
346
346
  immediateOrCancel?: boolean;
347
347
  maxTs?: BN;
348
- policy?: ModifyOrderParams;
348
+ policy?: ModifyOrderPolicy;
349
349
  }, txParams?: TxParams): Promise<TransactionSignature>;
350
350
  getModifyOrderIx({ orderId, newDirection, newBaseAmount, newLimitPrice, newOraclePriceOffset, newTriggerPrice, newTriggerCondition, auctionDuration, auctionStartPrice, auctionEndPrice, reduceOnly, postOnly, immediateOrCancel, maxTs, policy, }: {
351
351
  orderId: number;
@@ -362,7 +362,7 @@ export declare class DriftClient {
362
362
  postOnly?: boolean;
363
363
  immediateOrCancel?: boolean;
364
364
  maxTs?: BN;
365
- policy?: ModifyOrderParams;
365
+ policy?: ModifyOrderPolicy;
366
366
  }): Promise<TransactionInstruction>;
367
367
  /**
368
368
  * Modifies an open order by closing it and replacing it with a new order.
@@ -396,7 +396,7 @@ export declare class DriftClient {
396
396
  reduceOnly?: boolean;
397
397
  postOnly?: boolean;
398
398
  immediateOrCancel?: boolean;
399
- policy?: ModifyOrderParams;
399
+ policy?: ModifyOrderPolicy;
400
400
  maxTs?: BN;
401
401
  }, txParams?: TxParams): Promise<TransactionSignature>;
402
402
  getModifyOrderByUserIdIx({ userOrderId, newDirection, newBaseAmount, newLimitPrice, newOraclePriceOffset, newTriggerPrice, newTriggerCondition, auctionDuration, auctionStartPrice, auctionEndPrice, reduceOnly, postOnly, immediateOrCancel, maxTs, policy, }: {
@@ -413,7 +413,7 @@ export declare class DriftClient {
413
413
  reduceOnly?: boolean;
414
414
  postOnly?: boolean;
415
415
  immediateOrCancel?: boolean;
416
- policy?: ModifyOrderParams;
416
+ policy?: ModifyOrderPolicy;
417
417
  maxTs?: BN;
418
418
  txParams?: TxParams;
419
419
  }): Promise<TransactionInstruction>;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.29.0",
2
+ "version": "2.30.0-beta.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.29.0",
3
+ "version": "2.30.0-beta.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -38,6 +38,7 @@ import {
38
38
  UserStatsAccount,
39
39
  ModifyOrderParams,
40
40
  PhoenixV1FulfillmentConfigAccount,
41
+ ModifyOrderPolicy,
41
42
  } from './types';
42
43
  import * as anchor from '@coral-xyz/anchor';
43
44
  import driftIDL from './idl/drift.json';
@@ -3839,7 +3840,7 @@ export class DriftClient {
3839
3840
  postOnly?: boolean;
3840
3841
  immediateOrCancel?: boolean;
3841
3842
  maxTs?: BN;
3842
- policy?: ModifyOrderParams;
3843
+ policy?: ModifyOrderPolicy;
3843
3844
  },
3844
3845
  txParams?: TxParams
3845
3846
  ): Promise<TransactionSignature> {
@@ -3885,7 +3886,7 @@ export class DriftClient {
3885
3886
  postOnly?: boolean;
3886
3887
  immediateOrCancel?: boolean;
3887
3888
  maxTs?: BN;
3888
- policy?: ModifyOrderParams;
3889
+ policy?: ModifyOrderPolicy;
3889
3890
  }): Promise<TransactionInstruction> {
3890
3891
  const userAccountPublicKey = await this.getUserAccountPublicKey();
3891
3892
 
@@ -3955,7 +3956,7 @@ export class DriftClient {
3955
3956
  reduceOnly?: boolean;
3956
3957
  postOnly?: boolean;
3957
3958
  immediateOrCancel?: boolean;
3958
- policy?: ModifyOrderParams;
3959
+ policy?: ModifyOrderPolicy;
3959
3960
  maxTs?: BN;
3960
3961
  },
3961
3962
  txParams?: TxParams
@@ -4001,7 +4002,7 @@ export class DriftClient {
4001
4002
  reduceOnly?: boolean;
4002
4003
  postOnly?: boolean;
4003
4004
  immediateOrCancel?: boolean;
4004
- policy?: ModifyOrderParams;
4005
+ policy?: ModifyOrderPolicy;
4005
4006
  maxTs?: BN;
4006
4007
  txParams?: TxParams;
4007
4008
  }): Promise<TransactionInstruction> {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.29.0",
2
+ "version": "2.30.0-beta.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {