@drift-labs/sdk 2.86.0-beta.24 → 2.86.0-beta.26

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.
@@ -29,6 +29,7 @@ import {
29
29
  getPhoenixFulfillmentConfigPublicKey,
30
30
  getProtocolIfSharesTransferConfigPublicKey,
31
31
  getPrelaunchOraclePublicKey,
32
+ getOpenbookV2FulfillmentConfigPublicKey,
32
33
  getPythPullOraclePublicKey,
33
34
  getUserStatsAccountPublicKey,
34
35
  } from './addresses/pda';
@@ -49,6 +50,10 @@ import { PROGRAM_ID as PHOENIX_PROGRAM_ID } from '@ellipsis-labs/phoenix-sdk';
49
50
  import { DRIFT_ORACLE_RECEIVER_ID } from './config';
50
51
  import { getFeedIdUint8Array } from './util/pythPullOracleUtils';
51
52
 
53
+ const OPENBOOK_PROGRAM_ID = new PublicKey(
54
+ 'opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb'
55
+ );
56
+
52
57
  export class AdminClient extends DriftClient {
53
58
  public async initialize(
54
59
  usdcMint: PublicKey,
@@ -386,6 +391,52 @@ export class AdminClient extends DriftClient {
386
391
  );
387
392
  }
388
393
 
394
+ public async initializeOpenbookV2FulfillmentConfig(
395
+ marketIndex: number,
396
+ openbookMarket: PublicKey
397
+ ): Promise<TransactionSignature> {
398
+ const initializeIx = await this.getInitializeOpenbookV2FulfillmentConfigIx(
399
+ marketIndex,
400
+ openbookMarket
401
+ );
402
+
403
+ const tx = await this.buildTransaction(initializeIx);
404
+
405
+ const { txSig } = await this.sendTransaction(tx, [], this.opts);
406
+
407
+ return txSig;
408
+ }
409
+
410
+ public async getInitializeOpenbookV2FulfillmentConfigIx(
411
+ marketIndex: number,
412
+ openbookMarket: PublicKey
413
+ ): Promise<TransactionInstruction> {
414
+ const openbookFulfillmentConfig = getOpenbookV2FulfillmentConfigPublicKey(
415
+ this.program.programId,
416
+ openbookMarket
417
+ );
418
+
419
+ return this.program.instruction.initializeOpenbookV2FulfillmentConfig(
420
+ marketIndex,
421
+ {
422
+ accounts: {
423
+ baseSpotMarket: this.getSpotMarketAccount(marketIndex).pubkey,
424
+ quoteSpotMarket: this.getQuoteSpotMarketAccount().pubkey,
425
+ state: await this.getStatePublicKey(),
426
+ openbookV2Program: OPENBOOK_PROGRAM_ID,
427
+ openbookV2Market: openbookMarket,
428
+ driftSigner: this.getSignerPublicKey(),
429
+ openbookV2FulfillmentConfig: openbookFulfillmentConfig,
430
+ admin: this.isSubscribed
431
+ ? this.getStateAccount().admin
432
+ : this.wallet.publicKey,
433
+ rent: SYSVAR_RENT_PUBKEY,
434
+ systemProgram: anchor.web3.SystemProgram.programId,
435
+ },
436
+ }
437
+ );
438
+ }
439
+
389
440
  public async initializePerpMarket(
390
441
  marketIndex: number,
391
442
  priceOracle: PublicKey,
@@ -552,9 +552,9 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
552
552
  symbol: 'PYTH-PERP',
553
553
  baseAssetSymbol: 'PYTH',
554
554
  marketIndex: 18,
555
- oracle: new PublicKey('nrYkQQQur7z8rYTST3G9GqATviK5SxTDkrqd21MW6Ue'),
555
+ oracle: new PublicKey('GqkCu7CbsPVz1H6W6AAHuReqbJckYG59TXz7Y5HDV7hr'),
556
556
  launchTs: 1700542800000,
557
- oracleSource: OracleSource.PYTH,
557
+ oracleSource: OracleSource.PYTH_PULL,
558
558
  pythFeedId:
559
559
  '0x0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff',
560
560
  },
@@ -564,9 +564,9 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
564
564
  symbol: 'TIA-PERP',
565
565
  baseAssetSymbol: 'TIA',
566
566
  marketIndex: 19,
567
- oracle: new PublicKey('funeUsHgi2QKkLdUPASRLuYkaK8JaazCEz3HikbkhVt'),
567
+ oracle: new PublicKey('C6LHPUrgjrgo5eNUitC8raNEdEttfoRhmqdJ3BHVBJhi'),
568
568
  launchTs: 1701880540000,
569
- oracleSource: OracleSource.PYTH,
569
+ oracleSource: OracleSource.PYTH_PULL,
570
570
  pythFeedId:
571
571
  '0x09f7c1d7dfbb7df2b8fe3d3d87ee94a2259d212da4f30c1f0540d066dfa44723',
572
572
  },
