@aurigami/sdk 1.14.0 → 1.15.0

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
@@ -6706,6 +6706,40 @@ var Referral = /*#__PURE__*/function (_BlockchainEntity) {
6706
6706
  return Referral;
6707
6707
  }(BlockchainEntity);
6708
6708
 
6709
+ var NOTIFICATION_API_END_POINT = 'https://api.aurigami.finance/notification/';
6710
+
6711
+ function postApi(_x3, _x4) {
6712
+ return _postApi.apply(this, arguments);
6713
+ }
6714
+
6715
+ function _postApi() {
6716
+ _postApi = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(url, body) {
6717
+ var resp;
6718
+ return runtime_1.wrap(function _callee2$(_context2) {
6719
+ while (1) {
6720
+ switch (_context2.prev = _context2.next) {
6721
+ case 0:
6722
+ _context2.next = 2;
6723
+ return axios.post(NOTIFICATION_API_END_POINT + url, body, {
6724
+ headers: {
6725
+ 'Content-Type': 'application/json'
6726
+ }
6727
+ });
6728
+
6729
+ case 2:
6730
+ resp = _context2.sent;
6731
+ return _context2.abrupt("return", resp.data);
6732
+
6733
+ case 4:
6734
+ case "end":
6735
+ return _context2.stop();
6736
+ }
6737
+ }
6738
+ }, _callee2);
6739
+ }));
6740
+ return _postApi.apply(this, arguments);
6741
+ }
6742
+
6709
6743
  var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
6710
6744
  _inheritsLoose(SdkRead, _BlockchainEntityRead);
6711
6745
 
@@ -7020,6 +7054,82 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
7020
7054
  return getNetApyWithIncentive;
7021
7055
  }();
7022
7056
 
7057
+ _proto.setUserNotificationSettings = /*#__PURE__*/function () {
7058
+ var _setUserNotificationSettings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(address, mail, utilisation, liquidation, captchaResponse) {
7059
+ var body, response;
7060
+ return runtime_1.wrap(function _callee12$(_context12) {
7061
+ while (1) {
7062
+ switch (_context12.prev = _context12.next) {
7063
+ case 0:
7064
+ body = {
7065
+ address: address,
7066
+ mail: mail,
7067
+ setting: {
7068
+ utilisation: utilisation,
7069
+ liquidation: liquidation
7070
+ },
7071
+ captchaResponse: captchaResponse
7072
+ };
7073
+ _context12.next = 3;
7074
+ return postApi('alert-setting/set', body);
7075
+
7076
+ case 3:
7077
+ response = _context12.sent;
7078
+ return _context12.abrupt("return", response);
7079
+
7080
+ case 5:
7081
+ case "end":
7082
+ return _context12.stop();
7083
+ }
7084
+ }
7085
+ }, _callee12);
7086
+ }));
7087
+
7088
+ function setUserNotificationSettings(_x12, _x13, _x14, _x15, _x16) {
7089
+ return _setUserNotificationSettings.apply(this, arguments);
7090
+ }
7091
+
7092
+ return setUserNotificationSettings;
7093
+ }();
7094
+
7095
+ _proto.unsetUserNotificationSettings = /*#__PURE__*/function () {
7096
+ var _unsetUserNotificationSettings = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(address, captchaResponse) {
7097
+ var body, response;
7098
+ return runtime_1.wrap(function _callee13$(_context13) {
7099
+ while (1) {
7100
+ switch (_context13.prev = _context13.next) {
7101
+ case 0:
7102
+ body = {
7103
+ address: address,
7104
+ mail: '',
7105
+ setting: {
7106
+ utilisation: null,
7107
+ liquidation: false
7108
+ },
7109
+ captchaResponse: captchaResponse
7110
+ };
7111
+ _context13.next = 3;
7112
+ return postApi('alert-setting/set', body);
7113
+
7114
+ case 3:
7115
+ response = _context13.sent;
7116
+ return _context13.abrupt("return", response);
7117
+
7118
+ case 5:
7119
+ case "end":
7120
+ return _context13.stop();
7121
+ }
7122
+ }
7123
+ }, _callee13);
7124
+ }));
7125
+
7126
+ function unsetUserNotificationSettings(_x17, _x18) {
7127
+ return _unsetUserNotificationSettings.apply(this, arguments);
7128
+ }
7129
+
7130
+ return unsetUserNotificationSettings;
7131
+ }();
7132
+
7023
7133
  return SdkRead;
