@triadxyz/triad-protocol 2.4.7-beta → 2.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
@@ -832,6 +832,7 @@ class TriadProtocolClient {
832
832
  .accounts({
833
833
  signer: this.program.provider.publicKey,
834
834
  market: marketPDA,
835
+ buyerAuthority: new web3_js_1.PublicKey(order.authority),
835
836
  buyerTrade: this.getUserPDA(new web3_js_1.PublicKey(order.authority), Number(order.userNonce)),
836
837
  orderBook: (0, pda_1.getOrderBookPDA)(this.program.programId, marketId),
837
838
  mint,
@@ -2059,12 +2059,12 @@
2059
2059
  "discriminator": [175, 216, 61, 224, 98, 215, 181, 62]
2060
2060
  },
2061
2061
  {
2062
- "name": "MarketEvent",
2063
- "discriminator": [212, 67, 145, 23, 58, 104, 52, 83]
2062
+ "name": "BookOrderFilledEvent",
2063
+ "discriminator": [143, 95, 119, 33, 30, 15, 222, 175]
2064
2064
  },
2065
2065
  {
2066
- "name": "OrderBookFilledEvent",
2067
- "discriminator": [245, 59, 174, 245, 216, 23, 188, 165]
2066
+ "name": "MarketEvent",
2067
+ "discriminator": [212, 67, 145, 23, 58, 104, 52, 83]
2068
2068
  },
2069
2069
  {
2070
2070
  "name": "OrderEvent",
@@ -2206,26 +2206,21 @@
2206
2206
  },
2207
2207
  {
2208
2208
  "code": 6024,
2209
- "name": "Overflow",
2210
- "msg": "Overflow"
2211
- },
2212
- {
2213
- "code": 6025,
2214
2209
  "name": "LinkedBidOrderNotFound",
2215
2210
  "msg": "Linked bid order not found"
2216
2211
  },
2217
2212
  {
2218
- "code": 6026,
2213
+ "code": 6025,
2219
2214
  "name": "CurrentFastPoolMarketStillActive",
2220
2215
  "msg": "Current fast pool market still active"
2221
2216
  },
2222
2217
  {
2223
- "code": 6027,
2218
+ "code": 6026,
2224
2219
  "name": "MarketAlreadyAggregated",
2225
2220
  "msg": "Market already aggregated"
2226
2221
  },
2227
2222
  {
2228
- "code": 6028,
2223
+ "code": 6027,
2229
2224
  "name": "MarketAlreadyPaidOut",
2230
2225
  "msg": "Market already paid out"
2231
2226
  }
@@ -2415,6 +2410,46 @@
2415
2410
  ]
2416
2411
  }
2417
2412
  },
2413
+ {
2414
+ "name": "BookOrderFilledEvent",
2415
+ "type": {
2416
+ "kind": "struct",
2417
+ "fields": [
2418
+ {
2419
+ "name": "market_id",
2420
+ "type": "u64"
2421
+ },
2422
+ {
2423
+ "name": "authority",
2424
+ "type": "pubkey"
2425
+ },
2426
+ {
2427
+ "name": "shares",
2428
+ "type": "u64"
2429
+ },
2430
+ {
2431
+ "name": "price",
2432
+ "type": "u64"
2433
+ },
2434
+ {
2435
+ "name": "order_direction",
2436
+ "type": {
2437
+ "defined": {
2438
+ "name": "OrderDirection"
2439
+ }
2440
+ }
2441
+ },
2442
+ {
2443
+ "name": "rewards",
2444
+ "type": "u64"
2445
+ },
2446
+ {
2447
+ "name": "timestamp",
2448
+ "type": "i64"
2449
+ }
2450
+ ]
2451
+ }
2452
+ },
2418
2453
  {
2419
2454
  "name": "CancelOrderArgs",
2420
2455
  "type": {
@@ -3096,46 +3131,6 @@
3096
3131
  ]
3097
3132
  }
3098
3133
  },
