@triadxyz/triad-protocol 1.6.8-beta-dev → 1.6.8-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,4 +1,3 @@
1
- import { PublicKey } from '@solana/web3.js';
2
1
  export type Market = {
3
2
  address: string;
4
3
  bump: number;
@@ -17,8 +16,8 @@ export type Market = {
17
16
  nextOrderId: string;
18
17
  feeBps: number;
19
18
  isAllowedToPayout: boolean;
20
- creatorFeeAvailable: string;
21
- creatorFeeClaimed: string;
19
+ nftHoldersFeeAvailable: string;
20
+ nftHoldersFeeClaimed: string;
22
21
  marketFeeAvailable: string;
23
22
  marketFeeClaimed: string;
24
23
  marketStart: string;
@@ -26,11 +25,9 @@ export type Market = {
26
25
  question: string;
27
26
  winningDirection: WinningDirection;
28
27
  marketLiquidityAtStart: string;
29
- customerId: string;
30
28
  };
31
29
  export type UserTrade = {
32
30
  user: string;
33
- authority: string;
34
31
  totalDeposits: string;
35
32
  totalWithdraws: string;
36
33
  openedOrders: string;
@@ -41,20 +38,15 @@ export type UserTrade = {
41
38
  export type Order = {
42
39
  ts: string;
43
40
  orderId: string;
44
- filledShares: string;
41
+ questionId: string;
45
42
  marketId: string;
46
43
  status: OrderStatus;
47
44
  price: string;
48
- amount: string;
49
- shares: string;
45
+ totalAmount: string;
46
+ totalShares: string;
50
47
  orderType: OrderType;
51
48
  direction: OrderDirection;
52
- orderSide: OrderSide;
53
49
  userNonce: string;
54
- authority: string;
55
- poseidon: string;
56
- linkedOrderId: string;
57
- account: string;
58
50
  };
59
51
  export declare enum WinningDirection {
60
52
  HYPE = "Hype",
@@ -62,75 +54,32 @@ export declare enum WinningDirection {
62
54
  FLOP = "Flop",
63
55
  NONE = "None"
64
56
  }
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
- }
85
- export type PlaceOrderArgs = {
57
+ export type OrderDirection = {
58
+ hype: {};
59
+ } | {
60
+ flop: {};
61
+ };
62
+ export type OrderStatus = {
63
+ init: {};
64
+ } | {
65
+ open: {};
66
+ } | {
67
+ closed: {};
68
+ };
69
+ export type OrderType = {
70
+ limit: {};
71
+ } | {
72
+ market: {};
73
+ };
74
+ export type OpenOrderArgs = {
86
75
  marketId: number;
87
76
  amount: number;
88
- price: number;
89
- direction: {
90
- hype: {};
91
- } | {
92
- flop: {};
93
- };
94
- orderSide: {
95
- bid: {};
96
- } | {
97
- ask: {};
98
- };
99
- mint: PublicKey;
77
+ direction: OrderDirection;
78
+ token: string;
100
79
  };
101
80
  export type InitializeMarketArgs = {
102
81
  marketId: number;
103
82
  startTime: number;
104
83
  endTime: number;
105
84
  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
- };
136
85
  };
@@ -1,6 +1,6 @@
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;
3
+ exports.WinningDirection = void 0;
4
4
  var WinningDirection;
5
5
  (function (WinningDirection) {
6
6
  WinningDirection["HYPE"] = "Hype";
@@ -8,27 +8,3 @@ 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 = {}));