7024
7134
  }(BlockchainEntityRead);
7025
7135
  var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
@@ -7037,19 +7147,19 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
7037
7147
  _proto2.claim =
7038
7148
  /*#__PURE__*/
7039
7149
  function () {
7040
- var _claim = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12() {
7041
- return runtime_1.wrap(function _callee12$(_context12) {
7150
+ var _claim = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14() {
7151
+ return runtime_1.wrap(function _callee14$(_context14) {
7042
7152
  while (1) {
7043
- switch (_context12.prev = _context12.next) {
7153
+ switch (_context14.prev = _context14.next) {
7044
7154
  case 0:
7045
- return _context12.abrupt("return", this.env.auriLens.connect(this._networkConnection.signer).claimRewards(this.env.comptroller.address, this.env.auriFairLaunch.address, ALL_STAKING_POOLS));
7155
+ return _context14.abrupt("return", this.env.auriLens.connect(this._networkConnection.signer).claimRewards(this.env.comptroller.address, this.env.auriFairLaunch.address, ALL_STAKING_POOLS));
7046
7156
 
7047
7157
  case 1:
7048
7158
  case "end":
7049
- return _context12.stop();
7159
+ return _context14.stop();
7050
7160
  }
7051
7161
  }
7052
- }, _callee12, this);
7162
+ }, _callee14, this);
7053
7163
  }));
7054
7164
 
7055
7165
  function claim() {
@@ -7060,22 +7170,22 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
7060
7170
  }();
7061
7171
 
7062
7172
  _proto2.stake = /*#__PURE__*/function () {
7063
- var _stake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(amount) {
7064
- return runtime_1.wrap(function _callee13$(_context13) {
7173
+ var _stake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee15(amount) {
7174
+ return runtime_1.wrap(function _callee15$(_context15) {
7065
7175
  while (1) {
7066
- switch (_context13.prev = _context13.next) {
7176
+ switch (_context15.prev = _context15.next) {
7067
7177
  case 0:
7068
- return _context13.abrupt("return", new StakingReadWrite(this._networkConnection).stake(amount));
7178
+ return _context15.abrupt("return", new StakingReadWrite(this._networkConnection).stake(amount));
7069
7179
 
7070
7180
  case 1:
7071
7181
  case "end":
7072
- return _context13.stop();
7182
+ return _context15.stop();
7073
7183
  }
7074
7184
  }
7075
- }, _callee13, this);
7185
+ }, _callee15, this);
7076
7186
  }));
7077
7187
 
7078
- function stake(_x12) {
7188
+ function stake(_x19) {
7079
7189
  return _stake.apply(this, arguments);
7080
7190
  }
7081
7191
 
@@ -7083,22 +7193,22 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
7083
7193
  }();
7084
7194
 
7085
7195
  _proto2.unstake = /*#__PURE__*/function () {
7086
- var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(amount) {
7087
- return runtime_1.wrap(function _callee14$(_context14) {
7196
+ var _unstake = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(amount) {
7197
+ return runtime_1.wrap(function _callee16$(_context16) {
7088
7198
  while (1) {
7089
- switch (_context14.prev = _context14.next) {
7199
+ switch (_context16.prev = _context16.next) {
7090
7200
  case 0:
7091
- return _context14.abrupt("return", new StakingReadWrite(this._networkConnection).unstake(amount));
7201
+ return _context16.abrupt("return", new StakingReadWrite(this._networkConnection).unstake(amount));
7092
7202
 
7093
7203
  case 1:
7094
7204
  case "end":
7095
- return _context14.stop();
7205
+ return _context16.stop();
7096
7206
  }
7097
7207
  }
7098
- }, _callee14, this);
7208
+ }, _callee16, this);
7099
7209
  }));
7100
7210
 
7101
- function unstake(_x13) {
7211
+ function unstake(_x20) {
7102
7212
  return _unstake.apply(this, arguments);
7103
7213
  }
7104
7214