@aurigami/sdk 1.5.2 → 1.5.4
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 +2 -0
- package/dist/helpers.d.ts +1 -0
- package/dist/sdk.cjs.development.js +17 -5
- 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 +17 -6
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/SDK.ts +6 -4
- package/src/airdrop-lottery.ts +1 -1
- package/src/helpers.ts +6 -1
- package/src/priceFetcher.ts +1 -2
package/dist/sdk.esm.js
CHANGED
|
@@ -6,7 +6,6 @@ import AuriLensABI from '@aurigami/contracts/artifacts/contracts/AuriLens.sol/Au
|
|
|
6
6
|
import ComptrollerABI from '@aurigami/contracts/artifacts/contracts/Comptroller.sol/Comptroller.json';
|
|
7
7
|
import FaucetABI from '@aurigami/contracts/artifacts/contracts/mock/Faucet.sol/Faucet.json';
|
|
8
8
|
import { Signer } from '@ethersproject/abstract-signer';
|
|
9
|
-
import assert from 'assert';
|
|
10
9
|
import axios from 'axios';
|
|
11
10
|
import AuErc20ABI from '@aurigami/contracts/artifacts/contracts/AuErc20.sol/AuErc20.json';
|
|
12
11
|
import AuETHABI from '@aurigami/contracts/artifacts/contracts/AuETH.sol/AuETH.json';
|
|
@@ -1073,6 +1072,17 @@ var decimalRecords = {
|
|
|
1073
1072
|
'0x044b6b0cd3bb13d2b9057781df4459c66781dce7': 18
|
|
1074
1073
|
};
|
|
1075
1074
|
|
|
1075
|
+
function assert(condition, message) {
|
|
1076
|
+
if (message === void 0) {
|
|
1077
|
+
message = '';
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
if (!condition) {
|
|
1081
|
+
var _message;
|
|
1082
|
+
|
|
1083
|
+
throw new Error((_message = message) != null ? _message : 'Assertion failed');
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1076
1086
|
function formatObject(object) {
|
|
1077
1087
|
return JSON.stringify(object, null, ' ');
|
|
1078
1088
|
}
|
|
@@ -3973,6 +3983,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
3973
3983
|
var _this;
|
|
3974
3984
|
|
|
3975
3985
|
_this = _BlockchainEntityRead.call(this, networkConnection) || this;
|
|
3986
|
+
_this._stakingRead = new StakingRead(networkConnection);
|
|
3976
3987
|
_this._comptroller = new Contract(networkAddresses.misc.COMPTROLLER, ComptrollerABI.abi, networkConnection.provider);
|
|
3977
3988
|
_this._auriFairLaunch = new Contract(networkAddresses.misc.AURIFAIRLAUNCH, AuriFairLaunchABI.abi, networkConnection.provider);
|
|
3978
3989
|
_this._auriLens = new Contract(networkAddresses.misc.AURILENS, AuriLensABI.abi, networkConnection.provider);
|
|
@@ -4128,7 +4139,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4128
4139
|
while (1) {
|
|
4129
4140
|
switch (_context2.prev = _context2.next) {
|
|
4130
4141
|
case 0:
|
|
4131
|
-
return _context2.abrupt("return",
|
|
4142
|
+
return _context2.abrupt("return", this._stakingRead.getPLYWNEARPoolDetails());
|
|
4132
4143
|
|
|
4133
4144
|
case 1:
|
|
4134
4145
|
case "end":
|
|
@@ -4183,7 +4194,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4183
4194
|
while (1) {
|
|
4184
4195
|
switch (_context4.prev = _context4.next) {
|
|
4185
4196
|
case 0:
|
|
4186
|
-
return _context4.abrupt("return",
|
|
4197
|
+
return _context4.abrupt("return", this._stakingRead.stakeBalanceOf(user));
|
|
4187
4198
|
|
|
4188
4199
|
case 1:
|
|
4189
4200
|
case "end":
|
|
@@ -4206,7 +4217,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4206
4217
|
while (1) {
|
|
4207
4218
|
switch (_context5.prev = _context5.next) {
|
|
4208
4219
|
case 0:
|
|
4209
|
-
return _context5.abrupt("return",
|
|
4220
|
+
return _context5.abrupt("return", this._stakingRead.LpBalanceOf(user));
|
|
4210
4221
|
|
|
4211
4222
|
case 1:
|
|
4212
4223
|
case "end":
|
|
@@ -4229,7 +4240,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4229
4240
|
while (1) {
|
|
4230
4241
|
switch (_context6.prev = _context6.next) {
|
|
4231
4242
|
case 0:
|
|
4232
|
-
return _context6.abrupt("return",
|
|
4243
|
+
return _context6.abrupt("return", this._stakingRead.unclaimedRewardsOf(user));
|
|
4233
4244
|
|
|
4234
4245
|
case 1:
|
|
4235
4246
|
case "end":
|
|
@@ -107615,5 +107626,5 @@ BigNumber.config({
|
|
|
107615
107626
|
DECIMAL_PLACES: 50
|
|
107616
107627
|
});
|
|
107617
107628
|
|
|
107618
|
-
export { AIRDROP_END_TIMESTAMP, AIRDROP_KEEP_THRESHOLD, AIRDROP_START_TIMESTAMP, ALL_STAKING_POOLS, AURORA_CHAINID, Airdrop, AirdropRead, AirdropReadWrite, BORROW_LIMIT_BUFFER, BORROW_NEAR_REWARDS_PER_WEEK, BlockchainEntity, BlockchainEntityRead, BlockchainEntityReadWrite, ComptrollerRewardType, DECIMAL_PRECISION, DEPOSIT_NEAR_REWARDS_PER_WEEK, ETHAddress, INF, MarketAction, MoneyMarket, MoneyMarketRead, MoneyMarketReadWrite, ONE_DAY, ONE_WEEK, ONE_YEAR, PLYToken, PLYWNEARToken, PLYWNEAR_POOL_ID, PLYWNEAR_REWARD_TOKENS, PRICE_WHITELISTED, Papermill, PapermillRead, PapermillReadWrite, REWARD_CLAIM_START, SDK, SdkRead, SdkReadWrite, Token, TokenAmount, TransferEventQuery, calcLMRewardApr, calcValuation, decimalFactor, dummyAddress, dummyMarketAddress, dummyPly, dummyPlyAurora, dummyToken, dummyTokenAmount, dummyTokenAmount2, dummyTokenAmount3, dummyUserMarketDetails, dummyZeroTokenAmount, fetchLPPositions, fetchLPPrice, fetchPLYPrice, fetchPrice, fetchPriceFromCoingecko, fetchPriceFromCoingeckoAPI, fetchPriceFromOracle, fetchStNEARPrice, fetchToken0PriceByLP, fetchUnderlyingTokensPrices, fetchValuation, formatObject, getBlockBeforeTimestamp, getBlockTimestamp, getCurrentTimestamp, getDecimal, isSameAddress, networkAddresses, validateAndParseAddress, valuateToken };
|
|
107629
|
+
export { AIRDROP_END_TIMESTAMP, AIRDROP_KEEP_THRESHOLD, AIRDROP_START_TIMESTAMP, ALL_STAKING_POOLS, AURORA_CHAINID, Airdrop, AirdropRead, AirdropReadWrite, BORROW_LIMIT_BUFFER, BORROW_NEAR_REWARDS_PER_WEEK, BlockchainEntity, BlockchainEntityRead, BlockchainEntityReadWrite, ComptrollerRewardType, DECIMAL_PRECISION, DEPOSIT_NEAR_REWARDS_PER_WEEK, ETHAddress, INF, MarketAction, MoneyMarket, MoneyMarketRead, MoneyMarketReadWrite, ONE_DAY, ONE_WEEK, ONE_YEAR, PLYToken, PLYWNEARToken, PLYWNEAR_POOL_ID, PLYWNEAR_REWARD_TOKENS, PRICE_WHITELISTED, Papermill, PapermillRead, PapermillReadWrite, REWARD_CLAIM_START, SDK, SdkRead, SdkReadWrite, Token, TokenAmount, TransferEventQuery, assert, calcLMRewardApr, calcValuation, decimalFactor, dummyAddress, dummyMarketAddress, dummyPly, dummyPlyAurora, dummyToken, dummyTokenAmount, dummyTokenAmount2, dummyTokenAmount3, dummyUserMarketDetails, dummyZeroTokenAmount, fetchLPPositions, fetchLPPrice, fetchPLYPrice, fetchPrice, fetchPriceFromCoingecko, fetchPriceFromCoingeckoAPI, fetchPriceFromOracle, fetchStNEARPrice, fetchToken0PriceByLP, fetchUnderlyingTokensPrices, fetchValuation, formatObject, getBlockBeforeTimestamp, getBlockTimestamp, getCurrentTimestamp, getDecimal, isSameAddress, networkAddresses, validateAndParseAddress, valuateToken };
|
|
107619
107630
|
//# sourceMappingURL=sdk.esm.js.map
|