@ref-finance/ref-sdk 1.3.10 → 1.3.12
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/constant.d.ts +1 -0
- package/dist/ref-sdk.cjs.development.js +107 -39
- package/dist/ref-sdk.cjs.development.js.map +1 -1
- package/dist/ref-sdk.cjs.production.min.js +1 -1
- package/dist/ref-sdk.cjs.production.min.js.map +1 -1
- package/dist/ref-sdk.esm.js +106 -40
- package/dist/ref-sdk.esm.js.map +1 -1
- package/dist/ref-sdk.umd.development.js +110 -43
- package/dist/ref-sdk.umd.development.js.map +1 -1
- package/dist/ref-sdk.umd.production.min.js +1 -1
- package/dist/ref-sdk.umd.production.min.js.map +1 -1
- package/dist/ref.d.ts +1 -0
- package/package.json +1 -1
package/dist/ref-sdk.esm.js
CHANGED
|
@@ -5,6 +5,7 @@ import _, { sortBy } from 'lodash-es';
|
|
|
5
5
|
import * as math from 'mathjs';
|
|
6
6
|
import { divide as divide$1, evaluate, format, floor, bignumber, sum, round as round$1 } from 'mathjs';
|
|
7
7
|
import Big from 'big.js';
|
|
8
|
+
import { formatNearAmount } from 'near-api-js/lib/utils/format';
|
|
8
9
|
import React, { useState, useEffect, useMemo, useCallback, createContext, useContext, useRef } from 'react';
|
|
9
10
|
import { FiChevronDown } from '@react-icons/all-files/fi/FiChevronDown';
|
|
10
11
|
import { FiChevronLeft } from '@react-icons/all-files/fi/FiChevronLeft';
|
|
@@ -26,6 +27,8 @@ var FEE_DIVISOR = 10000;
|
|
|
26
27
|
var STABLE_LP_TOKEN_DECIMALS = 18;
|
|
27
28
|
var RATED_POOL_LP_TOKEN_DECIMALS = 24;
|
|
28
29
|
var STORAGE_TO_REGISTER_WITH_MFT = '0.1';
|
|
30
|
+
//0.0125 NEAR
|
|
31
|
+
var FT_MINIMUM_STORAGE_BALANCE_LARGE = "12500000000000000000000";
|
|
29
32
|
var ONE_YOCTO_NEAR = '0.000000000000000000000001';
|
|
30
33
|
var ENV = '';
|
|
31
34
|
var INDEXER_URL = '';
|
|
@@ -4272,6 +4275,51 @@ var DCLSwapGetStorageBalance = function DCLSwapGetStorageBalance(tokenId, Accoun
|
|
|
4272
4275
|
}
|
|
4273
4276
|
});
|
|
4274
4277
|
};
|
|
4278
|
+
var getMinStorageBalance = /*#__PURE__*/function () {
|
|
4279
|
+
var _ref14 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(nep141Address) {
|
|
4280
|
+
var provider, result, balance;
|
|
4281
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
4282
|
+
while (1) {
|
|
4283
|
+
switch (_context11.prev = _context11.next) {
|
|
4284
|
+
case 0:
|
|
4285
|
+
_context11.prev = 0;
|
|
4286
|
+
provider = new providers.JsonRpcProvider({
|
|
4287
|
+
url: getConfig().nodeUrl
|
|
4288
|
+
});
|
|
4289
|
+
_context11.next = 4;
|
|
4290
|
+
return provider.query({
|
|
4291
|
+
request_type: 'call_function',
|
|
4292
|
+
account_id: nep141Address,
|
|
4293
|
+
method_name: 'storage_balance_bounds',
|
|
4294
|
+
args_base64: '',
|
|
4295
|
+
finality: 'optimistic'
|
|
4296
|
+
});
|
|
4297
|
+
case 4:
|
|
4298
|
+
result = _context11.sent;
|
|
4299
|
+
balance = JSON.parse(Buffer.from(result.result).toString());
|
|
4300
|
+
if (!(!balance || !balance.min)) {
|
|
4301
|
+
_context11.next = 8;
|
|
4302
|
+
break;
|
|
4303
|
+
}
|
|
4304
|
+
return _context11.abrupt("return", FT_MINIMUM_STORAGE_BALANCE_LARGE);
|
|
4305
|
+
case 8:
|
|
4306
|
+
return _context11.abrupt("return", balance.min);
|
|
4307
|
+
case 11:
|
|
4308
|
+
_context11.prev = 11;
|
|
4309
|
+
_context11.t0 = _context11["catch"](0);
|
|
4310
|
+
console.error(_context11.t0, nep141Address);
|
|
4311
|
+
return _context11.abrupt("return", FT_MINIMUM_STORAGE_BALANCE_LARGE);
|
|
4312
|
+
case 15:
|
|
4313
|
+
case "end":
|
|
4314
|
+
return _context11.stop();
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
}, _callee11, null, [[0, 11]]);
|
|
4318
|
+
}));
|
|
4319
|
+
return function getMinStorageBalance(_x13) {
|
|
4320
|
+
return _ref14.apply(this, arguments);
|
|
4321
|
+
};
|
|
4322
|
+
}();
|
|
4275
4323
|
|
|
4276
4324
|
var DCL_POOL_FEE_LIST = [100, 400, 2000, 10000];
|
|
4277
4325
|
var getDCLPoolId = function getDCLPoolId(tokenA, tokenB, fee) {
|
|
@@ -4372,21 +4420,35 @@ var instantSwap = /*#__PURE__*/function () {
|
|
|
4372
4420
|
});
|
|
4373
4421
|
case 2:
|
|
4374
4422
|
tokenRegistered = _context.sent;
|
|
4375
|
-
if (tokenRegistered === null) {
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
functionCalls: [{
|
|
4379
|
-
methodName: 'storage_deposit',
|
|
4380
|
-
args: {
|
|
4381
|
-
registration_only: true,
|
|
4382
|
-
account_id: AccountId
|
|
4383
|
-
},
|
|
4384
|
-
gas: '30000000000000',
|
|
4385
|
-
amount: STORAGE_TO_REGISTER_WITH_MFT
|
|
4386
|
-
}]
|
|
4387
|
-
});
|
|
4423
|
+
if (!(tokenRegistered === null)) {
|
|
4424
|
+
_context.next = 16;
|
|
4425
|
+
break;
|
|
4388
4426
|
}
|
|
4389
|
-
|
|
4427
|
+
_context.t0 = transactions;
|
|
4428
|
+
_context.t1 = token.id;
|
|
4429
|
+
_context.t2 = {
|
|
4430
|
+
registration_only: true,
|
|
4431
|
+
account_id: AccountId
|
|
4432
|
+
};
|
|
4433
|
+
_context.t3 = formatNearAmount;
|
|
4434
|
+
_context.next = 10;
|
|
4435
|
+
return getMinStorageBalance(token.id);
|
|
4436
|
+
case 10:
|
|
4437
|
+
_context.t4 = _context.sent;
|
|
4438
|
+
_context.t5 = (0, _context.t3)(_context.t4, 24);
|
|
4439
|
+
_context.t6 = {
|
|
4440
|
+
methodName: 'storage_deposit',
|
|
4441
|
+
args: _context.t2,
|
|
4442
|
+
gas: '30000000000000',
|
|
4443
|
+
amount: _context.t5
|
|
4444
|
+
};
|
|
4445
|
+
_context.t7 = [_context.t6];
|
|
4446
|
+
_context.t8 = {
|
|
4447
|
+
receiverId: _context.t1,
|
|
4448
|
+
functionCalls: _context.t7
|
|
4449
|
+
};
|
|
4450
|
+
_context.t0.push.call(_context.t0, _context.t8);
|
|
4451
|
+
case 16:
|
|
4390
4452
|
case "end":
|
|
4391
4453
|
return _context.stop();
|
|
4392
4454
|
}
|
|
@@ -5215,6 +5277,7 @@ function styleInject(css, ref) {
|
|
|
5215
5277
|
var css_248z = ".__ref-swap-widget-container {\n border-radius: 16px;\n padding: 28px;\n padding-bottom: 16px;\n position: relative;\n max-width: 90%;\n}\n\n.__ref-swap-widget-row-flex-center {\n display: flex;\n align-items: center;\n}\n\n.__ref-swap-widget-col-flex-start {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.__ref-swap-widget-header {\n justify-content: space-between;\n margin-bottom: 25px;\n}\n\n.__ref-swap-widget-header-title {\n font-weight: 700;\n font-size: 20px;\n}\n.__ref-swap-widget-header-button-account {\n font-size: 14px;\n margin-right: 8px;\n padding: 4px 13px;\n border-radius: 25px;\n min-width: 120px;\n justify-content: center;\n}\n\n.__ref-swap-widget-header-button-account:hover {\n background: rgba(255, 104, 158, 0.2) !important;\n}\n\n.__ref-swap-widget_slippage_selector {\n box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25);\n border-radius: 12px;\n position: absolute;\n top: 30px;\n right: 0px;\n padding: 16px;\n padding-right: 20px;\n padding-left: 20px;\n z-index: 100;\n width: 230px;\n font-size: 14px;\n}\n\n.__ref-swap-widget_slippage_selector_input_container {\n width: 100%;\n height: 26px;\n margin-right: 4px;\n padding: 2px 10px;\n}\n.__ref-swap-widget_slippage_selector_button {\n font-size: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 6px 16px;\n}\n\n.__ref-swap-widget-opacity-hover:hover {\n opacity: 0.5;\n}\n\n.__ref-swap-widget-opacity-active:active {\n opacity: 0.5;\n}\n\n.__ref-swap-widger-token-amount {\n padding: 14px;\n padding-bottom: 8px;\n border-radius: 8px;\n display: flex;\n align-items: flex-start;\n}\n\n.__ref-swap-widger-token-amount_input {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n\n.__ref-swap-widget-token-amount_quick_selector {\n}\n\n.__ref-swap-widger-token-amount_balance {\n margin-top: 7px;\n justify-content: space-between;\n}\n\n.__ref-swap-widget-token-amount_quick_selector_item {\n font-size: 12px;\n padding: 6px;\n padding-top: 3px;\n padding-bottom: 3px;\n cursor: pointer;\n}\n.__ref-swap-widget-select-token_input {\n padding: 14px;\n border-radius: 8px;\n}\n\n.__ref-swap-widget_star_token {\n padding: 8px 10px 8px 8px;\n margin: 0px 6px 10px 0px;\n position: relative;\n cursor: pointer;\n border-radius: 8px;\n}\n\n.__ref-swap-widget_token_icon {\n border-radius: 100%;\n flex-shrink: 0;\n}\n\n.__ref-swap-widget_token_list_table {\n table-layout: auto;\n width: 100%;\n font-size: 14px;\n}\n\n.__ref-swap-widget_token_list_table_header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 12px;\n margin: 0px 6px;\n}\n\n.__ref-swap-widget_token-selector-star-tokens {\n margin-top: 20px;\n flex-wrap: wrap;\n}\n.__ref-swap-widget_token_list_table_content {\n display: flex;\n flex-direction: column;\n max-height: 50vh;\n min-height: 30vh;\n overflow-y: auto;\n}\n\n.__ref-swap-widget_token-selector-token-list-item {\n justify-content: space-between;\n padding: 9px 20px;\n}\n.__ref-swap-widget-token-amount_token-select-button {\n font-size: 16px;\n border-radius: 18px;\n padding: 6px 8px;\n cursor: pointer;\n}\n\n.__ref-swap-widget-exchange-button {\n width: 100%;\n justify-content: center;\n padding: 20px 0;\n}\n\n.__ref-swap-widget-submit-button {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n font-weight: 700;\n border-radius: 8px;\n padding: 14px 0 14px 0;\n margin-top: 14px;\n cursor: pointer;\n}\n\n.__ref-swap-widget-submit-button-loader {\n width: 20px;\n height: 20px;\n border: 2px solid #fff;\n border-bottom-color: rgb(255, 255, 255);\n border-bottom-color: transparent;\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: rotation 1s linear infinite;\n}\n\n@keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.__ref-widget-swap-detail-view {\n justify-content: space-between;\n width: 100%;\n font-size: 14px;\n margin-top: 16px;\n}\n\n.__ref-swap-widget-swap-detail-view-item {\n justify-content: space-between;\n margin-bottom: 12px;\n width: 100%;\n}\n\n.__ref-swap-widget-loading {\n animation: spin 2s linear infinite;\n}\n\n.__ref-swap-widget-notification {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50%;\n transform: translate(-50%, -50%);\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n z-index: 100;\n box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25);\n border-radius: 12px;\n padding: 32px 20px;\n}\n\n.__ref-swap-widget-notification__button {\n border-radius: 8px;\n padding: 8px 20px;\n margin-top: 14px;\n}\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\ninput.__ref-swap-widget-input-class {\n margin: 0;\n background-color: transparent;\n display: block;\n width: 100%;\n padding: 0;\n border-width: 0;\n}\n\ninput.__ref-swap-widget-input-class:focus {\n outline: none;\n border-width: 0;\n}\n\ninput.__ref-swap-widget-input-class::-webkit-outer-spin-button,\ninput.__ref-swap-widget-input-class::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\ninput.__ref-swap-widget-input-class[type='number'] {\n -moz-appearance: textfield; /* Firefox */\n}\n\nbutton.__ref-swap-widget-button {\n border: none;\n}\n\n.__ref-swap-widget-submit-button:hover {\n opacity: 0.5;\n}\n\n.__ref-swap-widget-active:active {\n color: #00c6a2;\n}\n\n.__ref-swap-widget-hover:hover {\n color: #00c6a2;\n}\n\n.__ref-swap-widget_token_list_table_content::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n border-radius: 3px;\n}\n\n.__ref-swap-widget_token_list_table_content::-webkit-scrollbar-track {\n box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);\n}\n.__ref-swap-widget_token_list_table_content::-webkit-scrollbar-thumb {\n background: #00c6a2;\n border-radius: 8px;\n}\n\n.__ref-swap-widget-swap_routes {\n border-radius: 12px;\n padding: 8px 12px 8px 12px;\n width: 100%;\n}\n\n.__ref-swap-widget-valueStyle {\n background-image: -webkit-linear-gradient(left, #00ffd1, #00ffd1, #8c78ff);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n\n.__ref-swap-widget-swap_route_row {\n justify-content: space-between;\n margin-bottom: 4px;\n}\n";
|
|
5216
5278
|
styleInject(css_248z);
|
|
5217
5279
|
|
|
5280
|
+
var _ALLOWED_KEYS;
|
|
5218
5281
|
var getPriceImpact$1 = function getPriceImpact(value, tokenIn, tokenInAmount) {
|
|
5219
5282
|
var textColor = Number(value) <= 1 ? 'text-greenLight' : 1 < Number(value) && Number(value) <= 2 ? 'text-warn' : 'text-error';
|
|
5220
5283
|
var displayValue = scientificNotationToString(multiply(tokenInAmount || '0', divide(value, '100')));
|
|
@@ -5526,7 +5589,33 @@ var HalfAndMaxAmount = function HalfAndMaxAmount(_ref6) {
|
|
|
5526
5589
|
}, "Max"));
|
|
5527
5590
|
};
|
|
5528
5591
|
var DECIMAL_POINT = '.';
|
|
5529
|
-
var ALLOWED_KEYS =
|
|
5592
|
+
var ALLOWED_KEYS = (_ALLOWED_KEYS = {
|
|
5593
|
+
'0': true,
|
|
5594
|
+
'1': true,
|
|
5595
|
+
'2': true,
|
|
5596
|
+
'3': true,
|
|
5597
|
+
'4': true,
|
|
5598
|
+
'5': true,
|
|
5599
|
+
'6': true,
|
|
5600
|
+
'7': true,
|
|
5601
|
+
'8': true,
|
|
5602
|
+
'9': true
|
|
5603
|
+
}, _ALLOWED_KEYS[DECIMAL_POINT] = true, _ALLOWED_KEYS);
|
|
5604
|
+
var isValidInput = function isValidInput(value) {
|
|
5605
|
+
var decimalPointsAmount = 0;
|
|
5606
|
+
if (value === DECIMAL_POINT) return false;
|
|
5607
|
+
for (var i = 0; i < value.length; i++) {
|
|
5608
|
+
var _char = value[i];
|
|
5609
|
+
if (!ALLOWED_KEYS[_char]) return false;
|
|
5610
|
+
if (_char === DECIMAL_POINT) {
|
|
5611
|
+
decimalPointsAmount++;
|
|
5612
|
+
if (decimalPointsAmount === 2) {
|
|
5613
|
+
return false;
|
|
5614
|
+
}
|
|
5615
|
+
}
|
|
5616
|
+
}
|
|
5617
|
+
return true;
|
|
5618
|
+
};
|
|
5530
5619
|
var TokenAmount = function TokenAmount(props) {
|
|
5531
5620
|
var _ref$current2;
|
|
5532
5621
|
var balance = props.balance,
|
|
@@ -5547,28 +5636,6 @@ var TokenAmount = function TokenAmount(props) {
|
|
|
5547
5636
|
var _useState5 = useState(false),
|
|
5548
5637
|
hoverSelect = _useState5[0],
|
|
5549
5638
|
setHoverSelect = _useState5[1];
|
|
5550
|
-
var handleKeyDown = function handleKeyDown(event) {
|
|
5551
|
-
if (!ALLOWED_KEYS.includes(event.key) && !event.ctrlKey) {
|
|
5552
|
-
event.preventDefault();
|
|
5553
|
-
}
|
|
5554
|
-
var isDecimalPoint = event.key === DECIMAL_POINT;
|
|
5555
|
-
if (!isDecimalPoint) return;
|
|
5556
|
-
// Ensure only one dot is allowed
|
|
5557
|
-
var inputValue = event.target.value;
|
|
5558
|
-
if (inputValue.includes(DECIMAL_POINT)) {
|
|
5559
|
-
event.preventDefault();
|
|
5560
|
-
}
|
|
5561
|
-
// prohibit only one dot
|
|
5562
|
-
if (inputValue.length === 0) {
|
|
5563
|
-
event.preventDefault();
|
|
5564
|
-
}
|
|
5565
|
-
};
|
|
5566
|
-
var handlePaste = function handlePaste(event) {
|
|
5567
|
-
var paste = event.clipboardData.getData('text');
|
|
5568
|
-
if (!/^[0-9.]+$/.test(paste)) {
|
|
5569
|
-
event.preventDefault();
|
|
5570
|
-
}
|
|
5571
|
-
};
|
|
5572
5639
|
var handleChange = function handleChange(amount) {
|
|
5573
5640
|
if (onChangeAmount) {
|
|
5574
5641
|
onChangeAmount(amount);
|
|
@@ -5658,11 +5725,10 @@ var TokenAmount = function TokenAmount(props) {
|
|
|
5658
5725
|
className: "__ref-swap-widget-input-class",
|
|
5659
5726
|
value: amount,
|
|
5660
5727
|
type: "text",
|
|
5661
|
-
onKeyDown: handleKeyDown,
|
|
5662
|
-
onPaste: handlePaste,
|
|
5663
5728
|
placeholder: !onChangeAmount ? '-' : '0.0',
|
|
5664
5729
|
onChange: function onChange(_ref7) {
|
|
5665
5730
|
var target = _ref7.target;
|
|
5731
|
+
if (!isValidInput(target.value)) return;
|
|
5666
5732
|
target.setCustomValidity('');
|
|
5667
5733
|
handleChange(target.value);
|
|
5668
5734
|
},
|
|
@@ -8228,5 +8294,5 @@ var get_pointorder_range = function get_pointorder_range(_ref5) {
|
|
|
8228
8294
|
});
|
|
8229
8295
|
};
|
|
8230
8296
|
|
|
8231
|
-
export { AccountIdMisMatch, CONSTANT_D, DCLInValid, DCLSwap, DCLSwapByInputOnBestPool, DCLSwapGetStorageBalance, DCL_POOL_FEE_LIST, DCL_POOL_SPLITER, DefaultMainnetTokenList, DefaultTestnetTokenList, FEE_DIVISOR, InValidAccessKeyError, NEAR_META_DATA, NoAccountIdFound, NoCredential, NoFeeToPool, NoLocalSignerError, NoOrderFound, NoPoolError, NoPoolOnThisPair, NoPuiblicKeyError, NotLoginError, ONE_YOCTO_NEAR, ONLY_ZEROS, OrderNoRemainedAmount, POINTLEFTRANGE, POINTRIGHTRANGE, PoolMode, RATED_POOL_LP_TOKEN_DECIMALS, REF_FI_CONTRACT_ID, REF_META_DATA, REF_TOKEN_ID, REPLACE_TOKENS, STABLE_LP_TOKEN_DECIMALS, STORAGE_TO_REGISTER_WITH_MFT, SameInputTokenError, SlippageError, SwapRouteError, SwapWidget, TokenLinks, TokenNotExistError, WNEAR_META_DATA, WRAP_NEAR_CONTRACT_ID, WalletSelectorTransactions, ZeroInputError, calcStableSwapPriceImpact, calc_d, calc_swap, calc_y, calculateAmountReceived, calculateExchangeRate, calculateFeeCharge, calculateFeePercent, calculateMarketPrice, calculatePriceImpact, calculateSmartRoutesV2PriceImpact, calculateSmartRoutingPriceImpact, cancel_order, claim_order, config, convertToPercentDecimal, divide, estimateSwap, feeToPointDelta, fetchAllPools, find_order, formatError, formatWithCommas, ftGetBalance, ftGetStorageBalance, ftGetTokenMetadata, ftGetTokensMetadata, ftViewFunction, getAccountName, getAccountNearBalance, getAmount, getAvgFee, getConfig, getDCLPool, getDCLPoolId, getDefaultTokenList, getExpectedOutputFromSwapTodos, getGas, getGlobalWhitelist, getHybridStableSmart, getKeyStore, getMax, getMemorySigner, getPointByPrice, getPool, getPoolAllocationPercents, getPoolByIds, getPoolEstimate, getPoolsByTokens, getPriceImpact, getRatedPoolDetail, getRefPools, getSignedTransactionsByMemoryKey, getSimplePoolEstimate, getStablePoolDecimal, getStablePoolEstimate, getStablePools, getStablePoolsThisPair, getSwappedAmount, getTotalPools, getUnRatedPoolDetail, getUserRegisteredTokens, get_order, get_pointorder_range, init_env, instantSwap, isMobile, isStablePool, isStablePoolToken, listDCLPools, list_active_orders, list_history_orders, list_user_assets, multiply, nearDepositTransaction, nearWithdrawTransaction, parsePool, percent, percentLess, percentOf, percentOfBigNumber, pointToPrice, poolFormatter, priceToPoint, provider, quote, quote_by_output, refDCLSwapViewFunction, refFiViewFunction, registerAccountOnToken, round, scientificNotationToString, sendTransactionsByMemoryKey, separateRoutes, singlePoolSwap, subtraction, switchEnv, symbolsArr, toInternationalCurrencySystemLongString, toNonDivisibleNumber, toPrecision, toReadableNumber, toRealSymbol, transformTransactions, unNamedError };
|
|
8297
|
+
export { AccountIdMisMatch, CONSTANT_D, DCLInValid, DCLSwap, DCLSwapByInputOnBestPool, DCLSwapGetStorageBalance, DCL_POOL_FEE_LIST, DCL_POOL_SPLITER, DefaultMainnetTokenList, DefaultTestnetTokenList, FEE_DIVISOR, FT_MINIMUM_STORAGE_BALANCE_LARGE, InValidAccessKeyError, NEAR_META_DATA, NoAccountIdFound, NoCredential, NoFeeToPool, NoLocalSignerError, NoOrderFound, NoPoolError, NoPoolOnThisPair, NoPuiblicKeyError, NotLoginError, ONE_YOCTO_NEAR, ONLY_ZEROS, OrderNoRemainedAmount, POINTLEFTRANGE, POINTRIGHTRANGE, PoolMode, RATED_POOL_LP_TOKEN_DECIMALS, REF_FI_CONTRACT_ID, REF_META_DATA, REF_TOKEN_ID, REPLACE_TOKENS, STABLE_LP_TOKEN_DECIMALS, STORAGE_TO_REGISTER_WITH_MFT, SameInputTokenError, SlippageError, SwapRouteError, SwapWidget, TokenLinks, TokenNotExistError, WNEAR_META_DATA, WRAP_NEAR_CONTRACT_ID, WalletSelectorTransactions, ZeroInputError, calcStableSwapPriceImpact, calc_d, calc_swap, calc_y, calculateAmountReceived, calculateExchangeRate, calculateFeeCharge, calculateFeePercent, calculateMarketPrice, calculatePriceImpact, calculateSmartRoutesV2PriceImpact, calculateSmartRoutingPriceImpact, cancel_order, claim_order, config, convertToPercentDecimal, divide, estimateSwap, feeToPointDelta, fetchAllPools, find_order, formatError, formatWithCommas, ftGetBalance, ftGetStorageBalance, ftGetTokenMetadata, ftGetTokensMetadata, ftViewFunction, getAccountName, getAccountNearBalance, getAmount, getAvgFee, getConfig, getDCLPool, getDCLPoolId, getDefaultTokenList, getExpectedOutputFromSwapTodos, getGas, getGlobalWhitelist, getHybridStableSmart, getKeyStore, getMax, getMemorySigner, getMinStorageBalance, getPointByPrice, getPool, getPoolAllocationPercents, getPoolByIds, getPoolEstimate, getPoolsByTokens, getPriceImpact, getRatedPoolDetail, getRefPools, getSignedTransactionsByMemoryKey, getSimplePoolEstimate, getStablePoolDecimal, getStablePoolEstimate, getStablePools, getStablePoolsThisPair, getSwappedAmount, getTotalPools, getUnRatedPoolDetail, getUserRegisteredTokens, get_order, get_pointorder_range, init_env, instantSwap, isMobile, isStablePool, isStablePoolToken, listDCLPools, list_active_orders, list_history_orders, list_user_assets, multiply, nearDepositTransaction, nearWithdrawTransaction, parsePool, percent, percentLess, percentOf, percentOfBigNumber, pointToPrice, poolFormatter, priceToPoint, provider, quote, quote_by_output, refDCLSwapViewFunction, refFiViewFunction, registerAccountOnToken, round, scientificNotationToString, sendTransactionsByMemoryKey, separateRoutes, singlePoolSwap, subtraction, switchEnv, symbolsArr, toInternationalCurrencySystemLongString, toNonDivisibleNumber, toPrecision, toReadableNumber, toRealSymbol, transformTransactions, unNamedError };
|
|
8232
8298
|
//# sourceMappingURL=ref-sdk.esm.js.map
|