@triadxyz/triad-protocol 4.4.2 → 4.4.4

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/dist/market.js CHANGED
@@ -159,7 +159,8 @@ class Market {
159
159
  .createOrderBook()
160
160
  .accounts({
161
161
  signer: this.program.provider.publicKey,
162
- market: marketPDA
162
+ market: marketPDA,
163
+ orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, nextMarketId)
163
164
  })
164
165
  .instruction());
165
166
  }
@@ -227,14 +228,16 @@ class Market {
227
228
  .accounts({
228
229
  signer: this.program.provider.publicKey,
229
230
  pool: poolPDA,
230
- customer
231
+ customer,
232
+ market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId)
231
233
  })
232
234
  .instruction());
233
235
  ixs.push(yield this.program.methods
234
236
  .createOrderBook()
235
237
  .accounts({
236
238
  signer: this.program.provider.publicKey,
237
- market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId)
239
+ market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId),
240
+ orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, nextMarketId)
238
241
  })
239
242
  .instruction());
240
243
  }
@@ -419,14 +422,16 @@ class Market {
419
422
  signer: this.program.provider.publicKey,
420
423
  pool: poolPDA,
421
424
  customer: market.customer,
422
- priceUpdate: feedPDA
425
+ priceUpdate: feedPDA,
426
+ market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId)
423
427
  })
424
428
  .instruction());
425
429
  ixs.push(yield this.program.methods
426
430
  .createOrderBook()
427
431
  .accounts({
428
432
  signer: this.program.provider.publicKey,
429
- market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId)
433
+ market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId),
434
+ orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, nextMarketId)
430
435
  })
431
436
  .instruction());
432
437
  }
@@ -487,14 +492,16 @@ class Market {
487
492
  ? (0, pda_1.getPoolPDA)(this.program.programId, market.poolId)
488
493
  : null,
489
494
  customer: market.customer,
490
- priceUpdate: feedPDA
495
+ priceUpdate: feedPDA,
496
+ market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId)
491
497
  })
492
498
  .instruction());
493
499
  ixs.push(yield this.program.methods
494
500
  .createOrderBook()
495
501
  .accounts({
496
502
  signer: this.program.provider.publicKey,
497
- market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId)
503
+ market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId),
504
+ orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, nextMarketId)
498
505
  })
499
506
  .instruction());
500
507
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
@@ -555,14 +562,16 @@ class Market {
555
562
  pool: toResolve.poolId
556
563
  ? (0, pda_1.getPoolPDA)(this.program.programId, toResolve.poolId)
557
564
  : null,
558
- customer
565
+ customer,
566
+ market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId)
559
567
  })
560
568
  .instruction());
561
569
  ixs.push(yield this.program.methods
562
570
  .createOrderBook()
563
571
  .accounts({
564
572
  signer: this.program.provider.publicKey,
565
- market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId)
573
+ market: (0, pda_1.getMarketPDA)(this.program.programId, nextMarketId),
574
+ orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, nextMarketId)
566
575
  })
567
576
  .instruction());
568
577
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
@@ -903,20 +903,7 @@
903
903
  },
904
904
  {
905
905
  "name": "order_book",
906
- "writable": true,
907
- "pda": {
908
- "seeds": [
909
- {
910
- "kind": "const",
911
- "value": [111, 114, 100, 101, 114, 95, 98, 111, 111, 107]
912
- },
913
- {
914
- "kind": "account",
915
- "path": "market.market_id",
916
- "account": "MarketV2"
917
- }
918
- ]
919
- }
906
+ "writable": true
920
907
  },
921
908
  {
922
909
  "name": "system_program",
@@ -1238,19 +1238,6 @@ export type TriadProtocol = {
1238
1238
  {
1239
1239
  name: 'orderBook';
1240
1240
  writable: true;
1241
- pda: {
1242
- seeds: [
1243
- {
1244
- kind: 'const';
1245
- value: [111, 114, 100, 101, 114, 95, 98, 111, 111, 107];
1246
- },
1247
- {
1248
- kind: 'account';
1249
- path: 'market.market_id';
1250
- account: 'marketV2';
1251
- }
1252
- ];
1253
- };
1254
1241
  },
1255
1242
  {
1256
1243
  name: 'systemProgram';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "4.4.2",
3
+ "version": "4.4.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",