@triadxyz/triad-protocol 1.6.7-beta-dev → 1.6.8-beta-dev

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.
@@ -17,8 +17,8 @@ export type Market = {
17
17
  nextOrderId: string;
18
18
  feeBps: number;
19
19
  isAllowedToPayout: boolean;
20
- nftHoldersFeeAvailable: string;
21
- nftHoldersFeeClaimed: string;
20
+ creatorFeeAvailable: string;
21
+ creatorFeeClaimed: string;
22
22
  marketFeeAvailable: string;
23
23
  marketFeeClaimed: string;
24
24
  marketStart: string;
@@ -26,9 +26,11 @@ export type Market = {
26
26
  question: string;
27
27
  winningDirection: WinningDirection;
28
28
  marketLiquidityAtStart: string;
29
+ customerId: string;
29
30
  };
30
31
  export type UserTrade = {
31
32
  user: string;
33
+ authority: string;
32
34
  totalDeposits: string;
33
35
  totalWithdraws: string;
34
36
  openedOrders: string;
@@ -39,15 +41,20 @@ export type UserTrade = {
39
41
  export type Order = {
40
42
  ts: string;
41
43
  orderId: string;
42
- questionId: string;
44
+ filledShares: string;
43
45
  marketId: string;
44
46
  status: OrderStatus;
45
47
  price: string;
46
- totalAmount: string;
47
- totalShares: string;
48
+ amount: string;
49
+ shares: string;
48
50
  orderType: OrderType;
49
51
  direction: OrderDirection;
52
+ orderSide: OrderSide;
50
53
  userNonce: string;
54
+ authority: string;
55
+ poseidon: string;
56
+ linkedOrderId: string;
57
+ account: string;
51
58
  };
52
59
  export declare enum WinningDirection {
53
60
  HYPE = "Hype",
@@ -55,41 +62,40 @@ export declare enum WinningDirection {
55
62
  FLOP = "Flop",
56
63
  NONE = "None"
57
64
  }
58
- export type OrderDirection = {
59
- hype: {};
60
- } | {
61
- flop: {};
62
- };
63
- export type OrderStatus = {
64
- init: {};
65
- } | {
66
- open: {};
67
- } | {
68
- closed: {};
69
- } | {
70
- claimed: {};
71
- } | {
72
- liquidated: {};
73
- } | {
74
- waiting: {};
75
- };
76
- export type OrderType = {
77
- limit: {};
78
- } | {
79
- market: {};
80
- };
81
- export type OrderSide = {
82
- bid: {};
83
- } | {
84
- ask: {};
85
- };
65
+ export declare enum OrderDirection {
66
+ HYPE = "hype",
67
+ FLOP = "flop"
68
+ }
69
+ export declare enum OrderStatus {
70
+ INIT = "init",
71
+ OPEN = "open",
72
+ CLOSED = "closed",
73
+ CLAIMED = "claimed",
74
+ LIQUIDATED = "liquidated",
75
+ WAITING = "waiting"
76
+ }
77
+ export declare enum OrderType {
78
+ LIMIT = "limit",
79
+ MARKET = "market"
80
+ }
81
+ export declare enum OrderSide {
82
+ BID = "bid",
83
+ ASK = "ask"
84
+ }
86
85
  export type PlaceOrderArgs = {
87
86
  marketId: number;
88
87
  amount: number;
89
88
  price: number;
90
- direction: OrderDirection;
91
- orderType: OrderType;
92
- orderSide: OrderSide;
89
+ direction: {
90
+ hype: {};
91
+ } | {
92
+ flop: {};
93
+ };
94
+ orderSide: {
95
+ bid: {};
96
+ } | {
97
+ ask: {};
98
+ };
93
99
  mint: PublicKey;
94
100
  };
95
101
  export type InitializeMarketArgs = {
@@ -97,4 +103,34 @@ export type InitializeMarketArgs = {
97
103
  startTime: number;
98
104
  endTime: number;
99
105
  question: string;
106
+ feeBps: number;
107
+ customer: PublicKey | null;
108
+ };
109
+ export type UpdateMarketArgs = {
110
+ marketId: number;
111
+ marketEnd?: number;
112
+ winningDirection?: {
113
+ hype: {};
114
+ } | {
115
+ flop: {};
116
+ } | {
117
+ none: {};
118
+ } | {
119
+ draw: {};
120
+ };
121
+ };
122
+ export type CreateCustomerArgs = {
123
+ id: number;
124
+ name: string;
125
+ authority: PublicKey;
126
+ shadowStorage: PublicKey;
127
+ };
128
+ export type OpenOrderArgs = {
129
+ marketId: number;
130
+ amount: number;
131
+ direction: {
132
+ hype: {};
133
+ } | {
134
+ flop: {};
135
+ };
100
136
  };
@@ -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 = {}));