@triadxyz/triad-protocol 3.1.1-beta → 3.1.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.
@@ -1,8 +1,9 @@
1
- import { PublicKey } from '@solana/web3.js';
1
+ import { Commitment, PublicKey } from '@solana/web3.js';
2
2
  export type RpcOptions = {
3
3
  skipPreflight?: boolean;
4
4
  microLamports?: number;
5
5
  computeBudget?: number;
6
+ commitment?: Commitment;
6
7
  };
7
8
  export type Pool = {
8
9
  address: string;
@@ -106,18 +107,50 @@ export declare enum OrderSide {
106
107
  BID = "bid",
107
108
  ASK = "ask"
108
109
  }
110
+ export type OrderDirectionEncoded = {
111
+ hype: {};
112
+ } | {
113
+ flop: {};
114
+ };
115
+ export type OrderTypeEncoded = {
116
+ limit: {};
117
+ } | {
118
+ market: {};
119
+ };
120
+ export type OrderSideEncoded = {
121
+ bid: {};
122
+ } | {
123
+ ask: {};
124
+ };
125
+ export type OrderStatusEncoded = {
126
+ init: {};
127
+ } | {
128
+ open: {};
129
+ } | {
130
+ closed: {};
131
+ } | {
132
+ claimed: {};
133
+ } | {
134
+ liquidated: {};
135
+ } | {
136
+ waiting: {};
137
+ };
138
+ export type WinningDirectionEncoded = {
139
+ hype: {};
140
+ } | {
141
+ flop: {};
142
+ } | {
143
+ draw: {};
144
+ } | {
145
+ none: {};
146
+ };
109
147
  export type PlaceBidOrderArgs = {
110
148
  marketId: number;
111
149
  orders: {
112
150
  amount: number;
113
151
  price: number;
114
- direction: {
115
- hype: {};
116
- } | {
117
- flop: {};
118
- };
152
+ orderDirection: OrderDirectionEncoded;
119
153
  }[];
120
- mint: PublicKey;
121
154
  isTrdPayout: boolean;
122
155
  };
123
156
  export type PlaceAskOrderArgs = {
@@ -128,11 +161,6 @@ export type PlaceAskOrderArgs = {
128
161
  bidOrderId: number;
129
162
  userNonce: number;
130
163
  }[];
131
- direction: {
132
- hype: {};
133
- } | {
134
- flop: {};
135
- };
136
164
  };
137
165
  export type InitializeMarketArgs = {
138
166
  marketId: number;
@@ -147,17 +175,12 @@ export type CreateCustomerArgs = {
147
175
  name: string;
148
176
  authority: PublicKey;
149
177
  feeRecipient: PublicKey;
150
- isStaked: boolean;
151
178
  };
152
179
  export type OpenOrderArgs = {
153
180
  marketId: number;
154
181
  amount: number;
155
182
  token: string;
156
- direction: {
157
- hype: {};
158
- } | {
159
- flop: {};
160
- };
183
+ direction: OrderDirectionEncoded;
161
184
  mint: PublicKey;
162
185
  };
163
186
  export type CreateMarketArgs = {
@@ -170,7 +193,6 @@ export type CreateMarketArgs = {
170
193
  payoutFee: number;
171
194
  }[];
172
195
  customer: PublicKey;
173
- mint: PublicKey;
174
196
  poolId?: number;
175
197
  };
176
198
  export type CreatePoolArgs = {
@@ -180,7 +202,6 @@ export type CreatePoolArgs = {
180
202
  endTime: number;
181
203
  feeBps: number;
182
204
  payoutFee: number;
183
- mint: PublicKey;
184
205
  customer: PublicKey;
185
206
  markets: {
186
207
  marketId: number;
@@ -193,35 +214,21 @@ export type CancelBidOrderArgs = {
193
214
  orders: {
194
215
  orderId: number;
195
216
  userNonce: number;
196
- direction: {
197
- hype: {};
198
- } | {
199
- flop: {};
200
- };
217
+ orderDirection: OrderDirectionEncoded;
201
218
  }[];
202
- mint: PublicKey;
203
219
  };
204
220
  export type CancelAskOrderArgs = {
205
221
  marketId: number;
206
222
  orders: {
207
223
  orderId: number;
208
224
  userNonce: number;
209
- direction: {
210
- hype: {};
211
- } | {
212
- flop: {};
213
- };
225
+ orderDirection: OrderDirectionEncoded;
214
226
  }[];
215
227
  };
216
228
  export type MarketBidOrderArgs = {
217
229
  marketId: number;
218
230
  amount: number;
219
- direction: {
220
- hype: {};
221
- } | {
222
- flop: {};
223
- };
224
- mint: PublicKey;
231
+ orderDirection: OrderDirectionEncoded;
225
232
  feeBps: number;
226
233
  isTrdPayout: boolean;
227
234
  };
@@ -232,14 +239,17 @@ export type MarketAskOrderArgs = {
232
239
  bidOrderId: number;
233
240
  userNonce: number;
234
241
  }[];
235
- direction: {
236
- hype: {};
237
- } | {
238
- flop: {};
239
- };
242
+ orderDirection: OrderDirectionEncoded;
240
243
  isTrdPayout: boolean;
241
244
  feeBps: number;
242
245
  };
246
+ export type CollectMarketFeeArgs = {
247
+ markets: {
248
+ marketAddress: PublicKey;
249
+ customerId: number;
250
+ customerFeeRecipient: PublicKey;
251
+ }[];
252
+ };
243
253
  export type Customer = {
244
254
  id: number;
245
255
  authority: string;
@@ -249,7 +259,33 @@ export type Customer = {
249
259
  isVerified: boolean;
250
260
  address: string;
251
261
  };
252
- export type UpdateCustomerFeeArgs = {
253
- feeBps: number;
254
- wallet: PublicKey;
262
+ export type StakeVault = {
263
+ name: string;
264
+ collection: string;
265
+ authority: string;
266
+ slots: number;
267
+ amount: number;
268
+ isLocked: boolean;
269
+ tokenMint: string;
270
+ amountPaid: number;
271
+ nftStaked: number;
272
+ tokenDecimals: number;
273
+ tokenStaked: number;
274
+ week: number;
275
+ initTs: number;
276
+ endTs: number;
277
+ };
278
+ export type Stake = {
279
+ authority: string;
280
+ initTs: number;
281
+ checkedTs: number;
282
+ claimed: number;
283
+ available: number;
284
+ amount: number;
285
+ };
286
+ export type Unstake = {
287
+ address: string;
288
+ authority: string;
289
+ amount: number;
290
+ withdrawTs: number;
255
291
  };