@triadxyz/triad-protocol 3.4.1-beta → 3.4.2-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 +18 -168
- package/dist/index.js +99 -244
- package/dist/poseidon.js +0 -3
- package/dist/stake.d.ts +0 -4
- package/dist/stake.js +0 -19
- package/dist/types/idl_triad_protocol.json +421 -266
- package/dist/types/index.d.ts +7 -29
- package/dist/types/triad_protocol.d.ts +411 -268
- package/dist/utils/feeCalculator.js +3 -3
- package/dist/utils/helpers.d.ts +4 -3
- package/dist/utils/helpers.js +18 -20
- package/dist/utils/pda.d.ts +2 -2
- package/dist/utils/pda.js +14 -13
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -46,28 +46,15 @@ export type Market = {
|
|
|
46
46
|
poolId: number;
|
|
47
47
|
feeRecipient: string;
|
|
48
48
|
};
|
|
49
|
-
export type UserTrade = {
|
|
50
|
-
user: string;
|
|
51
|
-
orders: Order[];
|
|
52
|
-
nonce: string;
|
|
53
|
-
poseidon: string;
|
|
54
|
-
isSubUser: boolean;
|
|
55
|
-
};
|
|
56
49
|
export type Order = {
|
|
57
|
-
ts: string;
|
|
58
|
-
orderId: string;
|
|
59
50
|
marketId: string;
|
|
60
51
|
orderStatus: OrderStatus;
|
|
61
52
|
price: string;
|
|
62
53
|
totalShares: string;
|
|
63
|
-
filledShares: string;
|
|
64
54
|
orderType: OrderType;
|
|
65
55
|
orderDirection: OrderDirection;
|
|
66
56
|
orderSide: OrderSide;
|
|
67
|
-
userNonce: string;
|
|
68
57
|
authority: string;
|
|
69
|
-
createdAt: string;
|
|
70
|
-
isTrdPayout: boolean;
|
|
71
58
|
};
|
|
72
59
|
export type BookOrder = {
|
|
73
60
|
id: string;
|
|
@@ -232,8 +219,7 @@ export type PlaceAskOrderArgs = {
|
|
|
232
219
|
orders: {
|
|
233
220
|
amount: number;
|
|
234
221
|
price: number;
|
|
235
|
-
|
|
236
|
-
userNonce: number;
|
|
222
|
+
orderDirection: OrderDirectionEncoded;
|
|
237
223
|
marketId: number;
|
|
238
224
|
}[];
|
|
239
225
|
};
|
|
@@ -255,7 +241,7 @@ export type OpenOrderArgs = {
|
|
|
255
241
|
marketId: number;
|
|
256
242
|
amount: number;
|
|
257
243
|
token: string;
|
|
258
|
-
|
|
244
|
+
orderDirection: OrderDirectionEncoded;
|
|
259
245
|
mint: PublicKey;
|
|
260
246
|
};
|
|
261
247
|
export type CreateMarketArgs = {
|
|
@@ -287,16 +273,14 @@ export type CreatePoolArgs = {
|
|
|
287
273
|
export type CancelBidOrderArgs = {
|
|
288
274
|
orders: {
|
|
289
275
|
marketId: number;
|
|
290
|
-
|
|
291
|
-
userNonce: number;
|
|
276
|
+
bookOrderId: number;
|
|
292
277
|
orderDirection: OrderDirectionEncoded;
|
|
293
278
|
}[];
|
|
294
279
|
};
|
|
295
280
|
export type CancelAskOrderArgs = {
|
|
296
|
-
marketId: number;
|
|
297
281
|
orders: {
|
|
298
|
-
|
|
299
|
-
|
|
282
|
+
marketId: number;
|
|
283
|
+
bookOrderId: number;
|
|
300
284
|
orderDirection: OrderDirectionEncoded;
|
|
301
285
|
}[];
|
|
302
286
|
};
|
|
@@ -308,13 +292,8 @@ export type MarketBidOrderArgs = {
|
|
|
308
292
|
};
|
|
309
293
|
export type MarketAskOrderArgs = {
|
|
310
294
|
marketId: number;
|
|
311
|
-
|
|
312
|
-
shares: number;
|
|
313
|
-
bidOrderId: number;
|
|
314
|
-
userNonce: number;
|
|
315
|
-
}[];
|
|
295
|
+
shares: number;
|
|
316
296
|
orderDirection: OrderDirectionEncoded;
|
|
317
|
-
isTrdPayout: boolean;
|
|
318
297
|
};
|
|
319
298
|
export type CreateClaimVaultArgs = {
|
|
320
299
|
totalAmount: number;
|
|
@@ -343,8 +322,7 @@ export type UpdateMarketWinningDirectionArgs = {
|
|
|
343
322
|
};
|
|
344
323
|
export type CloseOrderArgs = {
|
|
345
324
|
marketId: number;
|
|
346
|
-
|
|
347
|
-
userNonce: number;
|
|
325
|
+
orderDirection: OrderDirectionEncoded;
|
|
348
326
|
};
|
|
349
327
|
export type UpdateClaimVaultAmountArgs = {
|
|
350
328
|
amount: number;
|