@triadxyz/triad-protocol 1.6.4-beta → 1.6.5-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.
@@ -482,25 +482,25 @@ const deployImage = (image) => __awaiter(void 0, void 0, void 0, function* () {
482
482
  console.log(file);
483
483
  return file;
484
484
  });
485
- // 1 - TRD 10k - 10,000 / 1 to 20
486
- // 2 - TRD 50 - 10,000 / 21 to 2021
487
- // 3 - TRD 5 - 50,000 / 2022 to 102022
488
- // 4 - Honeyland NFT - 30 NFT / 102023 to 132023
489
- // 5 - Poseidon NFT - 20 NFT / 132024 to 152024
490
- // 6 - SMB 3 - 2 NFT / 152025 to 157025
491
- // 7 - 500 tridents / 157026 to 657026
492
- // 8 - 2k tridents / 657027 to 857027
493
- // 9 - 50 HXD - 10,000 / 857028 to 864008
494
- // 10 - 0.01 ORE - 10 ORE / 864009 to 924009
495
- // 11 - TRD 100 - 5,000 / 924010 to 925010
496
- // 12 - 10 STREAM - 15K STREAM / 925011 to 1000000
485
+ // 1 - TRD 10k - 10,000
486
+ // 2 - TRD 50 - 10,000
487
+ // 3 - TRD 5 - 50,000
488
+ // 4 - Honeyland NFT - 30 NFT
489
+ // 5 - Poseidon NFT - 20 NFT
490
+ // 6 - SMB 3 - 2 NFT
491
+ // 7 - 500 tridents
492
+ // 8 - 2k tridents
493
+ // 9 - 50 HXD - 10,000
494
+ // 10 - 0.01 ORE - 10 ORE
495
+ // 11 - TRD 100 - 5,000
496
+ // 12 - 10 STREAM - 15K STREAM
497
497
  const addWheelPrize = () => __awaiter(void 0, void 0, void 0, function* () {
498
498
  const response = yield triadProtocol.wheel.addWheelPrize({
499
- prize: 11,
500
- amount: 20,
501
- rangeMin: 924010,
502
- rangeMax: 925010,
503
- availableQuantity: 50
499
+ prize: 3,
500
+ amount: 5,
501
+ rangeMin: 2012,
502
+ rangeMax: 103012,
503
+ availableQuantity: 2000
504
504
  });
505
505
  console.log(response);
506
506
  });
@@ -515,10 +515,9 @@ const getWheel = () => __awaiter(void 0, void 0, void 0, function* () {
515
515
  rangeMax: prize.rangeMax.toString(),
516
516
  availableQuantity: prize.availableQuantity.toString()
517
517
  }));
518
- console.log(prizes);
518
+ console.table(prizes);
519
519
  });
520
520
  const spinWheel = () => __awaiter(void 0, void 0, void 0, function* () {
521
521
  const spin = (0, pda_1.getWheelPDA)(triadProtocol.program.programId, constants_1.VALENT_SPIN_NAME);
522
522
  console.log(spin);
523
523
  });
524
- spinWheel();
package/dist/wheel.d.ts CHANGED
@@ -45,7 +45,7 @@ export default class Wheel {
45
45
  */
46
46
  spinWheel(args: {
47
47
  isSol: boolean;
48
- prize: number;
48
+ prize: number[];
49
49
  verifier: Keypair;
50
50
  }, options?: RpcOptions): Promise<string>;
51
51
  /**
package/dist/wheel.js CHANGED
@@ -86,19 +86,22 @@ class Wheel {
86
86
  spinWheel(args, options) {
87
87
  return __awaiter(this, void 0, void 0, function* () {
88
88
  const wheelPDA = (0, pda_1.getWheelPDA)(this.program.programId, constants_1.VALENT_SPIN_NAME);
89
- const ix = yield this.program.methods
90
- .spinWheel({
91
- isSol: args.isSol,
92
- prize: new anchor_1.BN(args.prize)
93
- })
94
- .accounts({
95
- signer: this.provider.wallet.publicKey,
96
- verifier: constants_1.VERIFIER,
97
- wheel: wheelPDA,
98
- mint: constants_1.WHEEL_MINT
99
- })
100
- .instruction();
101
- return (0, sendVersionedTransaction_1.default)(this.provider, [ix], options, undefined, [], args.verifier);
89
+ let ixs = [];
90
+ for (const prize of args.prize) {
91
+ ixs.push(yield this.program.methods
92
+ .spinWheel({
93
+ isSol: args.isSol,
94
+ prize: new anchor_1.BN(prize)
95
+ })
96
+ .accounts({
97
+ signer: this.provider.wallet.publicKey,
98
+ verifier: constants_1.VERIFIER,
99
+ wheel: wheelPDA,
100
+ mint: constants_1.WHEEL_MINT
101
+ })
102
+ .instruction());
103
+ return (0, sendVersionedTransaction_1.default)(this.provider, ixs, options, undefined, [], args.verifier);
104
+ }
102
105
  });
103
106
  }
104
107
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "1.6.4-beta",
3
+ "version": "1.6.5-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",