@triadxyz/triad-protocol 2.3.5-beta → 2.3.6-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.d.ts CHANGED
@@ -373,6 +373,16 @@ export default class TriadProtocolClient {
373
373
  * @param options - RPC options
374
374
  */
375
375
  marketBidOrder({ marketId, amount, direction, mint, feeBps }: MarketBidOrderArgs, options?: RpcOptions): Promise<string>;
376
+ /**
377
+ * Market Ask Order
378
+ * @param args.marketId - The ID of the Market
379
+ * @param args.shares - The amount of the Order
380
+ * @param args.bidOrderId - The ID of the Bid Order
381
+ * @param args.direction - The direction of the Order
382
+ * @param args.mint - The mint of the Order
383
+ *
384
+ * @param options - RPC options
385
+ */
376
386
  marketAskOrder({ marketId, shares, bidOrderId, direction, mint }: MarketAskOrderArgs, options?: RpcOptions): Promise<string>;
377
387
  /**
378
388
  * Get Orders By Market ID
package/dist/index.js CHANGED
@@ -776,6 +776,16 @@ class TriadProtocolClient {
776
776
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
777
777
  });
778
778
  }
779
+ /**
780
+ * Market Ask Order
781
+ * @param args.marketId - The ID of the Market
782
+ * @param args.shares - The amount of the Order
783
+ * @param args.bidOrderId - The ID of the Bid Order
784
+ * @param args.direction - The direction of the Order
785
+ * @param args.mint - The mint of the Order
786
+ *
787
+ * @param options - RPC options
788
+ */
779
789
  marketAskOrder({ marketId, shares, bidOrderId, direction, mint }, options) {
780
790
  return __awaiter(this, void 0, void 0, function* () {
781
791
  const marketPDA = (0, pda_1.getMarketPDA)(this.program.programId, marketId);
@@ -2010,8 +2010,8 @@
2010
2010
  "discriminator": [212, 67, 145, 23, 58, 104, 52, 83]
2011
2011
  },
2012
2012
  {
2013
- "name": "OrderBookRewardsEvent",
2014
- "discriminator": [63, 134, 65, 51, 227, 192, 87, 114]
2013
+ "name": "OrderBookFilledEvent",
2014
+ "discriminator": [245, 59, 174, 245, 216, 23, 188, 165]
2015
2015
  },
2016
2016
  {
2017
2017
  "name": "OrderEvent",
@@ -2175,11 +2175,6 @@
2175
2175
  "code": 6028,
2176
2176
  "name": "MarketAlreadyPaidOut",
2177
2177
  "msg": "Market already paid out"
2178
- },
2179
- {
2180
- "code": 6029,
2181
- "name": "InvalidAccount",
2182
- "msg": "Invalid account"
2183
2178
  }
2184
2179
  ],
2185
2180
  "types": [
@@ -2317,7 +2312,7 @@
2317
2312
  "kind": "struct",
2318
2313
  "fields": [
2319
2314
  {
2320
- "name": "ts",
2315
+ "name": "timestamp",
2321
2316
  "type": "i64"
2322
2317
  },
2323
2318
  {
@@ -3049,7 +3044,7 @@
3049
3044
  }
3050
3045
  },
3051
3046
  {
3052
- "name": "OrderBookRewardsEvent",
3047
+ "name": "OrderBookFilledEvent",
3053
3048
  "type": {
3054
3049
  "kind": "struct",
3055
3050
  "fields": [
@@ -3062,7 +3057,23 @@
3062
3057
  "type": "pubkey"
3063
3058
  },
3064
3059
  {
3065
- "name": "amount",
3060
+ "name": "shares",
3061
+ "type": "u64"
3062
+ },
3063
+ {
3064
+ "name": "price",
3065
+ "type": "u64"
3066
+ },
3067
+ {
3068
+ "name": "order_direction",
3069
+ "type": {
3070
+ "defined": {
3071
+ "name": "OrderDirection"
3072
+ }
3073
+ }
3074
+ },
3075
+ {
3076
+ "name": "rewards",
3066
3077
  "type": "u64"
3067
3078
  },
3068
3079
  {
@@ -2789,8 +2789,8 @@ export type TriadProtocol = {
2789
2789
  discriminator: [212, 67, 145, 23, 58, 104, 52, 83];
2790
2790
  },
2791
2791
  {
2792
- name: 'orderBookRewardsEvent';
2793
- discriminator: [63, 134, 65, 51, 227, 192, 87, 114];
2792
+ name: 'orderBookFilledEvent';
2793
+ discriminator: [245, 59, 174, 245, 216, 23, 188, 165];
2794
2794
  },
2795
2795
  {
2796
2796
  name: 'orderEvent';
@@ -2954,11 +2954,6 @@ export type TriadProtocol = {
2954
2954
  code: 6028;
2955
2955
  name: 'marketAlreadyPaidOut';
2956
2956
  msg: 'Market already paid out';
2957
- },
2958
- {
2959
- code: 6029;
2960
- name: 'invalidAccount';
2961
- msg: 'Invalid account';
2962
2957
  }
2963
2958
  ];
2964
2959
  types: [
@@ -3096,7 +3091,7 @@ export type TriadProtocol = {
3096
3091
  kind: 'struct';
3097
3092
  fields: [
3098
3093
  {
3099
- name: 'ts';
3094
+ name: 'timestamp';
3100
3095
  type: 'i64';
3101
3096
  },
3102
3097
  {
@@ -3828,7 +3823,7 @@ export type TriadProtocol = {
3828
3823
  };
3829
3824
  },
3830
3825
  {
3831
- name: 'orderBookRewardsEvent';
3826
+ name: 'orderBookFilledEvent';
3832
3827
  type: {
3833
3828
  kind: 'struct';
3834
3829
  fields: [
@@ -3841,7 +3836,23 @@ export type TriadProtocol = {
3841
3836
  type: 'pubkey';
3842
3837
  },
3843
3838
  {
3844
- name: 'amount';
3839
+ name: 'shares';
3840
+ type: 'u64';
3841
+ },
3842
+ {
3843
+ name: 'price';
3844
+ type: 'u64';
3845
+ },
3846
+ {
3847
+ name: 'orderDirection';
3848
+ type: {
3849
+ defined: {
3850
+ name: 'orderDirection';
3851
+ };
3852
+ };
3853
+ },
3854
+ {
3855
+ name: 'rewards';
3845
3856
  type: 'u64';
3846
3857
  },
3847
3858
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.3.5-beta",
3
+ "version": "2.3.6-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",