3099
- {
3100
- "name": "OrderBookFilledEvent",
3101
- "type": {
3102
- "kind": "struct",
3103
- "fields": [
3104
- {
3105
- "name": "market_id",
3106
- "type": "u64"
3107
- },
3108
- {
3109
- "name": "authority",
3110
- "type": "pubkey"
3111
- },
3112
- {
3113
- "name": "shares",
3114
- "type": "u64"
3115
- },
3116
- {
3117
- "name": "price",
3118
- "type": "u64"
3119
- },
3120
- {
3121
- "name": "order_direction",
3122
- "type": {
3123
- "defined": {
3124
- "name": "OrderDirection"
3125
- }
3126
- }
3127
- },
3128
- {
3129
- "name": "rewards",
3130
- "type": "u64"
3131
- },
3132
- {
3133
- "name": "timestamp",
3134
- "type": "i64"
3135
- }
3136
- ]
3137
- }
3138
- },
3139
3134
  {
3140
3135
  "name": "OrderDirection",
3141
3136
  "type": {
@@ -2838,12 +2838,12 @@ export type TriadProtocol = {
2838
2838
  discriminator: [175, 216, 61, 224, 98, 215, 181, 62];
2839
2839
  },
2840
2840
  {
2841
- name: 'marketEvent';
2842
- discriminator: [212, 67, 145, 23, 58, 104, 52, 83];
2841
+ name: 'bookOrderFilledEvent';
2842
+ discriminator: [143, 95, 119, 33, 30, 15, 222, 175];
2843
2843
  },
2844
2844
  {
2845
- name: 'orderBookFilledEvent';
2846
- discriminator: [245, 59, 174, 245, 216, 23, 188, 165];
2845
+ name: 'marketEvent';
2846
+ discriminator: [212, 67, 145, 23, 58, 104, 52, 83];
2847
2847
  },
2848
2848
  {
2849
2849
  name: 'orderEvent';
@@ -2985,26 +2985,21 @@ export type TriadProtocol = {
2985
2985
  },
2986
2986
  {
2987
2987
  code: 6024;
2988
- name: 'overflow';
2989
- msg: 'overflow';
2990
- },
2991
- {
2992
- code: 6025;
2993
2988
  name: 'linkedBidOrderNotFound';
2994
2989
  msg: 'Linked bid order not found';
2995
2990
  },
2996
2991
  {
2997
- code: 6026;
2992
+ code: 6025;
2998
2993
  name: 'currentFastPoolMarketStillActive';
2999
2994
  msg: 'Current fast pool market still active';
3000
2995
  },
3001
2996
  {
3002
- code: 6027;
2997
+ code: 6026;
3003
2998
  name: 'marketAlreadyAggregated';
3004
2999
  msg: 'Market already aggregated';
3005
3000
  },
3006
3001
  {
3007
- code: 6028;
3002
+ code: 6027;
3008
3003
  name: 'marketAlreadyPaidOut';
3009
3004
  msg: 'Market already paid out';
3010
3005
  }
@@ -3194,6 +3189,46 @@ export type TriadProtocol = {
3194
3189
  ];
3195
3190
  };
3196
3191
  },
3192
+ {
3193
+ name: 'bookOrderFilledEvent';
3194
+ type: {
3195
+ kind: 'struct';
3196
+ fields: [
3197
+ {
3198
+ name: 'marketId';
3199
+ type: 'u64';
3200
+ },
3201
+ {
3202
+ name: 'authority';
3203
+ type: 'pubkey';
3204
+ },
3205
+ {
3206
+ name: 'shares';
3207
+ type: 'u64';
3208
+ },
3209
+ {
3210
+ name: 'price';
3211
+ type: 'u64';
3212
+ },
3213
+ {
3214
+ name: 'orderDirection';
3215
+ type: {
3216
+ defined: {
3217
+ name: 'orderDirection';
3218
+ };
3219
+ };
3220
+ },
3221
+ {
3222
+ name: 'rewards';
3223
+ type: 'u64';
3224
+ },
3225
+ {
3226
+ name: 'timestamp';
3227
+ type: 'i64';
3228
+ }
3229
+ ];
3230
+ };
3231
+ },
3197
3232
  {
3198
3233
  name: 'cancelOrderArgs';
3199
3234
  type: {
@@ -3875,46 +3910,6 @@ export type TriadProtocol = {
3875
3910
  ];
3876
3911
  };
3877
3912
  },
3878
- {
3879
- name: 'orderBookFilledEvent';
3880
- type: {
3881
- kind: 'struct';
3882
- fields: [
3883
- {
3884
- name: 'marketId';
3885
- type: 'u64';
3886
- },
3887
- {
3888
- name: 'authority';
3889
- type: 'pubkey';
3890
- },
3891
- {
3892
- name: 'shares';
3893
- type: 'u64';
3894
- },
3895
- {
3896
- name: 'price';
3897
- type: 'u64';
3898
- },
3899
- {
3900
- name: 'orderDirection';
3901
- type: {
3902
- defined: {
3903
- name: 'orderDirection';
3904
- };
3905
- };
3906
- },
3907
- {
3908
- name: 'rewards';
3909
- type: 'u64';
3910
- },
3911
- {
3912
- name: 'timestamp';
3913
- type: 'i64';
3914
- }
3915
- ];
3916
- };
3917
- },
3918
3913
  {
3919
3914
  name: 'orderDirection';
3920
3915
  type: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.4.7-beta",
3
+ "version": "2.4.8-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",