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