@triadxyz/triad-protocol 2.3.3-beta → 2.3.5-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.
@@ -4,8 +4,227 @@ export type RpcOptions = {
4
4
  microLamports?: number;
5
5
  computeBudget?: number;
6
6
  };
7
- export type TransferPoseidonArgs = {
8
- poseidonAsset: PublicKey;
9
- ticketAsset: PublicKey;
10
- ticketNumber: number;
7
+ export type Pool = {
8
+ address: string;
9
+ id: number;
10
+ question: string;
11
+ authority: string;
12
+ isFast: boolean;
13
+ isFastMarketActive: boolean;
14
+ };
15
+ export type Market = {
16
+ address: string;
17
+ bump: number;
18
+ authority: string;
19
+ marketId: string;
20
+ hypePrice: string;
21
+ flopPrice: string;
22
+ hypeLiquidity: string;
23
+ flopLiquidity: string;
24
+ hypeShares: string;
25
+ flopShares: string;
26
+ volume: string;
27
+ mint: string;
28
+ updateTs: string;
29
+ resolvedTs: string;
30
+ nextOrderId: string;
31
+ feeBps: number;
32
+ isAllowedToPayout: boolean;
33
+ payoutFeeAvailable: string;
34
+ payoutFeeClaimed: string;
35
+ marketFeeAvailable: string;
36
+ marketFeeClaimed: string;
37
+ marketStart: string;
38
+ marketEnd: string;
39
+ question: string;
40
+ winningDirection: WinningDirection;
41
+ marketLiquidityAtStart: string;
42
+ payoutFee: number;
43
+ customer: string;
44
+ poolId: number;
45
+ feeRecipient: string;
46
+ };
47
+ export type UserTrade = {
48
+ user: string;
49
+ totalDeposits: string;
50
+ totalWithdraws: string;
51
+ orders: Order[];
52
+ nonce: string;
53
+ poseidon: string;
54
+ isSubUser: boolean;
55
+ };
56
+ export type Order = {
57
+ ts: string;
58
+ orderId: string;
59
+ marketId: string;
60
+ orderStatus: OrderStatus;
61
+ price: string;
62
+ totalShares: string;
63
+ filledShares: string;
64
+ orderType: OrderType;
65
+ orderDirection: OrderDirection;
66
+ orderSide: OrderSide;
67
+ userNonce: string;
68
+ authority: string;
69
+ createdAt: string;
70
+ };
71
+ export type BookOrder = {
72
+ id: string;
73
+ price: string;
74
+ totalShares: string;
75
+ filledShares: string;
76
+ authority: string;
77
+ orderDirection: OrderDirection;
78
+ orderSide: OrderSide;
79
+ userNonce: string;
80
+ };
81
+ export declare enum WinningDirection {
82
+ HYPE = "Hype",
83
+ DRAW = "Draw",
84
+ FLOP = "Flop",
85
+ NONE = "None"
86
+ }
87
+ export declare enum OrderDirection {
88
+ HYPE = "hype",
89
+ FLOP = "flop"
90
+ }
91
+ export declare enum OrderStatus {
92
+ INIT = "init",
93
+ OPEN = "open",
94
+ CLOSED = "closed",
95
+ CLAIMED = "claimed",
96
+ LIQUIDATED = "liquidated",
97
+ WAITING = "waiting"
98
+ }
99
+ export declare enum OrderType {
100
+ LIMIT = "limit",
101
+ MARKET = "market"
102
+ }
103
+ export declare enum OrderSide {
104
+ BID = "bid",
105
+ ASK = "ask"
106
+ }
107
+ export type PlaceBidOrderArgs = {
108
+ marketId: number;
109
+ amount: number;
110
+ price: number;
111
+ direction: {
112
+ hype: {};
113
+ } | {
114
+ flop: {};
115
+ };
116
+ mint: PublicKey;
117
+ };
118
+ export type PlaceAskOrderArgs = {
119
+ marketId: number;
120
+ orders: {
121
+ amount: number;
122
+ price: number;
123
+ bidOrderId: number;
124
+ userNonce: number;
125
+ }[];
126
+ direction: {
127
+ hype: {};
128
+ } | {
129
+ flop: {};
130
+ };
131
+ };
132
+ export type InitializeMarketArgs = {
133
+ marketId: number;
134
+ startTime: number;
135
+ endTime: number;
136
+ question: string;
137
+ feeBps: number;
138
+ customer: PublicKey | null;
139
+ };
140
+ export type CreateCustomerArgs = {
141
+ id: number;
142
+ name: string;
143
+ authority: PublicKey;
144
+ feeRecipient: PublicKey;
145
+ };
146
+ export type OpenOrderArgs = {
147
+ marketId: number;
148
+ amount: number;
149
+ token: string;
150
+ direction: {
151
+ hype: {};
152
+ } | {
153
+ flop: {};
154
+ };
155
+ mint: PublicKey;
156
+ };
157
+ export type CreateMarketArgs = {
158
+ marketId: number;
159
+ startTime: number;
160
+ endTime: number;
161
+ question: string;
162
+ feeBps: number;
163
+ customer: PublicKey | null;
164
+ payoutFee: number;
165
+ mint: PublicKey;
166
+ poolId?: number;
167
+ currentMarketId?: number;
168
+ upPrice?: number;
169
+ downPrice?: number;
170
+ };
171
+ export type CreatePoolArgs = {
172
+ poolId: number;
173
+ question: string;
174
+ startTime?: number;
175
+ endTime?: number;
176
+ feeBps?: number;
177
+ payoutFee?: number;
178
+ mint?: PublicKey;
179
+ customer?: PublicKey | null;
180
+ markets: {
181
+ marketId: number;
182
+ question: string;
183
+ upPrice?: number;
184
+ downPrice?: number;
185
+ }[];
186
+ isFast?: boolean;
187
+ };
188
+ export type CancelBidOrderArgs = {
189
+ marketId: number;
190
+ orderId: number;
191
+ userNonce: number;
192
+ mint: PublicKey;
193
+ direction: {
194
+ hype: {};
195
+ } | {
196
+ flop: {};
197
+ };
198
+ };
199
+ export type CancelAskOrderArgs = {
200
+ marketId: number;
201
+ orderId: number;
202
+ userNonce: number;
203
+ direction: {
204
+ hype: {};
205
+ } | {
206
+ flop: {};
207
+ };
208
+ };
209
+ export type MarketBidOrderArgs = {
210
+ marketId: number;
211
+ amount: number;
212
+ direction: {
213
+ hype: {};
214
+ } | {
215
+ flop: {};
216
+ };
217
+ mint: PublicKey;
218
+ feeBps: number;
219
+ };
220
+ export type MarketAskOrderArgs = {
221
+ marketId: number;
222
+ shares: number;
223
+ bidOrderId: number;
224
+ direction: {
225
+ hype: {};
226
+ } | {
227
+ flop: {};
228
+ };
229
+ mint: PublicKey;
11
230
  };
@@ -1,2 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderSide = exports.OrderType = exports.OrderStatus = exports.OrderDirection = exports.WinningDirection = void 0;
4
+ var WinningDirection;
5
+ (function (WinningDirection) {
6
+ WinningDirection["HYPE"] = "Hype";
7
+ WinningDirection["DRAW"] = "Draw";
8
+ WinningDirection["FLOP"] = "Flop";
9
+ WinningDirection["NONE"] = "None";
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 = {}));
@@ -1,15 +1,18 @@
1
- export type CreateChestArgs = {
2
- id: number;
3
- initialPrizePool: number;
1
+ import { PublicKey } from '@solana/web3.js';
2
+ export type TransferPoseidonArgs = {
3
+ poseidonAsset: PublicKey;
4
+ ticketAsset: PublicKey;
5
+ ticketNumber: number;
4
6
  };
5
- export type BidChestArgs = {
6
- id: number;
7
- amount: number;
7
+ export type WithdrawPoseidonArgs = {
8
+ poseidonAsset: PublicKey;
9
+ nft: number;
8
10
  };
9
- export type BuyChestTokenArgs = {
10
- id: number;
11
- amount: number;
11
+ export type AddTraderPoseidonArgs = {
12
+ user: PublicKey;
13
+ poseidonAsset: PublicKey;
12
14
  };
13
- export type CollectChestTokenArgs = {
14
- id: number;
15
+ export type RemoveTraderPoseidonArgs = {
16
+ user: PublicKey;
17
+ poseidonAsset: PublicKey;
15
18
  };