@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhedge/trading-widget",
3
- "version": "6.2.2",
3
+ "version": "6.3.2",
4
4
  "dependencies": {
5
5
  "@headlessui/react": "^2.1.2",
6
6
  "@heroicons/react": "^2.1.5",
package/utils.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dytm-BGpelTOE.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.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.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});
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 D, r as R, s as B, t as C, u as v, v as x, w as E, x as w, 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 pa, ad as ya } from "./dytm-3a5llKkf.js";
2
- import { decodeErrorResult as Ta, encodeFunctionData as ha, formatEther as Sa, formatUnits as Da, hexToString as Ra, trim as Ba } from "viem";
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 buildDytmRepayActions,
12
- c as buildSwapQuoteKeyForAave,
13
- A as buildSwapWithdrawTransactionData,
14
- g as buildZapDepositTransactionArguments,
15
- u as clientSide,
16
- p as computeAmountOutMinimumUsdc,
17
- y as createDefaultComplexAssetData,
18
- Ta as decodeErrorResult,
19
- ha as encodeFunctionData,
20
- m as encodeOndoWithdrawData,
21
- T as encodeUnwindPlan,
22
- h as enrichAssetsWithSwapQuotes,
23
- S as ensureContractErrorRegistryLoaded,
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
- C as formatBalance,
28
+ E as formatBalance,
28
29
  v as formatByCurrency,
29
- Sa as formatEther,
30
- x as formatNumeratorToPercentage,
31
- E as formatTokenBalance,
32
- Da as formatUnits,
33
- w as getAutoSlippageSimulationCandidates,
34
- b as getComplexAssetDataSlippageTolerance,
35
- P as getContractAbiById,
36
- f as getContractAddressById,
37
- W as getContractErrorRegistry,
38
- F as getConventionalTokenPriceDecimals,
39
- H as getErrorKey,
40
- L as getFlatMoneyCollateralByLeverageAddress,
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
- O as getHyperliquidWithdrawAsset,
45
- k as getNativeTokenInvestableBalance,
46
- U as getPercent,
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
- Ra as hexToString,
53
- q as isAaveLendAndBorrowAsset,
54
- Y as isFlatMoneyLeveragedAsset,
55
- Z as isFmpAirdropVaultAddress,
56
- j as isGmxLeveragedAsset,
57
- z as isHyperliquidPerpsAsset,
58
- J as isNativeToken,
59
- X as isStableSymbol,
60
- $ as logTransactionByActionType,
61
- aa as mapAttestationToOndoQuote,
62
- ea as mapOndoApiResponseToUpdatePricesArgs,
63
- sa as overlayWithdrawData,
64
- ta as parseAmountToD18,
65
- ra as parseContractErrorMessage,
66
- oa as shiftBy,
67
- ia as shortenAddress,
68
- na as shouldSwallowMainnetPollError,
69
- da as sliceByIndex,
70
- la as toBigInt,
71
- ca as toBytes32Hex,
72
- Aa as transformAddressForAnalytics,
73
- Ba as trim,
74
- ga as truncateString,
75
- ua as tryEstimateWithRouters,
76
- pa as tryEstimateWithSlippageValues,
77
- ya as validateLoggerEventParams
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
  };