@@ -612,9 +612,9 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
612
612
  symbol: 'WIF-PERP',
613
613
  baseAssetSymbol: 'WIF',
614
614
  marketIndex: 23,
615
- oracle: new PublicKey('6ABgrEZk8urs6kJ1JNdC1sspH5zKXRqxy8sg3ZG2cQps'),
615
+ oracle: new PublicKey('6x6KfE7nY2xoLCRSMPT1u83wQ5fpGXoKNBqFjrCwzsCQ'),
616
616
  launchTs: 1706219971000,
617
- oracleSource: OracleSource.PYTH,
617
+ oracleSource: OracleSource.PYTH_PULL,
618
618
  pythFeedId:
619
619
  '0x4ca4beeca86f0d164160323817a4e42b10010a724c2217c6ee41b54cd4cc61fc',
620
620
  },
@@ -624,9 +624,9 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
624
624
  symbol: 'JUP-PERP',
625
625
  baseAssetSymbol: 'JUP',
626
626
  marketIndex: 24,
627
- oracle: new PublicKey('g6eRCbboSwK4tSWngn773RCMexr1APQr4uA9bGZBYfo'),
627
+ oracle: new PublicKey('AwqRpfJ36jnSZQykyL1jYY35mhMteeEAjh7o8LveRQin'),
628
628
  launchTs: 1706713201000,
629
- oracleSource: OracleSource.PYTH,
629
+ oracleSource: OracleSource.PYTH_PULL,
630
630
  pythFeedId:
631
631
  '0x0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996',
632
632
  },
@@ -696,9 +696,9 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
696
696
  symbol: 'DRIFT-PERP',
697
697
  baseAssetSymbol: 'DRIFT',
698
698
  marketIndex: 30,
699
- oracle: new PublicKey('PeNpQeGEm9UEFJ6MBCMauY4WW4h3YxoESPWbsqVKucE'),
699
+ oracle: new PublicKey('23KmX7SNikmUr2axSCy6Zer7XPBnvmVcASALnDGqBVRR'),
700
700
  launchTs: 1716595200000,
701
- oracleSource: OracleSource.SWITCHBOARD,
701
+ oracleSource: OracleSource.PYTH_PULL,
702
702
  pythFeedId:
703
703
  '0x5c1690b27bb02446db17cdda13ccc2c1d609ad6d2ef5bf4983a85ea8b6f19d07',
704
704
  },
@@ -742,9 +742,9 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
742
742
  symbol: 'POPCAT-PERP',
743
743
  baseAssetSymbol: 'POPCAT',
744
744
  marketIndex: 34,
745
- oracle: new PublicKey('3GjpjC8TWsPqjyFSiR7saGxgzD8zqYJNsBnWpenZPEBy'),
745
+ oracle: new PublicKey('H3pn43tkNvsG5z3qzmERguSvKoyHZvvY6VPmNrJqiW5X'),
746
746
  launchTs: 1720013054000,
