@triadxyz/triad-protocol 3.4.5-beta → 3.4.8-beta

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/index.js CHANGED
@@ -519,7 +519,8 @@ class TriadProtocol {
519
519
  signer: this.program.provider.publicKey,
520
520
  payer: this.rpcOptions.payer,
521
521
  market: (0, pda_1.getMarketPDA)(this.program.programId, marketId),
522
- mint
522
+ mint,
523
+ order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, marketId, (0, helpers_1.getOrderDirection)(orderDirection))
523
524
  })
524
525
  .instruction());
525
526
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions, addressLookupTableAccounts);
@@ -539,7 +540,8 @@ class TriadProtocol {
539
540
  signer: this.program.provider.publicKey,
540
541
  payer: this.rpcOptions.payer,
541
542
  market: (0, pda_1.getMarketPDA)(this.program.programId, marketId),
542
- mint: constants_1.TRD_MINT
543
+ mint: constants_1.TRD_MINT,
544
+ order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, marketId, (0, helpers_1.getOrderDirection)(orderDirection))
543
545
  })
544
546
  .instruction()
545
547
  ];
@@ -566,7 +568,8 @@ class TriadProtocol {
566
568
  payer: this.rpcOptions.payer,
567
569
  market: (0, pda_1.getMarketPDA)(this.program.programId, order.marketId),
568
570
  mint: order.mint,
569
- tokenProgram: (0, helpers_2.getTokenProgram)(order.mint)
571
+ tokenProgram: (0, helpers_2.getTokenProgram)(order.mint),
572
+ order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, order.marketId, (0, helpers_1.getOrderDirection)(order.orderDirection))
570
573
  })
571
574
  .instruction());
572
575
  }
@@ -648,7 +651,8 @@ class TriadProtocol {
648
651
  signer: this.program.provider.publicKey,
649
652
  payer: this.rpcOptions.payer,
650
653
  market: (0, pda_1.getMarketPDA)(this.program.programId, order.marketId),
651
- orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, order.marketId)
654
+ orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, order.marketId),
655
+ order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, order.marketId, (0, helpers_1.getOrderDirection)(order.orderDirection))
652
656
  })
653
657
  .instruction());
654
658
  }
@@ -849,7 +853,8 @@ class TriadProtocol {
849
853
  market: marketPDA,
850
854
  orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, marketId),
851
855
  bookOrderAskAuthority: new web3_js_1.PublicKey(order.authority),
852
- oppositeOrder: (0, pda_1.getOrderPDA)(this.program.programId, new web3_js_1.PublicKey(order.authority), marketId, (0, helpers_1.getOppositeOrderDirection)(order.orderDirection))
856
+ order: (0, pda_1.getOrderPDA)(this.program.programId, this.program.provider.publicKey, marketId, (0, helpers_1.getOrderDirection)(orderDirection)),
857
+ oppositeOrder: (0, pda_1.getOrderPDA)(this.program.programId, new web3_js_1.PublicKey(order.authority), marketId, (0, helpers_1.getOrderDirection)(orderDirection))
853
858
  })
854
859
  .instruction());
855
860
  remainingUSDC = remainingUSDC.sub(usdcAmount);
@@ -1445,27 +1445,7 @@
1445
1445
  },
1446
1446
  {
1447
1447
  "name": "order",
1448
- "writable": true,
1449
- "pda": {
1450
- "seeds": [
1451
- {
1452
- "kind": "const",
1453
- "value": [111, 114, 100, 101, 114]
1454
- },
1455
- {
1456
- "kind": "account",
1457
- "path": "signer"
1458
- },
1459
- {
1460
- "kind": "arg",
1461
- "path": "args.market_id"
1462
- },
1463
- {
1464
- "kind": "arg",
1465
- "path": "args.order_direction"
1466
- }
1467
- ]
1468
- }
1448
+ "writable": true
1469
1449
  },
1470
1450
  {
1471
1451
  "name": "opposite_order",
@@ -1603,27 +1583,7 @@
1603
1583
  },
1604
1584
  {
1605
1585
  "name": "order",
1606
- "writable": true,
1607
- "pda": {
1608
- "seeds": [
1609
- {
1610
- "kind": "const",
1611
- "value": [111, 114, 100, 101, 114]
1612
- },
1613
- {
1614
- "kind": "account",
1615
- "path": "signer"
1616
- },
1617
- {
1618
- "kind": "arg",
1619
- "path": "args.market_id"
1620
- },
1621
- {
1622
- "kind": "arg",
1623
- "path": "args.order_direction"
1624
- }
1625
- ]
1626
- }
1586
+ "writable": true
1627
1587
  },
1628
1588
  {
1629
1589
  "name": "system_program",
@@ -1666,27 +1626,7 @@
1666
1626
  },
1667
1627
  {
1668
1628
  "name": "order",
1669
- "writable": true,
1670
- "pda": {
1671
- "seeds": [
1672
- {
1673
- "kind": "const",
1674
- "value": [111, 114, 100, 101, 114]
1675
- },
1676
- {
1677
- "kind": "account",
1678
- "path": "signer"
1679
- },
1680
- {
1681
- "kind": "arg",
1682
- "path": "args.market_id"
1683
- },
1684
- {
1685
- "kind": "arg",
1686
- "path": "args.order_direction"
1687
- }
1688
- ]
1689
- }
1629
+ "writable": true
1690
1630
  },
