@triadxyz/triad-protocol 1.7.3-beta → 1.7.4-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.
@@ -26,6 +26,7 @@ export type Market = {
26
26
  question: string;
27
27
  winningDirection: WinningDirection;
28
28
  marketLiquidityAtStart: string;
29
+ payoutFee: number;
29
30
  customer: string;
30
31
  };
31
32
  export type UserTrade = {
@@ -35,20 +36,26 @@ export type UserTrade = {
35
36
  openedOrders: string;
36
37
  orders: Order[];
37
38
  nonce: string;
39
+ poseidon: string;
38
40
  isSubUser: boolean;
39
41
  };
40
42
  export type Order = {
41
43
  ts: string;
42
44
  orderId: string;
43
- questionId: string;
45
+ filledShares: string;
44
46
  marketId: string;
45
- status: OrderStatus;
47
+ orderStatus: OrderStatus;
46
48
  price: string;
47
49
  totalAmount: string;
48
50
  totalShares: string;
49
51
  orderType: OrderType;
50
- direction: OrderDirection;
52
+ orderDirection: OrderDirection;
53
+ orderSide: OrderSide;
51
54
  userNonce: string;
55
+ authority: string;
56
+ linkedOrderId: string;
57
+ account: string;
58
+ createdAt: string;
52
59
  };
53
60
  export declare enum WinningDirection {
54
61
  HYPE = "Hype",
@@ -56,28 +63,79 @@ export declare enum WinningDirection {
56
63
  FLOP = "Flop",
57
64
  NONE = "None"
58
65
  }
59
- export type OrderDirection = {
60
- hype: {};
61
- } | {
62
- flop: {};
66
+ export declare enum OrderDirection {
67
+ HYPE = "hype",
68
+ FLOP = "flop"
69
+ }
70
+ export declare enum OrderStatus {
71
+ INIT = "init",
72
+ OPEN = "open",
73
+ CLOSED = "closed",
74
+ CLAIMED = "claimed",
75
+ LIQUIDATED = "liquidated",
76
+ WAITING = "waiting"
77
+ }
78
+ export declare enum OrderType {
79
+ LIMIT = "limit",
80
+ MARKET = "market"
81
+ }
82
+ export declare enum OrderSide {
83
+ BID = "bid",
84
+ ASK = "ask"
85
+ }
86
+ export type PlaceOrderArgs = {
87
+ marketId: number;
88
+ amount: number;
89
+ price: number;
90
+ direction: {
91
+ hype: {};
92
+ } | {
93
+ flop: {};
94
+ };
95
+ orderSide: {
96
+ bid: {};
97
+ } | {
98
+ ask: {};
99
+ };
100
+ mint: PublicKey;
101
+ bidOrderId: number | null;
63
102
  };
64
- export type OrderStatus = {
65
- init: {};
66
- } | {
67
- open: {};
68
- } | {
69
- closed: {};
103
+ export type InitializeMarketArgs = {
104
+ marketId: number;
105
+ startTime: number;
106
+ endTime: number;
107
+ question: string;
108
+ feeBps: number;
109
+ customer: PublicKey | null;
110
+ };
111
+ export type UpdateMarketArgs = {
112
+ marketId: number;
113
+ marketEnd?: number;
114
+ winningDirection?: {
115
+ hype: {};
116
+ } | {
117
+ flop: {};
118
+ } | {
119
+ none: {};
120
+ } | {
121
+ draw: {};
122
+ };
70
123
  };
71
- export type OrderType = {
72
- limit: {};
73
- } | {
74
- market: {};
124
+ export type CreateCustomerArgs = {
125
+ id: number;
126
+ name: string;
127
+ authority: PublicKey;
128
+ feeRecipient: PublicKey;
75
129
  };
76
130
  export type OpenOrderArgs = {
77
131
  marketId: number;
78
132
  amount: number;
79
- direction: OrderDirection;
80
- token: string;
133
+ direction: {
134
+ hype: {};
135
+ } | {
136
+ flop: {};
137
+ };
138
+ mint: PublicKey;
81
139
  };
82
140
  export type CreateMarketArgs = {
83
141
  marketId: number;
@@ -86,10 +144,24 @@ export type CreateMarketArgs = {
86
144
  question: string;
87
145
  feeBps: number;
88
146
  customer: PublicKey;
147
+ payoutFee: number;
89
148
  mint: PublicKey;
90
149
  };
91
- export type CreateCustomerArgs = {
92
- id: number;
93
- name: string;
94
- authority: PublicKey;
150
+ export type CancelOrderArgs = {
151
+ marketId: number;
152
+ orderId: number;
153
+ userNonce: number;
154
+ orderSide: OrderSide;
155
+ mint: PublicKey;
156
+ userNonceBidOrder: number | null;
157
+ };
158
+ export type MarketBidOrderArgs = {
159
+ marketId: number;
160
+ amount: number;
161
+ direction: {
162
+ hype: {};
163
+ } | {
164
+ flop: {};
165
+ };
166
+ mint: PublicKey;
95
167
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WinningDirection = void 0;
3
+ exports.OrderSide = exports.OrderType = exports.OrderStatus = exports.OrderDirection = exports.WinningDirection = void 0;
4
4
  var WinningDirection;
5
5
  (function (WinningDirection) {
6
6
  WinningDirection["HYPE"] = "Hype";
@@ -8,3 +8,27 @@ var WinningDirection;
8
8
  WinningDirection["FLOP"] = "Flop";
9
9
  WinningDirection["NONE"] = "None";
10
10
  })(WinningDirection || (exports.WinningDirection = WinningDirection = {}));
11
+ var OrderDirection;
12
+ (function (OrderDirection) {
13
+ OrderDirection["HYPE"] = "hype";
14
+ OrderDirection["FLOP"] = "flop";
15
+ })(OrderDirection || (exports.OrderDirection = OrderDirection = {}));
16
+ var OrderStatus;
17
+ (function (OrderStatus) {
18
+ OrderStatus["INIT"] = "init";
19
+ OrderStatus["OPEN"] = "open";
20
+ OrderStatus["CLOSED"] = "closed";
21
+ OrderStatus["CLAIMED"] = "claimed";
22
+ OrderStatus["LIQUIDATED"] = "liquidated";
23
+ OrderStatus["WAITING"] = "waiting";
24
+ })(OrderStatus || (exports.OrderStatus = OrderStatus = {}));
25
+ var OrderType;
26
+ (function (OrderType) {
27
+ OrderType["LIMIT"] = "limit";
28
+ OrderType["MARKET"] = "market";
29
+ })(OrderType || (exports.OrderType = OrderType = {}));
30
+ var OrderSide;
31
+ (function (OrderSide) {
32
+ OrderSide["BID"] = "bid";
33
+ OrderSide["ASK"] = "ask";
34
+ })(OrderSide || (exports.OrderSide = OrderSide = {}));