747
- oracleSource: OracleSource.SWITCHBOARD,
747
+ oracleSource: OracleSource.PYTH_PULL,
748
748
  pythFeedId:
749
749
  '0xb9312a7ee50e189ef045aa3c7842e099b061bd9bdc99ac645956c3b660dc8cce',
750
750
  },
@@ -165,8 +165,8 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
165
165
  {
166
166
  symbol: 'PYTH',
167
167
  marketIndex: 7,
168
- oracle: new PublicKey('nrYkQQQur7z8rYTST3G9GqATviK5SxTDkrqd21MW6Ue'),
169
- oracleSource: OracleSource.PYTH,
168
+ oracle: new PublicKey('GqkCu7CbsPVz1H6W6AAHuReqbJckYG59TXz7Y5HDV7hr'),
169
+ oracleSource: OracleSource.PYTH_PULL,
170
170
  mint: new PublicKey('HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3'),
171
171
  precision: new BN(10).pow(SIX),
172
172
  precisionExp: SIX,
@@ -207,8 +207,8 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
207
207
  {
208
208
  symbol: 'WIF',
209
209
  marketIndex: 10,
210
- oracle: new PublicKey('6ABgrEZk8urs6kJ1JNdC1sspH5zKXRqxy8sg3ZG2cQps'),
211
- oracleSource: OracleSource.PYTH,
210
+ oracle: new PublicKey('6x6KfE7nY2xoLCRSMPT1u83wQ5fpGXoKNBqFjrCwzsCQ'),
211
+ oracleSource: OracleSource.PYTH_PULL,
212
212
  mint: new PublicKey('EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm'),
213
213
  precision: new BN(10).pow(SIX),
214
214
  precisionExp: SIX,
@@ -222,8 +222,8 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
222
222
  {
223
223
  symbol: 'JUP',
224
224
  marketIndex: 11,
225
- oracle: new PublicKey('g6eRCbboSwK4tSWngn773RCMexr1APQr4uA9bGZBYfo'),
226
- oracleSource: OracleSource.PYTH,
225
+ oracle: new PublicKey('AwqRpfJ36jnSZQykyL1jYY35mhMteeEAjh7o8LveRQin'),
226
+ oracleSource: OracleSource.PYTH_PULL,
227
227
  mint: new PublicKey('JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN'),
228
228
  precision: new BN(10).pow(SIX),
229
229
  precisionExp: SIX,
@@ -280,8 +280,8 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
280
280
  {
281
281
  symbol: 'DRIFT',
282
282
  marketIndex: 15,
283
- oracle: new PublicKey('PeNpQeGEm9UEFJ6MBCMauY4WW4h3YxoESPWbsqVKucE'),
284
- oracleSource: OracleSource.SWITCHBOARD,
283
+ oracle: new PublicKey('23KmX7SNikmUr2axSCy6Zer7XPBnvmVcASALnDGqBVRR'),
284
+ oracleSource: OracleSource.PYTH_PULL,
285
285
  mint: new PublicKey('DriFtupJYLTosbwoN8koMbEYSx54aFAVLddWsbksjwg7'),
286
286
  precision: new BN(10).pow(SIX),
287
287
  precisionExp: SIX,
@@ -339,8 +339,8 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
339
339
  {
340
340
  symbol: 'POPCAT',
341
341
  marketIndex: 20,
342
- oracle: new PublicKey('3GjpjC8TWsPqjyFSiR7saGxgzD8zqYJNsBnWpenZPEBy'),
343
- oracleSource: OracleSource.SWITCHBOARD,
342
+ oracle: new PublicKey('H3pn43tkNvsG5z3qzmERguSvKoyHZvvY6VPmNrJqiW5X'),
343
+ oracleSource: OracleSource.PYTH_PULL,
344
344
  mint: new PublicKey('7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr'),
345
345
  precision: new BN(10).pow(NINE),
346
346
  precisionExp: NINE,
@@ -348,6 +348,8 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
348
348
  phoenixMarket: new PublicKey(
349
349
  '31XgvAQ1HgFQEk31KdszbPkVXKaQqB1bgYZPoDrFpSR2'
350
350
  ),
351
+ pythFeedId:
352
+ '0xb9312a7ee50e189ef045aa3c7842e099b061bd9bdc99ac645956c3b660dc8cce',
351
353
  },
352
354
  ];
353
355
 
@@ -45,6 +45,7 @@ import {
45
45
  SettlePnlMode,
46
46
  SignedTxData,
47
47
  MappedRecord,
48
+ OpenbookV2FulfillmentConfigAccount,
48
49
  } from './types';
49
50
  import * as anchor from '@coral-xyz/anchor';
50
51
  import driftIDL from './idl/drift.json';
@@ -74,6 +75,7 @@ import {
74
75
  getDriftSignerPublicKey,
75
76
  getDriftStateAccountPublicKey,
76
77
  getInsuranceFundStakeAccountPublicKey,
78
+ getOpenbookV2FulfillmentConfigPublicKey,
77
79
  getPerpMarketPublicKey,
78
80
  getPhoenixFulfillmentConfigPublicKey,
79
81
  getPythPullOraclePublicKey,
@@ -575,6 +577,28 @@ export class DriftClient {
575
577
  ) as PhoenixV1FulfillmentConfigAccount[];
576
578
  }
577
579
 
580
+ public async getOpenbookV2FulfillmentConfig(
581
+ openbookMarket: PublicKey
582
+ ): Promise<OpenbookV2FulfillmentConfigAccount> {
583
+ const address = getOpenbookV2FulfillmentConfigPublicKey(
584
+ this.program.programId,
585
+ openbookMarket
586
+ );
587
+ return (await this.program.account.openbookV2FulfillmentConfig.fetch(
588
+ address
589
+ )) as OpenbookV2FulfillmentConfigAccount;
590
+ }
591
+
592
+ public async getOpenbookV2FulfillmentConfigs(): Promise<
593
+ OpenbookV2FulfillmentConfigAccount[]
594
+ > {
595
+ const accounts =
596
+ await this.program.account.openbookV2FulfillmentConfig.all();
597
+ return accounts.map(
598
+ (account) => account.account
599
+ ) as OpenbookV2FulfillmentConfigAccount[];
600
+ }
601
+
578
602
  public async fetchMarketLookupTableAccount(): Promise<AddressLookupTableAccount> {
579
603
  if (this.lookupTableAccount) return this.lookupTableAccount;
580
604
 
@@ -3635,7 +3659,8 @@ export class DriftClient {
3635
3659
  order?: Order,
3636
3660
  fulfillmentConfig?:
3637
3661
  | SerumV3FulfillmentConfigAccount
3638
- | PhoenixV1FulfillmentConfigAccount,
3662
+ | PhoenixV1FulfillmentConfigAccount
3663
+ | OpenbookV2FulfillmentConfigAccount,
3639
3664
  makerInfo?: MakerInfo | MakerInfo[],
3640
3665
  referrerInfo?: ReferrerInfo,
3641
3666
  txParams?: TxParams
@@ -3664,7 +3689,8 @@ export class DriftClient {
3664
3689
  order?: Order,
3665
3690
  fulfillmentConfig?:
3666
3691
  | SerumV3FulfillmentConfigAccount
3667
- | PhoenixV1FulfillmentConfigAccount,
3692
+ | PhoenixV1FulfillmentConfigAccount
3693
+ | OpenbookV2FulfillmentConfigAccount,
3668
3694
  makerInfo?: MakerInfo | MakerInfo[],
3669
3695
  referrerInfo?: ReferrerInfo,
3670
3696
  fillerPublicKey?: PublicKey
@@ -3743,6 +3769,7 @@ export class DriftClient {
3743
3769
  fulfillmentConfig?:
3744
3770
  | SerumV3FulfillmentConfigAccount
3745
3771
  | PhoenixV1FulfillmentConfigAccount
3772
+ | OpenbookV2FulfillmentConfigAccount
3746
3773
  ): void {
3747
3774
  if (fulfillmentConfig) {
3748
3775
  if ('serumProgramId' in fulfillmentConfig) {
@@ -3757,6 +3784,12 @@ export class DriftClient {
3757
3784
  remainingAccounts,
3758
3785
  fulfillmentConfig
3759
3786
  );
3787
+ } else if ('openbookV2ProgramId' in fulfillmentConfig) {
3788
+ this.addOpenbookRemainingAccounts(
3789
+ marketIndex,
3790
+ remainingAccounts,
3791
+ fulfillmentConfig
3792
+ );
3760
3793
  } else {
3761
3794
  throw Error('Invalid fulfillment config type');
3762
3795
  }
@@ -3922,6 +3955,103 @@ export class DriftClient {
3922
3955
  });
3923
3956
  }
3924
3957
 
3958
+ addOpenbookRemainingAccounts(
3959
+ marketIndex: number,
3960
+ remainingAccounts: AccountMeta[],
3961
+ fulfillmentConfig: OpenbookV2FulfillmentConfigAccount
3962
+ ): void {
3963
+ remainingAccounts.push({
3964
+ pubkey: fulfillmentConfig.pubkey,
3965
+ isWritable: false,
3966
+ isSigner: false,
3967
+ });
3968
+ remainingAccounts.push({
3969
+ pubkey: this.getSignerPublicKey(),
3970
+ isWritable: true,
3971
+ isSigner: false,
3972
+ });
3973
+ remainingAccounts.push({
3974
+ pubkey: fulfillmentConfig.openbookV2ProgramId,
3975
+ isWritable: false,
3976
+ isSigner: false,
3977
+ });
3978
+ remainingAccounts.push({
3979
+ pubkey: fulfillmentConfig.openbookV2Market,
3980
+ isWritable: true,
3981
+ isSigner: false,
3982
+ });
3983
+ remainingAccounts.push({
3984
+ pubkey: fulfillmentConfig.openbookV2MarketAuthority,
3985
+ isWritable: false,
3986
+ isSigner: false,
3987
+ });
3988
+ remainingAccounts.push({
3989
+ pubkey: fulfillmentConfig.openbookV2EventHeap,
3990
+ isWritable: true,
3991
+ isSigner: false,
3992
+ });
3993
+ remainingAccounts.push({
3994
+ pubkey: fulfillmentConfig.openbookV2Bids,
3995
+ isWritable: true,
3996
+ isSigner: false,
3997
+ });
3998
+ remainingAccounts.push({
3999
+ pubkey: fulfillmentConfig.openbookV2Asks,
4000
+ isWritable: true,
4001
+ isSigner: false,
4002
+ });
4003
+ remainingAccounts.push({
4004
+ pubkey: fulfillmentConfig.openbookV2BaseVault,
4005
+ isWritable: true,
4006
+ isSigner: false,
4007
+ });
4008
+ remainingAccounts.push({
4009
+ pubkey: fulfillmentConfig.openbookV2QuoteVault,
4010
+ isWritable: true,
4011
+ isSigner: false,
4012
+ });
4013
+ remainingAccounts.push({
4014
+ pubkey: this.getSpotMarketAccount(marketIndex).vault,
4015
+ isWritable: true,
4016
+ isSigner: false,
4017
+ });
4018
+ remainingAccounts.push({
4019
+ pubkey: this.getQuoteSpotMarketAccount().vault,
4020
+ isWritable: true,
4021
+ isSigner: false,
4022
+ });
4023
+ remainingAccounts.push({
4024
+ pubkey: TOKEN_PROGRAM_ID,
4025
+ isWritable: false,
4026
+ isSigner: false,
4027
+ });
4028
+ remainingAccounts.push({
4029
+ pubkey: SystemProgram.programId,
4030
+ isWritable: false,
4031
+ isSigner: false,
4032
+ });
4033
+ remainingAccounts.push({
4034
+ pubkey: this.getSpotMarketAccount(marketIndex).pubkey,
4035
+ isWritable: true,
4036
+ isSigner: false,
4037
+ });
4038
+ remainingAccounts.push({
4039
+ pubkey: this.getQuoteSpotMarketAccount().pubkey,
4040
+ isWritable: true,
4041
+ isSigner: false,
4042
+ });
4043
+
4044
+ if (fulfillmentConfig.remainingAccounts) {
4045
+ for (const remainingAccount of fulfillmentConfig.remainingAccounts) {
4046
+ remainingAccounts.push({
4047
+ pubkey: remainingAccount,
4048
+ isWritable: true,
4049
+ isSigner: false,
4050
+ });
4051
+ }
4052
+ }
4053
+ }
4054
+
3925
4055
  /**
3926
4056
  * Swap tokens in drift account using jupiter
3927
4057
  * @param jupiterClient jupiter client to find routes and jupiter instructions
@@ -3017,6 +3017,95 @@
3017
3017
  }
3018
3018
  ]
3019
3019
  },
3020
+ {
3021
+ "name": "initializeOpenbookV2FulfillmentConfig",
3022
+ "accounts": [
3023
+ {
3024
+ "name": "baseSpotMarket",
3025
+ "isMut": false,
3026
+ "isSigner": false
3027
+ },
3028
+ {
3029
+ "name": "quoteSpotMarket",
3030
+ "isMut": false,
3031
+ "isSigner": false
3032
+ },
3033
+ {
3034
+ "name": "state",
3035
+ "isMut": true,
3036
+ "isSigner": false
3037
+ },
3038
+ {
3039
+ "name": "openbookV2Program",
3040
+ "isMut": false,
3041
+ "isSigner": false
3042
+ },
3043
+ {
3044
+ "name": "openbookV2Market",
3045
+ "isMut": false,
3046
+ "isSigner": false
3047
+ },
3048
+ {
3049
+ "name": "driftSigner",
3050
+ "isMut": false,
3051
+ "isSigner": false
3052
+ },
3053
+ {
3054
+ "name": "openbookV2FulfillmentConfig",
3055
+ "isMut": true,
3056
+ "isSigner": false
3057
+ },
3058
+ {
3059
+ "name": "admin",
3060
+ "isMut": true,
3061
+ "isSigner": true
3062
+ },
3063
+ {
3064
+ "name": "rent",
3065
+ "isMut": false,
3066
+ "isSigner": false
3067
+ },
3068
+ {
3069
+ "name": "systemProgram",
3070
+ "isMut": false,
3071
+ "isSigner": false
3072
+ }
3073
+ ],
3074
+ "args": [
3075
+ {
3076
+ "name": "marketIndex",
3077
+ "type": "u16"
3078
+ }
3079
+ ]
3080
+ },
3081
+ {
3082
+ "name": "openbookV2FulfillmentConfigStatus",
3083
+ "accounts": [
3084
+ {
3085
+ "name": "state",
3086
+ "isMut": false,
3087
+ "isSigner": false
3088
+ },
3089
+ {
3090
+ "name": "openbookV2FulfillmentConfig",
3091
+ "isMut": true,
3092
+ "isSigner": false
3093
+ },
3094
+ {
3095
+ "name": "admin",
3096
+ "isMut": true,
3097
+ "isSigner": true
3098
+ }
3099
+ ],
3100
+ "args": [
3101
+ {
3102
+ "name": "status",
3103
+ "type": {
3104
+ "defined": "SpotFulfillmentConfigStatus"
3105
+ }
3106
+ }
3107
+ ]
3108
+ },
3020
3109
  {
3021
3110
  "name": "initializePhoenixFulfillmentConfig",
3022
3111
  "accounts": [
@@ -5631,6 +5720,75 @@
5631
5720
  }
5632
5721
  ],
5633
5722
  "accounts": [
5723
+ {
5724
+ "name": "OpenbookV2FulfillmentConfig",
5725
+ "type": {
5726
+ "kind": "struct",
5727
+ "fields": [
5728
+ {
5729
+ "name": "pubkey",
5730
+ "type": "publicKey"
5731
+ },
5732
+ {
5733
+ "name": "openbookV2ProgramId",
5734
+ "type": "publicKey"
5735
+ },
5736
+ {
5737
+ "name": "openbookV2Market",
5738
+ "type": "publicKey"
5739
+ },
5740
+ {
5741
+ "name": "openbookV2MarketAuthority",
5742
+ "type": "publicKey"
5743
+ },
5744
+ {
5745
+ "name": "openbookV2EventHeap",
5746
+ "type": "publicKey"
5747
+ },
5748
+ {
5749
+ "name": "openbookV2Bids",
5750
+ "type": "publicKey"
5751
+ },
5752
+ {
5753
+ "name": "openbookV2Asks",
5754
+ "type": "publicKey"
5755
+ },
5756
+ {
5757
+ "name": "openbookV2BaseVault",
5758
+ "type": "publicKey"
5759
+ },
5760
+ {
5761
+ "name": "openbookV2QuoteVault",
5762
+ "type": "publicKey"
5763
+ },
5764
+ {
5765
+ "name": "marketIndex",
5766
+ "type": "u16"
5767
+ },
5768
+ {
5769
+ "name": "fulfillmentType",
5770
+ "type": {
5771
+ "defined": "SpotFulfillmentType"
5772
+ }
5773
+ },
5774
+ {
5775
+ "name": "status",
5776
+ "type": {
5777
+ "defined": "SpotFulfillmentConfigStatus"
5778
+ }
5779
+ },
5780
+ {
5781
+ "name": "padding",
5782
+ "type": {
5783
+ "array": [
5784
+ "u8",
5785
+ 4
5786
+ ]
5787
+ }
5788
+ }
5789
+ ]
5790
+ }
5791
+ },
5634
5792
  {
5635
5793
  "name": "PhoenixV1FulfillmentConfig",
5636
5794
  "type": {
@@ -9269,6 +9427,9 @@
9269
9427
  },
9270
9428
  {
9271
9429
  "name": "PhoenixV1"
9430
+ },
9431
+ {
9432
+ "name": "OpenbookV2"
9272
9433
  }
9273
9434
  ]
9274
9435
  }
@@ -9540,6 +9701,9 @@
9540
9701
  },
9541
9702
  {
9542
9703
  "name": "DeriskLp"
9704
+ },
9705
+ {
9706
+ "name": "OrderFilledWithOpenbookV2"
9543
9707
  }
9544
9708
  ]
9545
9709
  }
@@ -12553,6 +12717,21 @@
12553
12717
  "code": 6278,
12554
12718
  "name": "OracleBadRemainingAccountPublicKey",
12555
12719
  "msg": "Remaining account passed is not a valid pda"
12720
+ },
12721
+ {
12722
+ "code": 6279,
12723
+ "name": "FailedOpenbookV2CPI",
12724
+ "msg": "FailedOpenbookV2CPI"
12725
+ },
12726
+ {
12727
+ "code": 6280,
12728
+ "name": "InvalidOpenbookV2Program",
12729
+ "msg": "InvalidOpenbookV2Program"
12730
+ },
12731
+ {
12732
+ "code": 6281,
12733
+ "name": "InvalidOpenbookV2Market",
12734
+ "msg": "InvalidOpenbookV2Market"
12556
12735
  }
12557
12736
  ],
12558
12737
  "metadata": {