@dhedge/trading-widget 6.2.0-canary.1 → 6.2.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/core-kit/utils/error-registry.d.ts +12 -2
- package/dytm-CliLZLfa.cjs +1 -0
- package/{dytm-DycL7_hQ.js → dytm-DdzHS3o4.js} +275 -232
- package/index.cjs +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -2
- package/package.json +1 -1
- package/utils.cjs +1 -1
- package/utils.js +70 -69
- package/dytm-D2sVE2th.cjs +0 -1
package/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { isZeroAddress, isEqualAddress } from '@shared/utils/web3.utils';
|
|
|
11
11
|
export type { TradingToken } from '@shared/types/trading.types';
|
|
12
12
|
export { USDC_BASE, USDCBC_BASE, WETH_BASE, CBETH_BASE, CBBTC_BASE, RETH_BASE, TBTC_BASE, WSTETH_BASE, BRIDGED_USDC_ARBITRUM, USDC_ARBITRUM, WETH_ARBITRUM, WBTC_ARBITRUM, TBTC_ARBITRUM, WSTETH_ARBITRUM, USDT_ARBITRUM, WSOL_ARBITRUM, WBNB_ARBITRUM, LINK_ARBITRUM, BRIDGED_USDC_OPTIMISM, USDC_OPTIMISM, USDT_OPTIMISM, WETH_OPTIMISM, SUSD_OPTIMISM, DAI_OPTIMISM, WBTC_OPTIMISM, SETH_OPTIMISM, LINK_OPTIMISM, TBTC_OPTIMISM, WSTETH_OPTIMISM, WETH_POLYGON, BRIDGED_USDC_POLYGON, USDC_POLYGON, PAXG_POLYGON, WBTC_POLYGON, WPOL_POLYGON, USDT_POLYGON, DAI_POLYGON, TBTC_POLYGON, WETH_MAINNET, USDC_MAINNET, WBTC_MAINNET, USDT_MAINNET, XAUT_MAINNET, USDC_HYPEREVM, } from '@shared/constants/tokens';
|
|
13
13
|
export type { GmxMarketAsset } from './core-kit/const';
|
|
14
|
-
export { arbitrum, base, optimism, polygon, MULTI_ASSET_TOKEN, MANAGER_FEE_DENOMINATOR, SIMULATION_TIMEOUT_ERROR, MAX_GAS_LIMIT_MAP, DEFAULT_MAX_GAS_LIMIT, GAS_LIMIT_BUFFER_COEFF, GAS_ESTIMATION_ERROR, DEFAULT_SIMULATION_ERROR, DEFAULT_ERROR_MESSAGE, EMPTY_POOL_CONFIG, DEFAULT_DEPOSIT_SLIPPAGE, DEFAULT_WITHDRAW_SLIPPAGE, DEFAULT_MULTI_ASSET_WITHDRAW_METHOD, DEFAULT_DEPOSIT_SLIPPAGE_SCALE, DEFAULT_DEPOSIT_METHOD, DEFAULT_PROMISE_TIMEOUT_MS, DEFAULT_LOCK_TIME, CURRENCY_SYMBOL_MAP, contractsAddressesMap, contractsAbisMap, BRIDGED_TOKENS_SYMBOLS, CHAIN_NATIVE_TOKENS, ALCHEMY_RPC_URL_MAP, CHAIN_MAP, MaxUint256, DEFAULT_PRECISION, AddressZero, DEFAULT_POLLING_INTERVAL, SHORTEN_POLLING_INTERVAL, NATIVE_TOKEN_GAS_RESERVE_UNITS, PYTH_API_LINK, WETH_BY_CHAIN_ID, WBTC_BY_CHAIN_ID, TRADING_LOG_EVENT_PARAM, TRADING_PANEL_LOG_EVENT, GMX_MARKET_ASSETS, GMX_MARKET_ASSETS_MAP, COMPLETE_WITHDRAW_ACTIONS, } from './core-kit/const';
|
|
14
|
+
export { arbitrum, base, optimism, polygon, MULTI_ASSET_TOKEN, MANAGER_FEE_DENOMINATOR, SIMULATION_TIMEOUT_ERROR, MAX_GAS_LIMIT_MAP, DEFAULT_MAX_GAS_LIMIT, GAS_LIMIT_BUFFER_COEFF, GAS_ESTIMATION_ERROR, DEFAULT_SIMULATION_ERROR, DEFAULT_ERROR_MESSAGE, EMPTY_POOL_CONFIG, DEFAULT_DEPOSIT_SLIPPAGE, DEFAULT_WITHDRAW_SLIPPAGE, DEFAULT_MULTI_ASSET_WITHDRAW_METHOD, DEFAULT_DEPOSIT_SLIPPAGE_SCALE, DEFAULT_DEPOSIT_METHOD, DEFAULT_PROMISE_TIMEOUT_MS, DEFAULT_LOCK_TIME, CURRENCY_SYMBOL_MAP, contractsAddressesMap, contractsAbisMap, BRIDGED_TOKENS_SYMBOLS, CHAIN_NATIVE_TOKENS, ALCHEMY_RPC_URL_MAP, CHAIN_MAP, MaxUint256, DEFAULT_PRECISION, AddressZero, DEFAULT_POLLING_INTERVAL, EXTENDED_POLLING_INTERVAL, SHORTEN_POLLING_INTERVAL, NATIVE_TOKEN_GAS_RESERVE_UNITS, PYTH_API_LINK, WETH_BY_CHAIN_ID, WBTC_BY_CHAIN_ID, TRADING_LOG_EVENT_PARAM, TRADING_PANEL_LOG_EVENT, GMX_MARKET_ASSETS, GMX_MARKET_ASSETS_MAP, COMPLETE_WITHDRAW_ACTIONS, } from './core-kit/const';
|
|
15
15
|
export { EstimationError, OndoApiError, throwOndoApiError, } from './core-kit/models';
|
|
16
16
|
export type { ChainId, ChainNativeTokenMap, NativeTokenSymbol, Chain, Address, PoolComposition, Hex, TransactionRequest, CallbackConfig, PoolConfig, PricingAsset, PoolCompositionWithFraction, PoolFallbackData, PoolContractAccountCallParams, PoolContractCallParams, EstimateCall, ContractActionFunc, EstimatedGas, CallExecutionError, DynamicTradingToken, Client, PublicClient, WalletClient, DepositMethodName, PendingTransaction, SimulateTransactionParams, SimulateTransactionResponse, SwapEntity, TradingPanelAction, TradingPanelActionsState, TradingPanelState, TradingPanelStateModal, ActiveActionToken, WithdrawActiveAction, UpdateWithdrawActionPayload, TradingPanelSetters, TradingPanelType, TradingPanelContextConfig, TransactionAction, TradingModalStatus, TagInvestorByReferrerCallbackVariables, TokenSelectorPayload, UpdateTransactionsArguments, UseProjectedEarningsResult, UseLegacyReferralProgramProps, ReferralData, MulticallReturnType, ContractFunctionReturnType, UseReadContractsParameters, UseWriteContractParameters, WaitForTransactionReceiptReturnType, } from './core-kit/types';
|
|
17
17
|
export { formatNumeratorToPercentage, formatByCurrency, getContractAbiById, clientSide, getContractAddressById, formatEther, formatUnits, getConventionalTokenPriceDecimals, getNativeTokenInvestableBalance, isNativeToken, getPercent, getPoolFraction, shortenAddress, shiftBy, trim, validateLoggerEventParams, decodeErrorResult, hexToString, encodeFunctionData, transformAddressForAnalytics, isFmpAirdropVaultAddress, isAaveLendAndBorrowAsset, } from './core-kit/utils';
|
package/index.js
CHANGED
|
@@ -9,8 +9,8 @@ import { usePopperTooltip as bc } from "react-popper-tooltip";
|
|
|
9
9
|
import { createContext as he, useMemo as O, useContext as ge, useReducer as _n, useCallback as b, useState as F, useEffect as E, forwardRef as yc, useRef as pe, Children as Tc, isValidElement as Ac, Fragment as Sc } from "react";
|
|
10
10
|
import { ChevronDownIcon as Qa, ArrowDownIcon as xc, ArrowPathIcon as Cc, CheckIcon as en } from "@heroicons/react/24/solid";
|
|
11
11
|
import { XMarkIcon as Xa, ChevronLeftIcon as Ec } from "@heroicons/react/16/solid";
|
|
12
|
-
import { j as St,
|
|
13
|
-
import {
|
|
12
|
+
import { j as St, Y as Ic, y as Nc, z as Z, ad as W, p as Oc, ae as Za, W as Pn, J as _c, af as H, a3 as Pc, a2 as tt, L as Po, ag as re, B as vt, K as gt, v as hn, ah as Dc, ai as Qt, S as kc, M as Ur, a4 as Lc, N as zr, P as Rc, n as $c, aj as Do, f as Bc, a6 as ko, k as Mc, e as Fc, Z as Wc, b as Uc, g as zc, ak as Gc, m as Hc, x as Gr, l as cr, ab as Vc, r as jc, aa as qc, o as Kc, a0 as Ja, E as Lo, $ as Yc, u as dr, i as Ro, _ as Qc, a8 as Xc, al as es, a5 as ts, R as ns, D as rs, F as Zc, w as os, X as as, h as Jc, am as Ve, an as ed, O as ss, a1 as is, ao as Hr, ap as td, Q as $o, H as nd, G as rd, U as od, I as ad, V as sd, t as id } from "./dytm-DdzHS3o4.js";
|
|
13
|
+
import { aq as NO, ar as OO, ac as _O } from "./dytm-DdzHS3o4.js";
|
|
14
14
|
import { i as ld, a4 as cd, a as N, q as G, H as dd, p as Dn, S as Bo, T as pd, a0 as gn, t as Mo, k as ud, r as md, ac as wd, ab as Le, m as hd, u as ls, n as gd, j as fd, x as cs, ai as at, b as jt, aC as qe, aD as je, aE as rt, aF as ft, v as vd, B as ds, $ as Ie, aG as pr, O as ps, J as bd, at as Xt, a8 as yd, aH as Td, aI as Fo, g as us, ah as bt, a1 as Ce, aJ as Ad, K as yt, ax as Je, aK as Sd, aL as ms, o as xd, F as ws, I as hs, l as Cd, G as Ed, am as Id, al as Nd, D as Od, aM as _d, a2 as _e, z as ze, L as Pd, ag as Vr, s as gs, ad as Dd, a7 as kd, y as fs, aw as Gt, w as vs, E as Ld, an as bs, c as ys, af as Rd, Y as $d, ak as Ts, aN as As, a9 as Bd, a6 as Md, aO as Fd } from "./gmx-Cyz_GmV5.js";
|
|
15
15
|
import { A as DO, aP as kO, aQ as LO, aR as RO, aS as $O, aT as BO, aU as MO, C as FO, e as WO, aV as UO, aW as zO, f as GO, h as HO, U as VO, V as jO, aX as qO, aY as KO, a3 as YO, aZ as QO, aa as XO, a_ as ZO, a$ as JO, b0 as e_, b1 as t_, b2 as n_, b3 as r_, b4 as o_, b5 as a_, b6 as s_, aB as i_, aA as l_, az as c_, ay as d_, b7 as p_, b8 as u_, b9 as m_, ba as w_, bb as h_, bc as g_, bd as f_, be as v_, bf as b_, bg as y_, bh as T_, bi as A_, bj as S_, bk as x_, bl as C_, bm as E_, bn as I_, bo as N_, bp as O_, ao as __, ap as P_ } from "./gmx-Cyz_GmV5.js";
|
|
16
16
|
import { CustomError as Ss } from "ts-custom-error";
|
|
@@ -12499,6 +12499,7 @@ export {
|
|
|
12499
12499
|
cs as DEFAULT_WITHDRAW_SLIPPAGE,
|
|
12500
12500
|
IA as EIP712_TYPES,
|
|
12501
12501
|
dd as EMPTY_POOL_CONFIG,
|
|
12502
|
+
bd as EXTENDED_POLLING_INTERVAL,
|
|
12502
12503
|
rt as EasySwapperV2Abi,
|
|
12503
12504
|
Tt as EstimationError,
|
|
12504
12505
|
Bo as GAS_ESTIMATION_ERROR,
|
package/package.json
CHANGED
package/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dytm-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dytm-CliLZLfa.cjs"),t=require("viem");exports.EMPTY_PER_ASSET_WITHDRAW_DATA=e.EMPTY_PER_ASSET_WITHDRAW_DATA;exports.THIRD_PARTY_CONTRACT_ERRORS=e.THIRD_PARTY_CONTRACT_ERRORS;exports.applyContractErrorRegistry=e.applyContractErrorRegistry;exports.base64ToHex=e.base64ToHex;exports.buildAaveWithdrawAssetTransactionData=e.buildAaveWithdrawAssetTransactionData;exports.buildComplexAssetDataForRouter=e.buildComplexAssetDataForRouter;exports.buildDytmActions=e.buildDytmActions;exports.buildDytmRepayActions=e.buildDytmRepayActions;exports.buildSwapQuoteKeyForAave=e.buildSwapQuoteKeyForAave;exports.buildSwapWithdrawTransactionData=e.buildSwapWithdrawTransactionData;exports.buildZapDepositTransactionArguments=e.buildZapDepositTransactionArguments;exports.clientSide=e.clientSide;exports.computeAmountOutMinimumUsdc=e.computeAmountOutMinimumUsdc;exports.createDefaultComplexAssetData=e.createDefaultComplexAssetData;exports.encodeOndoWithdrawData=e.encodeOndoWithdrawData;exports.encodeUnwindPlan=e.encodeUnwindPlan;exports.enrichAssetsWithSwapQuotes=e.enrichAssetsWithSwapQuotes;exports.ensureContractErrorRegistryLoaded=e.ensureContractErrorRegistryLoaded;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractAvailableRouterKeys=e.extractAvailableRouterKeys;exports.fetchContractErrorRegistry=e.fetchContractErrorRegistry;exports.formatBalance=e.formatBalance;exports.formatByCurrency=e.formatByCurrency;exports.formatNumeratorToPercentage=e.formatNumeratorToPercentage;exports.formatTokenBalance=e.formatTokenBalance;exports.getAutoSlippageSimulationCandidates=e.getAutoSlippageSimulationCandidates;exports.getContractAbiById=e.getContractAbiById;exports.getContractAddressById=e.getContractAddressById;exports.getContractErrorRegistry=e.getContractErrorRegistry;exports.getConventionalTokenPriceDecimals=e.getConventionalTokenPriceDecimals;exports.getErrorKey=e.getErrorKey;exports.getFlatMoneyCollateralByLeverageAddress=e.getFlatMoneyCollateralByLeverageAddress;exports.getFlatMoneyLinkByUnitAddress=e.getFlatMoneyLinkByUnitAddress;exports.getGmxWithdrawAssetByLeverageAddress=e.getGmxWithdrawAssetByLeverageAddress;exports.getGmxWithdrawAssetByVaultAddress=e.getGmxWithdrawAssetByVaultAddress;exports.getHyperliquidWithdrawAsset=e.getHyperliquidWithdrawAsset;exports.getNativeTokenInvestableBalance=e.getNativeTokenInvestableBalance;exports.getPercent=e.getPercent;exports.getPoolFraction=e.getPoolFraction;exports.getSettleDelay=e.getSettleDelay;exports.getSlippageToleranceForContractTransaction=e.getSlippageToleranceForContractTransaction;exports.getTxHashShort=e.getTxHashShort;exports.groupPreviewByAccount=e.groupPreviewByAccount;exports.isAaveLendAndBorrowAsset=e.isAaveLendAndBorrowAsset;exports.isFlatMoneyLeveragedAsset=e.isFlatMoneyLeveragedAsset;exports.isFmpAirdropVaultAddress=e.isFmpAirdropVaultAddress;exports.isGmxLeveragedAsset=e.isGmxLeveragedAsset;exports.isHyperliquidPerpsAsset=e.isHyperliquidPerpsAsset;exports.isNativeToken=e.isNativeToken;exports.isStableSymbol=e.isStableSymbol;exports.logTransactionByActionType=e.logTransactionByActionType;exports.mapAttestationToOndoQuote=e.mapAttestationToOndoQuote;exports.mapOndoApiResponseToUpdatePricesArgs=e.mapOndoApiResponseToUpdatePricesArgs;exports.overlayWithdrawData=e.overlayWithdrawData;exports.parseAmountToD18=e.parseAmountToD18;exports.parseContractErrorMessage=e.parseContractErrorMessage;exports.shiftBy=e.shiftBy;exports.shortenAddress=e.shortenAddress;exports.shouldSwallowMainnetPollError=e.shouldSwallowMainnetPollError;exports.sliceByIndex=e.sliceByIndex;exports.toBigInt=e.toBigInt;exports.toBytes32Hex=e.toBytes32Hex;exports.transformAddressForAnalytics=e.transformAddressForAnalytics;exports.truncateString=e.truncateString;exports.tryEstimateWithRouters=e.tryEstimateWithRouters;exports.tryEstimateWithSlippageValues=e.tryEstimateWithSlippageValues;exports.validateLoggerEventParams=e.validateLoggerEventParams;Object.defineProperty(exports,"decodeErrorResult",{enumerable:!0,get:()=>t.decodeErrorResult});Object.defineProperty(exports,"encodeFunctionData",{enumerable:!0,get:()=>t.encodeFunctionData});Object.defineProperty(exports,"formatEther",{enumerable:!0,get:()=>t.formatEther});Object.defineProperty(exports,"formatUnits",{enumerable:!0,get:()=>t.formatUnits});Object.defineProperty(exports,"hexToString",{enumerable:!0,get:()=>t.hexToString});Object.defineProperty(exports,"trim",{enumerable:!0,get:()=>t.trim});
|
package/utils.js
CHANGED
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
import { E as s,
|
|
2
|
-
import { decodeErrorResult as
|
|
1
|
+
import { E as s, T as t, a as r, b as o, c as i, d as n, e as d, f as l, g as c, h as A, i as g, j as u, k as y, l as m, m as p, n as T, o as h, p as R, q as S, r as B, s as D, t as v, u as C, v as E, w, x, y as b, z as P, A as f, B as W, C as F, D as H, F as L, G as I, H as M, I as _, J as O, K as k, L as U, M as N, N as G, O as K, P as Q, Q as V, R as q, S as Y, U as Z, V as j, W as z, X as J, Y as X, Z as $, _ as aa, $ as ea, a0 as sa, a1 as ta, a2 as ra, a3 as oa, a4 as ia, a5 as na, a6 as da, a7 as la, a8 as ca, a9 as Aa, aa as ga, ab as ua, ac as ya } from "./dytm-DdzHS3o4.js";
|
|
2
|
+
import { decodeErrorResult as pa, encodeFunctionData as Ta, formatEther as ha, formatUnits as Ra, hexToString as Sa, trim as Ba } from "viem";
|
|
3
3
|
export {
|
|
4
4
|
s as EMPTY_PER_ASSET_WITHDRAW_DATA,
|
|
5
|
-
t as
|
|
6
|
-
r as
|
|
7
|
-
o as
|
|
8
|
-
i as
|
|
9
|
-
n as
|
|
10
|
-
d as
|
|
11
|
-
l as
|
|
12
|
-
c as
|
|
13
|
-
A as
|
|
14
|
-
g as
|
|
15
|
-
u as
|
|
16
|
-
y as
|
|
17
|
-
|
|
18
|
-
pa as
|
|
19
|
-
|
|
20
|
-
p as
|
|
21
|
-
T as
|
|
22
|
-
h as
|
|
23
|
-
|
|
24
|
-
S as
|
|
25
|
-
|
|
26
|
-
D as
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
E as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
P as
|
|
36
|
-
|
|
37
|
-
W as
|
|
38
|
-
F as
|
|
5
|
+
t as THIRD_PARTY_CONTRACT_ERRORS,
|
|
6
|
+
r as applyContractErrorRegistry,
|
|
7
|
+
o as base64ToHex,
|
|
8
|
+
i as buildAaveWithdrawAssetTransactionData,
|
|
9
|
+
n as buildComplexAssetDataForRouter,
|
|
10
|
+
d as buildDytmActions,
|
|
11
|
+
l as buildDytmRepayActions,
|
|
12
|
+
c as buildSwapQuoteKeyForAave,
|
|
13
|
+
A as buildSwapWithdrawTransactionData,
|
|
14
|
+
g as buildZapDepositTransactionArguments,
|
|
15
|
+
u as clientSide,
|
|
16
|
+
y as computeAmountOutMinimumUsdc,
|
|
17
|
+
m as createDefaultComplexAssetData,
|
|
18
|
+
pa as decodeErrorResult,
|
|
19
|
+
Ta as encodeFunctionData,
|
|
20
|
+
p as encodeOndoWithdrawData,
|
|
21
|
+
T as encodeUnwindPlan,
|
|
22
|
+
h as enrichAssetsWithSwapQuotes,
|
|
23
|
+
R as ensureContractErrorRegistryLoaded,
|
|
24
|
+
S as ensureHexPrefix,
|
|
25
|
+
B as extractAvailableRouterKeys,
|
|
26
|
+
D as fetchContractErrorRegistry,
|
|
27
|
+
v as formatBalance,
|
|
28
|
+
C as formatByCurrency,
|
|
29
|
+
ha as formatEther,
|
|
30
|
+
E as formatNumeratorToPercentage,
|
|
31
|
+
w as formatTokenBalance,
|
|
32
|
+
Ra as formatUnits,
|
|
33
|
+
x as getAutoSlippageSimulationCandidates,
|
|
34
|
+
b as getContractAbiById,
|
|
35
|
+
P as getContractAddressById,
|
|
36
|
+
f as getContractErrorRegistry,
|
|
37
|
+
W as getConventionalTokenPriceDecimals,
|
|
38
|
+
F as getErrorKey,
|
|
39
|
+
H as getFlatMoneyCollateralByLeverageAddress,
|
|
39
40
|
L as getFlatMoneyLinkByUnitAddress,
|
|
40
|
-
|
|
41
|
+
I as getGmxWithdrawAssetByLeverageAddress,
|
|
41
42
|
M as getGmxWithdrawAssetByVaultAddress,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
_ as getHyperliquidWithdrawAsset,
|
|
44
|
+
O as getNativeTokenInvestableBalance,
|
|
45
|
+
k as getPercent,
|
|
46
|
+
U as getPoolFraction,
|
|
47
|
+
N as getSettleDelay,
|
|
47
48
|
G as getSlippageToleranceForContractTransaction,
|
|
48
49
|
K as getTxHashShort,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
Q as groupPreviewByAccount,
|
|
51
|
+
Sa as hexToString,
|
|
52
|
+
V as isAaveLendAndBorrowAsset,
|
|
53
|
+
q as isFlatMoneyLeveragedAsset,
|
|
54
|
+
Y as isFmpAirdropVaultAddress,
|
|
55
|
+
Z as isGmxLeveragedAsset,
|
|
56
|
+
j as isHyperliquidPerpsAsset,
|
|
57
|
+
z as isNativeToken,
|
|
58
|
+
J as isStableSymbol,
|
|
59
|
+
X as logTransactionByActionType,
|
|
60
|
+
$ as mapAttestationToOndoQuote,
|
|
61
|
+
aa as mapOndoApiResponseToUpdatePricesArgs,
|
|
62
|
+
ea as overlayWithdrawData,
|
|
63
|
+
sa as parseAmountToD18,
|
|
64
|
+
ta as parseContractErrorMessage,
|
|
65
|
+
ra as shiftBy,
|
|
66
|
+
oa as shortenAddress,
|
|
67
|
+
ia as shouldSwallowMainnetPollError,
|
|
68
|
+
na as sliceByIndex,
|
|
69
|
+
da as toBigInt,
|
|
70
|
+
la as toBytes32Hex,
|
|
71
|
+
ca as transformAddressForAnalytics,
|
|
72
|
+
Ba as trim,
|
|
73
|
+
Aa as truncateString,
|
|
74
|
+
ga as tryEstimateWithRouters,
|
|
75
|
+
ua as tryEstimateWithSlippageValues,
|
|
76
|
+
ya as validateLoggerEventParams
|
|
76
77
|
};
|
package/dytm-D2sVE2th.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const A=require("wagmi/chains"),a=require("./gmx-DJ0gqvLq.cjs"),p=require("bignumber.js"),d=require("viem"),it=typeof window<"u",ct=[{inputs:[{internalType:"address",name:"_pool",type:"address"},{internalType:"address",name:"_asset",type:"address"},{internalType:"uint256",name:"_poolTokenAmount",type:"uint256"}],name:"previewGmTokenAmount",outputs:[{internalType:"uint256",name:"gmTokenAmount",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ondoGMSwap",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"usdc",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],ut=[{type:"tuple",components:[{name:"attestationSignature",type:"bytes"},{name:"quote",type:"tuple",components:[{name:"chainId",type:"uint256"},{name:"attestationId",type:"uint256"},{name:"userId",type:"bytes32"},{name:"asset",type:"address"},{name:"price",type:"uint256"},{name:"quantity",type:"uint256"},{name:"expiration",type:"uint256"},{name:"side",type:"uint8"},{name:"additionalData",type:"bytes32"}]},{name:"amountOutMinimum",type:"uint256"}]}],dt=[{name:"asset",type:"address"},{name:"amount",type:"uint256"},{name:"assetType",type:"uint16"},{name:"isPool",type:"bool"},{name:"isDebt",type:"bool"},{name:"marketId",type:"uint88"},{name:"accountId",type:"uint256"},{name:"tokenId",type:"uint256"},{name:"debtKey",type:"uint248"},{name:"shares",type:"uint256"}],pt=[{inputs:[{internalType:"address",name:"_pool",type:"address"},{internalType:"uint256",name:"_poolTokenAmount",type:"uint256"}],name:"previewWithdrawal",outputs:[{name:"assetData",type:"tuple[]",components:dt}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"dytmWithdrawProcessor",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"}],B=[{inputs:[{name:"params",type:"tuple",components:[{name:"account",type:"uint256"},{name:"tokenId",type:"uint256"},{name:"receiver",type:"address"},{name:"assets",type:"uint256"},{name:"shares",type:"uint256"},{name:"extraData",type:"bytes"}]}],name:"withdraw",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"params",type:"tuple",components:[{name:"account",type:"uint256"},{name:"key",type:"uint248"},{name:"withCollateralType",type:"uint8"},{name:"assets",type:"uint256"},{name:"shares",type:"uint256"},{name:"extraData",type:"bytes"}]}],name:"repay",outputs:[{name:"assetsRepaid",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],lt=[{inputs:[{name:"tokenIn",type:"address"},{name:"amountIn",type:"uint256"},{name:"tokenOut",type:"address"},{name:"amountOutMinimum",type:"uint256"},{name:"attestationSignature",type:"bytes"},{name:"quote",type:"tuple",components:[{name:"chainId",type:"uint256"},{name:"attestationId",type:"uint256"},{name:"userId",type:"bytes32"},{name:"asset",type:"address"},{name:"price",type:"uint256"},{name:"quantity",type:"uint256"},{name:"expiration",type:"uint256"},{name:"side",type:"uint8"},{name:"additionalData",type:"bytes32"}]}],name:"swapExactInWithAttestation",outputs:[],stateMutability:"nonpayable",type:"function"}],mt=[{type:"tuple",components:[{name:"actions",type:"tuple[]",components:[{name:"to",type:"address"},{name:"data",type:"bytes"}]},{name:"outputAsset",type:"address"},{name:"minOutputAmount",type:"uint256"}]}],yt=["https://cdn.jsdelivr.net/gh/dhedge/V2-Public@master/readmes/errorCodes/registry.json","https://raw.githubusercontent.com/dhedge/V2-Public/master/readmes/errorCodes/registry.json"],At=1,gt=1e4,I=2e6,Et=2e3,Tt=500,St=120,ht=300,_t=4,ft=/^dh\d{1,3}$/i,x=/[\u0000-\u001f\u007f]/,Dt=/https?:\/\/|[<>`]/i,bt=t=>t.length<=St&&!x.test(t)&&(ft.test(t)||t.length>=_t),T=t=>typeof t=="string"&&t.length>0&&t.length<=ht&&!x.test(t)&&!Dt.test(t),wt={stringErrors:{},selectorErrors:{}};let U=wt,_=null;const w=()=>U,F=t=>{U=t},Rt=t=>{const e=t;if(e?.schemaVersion!==At)throw new Error(`Unsupported error registry schemaVersion: ${String(e?.schemaVersion)}`);const n={};for(const[o,r]of Object.entries(e.stringErrors??{}))r?.curated===!0&&bt(o)&&T(r.description)&&T(r.action)&&(n[o]={title:r.description,hint:r.action});const s={};for(const[o,r]of Object.entries(e.selectorErrors??{}))r?.curated===!0&&/^0x[0-9a-f]{8}$/.test(o)&&T(r.signature)&&T(r.description)&&T(r.action)&&(s[o]={signature:r.signature,title:r.description,hint:r.action});if(!Object.keys(n).length)throw new Error("Error registry contained no curated string errors");if(Object.keys(n).length>Et||Object.keys(s).length>Tt)throw new Error("Error registry exceeded expected entry counts");return{stringErrors:n,selectorErrors:s}},v=async({timeoutMs:t=gt}={})=>{const e=[];for(const n of yt){const s=new AbortController,o=setTimeout(()=>s.abort(),t);try{const r=await fetch(n,{headers:{accept:"application/json"},signal:s.signal});if(!r.ok)throw new Error(`HTTP ${r.status}`);const i=Number(r.headers.get("content-length"));if(i>I)throw new Error(`Response too large: ${i} bytes`);const c=await r.text();if(c.length>I)throw new Error(`Response too large: ${c.length} chars`);return Rt(JSON.parse(c))}catch(r){e.push(`${n}: ${r instanceof Error?r.message:String(r)}`)}finally{clearTimeout(o)}}throw new Error(`All error registry sources failed: ${e.join("; ")}`)},It=()=>(_??(_=v().then(F).catch(()=>{_=null})),_),Nt=()=>typeof window<"u";function Ct(){return Nt()&&typeof window.ethereum<"u"}async function Ot(t){try{if(Ct())return window.ethereum.request({method:"wallet_watchAsset",params:{type:"ERC20",options:t}})}catch{return!1}return!1}const y=(t,e)=>t?.toLowerCase()===e?.toLowerCase(),Mt=t=>y(t,a.AddressZero$1),S=t=>{if(!t)throw new Error("Cannot prefix an empty hex value");return t.startsWith("0x")?t:`0x${t}`},m=(t,e)=>{try{return BigInt(t)}catch{throw new Error(`Cannot convert "${e}" value "${t}" to bigint`)}},f=t=>t?d.pad(S(t),{size:32}):d.zeroHash,G=t=>{if(!t)throw new Error("Cannot decode an empty base64 string");return d.bytesToHex(Uint8Array.from(atob(t),e=>e.charCodeAt(0)))},W=(t,e)=>a.contractsAddressesMap[e]?.[t]??a.AddressZero,Pt=t=>a.contractsAbisMap[t],Lt=t=>t&&`${t.substring(0,6)}...${t.substring(t.length-4,t.length)}`,Bt=({address:t,chainId:e})=>{const n=W("aaveLendingPoolV3",e);return y(t,n)},$=({sourceAddress:t,amount:e})=>`${t}_${e}`,xt=(t,e)=>{const n=t.slice(0,e),s=t.slice(e);return{firstPart:n,secondPart:s}},H=(t,e)=>t/e*100,Ut=t=>t<1?4:t<10?3:2,Ft=(t,e=a.DEFAULT_PRECISION)=>new p(t.toString()).shiftedBy(e).toFixed(0),vt=(t,e,n,s)=>new p(e).dividedBy(n).multipliedBy(t).shiftedBy(-(s||a.DEFAULT_PRECISION)).toNumber(),Gt=t=>BigInt(new p(t||"0").shiftedBy(a.DEFAULT_PRECISION).toFixed(0,p.ROUND_DOWN)),Y=t=>{const e=new p(.01),n=new p(t),s=!n.isZero()&&n.lt(e)?e:n;return BigInt(s.multipliedBy(100).toFixed(0))},Wt=({vaultAddress:t,swapData:e,sendTokenAddress:n,sendTokenAmount:s,vaultDepositTokenAddress:o,minVaultTokensReceivedAmount:r,routerKey:i="ONE_INCH",swapDestinationAmount:c,swapSlippage:u})=>{const l=new p(c).multipliedBy(1-u/100).toFixed(0),g=[d.stringToHex(i,{size:32}),e];return[t,[[n,s,g],[o,l]],r]},$t=({receiveAssetAddress:t,assets:e,swapData:n,slippage:s})=>{const o={srcData:[],destAmount:new p("0")},{srcData:r,destAmount:i}=e?.reduce((c,u)=>{const l=n?.[u.address];if(!l)return c;const g=[d.stringToHex(l.routerKey,{size:32}),l.rawTransaction.data],E=[u.address,u.rawBalance,g];return{srcData:[...c.srcData,E],destAmount:c.destAmount.plus(l.destinationAmount)}},o)??o;return[r,[t,i.times(1-s/100).toFixed(0,p.ROUND_DOWN)]]},V=({assetAddress:t,swapQuotes:e,swapParams:n,slippageToleranceForContractTransaction:s,routerKey:o})=>{if(!n)return{supportedAsset:t,withdrawData:"",slippageTolerance:BigInt(0)};const{srcData:r,dstData:i}=n,c=r.map(({asset:g,amount:E})=>{const h=e?.[$({sourceAddress:g,amount:E.toString()})]?.find(at=>at.routerKey===o);return{asset:g,amount:E,swapData:{routerKey:d.stringToHex(h?.routerKey??"",{size:32}),txData:h?.rawTransaction.data??"0x"}}}),u=d.encodeAbiParameters(a.ComplexWithdrawalAssetSrcDataAbiItem,[c]),l=d.encodeAbiParameters(a.ComplexWithdrawalDataAbiItem,[{encodedSrcData:u,dstData:{dstAddress:i.asset,dstAmount:i.amount},slippage:s}]);return{supportedAsset:t,withdrawData:l,slippageTolerance:s}},Ht=({chainId:t,txHash:e,error:n})=>{if(t!==A.mainnet.id||!e||!n)return!1;const s=n instanceof Error?n.message:String(n);return/\bNo Result\b/i.test(s)},Yt=({chainId:t,action:e,isRabbyWallet:n})=>e==="update_ondo_prices"&&t===A.mainnet.id&&n?a.ONDO_PRICES_RABBY_SETTLE_DELAY:t?a.TRANSACTION_SETTLE_DELAY[t]??0:0,Vt=(t,e)=>a.CHAIN_NATIVE_TOKENS[e]?.nativeTokenSymbol===t,kt=({nativeTokenBalance:t,tokenDecimals:e,gasPrice:n})=>{const s=new p(n).multipliedBy(a.NATIVE_TOKEN_GAS_RESERVE_UNITS).shiftedBy(-e),o=new p(t).minus(s);return o.gt("0")?o:new p("0")},Kt=t=>a.STABLE_TOKEN_SYMBOLS.includes(t),qt=t=>{const e=Object.values(t).reduce((n,{type:s})=>(n[s]=n[s]+1,n),{string:0,number:0});if(e.string>10)throw new Error("logger params must contain up to 10 string values");if(e.number>40)throw new Error("logger params must contain up to 40 numeric values");return!0},jt=(t,e=150)=>t.length>e?t.substring(0,e):t,k=()=>({...w().stringErrors,...a.TRANSACTION_ERRORS}),Xt=()=>[...Object.keys(k()),...Object.keys(a.LIMIT_ORDER_TRANSACTION_ERRORS)],Zt=/^dh\d+$/i,Qt=(t,e)=>Zt.test(e)?new RegExp(`\\b${e}\\b`,"i").test(t):t.includes(e.toLowerCase()),D=(t,e)=>{const n=t.toLowerCase();return[...e??Xt()].sort((s,o)=>o.length-s.length).find(s=>Qt(n,s))},N=t=>k()[t]??a.LIMIT_ORDER_TRANSACTION_ERRORS[t],zt=/\b0x[0-9a-f]{8}\b/i,Jt=t=>{const e=t.match(zt)?.[0]?.toLowerCase(),n=e?w().selectorErrors[e]:void 0;return n?{title:n.title,hint:n.hint}:void 0},te=({errorMessage:t,abiErrors:e})=>{if(!t||t.includes("User rejected"))return null;const n=e.find(i=>t.includes(i));if(n){const i=D(n);if(i)return N(i)}const s=D(t);if(s)return N(s);const o=Jt(t);if(o)return o;const[r]=t.split(n?".":"Contract").map(i=>i.trim());return{title:"Transaction failed",hint:`${jt(r??"")} ${n?`: ${n}`:""}`}},ee=t=>typeof t=="number"&&Number.isFinite(t),ne=t=>typeof t=="bigint"&&t!==BigInt(0),K=(t,e=a.DEFAULT_PRECISION$1)=>new p(t).shiftedBy(-e).toNumber(),q=t=>!isNaN(parseFloat(t))&&!isNaN(t),j=({value:t,minimumFractionDigits:e=2,maximumFractionDigits:n=2,compact:s=!1,normalize:o=!1})=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",notation:s?"compact":void 0,minimumFractionDigits:e,maximumFractionDigits:n}).format(o?K(t):Number(t)),b=t=>q(t)?new p(t).toFixed():"",C=["₀","₁","₂","₃","₄","₅","₆","₇","₈","₉"],X=({value:t,decimals:e=4})=>{const n=new p(t);if(n.isGreaterThan(1)||n.isZero())return b(n.toFixed(e));const o=(/e/i.test(t.toString())?parseFloat(t.toString()).toFixed(a.DEFAULT_PRECISION$1):t.toString()).match(/^0\.(0+)(\d+)$/);if(o){const[,r,i]=o;if(r.length>=e&&r.length<C.length)return`0.0${C[r.length]}${i.slice(0,3)}`}return b(n.toFixed(e))},Z=(t,e=0)=>`${t.toLocaleString("en-US",{maximumFractionDigits:e})}%`,se=t=>t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),re=(t,e,n=0)=>{const s=H(+t,e);return Z(s,n)},oe=({currency:t,value:e})=>t==="USD"?j({value:e}):`${a.CURRENCY_SYMBOL_MAP[t]} ${X({value:e,decimals:a.CURRENCY_DECIMALS_MAP[t]})}`,Q=(t,e)=>new p(new p(t).toFixed(e,p.ROUND_DOWN)).toString(),z=(t,e=3,n=2)=>{if(t.length<=5)return t;const s="...";return t.length<=e+n+s.length?t:`${t.slice(0,e)}${s}${t.slice(-n)}`},ae=({balance:t,symbol:e,precision:n,truncateSymbol:s})=>`${Q(t,n)} ${s?z(e):e}`,ie=t=>{if(!t)return;const e=t.match(/0x[a-fA-F0-9]{64}/);if(!e)return;const n=e[0];return`${n.slice(0,4)}...${n.slice(-3)}`},ce=t=>y(a.FLATMONEY_EARLY_DEPOSITOR_VAULT_ADDRESS_BASE,t)||y(a.FLATMONEY_DHT_STAKING_VAULT_ADDRESS_BASE,t),ue=t=>a.FLAT_MONEY_LEVERAGED_ASSET_ADDRESSES.some(e=>y(e,t)),de=t=>a.FLAT_MONEY_COLLATERAL_MAP[t.toLowerCase()]??{symbol:"",decimals:18,address:a.AddressZero},pe=t=>y(t,a.FLAT_MONEY_V1_UNIT_ADDRESS)?a.FLAT_MONEY_V1_UNIT_LINK:a.FLAT_MONEY_UNIT_LINK,J=t=>`eth_${t}`,le=({action:t,log:e,symbol:n,vaultAddress:s,chainId:o})=>{const r={[a.TRADING_LOG_EVENT_PARAM.SYMBOL.NAME]:n,[a.TRADING_LOG_EVENT_PARAM.CHAIN_ID.NAME]:o,[a.TRADING_LOG_EVENT_PARAM.ADDRESS.NAME]:J(s)};a.LOG_EVENT_BY_TRANSACTION_ACTION_MAP[t].forEach(i=>{e?.(i,r)})},me=t=>a.GMX_MARKET_ASSETS.some(e=>y(e,t)),ye=t=>a.GMX_WITHDRAW_ASSET_MAP[t.toLowerCase()]??{symbol:"",decimals:18,address:a.AddressZero},Ae=t=>a.GMX_WITHDRAW_ASSET_MAP_BY_VAULT_ADDRESS[t.toLowerCase()],tt="0x3333333333333333333333333333333333333333";A.arbitrum.id+"",a.USDC_ARBITRUM.address,A.base.id+"",a.USDC_BASE.address,A.optimism.id+"",a.USDC_OPTIMISM.address,A.polygon.id+"",a.USDC_POLYGON.address,A.mainnet.id+"",a.USDC_MAINNET.address,A.hyperEvm.id+"",a.USDC_HYPEREVM.address;const ge=t=>y(t,tt),Ee=()=>a.USDC_HYPEREVM,Te=new Map,R=(t,e)=>!e||e.size===0?t:t.map(n=>{const s=e.get(n.supportedAsset.toLowerCase());return s?{...n,withdrawData:s.withdrawData,slippageTolerance:s.slippageTolerance}:n}),et=t=>{const e=t.find(({swapQuotes:n})=>n);return e?.swapQuotes?Object.values(e.swapQuotes)[0]?.map(({routerKey:n})=>n)??[]:[]},nt=(t,e,n)=>t.map(({asset:s,swapParams:o,swapQuotes:r})=>!o||!r?{supportedAsset:s,withdrawData:"",slippageTolerance:n}:V({assetAddress:s,swapQuotes:r,swapParams:o,slippageToleranceForContractTransaction:n,routerKey:e})),st=async(t,e,n,s,o,r)=>{for(const i of t){const c=R(nt(e,i,n),r),{error:u}=await s(...o,c);if(!u)return c}return null},Se=(t,e,n)=>{const s=(t??[]).map(o=>({supportedAsset:o,withdrawData:"",slippageTolerance:e}));return R(s,n)},he=async(t,e,n,s,o)=>{for(const r of t){const i=Y(r);try{const c=await e(r),u=et(c),l=await st(u,c,i,n,s,o);if(l)return console.debug(`[Init Withdraw] Auto slippage simulation succeeded: slippage=${r}%`),console.debug("[Init Withdraw] Complex asset data:",l),l}catch(c){console.error(`[Init Withdraw] Failed to fetch quotes for slippage=${r}%:`,c)}}return null},_e=async(t,e,{fetchAaveSwapParams:n,fetchAaveSwapQuotes:s,withdrawAmountD18:o,slippage:r})=>Promise.all((t??[]).map(async i=>{if(!y(i,e))return{asset:i};try{const u=await n({withdrawAmountD18:o,slippage:r});if(u?.srcData.length){const l=await s({swapParams:u,slippage:r});return{asset:i,swapParams:u,swapQuotes:l}}return{asset:i}}catch(u){return console.error(u),{asset:i}}})),O=t=>Math.round(t*100)/100,fe=({maxSlippage:t,candidates:e=a.SLIPPAGE_AUTO_SIMULATION_CANDIDATES})=>{if(!Number.isFinite(t)||t<=0)return[];const n=O(Math.min(t,100)),s=e.filter(r=>r>0&&r<=n).map(O),o=new Set(s);return o.add(n),o.add(t),Array.from(o).sort((r,i)=>r-i)},M=1000000000000000000n,De=1000000n,P=10000n,L=100n,be=t=>({quotes:t.quotes.map(e=>({chainId:m(e.chainId,"chainId"),attestationId:m(e.attestationId,"attestationId"),userId:S(e.userId),asset:e.asset,price:m(e.price,"price"),quantity:m(e.quantity,"quantity"),expiration:m(e.expiration,"expiration"),side:Number(e.side),additionalData:S(e.additionalData)})),signatures:t.signatures.map(S)}),rt=(t,e,n)=>{const s=BigInt(Math.max(0,Math.round(n*100))),o=s>L?L:s,r=P-o,c=t*e/M*r*De,u=P*M;return(c+u-1n)/u},ot=(t,e)=>({chainId:e,attestationId:m(t.attestationId,"attestationId"),userId:f(t.userId),asset:t.assetAddress,price:m(t.price,"price"),quantity:m(t.tokenAmount,"tokenAmount"),expiration:m(t.expiration,"expiration"),side:Number(t.side),additionalData:f(t.additionalData)}),we=({attestation:t,chainId:e,slippagePercent:n})=>{const s=ot(t,e);return d.encodeAbiParameters(ut,[{attestationSignature:G(t.signature),quote:s,amountOutMinimum:rt(s.quantity,s.price,n)}])},Re=t=>[...t.reduce((n,s)=>n.has(s.accountId)?n:n.set(s.accountId,s),new Map).values()].map(({accountId:n,marketId:s})=>({accountId:n,marketId:s,collaterals:t.filter(o=>o.accountId===n&&!o.isDebt),debt:t.find(o=>o.accountId===n&&o.isDebt)})),Ie=({collateral:t,dytmOffice:e,processor:n,gmToken:s,ondoGMSwap:o,usdc:r,gmAmount:i,amountOutMinimum:c,signature:u,quote:l})=>[{to:e,data:d.encodeFunctionData({abi:B,functionName:"withdraw",args:[{account:t.accountId,tokenId:t.tokenId,receiver:n,assets:i,shares:0n,extraData:"0x"}]})},{to:s,data:d.encodeFunctionData({abi:d.erc20Abi,functionName:"approve",args:[o,i]})},{to:o,data:d.encodeFunctionData({abi:lt,functionName:"swapExactInWithAttestation",args:[s,i,r,c,u,l]})}],Ne=({accountId:t,debtKey:e,dytmOffice:n,usdc:s})=>[{to:s,data:d.encodeFunctionData({abi:d.erc20Abi,functionName:"approve",args:[n,d.maxUint256]})},{to:n,data:d.encodeFunctionData({abi:B,functionName:"repay",args:[{account:t,key:e,withCollateralType:0,assets:d.maxUint256,shares:0n,extraData:"0x"}]})}],Ce=({actions:t,outputAsset:e,minOutputAmount:n})=>d.encodeAbiParameters(mt,[{actions:t,outputAsset:e,minOutputAmount:n}]);exports.DytmOfficeAssetGuardAbi=pt;exports.EMPTY_PER_ASSET_WITHDRAW_DATA=Te;exports.HYPERLIQUID_PERPS_ACCOUNT_ADDRESS=tt;exports.OndoGMTokenAssetGuardAbi=ct;exports.addTokenToWallet=Ot;exports.applyContractErrorRegistry=F;exports.base64ToHex=G;exports.buildAaveWithdrawAssetTransactionData=V;exports.buildComplexAssetDataForRouter=nt;exports.buildDytmActions=Ie;exports.buildDytmRepayActions=Ne;exports.buildSwapQuoteKeyForAave=$;exports.buildSwapWithdrawTransactionData=$t;exports.buildZapDepositTransactionArguments=Wt;exports.clientSide=it;exports.commify=se;exports.computeAmountOutMinimumUsdc=rt;exports.createDefaultComplexAssetData=Se;exports.encodeOndoWithdrawData=we;exports.encodeUnwindPlan=Ce;exports.enrichAssetsWithSwapQuotes=_e;exports.ensureContractErrorRegistryLoaded=It;exports.ensureHexPrefix=S;exports.extractAvailableRouterKeys=et;exports.fetchContractErrorRegistry=v;exports.formatBalance=Q;exports.formatByCurrency=oe;exports.formatNumberToLimitedDecimals=X;exports.formatNumeratorToPercentage=re;exports.formatPercentage=Z;exports.formatToUsd=j;exports.formatTokenBalance=ae;exports.getAutoSlippageSimulationCandidates=fe;exports.getContractAbiById=Pt;exports.getContractAddressById=W;exports.getContractErrorRegistry=w;exports.getConventionalTokenPriceDecimals=Ut;exports.getErrorKey=D;exports.getFlatMoneyCollateralByLeverageAddress=de;exports.getFlatMoneyLinkByUnitAddress=pe;exports.getGmxWithdrawAssetByLeverageAddress=ye;exports.getGmxWithdrawAssetByVaultAddress=Ae;exports.getHyperliquidWithdrawAsset=Ee;exports.getNativeTokenInvestableBalance=kt;exports.getPercent=H;exports.getPoolFraction=vt;exports.getSettleDelay=Yt;exports.getSlippageToleranceForContractTransaction=Y;exports.getTxHashShort=ie;exports.groupPreviewByAccount=Re;exports.isAaveLendAndBorrowAsset=Bt;exports.isEqualAddress=y;exports.isFlatMoneyLeveragedAsset=ue;exports.isFmpAirdropVaultAddress=ce;exports.isGmxLeveragedAsset=me;exports.isHyperliquidPerpsAsset=ge;exports.isNativeToken=Vt;exports.isNumberType=ee;exports.isNumeric=q;exports.isStableSymbol=Kt;exports.isZeroAddress=Mt;exports.logTransactionByActionType=le;exports.mapAttestationToOndoQuote=ot;exports.mapOndoApiResponseToUpdatePricesArgs=be;exports.nonZeroBigInt=ne;exports.normalizeNumber=K;exports.overlayWithdrawData=R;exports.parseAmountToD18=Gt;exports.parseContractErrorMessage=te;exports.removeInsignificantTrailingZeros=b;exports.shiftBy=Ft;exports.shortenAddress=Lt;exports.shouldSwallowMainnetPollError=Ht;exports.sliceByIndex=xt;exports.toBigInt=m;exports.toBytes32Hex=f;exports.transformAddressForAnalytics=J;exports.truncateString=z;exports.tryEstimateWithRouters=st;exports.tryEstimateWithSlippageValues=he;exports.validateLoggerEventParams=qt;
|