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