@aurigami/sdk 1.12.2 → 1.12.3
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.
- package/dist/interactors/PlyGame.d.ts +4 -0
- package/dist/sdk.cjs.development.js +46 -14
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +46 -14
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/interactors/PlyGame.ts +8 -0
|
@@ -22,6 +22,10 @@ export declare class PlyGameRead extends BlockchainEntityRead {
|
|
|
22
22
|
* Top 100 users by amount of PULP unlocked
|
|
23
23
|
*/
|
|
24
24
|
leaderboard(): Promise<PlyGameLeaderboardItem[]>;
|
|
25
|
+
getJackpotResult(round: number): Promise<{
|
|
26
|
+
winner: Address;
|
|
27
|
+
amount: TokenAmount;
|
|
28
|
+
}>;
|
|
25
29
|
}
|
|
26
30
|
export declare class PlyGameReadWrite extends PlyGameRead {
|
|
27
31
|
/**
|
|
@@ -5058,6 +5058,38 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
5058
5058
|
return leaderboard;
|
|
5059
5059
|
}();
|
|
5060
5060
|
|
|
5061
|
+
_proto.getJackpotResult = /*#__PURE__*/function () {
|
|
5062
|
+
var _getJackpotResult = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(round) {
|
|
5063
|
+
var result;
|
|
5064
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
|
5065
|
+
while (1) {
|
|
5066
|
+
switch (_context7.prev = _context7.next) {
|
|
5067
|
+
case 0:
|
|
5068
|
+
_context7.next = 2;
|
|
5069
|
+
return this.env.plygame.jackpotHistory(round);
|
|
5070
|
+
|
|
5071
|
+
case 2:
|
|
5072
|
+
result = _context7.sent;
|
|
5073
|
+
return _context7.abrupt("return", {
|
|
5074
|
+
winner: result.winner,
|
|
5075
|
+
amount: new TokenAmount(this.plyToken, result.amount.toString())
|
|
5076
|
+
});
|
|
5077
|
+
|
|
5078
|
+
case 4:
|
|
5079
|
+
case "end":
|
|
5080
|
+
return _context7.stop();
|
|
5081
|
+
}
|
|
5082
|
+
}
|
|
5083
|
+
}, _callee7, this);
|
|
5084
|
+
}));
|
|
5085
|
+
|
|
5086
|
+
function getJackpotResult(_x5) {
|
|
5087
|
+
return _getJackpotResult.apply(this, arguments);
|
|
5088
|
+
}
|
|
5089
|
+
|
|
5090
|
+
return getJackpotResult;
|
|
5091
|
+
}();
|
|
5092
|
+
|
|
5061
5093
|
return PlyGameRead;
|
|
5062
5094
|
}(BlockchainEntityRead);
|
|
5063
5095
|
var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
|
|
@@ -5075,22 +5107,22 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
|
|
|
5075
5107
|
_proto2.makeBetOnce =
|
|
5076
5108
|
/*#__PURE__*/
|
|
5077
5109
|
function () {
|
|
5078
|
-
var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
5079
|
-
return runtime_1.wrap(function
|
|
5110
|
+
var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(amount) {
|
|
5111
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
|
5080
5112
|
while (1) {
|
|
5081
|
-
switch (
|
|
5113
|
+
switch (_context8.prev = _context8.next) {
|
|
5082
5114
|
case 0:
|
|
5083
|
-
return
|
|
5115
|
+
return _context8.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
|
|
5084
5116
|
|
|
5085
5117
|
case 1:
|
|
5086
5118
|
case "end":
|
|
5087
|
-
return
|
|
5119
|
+
return _context8.stop();
|
|
5088
5120
|
}
|
|
5089
5121
|
}
|
|
5090
|
-
},
|
|
5122
|
+
}, _callee8, this);
|
|
5091
5123
|
}));
|
|
5092
5124
|
|
|
5093
|
-
function makeBetOnce(
|
|
5125
|
+
function makeBetOnce(_x6) {
|
|
5094
5126
|
return _makeBetOnce.apply(this, arguments);
|
|
5095
5127
|
}
|
|
5096
5128
|
|
|
@@ -5098,22 +5130,22 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
|
|
|
5098
5130
|
}();
|
|
5099
5131
|
|
|
5100
5132
|
_proto2.approve = /*#__PURE__*/function () {
|
|
5101
|
-
var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
5102
|
-
return runtime_1.wrap(function
|
|
5133
|
+
var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(amount) {
|
|
5134
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
|
5103
5135
|
while (1) {
|
|
5104
|
-
switch (
|
|
5136
|
+
switch (_context9.prev = _context9.next) {
|
|
5105
5137
|
case 0:
|
|
5106
|
-
return
|
|
5138
|
+
return _context9.abrupt("return", this.env.ply.connect(this._networkConnection.signer).approve(this.env.plygame.address, amount.rawAmount()));
|
|
5107
5139
|
|
|
5108
5140
|
case 1:
|
|
5109
5141
|
case "end":
|
|
5110
|
-
return
|
|
5142
|
+
return _context9.stop();
|
|
5111
5143
|
}
|
|
5112
5144
|
}
|
|
5113
|
-
},
|
|
5145
|
+
}, _callee9, this);
|
|
5114
5146
|
}));
|
|
5115
5147
|
|
|
5116
|
-
function approve(
|
|
5148
|
+
function approve(_x7) {
|
|
5117
5149
|
return _approve.apply(this, arguments);
|
|
5118
5150
|
}
|
|
5119
5151
|
|