@triadxyz/triad-protocol 1.3.0-beta → 1.3.1-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.
@@ -21,45 +21,15 @@ const constants_1 = require("./utils/constants");
21
21
  const file = fs_1.default.readFileSync('/Users/dannpl/.config/solana/triad.json');
22
22
  const rpc_file = fs_1.default.readFileSync('/Users/dannpl/.config/solana/rpc.txt');
23
23
  const keypair = web3_js_1.Keypair.fromSecretKey(new Uint8Array(JSON.parse(file.toString())));
24
- const connection = new web3_js_1.Connection("");
24
+ const connection = new web3_js_1.Connection(rpc_file.toString());
25
25
  const wallet = new anchor_1.Wallet(keypair);
26
26
  const triadProtocol = new _1.default(connection, wallet);
27
27
  const markets = [
28
28
  {
29
- marketId: 31,
30
- question: 'Will $ETH hit new ATH before 2025?',
31
- startTime: 1733508000,
32
- endTime: 1735603200
33
- },
34
- {
35
- marketId: 32,
36
- question: 'Will $ME price be above $3.20 on December 11?',
37
- startTime: 1733508000,
38
- endTime: 1733788800
39
- },
40
- {
41
- marketId: 33,
42
- question: 'Will $SOL be above $245.00 on December 12?',
43
- startTime: 1733508000,
44
- endTime: 1733875200
45
- },
46
- {
47
- marketId: 34,
48
- question: 'Will $SOL flip $XRP again in 2024?',
49
- startTime: 1733508000,
50
- endTime: 1735603200
51
- },
52
- {
53
- marketId: 35,
54
- question: 'Will $XRP be above $USDT in MKC on December 31?',
55
- startTime: 1733508000,
56
- endTime: 1735603200
57
- },
58
- {
59
- marketId: 36,
60
- question: 'Will DOGE be above $0.45 on December 12?',
61
- startTime: 1733508000,
62
- endTime: 1733875200
29
+ marketId: 37,
30
+ question: 'Will $STREAM price be above $1 on December 17?',
31
+ startTime: 1733940000,
32
+ endTime: 1734404340
63
33
  }
64
34
  ];
65
35
  const ordersHypeAndFloopBot = [
@@ -235,7 +205,7 @@ const closeOrders = () => __awaiter(void 0, void 0, void 0, function* () {
235
205
  }
236
206
  });
237
207
  const resolveMarket = () => __awaiter(void 0, void 0, void 0, function* () {
238
- const marketsToResolve = [{ marketId: 32, winningDirection: { hype: {} } }];
208
+ const marketsToResolve = [{ marketId: 33, winningDirection: { flop: {} } }];
239
209
  for (const market of marketsToResolve) {
240
210
  const response = yield triadProtocol.trade.resolveMarket({
241
211
  marketId: market.marketId,
@@ -246,6 +216,7 @@ const resolveMarket = () => __awaiter(void 0, void 0, void 0, function* () {
246
216
  console.log(response);
247
217
  }
248
218
  });
219
+ resolveMarket();
249
220
  const addLiquidity = () => __awaiter(void 0, void 0, void 0, function* () {
250
221
  const response = yield triadProtocol.trade.addLiquidity({
251
222
  marketId: 5,
@@ -283,3 +254,7 @@ const burnLP = () => __awaiter(void 0, void 0, void 0, function* () {
283
254
  const response = yield (0, spl_token_1.burn)(connection, keypair, getTokenAccount, SOL_LP, wallet.publicKey, amount);
284
255
  console.log(response);
285
256
  });
257
+ const getReferral = () => __awaiter(void 0, void 0, void 0, function* () {
258
+ const response = yield triadProtocol.getUser(new web3_js_1.PublicKey('in6cFcFF2eawkdtrGvV4mM33dRhBymJcf1Fk8mrqGJt'));
259
+ console.log(response);
260
+ });
package/dist/stake.js CHANGED
@@ -97,13 +97,13 @@ class Stake {
97
97
  const response = yield this.getUserStakes(wallet);
98
98
  const data = [];
99
99
  for (const stake of response) {
100
- const rank = (0, getRarityRank_1.default)(ranks, stake.mint, stake.name);
100
+ yield new Promise((resolve) => setTimeout(resolve, 5000));
101
101
  let available = 0;
102
102
  try {
103
103
  available = yield this.getStakeRewards({
104
104
  wallet,
105
105
  nftName: stake.name,
106
- rank,
106
+ rank: 963,
107
107
  collections
108
108
  });
109
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "1.3.0-beta",
3
+ "version": "1.3.1-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",