@aurigami/sdk 1.11.0-beta → 1.11.0-beta2

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/sdk.esm.js CHANGED
@@ -4877,6 +4877,49 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4877
4877
  }
4878
4878
 
4879
4879
  return getPlyGameResultsInTransaction;
4880
+ }()
4881
+ /**
4882
+ * Top 100 users by amount of PULP unlocked
4883
+ */
4884
+ ;
4885
+
4886
+ _proto.leaderboard =
4887
+ /*#__PURE__*/
4888
+ function () {
4889
+ var _leaderboard = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7() {
4890
+ var _this4 = this;
4891
+
4892
+ var result;
4893
+ return runtime_1.wrap(function _callee7$(_context7) {
4894
+ while (1) {
4895
+ switch (_context7.prev = _context7.next) {
4896
+ case 0:
4897
+ _context7.next = 2;
4898
+ return getPaginatedApi('/plygame/leaderboard');
4899
+
4900
+ case 2:
4901
+ result = _context7.sent;
4902
+ return _context7.abrupt("return", result.items.map(function (item, i) {
4903
+ return {
4904
+ player: item.user,
4905
+ unlockedPulpAmount: new TokenAmount(_this4.pulpToken, item.unlockedAmount),
4906
+ gamesPlayed: item.count
4907
+ };
4908
+ }));
4909
+
4910
+ case 4:
4911
+ case "end":
4912
+ return _context7.stop();
4913
+ }
4914
+ }
4915
+ }, _callee7);
4916
+ }));
4917
+
4918
+ function leaderboard() {
4919
+ return _leaderboard.apply(this, arguments);
4920
+ }
4921
+
4922
+ return leaderboard;
4880
4923
  }();
4881
4924
 
4882
4925
  return PlyGameRead;
@@ -4896,19 +4939,19 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
4896
4939
  _proto2.makeBetMultiple =
4897
4940
  /*#__PURE__*/
4898
4941
  function () {
4899
- var _makeBetMultiple = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(amount, times) {
4900
- return runtime_1.wrap(function _callee7$(_context7) {
4942
+ var _makeBetMultiple = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(amount, times) {
4943
+ return runtime_1.wrap(function _callee8$(_context8) {
4901
4944
  while (1) {
4902
- switch (_context7.prev = _context7.next) {
4945
+ switch (_context8.prev = _context8.next) {
4903
4946
  case 0:
4904
- return _context7.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetMultiple(amount.rawAmount(), times));
4947
+ return _context8.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetMultiple(amount.rawAmount(), times));
4905
4948
 
4906
4949
  case 1:
4907
4950
  case "end":
4908
- return _context7.stop();
4951
+ return _context8.stop();
4909
4952
  }
4910
4953
  }
4911
- }, _callee7, this);
4954
+ }, _callee8, this);
4912
4955
  }));
4913
4956
 
4914
4957
  function makeBetMultiple(_x5, _x6) {
@@ -4925,19 +4968,19 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
4925
4968
  _proto2.makeBetOnce =
4926
4969
  /*#__PURE__*/
4927
4970
  function () {
4928
- var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(amount) {
4929
- return runtime_1.wrap(function _callee8$(_context8) {
4971
+ var _makeBetOnce = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(amount) {
4972
+ return runtime_1.wrap(function _callee9$(_context9) {
4930
4973
  while (1) {
4931
- switch (_context8.prev = _context8.next) {
4974
+ switch (_context9.prev = _context9.next) {
4932
4975
  case 0:
4933
- return _context8.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
4976
+ return _context9.abrupt("return", this.env.plygame.connect(this._networkConnection.signer).makeBetOnce(amount.rawAmount()));
4934
4977
 
4935
4978
  case 1:
4936
4979
  case "end":
4937
- return _context8.stop();
4980
+ return _context9.stop();
4938
4981
  }
4939
4982
  }
4940
- }, _callee8, this);
4983
+ }, _callee9, this);
4941
4984
  }));
4942
4985
 
4943
4986
  function makeBetOnce(_x7) {
@@ -4947,6 +4990,29 @@ var PlyGameReadWrite = /*#__PURE__*/function (_PlyGameRead) {
4947
4990
  return makeBetOnce;
4948
4991
  }();
4949
4992
 
4993
+ _proto2.approve = /*#__PURE__*/function () {
4994
+ var _approve = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(amount) {
4995
+ return runtime_1.wrap(function _callee10$(_context10) {
4996
+ while (1) {
4997
+ switch (_context10.prev = _context10.next) {
4998
+ case 0:
4999
+ return _context10.abrupt("return", this.env.ply.connect(this._networkConnection.signer).approve(this.env.plygame.address, amount.rawAmount()));
5000
+
5001
+ case 1:
5002
+ case "end":
5003
+ return _context10.stop();
5004
+ }
5005
+ }
5006
+ }, _callee10, this);
5007
+ }));
5008
+
5009
+ function approve(_x8) {
5010
+ return _approve.apply(this, arguments);
5011
+ }
5012
+
5013
+ return approve;
5014
+ }();
5015
+
4950
5016
  return PlyGameReadWrite;
4951
5017
  }(PlyGameRead);
4952
5018
  var PlyGame = /*#__PURE__*/function (_BlockchainEntity) {