@aurigami/sdk 1.8.1 → 1.8.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/SDK.d.ts CHANGED
@@ -41,10 +41,9 @@ export declare class SdkRead extends BlockchainEntityRead {
41
41
  }
42
42
  export declare class SdkReadWrite extends SdkRead {
43
43
  /**
44
- * Claim PLY reward in all markets + staking pools
44
+ * Claim rewards in all markets + staking pools
45
45
  */
46
46
  claim(): Promise<TransactionResponse>;
47
- claimLpRewards(): Promise<TransactionResponse>;
48
47
  stake(amount: TokenAmount): Promise<TransactionResponse>;
49
48
  unstake(amount: TokenAmount): Promise<TransactionResponse>;
50
49
  }
@@ -4692,6 +4692,8 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4692
4692
  case 2:
4693
4693
  result = _context5.sent;
4694
4694
  items = result.items.map(function (item, i) {
4695
+ var _item$transactionHash;
4696
+
4695
4697
  return {
4696
4698
  campaign: item.campaign,
4697
4699
  userAddr: userAddr,
@@ -4699,7 +4701,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4699
4701
  rewardTokenAmount: TokenAmount.fromAddressAndAmount(item.token, item.amount),
4700
4702
  startTime: REFERRAL_CAMPAIGNS[item.campaign].start,
4701
4703
  endTime: REFERRAL_CAMPAIGNS[item.campaign].end,
4702
- transactionHash: item == null ? void 0 : item.transactionHash
4704
+ transactionHash: (_item$transactionHash = item.transactionHash) != null ? _item$transactionHash : null
4703
4705
  };
4704
4706
  });
4705
4707
  return _context5.abrupt("return", items);
@@ -5187,7 +5189,7 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5187
5189
  var _proto2 = SdkReadWrite.prototype;
5188
5190
 
5189
5191
  /**
5190
- * Claim PLY reward in all markets + staking pools
5192
+ * Claim rewards in all markets + staking pools
5191
5193
  */
5192
5194
  _proto2.claim =
5193
5195
  /*#__PURE__*/
@@ -5197,15 +5199,9 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5197
5199
  while (1) {
5198
5200
  switch (_context10.prev = _context10.next) {
5199
5201
  case 0:
5200
- _context10.t0 = this.env.comptroller.connect(this._networkConnection.signer);
5201
- _context10.next = 3;
5202
- return this._networkConnection.signer.getAddress();
5202
+ return _context10.abrupt("return", this.env.auriLens.connect(this._networkConnection.signer).claimRewards(this.env.comptroller.address, this.env.auriFairLaunch.address, ALL_STAKING_POOLS));
5203
5203
 
5204
- case 3:
5205
- _context10.t1 = _context10.sent;
5206
- return _context10.abrupt("return", _context10.t0['claimReward(uint8,address)'].call(_context10.t0, 0, _context10.t1));
5207
-
5208
- case 5:
5204
+ case 1:
5209
5205
  case "end":
5210
5206
  return _context10.stop();
5211
5207
  }
@@ -5220,22 +5216,15 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5220
5216
  return claim;
5221
5217
  }();
5222
5218
 
5223
- _proto2.claimLpRewards = /*#__PURE__*/function () {
5224
- var _claimLpRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11() {
5219
+ _proto2.stake = /*#__PURE__*/function () {
5220
+ var _stake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(amount) {
5225
5221
  return runtime_1.wrap(function _callee11$(_context11) {
5226
5222
  while (1) {
5227
5223
  switch (_context11.prev = _context11.next) {
5228
5224
  case 0:
5229
- _context11.t0 = this.env.auriFairLaunch.connect(this._networkConnection.signer);
5230
- _context11.next = 3;
5231
- return this._networkConnection.signer.getAddress();
5232
-
5233
- case 3:
5234
- _context11.t1 = _context11.sent;
5235
- _context11.t2 = INF;
5236
- return _context11.abrupt("return", _context11.t0.harvest.call(_context11.t0, _context11.t1, 0, _context11.t2));
5225
+ return _context11.abrupt("return", new StakingReadWrite(this._networkConnection).stake(amount));
5237
5226
 
5238
- case 6:
5227
+ case 1:
5239
5228
  case "end":
5240
5229
  return _context11.stop();
5241
5230
  }
@@ -5243,29 +5232,6 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5243
5232
  }, _callee11, this);
5244
5233
  }));
5245
5234
 
5246
- function claimLpRewards() {
5247
- return _claimLpRewards.apply(this, arguments);
5248
- }
5249
-
5250
- return claimLpRewards;
5251
- }();
5252
-
5253
- _proto2.stake = /*#__PURE__*/function () {
5254
- var _stake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(amount) {
5255
- return runtime_1.wrap(function _callee12$(_context12) {
5256
- while (1) {
5257
- switch (_context12.prev = _context12.next) {
5258
- case 0:
5259
- return _context12.abrupt("return", new StakingReadWrite(this._networkConnection).stake(amount));
5260
-
5261
- case 1:
5262
- case "end":
5263
- return _context12.stop();
5264
- }
5265
- }
5266
- }, _callee12, this);
5267
- }));
5268
-
5269
5235
  function stake(_x9) {
5270
5236
  return _stake.apply(this, arguments);
5271
5237
  }
@@ -5274,19 +5240,19 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
5274
5240
  }();
5275
5241
 
5276
5242
  _proto2.unstake = /*#__PURE__*/function () {
5277
- var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(amount) {
5278
- return runtime_1.wrap(function _callee13$(_context13) {
5243
+ var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(amount) {
5244
+ return runtime_1.wrap(function _callee12$(_context12) {
5279
5245
  while (1) {
5280
- switch (_context13.prev = _context13.next) {
5246
+ switch (_context12.prev = _context12.next) {
5281
5247
  case 0:
5282
- return _context13.abrupt("return", new StakingReadWrite(this._networkConnection).unstake(amount));
5248
+ return _context12.abrupt("return", new StakingReadWrite(this._networkConnection).unstake(amount));
5283
5249
 
5284
5250
  case 1:
5285
5251
  case "end":
5286
- return _context13.stop();
5252
+ return _context12.stop();
5287
5253
  }
5288
5254
  }
5289
- }, _callee13, this);
5255
+ }, _callee12, this);
5290
5256
  }));
5291
5257
 
5292
5258
  function unstake(_x10) {