1691
1631
  {
1692
1632
  "name": "mint",
@@ -1785,6 +1725,11 @@
1785
1725
  "writable": true,
1786
1726
  "signer": true
1787
1727
  },
1728
+ {
1729
+ "name": "squads",
1730
+ "writable": true,
1731
+ "address": "Hk1r2NUL4LbUhx1agg1w44tyZiNr72mbeLsg6suF5MA4"
1732
+ },
1788
1733
  {
1789
1734
  "name": "market",
1790
1735
  "writable": true
@@ -1937,27 +1882,7 @@
1937
1882
  },
1938
1883
  {
1939
1884
  "name": "order",
1940
- "writable": true,
1941
- "pda": {
1942
- "seeds": [
1943
- {
1944
- "kind": "const",
1945
- "value": [111, 114, 100, 101, 114]
1946
- },
1947
- {
1948
- "kind": "account",
1949
- "path": "signer"
1950
- },
1951
- {
1952
- "kind": "arg",
1953
- "path": "args.market_id"
1954
- },
1955
- {
1956
- "kind": "arg",
1957
- "path": "args.order_direction"
1958
- }
1959
- ]
1960
- }
1885
+ "writable": true
1961
1886
  },
1962
1887
  {
1963
1888
  "name": "mint",
@@ -2066,26 +2066,6 @@ export type TriadProtocol = {
2066
2066
  {
2067
2067
  name: 'order';
2068
2068
  writable: true;
2069
- pda: {
2070
- seeds: [
2071
- {
2072
- kind: 'const';
2073
- value: [111, 114, 100, 101, 114];
2074
- },
2075
- {
2076
- kind: 'account';
2077
- path: 'signer';
2078
- },
2079
- {
2080
- kind: 'arg';
2081
- path: 'args.market_id';
2082
- },
2083
- {
2084
- kind: 'arg';
2085
- path: 'args.order_direction';
2086
- }
2087
- ];
2088
- };
2089
2069
  },
2090
2070
  {
2091
2071
  name: 'oppositeOrder';
@@ -2311,26 +2291,6 @@ export type TriadProtocol = {
2311
2291
  {
2312
2292
  name: 'order';
2313
2293
  writable: true;
2314
- pda: {
2315
- seeds: [
2316
- {
2317
- kind: 'const';
2318
- value: [111, 114, 100, 101, 114];
2319
- },
2320
- {
2321
- kind: 'account';
2322
- path: 'signer';
2323
- },
2324
- {
2325
- kind: 'arg';
2326
- path: 'args.market_id';
2327
- },
2328
- {
2329
- kind: 'arg';
2330
- path: 'args.order_direction';
2331
- }
2332
- ];
2333
- };
2334
2294
  },
2335
2295
  {
2336
2296
  name: 'systemProgram';
@@ -2374,26 +2334,6 @@ export type TriadProtocol = {
2374
2334
  {
2375
2335
  name: 'order';
2376
2336
  writable: true;
2377
- pda: {
2378
- seeds: [
2379
- {
2380
- kind: 'const';
2381
- value: [111, 114, 100, 101, 114];
2382
- },
2383
- {
2384
- kind: 'account';
2385
- path: 'signer';
2386
- },
2387
- {
2388
- kind: 'arg';
2389
- path: 'args.market_id';
2390
- },
2391
- {
2392
- kind: 'arg';
2393
- path: 'args.order_direction';
2394
- }
2395
- ];
2396
- };
2397
2337
  },
2398
2338
  {
2399
2339
  name: 'mint';
@@ -2550,6 +2490,11 @@ export type TriadProtocol = {
2550
2490
  writable: true;
2551
2491
  signer: true;
2552
2492
  },
2493
+ {
2494
+ name: 'squads';
2495
+ writable: true;
2496
+ address: 'Hk1r2NUL4LbUhx1agg1w44tyZiNr72mbeLsg6suF5MA4';
2497
+ },
2553
2498
  {
2554
2499
  name: 'market';
2555
2500
  writable: true;
@@ -2761,26 +2706,6 @@ export type TriadProtocol = {
2761
2706
  {
2762
2707
  name: 'order';
2763
2708
  writable: true;
2764
- pda: {
2765
- seeds: [
2766
- {
2767
- kind: 'const';
2768
- value: [111, 114, 100, 101, 114];
2769
- },
2770
- {
2771
- kind: 'account';
2772
- path: 'signer';
2773
- },
2774
- {
2775
- kind: 'arg';
2776
- path: 'args.market_id';
2777
- },
2778
- {
2779
- kind: 'arg';
2780
- path: 'args.order_direction';
2781
- }
2782
- ];
2783
- };
2784
2709
  },
2785
2710
  {
2786
2711
  name: 'mint';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "3.4.5-beta",
3
+ "version": "3.4.8-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",