@dhedge/trading-widget 6.3.2 → 6.3.5
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/LICENSE +1 -1
- package/{contract-error-log-Ci0TIrO5.js → contract-error-log-B5cBnMzk.js} +366 -363
- package/{contract-error-log-D3UONUXl.cjs → contract-error-log-BK2h_izP.cjs} +1 -1
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-simulation-withdraw-data.d.ts +4 -1
- package/core-kit/utils/ondo.d.ts +2 -0
- package/index.cjs +1 -1
- package/index.js +3721 -3687
- package/package.json +1 -1
- package/utils.cjs +1 -1
- package/utils.js +69 -67
package/package.json
CHANGED
package/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./contract-error-log-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./contract-error-log-BK2h_izP.cjs"),t=require("viem");exports.EMPTY_PER_ASSET_WITHDRAW_DATA=e.EMPTY_PER_ASSET_WITHDRAW_DATA;exports.MIN_GM_UNWIND_VALUE_USD=e.MIN_GM_UNWIND_VALUE_USD;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.buildDytmOutputAssetWithdrawAction=e.buildDytmOutputAssetWithdrawAction;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.getComplexAssetDataSlippageTolerance=e.getComplexAssetDataSlippageTolerance;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.isHyperliquidCorePositionAsset=e.isHyperliquidCorePositionAsset;exports.isHyperliquidPerpsAsset=e.isHyperliquidPerpsAsset;exports.isHyperliquidSpotSystemAsset=e.isHyperliquidSpotSystemAsset;exports.isNativeToken=e.isNativeToken;exports.isStableSymbol=e.isStableSymbol;exports.isUnswappableGmDust=e.isUnswappableGmDust;exports.logContractErrorOnce=e.logContractErrorOnce;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,82 +1,84 @@
|
|
|
1
|
-
import { E as s,
|
|
2
|
-
import { decodeErrorResult as
|
|
1
|
+
import { E as s, M as t, T as r, a as o, b as i, c as n, d, e as l, f as A, g as c, h as g, i as u, j as p, k as y, l as m, m as T, n as D, o as S, p as h, q as C, r as E, s as R, t as w, u as B, v as b, w as v, x, y as P, z as f, A as W, B as _, C as F, D as H, F as I, G as L, H as M, I as U, J as O, K as N, L as k, N as G, O as q, P as V, Q as K, R as Q, S as Y, U as j, V as Z, 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 Aa, a9 as ca, aa as ga, ab as ua, ac as pa, ad as ya, ae as ma, af as Ta, ag as Da, ah as Sa, ai as ha, aj as Ca } from "./contract-error-log-B5cBnMzk.js";
|
|
2
|
+
import { decodeErrorResult as Ra, encodeFunctionData as wa, formatEther as Ba, formatUnits as ba, hexToString as va, trim as xa } 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
|
|
5
|
+
t as MIN_GM_UNWIND_VALUE_USD,
|
|
6
|
+
r as THIRD_PARTY_CONTRACT_ERRORS,
|
|
7
|
+
o as applyContractErrorRegistry,
|
|
8
|
+
i as base64ToHex,
|
|
9
|
+
n as buildAaveWithdrawAssetTransactionData,
|
|
10
|
+
d as buildComplexAssetDataForRouter,
|
|
11
|
+
l as buildDytmActions,
|
|
12
|
+
A as buildDytmOutputAssetWithdrawAction,
|
|
12
13
|
c as buildDytmRepayActions,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
g as buildSwapQuoteKeyForAave,
|
|
15
|
+
u as buildSwapWithdrawTransactionData,
|
|
16
|
+
p as buildZapDepositTransactionArguments,
|
|
17
|
+
y as clientSide,
|
|
18
|
+
m as computeAmountOutMinimumUsdc,
|
|
19
|
+
T as createDefaultComplexAssetData,
|
|
20
|
+
Ra as decodeErrorResult,
|
|
21
|
+
wa as encodeFunctionData,
|
|
22
|
+
D as encodeOndoWithdrawData,
|
|
23
|
+
S as encodeUnwindPlan,
|
|
24
|
+
h as enrichAssetsWithSwapQuotes,
|
|
24
25
|
C as ensureContractErrorRegistryLoaded,
|
|
25
|
-
|
|
26
|
+
E as ensureHexPrefix,
|
|
26
27
|
R as extractAvailableRouterKeys,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
w as fetchContractErrorRegistry,
|
|
29
|
+
B as formatBalance,
|
|
30
|
+
b as formatByCurrency,
|
|
30
31
|
Ba as formatEther,
|
|
31
|
-
|
|
32
|
+
v as formatNumeratorToPercentage,
|
|
32
33
|
x as formatTokenBalance,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
ba as formatUnits,
|
|
35
|
+
P as getAutoSlippageSimulationCandidates,
|
|
36
|
+
f as getComplexAssetDataSlippageTolerance,
|
|
37
|
+
W as getContractAbiById,
|
|
38
|
+
_ as getContractAddressById,
|
|
38
39
|
F as getContractErrorRegistry,
|
|
39
40
|
H as getConventionalTokenPriceDecimals,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
I as getErrorKey,
|
|
42
|
+
L as getFlatMoneyCollateralByLeverageAddress,
|
|
43
|
+
M as getFlatMoneyLinkByUnitAddress,
|
|
44
|
+
U as getGmxWithdrawAssetByLeverageAddress,
|
|
45
|
+
O as getGmxWithdrawAssetByVaultAddress,
|
|
46
|
+
N as getHyperliquidWithdrawAsset,
|
|
47
|
+
k as getNativeTokenInvestableBalance,
|
|
48
|
+
G as getPercent,
|
|
49
|
+
q as getPoolFraction,
|
|
50
|
+
V as getSettleDelay,
|
|
50
51
|
K as getSlippageToleranceForContractTransaction,
|
|
51
52
|
Q as getTxHashShort,
|
|
52
|
-
|
|
53
|
+
Y as groupPreviewByAccount,
|
|
53
54
|
va as hexToString,
|
|
54
|
-
|
|
55
|
+
j as isAaveLendAndBorrowAsset,
|
|
55
56
|
Z as isFlatMoneyLeveragedAsset,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
ca as
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
57
|
+
z as isFmpAirdropVaultAddress,
|
|
58
|
+
J as isGmxLeveragedAsset,
|
|
59
|
+
X as isHyperliquidCorePositionAsset,
|
|
60
|
+
$ as isHyperliquidPerpsAsset,
|
|
61
|
+
aa as isHyperliquidSpotSystemAsset,
|
|
62
|
+
ea as isNativeToken,
|
|
63
|
+
sa as isStableSymbol,
|
|
64
|
+
ta as isUnswappableGmDust,
|
|
65
|
+
ra as logContractErrorOnce,
|
|
66
|
+
oa as logTransactionByActionType,
|
|
67
|
+
ia as mapAttestationToOndoQuote,
|
|
68
|
+
na as mapOndoApiResponseToUpdatePricesArgs,
|
|
69
|
+
da as overlayWithdrawData,
|
|
70
|
+
la as parseAmountToD18,
|
|
71
|
+
Aa as parseContractErrorMessage,
|
|
72
|
+
ca as shiftBy,
|
|
73
|
+
ga as shortenAddress,
|
|
74
|
+
ua as shouldSwallowMainnetPollError,
|
|
75
|
+
pa as sliceByIndex,
|
|
76
|
+
ya as toBigInt,
|
|
77
|
+
ma as toBytes32Hex,
|
|
78
|
+
Ta as transformAddressForAnalytics,
|
|
79
|
+
xa as trim,
|
|
80
|
+
Da as truncateString,
|
|
81
|
+
Sa as tryEstimateWithRouters,
|
|
80
82
|
ha as tryEstimateWithSlippageValues,
|
|
81
|
-
|
|
83
|
+
Ca as validateLoggerEventParams
|
|
82
84
|
};
|