diff --git a/.changeset/cuddly-pandas-visit.md b/.changeset/cuddly-pandas-visit.md new file mode 100644 index 000000000000..b25786eab8be --- /dev/null +++ b/.changeset/cuddly-pandas-visit.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/hw-app-eth": patch +--- + +Move LoadConfig and ResolutionConfig types to @ledgerhq/types-live diff --git a/.changeset/heavy-lobsters-rush.md b/.changeset/heavy-lobsters-rush.md new file mode 100644 index 000000000000..a2a247201ff6 --- /dev/null +++ b/.changeset/heavy-lobsters-rush.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/live-dmk": minor +--- + +Update Transport.listen to emit add and remove events diff --git a/.changeset/honest-seas-repeat.md b/.changeset/honest-seas-repeat.md new file mode 100644 index 000000000000..d5522cf44e1e --- /dev/null +++ b/.changeset/honest-seas-repeat.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/types-live": patch +--- + +Add EvmSigner interface, LoadConfig and ResolutionConfig types diff --git a/.changeset/hungry-pillows-cover.md b/.changeset/hungry-pillows-cover.md new file mode 100644 index 000000000000..2d3f252eaa62 --- /dev/null +++ b/.changeset/hungry-pillows-cover.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/coin-evm": patch +--- + +Use EvmSigner interface from @ledgerhq/types-live diff --git a/.changeset/tall-toys-invite.md b/.changeset/tall-toys-invite.md new file mode 100644 index 000000000000..2adda6f355db --- /dev/null +++ b/.changeset/tall-toys-invite.md @@ -0,0 +1,5 @@ +--- +"ledger-live-desktop": minor +--- + +use dmk listenToKnownDevices in LLD:useListenToHidDevices diff --git a/.changeset/tame-boats-admire.md b/.changeset/tame-boats-admire.md new file mode 100644 index 000000000000..06eb87984892 --- /dev/null +++ b/.changeset/tame-boats-admire.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/live-common": patch +--- + +Use DMK signer ETH if DMK transport is used instead of legacy hw-app-eth signer diff --git a/.changeset/wise-hairs-confess.md b/.changeset/wise-hairs-confess.md new file mode 100644 index 000000000000..5da1f2f13a57 --- /dev/null +++ b/.changeset/wise-hairs-confess.md @@ -0,0 +1,5 @@ +--- +"@ledgerhq/hw-app-eth": patch +--- + +Implement EvmSigner class from @ledgerhq/types-live diff --git a/apps/cli/src/tsconfig.json b/apps/cli/src/tsconfig.json index 8afa81b92e81..d1ff810d73d8 100644 --- a/apps/cli/src/tsconfig.json +++ b/apps/cli/src/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "module": "commonjs", + "module": "nodenext", "declaration": true, "declarationMap": true, "sourceMap": true, @@ -10,8 +10,7 @@ "allowSyntheticDefaultImports": true, "esModuleInterop": true, "skipLibCheck": true, - - "moduleResolution": "node", + "moduleResolution": "nodenext", "downlevelIteration": true, "resolveJsonModule": true, "rootDir": ".", diff --git a/apps/ledger-live-desktop/package.json b/apps/ledger-live-desktop/package.json index 2802314c9256..d67a0fbbd17b 100644 --- a/apps/ledger-live-desktop/package.json +++ b/apps/ledger-live-desktop/package.json @@ -58,7 +58,7 @@ "@ledgerhq/coin-evm": "workspace:^", "@ledgerhq/coin-filecoin": "workspace:^", "@ledgerhq/coin-framework": "workspace:^", - "@ledgerhq/devices": "workspace:*", + "@ledgerhq/devices": "workspace:^", "@ledgerhq/domain-service": "workspace:^", "@ledgerhq/errors": "workspace:^", "@ledgerhq/ethereum-provider": "workspace:^", @@ -73,7 +73,7 @@ "@ledgerhq/live-config": "workspace:^", "@ledgerhq/live-countervalues": "workspace:^", "@ledgerhq/live-countervalues-react": "workspace:^", - "@ledgerhq/live-dmk": "workspace:*", + "@ledgerhq/live-dmk": "workspace:^", "@ledgerhq/live-env": "workspace:^", "@ledgerhq/live-network": "workspace:^", "@ledgerhq/live-nft": "workspace:^", diff --git a/apps/ledger-live-desktop/src/renderer/components/ButtonV3.tsx b/apps/ledger-live-desktop/src/renderer/components/ButtonV3.tsx index 344849dd052e..9be74148fab8 100644 --- a/apps/ledger-live-desktop/src/renderer/components/ButtonV3.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/ButtonV3.tsx @@ -1,6 +1,6 @@ import React from "react"; import { Button as BaseButton, InvertTheme } from "@ledgerhq/react-ui"; -import { ButtonProps as BaseButtonProps } from "@ledgerhq/react-ui/components/cta/Button"; +import { ButtonProps as BaseButtonProps } from "@ledgerhq/react-ui/components/cta/Button/index"; import { useTrack } from "~/renderer/analytics/segment"; import styled from "styled-components"; diff --git a/apps/ledger-live-desktop/src/renderer/components/CustomImage/CustomLockScreenDeviceAction/stepsRendering.tsx b/apps/ledger-live-desktop/src/renderer/components/CustomImage/CustomLockScreenDeviceAction/stepsRendering.tsx index 02ea1b35e8d9..73928eeb3d8b 100644 --- a/apps/ledger-live-desktop/src/renderer/components/CustomImage/CustomLockScreenDeviceAction/stepsRendering.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/CustomImage/CustomLockScreenDeviceAction/stepsRendering.tsx @@ -68,6 +68,7 @@ export const RenderLoadingImage = ({ alignItems="center" data-testid={`device-action-image-loading-${progress}`} > + (p.inline ? "" : "100%")}; overflow: hidden; `; -const I = ({ color, children }: { color?: string; children: React.ReactNode }) => ( +const I = ({ color = undefined, children }: { color?: string; children: React.ReactNode }) => ( {children} ); -I.defaultProps = { - color: undefined, -}; + export type OwnProps = { unit?: Unit; val?: BigNumber | number; diff --git a/apps/ledger-live-desktop/src/renderer/components/Illustration.tsx b/apps/ledger-live-desktop/src/renderer/components/Illustration.tsx index 96b8b880f05c..2813b6d18cf6 100644 --- a/apps/ledger-live-desktop/src/renderer/components/Illustration.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/Illustration.tsx @@ -1,6 +1,6 @@ import styled, { DefaultTheme, StyledComponent } from "styled-components"; import { Box } from "@ledgerhq/react-ui"; -import { BoxProps } from "@ledgerhq/react-ui/components/layout/Box"; +import { BoxProps } from "@ledgerhq/react-ui/components/layout/Box/index"; type Props = { lightSource: string; diff --git a/apps/ledger-live-desktop/src/renderer/components/Onboarding/Screens/Tutorial/shared.tsx b/apps/ledger-live-desktop/src/renderer/components/Onboarding/Screens/Tutorial/shared.tsx index 7f958965a79c..fbf6cc24c3ba 100644 --- a/apps/ledger-live-desktop/src/renderer/components/Onboarding/Screens/Tutorial/shared.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/Onboarding/Screens/Tutorial/shared.tsx @@ -3,8 +3,8 @@ import { useTranslation } from "react-i18next"; import styled, { DefaultTheme, StyledComponent } from "styled-components"; import { Box, Text, Flex, Icon, Switch } from "@ledgerhq/react-ui"; import { BoxProps } from "@ledgerhq/react-ui/components/layout/Box/index"; -import { SwitchProps } from "@ledgerhq/react-ui/components/form/Switch/Switch"; -import { TextProps } from "@ledgerhq/react-ui/components/asorted/Text"; +import { SwitchProps } from "@ledgerhq/react-ui/components/form/Switch/index"; +import { TextProps } from "@ledgerhq/react-ui/components/asorted/Text/index"; export const WaveContainer: StyledComponent<"div", DefaultTheme, BoxProps> = styled(Box).attrs({ position: "absolute", diff --git a/apps/ledger-live-desktop/src/renderer/components/OperationsList/DateCell.tsx b/apps/ledger-live-desktop/src/renderer/components/OperationsList/DateCell.tsx index af6016598114..5129837772e8 100644 --- a/apps/ledger-live-desktop/src/renderer/components/OperationsList/DateCell.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/OperationsList/DateCell.tsx @@ -1,6 +1,5 @@ import { isStuckOperation } from "@ledgerhq/live-common/operation"; -import { InfiniteLoader } from "@ledgerhq/react-ui"; -import { WarningSolidMedium } from "@ledgerhq/react-ui/assets/icons"; +import { InfiniteLoader, IconsLegacy } from "@ledgerhq/react-ui"; import { Operation } from "@ledgerhq/types-live"; import { TFunction } from "i18next"; import React from "react"; @@ -31,7 +30,7 @@ const PendingLoadingIcon = ({ displayWarning }: { displayWarning: boolean }): JS if (displayWarning) { return ( - + ); } diff --git a/apps/ledger-live-desktop/src/renderer/components/SpendableAmount.tsx b/apps/ledger-live-desktop/src/renderer/components/SpendableAmount.tsx index 2b078bd53ef4..ebfb3ffec61e 100644 --- a/apps/ledger-live-desktop/src/renderer/components/SpendableAmount.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/SpendableAmount.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { Account, AccountLike, TransactionCommon } from "@ledgerhq/types-live"; -import { useDebounce } from "@ledgerhq/live-common//hooks/useDebounce"; +import { useDebounce } from "@ledgerhq/live-common/hooks/useDebounce"; import { getAccountBridge } from "@ledgerhq/live-common/bridge/index"; import FormattedVal from "~/renderer/components/FormattedVal"; import BigNumber from "bignumber.js"; diff --git a/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/Manual/EarlySecurityChecks/Bullet.tsx b/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/Manual/EarlySecurityChecks/Bullet.tsx index 5eb719fd2e9f..8364b56f4747 100644 --- a/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/Manual/EarlySecurityChecks/Bullet.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/Manual/EarlySecurityChecks/Bullet.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Flex, Text, InfiniteLoader, IconsLegacy } from "@ledgerhq/react-ui"; import styled, { StyledComponent, DefaultTheme } from "styled-components"; -import { FlexBoxProps } from "@ledgerhq/react-ui/components/layout/Flex"; +import { FlexBoxProps } from "@ledgerhq/react-ui/components/layout/Flex/index"; import { Status } from "../types"; const BorderFlex: StyledComponent<"div", DefaultTheme, FlexBoxProps> = styled(Flex).attrs({ diff --git a/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/Manual/SyncOnboardingCompanion.tsx b/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/Manual/SyncOnboardingCompanion.tsx index 4584d5ae3a42..7f971c163f38 100644 --- a/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/Manual/SyncOnboardingCompanion.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/Manual/SyncOnboardingCompanion.tsx @@ -26,6 +26,7 @@ import SeedStep, { SeedPathStatus } from "./SeedStep"; import { analyticsFlowName, StepText } from "./shared"; import OnboardingAppInstallStep from "../../OnboardingAppInstall"; import { getOnboardingStatePolling } from "@ledgerhq/live-common/hw/getOnboardingStatePolling"; +import { isAllowedOnboardingStatePollingErrorDmk } from "@ledgerhq/live-dmk"; import ContinueOnDeviceWithAnim from "./ContinueOnDeviceWithAnim"; import { RecoverState } from "~/renderer/screens/recover/Player"; import TrackPage from "~/renderer/analytics/TrackPage"; @@ -245,6 +246,7 @@ const SyncOnboardingCompanion: React.FC = ({ device: device || null, pollingPeriodMs: POLLING_PERIOD_MS, stopPolling: !isPollingOn, + allowedErrorChecks: [isAllowedOnboardingStatePollingErrorDmk], }); const handleDeviceReady = useCallback(() => { diff --git a/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/index.tsx b/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/index.tsx index 6b2a799de51a..ba2c19eed6c9 100644 --- a/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/index.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/SyncOnboarding/index.tsx @@ -8,13 +8,17 @@ import SyncOnboardingDeviceConnection, { import SyncOnboardingManual, { SyncOnboardingScreenProps } from "./Manual"; import CompletionScreen from "./Manual/CompletionScreen"; import { useKeepScreenAwake } from "~/renderer/hooks/useKeepScreenAwake"; +import { useDeviceSessionRefresherToggle } from "@ledgerhq/live-dmk"; +import { useFeature } from "@ledgerhq/live-common/featureFlags/index"; export type DeviceConnectionRouteProps = RouteComponentProps; export type ManualRouteProps = RouteComponentProps; const SyncOnboarding = () => { + const ldmkTransportFlag = useFeature("ldmkTransport"); const { path } = useRouteMatch(); useKeepScreenAwake(true); + useDeviceSessionRefresherToggle(ldmkTransportFlag?.enabled ?? false); return ( diff --git a/apps/ledger-live-desktop/src/renderer/components/TopBar/index.tsx b/apps/ledger-live-desktop/src/renderer/components/TopBar/index.tsx index 1c4b6948cbac..a2859f9363a9 100644 --- a/apps/ledger-live-desktop/src/renderer/components/TopBar/index.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/TopBar/index.tsx @@ -22,6 +22,7 @@ import { NotificationIndicator } from "~/renderer/components/TopBar/Notification import { setTrackingSource } from "~/renderer/analytics/TrackPage"; import { LiveAppDrawer } from "~/renderer/components/LiveAppDrawer"; import { IconsLegacy } from "@ledgerhq/react-ui"; + const Container = styled(Box).attrs(() => ({}))` height: ${p => p.theme.sizes.topBarHeight}px; box-sizing: content-box; diff --git a/apps/ledger-live-desktop/src/renderer/components/TranslatedError/TranslatedError.tsx b/apps/ledger-live-desktop/src/renderer/components/TranslatedError/TranslatedError.tsx index ff1f3740c390..75459be4631a 100644 --- a/apps/ledger-live-desktop/src/renderer/components/TranslatedError/TranslatedError.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/TranslatedError/TranslatedError.tsx @@ -5,6 +5,7 @@ import React, { useEffect, useMemo } from "react"; import { Trans, useTranslation } from "react-i18next"; +import { useFeature } from "@ledgerhq/live-common/featureFlags/index"; import logger from "~/renderer/logger"; import Text from "../Text"; import ExternalLink from "../ExternalLink"; @@ -35,6 +36,7 @@ function ErrorList({ translation }: ErrorListProps) { export function TranslatedError({ error, fallback, field = "title", noLink }: Props): JSX.Element { const { t } = useTranslation(); + const ldmkTransportFlag = useFeature("ldmkTransport"); const errorName = error?.name; @@ -65,7 +67,22 @@ export function TranslatedError({ error, fallback, field = "title", noLink }: Pr } }, [isValidError, error]); - if (!error || !isValidError) return <>; + if (!error || !isValidError) { + // NOTE: Temporary handling of DMK errors + if (ldmkTransportFlag?.enabled && error && "_tag" in error) { + if (field === "description") { + const errorMessage = + "originalError" in error + ? (error.originalError as Error).message + : (error._tag as string); + + return {errorMessage}; + } + return {error._tag as string}; + } + + return <>; + } if (!translation) { if (fallback) return <>{fallback}; diff --git a/apps/ledger-live-desktop/src/renderer/hooks/useListenToHidDevices.ts b/apps/ledger-live-desktop/src/renderer/hooks/useListenToHidDevices.ts index 3e9214316cc2..64708532fc6c 100644 --- a/apps/ledger-live-desktop/src/renderer/hooks/useListenToHidDevices.ts +++ b/apps/ledger-live-desktop/src/renderer/hooks/useListenToHidDevices.ts @@ -1,19 +1,24 @@ import { useEffect } from "react"; import { useDispatch } from "react-redux"; import { Subscription, Observable } from "rxjs"; +import { useFeature } from "@ledgerhq/live-common/featureFlags/index"; +import { useDeviceManagementKit, DeviceManagementKitTransport } from "@ledgerhq/live-dmk"; import { DeviceModelId } from "@ledgerhq/types-devices"; +import { IPCTransport } from "~/renderer/IPCTransport"; import { addDevice, removeDevice, resetDevices } from "~/renderer/actions/devices"; -import { IPCTransport } from "../IPCTransport"; export const useListenToHidDevices = () => { const dispatch = useDispatch(); + const ldmkFeatureFlag = useFeature("ldmkTransport"); + + const deviceManagementKit = useDeviceManagementKit(); + useEffect(() => { let sub: Subscription; - function syncDevices() { - const devices: { [key: string]: boolean } = {}; - sub = new Observable(IPCTransport.listen).subscribe( - ({ device, deviceModel, type, descriptor }) => { + function syncDevices() { + sub = new Observable(IPCTransport.listen).subscribe({ + next: ({ device, deviceModel, type, descriptor }) => { if (device) { const deviceId = descriptor || ""; const stateDevice = { @@ -23,32 +28,63 @@ export const useListenToHidDevices = () => { }; if (type === "add") { - devices[deviceId] = true; dispatch(addDevice(stateDevice)); } else if (type === "remove") { - delete devices[deviceId]; dispatch(removeDevice(stateDevice)); } } }, - () => { + error: () => { resetDevices(); syncDevices(); }, - () => { + complete: () => { resetDevices(); syncDevices(); }, - ); + }); + } + + function syncDevicesWithDmk() { + sub = new Observable(DeviceManagementKitTransport.listen).subscribe({ + next: ({ descriptor, device, deviceModel, type }) => { + if (device) { + const deviceId = descriptor || ""; + const stateDevice = { + deviceId, + modelId: deviceModel ? deviceModel.id : DeviceModelId.nanoS, + // TODO: Update the Transport.listen type whenever we switch to LDMK + // @ts-expect-error remapping type + wired: deviceModel?.type === "USB", + }; + if (type === "add") { + dispatch(addDevice(stateDevice)); + } else if (type === "remove") { + dispatch(removeDevice(stateDevice)); + } + } + }, + error: () => { + resetDevices(); + syncDevicesWithDmk(); + }, + complete: () => { + resetDevices(); + syncDevicesWithDmk(); + }, + }); } - const timeoutSyncDevices = setTimeout(syncDevices, 1000); + const fn = ldmkFeatureFlag?.enabled ? syncDevicesWithDmk : syncDevices; + + const timeoutSyncDevices = setTimeout(fn, 1000); return () => { + console.log("[[useListenToHidDevices]] cleanup"); clearTimeout?.(timeoutSyncDevices); sub?.unsubscribe?.(); }; - }, [dispatch]); + }, [dispatch, deviceManagementKit, ldmkFeatureFlag?.enabled]); return null; }; diff --git a/apps/ledger-live-desktop/src/renderer/live-common-setup.ts b/apps/ledger-live-desktop/src/renderer/live-common-setup.ts index ad5785d3468d..60b8865a49ad 100644 --- a/apps/ledger-live-desktop/src/renderer/live-common-setup.ts +++ b/apps/ledger-live-desktop/src/renderer/live-common-setup.ts @@ -2,8 +2,10 @@ import "~/live-common-setup-base"; import "~/live-common-set-supported-currencies"; import "./families"; +import { Store } from "redux"; import VaultTransport from "@ledgerhq/hw-transport-vault"; import { registerTransportModule } from "@ledgerhq/live-common/hw/index"; +import { getEnv } from "@ledgerhq/live-env"; import { retry } from "@ledgerhq/live-common/promise"; import { TraceContext, listen as listenLogs, trace } from "@ledgerhq/logs"; import { getUserId } from "~/helpers/user"; @@ -13,13 +15,7 @@ import logger from "./logger"; import { setDeviceMode } from "@ledgerhq/live-common/hw/actions/app"; import { getFeature } from "@ledgerhq/live-common/featureFlags/index"; import { overriddenFeatureFlagsSelector } from "~/renderer/reducers/settings"; -import { State } from "./reducers"; import { DeviceManagementKitTransport } from "@ledgerhq/live-dmk"; -import { getEnv } from "@ledgerhq/live-env"; - -interface Store { - getState: () => State; -} const isDeviceManagementKitEnabled = (store: Store) => { const state = store.getState(); diff --git a/apps/ledger-live-desktop/src/renderer/screens/USBTroubleshooting/solutions/shared.tsx b/apps/ledger-live-desktop/src/renderer/screens/USBTroubleshooting/solutions/shared.tsx index 9a310ca0d36b..1351d934a2ba 100644 --- a/apps/ledger-live-desktop/src/renderer/screens/USBTroubleshooting/solutions/shared.tsx +++ b/apps/ledger-live-desktop/src/renderer/screens/USBTroubleshooting/solutions/shared.tsx @@ -4,7 +4,7 @@ import Box from "~/renderer/components/Box"; import { Flex } from "@ledgerhq/react-ui"; import Text from "~/renderer/components/Text"; import ExternalLinkIcon from "~/renderer/icons/ExternalLink"; -import { FlexBoxProps } from "@ledgerhq/react-ui/components/layout/Flex"; +import { FlexBoxProps } from "@ledgerhq/react-ui/components/layout/Flex/index"; export const Wrapper = styled(Box).attrs({ alignItems: "center", diff --git a/apps/ledger-live-desktop/src/renderer/screens/manager/index.tsx b/apps/ledger-live-desktop/src/renderer/screens/manager/index.tsx index 48930472850e..4e634a82abbf 100644 --- a/apps/ledger-live-desktop/src/renderer/screens/manager/index.tsx +++ b/apps/ledger-live-desktop/src/renderer/screens/manager/index.tsx @@ -13,6 +13,8 @@ import Disconnected from "./Disconnected"; import { setLastSeenDevice } from "~/renderer/actions/settings"; import { useDispatch } from "react-redux"; import { context } from "~/renderer/drawers/Provider"; +import { useDeviceSessionRefresherToggle } from "@ledgerhq/live-dmk"; +import { useFeature } from "@ledgerhq/live-common/featureFlags/index"; const action = createAction(getEnv("MOCK") ? mockedEventEmitter : connectManager); const Manager = () => { @@ -20,6 +22,9 @@ const Manager = () => { const { setDrawer } = useContext(context); const [result, setResult] = useState(null); const [hasReset, setHasReset] = useState(false); + const ldmkTransportFlag = useFeature("ldmkTransport"); + useDeviceSessionRefresherToggle(ldmkTransportFlag?.enabled ?? false); + const onReset = useCallback( (apps?: string[] | null) => { setRestoreApps(apps ?? []); @@ -29,6 +34,7 @@ const Manager = () => { }, [setDrawer], ); + const dispatch = useDispatch(); const refreshDeviceInfo = useCallback(() => { if (result?.device) { @@ -47,7 +53,9 @@ const Manager = () => { }); } }, [result, dispatch]); - const onResult = useCallback((result: Result) => setResult(result), []); + const onResult = useCallback((result: Result) => { + setResult(result); + }, []); return ( <> diff --git a/apps/ledger-live-desktop/src/renderer/screens/market/components/DropDown.tsx b/apps/ledger-live-desktop/src/renderer/screens/market/components/DropDown.tsx index 28daa8fc715a..6ada322689df 100644 --- a/apps/ledger-live-desktop/src/renderer/screens/market/components/DropDown.tsx +++ b/apps/ledger-live-desktop/src/renderer/screens/market/components/DropDown.tsx @@ -4,12 +4,11 @@ import { useTheme } from "styled-components"; import SelectInput, { Props as SelectInputProps, } from "@ledgerhq/react-ui/components/form/SelectInput/index"; -import { Text, Flex as FlexBox } from "@ledgerhq/react-ui"; +import { Text, Flex as FlexBox, IconsLegacy } from "@ledgerhq/react-ui"; import { ValueContainer, MixedProps as ValueContainerProps, } from "@ledgerhq/react-ui/components/form/SelectInput/ValueContainer"; -import { ChevronBottomMedium, ChevronTopMedium } from "@ledgerhq/react-ui/assets/icons"; export type Props = SelectInputProps & { searchable?: boolean; @@ -31,7 +30,9 @@ function DropdownControl(props: ControlProps function DropdownValueContainer( props: ValueContainerProps & { label?: React.ReactNode }, ) { - const ChevronIcon = props.selectProps.menuIsOpen ? ChevronTopMedium : ChevronBottomMedium; + const ChevronIcon = props.selectProps.menuIsOpen + ? IconsLegacy.ChevronTopMedium + : IconsLegacy.ChevronBottomMedium; // @ts-expect-error This label prop is inherited from the original component props but it is not handled well in the react-select bindings const { label } = props.selectProps; diff --git a/apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/FeatureFlagsSettings/FeatureFlagDetails.tsx b/apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/FeatureFlagsSettings/FeatureFlagDetails.tsx index c7c429b6f623..e0ab5a216ff3 100644 --- a/apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/FeatureFlagsSettings/FeatureFlagDetails.tsx +++ b/apps/ledger-live-desktop/src/renderer/screens/settings/sections/Developer/FeatureFlagsSettings/FeatureFlagDetails.tsx @@ -5,7 +5,7 @@ import { FeatureId } from "@ledgerhq/types-live"; import Box from "~/renderer/components/Box"; import FeatureFlagEdit from "./FeatureFlagEdit"; import styled, { DefaultTheme, StyledComponent } from "styled-components"; -import { FlexBoxProps } from "@ledgerhq/react-ui/components/layout/Flex"; +import { FlexBoxProps } from "@ledgerhq/react-ui/components/layout/Flex/index"; import { useTranslation } from "react-i18next"; type Props = { diff --git a/apps/ledger-live-desktop/tsconfig.json b/apps/ledger-live-desktop/tsconfig.json index 2b0a1aeeae9d..27ba5626ad90 100644 --- a/apps/ledger-live-desktop/tsconfig.json +++ b/apps/ledger-live-desktop/tsconfig.json @@ -3,10 +3,11 @@ "compilerOptions": { "allowJs": false, "composite": true, - "module": "es2020", "jsx": "react", "lib": ["ES2021", "dom"], "target": "esnext", + "module": "ESNext", + "moduleResolution": "bundler", "baseUrl": ".", "rootDir": ".", "paths": { diff --git a/apps/ledger-live-mobile/e2e/setup.ts b/apps/ledger-live-mobile/e2e/setup.ts index dd9513e3e02a..9e9dcc822f3d 100644 --- a/apps/ledger-live-mobile/e2e/setup.ts +++ b/apps/ledger-live-mobile/e2e/setup.ts @@ -2,7 +2,7 @@ import { device } from "detox"; import * as serverBridge from "./bridge/server"; import fs from "fs"; import { getState } from "expect"; -import { MatcherState } from "expect/build/types"; +import { MatcherState } from "expect"; import { format } from "date-fns"; import { launchApp, deleteSpeculos } from "./helpers"; import { closeProxy } from "./bridge/proxy"; diff --git a/apps/ledger-live-mobile/src/components/InfoModal.tsx b/apps/ledger-live-mobile/src/components/InfoModal.tsx index b001a707cfed..296acf37014e 100644 --- a/apps/ledger-live-mobile/src/components/InfoModal.tsx +++ b/apps/ledger-live-mobile/src/components/InfoModal.tsx @@ -4,7 +4,7 @@ import { Trans } from "react-i18next"; import { useTheme } from "styled-components/native"; import { IconsLegacy, IconBox, Flex } from "@ledgerhq/native-ui"; -import type { Props as IconBoxProps } from "@ledgerhq/native-ui/components/Icon/IconBox"; +import type { Props as IconBoxProps } from "@ledgerhq/native-ui/components/Icon/IconBox/index"; import QueuedDrawer from "./QueuedDrawer"; import LText from "./LText"; import IconArrowRight from "~/icons/ArrowRight"; diff --git a/apps/ledger-live-mobile/src/components/Switch.tsx b/apps/ledger-live-mobile/src/components/Switch.tsx index 4de66a2e9cdc..4e8989030a16 100644 --- a/apps/ledger-live-mobile/src/components/Switch.tsx +++ b/apps/ledger-live-mobile/src/components/Switch.tsx @@ -1,6 +1,6 @@ import React from "react"; import { Switch as RNSwitch } from "@ledgerhq/native-ui"; -import type { SwitchProps as RNSwitchProps } from "@ledgerhq/native-ui/components/Form/Switch"; +import type { SwitchProps as RNSwitchProps } from "@ledgerhq/native-ui/components/Form/Switch/index"; type SwitchProps = { value: boolean; diff --git a/apps/ledger-live-mobile/src/families/polkadot/NominateFlow/01-Validators.tsx b/apps/ledger-live-mobile/src/families/polkadot/NominateFlow/01-Validators.tsx index 97da803cba85..b691fbcbc2ac 100644 --- a/apps/ledger-live-mobile/src/families/polkadot/NominateFlow/01-Validators.tsx +++ b/apps/ledger-live-mobile/src/families/polkadot/NominateFlow/01-Validators.tsx @@ -27,7 +27,7 @@ import { MAX_NOMINATIONS, hasMinimumBondBalance, } from "@ledgerhq/live-common/families/polkadot/logic"; -import { PolkadotValidatorsRequired } from "@ledgerhq/live-common/families/polkadot/errors"; +import * as PolkadotErrors from "@ledgerhq/live-common/families/polkadot/errors"; import { usePolkadotPreloadData, useSortedValidators, @@ -245,8 +245,9 @@ function NominateSelectValidator({ navigation, route }: Props) { const error = getFirstStatusError(status, "errors"); const warning = getFirstStatusError(status, "warnings"); const maxSelected = validators.length === MAX_NOMINATIONS; - const maybeChill = error instanceof PolkadotValidatorsRequired; - const ignoreError = error instanceof PolkadotValidatorsRequired && !nominations.length; + const maybeChill = error instanceof PolkadotErrors.PolkadotValidatorsRequired; + const ignoreError = + error instanceof PolkadotErrors.PolkadotValidatorsRequired && !nominations.length; // Do not show error on first nominate return ( = (tx: T) => T; diff --git a/apps/ledger-live-mobile/src/newArch/features/WalletSync/components/Error/Detailed.tsx b/apps/ledger-live-mobile/src/newArch/features/WalletSync/components/Error/Detailed.tsx index 7b9a52611b89..a9a4d3aaa542 100644 --- a/apps/ledger-live-mobile/src/newArch/features/WalletSync/components/Error/Detailed.tsx +++ b/apps/ledger-live-mobile/src/newArch/features/WalletSync/components/Error/Detailed.tsx @@ -2,7 +2,7 @@ import React from "react"; import { Flex, Text, Button, Link, Box } from "@ledgerhq/native-ui"; import { AnalyticsPage } from "../../hooks/useLedgerSyncAnalytics"; import TrackScreen from "~/analytics/TrackScreen"; -import { ButtonProps } from "@ledgerhq/native-ui/components/cta/Button"; +import { ButtonProps } from "@ledgerhq/native-ui/components/cta/Button/index"; import styled from "styled-components/native"; interface Props { diff --git a/apps/ledger-live-mobile/src/newArch/features/WalletSync/hooks/useSpecificError.tsx b/apps/ledger-live-mobile/src/newArch/features/WalletSync/hooks/useSpecificError.tsx index 7a55245e17b4..c6519dab68e1 100644 --- a/apps/ledger-live-mobile/src/newArch/features/WalletSync/hooks/useSpecificError.tsx +++ b/apps/ledger-live-mobile/src/newArch/features/WalletSync/hooks/useSpecificError.tsx @@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next"; import { useTheme } from "styled-components/native"; import { AnalyticsButton, AnalyticsPage, useLedgerSyncAnalytics } from "./useLedgerSyncAnalytics"; -import { ButtonProps } from "@ledgerhq/native-ui/components/cta/Button"; +import { ButtonProps } from "@ledgerhq/native-ui/components/cta/Button/index"; export enum ErrorReason { UNSECURED = "unsecured", diff --git a/libs/coin-framework/package.json b/libs/coin-framework/package.json index 8632cb65d7c2..397567215e80 100644 --- a/libs/coin-framework/package.json +++ b/libs/coin-framework/package.json @@ -114,10 +114,10 @@ }, "scripts": { "clean": "rm -rf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-framework/tsconfig.json b/libs/coin-framework/tsconfig.json index 68292ddbbfbc..f7577da957e6 100644 --- a/libs/coin-framework/tsconfig.json +++ b/libs/coin-framework/tsconfig.json @@ -3,12 +3,11 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", "exactOptionalPropertyTypes": true, "typeRoots": ["./types", "./node_modules/@types"] }, - "include": ["src/**/*"] + "include": ["src/**/*", "types/*.d.ts"] } diff --git a/libs/coin-framework/types/bip32-path.d.ts b/libs/coin-framework/types/bip32-path.d.ts index 9e38dee76f6c..17d98abe58d9 100644 --- a/libs/coin-framework/types/bip32-path.d.ts +++ b/libs/coin-framework/types/bip32-path.d.ts @@ -1,5 +1,7 @@ -export type BIPPath = { - toPathArray: () => Array; -}; +declare module "bip32-path" { + export type BIPPath = { + toPathArray: () => Array; + }; -export function fromString(string): BIPPath; + export function fromString(string): BIPPath; +} diff --git a/libs/coin-modules/coin-algorand/package.json b/libs/coin-modules/coin-algorand/package.json index d6a9c664b9d6..e5d43fe0b1b9 100644 --- a/libs/coin-modules/coin-algorand/package.json +++ b/libs/coin-modules/coin-algorand/package.json @@ -71,11 +71,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-algorand.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-algorand/tsconfig.json b/libs/coin-modules/coin-algorand/tsconfig.json index 21115c32c1d9..a2f8cb09d8e5 100644 --- a/libs/coin-modules/coin-algorand/tsconfig.json +++ b/libs/coin-modules/coin-algorand/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-bitcoin/package.json b/libs/coin-modules/coin-bitcoin/package.json index b254431c2e9f..17a63a835af4 100644 --- a/libs/coin-modules/coin-bitcoin/package.json +++ b/libs/coin-modules/coin-bitcoin/package.json @@ -76,7 +76,7 @@ "devDependencies": { "@types/bchaddrjs": "^0.4.3", "@types/bs58": "^4.0.1", - "@types/bs58check": "^2.1.0", + "@types/bs58check": "^2.1.2", "@types/cashaddrjs": "^0.3.3", "@types/create-hmac": "^1.1.3", "@types/invariant": "^2.2.2", @@ -96,11 +96,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-bitcoin.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-bitcoin/tsconfig.json b/libs/coin-modules/coin-bitcoin/tsconfig.json index 99c248047e52..0bae9e5da380 100644 --- a/libs/coin-modules/coin-bitcoin/tsconfig.json +++ b/libs/coin-modules/coin-bitcoin/tsconfig.json @@ -3,12 +3,11 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", "exactOptionalPropertyTypes": true, "typeRoots": ["./types", "./node_modules/@types"] }, - "include": ["src/**/*"], + "include": ["src/**/*", "types.d.ts"], } diff --git a/libs/coin-modules/coin-bitcoin/types.d.ts b/libs/coin-modules/coin-bitcoin/types.d.ts new file mode 100644 index 000000000000..82ae420aa012 --- /dev/null +++ b/libs/coin-modules/coin-bitcoin/types.d.ts @@ -0,0 +1,3 @@ +declare module "coininfo"; +declare module "blake-hash"; +declare module "bs58check/base"; diff --git a/libs/coin-modules/coin-cardano/package.json b/libs/coin-modules/coin-cardano/package.json index 45243b3f8e6e..60699f28810d 100644 --- a/libs/coin-modules/coin-cardano/package.json +++ b/libs/coin-modules/coin-cardano/package.json @@ -78,11 +78,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-cardano.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-cardano/tsconfig.json b/libs/coin-modules/coin-cardano/tsconfig.json index cdb8be8ecb97..cc52019a8f1a 100644 --- a/libs/coin-modules/coin-cardano/tsconfig.json +++ b/libs/coin-modules/coin-cardano/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib" diff --git a/libs/coin-modules/coin-cosmos/package.json b/libs/coin-modules/coin-cosmos/package.json index 6b163f90f712..95d3fc834cee 100644 --- a/libs/coin-modules/coin-cosmos/package.json +++ b/libs/coin-modules/coin-cosmos/package.json @@ -80,11 +80,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-algorand.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-cosmos/tsconfig.json b/libs/coin-modules/coin-cosmos/tsconfig.json index f56b01ccd35e..642f99f519f6 100644 --- a/libs/coin-modules/coin-cosmos/tsconfig.json +++ b/libs/coin-modules/coin-cosmos/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-elrond/package.json b/libs/coin-modules/coin-elrond/package.json index 202ce1ccb557..7bf9c25419a1 100644 --- a/libs/coin-modules/coin-elrond/package.json +++ b/libs/coin-modules/coin-elrond/package.json @@ -71,11 +71,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-multiversx.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-elrond/tsconfig.json b/libs/coin-modules/coin-elrond/tsconfig.json index 4f2d5dbec02a..aa8d04818720 100644 --- a/libs/coin-modules/coin-elrond/tsconfig.json +++ b/libs/coin-modules/coin-elrond/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "rootDir": "./src", diff --git a/libs/coin-modules/coin-evm/docs/types.md b/libs/coin-modules/coin-evm/docs/types.md index 24c0c7594a14..80c1c465fb6d 100644 --- a/libs/coin-modules/coin-evm/docs/types.md +++ b/libs/coin-modules/coin-evm/docs/types.md @@ -3,16 +3,17 @@ ## Files #### editTransaction + Set of types proper to the functionality of the replace by fee mechanism. #### etherscan + Set of types proper to etherscan explorers. Mostly containing their own transaction format, received from their API. Also used for Blockscout explorers and any other explorer having a compatiblity layer with Etherscan. #### ledger -Set of types proper to ledger explorers. Mostly containing their own transaction format, received from their API. -#### signer -Set of types for the abstraction added to remove the dependency of the `coin-evm` module with the `@ledgerhq/hw-app-eth` module (as a dependency, not devDependency which is necessary for some types). Mostly used in the bridge definition with the `buildSignOperation` & `makeAccountBridgeReceive` methods. +Set of types proper to ledger explorers. Mostly containing their own transaction format, received from their API. #### transaction -Set of types representing the `evm` family transactions, specific to Ledger Live and/or the `@ledgerhq/coin-framework` \ No newline at end of file + +Set of types representing the `evm` family transactions, specific to Ledger Live and/or the `@ledgerhq/coin-framework` diff --git a/libs/coin-modules/coin-evm/package.json b/libs/coin-modules/coin-evm/package.json index a405a2d9d15a..b2acf592c320 100644 --- a/libs/coin-modules/coin-evm/package.json +++ b/libs/coin-modules/coin-evm/package.json @@ -45,11 +45,11 @@ "license": "Apache-2.0", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-evm.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", @@ -103,4 +103,4 @@ "prando": "^6.0.1", "ts-jest": "^29.1.1" } -} \ No newline at end of file +} diff --git a/libs/coin-modules/coin-evm/src/__tests__/unit/hw-getAddress.unit.test.ts b/libs/coin-modules/coin-evm/src/__tests__/unit/hw-getAddress.unit.test.ts index c6bbff617ead..54614ea51c64 100644 --- a/libs/coin-modules/coin-evm/src/__tests__/unit/hw-getAddress.unit.test.ts +++ b/libs/coin-modules/coin-evm/src/__tests__/unit/hw-getAddress.unit.test.ts @@ -1,6 +1,6 @@ import eip55 from "eip55"; import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies"; -import type { EvmSigner } from "../../types/signer"; +import type { EvmSigner } from "@ledgerhq/types-live"; import resolver from "../../hw-getAddress"; const address = "0xc3f95102D5c8F2c83e49Ce3Acfb905eDfb7f37dE"; diff --git a/libs/coin-modules/coin-evm/src/__tests__/unit/signOperation.unit.test.ts b/libs/coin-modules/coin-evm/src/__tests__/unit/signOperation.unit.test.ts index b2e7ada8790b..a749810711c3 100644 --- a/libs/coin-modules/coin-evm/src/__tests__/unit/signOperation.unit.test.ts +++ b/libs/coin-modules/coin-evm/src/__tests__/unit/signOperation.unit.test.ts @@ -1,5 +1,5 @@ import BigNumber from "bignumber.js"; -import { Account } from "@ledgerhq/types-live"; +import type { Account, EvmSigner } from "@ledgerhq/types-live"; import { CryptoCurrency } from "@ledgerhq/types-cryptoassets"; import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets"; import { SignerContext } from "@ledgerhq/coin-framework/signer"; @@ -8,7 +8,6 @@ import { makeAccount } from "../fixtures/common.fixtures"; import { buildSignOperation } from "../../signOperation"; import { DEFAULT_NONCE } from "../../createTransaction"; import * as nodeApi from "../../api/node/rpc.common"; -import type { EvmSigner } from "../../types/signer"; import { getEstimatedFees } from "../../logic"; import { getCoinConfig } from "../../config"; diff --git a/libs/coin-modules/coin-evm/src/bridge/js.ts b/libs/coin-modules/coin-evm/src/bridge/js.ts index e172692de82c..6359023cebc2 100644 --- a/libs/coin-modules/coin-evm/src/bridge/js.ts +++ b/libs/coin-modules/coin-evm/src/bridge/js.ts @@ -6,7 +6,7 @@ import { makeScanAccounts, } from "@ledgerhq/coin-framework/bridge/jsHelpers"; import { SignerContext } from "@ledgerhq/coin-framework/signer"; -import type { AccountBridge, Bridge, CurrencyBridge } from "@ledgerhq/types-live"; +import type { AccountBridge, Bridge, CurrencyBridge, EvmSigner } from "@ledgerhq/types-live"; import getAddressWrapper from "@ledgerhq/coin-framework/bridge/getAddressWrapper"; import type { Transaction as EvmTransaction } from "../types/index"; import { estimateMaxSpendable } from "../estimateMaxSpendable"; @@ -16,7 +16,6 @@ import { setCoinConfig, type CoinConfig } from "../config"; import { prepareTransaction } from "../prepareTransaction"; import { createTransaction } from "../createTransaction"; import { buildSignOperation } from "../signOperation"; -import type { EvmSigner } from "../types/signer"; import { hydrate, preload } from "../preload"; import nftResolvers from "../nftResolvers"; import { broadcast } from "../broadcast"; diff --git a/libs/coin-modules/coin-evm/src/hw-getAddress.ts b/libs/coin-modules/coin-evm/src/hw-getAddress.ts index 444ca947f2c4..0ff42d28b63d 100644 --- a/libs/coin-modules/coin-evm/src/hw-getAddress.ts +++ b/libs/coin-modules/coin-evm/src/hw-getAddress.ts @@ -2,7 +2,7 @@ import eip55 from "eip55"; import { SignerContext } from "@ledgerhq/coin-framework/signer"; import { GetAddressOptions } from "@ledgerhq/coin-framework/derivation"; import { GetAddressFn } from "@ledgerhq/coin-framework/bridge/getAddressWrapper"; -import { EvmSigner } from "./types/signer"; +import type { EvmSigner } from "@ledgerhq/types-live"; const resolver = (signerContext: SignerContext): GetAddressFn => { return async (deviceId: string, { path, verify, currency }: GetAddressOptions) => { diff --git a/libs/coin-modules/coin-evm/src/hw-signMessage.ts b/libs/coin-modules/coin-evm/src/hw-signMessage.ts index ea72c40bbc91..05ca14769c9a 100644 --- a/libs/coin-modules/coin-evm/src/hw-signMessage.ts +++ b/libs/coin-modules/coin-evm/src/hw-signMessage.ts @@ -1,8 +1,13 @@ import { ethers } from "ethers"; import { SignerContext } from "@ledgerhq/coin-framework/signer"; import { isEIP712Message } from "@ledgerhq/evm-tools/message/EIP712/index"; -import { Account, AnyMessage, DeviceId, TypedEvmMessage } from "@ledgerhq/types-live"; -import { EvmSigner } from "./types/signer"; +import type { + Account, + AnyMessage, + DeviceId, + EvmSigner, + TypedEvmMessage, +} from "@ledgerhq/types-live"; export const prepareMessageToSign = ({ message }: { message: string }): TypedEvmMessage => { const parsedMessage = ((): string | Record => { diff --git a/libs/coin-modules/coin-evm/src/signOperation.ts b/libs/coin-modules/coin-evm/src/signOperation.ts index 94bb97911d4a..893668ab24c2 100644 --- a/libs/coin-modules/coin-evm/src/signOperation.ts +++ b/libs/coin-modules/coin-evm/src/signOperation.ts @@ -1,11 +1,10 @@ import { Observable } from "rxjs"; import { getEnv } from "@ledgerhq/live-env"; -import { AccountBridge } from "@ledgerhq/types-live"; +import type { AccountBridge, EvmSignature, EvmSigner } from "@ledgerhq/types-live"; import { SignerContext } from "@ledgerhq/coin-framework/signer"; import { isNFTActive } from "@ledgerhq/coin-framework/nft/support"; import type { LoadConfig, ResolutionConfig } from "@ledgerhq/hw-app-eth/lib/services/types"; import { buildOptimisticOperation } from "./buildOptimisticOperation"; -import { EvmSignature, EvmSigner } from "./types/signer"; import { prepareForSignOperation } from "./prepareTransaction"; import { getSerializedTransaction } from "./transaction"; import { Transaction } from "./types"; diff --git a/libs/coin-modules/coin-evm/src/types/signer.ts b/libs/coin-modules/coin-evm/src/types/signer.ts deleted file mode 100644 index f3bd69b9937c..000000000000 --- a/libs/coin-modules/coin-evm/src/types/signer.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type Eth from "@ledgerhq/hw-app-eth"; - -export type EvmAddress = { - publicKey: string; - address: string; - chainCode?: string; -}; - -export type EvmSignature = { - s: string; - v: string | number; - r: string; -}; - -export interface EvmSigner extends Eth {} diff --git a/libs/coin-modules/coin-evm/tsconfig.json b/libs/coin-modules/coin-evm/tsconfig.json index a9222355c0e4..e2a51c361d12 100644 --- a/libs/coin-modules/coin-evm/tsconfig.json +++ b/libs/coin-modules/coin-evm/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-filecoin/build.mjs b/libs/coin-modules/coin-filecoin/build.mjs new file mode 100644 index 000000000000..ff1f61d9485d --- /dev/null +++ b/libs/coin-modules/coin-filecoin/build.mjs @@ -0,0 +1,71 @@ +#!/usr/bin/env zx +/* eslint-disable no-undef */ +import "zx/globals"; + +import * as esbuild from "esbuild"; + +const config = { + entryPoints: ["src/**/*"], + minify: true, + bundle: false, + treeShaking: true, + sourcemap: true, + color: true, + loader: { + ".json": "copy", + }, +}; + +const buildEsm = async () => { + console.log(chalk.blue("Building esm...")); + await esbuild.build({ + ...config, + outdir: "lib/esm", + format: "esm", + platform: "browser", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/esm/package.json`; + }); + }, + }, + ], + }); +}; + +const buildCjs = async () => { + console.log(chalk.blue("Building cjs...")); + await esbuild.build({ + ...config, + outdir: "lib/cjs", + format: "cjs", + platform: "node", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/cjs/package.json`; + }); + }, + }, + ], + }); +}; + +const buildTypes = async dir => { + console.log(chalk.blue("Building types...")); + await $`tsc --emitDeclarationOnly --outDir ${dir} --moduleResolution bundler -m esnext`; +}; + +const main = async () => { + return Promise.all([buildEsm(), buildCjs(), buildTypes("lib/types")]); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/libs/coin-modules/coin-filecoin/package.json b/libs/coin-modules/coin-filecoin/package.json index 7460a470a50b..2f660008cb69 100644 --- a/libs/coin-modules/coin-filecoin/package.json +++ b/libs/coin-modules/coin-filecoin/package.json @@ -20,76 +20,66 @@ "publishConfig": { "access": "public" }, - "typesVersions": { - "*": { - "lib/*": [ - "lib/*" - ], - "lib-es/*": [ - "lib-es/*" - ], - "specs": [ - "lib/test/bot-specs" - ], - "*": [ - "lib/*", - "lib/api/*", - "lib/bridge/*", - "lib/common-logic/*", - "lib/signer/*", - "lib/test/*", - "lib/types/*" - ] - } - }, "exports": { - "./lib/*": "./lib/*.js", - "./lib-es/*": "./lib-es/*.js", "./api": { - "require": "./lib/api/index.js", - "default": "./lib-es/api/index.js" + "types": "./lib/types/api/index.d.ts", + "require": "./lib/cjs/api/index.js", + "default": "./lib/esm/api/index.js" }, "./deviceTransactionConfig": { - "require": "./lib/bridge/deviceTransactionConfig.js", - "default": "./lib-es/bridge/deviceTransactionConfig.js" + "types": "./lib/types/bridge/deviceTransactionConfig.d.ts", + "require": "./lib/cjs/bridge/deviceTransactionConfig.js", + "default": "./lib/esm/bridge/deviceTransactionConfig.js" }, "./erc20": { - "require": "./lib/erc20/tokenAccounts.js", - "default": "./lib-es/erc20/tokenAccounts.js" + "types": "./lib/types/erc20/tokenAccounts.d.ts", + "require": "./lib/cjs/erc20/tokenAccounts.js", + "default": "./lib/esm/erc20/tokenAccounts.js" }, "./logic": { - "require": "./lib/common-logic/index.js", - "default": "./lib-es/common-logic/index.js" + "types": "./lib/types/common-logic/index.d.ts", + "require": "./lib/cjs/common-logic/index.js", + "default": "./lib/esm/common-logic/index.js" }, "./network": { - "require": "./lib/network/index.js", - "default": "./lib-es/network/index.js" + "types": "./lib/types/network/index.d.ts", + "require": "./lib/cjs/network/index.js", + "default": "./lib/esm/network/index.js" }, "./signer": { - "require": "./lib/signer/index.js", - "default": "./lib-es/signer/index.js" + "types": "./lib/types/signer/index.d.ts", + "require": "./lib/cjs/signer/index.js", + "default": "./lib/esm/signer/index.js" }, "./specs": { - "require": "./lib/test/bot-specs.js", - "default": "./lib-es/test/bot-specs.js" + "types": "./lib/types/test/bot-specs.d.ts", + "require": "./lib/cjs/test/bot-specs.js", + "default": "./lib/esm/test/bot-specs.js" }, "./transaction": { - "require": "./lib/bridge/transaction.js", - "default": "./lib-es/bridge/transaction.js" + "types": "./lib/types/bridge/transaction.d.ts", + "require": "./lib/cjs/bridge/transaction.js", + "default": "./lib/esm/bridge/transaction.js" }, "./types": { - "require": "./lib/types/index.js", - "default": "./lib-es/types/index.js" + "types": "./lib/types/index.d.ts", + "require": "./lib/cjs/types/index.js", + "default": "./lib/esm/types/index.js" }, "./*": { - "require": "./lib/*.js", - "default": "./lib-es/*.js" + "types": "./lib/types/*.js", + "require": "./lib/cjs/*.js", + "default": "./lib/esm/*.js" }, ".": { - "require": "./lib/index.js", - "default": "./lib-es/index.js" + "types": "./lib/types/index.d.ts", + "require": "./lib/cjs/index.js", + "default": "./lib/esm/index.js" }, - "./package.json": "./package.json" + "./package.json": { + "require": "./lib/cjs/package.json", + "default": "./lib/esm/package.json" + } }, "license": "Apache-2.0", "dependencies": { @@ -115,17 +105,19 @@ "@types/jest": "^29.5.10", "@types/lodash": "^4.14.191", "@types/semver": "^7.5.8", + "axios": "1.7.7", + "esbuild": "0.24.2", "jest": "^29.7.0", - "ts-jest": "^29.1.1", - "axios": "1.7.7" + "ts-jest": "^29.1.1" }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "zx build.mjs", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-filecoin.json", "prewatch": "pnpm build", - "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch": "zx watch.mjs", + "watch:es": "zx watch.mjs --platform esm", + "watch:cjs": "zx watch.mjs --platform cjs", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-filecoin/tsconfig.json b/libs/coin-modules/coin-filecoin/tsconfig.json index fadfabce52da..d9119680ae7b 100644 --- a/libs/coin-modules/coin-filecoin/tsconfig.json +++ b/libs/coin-modules/coin-filecoin/tsconfig.json @@ -3,12 +3,13 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "rootDir": "./src", "outDir": "lib", - "exactOptionalPropertyTypes": true + "exactOptionalPropertyTypes": true, + "module": "esnext", + "moduleResolution": "bundler" }, "include": ["src/**/*", "deviceTransactionConfig.ts", "transaction.ts"] } \ No newline at end of file diff --git a/libs/coin-modules/coin-filecoin/watch.mjs b/libs/coin-modules/coin-filecoin/watch.mjs new file mode 100644 index 000000000000..870f5e1a5965 --- /dev/null +++ b/libs/coin-modules/coin-filecoin/watch.mjs @@ -0,0 +1,86 @@ +#!/usr/bin/env zx +/* eslint-disable no-undef */ +import "zx/globals"; + +import * as esbuild from "esbuild"; + +const { platform } = argv; + +const config = { + entryPoints: ["src/**/*"], + minify: true, + bundle: false, + treeShaking: true, + sourcemap: true, + color: true, + loader: { + ".json": "copy", + }, +}; + +const getEsmContext = async () => { + console.log(chalk.blue("Getting esm context...")); + + return esbuild.context({ + ...config, + outdir: "lib/esm", + format: "esm", + platform: "browser", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/esm/package.json`; + }); + }, + }, + ], + }); +}; + +const getCjsContext = async () => { + console.log(chalk.blue("Getting cjs context...")); + + return esbuild.context({ + ...config, + outdir: "lib/cjs", + format: "cjs", + platform: "node", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/cjs/package.json`; + }); + }, + }, + ], + }); +}; + +const watchTypes = async () => { + await $`tsc --watch --emitDeclarationOnly --outDir lib/types --moduleResolution bundler -m esnext`; +}; + +const watch = async () => { + const esmContext = await getEsmContext(); + const cjsContext = await getCjsContext(); + + if (platform === "esm") { + console.log(chalk.blue("Watching esm...")); + await Promise.all([esmContext.watch(), watchTypes()]); + } else if (platform === "cjs") { + console.log(chalk.blue("Watching cjs...")); + await Promise.all([cjsContext.watch(), watchTypes()]); + } else { + console.log(chalk.blue("Watching all...")); + await Promise.all([esmContext.watch(), cjsContext.watch(), watchTypes()]); + } +}; + +watch().catch(error => { + console.error(error); + process.exitCode = error?.exitCode ?? 1; +}); diff --git a/libs/coin-modules/coin-hedera/build.mjs b/libs/coin-modules/coin-hedera/build.mjs new file mode 100644 index 000000000000..784175613b62 --- /dev/null +++ b/libs/coin-modules/coin-hedera/build.mjs @@ -0,0 +1,69 @@ +#!/usr/bin/env zx +/* eslint-disable no-undef */ +import "zx/globals"; + +import * as esbuild from "esbuild"; + +let config = { + entryPoints: ["src/**/*"], + minify: true, + bundle: false, + treeShaking: true, + sourcemap: true, + color: true, + loader: { + ".json": "copy", + }, +}; + +const buildEsm = async () => { + console.log(chalk.blue("Building esm...")); + await esbuild.build({ + ...config, + outdir: "lib/esm", + format: "esm", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/esm/package.json`; + }); + }, + }, + ], + }); +}; + +const buildCjs = async () => { + console.log(chalk.blue("Building cjs...")); + await esbuild.build({ + ...config, + outdir: "lib/cjs", + format: "cjs", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/cjs/package.json`; + }); + }, + }, + ], + }); +}; + +const buildTypes = async () => { + console.log(chalk.blue("Building types...")); + await $`tsc --emitDeclarationOnly --outDir lib/types`; +}; + +const main = async () => { + return Promise.all([buildEsm(), buildCjs(), buildTypes()]); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/libs/coin-modules/coin-hedera/package.json b/libs/coin-modules/coin-hedera/package.json index bf8df986dc33..b25085eec580 100644 --- a/libs/coin-modules/coin-hedera/package.json +++ b/libs/coin-modules/coin-hedera/package.json @@ -20,90 +20,72 @@ "publishConfig": { "access": "public" }, - "typesVersions": { - "*": { - "lib/*": [ - "lib/*" - ], - "lib-es/*": [ - "lib-es/*" - ], - "specs": [ - "lib/test/bot-specs" - ], - "*": [ - "lib/*" - ] - } - }, "exports": { - "./lib/*": "./lib/*.js", - "./lib-es/*": "./lib-es/*.js", - "./api": { - "require": "./lib/api/index.js", - "default": "./lib-es/api/index.js" - }, - "./deviceTransactionConfig": { - "require": "./lib/deviceTransactionConfig.js", - "default": "./lib-es/deviceTransactionConfig.js" - }, + "./lib/*": "./lib/cjs/*.js", + "./lib-es/*": "./lib/esm/*.js", "./signer": { - "require": "./lib/signer/index.js", - "default": "./lib-es/signer/index.js" + "types": "./lib/types/signer/index.d.ts", + "import": "./lib/esm/signer/index.js", + "require": "./lib/cjs/signer/index.js" }, "./specs": { - "require": "./lib/test/bot-specs.js", - "default": "./lib-es/test/bot-specs.js" - }, - "./transaction": { - "require": "./lib/transaction.js", - "default": "./lib-es/transaction.js" + "types": "./lib/types/test/bot-specs.d.ts", + "import": "./lib/esm/test/bot-specs.js", + "require": "./lib/cjs/test/bot-specs.js" }, "./types": { - "require": "./lib/types/index.js", - "default": "./lib-es/types/index.js" + "types": "./lib/types/types/index.d.ts", + "import": "./lib/esm/types/index.js", + "require": "./lib/cjs/types/index.js" }, "./*": { - "require": "./lib/*.js", - "default": "./lib-es/*.js" + "types": "./lib/types/*.d.ts", + "import": "./lib/esm/*.js", + "require": "./lib/cjs/*.js" }, ".": { - "require": "./lib/index.js", - "default": "./lib-es/index.js" + "types": "./lib/types/index.d.ts", + "import": "./lib/esm/index.js", + "require": "./lib/cjs/index.js" }, - "./package.json": "./package.json" + "./package.json": { + "require": "./lib/cjs/package.json", + "default": "./lib/esm/package.json" + } }, "license": "Apache-2.0", "dependencies": { + "@hashgraph/sdk": "2.14.2", "@ledgerhq/coin-framework": "workspace:^", "@ledgerhq/cryptoassets": "workspace:^", "@ledgerhq/devices": "workspace:^", "@ledgerhq/errors": "workspace:^", + "@ledgerhq/live-countervalues": "workspace:^", "@ledgerhq/live-env": "workspace:^", "@ledgerhq/live-network": "workspace:^", "@ledgerhq/types-live": "workspace:^", - "@ledgerhq/live-countervalues": "workspace:^", - "@hashgraph/sdk": "2.14.2", + "bignumber.js": "^9.1.2", "expect": "^27.4.6", "invariant": "^2.2.2", "lodash": "^4.17.21", - "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, "devDependencies": { "@types/invariant": "^2.2.2", "@types/jest": "^29.5.10", "@types/lodash": "^4.14.191", + "esbuild": "0.24.2", "jest": "^29.7.0", "ts-jest": "^29.1.1" }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "zx build.mjs", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-hedera.json", "prewatch": "pnpm build", - "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch": "zx watch.mjs", + "watch:es": "zx watch.mjs --platform esm", + "watch:cjs": "zx watch.mjs --platform cjs", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-hedera/tsconfig.json b/libs/coin-modules/coin-hedera/tsconfig.json index ce2830f2c5dd..92045b430b30 100644 --- a/libs/coin-modules/coin-hedera/tsconfig.json +++ b/libs/coin-modules/coin-hedera/tsconfig.json @@ -3,12 +3,11 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], - "outDir": "lib", - "exactOptionalPropertyTypes": true + "exactOptionalPropertyTypes": true, + "module": "esnext", + "moduleResolution": "bundler", }, - "include": ["src/**/*", "deviceTransactionConfig.ts", "transaction.ts"] + "include": ["src/**/*"] } - \ No newline at end of file diff --git a/libs/coin-modules/coin-hedera/watch.mjs b/libs/coin-modules/coin-hedera/watch.mjs new file mode 100644 index 000000000000..870f5e1a5965 --- /dev/null +++ b/libs/coin-modules/coin-hedera/watch.mjs @@ -0,0 +1,86 @@ +#!/usr/bin/env zx +/* eslint-disable no-undef */ +import "zx/globals"; + +import * as esbuild from "esbuild"; + +const { platform } = argv; + +const config = { + entryPoints: ["src/**/*"], + minify: true, + bundle: false, + treeShaking: true, + sourcemap: true, + color: true, + loader: { + ".json": "copy", + }, +}; + +const getEsmContext = async () => { + console.log(chalk.blue("Getting esm context...")); + + return esbuild.context({ + ...config, + outdir: "lib/esm", + format: "esm", + platform: "browser", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/esm/package.json`; + }); + }, + }, + ], + }); +}; + +const getCjsContext = async () => { + console.log(chalk.blue("Getting cjs context...")); + + return esbuild.context({ + ...config, + outdir: "lib/cjs", + format: "cjs", + platform: "node", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/cjs/package.json`; + }); + }, + }, + ], + }); +}; + +const watchTypes = async () => { + await $`tsc --watch --emitDeclarationOnly --outDir lib/types --moduleResolution bundler -m esnext`; +}; + +const watch = async () => { + const esmContext = await getEsmContext(); + const cjsContext = await getCjsContext(); + + if (platform === "esm") { + console.log(chalk.blue("Watching esm...")); + await Promise.all([esmContext.watch(), watchTypes()]); + } else if (platform === "cjs") { + console.log(chalk.blue("Watching cjs...")); + await Promise.all([cjsContext.watch(), watchTypes()]); + } else { + console.log(chalk.blue("Watching all...")); + await Promise.all([esmContext.watch(), cjsContext.watch(), watchTypes()]); + } +}; + +watch().catch(error => { + console.error(error); + process.exitCode = error?.exitCode ?? 1; +}); diff --git a/libs/coin-modules/coin-icon/package.json b/libs/coin-modules/coin-icon/package.json index 00959cd267fc..a83ab36696eb 100644 --- a/libs/coin-modules/coin-icon/package.json +++ b/libs/coin-modules/coin-icon/package.json @@ -73,10 +73,10 @@ "scripts": { "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-icon.json", "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-icon/tsconfig.json b/libs/coin-modules/coin-icon/tsconfig.json index 1011d3e82edc..f7a09904f051 100644 --- a/libs/coin-modules/coin-icon/tsconfig.json +++ b/libs/coin-modules/coin-icon/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib" diff --git a/libs/coin-modules/coin-internet_computer/package.json b/libs/coin-modules/coin-internet_computer/package.json index 244ed10660e9..fea72053b40e 100644 --- a/libs/coin-modules/coin-internet_computer/package.json +++ b/libs/coin-modules/coin-internet_computer/package.json @@ -114,7 +114,7 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-icp.json", "prewatch": "pnpm build", "watch": "tsc --watch", diff --git a/libs/coin-modules/coin-internet_computer/tsconfig.json b/libs/coin-modules/coin-internet_computer/tsconfig.json index ef29ef154772..805e1c47c1cf 100644 --- a/libs/coin-modules/coin-internet_computer/tsconfig.json +++ b/libs/coin-modules/coin-internet_computer/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "rootDir": "./src", diff --git a/libs/coin-modules/coin-near/package.json b/libs/coin-modules/coin-near/package.json index ed8d3baa00e3..4b015f31bfc0 100644 --- a/libs/coin-modules/coin-near/package.json +++ b/libs/coin-modules/coin-near/package.json @@ -68,11 +68,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-near.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-near/tsconfig.json b/libs/coin-modules/coin-near/tsconfig.json index f56b01ccd35e..642f99f519f6 100644 --- a/libs/coin-modules/coin-near/tsconfig.json +++ b/libs/coin-modules/coin-near/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-polkadot/build.mjs b/libs/coin-modules/coin-polkadot/build.mjs new file mode 100644 index 000000000000..5cafd94e83bf --- /dev/null +++ b/libs/coin-modules/coin-polkadot/build.mjs @@ -0,0 +1,72 @@ +#!/usr/bin/env zx +/* eslint-disable no-undef, no-console */ +import "zx/globals"; + +import * as esbuild from "esbuild"; + +let config = { + entryPoints: ["src/**/*"], + minify: true, + bundle: false, + treeShaking: true, + sourcemap: true, + color: true, + loader: { + ".json": "copy", + ".example": "copy", + ".Dockerfile": "copy", + ".yml": "copy", + }, +}; + +const buildEsm = async () => { + console.log(chalk.blue("Building esm...")); + await esbuild.build({ + ...config, + outdir: "lib/esm", + format: "esm", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(() => { + fs.copyFileSync("package.json", "lib/esm/package.json"); + }); + }, + }, + ], + }); +}; + +const buildCjs = async () => { + console.log(chalk.blue("Building cjs...")); + await esbuild.build({ + ...config, + outdir: "lib/cjs", + format: "cjs", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(() => { + fs.copyFileSync("package.json", "lib/cjs/package.json"); + }); + }, + }, + ], + }); +}; + +const buildTypes = async () => { + console.log(chalk.blue("Building types...")); + await $`tsc --emitDeclarationOnly --outDir lib/types --moduleResolution bundler -m esnext`; +}; + +const main = async () => { + return Promise.all([buildEsm(), buildCjs(), buildTypes()]); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/libs/coin-modules/coin-polkadot/package.json b/libs/coin-modules/coin-polkadot/package.json index 4546fcc03f9e..0e76f3c6e90c 100644 --- a/libs/coin-modules/coin-polkadot/package.json +++ b/libs/coin-modules/coin-polkadot/package.json @@ -20,98 +20,88 @@ "publishConfig": { "access": "public" }, - "typesVersions": { - "*": { - "lib/*": [ - "lib/*" - ], - "lib-es/*": [ - "lib-es/*" - ], - "api": [ - "lib/api/index" - ], - "logic": [ - "lib/logic/index" - ], - "specs": [ - "lib/test/bot-specs" - ], - "*": [ - "lib/*", - "lib/api/*", - "lib/bridge/*", - "lib/logic/*", - "lib/signer/*", - "lib/test/*", - "lib/types/*" - ] - } - }, "exports": { - "./lib/*": "./lib/*.js", - "./lib-es/*": "./lib-es/*.js", + "./lib/cjs/*": "./lib/cjs/*.js", + "./lib/esm/*": "./lib/esm/*.js", + "./lib/types/*": "./lib/types/*.d.ts", "./api": { - "require": "./lib/api/index.js", - "default": "./lib-es/api/index.js" + "types": "./lib/types/api/index.d.ts", + "require": "./lib/cjs/api/index.js", + "default": "./lib/esm/api/index.js" }, "./deviceTransactionConfig": { - "require": "./lib/bridge/deviceTransactionConfig.js", - "default": "./lib-es/bridge/deviceTransactionConfig.js" + "types": "./lib/types/bridge/deviceTransactionConfig.d.ts", + "require": "./lib/cjs/bridge/deviceTransactionConfig.js", + "default": "./lib/esm/bridge/deviceTransactionConfig.js" }, "./errors": { - "require": "./lib/types/errors.js", - "default": "./lib-es/types/errors.js" + "types": "./lib/types/types/errors.d.ts", + "require": "./lib/cjs/types/errors.js", + "default": "./lib/esm/types/errors.js" }, "./formatters": { - "require": "./lib/bridge/formatters.js", - "default": "./lib-es/bridge/formatters.js" + "types": "./lib/types/bridge/formatters.d.ts", + "require": "./lib/cjs/bridge/formatters.js", + "default": "./lib/esm/bridge/formatters.js" }, "./logic": { - "require": "./lib/logic/index.js", - "default": "./lib-es/logic/index.js" + "types": "./lib/types/logic/index.d.ts", + "require": "./lib/cjs/logic/index.js", + "default": "./lib/esm/logic/index.js" }, "./preload": { - "require": "./lib/bridge/preload.js", - "default": "./lib-es/bridge/preload.js" + "types": "./lib/types/bridge/preload.d.ts", + "require": "./lib/cjs/bridge/preload.js", + "default": "./lib/esm/bridge/preload.js" }, "./serialization": { - "require": "./lib/bridge/serialization.js", - "default": "./lib-es/bridge/serialization.js" + "types": "./lib/types/bridge/serialization.d.ts", + "require": "./lib/cjs/bridge/serialization.js", + "default": "./lib/esm/bridge/serialization.js" }, "./specs": { - "require": "./lib/test/bot-specs.js", - "default": "./lib-es/test/bot-specs.js" + "types": "./lib/types/test/bot-specs.d.ts", + "require": "./lib/cjs/test/bot-specs.js", + "default": "./lib/esm/test/bot-specs.js" }, "./transaction": { - "require": "./lib/bridge/transaction.js", - "default": "./lib-es/bridge/transaction.js" + "types": "./lib/types/bridge/transaction.d.ts", + "require": "./lib/cjs/bridge/transaction.js", + "default": "./lib/esm/bridge/transaction.js" }, "./types": { - "require": "./lib/types/index.js", - "default": "./lib-es/types/index.js" + "types": "./lib/types/types/index.d.ts", + "require": "./lib/cjs/types/index.js", + "default": "./lib/esm/types/index.js" }, "./utils": { - "require": "./lib/bridge/utils.js", - "default": "./lib-es/bridge/utils.js" + "types": "./lib/types/bridge/utils.d.ts", + "require": "./lib/cjs/bridge/utils.js", + "default": "./lib/esm/bridge/utils.js" }, "./*": { - "require": "./lib/*.js", - "default": "./lib-es/*.js" + "types": "./lib/types/*.d.ts", + "require": "./lib/cjs/*.js", + "default": "./lib/esm/*.js" }, ".": { - "require": "./lib/index.js", - "default": "./lib-es/index.js" + "types": "./lib/types/index.d.ts", + "require": "./lib/cjs/index.js", + "default": "./lib/esm/index.js" }, - "./package.json": "./package.json" + "./package.json": { + "require": "./lib/cjs/package.json", + "default": "./lib/esm/package.json" + } }, "license": "Apache-2.0", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "zx build.mjs", "prewatch": "pnpm build", - "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch": "zx watch.mjs", + "watch:es": "zx watch.mjs --platform esm", + "watch:cjs": "zx watch.mjs --platform cjs", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", @@ -152,9 +142,11 @@ "@types/invariant": "^2.2.2", "@types/jest": "^29.5.10", "@types/lodash": "^4.14.191", + "@types/node": "22.10.5", "chalk": "^4.1.2", "docker-compose": "^1.1.0", "dotenv": "^16.4.5", + "esbuild": "0.24.2", "eslint-plugin-jest": "^27.4.2", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", @@ -163,4 +155,4 @@ "ts-node": "^10.9.2", "typescript": "^5.4.5" } -} \ No newline at end of file +} diff --git a/libs/coin-modules/coin-polkadot/src/test/coin-tester/scenarii.test.ts b/libs/coin-modules/coin-polkadot/src/test/coin-tester/scenarii.test.ts index 77d4f46c69f8..e7f1e67ba5d0 100644 --- a/libs/coin-modules/coin-polkadot/src/test/coin-tester/scenarii.test.ts +++ b/libs/coin-modules/coin-polkadot/src/test/coin-tester/scenarii.test.ts @@ -1,9 +1,10 @@ +import console from "console"; import { executeScenario } from "@ledgerhq/coin-tester/main"; import { killSpeculos } from "@ledgerhq/coin-tester/signers/speculos"; import { killChopsticksAndSidecar } from "./chopsticks-sidecar"; import { PolkadotScenario } from "./scenarii/Polkadot"; -global.console = require("console"); +global.console = console; jest.setTimeout(300_000); export const defaultNanoApp = { firmware: "2.3.0" as const, version: "100.0.5" as const }; diff --git a/libs/coin-modules/coin-polkadot/tsconfig.json b/libs/coin-modules/coin-polkadot/tsconfig.json index 4f2d5dbec02a..300b1f0a2682 100644 --- a/libs/coin-modules/coin-polkadot/tsconfig.json +++ b/libs/coin-modules/coin-polkadot/tsconfig.json @@ -3,12 +3,12 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "rootDir": "./src", - "outDir": "lib", - "exactOptionalPropertyTypes": true + "exactOptionalPropertyTypes": true, + "module": "ESNext", + "moduleResolution": "bundler" }, "include": ["src/**/*"] } diff --git a/libs/coin-modules/coin-polkadot/watch.mjs b/libs/coin-modules/coin-polkadot/watch.mjs new file mode 100644 index 000000000000..3d6d738a811a --- /dev/null +++ b/libs/coin-modules/coin-polkadot/watch.mjs @@ -0,0 +1,89 @@ +#!/usr/bin/env zx +/* eslint-disable no-undef, no-console */ +import "zx/globals"; + +import * as esbuild from "esbuild"; + +const { platform } = argv; + +const config = { + entryPoints: ["src/**/*"], + minify: true, + bundle: false, + treeShaking: true, + sourcemap: true, + color: true, + loader: { + ".json": "copy", + ".example": "copy", + ".Dockerfile": "copy", + ".yml": "copy", + }, +}; + +const getEsmContext = async () => { + console.log(chalk.blue("Getting esm context...")); + + return esbuild.context({ + ...config, + outdir: "lib/esm", + format: "esm", + platform: "browser", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/esm/package.json`; + }); + }, + }, + ], + }); +}; + +const getCjsContext = async () => { + console.log(chalk.blue("Getting cjs context...")); + + return esbuild.context({ + ...config, + outdir: "lib/cjs", + format: "cjs", + platform: "node", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/cjs/package.json`; + }); + }, + }, + ], + }); +}; + +const watchTypes = async () => { + await $`tsc --watch --emitDeclarationOnly --outDir lib/types --moduleResolution bundler -m esnext`; +}; + +const watch = async () => { + const esmContext = await getEsmContext(); + const cjsContext = await getCjsContext(); + + if (platform === "esm") { + console.log(chalk.blue("Watching esm...")); + await Promise.all([esmContext.watch(), watchTypes()]); + } else if (platform === "cjs") { + console.log(chalk.blue("Watching cjs...")); + await Promise.all([cjsContext.watch(), watchTypes()]); + } else { + console.log(chalk.blue("Watching all...")); + await Promise.all([esmContext.watch(), cjsContext.watch(), watchTypes()]); + } +}; + +watch().catch(error => { + console.error(error); + process.exitCode = error?.exitCode ?? 1; +}); diff --git a/libs/coin-modules/coin-solana/build.mjs b/libs/coin-modules/coin-solana/build.mjs new file mode 100644 index 000000000000..df3712d6d31f --- /dev/null +++ b/libs/coin-modules/coin-solana/build.mjs @@ -0,0 +1,69 @@ +#!/usr/bin/env zx +/* eslint-disable no-undef, no-console */ +import "zx/globals"; + +import * as esbuild from "esbuild"; + +let config = { + entryPoints: ["src/**/*"], + minify: true, + bundle: false, + treeShaking: true, + sourcemap: true, + color: true, + loader: { + ".json": "copy", + }, +}; + +const buildEsm = async () => { + console.log(chalk.blue("Building esm...")); + await esbuild.build({ + ...config, + outdir: "lib/esm", + format: "esm", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(() => { + fs.copyFileSync("package.json", "lib/esm/package.json"); + }); + }, + }, + ], + }); +}; + +const buildCjs = async () => { + console.log(chalk.blue("Building cjs...")); + await esbuild.build({ + ...config, + outdir: "lib/cjs", + format: "cjs", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(() => { + fs.copyFileSync("package.json", "lib/cjs/package.json"); + }); + }, + }, + ], + }); +}; + +const buildTypes = async () => { + console.log(chalk.blue("Building types...")); + await $`tsc --emitDeclarationOnly --outDir lib/types --moduleResolution bundler -m esnext`; +}; + +const main = async () => { + return Promise.all([buildEsm(), buildCjs(), buildTypes()]); +}; + +main().catch(error => { + console.error(error); + process.exit(1); +}); diff --git a/libs/coin-modules/coin-solana/package.json b/libs/coin-modules/coin-solana/package.json index 907aba1581ea..dbcb8c343465 100644 --- a/libs/coin-modules/coin-solana/package.json +++ b/libs/coin-modules/coin-solana/package.json @@ -20,27 +20,16 @@ "publishConfig": { "access": "public" }, - "typesVersions": { - "*": { - "lib/*": [ - "lib/*" - ], - "lib-es/*": [ - "lib-es/*" - ], - "*": [ - "lib/*" - ] - } - }, "exports": { - "./lib/*": "./lib/*.js", - "./lib-es/*": "./lib-es/*.js", "./*": { - "require": "./lib/*.js", - "default": "./lib-es/*.js" + "types": "./lib/types/*.d.ts", + "require": "./lib/cjs/*.js", + "default": "./lib/esm/*.js" }, - "./package.json": "./package.json" + "./package.json": { + "require": "./lib/cjs/package.json", + "default": "./lib/esm/package.json" + } }, "license": "Apache-2.0", "dependencies": { @@ -62,7 +51,7 @@ "lodash": "^4.17.21", "object-hash": "^2.2.0", "rxjs": "^7.8.1", - "superstruct": "0.14.2" + "superstruct": "2.0.2" }, "devDependencies": { "@faker-js/faker": "^8.4.1", @@ -70,17 +59,20 @@ "@types/invariant": "^2.2.2", "@types/jest": "^29.5.10", "@types/lodash": "^4.14.191", + "@types/node": "22.10.5", "@types/object-hash": "^2.1.0", + "esbuild": "0.24.2", "jest": "^29.7.0", "ts-jest": "^29.1.1" }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "zx build.mjs", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-solana.json", "prewatch": "pnpm build", - "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch": "zx watch.mjs", + "watch:es": "zx watch.mjs --platform esm", + "watch:cjs": "zx watch.mjs --platform cjs", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-solana/tsconfig.json b/libs/coin-modules/coin-solana/tsconfig.json index f56b01ccd35e..74bd1e351db2 100644 --- a/libs/coin-modules/coin-solana/tsconfig.json +++ b/libs/coin-modules/coin-solana/tsconfig.json @@ -3,11 +3,11 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], - "outDir": "lib", - "exactOptionalPropertyTypes": true + "exactOptionalPropertyTypes": true, + "module": "ESNext", + "moduleResolution": "bundler" }, "include": ["src/**/*"] } diff --git a/libs/coin-modules/coin-solana/watch.mjs b/libs/coin-modules/coin-solana/watch.mjs new file mode 100644 index 000000000000..d2a0327d28b1 --- /dev/null +++ b/libs/coin-modules/coin-solana/watch.mjs @@ -0,0 +1,86 @@ +#!/usr/bin/env zx +/* eslint-disable no-undef, no-console */ +import "zx/globals"; + +import * as esbuild from "esbuild"; + +const { platform } = argv; + +const config = { + entryPoints: ["src/**/*"], + minify: true, + bundle: false, + treeShaking: true, + sourcemap: true, + color: true, + loader: { + ".json": "copy", + }, +}; + +const getEsmContext = async () => { + console.log(chalk.blue("Getting esm context...")); + + return esbuild.context({ + ...config, + outdir: "lib/esm", + format: "esm", + platform: "browser", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/esm/package.json`; + }); + }, + }, + ], + }); +}; + +const getCjsContext = async () => { + console.log(chalk.blue("Getting cjs context...")); + + return esbuild.context({ + ...config, + outdir: "lib/cjs", + format: "cjs", + platform: "node", + plugins: [ + { + name: "copy-package-json", + setup(build) { + build.onEnd(async () => { + await $`cp package.json lib/cjs/package.json`; + }); + }, + }, + ], + }); +}; + +const watchTypes = async () => { + await $`tsc --watch --emitDeclarationOnly --outDir lib/types --moduleResolution bundler -m esnext`; +}; + +const watch = async () => { + const esmContext = await getEsmContext(); + const cjsContext = await getCjsContext(); + + if (platform === "esm") { + console.log(chalk.blue("Watching esm...")); + await Promise.all([esmContext.watch(), watchTypes()]); + } else if (platform === "cjs") { + console.log(chalk.blue("Watching cjs...")); + await Promise.all([cjsContext.watch(), watchTypes()]); + } else { + console.log(chalk.blue("Watching all...")); + await Promise.all([esmContext.watch(), cjsContext.watch(), watchTypes()]); + } +}; + +watch().catch(error => { + console.error(error); + process.exitCode = error?.exitCode ?? 1; +}); diff --git a/libs/coin-modules/coin-stacks/package.json b/libs/coin-modules/coin-stacks/package.json index cf8e7704fbc7..99e7bb56e152 100644 --- a/libs/coin-modules/coin-stacks/package.json +++ b/libs/coin-modules/coin-stacks/package.json @@ -117,7 +117,7 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-stacks.json", "prewatch": "pnpm build", "watch": "tsc --watch", diff --git a/libs/coin-modules/coin-stacks/tsconfig.json b/libs/coin-modules/coin-stacks/tsconfig.json index da243c9b3afa..40628369ff31 100644 --- a/libs/coin-modules/coin-stacks/tsconfig.json +++ b/libs/coin-modules/coin-stacks/tsconfig.json @@ -4,7 +4,6 @@ "declaration": true, "declarationMap": true, "noImplicitAny": false, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-stellar/package.json b/libs/coin-modules/coin-stellar/package.json index c5503cd42e82..4e459c520646 100644 --- a/libs/coin-modules/coin-stellar/package.json +++ b/libs/coin-modules/coin-stellar/package.json @@ -19,11 +19,11 @@ "homepage": "https://github.com/LedgerHQ/ledger-live/tree/develop/libs/coin-modules/coin-stellar", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-stellar.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-stellar/tsconfig.json b/libs/coin-modules/coin-stellar/tsconfig.json index f56b01ccd35e..642f99f519f6 100644 --- a/libs/coin-modules/coin-stellar/tsconfig.json +++ b/libs/coin-modules/coin-stellar/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-tezos/package.json b/libs/coin-modules/coin-tezos/package.json index 96328a59071d..c11d9944a0cf 100644 --- a/libs/coin-modules/coin-tezos/package.json +++ b/libs/coin-modules/coin-tezos/package.json @@ -99,11 +99,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-xrp.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-tezos/tsconfig.json b/libs/coin-modules/coin-tezos/tsconfig.json index c5b925f11cb3..aeebf3fc8921 100644 --- a/libs/coin-modules/coin-tezos/tsconfig.json +++ b/libs/coin-modules/coin-tezos/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-ton/package.json b/libs/coin-modules/coin-ton/package.json index d3af0eb00a73..9b8dfc26c29f 100644 --- a/libs/coin-modules/coin-ton/package.json +++ b/libs/coin-modules/coin-ton/package.json @@ -75,10 +75,10 @@ "scripts": { "clean": "rimraf lib lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-ton.json", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-ton/tsconfig.json b/libs/coin-modules/coin-ton/tsconfig.json index cdb8be8ecb97..cc52019a8f1a 100644 --- a/libs/coin-modules/coin-ton/tsconfig.json +++ b/libs/coin-modules/coin-ton/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib" diff --git a/libs/coin-modules/coin-tron/package.json b/libs/coin-modules/coin-tron/package.json index 30d2c2026375..f5304b45c78e 100644 --- a/libs/coin-modules/coin-tron/package.json +++ b/libs/coin-modules/coin-tron/package.json @@ -119,11 +119,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-tron.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-tron/tsconfig.json b/libs/coin-modules/coin-tron/tsconfig.json index d27b201906d9..6b9954d56f3e 100644 --- a/libs/coin-modules/coin-tron/tsconfig.json +++ b/libs/coin-modules/coin-tron/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-vechain/package.json b/libs/coin-modules/coin-vechain/package.json index 1ff434f04860..6523f3a189eb 100644 --- a/libs/coin-modules/coin-vechain/package.json +++ b/libs/coin-modules/coin-vechain/package.json @@ -80,7 +80,7 @@ "license": "Apache-2.0", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-vechain.json", "prewatch": "pnpm build", "watch": "tsc --watch", diff --git a/libs/coin-modules/coin-vechain/tsconfig.json b/libs/coin-modules/coin-vechain/tsconfig.json index f56b01ccd35e..642f99f519f6 100644 --- a/libs/coin-modules/coin-vechain/tsconfig.json +++ b/libs/coin-modules/coin-vechain/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-modules/coin-xrp/package.json b/libs/coin-modules/coin-xrp/package.json index c64993a689b4..211cf9169869 100644 --- a/libs/coin-modules/coin-xrp/package.json +++ b/libs/coin-modules/coin-xrp/package.json @@ -125,11 +125,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --testPathIgnorePatterns='/bridge.integration.test.ts|node_modules|lib-es|lib/' --passWithNoTests && mv coverage/coverage-final.json coverage/coverage-xrp.json", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/coin-modules/coin-xrp/tsconfig.json b/libs/coin-modules/coin-xrp/tsconfig.json index f56b01ccd35e..642f99f519f6 100644 --- a/libs/coin-modules/coin-xrp/tsconfig.json +++ b/libs/coin-modules/coin-xrp/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/coin-tester/package.json b/libs/coin-tester/package.json index e4a7335ab3db..53b63bd5e3ae 100644 --- a/libs/coin-tester/package.json +++ b/libs/coin-tester/package.json @@ -5,10 +5,10 @@ "license": "Apache-2.0", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint .", "lint:fix": "pnpm lint --fix" }, @@ -66,4 +66,4 @@ "url": "https://github.com/LedgerHQ/ledger-live/issues" }, "homepage": "https://github.com/LedgerHQ/ledger-live/tree/develop/libs/coin-tester" -} \ No newline at end of file +} diff --git a/libs/coin-tester/tsconfig.json b/libs/coin-tester/tsconfig.json index 2cedff18f523..bb07fd9fdddd 100644 --- a/libs/coin-tester/tsconfig.json +++ b/libs/coin-tester/tsconfig.json @@ -3,8 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", - "moduleResolution": "node", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/device-core/package.json b/libs/device-core/package.json index 2f6661b977b1..37db3cd463b3 100644 --- a/libs/device-core/package.json +++ b/libs/device-core/package.json @@ -39,10 +39,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/device-core/src/commands/use-cases/getVersion.ts b/libs/device-core/src/commands/use-cases/getVersion.ts index 2f548d1435ac..16a97f34afbc 100644 --- a/libs/device-core/src/commands/use-cases/getVersion.ts +++ b/libs/device-core/src/commands/use-cases/getVersion.ts @@ -19,5 +19,6 @@ export async function getVersion( const res = await transport.send(...GET_VERSION_APDU, undefined, { abortTimeoutMs, }); + return parseGetVersionResponse(res); } diff --git a/libs/device-core/tsconfig.json b/libs/device-core/tsconfig.json index bf9f2bc7ef72..1406712f98b9 100644 --- a/libs/device-core/tsconfig.json +++ b/libs/device-core/tsconfig.json @@ -5,8 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", - "moduleResolution": "node", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/device-react/package.json b/libs/device-react/package.json index 5856ed75f970..b703dce3a4ec 100644 --- a/libs/device-react/package.json +++ b/libs/device-react/package.json @@ -35,10 +35,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/device-react/tsconfig.json b/libs/device-react/tsconfig.json index b0bf13f38205..9b0ff3d5f28f 100644 --- a/libs/device-react/tsconfig.json +++ b/libs/device-react/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib" diff --git a/libs/domain-service/package.json b/libs/domain-service/package.json index 3b9fd6f2a98f..6a7c5b17295c 100644 --- a/libs/domain-service/package.json +++ b/libs/domain-service/package.json @@ -55,10 +55,10 @@ ], "scripts": { "clean": "rm -rf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "cross-env TZ=America/New_York jest", diff --git a/libs/domain-service/tsconfig.json b/libs/domain-service/tsconfig.json index c1570ff7e029..6d443a83c3ab 100644 --- a/libs/domain-service/tsconfig.json +++ b/libs/domain-service/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/env/package.json b/libs/env/package.json index 2b5ac48857cb..b90236a2bca7 100644 --- a/libs/env/package.json +++ b/libs/env/package.json @@ -31,10 +31,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/env/tsconfig.json b/libs/env/tsconfig.json index 6d7bd9b48aa2..05d003c6933b 100644 --- a/libs/env/tsconfig.json +++ b/libs/env/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": false, "noImplicitThis": false, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib" diff --git a/libs/ethereum-provider/tsconfig.json b/libs/ethereum-provider/tsconfig.json index 6d7bd9b48aa2..05d003c6933b 100644 --- a/libs/ethereum-provider/tsconfig.json +++ b/libs/ethereum-provider/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": false, "noImplicitThis": false, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib" diff --git a/libs/evm-tools/package.json b/libs/evm-tools/package.json index 10fa3b64d810..d61eecd74381 100644 --- a/libs/evm-tools/package.json +++ b/libs/evm-tools/package.json @@ -63,10 +63,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/evm-tools/tsconfig.json b/libs/evm-tools/tsconfig.json index c1570ff7e029..6d443a83c3ab 100644 --- a/libs/evm-tools/tsconfig.json +++ b/libs/evm-tools/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "declaration": true, "declarationMap": true, - "module": "commonjs", "downlevelIteration": true, "lib": ["es2020", "dom"], "outDir": "lib", diff --git a/libs/exchange-module/package.json b/libs/exchange-module/package.json index 63f56b1af41e..10c8747760bb 100644 --- a/libs/exchange-module/package.json +++ b/libs/exchange-module/package.json @@ -26,10 +26,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es && node scripts/createModulePackage.mjs", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es && node scripts/createModulePackage.mjs", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx", "lint:fix": "pnpm lint --fix" }, diff --git a/libs/exchange-module/tsconfig.json b/libs/exchange-module/tsconfig.json index 3d4a6af532b1..8cbfc08851e8 100644 --- a/libs/exchange-module/tsconfig.json +++ b/libs/exchange-module/tsconfig.json @@ -6,7 +6,6 @@ "noImplicitAny": false, "noImplicitThis": false, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "jsx": "react", "outDir": "lib" diff --git a/libs/hw-ledger-key-ring-protocol/package.json b/libs/hw-ledger-key-ring-protocol/package.json index 97202c730fd2..8a5c07287d89 100644 --- a/libs/hw-ledger-key-ring-protocol/package.json +++ b/libs/hw-ledger-key-ring-protocol/package.json @@ -35,10 +35,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/hw-ledger-key-ring-protocol/tsconfig.json b/libs/hw-ledger-key-ring-protocol/tsconfig.json index 78db98bc4a32..05d003c6933b 100644 --- a/libs/hw-ledger-key-ring-protocol/tsconfig.json +++ b/libs/hw-ledger-key-ring-protocol/tsconfig.json @@ -6,7 +6,6 @@ "noImplicitAny": false, "noImplicitThis": false, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "outDir": "lib" }, diff --git a/libs/ledger-key-ring-protocol/package.json b/libs/ledger-key-ring-protocol/package.json index 4028869f3228..273b7151e4e9 100644 --- a/libs/ledger-key-ring-protocol/package.json +++ b/libs/ledger-key-ring-protocol/package.json @@ -78,10 +78,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/ledger-key-ring-protocol/tsconfig.json b/libs/ledger-key-ring-protocol/tsconfig.json index 0eaa1f700242..f23d9596854f 100644 --- a/libs/ledger-key-ring-protocol/tsconfig.json +++ b/libs/ledger-key-ring-protocol/tsconfig.json @@ -6,7 +6,6 @@ "noImplicitAny": false, "noImplicitThis": false, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "outDir": "lib" }, diff --git a/libs/ledger-live-common/jest.config.ts b/libs/ledger-live-common/jest.config.ts index 38b398820b24..dfc7321ea7e6 100644 --- a/libs/ledger-live-common/jest.config.ts +++ b/libs/ledger-live-common/jest.config.ts @@ -35,9 +35,6 @@ if (process.env.CI) { const defaultConfig = { preset: "ts-jest", globals: { - "ts-jest": { - isolatedModules: true, - }, Buffer: Uint8Array, }, testEnvironment: "node", @@ -52,15 +49,18 @@ const defaultConfig = { ], testPathIgnorePatterns, testRegex, - transformIgnorePatterns: ["/node_modules/(?!|@babel/runtime/helpers/esm/)"], + transformIgnorePatterns: [ + "/node_modules/(?!|@babel/runtime/helpers/esm/)", + "/node_modules/(?!|@babel/runtime/helpers/esm/)", + ], moduleDirectories: ["node_modules", "cli/node_modules"], /** * Added because of this error happening when using toMatchInlineSnapshot: * TypeError: prettier.resolveConfig.sync is not a function at runPrettier (../../node_modules/.pnpm/jest-snapshot@28.1.3/node_modules/jest-snapshot/build/InlineSnapshots.js:319:30) - * - * See: https://github.com/jestjs/jest/issues/14305#issuecomment-1627346697 + * + * See: https://github.com/jestjs/jest/issues/14305#issuecomment-1627346697 */ prettierPath: null, }; @@ -69,13 +69,13 @@ export default { globalSetup: process.env.UPDATE_BACKEND_MOCKS ? "/src/__tests__/test-helpers/bridgeSetupUpdateMocks.ts" : process.env.USE_BACKEND_MOCKS - ? "/src/__tests__/test-helpers/bridgeSetupUseMocks.ts" - : undefined, + ? "/src/__tests__/test-helpers/bridgeSetupUseMocks.ts" + : undefined, globalTeardown: process.env.UPDATE_BACKEND_MOCKS ? "/src/__tests__/test-helpers/bridgeTeardownUpdateMocks.ts" : process.env.USE_BACKEND_MOCKS - ? "/src/__tests__/test-helpers/bridgeTeardownUseMocks.ts" - : undefined, + ? "/src/__tests__/test-helpers/bridgeTeardownUseMocks.ts" + : undefined, collectCoverage: true, collectCoverageFrom: ["src/**/*.{ts,tsx}"], coverageReporters: ["json", "lcov", "clover", "json-summary"], diff --git a/libs/ledger-live-common/package.json b/libs/ledger-live-common/package.json index 7621932aa081..3b6da367e6a0 100644 --- a/libs/ledger-live-common/package.json +++ b/libs/ledger-live-common/package.json @@ -162,6 +162,7 @@ "@ledgerhq/hw-app-aptos": "workspace:^", "@ledgerhq/hw-app-btc": "workspace:^", "@ledgerhq/hw-app-cosmos": "workspace:^", + "@ledgerhq/hw-app-dmk-eth": "workspace:^", "@ledgerhq/hw-app-elrond": "workspace:^", "@ledgerhq/hw-app-eth": "workspace:^", "@ledgerhq/hw-app-exchange": "workspace:^", @@ -251,6 +252,7 @@ "zod": "^3.22.4" }, "devDependencies": { + "@ledgerhq/device-management-kit": "0.0.0-develop-20250106155719", "@ledgerhq/device-react": "workspace:^", "@ledgerhq/types-cryptoassets": "workspace:^", "@ledgerhq/types-devices": "workspace:^", @@ -268,6 +270,7 @@ "@types/react": "^18.2.21", "@types/uuid": "^8.3.4", "benchmark": "^2.1.4", + "buffer": "6.0.3", "camelcase": "^6.2.1", "cross-env": "^7.0.3", "env-cmd": "*", @@ -294,9 +297,8 @@ "ts-jest": "^29.1.1", "ts-node": "^10.4.0", "typescript": "5.1.3", + "undici": "6.19.2", "uuid": "^8.3.2", - "ws": "7", - "buffer": "6.0.3", - "undici": "6.19.2" + "ws": "7" } } diff --git a/libs/ledger-live-common/src/account/helpers.ts b/libs/ledger-live-common/src/account/helpers.ts index 73bf0247cdf8..0f252513cdd8 100644 --- a/libs/ledger-live-common/src/account/helpers.ts +++ b/libs/ledger-live-common/src/account/helpers.ts @@ -1,7 +1,7 @@ import { isAccountDelegating } from "../families/tezos/staking"; import { BitcoinAccount, initialBitcoinResourcesValue } from "@ledgerhq/coin-bitcoin/types"; import type { Account, AccountLike } from "@ledgerhq/types-live"; -import { TronAccount } from "@ledgerhq/coin-tron/types"; +import { TronAccount } from "@ledgerhq/coin-tron/types/index"; import { CosmosAccount } from "../families/cosmos/types"; import { getMainAccount, diff --git a/libs/ledger-live-common/src/bridge/jsHelpers.ts b/libs/ledger-live-common/src/bridge/jsHelpers.ts index 0d6c1950c0a8..b6f186847d3c 100644 --- a/libs/ledger-live-common/src/bridge/jsHelpers.ts +++ b/libs/ledger-live-common/src/bridge/jsHelpers.ts @@ -12,9 +12,9 @@ import { withDevice } from "../hw/deviceAccess"; import getAddress from "../hw/getAddress"; export { - AccountShapeInfo, - GetAccountShape, - IterateResultBuilder, + type AccountShapeInfo, + type GetAccountShape, + type IterateResultBuilder, makeSync, mergeNfts, mergeOps, diff --git a/libs/ledger-live-common/src/currencies/index.ts b/libs/ledger-live-common/src/currencies/index.ts index 2c7ccf57866e..1458c995655b 100644 --- a/libs/ledger-live-common/src/currencies/index.ts +++ b/libs/ledger-live-common/src/currencies/index.ts @@ -36,7 +36,7 @@ export { setSupportedCurrencies, } from "@ledgerhq/coin-framework/currencies"; -export { getCurrencyColor, ColorableCurrency } from "./color"; +export { getCurrencyColor, type ColorableCurrency } from "./color"; export { formatShort } from "./formatShort"; export * from "./helpers"; export { sortCurrenciesByIds, currenciesByMarketcap } from "./sortByMarketcap"; diff --git a/libs/ledger-live-common/src/deviceSDK/transports/core.ts b/libs/ledger-live-common/src/deviceSDK/transports/core.ts index 2dc535492e86..5c342ad853ef 100644 --- a/libs/ledger-live-common/src/deviceSDK/transports/core.ts +++ b/libs/ledger-live-common/src/deviceSDK/transports/core.ts @@ -6,6 +6,7 @@ import { BluetoothRequired, CantOpenDevice, DeviceHalted, + DeviceMangementKitError, FirmwareOrAppUpdateRequired, PairingFailed, PeerRemovedPairing, @@ -266,6 +267,15 @@ const initialErrorRemapping = (error: unknown, context?: TraceContext) => { } } + // HANDLE DMK ERRORS + if (error && typeof error === "object" && "_tag" in error) { + const message = + "originalError" in error && typeof error.originalError === "object" + ? ((error.originalError as Error).message as string) + : (error._tag as string); + mappedError = new DeviceMangementKitError(error._tag as string, message); + } + trace({ type: LOG_TYPE, message: `Initial error remapping: ${error}`, diff --git a/libs/ledger-live-common/src/exchange/platform/types.ts b/libs/ledger-live-common/src/exchange/platform/types.ts index 85d59564f684..a20e66f50b80 100644 --- a/libs/ledger-live-common/src/exchange/platform/types.ts +++ b/libs/ledger-live-common/src/exchange/platform/types.ts @@ -1,8 +1,8 @@ import type { Account, AccountLike, AccountRaw, AccountRawLike } from "@ledgerhq/types-live"; -import { ExchangeTypes, RateTypes } from "@ledgerhq/hw-app-exchange"; +import type { ExchangeTypes, RateTypes } from "@ledgerhq/hw-app-exchange"; import type { Transaction } from "../../generated/types"; -import { ExchangeSwap } from "../swap/types"; -import { Device } from "../../hw/actions/types"; +import type { ExchangeSwap } from "../swap/types"; +import type { Device } from "../../hw/actions/types"; export type CompleteExchangeRequestEvent = | { type: "complete-exchange" } diff --git a/libs/ledger-live-common/src/families/aptos/api/graphql/queries.ts b/libs/ledger-live-common/src/families/aptos/api/graphql/queries.ts index 0c5df5daa4aa..59d044bd42fd 100644 --- a/libs/ledger-live-common/src/families/aptos/api/graphql/queries.ts +++ b/libs/ledger-live-common/src/families/aptos/api/graphql/queries.ts @@ -1,4 +1,5 @@ -import { gql } from "@apollo/client"; +// We need to target CJS for the CJS build of the lib +import { gql } from "@apollo/client/main.cjs"; export const GetDelegatedStakingActivities = gql` query getDelegatedStakingActivities($delegatorAddress: String) { diff --git a/libs/ledger-live-common/src/families/aptos/api/index.test.ts b/libs/ledger-live-common/src/families/aptos/api/index.test.ts index eff5afc25973..e4d3ad6883c8 100644 --- a/libs/ledger-live-common/src/families/aptos/api/index.test.ts +++ b/libs/ledger-live-common/src/families/aptos/api/index.test.ts @@ -1,4 +1,4 @@ -import { ApolloClient } from "@apollo/client"; +import { ApolloClient } from "@apollo/client/main.cjs"; import { AccountAddress, Aptos, diff --git a/libs/ledger-live-common/src/families/aptos/api/index.ts b/libs/ledger-live-common/src/families/aptos/api/index.ts index 6994006fb243..4aadafeebe6c 100644 --- a/libs/ledger-live-common/src/families/aptos/api/index.ts +++ b/libs/ledger-live-common/src/families/aptos/api/index.ts @@ -1,4 +1,5 @@ -import { ApolloClient, InMemoryCache } from "@apollo/client"; +import { ApolloClient, InMemoryCache } from "@apollo/client/main.cjs"; + import { AccountData, Aptos, diff --git a/libs/ledger-live-common/src/families/evm/setup.ts b/libs/ledger-live-common/src/families/evm/setup.ts index 54f506c3f028..7901161884a7 100644 --- a/libs/ledger-live-common/src/families/evm/setup.ts +++ b/libs/ledger-live-common/src/families/evm/setup.ts @@ -14,15 +14,32 @@ import { } from "../../bridge/setup"; import { Resolver } from "../../hw/getAddress/types"; import Transport from "@ledgerhq/hw-transport"; -import { Bridge } from "@ledgerhq/types-live"; +import type { Bridge, EvmSigner } from "@ledgerhq/types-live"; import { getCurrencyConfiguration } from "../../config"; import { CryptoCurrency } from "@ledgerhq/types-cryptoassets"; import { EvmConfigInfo } from "@ledgerhq/coin-evm/config"; +import { DeviceManagementKit } from "@ledgerhq/device-management-kit"; +import { DmkSignerEth } from "@ledgerhq/hw-app-dmk-eth"; + +const createSigner: CreateSigner = (transport: Transport) => { + if (isDmkTransport(transport)) { + return new DmkSignerEth(transport.sdk, transport.sessionId); + } -const createSigner: CreateSigner = (transport: Transport) => { return new Eth(transport); }; +const isDmkTransport = ( + transport: Transport, +): transport is Transport & { sdk: DeviceManagementKit; sessionId: string } => { + return ( + "sdk" in transport && + transport.sdk !== undefined && + "sessionId" in transport && + transport.sessionId !== undefined + ); +}; + const getCurrencyConfig = (currency: CryptoCurrency) => { return { info: getCurrencyConfiguration(currency) }; }; diff --git a/libs/ledger-live-common/src/families/solana/banner.test.ts b/libs/ledger-live-common/src/families/solana/banner.test.ts index df864e128c4e..e1fd8c2f3357 100644 --- a/libs/ledger-live-common/src/families/solana/banner.test.ts +++ b/libs/ledger-live-common/src/families/solana/banner.test.ts @@ -1,9 +1,11 @@ import * as preloadedData from "@ledgerhq/coin-solana/preload-data"; import type { SolanaAccount, SolanaPreloadDataV1, SolanaStake } from "@ledgerhq/coin-solana/types"; -import { ValidatorsAppValidator } from "@ledgerhq/coin-solana/validator-app/index"; +import type { ValidatorsAppValidator } from "@ledgerhq/coin-solana/validator-app/index"; import { getAccountBannerState } from "./banner"; import * as helpers from "../../account/helpers"; +jest.mock("@ledgerhq/coin-solana/preload-data"); + import { BigNumber } from "bignumber.js"; const ledgerValidator: ValidatorsAppValidator = { diff --git a/libs/ledger-live-common/src/families/solana/staking.ts b/libs/ledger-live-common/src/families/solana/staking.ts index 5d73e06e2905..a37d81687c6f 100644 --- a/libs/ledger-live-common/src/families/solana/staking.ts +++ b/libs/ledger-live-common/src/families/solana/staking.ts @@ -10,4 +10,4 @@ export { sweetch, tupleOfUnion, } from "@ledgerhq/coin-solana/utils"; -export { ValidatorsAppValidator } from "@ledgerhq/coin-solana/validator-app/index"; +export type { ValidatorsAppValidator } from "@ledgerhq/coin-solana/validator-app/index"; diff --git a/libs/ledger-live-common/src/families/tron/bridge/mock.ts b/libs/ledger-live-common/src/families/tron/bridge/mock.ts index 205d8135d200..80ea1721543e 100644 --- a/libs/ledger-live-common/src/families/tron/bridge/mock.ts +++ b/libs/ledger-live-common/src/families/tron/bridge/mock.ts @@ -1,6 +1,6 @@ import { BigNumber } from "bignumber.js"; import { NotEnoughBalance, RecipientRequired, InvalidAddress } from "@ledgerhq/errors"; -import type { Transaction } from "@ledgerhq/coin-tron/types"; +import type { Transaction } from "@ledgerhq/coin-tron/types/index"; import type { AccountBridge, CurrencyBridge } from "@ledgerhq/types-live"; import { getSerializedAddressParameters } from "@ledgerhq/coin-framework/bridge/jsHelpers"; import { diff --git a/libs/ledger-live-common/src/families/tron/data.mock.ts b/libs/ledger-live-common/src/families/tron/data.mock.ts index 1c8f72a1512f..561296ba4a37 100644 --- a/libs/ledger-live-common/src/families/tron/data.mock.ts +++ b/libs/ledger-live-common/src/families/tron/data.mock.ts @@ -1,5 +1,5 @@ import { fromAccountRaw } from "../../account/serialization"; -import { TronAccount } from "@ledgerhq/coin-tron/types"; +import { TronAccount } from "@ledgerhq/coin-tron/types/index"; export const __NEXT_REWARD_DATE__ = new Date(Date.now() - 6 * 60 * 60 * 1000); diff --git a/libs/ledger-live-common/src/families/tron/react.ts b/libs/ledger-live-common/src/families/tron/react.ts index 39cc1e45d7ae..c3bc041b33f3 100644 --- a/libs/ledger-live-common/src/families/tron/react.ts +++ b/libs/ledger-live-common/src/families/tron/react.ts @@ -2,7 +2,7 @@ import { BigNumber } from "bignumber.js"; import invariant from "invariant"; import { ONE_TRX } from "@ledgerhq/coin-tron/logic/constants"; import { getTronSuperRepresentatives } from "@ledgerhq/coin-tron/network"; -import type { SuperRepresentative, TronAccount, Vote } from "@ledgerhq/coin-tron/types"; +import type { SuperRepresentative, TronAccount, Vote } from "@ledgerhq/coin-tron/types/index"; import { useEffect, useMemo, useRef, useState } from "react"; import { useBridgeSync } from "../../bridge/react"; diff --git a/libs/ledger-live-common/src/families/tron/setup.ts b/libs/ledger-live-common/src/families/tron/setup.ts index 4948ea87574f..ce5e6a5f9574 100644 --- a/libs/ledger-live-common/src/families/tron/setup.ts +++ b/libs/ledger-live-common/src/families/tron/setup.ts @@ -4,7 +4,7 @@ import { TronCoinConfig } from "@ledgerhq/coin-tron/config"; import tronResolver from "@ledgerhq/coin-tron/signer"; import type { CliTools } from "@ledgerhq/coin-tron/test/cli"; import makeCliTools from "@ledgerhq/coin-tron/test/cli"; -import type { Transaction, TronAccount, TronSigner } from "@ledgerhq/coin-tron/types"; +import type { Transaction, TronAccount, TronSigner } from "@ledgerhq/coin-tron/types/index"; import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets"; import Trx from "@ledgerhq/hw-app-trx"; import Transport from "@ledgerhq/hw-transport"; diff --git a/libs/ledger-live-common/src/hw/actions/initSwap.ts b/libs/ledger-live-common/src/hw/actions/initSwap.ts index b9f9667e09ee..a3561663841e 100644 --- a/libs/ledger-live-common/src/hw/actions/initSwap.ts +++ b/libs/ledger-live-common/src/hw/actions/initSwap.ts @@ -15,7 +15,7 @@ import type { ConnectAppEvent, Input as ConnectAppInput } from "../connectApp"; import type { AppRequest, AppState } from "./app"; import { createAction as createAppAction } from "./app"; import type { Action, Device } from "./types"; -import { TransactionStatus } from "../../generated/types"; +import type { TransactionStatus } from "../../generated/types"; type State = { initSwapResult: InitSwapResult | null | undefined; @@ -103,9 +103,6 @@ const reducer = (state: State, e: SwapRequestEvent) => { isLoading: false, }; } - - // FIXME it is supposed to be unreachable but it seems to be reached in swap flow. so we must preserve returning the state - return state; }; function useFrozenValue(value: T, frozen: boolean): T { diff --git a/libs/ledger-live-common/src/hw/deviceAccess.ts b/libs/ledger-live-common/src/hw/deviceAccess.ts index 7baa4d56ebd5..345fd77266df 100644 --- a/libs/ledger-live-common/src/hw/deviceAccess.ts +++ b/libs/ledger-live-common/src/hw/deviceAccess.ts @@ -14,6 +14,7 @@ import { DeviceHalted, PeerRemovedPairing, PairingFailed, + DeviceMangementKitError, } from "@ledgerhq/errors"; import { LocalTracer, TraceContext, trace } from "@ledgerhq/logs"; import { getEnv } from "@ledgerhq/live-env"; @@ -32,6 +33,15 @@ const initialErrorRemapping = (error: unknown, context?: TraceContext) => { } } + // HANDLE DMK ERRORS + if (error && typeof error === "object" && "_tag" in error) { + const message = + "originalError" in error && typeof error.originalError === "object" + ? ((error.originalError as Error).message as string) + : (error._tag as string); + mappedError = new DeviceMangementKitError(error._tag as string, message); + } + trace({ type: LOG_TYPE, message: `Initial error remapping: ${error}`, @@ -46,6 +56,7 @@ let errorRemapping = e => throwError(() => e); export const setErrorRemapping = (f: (arg0: Error) => Observable): void => { errorRemapping = f; }; + const never = new Promise(() => {}); /** diff --git a/libs/ledger-live-common/src/hw/getAddress/types.ts b/libs/ledger-live-common/src/hw/getAddress/types.ts index 1b93e3237ae3..103bb7ef2682 100644 --- a/libs/ledger-live-common/src/hw/getAddress/types.ts +++ b/libs/ledger-live-common/src/hw/getAddress/types.ts @@ -1,6 +1,6 @@ import Transport from "@ledgerhq/hw-transport"; -import { GetAddressOptions, Result } from "@ledgerhq/coin-framework/derivation"; +import type { GetAddressOptions, Result } from "@ledgerhq/coin-framework/derivation"; -export { GetAddressOptions, Result }; +export type { GetAddressOptions, Result }; export type Resolver = (transport: Transport, addressOpt: GetAddressOptions) => Promise; diff --git a/libs/ledger-live-common/src/hw/getOnboardingStatePolling.ts b/libs/ledger-live-common/src/hw/getOnboardingStatePolling.ts index 052fcae2a43e..d61bc13eb186 100644 --- a/libs/ledger-live-common/src/hw/getOnboardingStatePolling.ts +++ b/libs/ledger-live-common/src/hw/getOnboardingStatePolling.ts @@ -30,6 +30,7 @@ export type GetOnboardingStatePollingArgs = { pollingPeriodMs: number; transportAbortTimeoutMs?: number; safeGuardTimeoutMs?: number; + allowedErrorChecks?: ((error: unknown) => boolean)[]; }; /** @@ -52,6 +53,7 @@ export const getOnboardingStatePolling = ({ pollingPeriodMs, transportAbortTimeoutMs = pollingPeriodMs - 100, safeGuardTimeoutMs = pollingPeriodMs * 10, // Nb Empirical value + allowedErrorChecks = [], }: GetOnboardingStatePollingArgs): GetOnboardingStatePollingResult => { const getOnboardingStateOnce = (): Observable => { return withDevice(deviceId, { openTimeoutMs: transportAbortTimeoutMs })(t => @@ -60,7 +62,10 @@ export const getOnboardingStatePolling = ({ timeout(safeGuardTimeoutMs), // Throws a TimeoutError first(), catchError((error: unknown) => { - if (isAllowedOnboardingStatePollingError(error)) { + if ( + isAllowedOnboardingStatePollingError(error) || + allowedErrorChecks?.some(fn => fn(error)) + ) { // Pushes the error to the next step to be processed (no retry from the beginning) return of(error as Error); } diff --git a/libs/ledger-live-common/src/mock/account.ts b/libs/ledger-live-common/src/mock/account.ts index ba977c0eaed4..402952467f73 100644 --- a/libs/ledger-live-common/src/mock/account.ts +++ b/libs/ledger-live-common/src/mock/account.ts @@ -14,7 +14,7 @@ import { CosmosAccount } from "../families/cosmos/types"; import { BitcoinAccount } from "@ledgerhq/coin-bitcoin/types"; import { PolkadotAccount } from "@ledgerhq/coin-polkadot/types/index"; import { TezosAccount } from "@ledgerhq/coin-tezos/types/index"; -import { TronAccount } from "@ledgerhq/coin-tron/types"; +import { TronAccount } from "@ledgerhq/coin-tron/types/index"; import { CardanoAccount, PaymentChain } from "@ledgerhq/coin-cardano/types"; import { types } from "@stricahq/typhonjs"; diff --git a/libs/ledger-live-common/src/onboarding/hooks/useOnboardingStatePolling.ts b/libs/ledger-live-common/src/onboarding/hooks/useOnboardingStatePolling.ts index 961b4990cfcf..bacc446983f2 100644 --- a/libs/ledger-live-common/src/onboarding/hooks/useOnboardingStatePolling.ts +++ b/libs/ledger-live-common/src/onboarding/hooks/useOnboardingStatePolling.ts @@ -27,6 +27,7 @@ export type UseOnboardingStatePollingArgs = UseOnboardingStatePollingDependencie device: Device | null; pollingPeriodMs: number; stopPolling?: boolean; + allowedErrorChecks?: ((error: unknown) => boolean)[]; }; /** @@ -49,6 +50,7 @@ export const useOnboardingStatePolling = ({ device, pollingPeriodMs, stopPolling = false, + allowedErrorChecks = [], }: UseOnboardingStatePollingArgs): UseOnboardingStatePollingResult => { const [onboardingState, setOnboardingState] = useState(null); const [allowedError, setAllowedError] = useState(null); @@ -64,6 +66,7 @@ export const useOnboardingStatePolling = ({ onboardingStatePollingSubscription = getOnboardingStatePolling({ deviceId: device.deviceId, pollingPeriodMs, + allowedErrorChecks, }).subscribe({ next: (onboardingStatePollingResult: OnboardingStatePollingResult) => { if (onboardingStatePollingResult) { diff --git a/libs/ledger-live-common/src/platform/utils/extractDappURLFromManifest.ts b/libs/ledger-live-common/src/platform/utils/extractDappURLFromManifest.ts index d6cc7d9b2c73..cc41bd093e32 100644 --- a/libs/ledger-live-common/src/platform/utils/extractDappURLFromManifest.ts +++ b/libs/ledger-live-common/src/platform/utils/extractDappURLFromManifest.ts @@ -12,6 +12,9 @@ export function extractDappURLFromManifest(manifest: LiveAppManifest): URL | und } if (manifest && manifest.dapp) { try { + if (manifest.url instanceof URL) { + return manifest.url; + } const url = new URL(manifest.url); return url; } catch (error) { diff --git a/libs/ledger-live-common/src/tsconfig.json b/libs/ledger-live-common/src/tsconfig.json index b82cdc322005..bc74da9eb249 100644 --- a/libs/ledger-live-common/src/tsconfig.json +++ b/libs/ledger-live-common/src/tsconfig.json @@ -7,7 +7,6 @@ "noImplicitThis": false, "downlevelIteration": true, "isolatedModules": false, - "module": "commonjs", "jsx": "react", "lib": ["es2020", "dom"], "rootDir": ".", diff --git a/libs/ledger-live-common/src/wallet-api/types.ts b/libs/ledger-live-common/src/wallet-api/types.ts index e4b4e1df81c1..04488ba2c093 100644 --- a/libs/ledger-live-common/src/wallet-api/types.ts +++ b/libs/ledger-live-common/src/wallet-api/types.ts @@ -17,7 +17,7 @@ export type { export type { WalletAPIServer } from "@ledgerhq/wallet-api-server"; -export { +export type { CurrencyType as WalletAPICurrencyType, TokenStandard as WalletAPITokenStandard, } from "@ledgerhq/wallet-api-core"; diff --git a/libs/ledger-live-common/tsconfig.json b/libs/ledger-live-common/tsconfig.json index 611c8ea74c18..26c08eb81271 100644 --- a/libs/ledger-live-common/tsconfig.json +++ b/libs/ledger-live-common/tsconfig.json @@ -8,7 +8,8 @@ "outDir": "lib", // if out path for a file is same as its src path, nothing will be emitted "jsx": "react", "lib": ["es2020", "dom"], - "composite": true // required on the dependency project for references to work + "composite": true, // required on the dependency project for references to work + "isolatedModules": false }, "files": [ // by whitelisting the files to include, TS won't automatically diff --git a/libs/ledger-services/cal/package.json b/libs/ledger-services/cal/package.json index 6357dd9eb88d..d7b4af284b23 100644 --- a/libs/ledger-services/cal/package.json +++ b/libs/ledger-services/cal/package.json @@ -71,11 +71,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --passWithNoTests", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/ledger-services/cal/tsconfig.json b/libs/ledger-services/cal/tsconfig.json index b5b8c9f82cfd..f7a09904f051 100644 --- a/libs/ledger-services/cal/tsconfig.json +++ b/libs/ledger-services/cal/tsconfig.json @@ -4,7 +4,6 @@ "declaration": true, "declarationMap": true, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "outDir": "lib" }, diff --git a/libs/ledger-services/trust/package.json b/libs/ledger-services/trust/package.json index a164ac525eb0..40992d2bb93e 100644 --- a/libs/ledger-services/trust/package.json +++ b/libs/ledger-services/trust/package.json @@ -70,11 +70,11 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "coverage": "jest --coverage --passWithNoTests", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/ledger-services/trust/tsconfig.json b/libs/ledger-services/trust/tsconfig.json index b5b8c9f82cfd..f7a09904f051 100644 --- a/libs/ledger-services/trust/tsconfig.json +++ b/libs/ledger-services/trust/tsconfig.json @@ -4,7 +4,6 @@ "declaration": true, "declarationMap": true, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "outDir": "lib" }, diff --git a/libs/ledgerjs/packages/context-module/package.json b/libs/ledgerjs/packages/context-module/package.json index 1aa16abce5c0..2afc6ee5b948 100644 --- a/libs/ledgerjs/packages/context-module/package.json +++ b/libs/ledgerjs/packages/context-module/package.json @@ -10,9 +10,9 @@ "types": "lib/index.d.ts", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc -p src && tsc -p src -m ES6 --outDir lib-es", + "build": "tsc -p src && tsc -p src -m ES6 --moduleResolution bundler --outDir lib-es", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "test": "jest" }, "keywords": [], diff --git a/libs/ledgerjs/packages/context-module/tsconfig.json b/libs/ledgerjs/packages/context-module/tsconfig.json index 3141ab2199df..c74f40f93e88 100644 --- a/libs/ledgerjs/packages/context-module/tsconfig.json +++ b/libs/ledgerjs/packages/context-module/tsconfig.json @@ -4,7 +4,7 @@ "rootDir": ".", "outDir": ".", // if out path for a file is same as its src path, nothing will be emitted "resolveJsonModule": true, - "composite": true // required on the dependency project for references to work + "composite": true, // required on the dependency project for references to work }, "files": [ // by whitelisting the files to include, TS won't automatically diff --git a/libs/ledgerjs/packages/cryptoassets-evm-signatures/package.json b/libs/ledgerjs/packages/cryptoassets-evm-signatures/package.json index 73abe12158a6..84cecffb4c2a 100644 --- a/libs/ledgerjs/packages/cryptoassets-evm-signatures/package.json +++ b/libs/ledgerjs/packages/cryptoassets-evm-signatures/package.json @@ -21,10 +21,10 @@ "types": "lib/index.d.ts", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/cryptoassets/package.json b/libs/ledgerjs/packages/cryptoassets/package.json index a6b368408000..5daf21cbe765 100644 --- a/libs/ledgerjs/packages/cryptoassets/package.json +++ b/libs/ledgerjs/packages/cryptoassets/package.json @@ -21,10 +21,10 @@ "types": "lib/index.d.ts", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/devices/package.json b/libs/ledgerjs/packages/devices/package.json index a256804d93d7..dffacb21e445 100644 --- a/libs/ledgerjs/packages/devices/package.json +++ b/libs/ledgerjs/packages/devices/package.json @@ -71,10 +71,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/errors/package.json b/libs/ledgerjs/packages/errors/package.json index 1bd6f98da516..c391024a8057 100644 --- a/libs/ledgerjs/packages/errors/package.json +++ b/libs/ledgerjs/packages/errors/package.json @@ -22,10 +22,10 @@ "license": "Apache-2.0", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/errors/src/helpers.ts b/libs/ledgerjs/packages/errors/src/helpers.ts index 3fcb7a189786..e339bb159b65 100644 --- a/libs/ledgerjs/packages/errors/src/helpers.ts +++ b/libs/ledgerjs/packages/errors/src/helpers.ts @@ -39,7 +39,8 @@ export const createCustomErrorClass = < this[k] = fields[k]; } } - if (options && isObject(options) && "cause" in options && !("cause" in this)) { + + if (options && isObject(options) && "cause" in options && !this.cause) { // .cause was specified but the superconstructor // did not create an instance property. const cause = options.cause; diff --git a/libs/ledgerjs/packages/errors/src/index.ts b/libs/ledgerjs/packages/errors/src/index.ts index 992aed2c31ce..6ad0e6baf8ff 100644 --- a/libs/ledgerjs/packages/errors/src/index.ts +++ b/libs/ledgerjs/packages/errors/src/index.ts @@ -378,6 +378,14 @@ export class LockedDeviceError extends TransportStatusError { } } +export class DeviceMangementKitError extends Error { + constructor(name: string, message: string) { + super(message); + this.name = name; + Object.setPrototypeOf(this, DeviceMangementKitError.prototype); + } +} + // Represents the type of the class TransportStatusError and its children export type TransportStatusErrorClassType = typeof TransportStatusError | typeof LockedDeviceError; diff --git a/libs/ledgerjs/packages/hw-app-algorand/package.json b/libs/ledgerjs/packages/hw-app-algorand/package.json index 73a69b7c6bba..6580933dd77d 100644 --- a/libs/ledgerjs/packages/hw-app-algorand/package.json +++ b/libs/ledgerjs/packages/hw-app-algorand/package.json @@ -47,10 +47,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-aptos/package.json b/libs/ledgerjs/packages/hw-app-aptos/package.json index caecf8b16612..f4018963e016 100644 --- a/libs/ledgerjs/packages/hw-app-aptos/package.json +++ b/libs/ledgerjs/packages/hw-app-aptos/package.json @@ -45,10 +45,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-btc/package.json b/libs/ledgerjs/packages/hw-app-btc/package.json index acf7cd1d84e4..83f10af03bf9 100644 --- a/libs/ledgerjs/packages/hw-app-btc/package.json +++ b/libs/ledgerjs/packages/hw-app-btc/package.json @@ -88,10 +88,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-cosmos/package.json b/libs/ledgerjs/packages/hw-app-cosmos/package.json index 13ec813bd61c..0575b40691db 100644 --- a/libs/ledgerjs/packages/hw-app-cosmos/package.json +++ b/libs/ledgerjs/packages/hw-app-cosmos/package.json @@ -44,10 +44,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-dmk-eth/CHANGELOG.md b/libs/ledgerjs/packages/hw-app-dmk-eth/CHANGELOG.md new file mode 100644 index 000000000000..791137f236e7 --- /dev/null +++ b/libs/ledgerjs/packages/hw-app-dmk-eth/CHANGELOG.md @@ -0,0 +1 @@ +# @ledgerhq/hw-app-dmk-eth diff --git a/libs/ledgerjs/packages/hw-app-dmk-eth/README.md b/libs/ledgerjs/packages/hw-app-dmk-eth/README.md new file mode 100644 index 000000000000..11ccf719d034 --- /dev/null +++ b/libs/ledgerjs/packages/hw-app-dmk-eth/README.md @@ -0,0 +1,9 @@ + + +[GitHub](https://github.com/LedgerHQ/ledger-live/), +[Ledger Devs Discord](https://developers.ledger.com/discord-pro), +[Developer Portal](https://developers.ledger.com/) + +## @ledgerhq/hw-app-dmk-eth + +Ledger Hardware Wallet ETH JavaScript bindings via DMK. diff --git a/libs/ledgerjs/packages/hw-app-dmk-eth/jest.config.ts b/libs/ledgerjs/packages/hw-app-dmk-eth/jest.config.ts new file mode 100644 index 000000000000..c4f012862710 --- /dev/null +++ b/libs/ledgerjs/packages/hw-app-dmk-eth/jest.config.ts @@ -0,0 +1,6 @@ +import baseConfig from "../../jest.config"; + +export default { + ...baseConfig, + rootDir: __dirname, +}; diff --git a/libs/ledgerjs/packages/hw-app-dmk-eth/package.json b/libs/ledgerjs/packages/hw-app-dmk-eth/package.json new file mode 100644 index 000000000000..62e68dd1c557 --- /dev/null +++ b/libs/ledgerjs/packages/hw-app-dmk-eth/package.json @@ -0,0 +1,55 @@ +{ + "name": "@ledgerhq/hw-app-dmk-eth", + "version": "0.1.0", + "private": true, + "description": "Ledger Hardware Wallet Ethereum Application API via Device Management Kit", + "keywords": [ + "Ledger", + "LedgerWallet", + "eth", + "NanoS", + "Blue", + "Hardware Wallet" + ], + "repository": { + "type": "git", + "url": "https://github.com/LedgerHQ/ledger-live.git" + }, + "bugs": { + "url": "https://github.com/LedgerHQ/ledger-live/issues" + }, + "homepage": "https://github.com/LedgerHQ/ledger-live/tree/develop/libs/ledgerjs/packages/hw-app-eth", + "publishConfig": { + "access": "public" + }, + "main": "lib/DmkSignerEth.js", + "module": "lib-es/DmkSignerEth.js", + "types": "lib/DmkSignerEth.d.ts", + "license": "Apache-2.0", + "dependencies": { + "@ledgerhq/context-module": "^1.1.0", + "@ledgerhq/device-management-kit": "0.0.0-develop-20250106155719", + "@ledgerhq/device-signer-kit-ethereum": "^1.1.0", + "rxjs": "7.8.1" + }, + "scripts": { + "clean": "rimraf lib lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", + "prewatch": "pnpm build", + "watch": "tsc --watch", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", + "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", + "lint:fix": "pnpm lint --fix", + "test": "jest" + }, + "devDependencies": { + "@ledgerhq/types-live": "workspace:^", + "@types/jest": "^29.5.10", + "@types/node": "22.10.1", + "jest": "^29.7.0", + "rimraf": "^4.4.1", + "ts-jest": "^29.1.1", + "ts-node": "^10.4.0", + "ws": "8.18.0" + } +} diff --git a/libs/ledgerjs/packages/hw-app-dmk-eth/src/DmkSignerEth.ts b/libs/ledgerjs/packages/hw-app-dmk-eth/src/DmkSignerEth.ts new file mode 100644 index 000000000000..b17ebc4399da --- /dev/null +++ b/libs/ledgerjs/packages/hw-app-dmk-eth/src/DmkSignerEth.ts @@ -0,0 +1,141 @@ +import { lastValueFrom } from "rxjs"; +import { SignerEth, SignerEthBuilder } from "@ledgerhq/device-signer-kit-ethereum"; +import { + DeviceActionState, + DeviceActionStatus, + DeviceManagementKit, + hexaStringToBuffer, +} from "@ledgerhq/device-management-kit"; +import { EIP712Message } from "@ledgerhq/types-live"; +import { + EvmAddress, + EvmSignature, + EvmSigner, + LoadConfig, + ResolutionConfig, +} from "@ledgerhq/types-live"; + +export class DmkSignerEth implements EvmSigner { + private readonly signer: SignerEth; + constructor( + readonly dmk: DeviceManagementKit, + readonly sessionId: string, + ) { + this.signer = new SignerEthBuilder({ + dmk, + sessionId, + }).build(); + } + private _mapResult(actionState: DeviceActionState): T { + switch (actionState.status) { + case DeviceActionStatus.Completed: { + return actionState.output; + } + case DeviceActionStatus.Error: { + throw actionState.error; + } + case DeviceActionStatus.NotStarted: + case DeviceActionStatus.Pending: + case DeviceActionStatus.Stopped: + default: { + throw new Error("Unknown device action status"); + } + } + } + + async signPersonalMessage(path: string, messageHex: string): Promise { + const buffer = hexaStringToBuffer(messageHex); + + if (!buffer) { + throw new Error("Invalid message"); + } + + const result = this._mapResult( + await lastValueFrom(this.signer.signMessage(path, buffer).observable), + ); + + return { + r: result.r.slice(2), + s: result.s.slice(2), + v: result.v, + }; + } + + async getAddress( + path: string, + boolDisplay?: boolean, + boolChaincode?: boolean, + _chainId?: string, + ): Promise { + const result = this._mapResult( + await lastValueFrom( + this.signer.getAddress(path, { + checkOnDevice: boolDisplay, + returnChainCode: boolChaincode, + }).observable, + ), + ); + + return { + publicKey: result.publicKey, + address: result.address, + chainCode: result.chainCode, + }; + } + async signTransaction(path: string, rawTxHex: string, _resolution?: any): Promise { + const buffer = hexaStringToBuffer(rawTxHex); + + if (!buffer) { + throw new Error("Invalid transaction"); + } + + const result = this._mapResult( + // TODO: type will be fixed by the next signer version. + // @ts-ignore + await lastValueFrom(this.signer.signTransaction(path, buffer).observable), + ); + + return { + r: result.r.slice(2), + s: result.s.slice(2), + v: result.v, + }; + } + + async signEIP712Message( + path: string, + jsonMessage: EIP712Message, + _fullImplem?: boolean, + ): Promise { + const result = this._mapResult( + await lastValueFrom(this.signer.signTypedData(path, jsonMessage).observable), + ); + + return { + r: result.r.slice(2), + s: result.s.slice(2), + v: result.v, + }; + } + + setLoadConfig(_config: LoadConfig) { + console.log("not implemented"); + } + + clearSignTransaction( + path: string, + rawTxHex: string, + _resolutionConfig: ResolutionConfig, + _throwOnError: boolean, + ): Promise { + return this.signTransaction(path, rawTxHex); + } + + signEIP712HashedMessage( + _path: string, + _domainSeparatorHex: string, + _hashStructMessageHex: string, + ): Promise { + throw new Error("Method not implemented."); + } +} diff --git a/libs/ledgerjs/packages/hw-app-dmk-eth/tests/DmkSignerEth.test.ts b/libs/ledgerjs/packages/hw-app-dmk-eth/tests/DmkSignerEth.test.ts new file mode 100644 index 000000000000..9a291b3c335d --- /dev/null +++ b/libs/ledgerjs/packages/hw-app-dmk-eth/tests/DmkSignerEth.test.ts @@ -0,0 +1,428 @@ +import { DeviceActionStatus, DeviceManagementKit } from "@ledgerhq/device-management-kit"; +import { EIP712Message } from "@ledgerhq/types-live"; +import { of } from "rxjs"; +import { DmkSignerEth } from "../src/DmkSignerEth"; + +console.log = jest.fn(); + +describe("DmkSignerEth", () => { + const dmkMock = { + executeDeviceAction: jest.fn(), + }; + let signer: DmkSignerEth; + + beforeEach(() => { + jest.clearAllMocks(); + + signer = new DmkSignerEth(dmkMock as unknown as DeviceManagementKit, "sessionId"); + }); + + describe("getAddress", () => { + it("should get the address without boolDisplay and boolChainCode", async () => { + // GIVEN + const path = "path"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Completed, + output: { + address: "address", + publicKey: "publicKey", + chainCode: undefined, + }, + }), + }); + + // WHEN + const result = await signer.getAddress(path); + + // THEN + expect(dmkMock.executeDeviceAction).toHaveBeenCalledWith( + expect.objectContaining({ + deviceAction: expect.objectContaining({ + input: expect.objectContaining({ + appName: "Ethereum", + command: expect.objectContaining({ + args: expect.objectContaining({ + derivationPath: "path", + checkOnDevice: undefined, + returnChainCode: undefined, + }), + }), + }), + }), + sessionId: "sessionId", + }), + ); + expect(result).toEqual({ + address: "address", + publicKey: "publicKey", + chainCode: undefined, + }); + }); + + it("should get the address with boolDisplay and boolChainCode", async () => { + // GIVEN + const path = "path"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Completed, + output: { + address: "address", + publicKey: "publicKey", + chainCode: "chainCode", + }, + }), + }); + + // WHEN + const result = await signer.getAddress(path, true, true); + + // THEN + expect(dmkMock.executeDeviceAction).toHaveBeenCalledWith( + expect.objectContaining({ + deviceAction: expect.objectContaining({ + input: expect.objectContaining({ + appName: "Ethereum", + command: expect.objectContaining({ + args: expect.objectContaining({ + derivationPath: "path", + checkOnDevice: true, + returnChainCode: true, + }), + }), + }), + }), + sessionId: "sessionId", + }), + ); + expect(result).toEqual({ + address: "address", + publicKey: "publicKey", + chainCode: "chainCode", + }); + }); + + it("should throw the error if the device action is failed", async () => { + // GIVEN + const path = "path"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Error, + error: new Error("error"), + }), + }); + + // WHEN + try { + await signer.getAddress(path); + fail("should throw an error"); + } catch (error) { + // THEN + expect(error).toEqual(new Error("error")); + } + }); + + it.each([ + DeviceActionStatus.NotStarted, + DeviceActionStatus.Pending, + DeviceActionStatus.Stopped, + ])(`should throw an error if the device action status is %s`, async status => { + // GIVEN + const path = "path"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status, + }), + }); + + // WHEN + try { + await signer.getAddress(path); + fail("should throw an error"); + } catch (error) { + // THEN + expect(error).toEqual(new Error("Unknown device action status")); + } + }); + }); + + describe("signPersonalMessage", () => { + it("should sign the personal message", async () => { + // GIVEN + const path = "path"; + const messageHex = "0x010203040506"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Completed, + output: { + r: "0x01", + s: "0x02", + v: 0x03, + }, + }), + }); + + // WHEN + const result = await signer.signPersonalMessage(path, messageHex); + + // THEN + expect(dmkMock.executeDeviceAction).toHaveBeenCalledWith( + expect.objectContaining({ + deviceAction: expect.objectContaining({ + input: expect.objectContaining({ + derivationPath: "path", + message: Uint8Array.from([0x01, 0x02, 0x03, 0x04, 0x05, 0x06]), + }), + }), + sessionId: "sessionId", + }), + ); + expect(result).toEqual({ + r: "01", + s: "02", + v: 3, + }); + }); + + it("should throw an error if the message is invalid", async () => { + // GIVEN + const path = "path"; + const messageHex = "invalid"; + + // WHEN + try { + await signer.signPersonalMessage(path, messageHex); + fail("should throw an error"); + } catch (error) { + // THEN + expect(error).toEqual(new Error("Invalid message")); + } + }); + + it("should throw the error if the device action is failed", async () => { + // GIVEN + const path = "path"; + const messageHex = "0x010203040506"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Error, + error: new Error("error"), + }), + }); + + // WHEN + try { + await signer.signPersonalMessage(path, messageHex); + fail("should throw an error"); + } catch (error) { + // THEN + expect(error).toEqual(new Error("error")); + } + }); + + it.each([ + DeviceActionStatus.NotStarted, + DeviceActionStatus.Pending, + DeviceActionStatus.Stopped, + ])(`should throw an error if the device action status is %s`, async status => { + // GIVEN + const path = "path"; + const messageHex = "0x010203040506"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status, + }), + }); + + // WHEN + try { + await signer.signPersonalMessage(path, messageHex); + fail("should throw an error"); + } catch (error) { + // THEN + expect(error).toEqual(new Error("Unknown device action status")); + } + }); + }); + + describe("signTransaction", () => { + it("should sign the transaction", async () => { + // GIVEN + const path = "path"; + const rawTxHex = "0x010203040506"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Completed, + output: { + r: "0x01", + s: "0x02", + v: 0x03, + }, + }), + }); + + // WHEN + const result = await signer.signTransaction(path, rawTxHex); + + // THEN + expect(dmkMock.executeDeviceAction).toHaveBeenCalledWith( + expect.objectContaining({ + deviceAction: expect.objectContaining({ + input: expect.objectContaining({ + derivationPath: "path", + transaction: Uint8Array.from([0x01, 0x02, 0x03, 0x04, 0x05, 0x06]), + }), + }), + sessionId: "sessionId", + }), + ); + expect(result).toEqual({ + r: "01", + s: "02", + v: 3, + }); + }); + + it("should throw an error if the transaction is invalid", async () => { + // GIVEN + const path = "path"; + const rawTxHex = "invalid"; + + // WHEN + try { + await signer.signTransaction(path, rawTxHex); + fail("should throw an error"); + } catch (error) { + // THEN + expect(error).toEqual(new Error("Invalid transaction")); + } + }); + }); + + describe("clearSignTransaction", () => { + it("should sign the transaction", async () => { + // GIVEN + const path = "path"; + const rawTxHex = "0x010203040506"; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Completed, + output: { + r: "0x01", + s: "0x02", + v: 0x03, + }, + }), + }); + + // WHEN + const result = await signer.clearSignTransaction(path, rawTxHex, {}, false); + + // THEN + expect(dmkMock.executeDeviceAction).toHaveBeenCalledWith( + expect.objectContaining({ + deviceAction: expect.objectContaining({ + input: expect.objectContaining({ + derivationPath: "path", + transaction: Uint8Array.from([0x01, 0x02, 0x03, 0x04, 0x05, 0x06]), + }), + }), + sessionId: "sessionId", + }), + ); + expect(result).toEqual({ + r: "01", + s: "02", + v: 3, + }); + }); + }); + + describe("signEIP712Message", () => { + it("should sign the EIP712 message", async () => { + // GIVEN + const path = "path"; + const message = { message: "message" } as unknown as EIP712Message; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Completed, + output: { + r: "0x01", + s: "0x02", + v: 0x03, + }, + }), + }); + + // WHEN + const result = await signer.signEIP712Message(path, message); + + // THEN + expect(dmkMock.executeDeviceAction).toHaveBeenCalledWith( + expect.objectContaining({ + deviceAction: expect.objectContaining({ + input: expect.objectContaining({ + derivationPath: "path", + data: { message: "message" }, + }), + }), + sessionId: "sessionId", + }), + ); + expect(result).toEqual({ + r: "01", + s: "02", + v: 3, + }); + }); + + it("should throw the error if the device action is failed", async () => { + // GIVEN + const path = "path"; + const message = { message: "message" } as unknown as EIP712Message; + dmkMock.executeDeviceAction.mockReturnValue({ + observable: of({ + status: DeviceActionStatus.Error, + error: new Error("error"), + }), + }); + + // WHEN + try { + await signer.signEIP712Message(path, message); + fail("should throw an error"); + } catch (error) { + // THEN + expect(error).toEqual(new Error("error")); + } + }); + }); + + describe("setLoadConfig", () => { + it("should do nothing", () => { + // WHEN + signer.setLoadConfig({}); + + // THEN + expect(dmkMock.executeDeviceAction).not.toHaveBeenCalled(); + }); + }); + + describe("signEIP712HashedMessage", () => { + it("should throw an error", async () => { + // GIVEN + const path = "path"; + const domainSeparatorHex = "domainSeparatorHex"; + const hashStructMessageHex = "hashStructMessageHex"; + + // WHEN + try { + await signer.signEIP712HashedMessage(path, domainSeparatorHex, hashStructMessageHex); + fail("should throw an error"); + } catch (error) { + // THEN + expect(error).toEqual(new Error("Method not implemented.")); + } + }); + }); +}); diff --git a/libs/ledgerjs/packages/hw-app-dmk-eth/tests/tsconfig.json b/libs/ledgerjs/packages/hw-app-dmk-eth/tests/tsconfig.json new file mode 100644 index 000000000000..86bdfdd9db7b --- /dev/null +++ b/libs/ledgerjs/packages/hw-app-dmk-eth/tests/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": null, + "types": ["node", "jest"] + }, + "include": ["."] +} diff --git a/libs/ledgerjs/packages/hw-app-dmk-eth/tsconfig.json b/libs/ledgerjs/packages/hw-app-dmk-eth/tsconfig.json new file mode 100644 index 000000000000..2814f0db34d8 --- /dev/null +++ b/libs/ledgerjs/packages/hw-app-dmk-eth/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "lib", + }, + "include": ["src/*"] +} diff --git a/libs/ledgerjs/packages/hw-app-elrond/package.json b/libs/ledgerjs/packages/hw-app-elrond/package.json index 300b2658aac8..2c80c4e8602c 100644 --- a/libs/ledgerjs/packages/hw-app-elrond/package.json +++ b/libs/ledgerjs/packages/hw-app-elrond/package.json @@ -46,10 +46,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-eth/package.json b/libs/ledgerjs/packages/hw-app-eth/package.json index 6eac27200026..a1e9fe47b668 100644 --- a/libs/ledgerjs/packages/hw-app-eth/package.json +++ b/libs/ledgerjs/packages/hw-app-eth/package.json @@ -43,10 +43,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-eth/src/Eth.ts b/libs/ledgerjs/packages/hw-app-eth/src/Eth.ts index 42c1e7ae2b22..824d932d5d83 100644 --- a/libs/ledgerjs/packages/hw-app-eth/src/Eth.ts +++ b/libs/ledgerjs/packages/hw-app-eth/src/Eth.ts @@ -3,7 +3,7 @@ import { log } from "@ledgerhq/logs"; import { BigNumber } from "bignumber.js"; import type Transport from "@ledgerhq/hw-transport"; -import { EIP712Message } from "@ledgerhq/types-live"; +import type { EIP712Message, EvmSigner } from "@ledgerhq/types-live"; import { parse as parseTransaction } from "@ethersproject/transactions"; import { LedgerEthTransactionResolution, LoadConfig, ResolutionConfig } from "./services/types"; import { EthAppNftNotSupported, EthAppPleaseEnableContractData } from "./errors"; @@ -50,7 +50,7 @@ const remapTransactionRelatedErrors = e => { * const eth = new Eth(transport) */ -export default class Eth { +export default class Eth implements EvmSigner { transport: Transport; loadConfig: LoadConfig; diff --git a/libs/ledgerjs/packages/hw-app-eth/src/services/types.ts b/libs/ledgerjs/packages/hw-app-eth/src/services/types.ts index 45d1a3445703..430a1b0cf250 100644 --- a/libs/ledgerjs/packages/hw-app-eth/src/services/types.ts +++ b/libs/ledgerjs/packages/hw-app-eth/src/services/types.ts @@ -1,8 +1,16 @@ -import { DomainServiceResolution as DomainDescriptor } from "@ledgerhq/domain-service/types"; import { signAddressResolution, signDomainResolution, } from "@ledgerhq/domain-service/signers/index"; +import { + DomainServiceResolution, + LoadConfig as LoadConfigTypesLive, + ResolutionConfig as ResolutionConfigTypesLive, +} from "@ledgerhq/types-live"; + +// export types from @ledgerhq/types-live for compatibility +export type LoadConfig = LoadConfigTypesLive; +export type ResolutionConfig = ResolutionConfigTypesLive; export type LedgerEthTransactionResolution = { // device serialized data that contains ERC20 data (hex format) @@ -14,38 +22,7 @@ export type LedgerEthTransactionResolution = { // device serialized data that contains plugin data (hex format) plugin: Array; // device serialized data that contain trusted names data (hex format) - domains: DomainDescriptor[]; -}; - -export type LoadConfig = { - // Backend service responsible for signed NFT APDUS - nftExplorerBaseURL?: string | null; - // example of payload https://cdn.live.ledger.com/plugins/ethereum/1.json - // fetch against an api (base url is an api that hosts /plugins/ethereum/${chainId}.json ) - // set to null will disable it - pluginBaseURL?: string | null; - // provide manually some extra plugins to add for the resolution (e.g. for dev purpose) - // object will be merged with the returned value of the Ledger cdn payload - extraPlugins?: any | null; - cryptoassetsBaseURL?: string | null; - calServiceURL?: string | null; -}; - -/** - * Allows to configure precisely what the service need to resolve. - * for instance you can set nft:true if you need clear signing on NFTs. If you set it and it is not a NFT transaction, it should still work but will do a useless service resolution. - */ -export type ResolutionConfig = { - // NFT resolution service - nft?: boolean; - // external plugins resolution service (e.G. LIDO) - externalPlugins?: boolean; - // ERC20 resolution service (to clear sign erc20 transfers & other actions) - erc20?: boolean; - // List of trusted names (ENS for now) to clear sign - domains?: DomainDescriptor[]; - // activate uniswap v3 plugin resolution - uniswapV3?: boolean; + domains: DomainServiceResolution[]; }; export type LedgerEthTransactionService = { diff --git a/libs/ledgerjs/packages/hw-app-exchange/package.json b/libs/ledgerjs/packages/hw-app-exchange/package.json index 599d7292b778..d11ca02f15cf 100644 --- a/libs/ledgerjs/packages/hw-app-exchange/package.json +++ b/libs/ledgerjs/packages/hw-app-exchange/package.json @@ -47,10 +47,10 @@ "scripts": { "clean": "rimraf lib lib-es", "prebuild": "pnpm pbjs -t json -r ledger_swap -o src/generate-protocol.json ./protocol.proto", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-hedera/package.json b/libs/ledgerjs/packages/hw-app-hedera/package.json index e8c5497e508d..68724d3c0bb6 100644 --- a/libs/ledgerjs/packages/hw-app-hedera/package.json +++ b/libs/ledgerjs/packages/hw-app-hedera/package.json @@ -42,10 +42,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-helium/package.json b/libs/ledgerjs/packages/hw-app-helium/package.json index f7f449bbc955..1b1bbf923ab1 100644 --- a/libs/ledgerjs/packages/hw-app-helium/package.json +++ b/libs/ledgerjs/packages/hw-app-helium/package.json @@ -51,10 +51,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-icon/package.json b/libs/ledgerjs/packages/hw-app-icon/package.json index b69b50f7add9..fee2f7959a06 100644 --- a/libs/ledgerjs/packages/hw-app-icon/package.json +++ b/libs/ledgerjs/packages/hw-app-icon/package.json @@ -45,10 +45,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-near/package.json b/libs/ledgerjs/packages/hw-app-near/package.json index 71e5dc31e000..a909ddf43a2c 100644 --- a/libs/ledgerjs/packages/hw-app-near/package.json +++ b/libs/ledgerjs/packages/hw-app-near/package.json @@ -43,10 +43,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-polkadot/package.json b/libs/ledgerjs/packages/hw-app-polkadot/package.json index 63e04b6661b6..ebf33fc1b3b4 100644 --- a/libs/ledgerjs/packages/hw-app-polkadot/package.json +++ b/libs/ledgerjs/packages/hw-app-polkadot/package.json @@ -45,10 +45,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-solana/package.json b/libs/ledgerjs/packages/hw-app-solana/package.json index ca20b93ed8e9..d94284758e10 100644 --- a/libs/ledgerjs/packages/hw-app-solana/package.json +++ b/libs/ledgerjs/packages/hw-app-solana/package.json @@ -46,10 +46,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-str/package.json b/libs/ledgerjs/packages/hw-app-str/package.json index 3d68778b3f46..ff275451ba1a 100644 --- a/libs/ledgerjs/packages/hw-app-str/package.json +++ b/libs/ledgerjs/packages/hw-app-str/package.json @@ -44,10 +44,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-tezos/package.json b/libs/ledgerjs/packages/hw-app-tezos/package.json index c6aad867b5c1..86cc9602251a 100644 --- a/libs/ledgerjs/packages/hw-app-tezos/package.json +++ b/libs/ledgerjs/packages/hw-app-tezos/package.json @@ -45,10 +45,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-trx/package.json b/libs/ledgerjs/packages/hw-app-trx/package.json index 12895c9876e2..585a605ac4a1 100644 --- a/libs/ledgerjs/packages/hw-app-trx/package.json +++ b/libs/ledgerjs/packages/hw-app-trx/package.json @@ -42,10 +42,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-app-vet/package.json b/libs/ledgerjs/packages/hw-app-vet/package.json index de83ae57ea97..c681fd857bba 100644 --- a/libs/ledgerjs/packages/hw-app-vet/package.json +++ b/libs/ledgerjs/packages/hw-app-vet/package.json @@ -35,10 +35,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx", "lint:fix": "pnpm lint --fix", @@ -52,8 +52,7 @@ "jest": "^29.7.0", "source-map-support": "^0.5.21", "ts-jest": "^29.1.1", - "ts-node": "^10.4.0", - "typescript": "^4" + "ts-node": "^10.4.0" }, "gitHead": "dd0dea64b58e5a9125c8a422dcffd29e5ef6abec" } diff --git a/libs/ledgerjs/packages/hw-app-vet/tsconfig.json b/libs/ledgerjs/packages/hw-app-vet/tsconfig.json index 6cb1875bbe90..bc5a24e083a4 100644 --- a/libs/ledgerjs/packages/hw-app-vet/tsconfig.json +++ b/libs/ledgerjs/packages/hw-app-vet/tsconfig.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "lib", - "moduleResolution": "node" + "moduleResolution": "NodeNext" }, "include": ["src/**/*"] } diff --git a/libs/ledgerjs/packages/hw-app-xrp/package.json b/libs/ledgerjs/packages/hw-app-xrp/package.json index 10b64b4c623a..1958a374b4b4 100644 --- a/libs/ledgerjs/packages/hw-app-xrp/package.json +++ b/libs/ledgerjs/packages/hw-app-xrp/package.json @@ -43,10 +43,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-bolos/package.json b/libs/ledgerjs/packages/hw-bolos/package.json index 0de68806c2b6..fe8a71cf1af1 100644 --- a/libs/ledgerjs/packages/hw-bolos/package.json +++ b/libs/ledgerjs/packages/hw-bolos/package.json @@ -28,10 +28,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-transport-http/package.json b/libs/ledgerjs/packages/hw-transport-http/package.json index 244cc56d16b6..f2bb700a6bfc 100644 --- a/libs/ledgerjs/packages/hw-transport-http/package.json +++ b/libs/ledgerjs/packages/hw-transport-http/package.json @@ -35,10 +35,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/hw-transport-mocker/package.json b/libs/ledgerjs/packages/hw-transport-mocker/package.json index f968601254de..0baec9417e26 100644 --- a/libs/ledgerjs/packages/hw-transport-mocker/package.json +++ b/libs/ledgerjs/packages/hw-transport-mocker/package.json @@ -31,10 +31,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/hw-transport-node-hid-noevents/package.json b/libs/ledgerjs/packages/hw-transport-node-hid-noevents/package.json index 786c8029d9b4..73b4de27a0c0 100644 --- a/libs/ledgerjs/packages/hw-transport-node-hid-noevents/package.json +++ b/libs/ledgerjs/packages/hw-transport-node-hid-noevents/package.json @@ -46,10 +46,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-transport-node-hid-singleton/package.json b/libs/ledgerjs/packages/hw-transport-node-hid-singleton/package.json index c04cdaf9fc2e..e55e998ac6ce 100644 --- a/libs/ledgerjs/packages/hw-transport-node-hid-singleton/package.json +++ b/libs/ledgerjs/packages/hw-transport-node-hid-singleton/package.json @@ -37,10 +37,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-transport-node-hid/package.json b/libs/ledgerjs/packages/hw-transport-node-hid/package.json index c781855c58af..b57c25f40fd2 100644 --- a/libs/ledgerjs/packages/hw-transport-node-hid/package.json +++ b/libs/ledgerjs/packages/hw-transport-node-hid/package.json @@ -38,10 +38,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-transport-node-speculos-http/package.json b/libs/ledgerjs/packages/hw-transport-node-speculos-http/package.json index c9184b015042..fc61d393b318 100644 --- a/libs/ledgerjs/packages/hw-transport-node-speculos-http/package.json +++ b/libs/ledgerjs/packages/hw-transport-node-speculos-http/package.json @@ -36,10 +36,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-transport-node-speculos/package.json b/libs/ledgerjs/packages/hw-transport-node-speculos/package.json index 78b77b1ee259..7b7f8c453654 100644 --- a/libs/ledgerjs/packages/hw-transport-node-speculos/package.json +++ b/libs/ledgerjs/packages/hw-transport-node-speculos/package.json @@ -35,10 +35,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-transport-vault/package.json b/libs/ledgerjs/packages/hw-transport-vault/package.json index 92aacf54bc94..1059e019728f 100644 --- a/libs/ledgerjs/packages/hw-transport-vault/package.json +++ b/libs/ledgerjs/packages/hw-transport-vault/package.json @@ -33,10 +33,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/hw-transport-web-ble/package.json b/libs/ledgerjs/packages/hw-transport-web-ble/package.json index bb193d371d02..0bb1aeea7bd7 100644 --- a/libs/ledgerjs/packages/hw-transport-web-ble/package.json +++ b/libs/ledgerjs/packages/hw-transport-web-ble/package.json @@ -46,10 +46,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/hw-transport-webhid/package.json b/libs/ledgerjs/packages/hw-transport-webhid/package.json index 1868e1d3247c..ae91e31a1755 100644 --- a/libs/ledgerjs/packages/hw-transport-webhid/package.json +++ b/libs/ledgerjs/packages/hw-transport-webhid/package.json @@ -45,10 +45,10 @@ "scripts": { "flow": "flow", "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-transport-webusb/package.json b/libs/ledgerjs/packages/hw-transport-webusb/package.json index dd8c0bda2a57..3c1b77b95689 100644 --- a/libs/ledgerjs/packages/hw-transport-webusb/package.json +++ b/libs/ledgerjs/packages/hw-transport-webusb/package.json @@ -45,10 +45,10 @@ "scripts": { "flow": "flow", "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/hw-transport/package.json b/libs/ledgerjs/packages/hw-transport/package.json index e949a4a5dad4..e584009dc896 100644 --- a/libs/ledgerjs/packages/hw-transport/package.json +++ b/libs/ledgerjs/packages/hw-transport/package.json @@ -32,10 +32,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/logs/package.json b/libs/ledgerjs/packages/logs/package.json index 5e72f5edff90..497f1f2f94fe 100644 --- a/libs/ledgerjs/packages/logs/package.json +++ b/libs/ledgerjs/packages/logs/package.json @@ -22,10 +22,10 @@ "license": "Apache-2.0", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/logs/tsconfig.json b/libs/ledgerjs/packages/logs/tsconfig.json index 835ab20760f8..7488ca59742b 100644 --- a/libs/ledgerjs/packages/logs/tsconfig.json +++ b/libs/ledgerjs/packages/logs/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "lib", - "lib": ["DOM", "ES2016"] + "lib": ["DOM", "ES2016"], + "module": "NodeNext" }, "include": ["src/**/*"] } diff --git a/libs/ledgerjs/packages/react-native-hid/package.json b/libs/ledgerjs/packages/react-native-hid/package.json index f40b4de21880..d8cdac76852c 100755 --- a/libs/ledgerjs/packages/react-native-hid/package.json +++ b/libs/ledgerjs/packages/react-native-hid/package.json @@ -51,10 +51,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/react-native-hw-transport-ble/package.json b/libs/ledgerjs/packages/react-native-hw-transport-ble/package.json index 61907ae076be..78669282f7fe 100644 --- a/libs/ledgerjs/packages/react-native-hw-transport-ble/package.json +++ b/libs/ledgerjs/packages/react-native-hw-transport-ble/package.json @@ -35,10 +35,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest --runInBand", diff --git a/libs/ledgerjs/packages/swift-bridge-hw-app-eth/package.json b/libs/ledgerjs/packages/swift-bridge-hw-app-eth/package.json index 48e566122635..740e058da884 100644 --- a/libs/ledgerjs/packages/swift-bridge-hw-app-eth/package.json +++ b/libs/ledgerjs/packages/swift-bridge-hw-app-eth/package.json @@ -33,10 +33,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/swift-bridge-hw-app-solana/package.json b/libs/ledgerjs/packages/swift-bridge-hw-app-solana/package.json index 17da1e57a825..12c206e22618 100644 --- a/libs/ledgerjs/packages/swift-bridge-hw-app-solana/package.json +++ b/libs/ledgerjs/packages/swift-bridge-hw-app-solana/package.json @@ -33,10 +33,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/swift-bridge-hw-transport-ble/package.json b/libs/ledgerjs/packages/swift-bridge-hw-transport-ble/package.json index 8b71aea5eaba..8f2b01db7584 100644 --- a/libs/ledgerjs/packages/swift-bridge-hw-transport-ble/package.json +++ b/libs/ledgerjs/packages/swift-bridge-hw-transport-ble/package.json @@ -32,10 +32,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/types-cryptoassets/package.json b/libs/ledgerjs/packages/types-cryptoassets/package.json index 8965a6db16ed..02c3b782dfdb 100644 --- a/libs/ledgerjs/packages/types-cryptoassets/package.json +++ b/libs/ledgerjs/packages/types-cryptoassets/package.json @@ -22,10 +22,10 @@ "license": "Apache-2.0", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/types-devices/package.json b/libs/ledgerjs/packages/types-devices/package.json index f769f16efb05..7b1c5e7e5bca 100644 --- a/libs/ledgerjs/packages/types-devices/package.json +++ b/libs/ledgerjs/packages/types-devices/package.json @@ -22,10 +22,10 @@ "license": "Apache-2.0", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "doc": "documentation readme src/** --section=API --pe ts --re ts --re d.ts", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", diff --git a/libs/ledgerjs/packages/types-live/package.json b/libs/ledgerjs/packages/types-live/package.json index c110df224e6e..dc42c1316cbd 100644 --- a/libs/ledgerjs/packages/types-live/package.json +++ b/libs/ledgerjs/packages/types-live/package.json @@ -38,10 +38,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/ledgerjs/packages/types-live/src/evm/config.ts b/libs/ledgerjs/packages/types-live/src/evm/config.ts new file mode 100644 index 000000000000..e4f249709108 --- /dev/null +++ b/libs/ledgerjs/packages/types-live/src/evm/config.ts @@ -0,0 +1,32 @@ +import { DomainServiceResolution } from "../domain"; + +export type LoadConfig = { + // Backend service responsible for signed NFT APDUS + nftExplorerBaseURL?: string | null; + // example of payload https://cdn.live.ledger.com/plugins/ethereum/1.json + // fetch against an api (base url is an api that hosts /plugins/ethereum/${chainId}.json ) + // set to null will disable it + pluginBaseURL?: string | null; + // provide manually some extra plugins to add for the resolution (e.g. for dev purpose) + // object will be merged with the returned value of the Ledger cdn payload + extraPlugins?: any | null; + cryptoassetsBaseURL?: string | null; + calServiceURL?: string | null; +}; + +/** + * Allows to configure precisely what the service need to resolve. + * for instance you can set nft:true if you need clear signing on NFTs. If you set it and it is not a NFT transaction, it should still work but will do a useless service resolution. + */ +export type ResolutionConfig = { + // NFT resolution service + nft?: boolean; + // external plugins resolution service (e.G. LIDO) + externalPlugins?: boolean; + // ERC20 resolution service (to clear sign erc20 transfers & other actions) + erc20?: boolean; + // List of trusted names (ENS for now) to clear sign + domains?: DomainServiceResolution[]; + // activate uniswap v3 plugin resolution + uniswapV3?: boolean; +}; diff --git a/libs/ledgerjs/packages/types-live/src/evm/index.ts b/libs/ledgerjs/packages/types-live/src/evm/index.ts new file mode 100644 index 000000000000..f5ca91b012fe --- /dev/null +++ b/libs/ledgerjs/packages/types-live/src/evm/index.ts @@ -0,0 +1,2 @@ +export * from "./config"; +export * from "./signer"; diff --git a/libs/ledgerjs/packages/types-live/src/evm/signer.ts b/libs/ledgerjs/packages/types-live/src/evm/signer.ts new file mode 100644 index 000000000000..b27a46b464d2 --- /dev/null +++ b/libs/ledgerjs/packages/types-live/src/evm/signer.ts @@ -0,0 +1,42 @@ +import { EIP712Message } from "../messages"; +import { LoadConfig, ResolutionConfig } from "./config"; + +export type EvmAddress = { + publicKey: string; + address: string; + chainCode?: string; +}; + +export type EvmSignature = { + s: string; + v: string | number; + r: string; +}; + +export interface EvmSigner { + getAddress: ( + path: string, + boolDisplay?: boolean, + boolChaincode?: boolean, + chainId?: string, + ) => Promise; + signTransaction: (path: string, rawTxHex: string, resolution?: any) => Promise; + signPersonalMessage(path: string, messageHex: string): Promise; + signEIP712Message( + path: string, + jsonMessage: EIP712Message, + fullImplem?: boolean, + ): Promise; + setLoadConfig: (config: LoadConfig) => void; + clearSignTransaction( + path: string, + rawTxHex: string, + resolutionConfig: ResolutionConfig, + throwOnError: boolean, + ): Promise; + signEIP712HashedMessage( + path: string, + domainSeparatorHex: string, + hashStructMessageHex: string, + ): Promise; +} diff --git a/libs/ledgerjs/packages/types-live/src/index.ts b/libs/ledgerjs/packages/types-live/src/index.ts index 3a1241c5f2ab..6969c9f53a46 100644 --- a/libs/ledgerjs/packages/types-live/src/index.ts +++ b/libs/ledgerjs/packages/types-live/src/index.ts @@ -17,3 +17,4 @@ export * from "./messages"; export * from "./swap"; export * from "./ABTesting"; export * from "./walletSync"; +export * from "./evm"; diff --git a/libs/ledgerjs/tsconfig.json b/libs/ledgerjs/tsconfig.json index d97922e97142..a6d9b06ee461 100644 --- a/libs/ledgerjs/tsconfig.json +++ b/libs/ledgerjs/tsconfig.json @@ -6,9 +6,8 @@ "downlevelIteration": true, "noImplicitAny": false, "noImplicitThis": false, - "module": "commonjs", "lib": ["DOM", "ES2017"], "isolatedModules": false, - "target": "ES6" + "target": "ESNext" } } diff --git a/libs/live-config/package.json b/libs/live-config/package.json index 2da15155e27b..8ee796f51dba 100644 --- a/libs/live-config/package.json +++ b/libs/live-config/package.json @@ -19,10 +19,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx", "lint:fix": "pnpm lint --fix", "test": "jest" @@ -31,13 +31,13 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@types/jest": "^29.5.4", + "@types/jest": "^29.5.14", "@types/lodash": "^4.14.202", - "@types/node": "^20.2.5", - "jest": "^28.1.1", - "jest-environment-jsdom": "28", + "@types/node": "22.10.1", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", "semver": "^7.3.5", - "ts-jest": "^28.0.5" + "ts-jest": "^29.1.1" }, "typesVersions": { "*": { diff --git a/libs/live-config/tsconfig.json b/libs/live-config/tsconfig.json index 3d4a6af532b1..8cbfc08851e8 100644 --- a/libs/live-config/tsconfig.json +++ b/libs/live-config/tsconfig.json @@ -6,7 +6,6 @@ "noImplicitAny": false, "noImplicitThis": false, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "jsx": "react", "outDir": "lib" diff --git a/libs/live-countervalues-react/package.json b/libs/live-countervalues-react/package.json index 1ae4075928a1..afbd623be3bc 100644 --- a/libs/live-countervalues-react/package.json +++ b/libs/live-countervalues-react/package.json @@ -44,10 +44,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/live-countervalues-react/tsconfig.json b/libs/live-countervalues-react/tsconfig.json index f1eda7ec5c36..05a31e972331 100644 --- a/libs/live-countervalues-react/tsconfig.json +++ b/libs/live-countervalues-react/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", "downlevelIteration": true, "jsx": "react", "lib": ["es2020", "dom"], diff --git a/libs/live-countervalues/package.json b/libs/live-countervalues/package.json index 1b8ba6358738..3523c3fcf906 100644 --- a/libs/live-countervalues/package.json +++ b/libs/live-countervalues/package.json @@ -38,10 +38,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/live-countervalues/tsconfig.json b/libs/live-countervalues/tsconfig.json index f1eda7ec5c36..05a31e972331 100644 --- a/libs/live-countervalues/tsconfig.json +++ b/libs/live-countervalues/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", "downlevelIteration": true, "jsx": "react", "lib": ["es2020", "dom"], diff --git a/libs/live-dmk/jest.config.json b/libs/live-dmk/jest.config.json deleted file mode 100644 index b69d05348e91..000000000000 --- a/libs/live-dmk/jest.config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "transform": { - "^.+\\.(ts|tsx)?$": [ - "ts-jest", - { - "globals": { - "isolatedModules": true - } - } - ] - }, - "testPathIgnorePatterns": ["lib/", "lib-es/"], - "testEnvironment": "jest-environment-jsdom" -} diff --git a/libs/live-dmk/package.json b/libs/live-dmk/package.json index 359cfae25ff3..93a5a8ba53d0 100644 --- a/libs/live-dmk/package.json +++ b/libs/live-dmk/package.json @@ -15,20 +15,20 @@ "url": "https://github.com/LedgerHQ/ledger-live/issues" }, "homepage": "https://github.com/LedgerHQ/ledger-live/tree/develop/libs/env", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "module": "lib-es/index.js", + "main": "./lib-es/index.js", + "types": "./lib-es/index.d.ts", "scripts": { - "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "clean": "rimraf lib-es", + "build": "tsc --project tsconfig.prod.json", "prewatch": "pnpm build", - "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch": "tsc --watch --project tsconfig.prod.json", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es --project tsconfig.test.json", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", "unimported": "unimported", - "test": "jest" + "test": "vitest run", + "test:watch": "vitest" }, "typesVersions": { "*": { @@ -36,10 +36,7 @@ "*.json" ], "*": [ - "lib/*" - ], - "lib/*": [ - "lib/*" + "lib-es/*" ], "lib-es/*": [ "lib-es/*" @@ -47,20 +44,24 @@ } }, "dependencies": { - "@ledgerhq/device-management-kit": "^0.5.1", + "@ledgerhq/device-management-kit": "0.0.0-develop-20250106155719", + "@ledgerhq/device-transport-kit-web-hid": "0.0.0-develop-20250106155719", "@ledgerhq/hw-transport": "workspace:^", "@ledgerhq/logs": "^6.12.0", + "@ledgerhq/types-devices": "workspace:^", "react": "^18.3.1", "react-dom": "^18.3.1", "rxjs": "^7.8.1" }, "devDependencies": { - "@testing-library/dom": "^9.3.3", - "@testing-library/jest-dom": "^6.6.2", - "@testing-library/react": "^16.0.1", - "@types/jest": "^29.5.13", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "ts-jest": "^29.2.5" + "@testing-library/dom": "^9.3.4", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.1.0", + "@types/node": "22.10.1", + "@vitejs/plugin-react": "4.3.4", + "jsdom": "25.0.1", + "vite": "6.0.7", + "vitest": "2.1.8", + "ws": "8.18.0" } } diff --git a/libs/live-dmk/src/config/activeDeviceSession.ts b/libs/live-dmk/src/config/activeDeviceSession.ts new file mode 100644 index 000000000000..d22ba69fa139 --- /dev/null +++ b/libs/live-dmk/src/config/activeDeviceSession.ts @@ -0,0 +1,10 @@ +import { BehaviorSubject } from "rxjs"; +import { DeviceManagementKitTransport } from "src/transport/DeviceManagementKitTransport"; + +export const activeDeviceSessionSubject: BehaviorSubject<{ + sessionId: string; + transport: DeviceManagementKitTransport; +} | null> = new BehaviorSubject<{ + sessionId: string; + transport: DeviceManagementKitTransport; +} | null>(null); diff --git a/libs/live-dmk/src/config/deviceIdMap.ts b/libs/live-dmk/src/config/deviceIdMap.ts new file mode 100644 index 000000000000..e94f21d698ae --- /dev/null +++ b/libs/live-dmk/src/config/deviceIdMap.ts @@ -0,0 +1,10 @@ +import { DeviceModelId as DMKDeviceModelId } from "@ledgerhq/device-management-kit"; +import { DeviceModelId as LLDeviceModelId } from "@ledgerhq/types-devices"; + +export const deviceIdMap = { + [DMKDeviceModelId.FLEX]: LLDeviceModelId.europa, + [DMKDeviceModelId.STAX]: LLDeviceModelId.stax, + [DMKDeviceModelId.NANO_SP]: LLDeviceModelId.nanoSP, + [DMKDeviceModelId.NANO_S]: LLDeviceModelId.nanoS, + [DMKDeviceModelId.NANO_X]: LLDeviceModelId.nanoX, +}; diff --git a/libs/live-dmk/src/config/errors.ts b/libs/live-dmk/src/config/errors.ts new file mode 100644 index 000000000000..369eb4eb9079 --- /dev/null +++ b/libs/live-dmk/src/config/errors.ts @@ -0,0 +1,10 @@ +import { DeviceBusyError } from "@ledgerhq/device-management-kit"; +import { WebHidSendReportError } from "@ledgerhq/device-transport-kit-web-hid"; + +export const isAllowedOnboardingStatePollingErrorDmk = (error: unknown): boolean => { + if (error) { + return error instanceof DeviceBusyError || error instanceof WebHidSendReportError; + } + + return false; +}; diff --git a/libs/live-dmk/src/hooks/index.ts b/libs/live-dmk/src/hooks/index.ts new file mode 100644 index 000000000000..c49d3bb14246 --- /dev/null +++ b/libs/live-dmk/src/hooks/index.ts @@ -0,0 +1,7 @@ +export { + DeviceManagementKitContext, + DeviceManagementKitProvider, + useDeviceManagementKit, +} from "./useDeviceManagementKit"; +export { useDeviceSessionRefresherToggle } from "./useDeviceSessionRefresherToggle"; +export { useDeviceSessionState } from "./useDeviceSessionState"; diff --git a/libs/live-dmk/src/hooks/useDeviceManagementKit.tsx b/libs/live-dmk/src/hooks/useDeviceManagementKit.tsx new file mode 100644 index 000000000000..7a746421fe02 --- /dev/null +++ b/libs/live-dmk/src/hooks/useDeviceManagementKit.tsx @@ -0,0 +1,28 @@ +import React, { createContext, useContext } from "react"; +import { + DeviceManagementKitBuilder, + ConsoleLogger, + DeviceManagementKit, + LogLevel, +} from "@ledgerhq/device-management-kit"; +import { webHidTransportFactory } from "@ledgerhq/device-transport-kit-web-hid"; + +export const deviceManagementKit = new DeviceManagementKitBuilder() + .addTransport(webHidTransportFactory) + .addLogger(new ConsoleLogger(LogLevel.Debug)) + .build(); + +export const DeviceManagementKitContext = createContext(deviceManagementKit); + +type Props = { + children: React.ReactNode; +}; + +export const DeviceManagementKitProvider: React.FC = ({ children }) => ( + + {children} + +); + +export const useDeviceManagementKit = (): DeviceManagementKit => + useContext(DeviceManagementKitContext); diff --git a/libs/live-dmk/src/hooks/useDeviceSessionRefresherToggle.test.tsx b/libs/live-dmk/src/hooks/useDeviceSessionRefresherToggle.test.tsx new file mode 100644 index 000000000000..1b5e8f82f598 --- /dev/null +++ b/libs/live-dmk/src/hooks/useDeviceSessionRefresherToggle.test.tsx @@ -0,0 +1,212 @@ +import { renderHook } from "@testing-library/react"; +import { type Mock } from "vitest"; +import { activeDeviceSessionSubject } from "../config/activeDeviceSession"; +import { useDeviceManagementKit } from "./useDeviceManagementKit"; +import { useDeviceSessionRefresherToggle } from "./useDeviceSessionRefresherToggle"; + +vi.mock("@ledgerhq/device-management-kit", async importOriginal => { + const actual = await importOriginal(); + return { + ...actual, + DeviceManagementKitBuilder: vi.fn(() => ({ + addLogger: vi.fn().mockReturnThis(), + addTransport: vi.fn().mockReturnThis(), + build: vi.fn().mockReturnValue({ + getDeviceSessionState: vi.fn(), + startDiscovering: vi.fn(), + connect: vi.fn(), + toggleDeviceSessionRefresher: vi.fn(), + }), + })), + ConsoleLogger: vi.fn(), + LogLevel: { Debug: "debug" }, + DeviceStatus: { + NOT_CONNECTED: "not_connected", + CONNECTED: "connected", + }, + }; +}); + +vi.mock("./useDeviceManagementKit", async importOriginal => { + const actual = await importOriginal(); + return { + ...actual, + useDeviceManagementKit: vi.fn(), + }; +}); + +describe("useDeviceSessionRefresherToggle", () => { + let deviceManagementKitMock: { + getDeviceSessionState: Mock; + toggleDeviceSessionRefresher: Mock; + }; + + beforeEach(() => { + deviceManagementKitMock = { + getDeviceSessionState: vi.fn(), + toggleDeviceSessionRefresher: vi.fn(), + }; + (useDeviceManagementKit as Mock).mockReturnValue(deviceManagementKitMock); + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + describe("enabled = true", () => { + it("should not toggle the device session refresher off if there is no active session", () => { + renderHook(() => useDeviceSessionRefresherToggle(true)); + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).not.toHaveBeenCalled(); + }); + + it("should toggle the device session refresher off on the current active session", async () => { + activeDeviceSessionSubject.next({ + sessionId: "valid-session", + // @ts-expect-error yolo + transport: { + sessionId: "123", + }, + }); + + renderHook(() => useDeviceSessionRefresherToggle(true)); + + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledOnce(); + }); + + it("should turn off the device session refresher on the new active session and turn it on for the previous active one", async () => { + activeDeviceSessionSubject.next({ + sessionId: "valid-session-1", + // @ts-expect-error yolo + transport: { + sessionId: "123", + }, + }); + + const { rerender } = renderHook(() => useDeviceSessionRefresherToggle(true)); + + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledWith({ + sessionId: "valid-session-1", + enabled: false, + }); + + activeDeviceSessionSubject.next({ + sessionId: "valid-session-2", + // @ts-expect-error yolo + transport: { + sessionId: "456", + }, + }); + + rerender(); + + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledWith({ + sessionId: "valid-session-1", + enabled: true, + }); + + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledWith({ + sessionId: "valid-session-2", + enabled: false, + }); + + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledTimes(3); + }); + + it("should reset the current device session refresher state when the hook is unmounted", () => { + activeDeviceSessionSubject.next({ + sessionId: "valid-session-1", + // @ts-expect-error yolo + transport: { + sessionId: "123", + }, + }); + + const { unmount } = renderHook(() => useDeviceSessionRefresherToggle(true)); + + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledWith({ + sessionId: "valid-session-1", + enabled: false, + }); + + unmount(); + + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledWith({ + sessionId: "valid-session-1", + enabled: true, + }); + + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledTimes(2); + }); + + it("should do nothing if the hook is unmounted and there is no active session", () => { + activeDeviceSessionSubject.next(null); + const { unmount } = renderHook(() => useDeviceSessionRefresherToggle(true)); + unmount(); + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).not.toHaveBeenCalled(); + }); + + describe("resetRefresherState", () => { + it("should be defined", () => { + const { result } = renderHook(() => useDeviceSessionRefresherToggle(true)); + expect(result.current.resetRefresherState).toBeDefined(); + }); + + it("should not unsubscribe if there is no active device session", () => { + const { result } = renderHook(() => useDeviceSessionRefresherToggle(true)); + result.current.resetRefresherState(); + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).not.toHaveBeenCalled(); + }); + + it("should unsubscribe if there is an active device session", () => { + activeDeviceSessionSubject.next({ + sessionId: "valid-session-1", + // @ts-expect-error yolo + transport: { + sessionId: "123", + }, + }); + + const { result } = renderHook(() => useDeviceSessionRefresherToggle(true)); + result.current.resetRefresherState(); + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).toHaveBeenCalledWith({ + sessionId: "valid-session-1", + enabled: true, + }); + }); + }); + }); + + describe.todo("enabled = false", () => { + it("should not toggle the device session refresher on if there is no active session", () => { + renderHook(() => useDeviceSessionRefresherToggle(false)); + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).not.toHaveBeenCalled(); + }); + + it("should not toggle the device session refresher on even if there is an active session", () => { + activeDeviceSessionSubject.next({ + sessionId: "valid-session-1", + // @ts-expect-error yolo + transport: { + sessionId: "123", + }, + }); + + renderHook(() => useDeviceSessionRefresherToggle(false)); + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).not.toHaveBeenCalled(); + }); + + it("should not do anything on unmount", () => { + activeDeviceSessionSubject.next({ + sessionId: "valid-session-1", + // @ts-expect-error yolo + transport: { + sessionId: "123", + }, + }); + + const { unmount } = renderHook(() => useDeviceSessionRefresherToggle(false)); + unmount(); + expect(deviceManagementKitMock.toggleDeviceSessionRefresher).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/libs/live-dmk/src/hooks/useDeviceSessionRefresherToggle.tsx b/libs/live-dmk/src/hooks/useDeviceSessionRefresherToggle.tsx new file mode 100644 index 000000000000..148b66b60180 --- /dev/null +++ b/libs/live-dmk/src/hooks/useDeviceSessionRefresherToggle.tsx @@ -0,0 +1,57 @@ +import { useRef, useEffect, useCallback } from "react"; +import { Subscription } from "rxjs"; +import { activeDeviceSessionSubject } from "../config/activeDeviceSession"; +import { useDeviceManagementKit } from "./useDeviceManagementKit"; + +export const useDeviceSessionRefresherToggle = (enabled: boolean) => { + const sdk = useDeviceManagementKit(); + const sessionId = useRef(); + const sub = useRef(); + useEffect(() => { + if (!enabled) return; + sub.current = activeDeviceSessionSubject.subscribe({ + next: session => { + if (session) { + if (sessionId.current !== session.sessionId) { + if (sessionId.current) { + sdk.toggleDeviceSessionRefresher({ + sessionId: sessionId.current, + enabled: true, + }); + } + + sessionId.current = session.sessionId; + sdk.toggleDeviceSessionRefresher({ + sessionId: sessionId.current, + enabled: false, + }); + } + } + }, + }); + + return () => { + if (!enabled) return; + sub.current?.unsubscribe(); + if (sessionId.current) { + sdk.toggleDeviceSessionRefresher({ + sessionId: sessionId.current, + enabled: true, + }); + } + }; + }, [sdk]); + + const resetRefresherState = useCallback(() => { + sub.current?.unsubscribe(); + + if (sessionId.current) { + sdk.toggleDeviceSessionRefresher({ + sessionId: sessionId.current, + enabled: true, + }); + } + }, [sdk]); + + return { resetRefresherState }; +}; diff --git a/libs/live-dmk/src/useDeviceSessionState.test.tsx b/libs/live-dmk/src/hooks/useDeviceSessionState.test.tsx similarity index 52% rename from libs/live-dmk/src/useDeviceSessionState.test.tsx rename to libs/live-dmk/src/hooks/useDeviceSessionState.test.tsx index 07fb11fc6ad4..422f9b1bc994 100644 --- a/libs/live-dmk/src/useDeviceSessionState.test.tsx +++ b/libs/live-dmk/src/hooks/useDeviceSessionState.test.tsx @@ -1,46 +1,43 @@ +import { render, act } from "@testing-library/react"; +import { type Mock } from "vitest"; import React from "react"; -import { render, act, cleanup } from "@testing-library/react"; -import "@testing-library/jest-dom"; -import { BehaviorSubject, of } from "rxjs"; -import { - DeviceManagementKitProvider, - useDeviceSessionState, - useDeviceManagementKit, -} from "./index"; +import { of } from "rxjs"; import { DeviceStatus } from "@ledgerhq/device-management-kit"; +import { DeviceManagementKitProvider, useDeviceManagementKit } from "./useDeviceManagementKit"; +import { useDeviceSessionState } from "./useDeviceSessionState"; + +vi.mock("@ledgerhq/device-management-kit", async importOriginal => { + const actual = await importOriginal(); + return { + ...actual, + DeviceManagementKitBuilder: vi.fn(() => ({ + addLogger: vi.fn().mockReturnThis(), + addTransport: vi.fn().mockReturnThis(), + build: vi.fn().mockReturnValue({ + getDeviceSessionState: vi.fn(), + startDiscovering: vi.fn(), + connect: vi.fn(), + }), + })), + BuiltinTransports: { + USB: "USB", + }, + ConsoleLogger: vi.fn(), + LogLevel: { Debug: "debug" }, + DeviceStatus: { + NOT_CONNECTED: "not_connected", + CONNECTED: "connected", + }, + }; +}); -jest.mock("@ledgerhq/device-management-kit", () => ({ - DeviceManagementKitBuilder: jest.fn(() => ({ - addLogger: jest.fn().mockReturnThis(), - addTransport: jest.fn().mockReturnThis(), - build: jest.fn().mockReturnValue({ - getDeviceSessionState: jest.fn(), - startDiscovering: jest.fn(), - connect: jest.fn(), - }), - })), - BuiltinTransports: { - USB: "USB", - }, - ConsoleLogger: jest.fn(), - LogLevel: { Debug: "debug" }, - DeviceStatus: { - NOT_CONNECTED: "not_connected", - CONNECTED: "connected", - }, -})); - -const activeDeviceSessionSubjectMock = new BehaviorSubject<{ - sessionId: string; - transport: { sessionId: string }; -} | null>(null); - -jest.mock("./index", () => ({ - ...jest.requireActual("./index"), - useDeviceManagementKit: jest.fn(), -})); - -afterEach(cleanup); +vi.mock("./useDeviceManagementKit", async importOriginal => { + const actual = await importOriginal(); + return { + ...actual, + useDeviceManagementKit: vi.fn(), + }; +}); const Wrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => ( {children} @@ -57,42 +54,31 @@ const TestComponent: React.FC = () => { describe("useDeviceSessionState", () => { let deviceManagementKitMock: { - getDeviceSessionState: jest.Mock; + getDeviceSessionState: Mock; }; beforeEach(() => { deviceManagementKitMock = { - getDeviceSessionState: jest.fn(), + getDeviceSessionState: vi.fn(), }; - (useDeviceManagementKit as jest.Mock).mockReturnValue(deviceManagementKitMock); + (useDeviceManagementKit as Mock).mockReturnValue(deviceManagementKitMock); - jest - .spyOn(deviceManagementKitMock, "getDeviceSessionState") - .mockImplementation(({ sessionId }: { sessionId: string }) => { + vi.spyOn(deviceManagementKitMock, "getDeviceSessionState").mockImplementation( + ({ sessionId }: { sessionId: string }) => { if (sessionId === "valid-session") { return of({ deviceStatus: DeviceStatus.CONNECTED, }); - } else { - return of({ - deviceStatus: DeviceStatus.NOT_CONNECTED, - }); } - }); + }, + ); }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); it("should display the device status when an active session is found", async () => { - activeDeviceSessionSubjectMock.next({ - sessionId: "valid-session", - transport: { - sessionId: "", - }, - }); - let result: ReturnType | undefined; await act(async () => { result = render( @@ -103,7 +89,7 @@ describe("useDeviceSessionState", () => { }); if (!result) { - throw new Error("Failed to render component"); + throw new Error("Result is undefined"); } const { getByTestId } = result!; @@ -113,13 +99,6 @@ describe("useDeviceSessionState", () => { }); it("should update the state when the device disconnects", async () => { - activeDeviceSessionSubjectMock.next({ - sessionId: "valid-session", - transport: { - sessionId: "", - }, - }); - let result: ReturnType | undefined; await act(async () => { result = render( @@ -137,8 +116,6 @@ describe("useDeviceSessionState", () => { const statusElement = getByTestId("device-status"); expect(statusElement).toHaveTextContent("connected"); - activeDeviceSessionSubjectMock.next(null); - await act(async () => { deviceManagementKitMock.getDeviceSessionState.mockReturnValueOnce( of({ diff --git a/libs/live-dmk/src/hooks/useDeviceSessionState.tsx b/libs/live-dmk/src/hooks/useDeviceSessionState.tsx new file mode 100644 index 000000000000..12b5c7cfc029 --- /dev/null +++ b/libs/live-dmk/src/hooks/useDeviceSessionState.tsx @@ -0,0 +1,35 @@ +import { type DeviceSessionState, DeviceStatus } from "@ledgerhq/device-management-kit"; +import { useState, useEffect } from "react"; +import { activeDeviceSessionSubject } from "../config/activeDeviceSession"; +import { useDeviceManagementKit } from "./useDeviceManagementKit"; + +export const useDeviceSessionState = (): DeviceSessionState | undefined => { + const sdk = useDeviceManagementKit(); + const [sessionState, setSessionState] = useState(undefined); + + useEffect(() => { + const subscription = activeDeviceSessionSubject.subscribe({ + next: session => { + if (!session) { + setSessionState(undefined); + } else { + const { sessionId } = session; + const stateSubscription = sdk.getDeviceSessionState({ sessionId }).subscribe({ + next: (state: DeviceSessionState) => { + state.deviceStatus !== DeviceStatus.NOT_CONNECTED + ? setSessionState(state) + : setSessionState(undefined); + }, + error: (error: Error) => console.error("[useDeviceSessionState] error", error), + }); + return () => stateSubscription.unsubscribe(); + } + }, + error: error => console.error("[useDeviceSessionState] subscription error", error), + }); + + return () => subscription.unsubscribe(); + }, [sdk]); + + return sessionState; +}; diff --git a/libs/live-dmk/src/index.ts b/libs/live-dmk/src/index.ts new file mode 100644 index 000000000000..f50f212d4cd1 --- /dev/null +++ b/libs/live-dmk/src/index.ts @@ -0,0 +1,3 @@ +export { DeviceManagementKitTransport } from "./transport/DeviceManagementKitTransport"; +export * from "./hooks"; +export { isAllowedOnboardingStatePollingErrorDmk } from "./config/errors"; diff --git a/libs/live-dmk/src/index.tsx b/libs/live-dmk/src/transport/DeviceManagementKitTransport.ts similarity index 55% rename from libs/live-dmk/src/index.tsx rename to libs/live-dmk/src/transport/DeviceManagementKitTransport.ts index d9ca6e930285..8c0be4c9d478 100644 --- a/libs/live-dmk/src/index.tsx +++ b/libs/live-dmk/src/transport/DeviceManagementKitTransport.ts @@ -1,75 +1,16 @@ -import React, { createContext, useContext, useEffect, useState } from "react"; -import Transport from "@ledgerhq/hw-transport"; import { - DeviceManagementKitBuilder, - ConsoleLogger, - type DeviceManagementKit, - type DeviceSessionState, + DeviceManagementKit, DeviceStatus, - LogLevel, - BuiltinTransports, + type DeviceSessionState, + DiscoveredDevice, } from "@ledgerhq/device-management-kit"; -import { BehaviorSubject, firstValueFrom } from "rxjs"; +import Transport from "@ledgerhq/hw-transport"; +import { DescriptorEvent } from "@ledgerhq/types-devices"; +import { firstValueFrom, Observer, startWith, pairwise, map } from "rxjs"; import { LocalTracer } from "@ledgerhq/logs"; - -const deviceManagementKit = new DeviceManagementKitBuilder() - .addTransport(BuiltinTransports.USB) - .addLogger(new ConsoleLogger(LogLevel.Debug)) - .build(); - -export const DeviceManagementKitContext = createContext(deviceManagementKit); - -type Props = { - children: React.ReactNode; -}; - -export const DeviceManagementKitProvider: React.FC = ({ children }) => ( - - {children} - -); - -export const useDeviceManagementKit = (): DeviceManagementKit => - useContext(DeviceManagementKitContext); - -export const useDeviceSessionState = (): DeviceSessionState | undefined => { - const sdk = useDeviceManagementKit(); - const [sessionState, setSessionState] = useState(undefined); - - useEffect(() => { - const subscription = activeDeviceSessionSubject.subscribe({ - next: session => { - if (!session) { - setSessionState(undefined); - } else { - const { sessionId } = session; - const stateSubscription = sdk.getDeviceSessionState({ sessionId }).subscribe({ - next: (state: DeviceSessionState) => { - state.deviceStatus !== DeviceStatus.NOT_CONNECTED - ? setSessionState(state) - : setSessionState(undefined); - }, - error: (error: Error) => console.error("[useDeviceSessionState] error", error), - }); - return () => stateSubscription.unsubscribe(); - } - }, - error: error => console.error("[useDeviceSessionState] subscription error", error), - }); - - return () => subscription.unsubscribe(); - }, [sdk]); - - return sessionState; -}; - -const activeDeviceSessionSubject: BehaviorSubject<{ - sessionId: string; - transport: DeviceManagementKitTransport; -} | null> = new BehaviorSubject<{ - sessionId: string; - transport: DeviceManagementKitTransport; -} | null>(null); +import { deviceIdMap } from "../config/deviceIdMap"; +import { activeDeviceSessionSubject } from "../config/activeDeviceSession"; +import { deviceManagementKit } from "../hooks/useDeviceManagementKit"; const tracer = new LocalTracer("live-dmk", { function: "DeviceManagementKitTransport" }); @@ -118,7 +59,10 @@ export class DeviceManagementKitTransport extends Transport { return null; }); - if (deviceSessionState?.deviceStatus !== DeviceStatus.NOT_CONNECTED) { + if ( + deviceSessionState?.deviceStatus !== DeviceStatus.NOT_CONNECTED && + activeDeviceSessionSubject.value?.transport + ) { tracer.trace("[open] reusing existing session and instantiating a new SdkTransport"); return activeDeviceSessionSubject.value.transport; } @@ -135,10 +79,63 @@ export class DeviceManagementKitTransport extends Transport { return transport; } + static listen = (observer: Observer>) => { + const subscription = deviceManagementKit + .listenToKnownDevices() + .pipe( + startWith([]), + pairwise(), + map(([prev, curr]) => { + const added = curr.filter(item => !prev.some(prevItem => prevItem.id === item.id)); + const removed = prev.filter(item => !curr.some(currItem => currItem.id === item.id)); + return { added, removed }; + }), + ) + .subscribe({ + next: ({ added, removed }) => { + for (const device of added) { + const id = deviceIdMap[device.deviceModel.model]; + + tracer.trace(`[listen] device added ${id}`); + observer.next({ + type: "add", + descriptor: "", + device: device, + // @ts-expect-error types are not matching + deviceModel: { + id, + }, + }); + } + + for (const device of removed) { + const id = deviceIdMap[device.deviceModel.model]; + + tracer.trace(`[listen] device removed ${id}`); + observer.next({ + type: "remove", + descriptor: "", + device: device, + // @ts-expect-error types are not matching + deviceModel: { + id, + }, + }); + } + }, + error: observer.error, + complete: observer.complete, + }); + + return { + unsubscribe: () => subscription.unsubscribe(), + }; + }; + close: () => Promise = () => Promise.resolve(); async exchange(apdu: Buffer): Promise { - tracer.trace(`[exchange] => ${apdu}`); + tracer.trace(`[exchange] => ${apdu.toString("hex")}`); return await this.sdk .sendApdu({ sessionId: this.sessionId, @@ -146,8 +143,12 @@ export class DeviceManagementKitTransport extends Transport { }) .then((apduResponse: { data: Uint8Array; statusCode: Uint8Array }): Buffer => { const response = Buffer.from([...apduResponse.data, ...apduResponse.statusCode]); - tracer.trace(`[exchange] <= ${response}`); + tracer.trace(`[exchange] <= ${response.toString("hex")}`); return response; + }) + .catch(e => { + console.error("[exchange] error", e); + throw e; }); } } diff --git a/libs/live-dmk/tests.setup.ts b/libs/live-dmk/tests.setup.ts new file mode 100644 index 000000000000..40e49210b2d8 --- /dev/null +++ b/libs/live-dmk/tests.setup.ts @@ -0,0 +1,9 @@ +import { afterEach } from "vitest"; +import { cleanup } from "@testing-library/react"; +import * as matchers from "@testing-library/jest-dom/matchers"; + +expect.extend(matchers); + +afterEach(() => { + cleanup(); +}); diff --git a/libs/live-dmk/tsconfig.json b/libs/live-dmk/tsconfig.json index e37d77c25072..b7985bd6507b 100644 --- a/libs/live-dmk/tsconfig.json +++ b/libs/live-dmk/tsconfig.json @@ -6,14 +6,15 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "esnext", - "moduleResolution": "Bundler", "downlevelIteration": true, "lib": ["es2020", "dom"], - "outDir": "lib", + "outDir": "lib-es", "baseUrl": ".", "esModuleInterop": true, - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "module": "esnext", + "moduleResolution": "bundler", + "types": ["vitest/globals", "@testing-library/jest-dom"] }, - "include": ["src/**/*", "src/index.tsx"] + "include": ["src", "tests.setup.ts"] } diff --git a/libs/live-dmk/tsconfig.prod.json b/libs/live-dmk/tsconfig.prod.json new file mode 100644 index 000000000000..b90fc83e04c2 --- /dev/null +++ b/libs/live-dmk/tsconfig.prod.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "include": ["src"] +} diff --git a/libs/live-dmk/vitest.config.ts b/libs/live-dmk/vitest.config.ts new file mode 100644 index 000000000000..7b02f79efd4c --- /dev/null +++ b/libs/live-dmk/vitest.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from "vitest/config"; +import reactPlugin from "@vitejs/plugin-react"; + +export default defineConfig({ + // @ts-expect-error typescript is being craycray + plugins: [reactPlugin()], + test: { + globals: true, + environment: "jsdom", + setupFiles: ["./tests.setup.ts"], + exclude: ["node_modules", "lib-es"], + silent: false, + printConsoleTrace: true, + }, +}); diff --git a/libs/live-hooks/package.json b/libs/live-hooks/package.json index f639b128caed..5f3142ae21b3 100644 --- a/libs/live-hooks/package.json +++ b/libs/live-hooks/package.json @@ -35,10 +35,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/live-hooks/tsconfig.json b/libs/live-hooks/tsconfig.json index f1eda7ec5c36..05a31e972331 100644 --- a/libs/live-hooks/tsconfig.json +++ b/libs/live-hooks/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", "downlevelIteration": true, "jsx": "react", "lib": ["es2020", "dom"], diff --git a/libs/live-network/package.json b/libs/live-network/package.json index 8a706c4ab8a9..f095e9df86eb 100644 --- a/libs/live-network/package.json +++ b/libs/live-network/package.json @@ -78,10 +78,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/live-network/tsconfig.json b/libs/live-network/tsconfig.json index 78db98bc4a32..05d003c6933b 100644 --- a/libs/live-network/tsconfig.json +++ b/libs/live-network/tsconfig.json @@ -6,7 +6,6 @@ "noImplicitAny": false, "noImplicitThis": false, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "outDir": "lib" }, diff --git a/libs/live-nft-react/package.json b/libs/live-nft-react/package.json index d1e708f875bf..010de7cc13fe 100644 --- a/libs/live-nft-react/package.json +++ b/libs/live-nft-react/package.json @@ -44,10 +44,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/live-nft-react/tsconfig.json b/libs/live-nft-react/tsconfig.json index f1eda7ec5c36..05a31e972331 100644 --- a/libs/live-nft-react/tsconfig.json +++ b/libs/live-nft-react/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", "downlevelIteration": true, "jsx": "react", "lib": ["es2020", "dom"], diff --git a/libs/live-nft/package.json b/libs/live-nft/package.json index 8132f859e470..9deda59d05c5 100644 --- a/libs/live-nft/package.json +++ b/libs/live-nft/package.json @@ -36,10 +36,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/live-nft/tsconfig.json b/libs/live-nft/tsconfig.json index f1eda7ec5c36..05a31e972331 100644 --- a/libs/live-nft/tsconfig.json +++ b/libs/live-nft/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", "downlevelIteration": true, "jsx": "react", "lib": ["es2020", "dom"], diff --git a/libs/live-wallet/package.json b/libs/live-wallet/package.json index bed1a0f81f14..d49650b00785 100644 --- a/libs/live-wallet/package.json +++ b/libs/live-wallet/package.json @@ -54,10 +54,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/live-wallet/tsconfig.json b/libs/live-wallet/tsconfig.json index f1eda7ec5c36..05a31e972331 100644 --- a/libs/live-wallet/tsconfig.json +++ b/libs/live-wallet/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", "downlevelIteration": true, "jsx": "react", "lib": ["es2020", "dom"], diff --git a/libs/promise/package.json b/libs/promise/package.json index 13b2f29a3371..3a69bcf5f0ab 100644 --- a/libs/promise/package.json +++ b/libs/promise/package.json @@ -30,10 +30,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "test": "jest", diff --git a/libs/promise/tsconfig.json b/libs/promise/tsconfig.json index 78db98bc4a32..05d003c6933b 100644 --- a/libs/promise/tsconfig.json +++ b/libs/promise/tsconfig.json @@ -6,7 +6,6 @@ "noImplicitAny": false, "noImplicitThis": false, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "outDir": "lib" }, diff --git a/libs/speculos-transport/package.json b/libs/speculos-transport/package.json index 4eb74a6bc8e6..4ce2ec2bcda7 100644 --- a/libs/speculos-transport/package.json +++ b/libs/speculos-transport/package.json @@ -31,10 +31,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx --cache", "lint:fix": "pnpm lint --fix", "typecheck": "tsc --noEmit", diff --git a/libs/speculos-transport/tsconfig.json b/libs/speculos-transport/tsconfig.json index 8e999e322109..2ab64c858708 100644 --- a/libs/speculos-transport/tsconfig.json +++ b/libs/speculos-transport/tsconfig.json @@ -5,7 +5,6 @@ "declarationMap": true, "noImplicitAny": true, "noImplicitThis": true, - "module": "commonjs", "outDir": "lib" }, "include": ["src/**/*"] diff --git a/libs/test-utils/package.json b/libs/test-utils/package.json index 566e20a96c46..b173ce4b05f0 100644 --- a/libs/test-utils/package.json +++ b/libs/test-utils/package.json @@ -11,7 +11,7 @@ "types": "lib/index.d.ts", "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es", "unimported": "unimported" }, "dependencies": { diff --git a/libs/ui/packages/crypto-icons/tsconfig.json b/libs/ui/packages/crypto-icons/tsconfig.json index 2a92db93f082..8aa7151ac671 100644 --- a/libs/ui/packages/crypto-icons/tsconfig.json +++ b/libs/ui/packages/crypto-icons/tsconfig.json @@ -6,7 +6,9 @@ "baseUrl": ".", "rootDir": "./src", "outDir": ".", - "noEmit": true + "noEmit": true, + "moduleResolution": "bundler", + "module": "esnext" }, "include": ["src/**/*"], "exclude": ["node_modules", "react", "native"] diff --git a/libs/ui/packages/icons/tsconfig.json b/libs/ui/packages/icons/tsconfig.json index b9fa0c14788e..8972136b9962 100644 --- a/libs/ui/packages/icons/tsconfig.json +++ b/libs/ui/packages/icons/tsconfig.json @@ -7,7 +7,10 @@ "baseUrl": ".", "rootDir": "./src", "outDir": ".", - "noEmit": true + "noEmit": true, + "moduleResolution": "bundler", + "module": "esnext", + "target": "esnext" }, "include": ["src/**/*"], "exclude": ["node_modules", "react", "native"] diff --git a/libs/ui/packages/native/package.json b/libs/ui/packages/native/package.json index 1626df8a77d3..b1f2b1e3aa25 100644 --- a/libs/ui/packages/native/package.json +++ b/libs/ui/packages/native/package.json @@ -29,7 +29,6 @@ "./lib/*/": "./lib/*/index.js", "./*": "./lib/*.js", "./*/": "./lib/*/index.js", - "./": "./lib/", "./package.json": "./package.json" }, "files": [ diff --git a/libs/ui/packages/native/tsconfig.json b/libs/ui/packages/native/tsconfig.json index a801df15c8ce..cec390e35462 100644 --- a/libs/ui/packages/native/tsconfig.json +++ b/libs/ui/packages/native/tsconfig.json @@ -8,7 +8,7 @@ "isolatedModules": true, "strict": true, "baseUrl": ".", - "preserveSymlinks": true + "preserveSymlinks": true, }, "include": ["src/**/*", "storybook/**/*"], "exclude": [ diff --git a/libs/ui/packages/native/tsconfig.prod.json b/libs/ui/packages/native/tsconfig.prod.json index 2a4898673263..b647344c26b2 100644 --- a/libs/ui/packages/native/tsconfig.prod.json +++ b/libs/ui/packages/native/tsconfig.prod.json @@ -4,7 +4,7 @@ "composite": false, "incremental": false, "declaration": true, - "target": "ES6", + "target": "esnext", "noEmit": false, "jsx": "react", "rootDir": "./src", diff --git a/libs/ui/packages/react/src/assets/icons.ts b/libs/ui/packages/react/src/assets/icons.ts deleted file mode 100644 index 82364773fd78..000000000000 --- a/libs/ui/packages/react/src/assets/icons.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "@ledgerhq/icons-ui/reactLegacy"; diff --git a/libs/ui/packages/react/src/assets/index.ts b/libs/ui/packages/react/src/assets/index.ts index 395fd09f38c5..6ce3ef9a75a9 100644 --- a/libs/ui/packages/react/src/assets/index.ts +++ b/libs/ui/packages/react/src/assets/index.ts @@ -1,4 +1,7 @@ -export * as IconsLegacy from "@ledgerhq/icons-ui/reactLegacy"; -export * as Icons from "@ledgerhq/icons-ui/react"; -export * as CryptoIcons from "@ledgerhq/crypto-icons-ui/react"; +import * as IconsLegacy from "@ledgerhq/icons-ui/reactLegacy"; +export { IconsLegacy }; +import * as Icons from "@ledgerhq/icons-ui/react"; +export { Icons }; +import * as CryptoIcons from "@ledgerhq/crypto-icons-ui/react"; +export { CryptoIcons }; export * as Logos from "./logos"; diff --git a/libs/ui/packages/react/src/components/form/Switch/index.ts b/libs/ui/packages/react/src/components/form/Switch/index.ts index b15d8bbae294..35c1e17b0b59 100644 --- a/libs/ui/packages/react/src/components/form/Switch/index.ts +++ b/libs/ui/packages/react/src/components/form/Switch/index.ts @@ -1 +1,2 @@ export { default } from "./Switch"; +export type { SwitchProps } from "./Switch"; diff --git a/libs/ui/packages/react/tsconfig.json b/libs/ui/packages/react/tsconfig.json index 2ba827f86f10..36d235531cce 100644 --- a/libs/ui/packages/react/tsconfig.json +++ b/libs/ui/packages/react/tsconfig.json @@ -8,9 +8,11 @@ "baseUrl": ".", "rootDir": "./src", "outDir": "./lib", - "preserveSymlinks": true + "preserveSymlinks": true, + "moduleResolution": "bundler", + "module": "ESNext" }, - "include": ["src/**/*"], + "include": ["src/**/*", "types.d.ts"], "exclude": [ "node_modules", "babel.config.js", diff --git a/libs/ui/packages/react/tsconfig.prod.json b/libs/ui/packages/react/tsconfig.prod.json index 946bff0ce486..2c9bed1d56b4 100644 --- a/libs/ui/packages/react/tsconfig.prod.json +++ b/libs/ui/packages/react/tsconfig.prod.json @@ -4,7 +4,6 @@ "composite": false, "incremental": false, "declaration": true, - "target": "ES6" }, "exclude": [ "node_modules", diff --git a/libs/ui/packages/react/types.d.ts b/libs/ui/packages/react/types.d.ts new file mode 100644 index 000000000000..7c4389eabadf --- /dev/null +++ b/libs/ui/packages/react/types.d.ts @@ -0,0 +1 @@ +declare module "@floating-ui/react-dom"; diff --git a/libs/ui/packages/shared/tsconfig.json b/libs/ui/packages/shared/tsconfig.json index 55d766ea321f..733a8ce937e3 100644 --- a/libs/ui/packages/shared/tsconfig.json +++ b/libs/ui/packages/shared/tsconfig.json @@ -1,10 +1,11 @@ { "extends": "../../../../tsconfig.base", "compilerOptions": { - "module": "ESNext", "declaration": true, "declarationMap": true, "outDir": "./lib", - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "moduleResolution": "bundler", + "module": "esnext" } } diff --git a/libs/wallet-api-acre-module/package.json b/libs/wallet-api-acre-module/package.json index fff0a92050e2..83d7f324abcc 100644 --- a/libs/wallet-api-acre-module/package.json +++ b/libs/wallet-api-acre-module/package.json @@ -26,10 +26,10 @@ }, "scripts": { "clean": "rimraf lib lib-es", - "build": "tsc && tsc -m ES6 --outDir lib-es && node scripts/createModulePackage.mjs", + "build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es && node scripts/createModulePackage.mjs", "prewatch": "pnpm build", "watch": "tsc --watch", - "watch:es": "tsc --watch -m ES6 --outDir lib-es", + "watch:es": "tsc --watch -m esnext --moduleResolution bundler --outDir lib-es", "lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx", "lint:fix": "pnpm lint --fix" }, diff --git a/libs/wallet-api-acre-module/tsconfig.json b/libs/wallet-api-acre-module/tsconfig.json index 3d4a6af532b1..8cbfc08851e8 100644 --- a/libs/wallet-api-acre-module/tsconfig.json +++ b/libs/wallet-api-acre-module/tsconfig.json @@ -6,7 +6,6 @@ "noImplicitAny": false, "noImplicitThis": false, "downlevelIteration": true, - "module": "commonjs", "lib": ["es2020", "dom"], "jsx": "react", "outDir": "lib" diff --git a/package.json b/package.json index 9e18103d1262..21d7a4e2cebc 100644 --- a/package.json +++ b/package.json @@ -130,6 +130,7 @@ "ljs:hw-app-trx": "pnpm --filter hw-app-trx", "ljs:hw-app-xrp": "pnpm --filter hw-app-xrp", "ljs:hw-app-icon": "pnpm --filter hw-app-icon", + "ljs:hw-app-vet": "pnpm --filter hw-app-vet", "ljs:hw-bolos": "pnpm --filter hw-bolos", "ljs:hw-transport": "pnpm --filter hw-transport", "ljs:hw-transport-http": "pnpm --filter hw-transport-http", @@ -205,8 +206,8 @@ "remove-flow-types-loader>loader-utils": "*", "@ledgerhq/devices": "workspace:*", "tslib": "2.6.2", - "@hashgraph/sdk>@grpc/grpc-js": "1.6.7", "@hashgraph/sdk>@hashgraph/cryptography": "1.1.2", + "@hashgraph/sdk>@grpc/grpc-js": "1.6.7", "@ethersproject/providers>ws": "7.5.10" }, "patchedDependencies": { @@ -217,11 +218,11 @@ "detox@20.28.0": "patches/detox@20.28.0.patch", "usb@2.9.0": "patches/usb@2.9.0.patch", "react-native-video@5.2.1": "patches/react-native-video@5.2.1.patch", - "@hashgraph/sdk@2.14.2": "patches/@hashgraph__sdk@2.14.2.patch", "@changesets/get-github-info@0.6.0": "patches/@changesets__get-github-info@0.6.0.patch", "react-native-webview@13.10.3": "patches/react-native-webview@13.10.3.patch", "buffer@6.0.3": "patches/buffer@6.0.3.patch", - "react-native-fast-pbkdf2@0.3.1": "patches/react-native-fast-pbkdf2@0.3.1.patch" + "react-native-fast-pbkdf2@0.3.1": "patches/react-native-fast-pbkdf2@0.3.1.patch", + "@hashgraph/sdk@2.14.2": "patches/@hashgraph__sdk@2.14.2.patch" }, "packageExtensions": { "eslint-config-next@*": { diff --git a/patches/@hashgraph__sdk@2.14.2.patch b/patches/@hashgraph__sdk@2.14.2.patch index ae1b74b074c1..da63bd27c45c 100644 --- a/patches/@hashgraph__sdk@2.14.2.patch +++ b/patches/@hashgraph__sdk@2.14.2.patch @@ -1,10 +1,12 @@ diff --git a/package.json b/package.json -index af44c5f5b98e37b06817c31523b6d0c080a8bf89..9f565924451a0502cec7979424aa631f7838f74d 100644 +index af44c5f5b98e37b06817c31523b6d0c080a8bf89..c20cbb9ba2bf6c27c2c719715e162e99aa4a950e 100644 --- a/package.json +++ b/package.json -@@ -22,6 +22,7 @@ +@@ -21,7 +21,9 @@ + "exports": { "./package.json": "./package.json", ".": { ++ "types": "./lib/index.d.ts", "import": "./src/index.js", + "react-native": "./src/native.js", "require": "./lib/index.cjs" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa08803f354e..fdca5d212afe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,8 +10,8 @@ overrides: remove-flow-types-loader>loader-utils: '*' '@ledgerhq/devices': workspace:* tslib: 2.6.2 - '@hashgraph/sdk>@grpc/grpc-js': 1.6.7 '@hashgraph/sdk>@hashgraph/cryptography': 1.1.2 + '@hashgraph/sdk>@grpc/grpc-js': 1.6.7 '@ethersproject/providers>ws': 7.5.10 packageExtensionsChecksum: 505470d279d34dbf557b1005424e3d1d @@ -23,7 +23,7 @@ patchedDependencies: hash: 7jzpsqogb5i6art53pk3h33ix4 path: patches/@changesets__get-github-info@0.6.0.patch '@hashgraph/sdk@2.14.2': - hash: ftpe7kgiykw2quxzn7vgiqumd4 + hash: hno7opkpqo3efbuenv6ysglr4m path: patches/@hashgraph__sdk@2.14.2.patch asyncstorage-down@4.2.0: hash: 2npkndps6fxdasqj3xzcrnnfbe @@ -362,7 +362,7 @@ importers: specifier: workspace:^ version: link:../../libs/live-countervalues-react '@ledgerhq/live-dmk': - specifier: workspace:* + specifier: workspace:^ version: link:../../libs/live-dmk '@ledgerhq/live-env': specifier: workspace:^ @@ -1958,7 +1958,7 @@ importers: specifier: ^4.0.1 version: 4.0.4 '@types/bs58check': - specifier: ^2.1.0 + specifier: ^2.1.2 version: 2.1.2 '@types/cashaddrjs': specifier: ^0.3.3 @@ -2442,18 +2442,21 @@ importers: axios: specifier: 1.7.7 version: 1.7.7 + esbuild: + specifier: 0.24.2 + version: 0.24.2 jest: specifier: ^29.7.0 version: 29.7.0 ts-jest: specifier: ^29.1.1 - version: 29.1.5(jest@29.7.0)(typescript@5.4.3) + version: 29.1.5(esbuild@0.24.2)(jest@29.7.0)(typescript@5.4.3) libs/coin-modules/coin-hedera: dependencies: '@hashgraph/sdk': specifier: 2.14.2 - version: 2.14.2(patch_hash=ftpe7kgiykw2quxzn7vgiqumd4) + version: 2.14.2(patch_hash=hno7opkpqo3efbuenv6ysglr4m) '@ledgerhq/coin-framework': specifier: workspace:^ version: link:../../coin-framework @@ -2503,12 +2506,15 @@ importers: '@types/lodash': specifier: ^4.14.191 version: 4.17.7 + esbuild: + specifier: 0.24.2 + version: 0.24.2 jest: specifier: ^29.7.0 version: 29.7.0 ts-jest: specifier: ^29.1.1 - version: 29.1.5(jest@29.7.0)(typescript@5.4.3) + version: 29.1.5(esbuild@0.24.2)(jest@29.7.0)(typescript@5.4.3) libs/coin-modules/coin-icon: dependencies: @@ -2807,6 +2813,9 @@ importers: '@types/lodash': specifier: ^4.14.191 version: 4.17.7 + '@types/node': + specifier: 22.10.5 + version: 22.10.5 chalk: specifier: ^4.1.2 version: 4.1.2 @@ -2816,12 +2825,15 @@ importers: dotenv: specifier: ^16.4.5 version: 16.4.5 + esbuild: + specifier: 0.24.2 + version: 0.24.2 eslint-plugin-jest: specifier: ^27.4.2 - version: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(jest@29.7.0(ts-node@10.9.2(typescript@5.6.3)))(typescript@5.6.3) + version: 27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)))(typescript@5.6.3) jest: specifier: ^29.7.0 - version: 29.7.0(ts-node@10.9.2(typescript@5.6.3)) + version: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) jest-expect-message: specifier: ^1.1.3 version: 1.1.3 @@ -2830,10 +2842,10 @@ importers: version: 2.3.4(typescript@5.6.3) ts-jest: specifier: ^29.1.1 - version: 29.1.5(jest@29.7.0(ts-node@10.9.2(typescript@5.6.3)))(typescript@5.6.3) + version: 29.1.5(esbuild@0.24.2)(jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)))(typescript@5.6.3) ts-node: specifier: ^10.9.2 - version: 10.9.2(typescript@5.6.3) + version: 10.9.2(@types/node@22.10.5)(typescript@5.6.3) typescript: specifier: ^5.4.5 version: 5.6.3 @@ -2895,8 +2907,8 @@ importers: specifier: ^7.8.1 version: 7.8.1 superstruct: - specifier: 0.14.2 - version: 0.14.2 + specifier: 2.0.2 + version: 2.0.2 devDependencies: '@faker-js/faker': specifier: ^8.4.1 @@ -2913,15 +2925,21 @@ importers: '@types/lodash': specifier: ^4.14.191 version: 4.17.7 + '@types/node': + specifier: 22.10.5 + version: 22.10.5 '@types/object-hash': specifier: ^2.1.0 version: 2.2.1 + esbuild: + specifier: 0.24.2 + version: 0.24.2 jest: specifier: ^29.7.0 - version: 29.7.0 + version: 29.7.0(@types/node@22.10.5) ts-jest: specifier: ^29.1.1 - version: 29.1.5(jest@29.7.0)(typescript@5.4.3) + version: 29.1.5(esbuild@0.24.2)(jest@29.7.0(@types/node@22.10.5))(typescript@5.4.3) libs/coin-modules/coin-stacks: dependencies: @@ -3977,6 +3995,9 @@ importers: '@ledgerhq/hw-app-cosmos': specifier: workspace:^ version: link:../ledgerjs/packages/hw-app-cosmos + '@ledgerhq/hw-app-dmk-eth': + specifier: workspace:^ + version: link:../ledgerjs/packages/hw-app-dmk-eth '@ledgerhq/hw-app-elrond': specifier: workspace:^ version: link:../ledgerjs/packages/hw-app-elrond @@ -4239,6 +4260,9 @@ importers: specifier: ^3.22.4 version: 3.23.8 devDependencies: + '@ledgerhq/device-management-kit': + specifier: 0.0.0-develop-20250106155719 + version: 0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@7.5.10) '@ledgerhq/device-react': specifier: workspace:^ version: link:../device-react @@ -4869,6 +4893,46 @@ importers: specifier: ^10.4.0 version: 10.9.2(@types/node@20.12.12)(source-map-support@0.5.21)(typescript@5.4.3) + libs/ledgerjs/packages/hw-app-dmk-eth: + dependencies: + '@ledgerhq/context-module': + specifier: ^1.1.0 + version: 1.1.0(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0)) + '@ledgerhq/device-management-kit': + specifier: 0.0.0-develop-20250106155719 + version: 0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0) + '@ledgerhq/device-signer-kit-ethereum': + specifier: ^1.1.0 + version: 1.1.0(@ledgerhq/context-module@1.1.0(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0)))(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0)) + rxjs: + specifier: 7.8.1 + version: 7.8.1 + devDependencies: + '@ledgerhq/types-live': + specifier: workspace:^ + version: link:../types-live + '@types/jest': + specifier: ^29.5.10 + version: 29.5.14 + '@types/node': + specifier: 22.10.1 + version: 22.10.1 + jest: + specifier: ^29.7.0 + version: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) + rimraf: + specifier: ^4.4.1 + version: 4.4.1 + ts-jest: + specifier: ^29.1.1 + version: 29.2.5(jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)))(typescript@5.4.3) + ts-node: + specifier: ^10.4.0 + version: 10.9.2(@types/node@22.10.1)(typescript@5.4.3) + ws: + specifier: 8.18.0 + version: 8.18.0 + libs/ledgerjs/packages/hw-app-elrond: dependencies: '@ledgerhq/hw-transport': @@ -5468,19 +5532,16 @@ importers: version: 14.0.2 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + version: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) source-map-support: specifier: ^0.5.21 version: 0.5.21 ts-jest: specifier: ^29.1.1 - version: 29.1.5(jest@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)))(typescript@4.9.5) + version: 29.1.5(jest@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)))(typescript@5.4.3) ts-node: specifier: ^10.4.0 - version: 10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5) - typescript: - specifier: ^4 - version: 4.9.5 + version: 10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3) libs/ledgerjs/packages/hw-app-xrp: dependencies: @@ -6446,26 +6507,26 @@ importers: version: 4.17.21 devDependencies: '@types/jest': - specifier: ^29.5.4 - version: 29.5.12 + specifier: ^29.5.14 + version: 29.5.14 '@types/lodash': specifier: ^4.14.202 version: 4.17.7 '@types/node': - specifier: ^20.2.5 - version: 20.12.12 + specifier: 22.10.1 + version: 22.10.1 jest: - specifier: ^28.1.1 - version: 28.1.3(@types/node@20.12.12) + specifier: ^29.7.0 + version: 29.7.0(@types/node@22.10.1) jest-environment-jsdom: - specifier: '28' - version: 28.1.3 + specifier: ^29.7.0 + version: 29.7.0 semver: specifier: ^7.3.5 version: 7.5.4 ts-jest: - specifier: ^28.0.5 - version: 28.0.8(jest@28.1.3(@types/node@20.12.12))(typescript@5.4.3) + specifier: ^29.1.1 + version: 29.2.5(jest@29.7.0(@types/node@22.10.1))(typescript@5.4.3) libs/live-countervalues: dependencies: @@ -6559,14 +6620,20 @@ importers: libs/live-dmk: dependencies: '@ledgerhq/device-management-kit': - specifier: ^0.5.1 - version: 0.5.1 + specifier: 0.0.0-develop-20250106155719 + version: 0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0) + '@ledgerhq/device-transport-kit-web-hid': + specifier: 0.0.0-develop-20250106155719 + version: 0.0.0-develop-20250106155719(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0))(rxjs@7.8.1) '@ledgerhq/hw-transport': specifier: workspace:^ version: link:../ledgerjs/packages/hw-transport '@ledgerhq/logs': specifier: ^6.12.0 version: 6.12.0 + '@ledgerhq/types-devices': + specifier: workspace:^ + version: link:../ledgerjs/packages/types-devices react: specifier: ^18.3.1 version: 18.3.1 @@ -6578,26 +6645,32 @@ importers: version: 7.8.1 devDependencies: '@testing-library/dom': - specifier: ^9.3.3 + specifier: ^9.3.4 version: 9.3.4 '@testing-library/jest-dom': - specifier: ^6.6.2 + specifier: ^6.6.3 version: 6.6.3 '@testing-library/react': - specifier: ^16.0.1 - version: 16.0.1(@testing-library/dom@9.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@types/jest': - specifier: ^29.5.13 - version: 29.5.14 - jest: - specifier: ^29.7.0 - version: 29.7.0 - jest-environment-jsdom: - specifier: ^29.7.0 - version: 29.7.0 - ts-jest: - specifier: ^29.2.5 - version: 29.2.5(jest@29.7.0)(typescript@5.4.3) + specifier: ^16.1.0 + version: 16.1.0(@testing-library/dom@9.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@types/node': + specifier: 22.10.1 + version: 22.10.1 + '@vitejs/plugin-react': + specifier: 4.3.4 + version: 4.3.4(vite@6.0.7(@types/node@22.10.1)) + jsdom: + specifier: 25.0.1 + version: 25.0.1 + vite: + specifier: 6.0.7 + version: 6.0.7(@types/node@22.10.1) + vitest: + specifier: 2.1.8 + version: 2.1.8(@types/node@22.10.1)(jsdom@25.0.1) + ws: + specifier: 8.18.0 + version: 8.18.0 libs/live-hooks: devDependencies: @@ -8124,6 +8197,9 @@ packages: resolution: {integrity: sha512-d6nWtUI//fyEN8DeLjm3+ro87Ad6+IKwR9pCqfrs/Azahso1xR1Llxd/O6fj/m1DDsuDj/HAsCsy5TC/aKD6Eg==} engines: {node: '>=11.0.0'} + '@asamuzakjp/css-color@2.8.2': + resolution: {integrity: sha512-RtWv9jFN2/bLExuZgFFZ0I3pWWeezAHGgrmjqGGWclATl1aDe3yhCUaI0Ilkp6OCk9zX7+FjvDasEX8Q9Rxc5w==} + '@aw-web-design/x-default-browser@1.4.126': resolution: {integrity: sha512-Xk1sIhyNC/esHGGVjL/niHLowM0csl/kFO5uawBy4IrWwy0o1G8LGt3jP6nmWGz+USxeeqbihAmp/oVZju6wug==} hasBin: true @@ -8531,6 +8607,10 @@ packages: resolution: {integrity: sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==} engines: {node: '>=6.9.0'} + '@babel/core@7.26.0': + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} + engines: {node: '>=6.9.0'} + '@babel/eslint-parser@7.24.1': resolution: {integrity: sha512-d5guuzMlPeDfZIbpQ8+g1NaCNuAGBBGNECh0HVqz1sjOeVLh2CEaifuOysCH18URW6R7pqXINvf5PaR/dC6jLQ==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -8739,6 +8819,10 @@ packages: resolution: {integrity: sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==} engines: {node: '>=6.9.0'} + '@babel/helpers@7.26.0': + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} + engines: {node: '>=6.9.0'} + '@babel/highlight@7.24.6': resolution: {integrity: sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ==} engines: {node: '>=6.9.0'} @@ -9929,6 +10013,34 @@ packages: source-map-support: optional: true + '@csstools/color-helpers@5.0.1': + resolution: {integrity: sha512-MKtmkA0BX87PKaO1NFRTFH+UnkgnmySQOvNxJubsadusqPEC2aJ9MOQiMceZJJ6oitUl/i0L6u0M1IrmAOmgBA==} + engines: {node: '>=18'} + + '@csstools/css-calc@2.1.1': + resolution: {integrity: sha512-rL7kaUnTkL9K+Cvo2pnCieqNpTKgQzy5f+N+5Iuko9HAoasP+xgprVh7KN/MaJVvVL1l0EzQq2MoqBHKSrDrag==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.4 + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-color-parser@3.0.7': + resolution: {integrity: sha512-nkMp2mTICw32uE5NN+EsJ4f5N+IGFeCFu4bGpiKgb2Pq/7J/MpyLBeQ5ry4KKtRFZaYs6sTmcMYrSRIyj5DFKA==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.4 + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-parser-algorithms@3.0.4': + resolution: {integrity: sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.3 + + '@csstools/css-tokenizer@3.0.3': + resolution: {integrity: sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==} + engines: {node: '>=18'} + '@csstools/normalize.css@12.1.1': resolution: {integrity: sha512-YAYeJ+Xqh7fUou1d1j9XHl44BmsuThiTr4iNrgCQ3J27IbhXsxXDGZ1cXv8Qvs99d4rBbLiSKy3+WZiet32PcQ==} @@ -10200,6 +10312,18 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.18.20': resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} @@ -10218,6 +10342,18 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.18.20': resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} @@ -10236,6 +10372,18 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.18.20': resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} @@ -10254,6 +10402,18 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.18.20': resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} @@ -10272,6 +10432,18 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.18.20': resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} @@ -10290,6 +10462,18 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.18.20': resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} @@ -10308,6 +10492,18 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.18.20': resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} @@ -10326,6 +10522,18 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.18.20': resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} @@ -10344,6 +10552,18 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.18.20': resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} @@ -10362,6 +10582,18 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.18.20': resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} @@ -10380,6 +10612,18 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.18.20': resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} @@ -10398,6 +10642,18 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.18.20': resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} @@ -10416,6 +10672,18 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.18.20': resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} @@ -10434,6 +10702,18 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.18.20': resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} @@ -10452,6 +10732,18 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.18.20': resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} @@ -10470,6 +10762,18 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.18.20': resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} @@ -10488,6 +10792,24 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-x64@0.18.20': resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} @@ -10506,6 +10828,24 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.18.20': resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} @@ -10524,6 +10864,18 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.18.20': resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} @@ -10542,6 +10894,18 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.18.20': resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} @@ -10560,6 +10924,18 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.18.20': resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} @@ -10578,6 +10954,18 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.18.20': resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} @@ -10596,6 +10984,18 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -11200,14 +11600,14 @@ packages: resolution: {integrity: sha512-Pe3PFccjPVJV1vtlfVvm9OnlbxqdnP5QcscFEFEnK5quChf1ufZtM0r8mR5ToWHMxZOh0s8o/qp9ANGRTo/DAw==} engines: {node: '>=18'} - '@inversifyjs/common@1.3.3': - resolution: {integrity: sha512-ZH0wrgaJwIo3s9gMCDM2wZoxqrJ6gB97jWXncROfYdqZJv8f3EkqT57faZqN5OTeHWgtziQ6F6g3L8rCvGceCw==} + '@inversifyjs/common@1.4.0': + resolution: {integrity: sha512-qfRJ/3iOlCL/VfJq8+4o5X4oA14cZSBbpAmHsYj8EsIit1xDndoOl0xKOyglKtQD4u4gdNVxMHx4RWARk/I4QA==} - '@inversifyjs/core@1.3.4': - resolution: {integrity: sha512-gCCmA4BdbHEFwvVZ2elWgHuXZWk6AOu/1frxsS+2fWhjEk2c/IhtypLo5ytSUie1BCiT6i9qnEo4bruBomQsAA==} + '@inversifyjs/core@1.3.5': + resolution: {integrity: sha512-B4MFXabhNTAmrfgB+yeD6wd/GIvmvWC6IQ8Rh/j2C3Ix69kmqwz9pr8Jt3E+Nho9aEHOQCZaGmrALgtqRd+oEQ==} - '@inversifyjs/reflect-metadata-utils@0.2.3': - resolution: {integrity: sha512-d3D0o9TeSlvaGM2I24wcNw/Aj3rc4OYvHXOKDC09YEph5fMMiKd6fq1VTQd9tOkDNWvVbw+cnt45Wy9P/t5Lvw==} + '@inversifyjs/reflect-metadata-utils@0.2.4': + resolution: {integrity: sha512-u95rV3lKfG+NT2Uy/5vNzoDujos8vN8O18SSA5UyhxsGYd4GLQn/eUsGXfOsfa7m34eKrDelTKRUX1m/BcNX5w==} peerDependencies: reflect-metadata: 0.2.2 @@ -11459,6 +11859,9 @@ packages: '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -11502,6 +11905,11 @@ packages: version: 1.3.1 hasBin: true + '@ledgerhq/context-module@1.1.0': + resolution: {integrity: sha512-RLQtXnxCaaXuG0JfCvt6fJq5wzioR5JIwcZM9nfb+mw/nBw47ZABMGnV52PAlOUFg4ViSXRuYpRqu27swcvZ0g==} + peerDependencies: + '@ledgerhq/device-management-kit': ^0.5.1 + '@ledgerhq/crypto-icons-ui@file:libs/ui/packages/crypto-icons': resolution: {directory: libs/ui/packages/crypto-icons, type: directory} peerDependencies: @@ -11517,11 +11925,22 @@ packages: '@ledgerhq/cryptoassets-evm-signatures@13.5.2': resolution: {integrity: sha512-OjjzuiMMEIYEbXeueJB6mXwlvYhru28b43buAVOeggZ2XmdlT0kBvt7Cjn4bDPqff/glWR7vQdytIr7b77m2EQ==} - '@ledgerhq/device-management-kit@0.5.1': - resolution: {integrity: sha512-oh0ME54DyuMIVDjOrekz5Dm8LThSBqMw/wmkqPdLHxRd4HCq6efGHLjkwryRPRpI3RjU8IE2jHoFCC8dZ+x9Mw==} + '@ledgerhq/device-management-kit@0.0.0-develop-20250106155719': + resolution: {integrity: sha512-LZu3Kio1QNW2DuxITLdSaZXa6s/0f7Y5vDgVy8ba2TszNXemKSvGntoMqzQ0x/TBYkejRtSh65Elw+tHd9euCQ==} + peerDependencies: + rxjs: ^7.8.1 - '@ledgerhq/device-transport-kit-mock-client@1.1.0': - resolution: {integrity: sha512-gHY+g6y69iI+2axBPgINPNwQ45vMg+5QYy82aUPiyF6P2et5NIabIURsOzzXtfhAYopkCeanmgzg/DNDtf4IZw==} + '@ledgerhq/device-signer-kit-ethereum@1.1.0': + resolution: {integrity: sha512-I1kWhPuWYK2pXiaVycibPCwHbp1MSAEmMRoNOSQbEMGQiSoFgj2JBMd+6qO9y3c3PD46qsOVaqpGZlY3+d8Ayg==} + peerDependencies: + '@ledgerhq/context-module': ^1.0.0 + '@ledgerhq/device-management-kit': ^0.5.1 + + '@ledgerhq/device-transport-kit-web-hid@0.0.0-develop-20250106155719': + resolution: {integrity: sha512-uzk9iOA1Cjp2wtPAYaZ5XWu4JWoFYBO/9Ur6YNGJVdGGf2Ht0gpU2sU43lPQ4Rnf4kcH3Z4+UpOx3RunkOvMMQ==} + peerDependencies: + '@ledgerhq/device-management-kit': 0.0.0-develop-20250106155719 + rxjs: ^7.8.1 '@ledgerhq/domain-service@1.2.12': resolution: {integrity: sha512-w33g7EqBtquzNPnvD2tmQq049eL4d8qYZH5vCwJ9Rfe6Vc/bYQvwlHFZ4N/cQPLmWQdsIMWDu+4fYo61p+Ub5A==} @@ -11584,6 +12003,11 @@ packages: '@ledgerhq/logs@6.12.0': resolution: {integrity: sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==} + '@ledgerhq/signer-utils@1.0.2': + resolution: {integrity: sha512-6YKSYauyDrzUvkBQP/vvmtdCt22n4p1DG/va64iBuv2xdeepM7ikN6hq6KON1e3us/EjhEHLYA/IF+nm45z++A==} + peerDependencies: + '@ledgerhq/device-management-kit': ^0.5.1 + '@ledgerhq/types-live@6.53.1': resolution: {integrity: sha512-ukaDDyxg7quBQ0vdoQQjj3ICqiG13gO/rGIO0Jm2nRh/icbLWgxfsI2wX0u0ugJQJ+q/muiX+wJrMJn9EKhEaQ==} @@ -15504,15 +15928,15 @@ packages: react: ^18.0.0 react-dom: ^18.0.0 - '@testing-library/react@16.0.1': - resolution: {integrity: sha512-dSmwJVtJXmku+iocRhWOUFbrERC76TX2Mnf0ATODz8brzAZrMBbzLwQixlBSanZxR6LddK3eiwpSFZgDET1URg==} + '@testing-library/react@16.1.0': + resolution: {integrity: sha512-Q2ToPvg0KsVL0ohND9A3zLJWcOXXcO8IDu3fj11KhNt0UlCWyFyvnCIBkd12tidB2lkiVRG8VFqdhcqhqnAQtg==} engines: {node: '>=18'} peerDependencies: '@testing-library/dom': ^10.0.0 - '@types/react': ^18.0.0 - '@types/react-dom': ^18.0.0 - react: ^18.0.0 - react-dom: ^18.0.0 + '@types/react': ^18.0.0 || ^19.0.0 + '@types/react-dom': ^18.0.0 || ^19.0.0 + react: ^18.0.0 || ^19.0.0 + react-dom: ^18.0.0 || ^19.0.0 peerDependenciesMeta: '@types/react': optional: true @@ -15836,9 +16260,6 @@ packages: '@types/jest@29.5.14': resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} - '@types/jsdom@16.2.15': - resolution: {integrity: sha512-nwF87yjBKuX/roqGYerZZM0Nv1pZDMAT5YhOHYeM/72Fic+VEqJh4nyoqoapzJnW3pUlfxPY5FhgsJtM+dRnQQ==} - '@types/jsdom@20.0.1': resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} @@ -15959,6 +16380,15 @@ packages: '@types/node@20.8.10': resolution: {integrity: sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==} + '@types/node@22.10.1': + resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + + '@types/node@22.10.5': + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} + + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} + '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -16530,6 +16960,41 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 + '@vitejs/plugin-react@4.3.4': + resolution: {integrity: sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 || ^6.0.0 + + '@vitest/expect@2.1.8': + resolution: {integrity: sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==} + + '@vitest/mocker@2.1.8': + resolution: {integrity: sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@2.1.8': + resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} + + '@vitest/runner@2.1.8': + resolution: {integrity: sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg==} + + '@vitest/snapshot@2.1.8': + resolution: {integrity: sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg==} + + '@vitest/spy@2.1.8': + resolution: {integrity: sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==} + + '@vitest/utils@2.1.8': + resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} + '@vue/cli-overlay@5.0.8': resolution: {integrity: sha512-KmtievE/B4kcXp6SuM2gzsnSd8WebkQpg3XaB6GmFh1BJGRqa1UiW9up7L/Q67uOdTigHxr5Ar2lZms4RcDjwQ==} @@ -16867,6 +17332,10 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} + agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + agentkeepalive@4.5.0: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} @@ -17186,6 +17655,10 @@ packages: assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} @@ -17284,6 +17757,9 @@ packages: axios@1.7.7: resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} + axios@1.7.9: + resolution: {integrity: sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==} + axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} @@ -18044,6 +18520,10 @@ packages: resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} + chai@5.1.2: + resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} + engines: {node: '>=12'} + chainsaw@0.1.0: resolution: {integrity: sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==} @@ -18115,6 +18595,10 @@ packages: check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + check-types@11.2.3: resolution: {integrity: sha512-+67P1GkJRaxQD6PKK0Et9DhwQB+vGg3PM5+aavopCpZT1lj9jeqfvpgTLAWErNj8qApkkmXlu/Ug74kmhagkXg==} @@ -19029,6 +19513,10 @@ packages: resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} engines: {node: '>=8'} + cssstyle@4.2.1: + resolution: {integrity: sha512-9+vem03dMXG7gDmZ62uqmRiMRNtinIZ9ZyuF6BdxzfOD+FdN5hretzynkn0ReS2DO2GSw76RWHs0UmJPI2zUjw==} + engines: {node: '>=18'} + csstype@2.6.21: resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==} @@ -19101,6 +19589,10 @@ packages: resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} engines: {node: '>=12'} + data-urls@5.0.0: + resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} + engines: {node: '>=18'} + data-view-buffer@1.0.1: resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} engines: {node: '>= 0.4'} @@ -19225,6 +19717,10 @@ packages: resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + deep-equal@1.0.1: resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} @@ -19922,6 +20418,16 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -20204,6 +20710,9 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -20244,6 +20753,10 @@ packages: resolution: {integrity: sha512-j6wcVoZf06nqEcBbDWkKg8Fp895SS96dSnTCjiXT+8vt2o02raTn4Lo9ERUuIVU5bAjoPYeA+7ytQFexFmLuVw==} engines: {node: '>=14.0.0'} + ethers@6.13.4: + resolution: {integrity: sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==} + engines: {node: '>=14.0.0'} + ethjs-unit@0.1.6: resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} engines: {node: '>=6.5.0', npm: '>=3'} @@ -20331,6 +20844,10 @@ packages: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} + expect-type@1.1.0: + resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} + engines: {node: '>=12.0.0'} + expect@27.5.1: resolution: {integrity: sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} @@ -21654,6 +22171,10 @@ packages: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} + html-encoding-sniffer@4.0.0: + resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} + engines: {node: '>=18'} + html-entities@2.5.2: resolution: {integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==} @@ -21738,6 +22259,10 @@ packages: resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} engines: {node: '>= 6'} + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + http-proxy-middleware@2.0.6: resolution: {integrity: sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==} engines: {node: '>=12.0.0'} @@ -21779,6 +22304,10 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} @@ -21968,8 +22497,10 @@ packages: inversify-logger-middleware@3.1.0: resolution: {integrity: sha512-jKwwuQ3cDwCasgSdgUyF3DTlIvcfAVqcs3ViMXrKj5L7AqVP5hd2dnrHr3v8XZf984t6fsj+1Wic43A5WDtkEA==} - inversify@6.1.4: - resolution: {integrity: sha512-PbxrZH/gTa1fpPEEGAjJQzK8tKMIp5gRg6EFNJlCtzUcycuNdmhv3uk5P8Itm/RIjgHJO16oQRLo9IHzQN51bA==} + inversify@6.2.1: + resolution: {integrity: sha512-W6Xi0icXIiC48RWdT681+GlZVgAKmCrNTiP7hj4IVPFbcxHz+Jj8Gxz5qr/Az2cgcZMYdB8tKIr2e68LUi1LYQ==} + peerDependencies: + reflect-metadata: ~0.2.2 io-ts@2.0.1: resolution: {integrity: sha512-RezD+WcCfW4VkMkEcQWL/Nmy/nqsWTvTYg7oUmTGzglvSSV2P9h2z1PVeREPFf0GWNzruYleAt1XCMQZSg1xxQ==} @@ -22653,10 +23184,6 @@ packages: resolution: {integrity: sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} - jest-environment-jsdom@28.1.3: - resolution: {integrity: sha512-HnlGUmZRdxfCByd3GM2F100DgQOajUBzEitjGqIREcb45kGjZvRrKUdlaF6escXBdcXNl0OBh+1ZrfeZT3GnAg==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} - jest-environment-jsdom@29.7.0: resolution: {integrity: sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -23130,20 +23657,20 @@ packages: canvas: optional: true - jsdom@19.0.0: - resolution: {integrity: sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==} - engines: {node: '>=12'} + jsdom@20.0.3: + resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} + engines: {node: '>=14'} peerDependencies: canvas: ^2.5.0 peerDependenciesMeta: canvas: optional: true - jsdom@20.0.3: - resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} - engines: {node: '>=14'} + jsdom@25.0.1: + resolution: {integrity: sha512-8i7LzZj7BF8uplX+ZyOlIz86V6TAsSs+np6m1kpW9u0JWi4z/1t+FzcK1aek+ybTnAC4KhBL4uXCNT0wcUIeCw==} + engines: {node: '>=18'} peerDependencies: - canvas: ^2.5.0 + canvas: ^2.11.2 peerDependenciesMeta: canvas: optional: true @@ -23817,6 +24344,9 @@ packages: loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + loupe@3.1.2: + resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} + lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} @@ -23832,6 +24362,10 @@ packages: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} + lru-cache@11.0.2: + resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} + engines: {node: 20 || >=22} + lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} @@ -23932,6 +24466,9 @@ packages: resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} engines: {node: '>=12'} + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + magic-string@0.30.8: resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} engines: {node: '>=12'} @@ -24961,6 +25498,9 @@ packages: numeral@2.0.6: resolution: {integrity: sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==} + nwsapi@2.2.16: + resolution: {integrity: sha512-F1I/bimDpj3ncaNDhfyMWuFqmQDBwDB0Fogc2qpL3BWvkQteFD/8BzWuIRl83rq0DXfm8SGt/HFhLXZyljTXcQ==} + nwsapi@2.2.7: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} @@ -25387,6 +25927,10 @@ packages: pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + pause-stream@0.0.11: resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} @@ -26009,6 +26553,10 @@ packages: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} + postcss@8.4.49: + resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} + engines: {node: ^10 || ^12 || >=14} + postgres-array@2.0.0: resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==} engines: {node: '>=4'} @@ -27525,6 +28073,12 @@ packages: rpc-websockets@9.0.4: resolution: {integrity: sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ==} + rrweb-cssom@0.7.1: + resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==} + + rrweb-cssom@0.8.0: + resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} + run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -27821,6 +28375,9 @@ packages: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -27953,6 +28510,10 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map-loader@3.0.2: resolution: {integrity: sha512-BokxPoLjyl3iOrgkWaakaxqnelAJSS+0V+De0kKIq6lyWrXuiPgYTGp6z3iHmqljKAaLXwZa+ctD8GccRJeVvg==} engines: {node: '>= 12.13.0'} @@ -28077,6 +28638,9 @@ packages: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + stackframe@1.3.4: resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==} @@ -28111,6 +28675,9 @@ packages: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} + std-env@3.8.0: + resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==} + stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} engines: {node: '>= 0.4'} @@ -28476,9 +29043,6 @@ packages: resolution: {integrity: sha512-mJiVjfd2vokfDxsQPOwJ/PtanO87LhpYY88ubI5dUB1Ab58Txbyje3+jpm+/83R/fevaq/107NNhtYBLuoTrFg==} engines: {node: '>=10'} - superstruct@0.14.2: - resolution: {integrity: sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==} - superstruct@0.6.2: resolution: {integrity: sha512-lvA97MFAJng3rfjcafT/zGTSWm6Tbpk++DP6It4Qg7oNaeM+2tdJMuVgGje21/bIpBEs6iQql1PJH6dKTjl4Ig==} @@ -28796,12 +29360,37 @@ packages: tiny-warning@1.0.3: resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinycolor2@1.6.0: resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinypool@1.0.2: + resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + engines: {node: '>=14.0.0'} + + tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + engines: {node: '>=14.0.0'} + tippy.js@6.3.7: resolution: {integrity: sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==} + tldts-core@6.1.71: + resolution: {integrity: sha512-LRbChn2YRpic1KxY+ldL1pGXN/oVvKfCVufwfVzEQdFYNo39uF7AJa/WXdo+gYO7PTvdfkCPCed6Hkvz/kR7jg==} + + tldts@6.1.71: + resolution: {integrity: sha512-LQIHmHnuzfZgZWAf2HzL83TIIrD8NhhI0DVxqo9/FdOd4ilec+NTNZOlDZf7EwrTNoutccbsHjvWHYXLAtvxjw==} + hasBin: true + tmp-promise@3.0.3: resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} @@ -28866,6 +29455,10 @@ packages: resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} engines: {node: '>=6'} + tough-cookie@5.0.0: + resolution: {integrity: sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==} + engines: {node: '>=16'} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} @@ -28880,6 +29473,10 @@ packages: resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} engines: {node: '>=12'} + tr46@5.0.0: + resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} + engines: {node: '>=18'} + trace-event-lib@1.4.1: resolution: {integrity: sha512-TOgFolKG8JFY+9d5EohGWMvwvteRafcyfPWWNIqcuD1W/FUvxWcy2MSCZ/beYHM63oYPHYHCd3tkbgCctHVP7w==} engines: {node: '>=12.0.0'} @@ -29362,6 +29959,12 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + undici@5.28.3: resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} engines: {node: '>=14.0'} @@ -29658,8 +30261,8 @@ packages: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} - uuid@10.0.0: - resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} + uuid@11.0.4: + resolution: {integrity: sha512-IzL6VtTTYcAhA/oghbFJ1Dkmqev+FpQWnCBaKq/gUluLxliWvO8DPFWfIviRmYbtaavtSQe4WBL++rFjdcGWEg==} hasBin: true uuid@2.0.1: @@ -29763,6 +30366,11 @@ packages: vfile@5.3.7: resolution: {integrity: sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==} + vite-node@2.1.8: + resolution: {integrity: sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite-plugin-electron@0.4.9: resolution: {integrity: sha512-LYKBd2/hncUqe99AG7D4PDzdU7qP0R7W1ijvO4IHTKwARhlWii2tsPa2dr+6Yi/+NBazlKK2OBSzc8lRNl+ctQ==} @@ -29797,6 +30405,102 @@ packages: terser: optional: true + vite@5.4.11: + resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vite@6.0.7: + resolution: {integrity: sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@2.1.8: + resolution: {integrity: sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.8 + '@vitest/ui': 2.1.8 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + vlq@0.2.3: resolution: {integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==} @@ -29880,14 +30584,14 @@ packages: resolution: {integrity: sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==} engines: {node: '>=10'} - w3c-xmlserializer@3.0.0: - resolution: {integrity: sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==} - engines: {node: '>=12'} - w3c-xmlserializer@4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} + w3c-xmlserializer@5.0.0: + resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} + engines: {node: '>=18'} + walk-back@4.0.0: resolution: {integrity: sha512-kudCA8PXVQfrqv2mFTG72vDBRi8BKWxGgFLwPpzHcpZnSwZk93WMwUDVcLHWNsnm+Y0AC4Vb6MUNRgaHfyV2DQ==} engines: {node: '>=8.0.0'} @@ -30141,6 +30845,10 @@ packages: resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} engines: {node: '>=12'} + whatwg-encoding@3.1.1: + resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} + engines: {node: '>=18'} + whatwg-fetch@3.6.20: resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} @@ -30151,18 +30859,22 @@ packages: resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} engines: {node: '>=12'} + whatwg-mimetype@4.0.0: + resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} + engines: {node: '>=18'} + whatwg-url-without-unicode@8.0.0-3: resolution: {integrity: sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig==} engines: {node: '>=10'} - whatwg-url@10.0.0: - resolution: {integrity: sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==} - engines: {node: '>=12'} - whatwg-url@11.0.0: resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} engines: {node: '>=12'} + whatwg-url@14.1.0: + resolution: {integrity: sha512-jlf/foYIKywAt3x/XWKZ/3rz8OSJPiWktjmk891alJUEjiVxKX9LEO92qH3hv4aJ0mN3MWPvGMCy8jQi95xK4w==} + engines: {node: '>=18'} + whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} @@ -30216,6 +30928,11 @@ packages: engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + wif@2.0.6: resolution: {integrity: sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==} @@ -30383,6 +31100,18 @@ packages: utf-8-validate: optional: true + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + ws@8.5.0: resolution: {integrity: sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==} engines: {node: '>=10.0.0'} @@ -30418,6 +31147,10 @@ packages: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} + xml-name-validator@5.0.0: + resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} + engines: {node: '>=18'} + xml2js@0.4.23: resolution: {integrity: sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==} engines: {node: '>=4.0.0'} @@ -30455,8 +31188,8 @@ packages: xstate@4.38.3: resolution: {integrity: sha512-SH7nAaaPQx57dx6qvfcIgqKRXIh4L0A1iYEqim4s1u7c9VoCgzZc+63FY90AKU4ZzOC2cfJzTnpO4zK7fCUzzw==} - xstate@5.19.0: - resolution: {integrity: sha512-Juh1MjeRaVWr1IRxXYvQMMRFMrei6vq6+AfP6Zk9D9YV0ZuvubN0aM6s2ITwUrq+uWtP1NTO8kOZmsM/IqeOiQ==} + xstate@5.19.1: + resolution: {integrity: sha512-vFt3q9EBnO/qTTf9AG/5GosGwdDEftw5VOd3ytfSwUQRvkj6oJkxeBQaCqJUANjHrkK341jMkEZP0zeqrx2tww==} xstream@11.14.0: resolution: {integrity: sha512-1bLb+kKKtKPbgTK6i/BaoAn03g47PpFstlbe1BA+y3pNS/LfvcaghS5BFf9+EE1J+KwSQsEpfJvFN5GqFtiNmw==} @@ -30725,6 +31458,14 @@ snapshots: jwt-decode: 4.0.0 poseidon-lite: 0.2.1 + '@asamuzakjp/css-color@2.8.2': + dependencies: + '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-color-parser': 3.0.7(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + lru-cache: 11.0.2 + '@aw-web-design/x-default-browser@1.4.126': dependencies: default-browser-id: 3.0.0 @@ -31860,6 +32601,26 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/core@7.26.0': + dependencies: + '@ampproject/remapping': 2.3.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.2 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + convert-source-map: 2.0.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + '@babel/eslint-parser@7.24.1(@babel/core@7.24.3)(eslint@8.57.0)': dependencies: '@babel/core': 7.24.3 @@ -32104,6 +32865,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color + '@babel/helper-optimise-call-expression@7.22.5': dependencies: '@babel/types': 7.26.0 @@ -32236,6 +33006,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helpers@7.26.0': + dependencies: + '@babel/template': 7.25.9 + '@babel/types': 7.26.0 + '@babel/highlight@7.24.6': dependencies: '@babel/helper-validator-identifier': 7.25.9 @@ -33124,6 +33899,11 @@ snapshots: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-transform-react-jsx-self@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-transform-react-jsx-source@7.24.1(@babel/core@7.24.3)': dependencies: '@babel/core': 7.24.3 @@ -33138,6 +33918,11 @@ snapshots: '@babel/core': 7.24.3 '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-transform-react-jsx-source@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-transform-react-jsx@7.23.4': dependencies: '@babel/helper-annotate-as-pure': 7.22.5 @@ -34358,6 +35143,26 @@ snapshots: optionalDependencies: source-map-support: 0.5.21 + '@csstools/color-helpers@5.0.1': {} + + '@csstools/css-calc@2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-color-parser@3.0.7(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/color-helpers': 5.0.1 + '@csstools/css-calc': 2.1.1(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) + '@csstools/css-parser-algorithms': 3.0.4(@csstools/css-tokenizer@3.0.3) + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3)': + dependencies: + '@csstools/css-tokenizer': 3.0.3 + + '@csstools/css-tokenizer@3.0.3': {} + '@csstools/normalize.css@12.1.1': {} '@csstools/postcss-cascade-layers@1.1.1(postcss@8.4.38)': @@ -34739,6 +35544,12 @@ snapshots: '@esbuild/aix-ppc64@0.20.2': optional: true + '@esbuild/aix-ppc64@0.21.5': + optional: true + + '@esbuild/aix-ppc64@0.24.2': + optional: true + '@esbuild/android-arm64@0.18.20': optional: true @@ -34748,6 +35559,12 @@ snapshots: '@esbuild/android-arm64@0.20.2': optional: true + '@esbuild/android-arm64@0.21.5': + optional: true + + '@esbuild/android-arm64@0.24.2': + optional: true + '@esbuild/android-arm@0.18.20': optional: true @@ -34757,6 +35574,12 @@ snapshots: '@esbuild/android-arm@0.20.2': optional: true + '@esbuild/android-arm@0.21.5': + optional: true + + '@esbuild/android-arm@0.24.2': + optional: true + '@esbuild/android-x64@0.18.20': optional: true @@ -34766,6 +35589,12 @@ snapshots: '@esbuild/android-x64@0.20.2': optional: true + '@esbuild/android-x64@0.21.5': + optional: true + + '@esbuild/android-x64@0.24.2': + optional: true + '@esbuild/darwin-arm64@0.18.20': optional: true @@ -34775,6 +35604,12 @@ snapshots: '@esbuild/darwin-arm64@0.20.2': optional: true + '@esbuild/darwin-arm64@0.21.5': + optional: true + + '@esbuild/darwin-arm64@0.24.2': + optional: true + '@esbuild/darwin-x64@0.18.20': optional: true @@ -34784,6 +35619,12 @@ snapshots: '@esbuild/darwin-x64@0.20.2': optional: true + '@esbuild/darwin-x64@0.21.5': + optional: true + + '@esbuild/darwin-x64@0.24.2': + optional: true + '@esbuild/freebsd-arm64@0.18.20': optional: true @@ -34793,6 +35634,12 @@ snapshots: '@esbuild/freebsd-arm64@0.20.2': optional: true + '@esbuild/freebsd-arm64@0.21.5': + optional: true + + '@esbuild/freebsd-arm64@0.24.2': + optional: true + '@esbuild/freebsd-x64@0.18.20': optional: true @@ -34802,6 +35649,12 @@ snapshots: '@esbuild/freebsd-x64@0.20.2': optional: true + '@esbuild/freebsd-x64@0.21.5': + optional: true + + '@esbuild/freebsd-x64@0.24.2': + optional: true + '@esbuild/linux-arm64@0.18.20': optional: true @@ -34811,6 +35664,12 @@ snapshots: '@esbuild/linux-arm64@0.20.2': optional: true + '@esbuild/linux-arm64@0.21.5': + optional: true + + '@esbuild/linux-arm64@0.24.2': + optional: true + '@esbuild/linux-arm@0.18.20': optional: true @@ -34820,6 +35679,12 @@ snapshots: '@esbuild/linux-arm@0.20.2': optional: true + '@esbuild/linux-arm@0.21.5': + optional: true + + '@esbuild/linux-arm@0.24.2': + optional: true + '@esbuild/linux-ia32@0.18.20': optional: true @@ -34829,6 +35694,12 @@ snapshots: '@esbuild/linux-ia32@0.20.2': optional: true + '@esbuild/linux-ia32@0.21.5': + optional: true + + '@esbuild/linux-ia32@0.24.2': + optional: true + '@esbuild/linux-loong64@0.18.20': optional: true @@ -34838,6 +35709,12 @@ snapshots: '@esbuild/linux-loong64@0.20.2': optional: true + '@esbuild/linux-loong64@0.21.5': + optional: true + + '@esbuild/linux-loong64@0.24.2': + optional: true + '@esbuild/linux-mips64el@0.18.20': optional: true @@ -34847,6 +35724,12 @@ snapshots: '@esbuild/linux-mips64el@0.20.2': optional: true + '@esbuild/linux-mips64el@0.21.5': + optional: true + + '@esbuild/linux-mips64el@0.24.2': + optional: true + '@esbuild/linux-ppc64@0.18.20': optional: true @@ -34856,6 +35739,12 @@ snapshots: '@esbuild/linux-ppc64@0.20.2': optional: true + '@esbuild/linux-ppc64@0.21.5': + optional: true + + '@esbuild/linux-ppc64@0.24.2': + optional: true + '@esbuild/linux-riscv64@0.18.20': optional: true @@ -34865,6 +35754,12 @@ snapshots: '@esbuild/linux-riscv64@0.20.2': optional: true + '@esbuild/linux-riscv64@0.21.5': + optional: true + + '@esbuild/linux-riscv64@0.24.2': + optional: true + '@esbuild/linux-s390x@0.18.20': optional: true @@ -34874,6 +35769,12 @@ snapshots: '@esbuild/linux-s390x@0.20.2': optional: true + '@esbuild/linux-s390x@0.21.5': + optional: true + + '@esbuild/linux-s390x@0.24.2': + optional: true + '@esbuild/linux-x64@0.18.20': optional: true @@ -34883,6 +35784,15 @@ snapshots: '@esbuild/linux-x64@0.20.2': optional: true + '@esbuild/linux-x64@0.21.5': + optional: true + + '@esbuild/linux-x64@0.24.2': + optional: true + + '@esbuild/netbsd-arm64@0.24.2': + optional: true + '@esbuild/netbsd-x64@0.18.20': optional: true @@ -34892,6 +35802,15 @@ snapshots: '@esbuild/netbsd-x64@0.20.2': optional: true + '@esbuild/netbsd-x64@0.21.5': + optional: true + + '@esbuild/netbsd-x64@0.24.2': + optional: true + + '@esbuild/openbsd-arm64@0.24.2': + optional: true + '@esbuild/openbsd-x64@0.18.20': optional: true @@ -34901,6 +35820,12 @@ snapshots: '@esbuild/openbsd-x64@0.20.2': optional: true + '@esbuild/openbsd-x64@0.21.5': + optional: true + + '@esbuild/openbsd-x64@0.24.2': + optional: true + '@esbuild/sunos-x64@0.18.20': optional: true @@ -34910,6 +35835,12 @@ snapshots: '@esbuild/sunos-x64@0.20.2': optional: true + '@esbuild/sunos-x64@0.21.5': + optional: true + + '@esbuild/sunos-x64@0.24.2': + optional: true + '@esbuild/win32-arm64@0.18.20': optional: true @@ -34919,6 +35850,12 @@ snapshots: '@esbuild/win32-arm64@0.20.2': optional: true + '@esbuild/win32-arm64@0.21.5': + optional: true + + '@esbuild/win32-arm64@0.24.2': + optional: true + '@esbuild/win32-ia32@0.18.20': optional: true @@ -34928,6 +35865,12 @@ snapshots: '@esbuild/win32-ia32@0.20.2': optional: true + '@esbuild/win32-ia32@0.21.5': + optional: true + + '@esbuild/win32-ia32@0.24.2': + optional: true + '@esbuild/win32-x64@0.18.20': optional: true @@ -34937,6 +35880,12 @@ snapshots: '@esbuild/win32-x64@0.20.2': optional: true + '@esbuild/win32-x64@0.21.5': + optional: true + + '@esbuild/win32-x64@0.24.2': + optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: eslint: 8.57.0 @@ -35328,7 +36277,7 @@ snapshots: text-table: 0.2.0 url-join: 4.0.0 wrap-ansi: 7.0.0 - ws: 8.17.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - encoding @@ -35414,7 +36363,7 @@ snapshots: text-table: 0.2.0 url-join: 4.0.0 wrap-ansi: 7.0.0 - ws: 8.17.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - encoding @@ -35500,7 +36449,7 @@ snapshots: text-table: 0.2.0 url-join: 4.0.0 wrap-ansi: 7.0.0 - ws: 8.17.1 + ws: 8.18.0 optionalDependencies: metro: 0.80.12 metro-core: 0.80.12 @@ -36433,7 +37382,7 @@ snapshots: long: 4.0.0 protobufjs: 6.11.4 - '@hashgraph/sdk@2.14.2(patch_hash=ftpe7kgiykw2quxzn7vgiqumd4)': + '@hashgraph/sdk@2.14.2(patch_hash=hno7opkpqo3efbuenv6ysglr4m)': dependencies: '@grpc/grpc-js': 1.6.7 '@hashgraph/cryptography': 1.1.2 @@ -36506,16 +37455,16 @@ snapshots: '@inquirer/type@1.3.1': {} - '@inversifyjs/common@1.3.3': {} + '@inversifyjs/common@1.4.0': {} - '@inversifyjs/core@1.3.4(reflect-metadata@0.2.2)': + '@inversifyjs/core@1.3.5(reflect-metadata@0.2.2)': dependencies: - '@inversifyjs/common': 1.3.3 - '@inversifyjs/reflect-metadata-utils': 0.2.3(reflect-metadata@0.2.2) + '@inversifyjs/common': 1.4.0 + '@inversifyjs/reflect-metadata-utils': 0.2.4(reflect-metadata@0.2.2) transitivePeerDependencies: - reflect-metadata - '@inversifyjs/reflect-metadata-utils@0.2.3(reflect-metadata@0.2.2)': + '@inversifyjs/reflect-metadata-utils@0.2.4(reflect-metadata@0.2.2)': dependencies: reflect-metadata: 0.2.2 @@ -36743,7 +37692,7 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5))': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -36757,7 +37706,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -36923,7 +37872,7 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(ts-node@10.9.2(typescript@5.4.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -36937,7 +37886,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(typescript@5.4.3)) + jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -36959,7 +37908,7 @@ snapshots: - supports-color - ts-node - '@jest/core@29.7.0(ts-node@10.9.2(typescript@5.6.3))': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -36973,7 +37922,43 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(typescript@5.6.3)) + jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 + micromatch: 4.0.7 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - babel-plugin-macros + - metro + - supports-color + - ts-node + + '@jest/core@29.7.0(ts-node@10.9.2(typescript@5.4.3))': + dependencies: + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.12.12 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.9.0 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.12.12)(ts-node@10.9.2(typescript@5.4.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -37017,7 +38002,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-mock: 29.7.0 '@jest/expect-utils@28.1.3': @@ -37066,7 +38051,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -37404,6 +38389,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -37476,6 +38463,19 @@ snapshots: dependencies: commander: 2.20.3 + '@ledgerhq/context-module@1.1.0(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0))': + dependencies: + '@ledgerhq/device-management-kit': 0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0) + axios: 1.7.9 + crypto-js: 4.2.0 + ethers: 6.13.4 + inversify: 6.2.1(reflect-metadata@0.2.2) + purify-ts: 2.1.0 + reflect-metadata: 0.2.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@ledgerhq/crypto-icons-ui@file:libs/ui/packages/crypto-icons(@types/react@18.2.73)(react@18.3.1)(styled-components@5.3.11(@babel/core@7.24.3)(react-dom@18.3.1(react@18.3.1))(react-is@17.0.2)(react@18.3.1))(styled-system@5.1.5)': dependencies: react: 18.3.1 @@ -37489,24 +38489,62 @@ snapshots: '@ledgerhq/live-env': 2.4.1 axios: 1.7.7 - '@ledgerhq/device-management-kit@0.5.1': + '@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@7.5.10)': dependencies: - '@ledgerhq/device-transport-kit-mock-client': 1.1.0 '@sentry/minimal': 6.19.7 - '@statelyai/inspect': 0.4.0(xstate@5.19.0) - axios: 1.7.7 - inversify: 6.1.4(reflect-metadata@0.2.2) + '@statelyai/inspect': 0.4.0(ws@7.5.10)(xstate@5.19.1) + axios: 1.7.9 + inversify: 6.2.1(reflect-metadata@0.2.2) inversify-logger-middleware: 3.1.0 purify-ts: 2.1.0 reflect-metadata: 0.2.2 rxjs: 7.8.1 semver: 7.6.3 - uuid: 10.0.0 - xstate: 5.19.0 + uuid: 11.0.4 + xstate: 5.19.1 transitivePeerDependencies: - ws - '@ledgerhq/device-transport-kit-mock-client@1.1.0': {} + '@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0)': + dependencies: + '@sentry/minimal': 6.19.7 + '@statelyai/inspect': 0.4.0(ws@8.18.0)(xstate@5.19.1) + axios: 1.7.9 + inversify: 6.2.1(reflect-metadata@0.2.2) + inversify-logger-middleware: 3.1.0 + purify-ts: 2.1.0 + reflect-metadata: 0.2.2 + rxjs: 7.8.1 + semver: 7.6.3 + uuid: 11.0.4 + xstate: 5.19.1 + transitivePeerDependencies: + - ws + + '@ledgerhq/device-signer-kit-ethereum@1.1.0(@ledgerhq/context-module@1.1.0(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0)))(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0))': + dependencies: + '@ledgerhq/context-module': 1.1.0(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0)) + '@ledgerhq/device-management-kit': 0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0) + '@ledgerhq/signer-utils': 1.0.2(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0)) + ethers-v5: ethers@5.7.2 + ethers-v6: ethers@6.13.4 + inversify: 6.2.1(reflect-metadata@0.2.2) + inversify-logger-middleware: 3.1.0 + purify-ts: 2.1.0 + reflect-metadata: 0.2.2 + semver: 7.6.3 + xstate: 5.19.1 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@ledgerhq/device-transport-kit-web-hid@0.0.0-develop-20250106155719(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0))(rxjs@7.8.1)': + dependencies: + '@ledgerhq/device-management-kit': 0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0) + '@sentry/minimal': 6.19.7 + purify-ts: 2.1.0 + rxjs: 7.8.1 + uuid: 11.0.4 '@ledgerhq/domain-service@1.2.12': dependencies: @@ -37605,6 +38643,10 @@ snapshots: '@ledgerhq/logs@6.12.0': {} + '@ledgerhq/signer-utils@1.0.2(@ledgerhq/device-management-kit@0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0))': + dependencies: + '@ledgerhq/device-management-kit': 0.0.0-develop-20250106155719(rxjs@7.8.1)(ws@8.18.0) + '@ledgerhq/types-live@6.53.1': dependencies: bignumber.js: 9.1.2 @@ -37653,7 +38695,7 @@ snapshots: '@ledgerhq/wallet-api-core': 1.13.0 '@ledgerhq/wallet-api-server': 1.6.0(react@18.3.1)(rxjs@7.8.1) rxjs: 7.8.1 - ws: 8.17.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - react @@ -38823,7 +39865,7 @@ snapshots: dependencies: '@polkadot/x-global': 12.6.2 tslib: 2.6.2 - ws: 8.17.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -41864,15 +42906,27 @@ snapshots: transitivePeerDependencies: - encoding - '@statelyai/inspect@0.4.0(xstate@5.19.0)': + '@statelyai/inspect@0.4.0(ws@7.5.10)(xstate@5.19.1)': dependencies: fast-safe-stringify: 2.1.1 - isomorphic-ws: 5.0.0 + isomorphic-ws: 5.0.0(ws@7.5.10) partysocket: 0.0.25 safe-stable-stringify: 2.4.3 superjson: 1.13.3 uuid: 9.0.1 - xstate: 5.19.0 + xstate: 5.19.1 + transitivePeerDependencies: + - ws + + '@statelyai/inspect@0.4.0(ws@8.18.0)(xstate@5.19.1)': + dependencies: + fast-safe-stringify: 2.1.1 + isomorphic-ws: 5.0.0(ws@8.18.0) + partysocket: 0.0.25 + safe-stable-stringify: 2.4.3 + superjson: 1.13.3 + uuid: 9.0.1 + xstate: 5.19.1 transitivePeerDependencies: - ws @@ -43352,7 +44406,7 @@ snapshots: util: 0.12.5 util-deprecate: 1.0.2 watchpack: 2.4.2 - ws: 8.17.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - encoding @@ -44429,7 +45483,7 @@ snapshots: transitivePeerDependencies: - '@types/react' - '@testing-library/react@16.0.1(@testing-library/dom@9.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@testing-library/react@16.1.0(@testing-library/dom@9.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.1 '@testing-library/dom': 9.3.4 @@ -44713,7 +45767,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/hammerjs@2.0.45': {} @@ -44782,12 +45836,6 @@ snapshots: expect: 29.7.0 pretty-format: 29.7.0 - '@types/jsdom@16.2.15': - dependencies: - '@types/node': 20.12.12 - '@types/parse5': 6.0.3 - '@types/tough-cookie': 4.0.5 - '@types/jsdom@20.0.1': dependencies: '@types/node': 20.12.12 @@ -44800,7 +45848,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 '@types/jsonwebtoken@9.0.6': dependencies: @@ -44915,6 +45963,18 @@ snapshots: dependencies: undici-types: 5.26.5 + '@types/node@22.10.1': + dependencies: + undici-types: 6.20.0 + + '@types/node@22.10.5': + dependencies: + undici-types: 6.20.0 + + '@types/node@22.7.5': + dependencies: + undici-types: 6.19.8 + '@types/normalize-package-data@2.4.4': {} '@types/numeral@2.0.5': {} @@ -45692,6 +46752,57 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitejs/plugin-react@4.3.4(vite@6.0.7(@types/node@22.10.1))': + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: 6.0.7(@types/node@22.10.1) + transitivePeerDependencies: + - supports-color + + '@vitest/expect@2.1.8': + dependencies: + '@vitest/spy': 2.1.8 + '@vitest/utils': 2.1.8 + chai: 5.1.2 + tinyrainbow: 1.2.0 + + '@vitest/mocker@2.1.8(vite@5.4.11(@types/node@22.10.1))': + dependencies: + '@vitest/spy': 2.1.8 + estree-walker: 3.0.3 + magic-string: 0.30.17 + optionalDependencies: + vite: 5.4.11(@types/node@22.10.1) + + '@vitest/pretty-format@2.1.8': + dependencies: + tinyrainbow: 1.2.0 + + '@vitest/runner@2.1.8': + dependencies: + '@vitest/utils': 2.1.8 + pathe: 1.1.2 + + '@vitest/snapshot@2.1.8': + dependencies: + '@vitest/pretty-format': 2.1.8 + magic-string: 0.30.17 + pathe: 1.1.2 + + '@vitest/spy@2.1.8': + dependencies: + tinyspy: 3.0.2 + + '@vitest/utils@2.1.8': + dependencies: + '@vitest/pretty-format': 2.1.8 + loupe: 3.1.2 + tinyrainbow: 1.2.0 + '@vue/cli-overlay@5.0.8': {} '@vue/cli-plugin-router@5.0.8(@vue/cli-service@5.0.8(lodash@4.17.21)(prettier@3.2.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vue-template-compiler@2.7.16)(vue@2.7.16))': @@ -46108,7 +47219,7 @@ snapshots: dependencies: '@noble/hashes': 1.6.1 eventemitter3: 5.0.1 - ws: 8.17.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -46363,6 +47474,8 @@ snapshots: transitivePeerDependencies: - supports-color + agent-base@7.1.3: {} + agentkeepalive@4.5.0: dependencies: humanize-ms: 1.2.1 @@ -46771,6 +47884,8 @@ snapshots: assertion-error@1.1.0: {} + assertion-error@2.0.1: {} + ast-types-flow@0.0.8: {} ast-types@0.15.2: @@ -46864,6 +47979,12 @@ snapshots: form-data: 4.0.0 proxy-from-env: 1.1.0 + axios@1.7.9: + dependencies: + follow-redirects: 1.15.6 + form-data: 4.0.0 + proxy-from-env: 1.1.0 + axobject-query@3.2.1: dependencies: dequal: 2.0.3 @@ -48068,6 +49189,14 @@ snapshots: pathval: 1.1.1 type-detect: 4.0.8 + chai@5.1.2: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.2 + pathval: 2.0.0 + chainsaw@0.1.0: dependencies: traverse: 0.3.9 @@ -48142,6 +49271,8 @@ snapshots: dependencies: get-func-name: 2.0.2 + check-error@2.1.1: {} + check-types@11.2.3: {} child-process-promise@2.2.1: @@ -48780,13 +49911,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)): + create-jest@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -48876,13 +50007,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)): + create-jest@29.7.0(@types/node@22.10.1): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + jest-config: 29.7.0(@types/node@22.10.1) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -48892,13 +50023,61 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(ts-node@10.9.2(typescript@5.4.3)): + create-jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + create-jest@29.7.0(@types/node@22.10.5): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@22.10.5) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + create-jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + create-jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)): + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -48908,13 +50087,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(ts-node@10.9.2(typescript@5.6.3)): + create-jest@29.7.0(ts-node@10.9.2(typescript@5.4.3)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(ts-node@10.9.2(typescript@5.6.3)) + jest-config: 29.7.0(ts-node@10.9.2(typescript@5.4.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -49203,6 +50382,11 @@ snapshots: dependencies: cssom: 0.3.8 + cssstyle@4.2.1: + dependencies: + '@asamuzakjp/css-color': 2.8.2 + rrweb-cssom: 0.8.0 + csstype@2.6.21: {} csstype@3.1.2: {} @@ -49274,6 +50458,11 @@ snapshots: whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 + data-urls@5.0.0: + dependencies: + whatwg-mimetype: 4.0.0 + whatwg-url: 14.1.0 + data-view-buffer@1.0.1: dependencies: call-bind: 1.0.7 @@ -49373,6 +50562,8 @@ snapshots: dependencies: type-detect: 4.0.8 + deep-eql@5.0.2: {} + deep-equal@1.0.1: {} deep-equal@1.1.2: @@ -50351,6 +51542,60 @@ snapshots: '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 + esbuild@0.21.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + + esbuild@0.24.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 + escalade@3.2.0: {} escape-goat@2.1.1: {} @@ -50726,24 +51971,24 @@ snapshots: - supports-color - typescript - eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))(typescript@5.4.3): + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)))(typescript@5.6.3): dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.6.3) eslint: 8.57.0 optionalDependencies: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3) - jest: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + jest: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(jest@29.7.0(ts-node@10.9.2(typescript@5.6.3)))(typescript@5.6.3): + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))(typescript@5.4.3): dependencies: - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.6.3) + '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.4.3) eslint: 8.57.0 optionalDependencies: '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3) - jest: 29.7.0(ts-node@10.9.2(typescript@5.6.3)) + jest: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) transitivePeerDependencies: - supports-color - typescript @@ -50933,6 +52178,10 @@ snapshots: estree-walker@2.0.2: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.6 + esutils@2.0.3: {} etag@1.8.1: {} @@ -51054,6 +52303,19 @@ snapshots: - bufferutil - utf-8-validate + ethers@6.13.4: + dependencies: + '@adraffy/ens-normalize': 1.10.1 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@types/node': 22.7.5 + aes-js: 4.0.0-beta.5 + tslib: 2.6.2 + ws: 8.17.1 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + ethjs-unit@0.1.6: dependencies: bn.js: 4.11.6 @@ -51167,6 +52429,8 @@ snapshots: expand-template@2.0.3: {} + expect-type@1.1.0: {} + expect@27.5.1: dependencies: '@jest/types': 27.5.1 @@ -52776,6 +54040,10 @@ snapshots: dependencies: whatwg-encoding: 2.0.0 + html-encoding-sniffer@4.0.0: + dependencies: + whatwg-encoding: 3.1.1 + html-entities@2.5.2: {} html-escaper@2.0.2: {} @@ -52909,6 +54177,13 @@ snapshots: transitivePeerDependencies: - supports-color + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.3 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + http-proxy-middleware@2.0.6(@types/express@4.17.21): dependencies: '@types/http-proxy': 1.17.14 @@ -52975,6 +54250,13 @@ snapshots: transitivePeerDependencies: - supports-color + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.3 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + human-id@1.0.2: {} human-signals@2.1.0: {} @@ -53167,12 +54449,11 @@ snapshots: dependencies: chalk: 2.3.0 - inversify@6.1.4(reflect-metadata@0.2.2): + inversify@6.2.1(reflect-metadata@0.2.2): dependencies: - '@inversifyjs/common': 1.3.3 - '@inversifyjs/core': 1.3.4(reflect-metadata@0.2.2) - transitivePeerDependencies: - - reflect-metadata + '@inversifyjs/common': 1.4.0 + '@inversifyjs/core': 1.3.5(reflect-metadata@0.2.2) + reflect-metadata: 0.2.2 io-ts@2.0.1(fp-ts@2.1.1): dependencies: @@ -53549,8 +54830,6 @@ snapshots: dependencies: ws: 7.5.10 - isomorphic-ws@5.0.0: {} - isomorphic-ws@5.0.0(ws@7.5.10): dependencies: ws: 7.5.10 @@ -53559,6 +54838,10 @@ snapshots: dependencies: ws: 8.17.1 + isomorphic-ws@5.0.0(ws@8.18.0): + dependencies: + ws: 8.18.0 + isstream@0.1.2: {} istanbul-lib-coverage@3.2.2: {} @@ -53778,7 +55061,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -53841,26 +55124,6 @@ snapshots: - supports-color - ts-node - jest-cli@28.1.3(@types/node@20.12.12): - dependencies: - '@jest/core': 28.1.3 - '@jest/test-result': 28.1.3 - '@jest/types': 28.1.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.11 - import-local: 3.1.0 - jest-config: 28.1.3(@types/node@20.12.12) - jest-util: 28.1.3 - jest-validate: 28.1.3 - prompts: 2.4.2 - yargs: 17.7.2 - transitivePeerDependencies: - - '@types/node' - - metro - - supports-color - - ts-node - jest-cli@29.7.0: dependencies: '@jest/core': 29.7.0 @@ -53881,16 +55144,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)): + jest-cli@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + create-jest: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + jest-config: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -54001,16 +55264,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)): + jest-cli@29.7.0(@types/node@22.10.1): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + create-jest: 29.7.0(@types/node@22.10.1) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + jest-config: 29.7.0(@types/node@22.10.1) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -54021,16 +55284,36 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(ts-node@10.9.2(typescript@5.4.3)): + jest-cli@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + create-jest: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + jest-config: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + jest-cli@29.7.0(@types/node@22.10.5): + dependencies: + '@jest/core': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(@types/node@22.10.5) + exit: 0.1.2 + import-local: 3.1.0 + jest-config: 29.7.0(@types/node@22.10.5) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -54041,16 +55324,56 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(ts-node@10.9.2(typescript@5.6.3)): + jest-cli@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(typescript@5.6.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(ts-node@10.9.2(typescript@5.6.3)) + create-jest: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(ts-node@10.9.2(typescript@5.6.3)) + jest-config: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + jest-cli@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + exit: 0.1.2 + import-local: 3.1.0 + jest-config: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + jest-cli@29.7.0(ts-node@10.9.2(typescript@5.4.3)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + chalk: 4.1.2 + create-jest: 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + exit: 0.1.2 + import-local: 3.1.0 + jest-config: 29.7.0(ts-node@10.9.2(typescript@5.4.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -54183,7 +55506,7 @@ snapshots: - metro - supports-color - jest-config@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)): + jest-config@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.7.0 @@ -54209,7 +55532,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 18.19.26 - ts-node: 10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5) + ts-node: 10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3) transitivePeerDependencies: - babel-plugin-macros - metro @@ -54278,7 +55601,7 @@ snapshots: - metro - supports-color - jest-config@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)): + jest-config@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.7.0 @@ -54304,7 +55627,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.12.12 - ts-node: 10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5) + ts-node: 10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3) transitivePeerDependencies: - babel-plugin-macros - metro @@ -54438,6 +55761,70 @@ snapshots: - metro - supports-color + jest-config@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)): + dependencies: + '@babel/core': 7.24.3 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.24.3) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.7 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.12.12 + ts-node: 10.9.2(@types/node@22.10.1)(typescript@5.4.3) + transitivePeerDependencies: + - babel-plugin-macros + - metro + - supports-color + + jest-config@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)): + dependencies: + '@babel/core': 7.24.3 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.24.3) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.7 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + '@types/node': 20.12.12 + ts-node: 10.9.2(@types/node@22.10.5)(typescript@5.6.3) + transitivePeerDependencies: + - babel-plugin-macros + - metro + - supports-color + jest-config@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(typescript@5.4.3)): dependencies: '@babel/core': 7.24.3 @@ -54470,7 +55857,7 @@ snapshots: - metro - supports-color - jest-config@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(typescript@5.6.3)): + jest-config@29.7.0(@types/node@22.10.1): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.7.0 @@ -54495,14 +55882,13 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.12.12 - ts-node: 10.9.2(typescript@5.6.3) + '@types/node': 22.10.1 transitivePeerDependencies: - babel-plugin-macros - metro - supports-color - jest-config@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)): + jest-config@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.7.0 @@ -54527,13 +55913,14 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - ts-node: 10.9.2(@swc/core@1.4.11)(typescript@5.4.3) + '@types/node': 22.10.1 + ts-node: 10.9.2(@types/node@22.10.1)(typescript@5.4.3) transitivePeerDependencies: - babel-plugin-macros - metro - supports-color - jest-config@29.7.0(ts-node@10.9.2(typescript@5.4.3)): + jest-config@29.7.0(@types/node@22.10.5): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.7.0 @@ -54558,13 +55945,13 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - ts-node: 10.9.2(typescript@5.4.3) + '@types/node': 22.10.5 transitivePeerDependencies: - babel-plugin-macros - metro - supports-color - jest-config@29.7.0(ts-node@10.9.2(typescript@5.6.3)): + jest-config@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.7.0 @@ -54589,7 +55976,70 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - ts-node: 10.9.2(typescript@5.6.3) + '@types/node': 22.10.5 + ts-node: 10.9.2(@types/node@22.10.5)(typescript@5.6.3) + transitivePeerDependencies: + - babel-plugin-macros + - metro + - supports-color + + jest-config@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)): + dependencies: + '@babel/core': 7.24.3 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.24.3) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.7 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + ts-node: 10.9.2(@swc/core@1.4.11)(typescript@5.4.3) + transitivePeerDependencies: + - babel-plugin-macros + - metro + - supports-color + + jest-config@29.7.0(ts-node@10.9.2(typescript@5.4.3)): + dependencies: + '@babel/core': 7.24.3 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + babel-jest: 29.7.0(@babel/core@7.24.3) + chalk: 4.1.2 + ci-info: 3.9.0 + deepmerge: 4.3.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + micromatch: 4.0.7 + parse-json: 5.2.0 + pretty-format: 29.7.0 + slash: 3.0.0 + strip-json-comments: 3.1.1 + optionalDependencies: + ts-node: 10.9.2(typescript@5.4.3) transitivePeerDependencies: - babel-plugin-macros - metro @@ -54690,22 +56140,6 @@ snapshots: - supports-color - utf-8-validate - jest-environment-jsdom@28.1.3: - dependencies: - '@jest/environment': 28.1.3 - '@jest/fake-timers': 28.1.3 - '@jest/types': 28.1.3 - '@types/jsdom': 16.2.15 - '@types/node': 20.12.12 - jest-mock: 28.1.3 - jest-util: 28.1.3 - jsdom: 19.0.0 - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - jest-environment-jsdom@29.7.0: dependencies: '@jest/environment': 29.7.0 @@ -54744,7 +56178,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -54964,7 +56398,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@27.5.1): @@ -55439,7 +56873,7 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 20.12.12 + '@types/node': 22.10.1 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -55478,18 +56912,6 @@ snapshots: - supports-color - ts-node - jest@28.1.3(@types/node@20.12.12): - dependencies: - '@jest/core': 28.1.3 - '@jest/types': 28.1.3 - import-local: 3.1.0 - jest-cli: 28.1.3(@types/node@20.12.12) - transitivePeerDependencies: - - '@types/node' - - metro - - supports-color - - ts-node - jest@29.7.0: dependencies: '@jest/core': 29.7.0 @@ -55503,12 +56925,12 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)): + jest@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + jest-cli: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -55581,12 +57003,12 @@ snapshots: - supports-color - ts-node - jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)): + jest@29.7.0(@types/node@22.10.1): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + jest-cli: 29.7.0(@types/node@22.10.1) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -55594,12 +57016,38 @@ snapshots: - supports-color - ts-node - jest@29.7.0(ts-node@10.9.2(typescript@5.4.3)): + jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + jest-cli: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + jest@29.7.0(@types/node@22.10.5): + dependencies: + '@jest/core': 29.7.0 + '@jest/types': 29.6.3 + import-local: 3.1.0 + jest-cli: 29.7.0(@types/node@22.10.5) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) + '@jest/types': 29.6.3 + import-local: 3.1.0 + jest-cli: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -55607,12 +57055,25 @@ snapshots: - supports-color - ts-node - jest@29.7.0(ts-node@10.9.2(typescript@5.6.3)): + jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(typescript@5.6.3)) + '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(ts-node@10.9.2(typescript@5.6.3)) + jest-cli: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - metro + - supports-color + - ts-node + + jest@29.7.0(ts-node@10.9.2(typescript@5.4.3)): + dependencies: + '@jest/core': 29.7.0(ts-node@10.9.2(typescript@5.4.3)) + '@jest/types': 29.6.3 + import-local: 3.1.0 + jest-cli: 29.7.0(ts-node@10.9.2(typescript@5.4.3)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -55869,18 +57330,18 @@ snapshots: whatwg-encoding: 1.0.5 whatwg-mimetype: 2.3.0 whatwg-url: 9.1.0 - ws: 8.17.1 + ws: 8.18.0 xml-name-validator: 3.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - jsdom@19.0.0: + jsdom@20.0.3: dependencies: abab: 2.0.6 acorn: 8.13.0 - acorn-globals: 6.0.0 + acorn-globals: 7.0.1 cssom: 0.5.0 cssstyle: 2.3.0 data-urls: 3.0.2 @@ -55893,51 +57354,45 @@ snapshots: https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.7 - parse5: 6.0.1 - saxes: 5.0.1 + parse5: 7.1.2 + saxes: 6.0.0 symbol-tree: 3.2.4 tough-cookie: 4.1.4 - w3c-hr-time: 1.0.2 - w3c-xmlserializer: 3.0.0 + w3c-xmlserializer: 4.0.0 webidl-conversions: 7.0.0 whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 - whatwg-url: 10.0.0 - ws: 8.17.1 + whatwg-url: 11.0.0 + ws: 8.18.0 xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - jsdom@20.0.3: + jsdom@25.0.1: dependencies: - abab: 2.0.6 - acorn: 8.13.0 - acorn-globals: 7.0.1 - cssom: 0.5.0 - cssstyle: 2.3.0 - data-urls: 3.0.2 + cssstyle: 4.2.1 + data-urls: 5.0.0 decimal.js: 10.4.3 - domexception: 4.0.0 - escodegen: 2.1.0 form-data: 4.0.0 - html-encoding-sniffer: 3.0.0 - http-proxy-agent: 5.0.0 - https-proxy-agent: 5.0.1 + html-encoding-sniffer: 4.0.0 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.7 + nwsapi: 2.2.16 parse5: 7.1.2 + rrweb-cssom: 0.7.1 saxes: 6.0.0 symbol-tree: 3.2.4 - tough-cookie: 4.1.4 - w3c-xmlserializer: 4.0.0 + tough-cookie: 5.0.0 + w3c-xmlserializer: 5.0.0 webidl-conversions: 7.0.0 - whatwg-encoding: 2.0.0 - whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 - ws: 8.17.1 - xml-name-validator: 4.0.0 + whatwg-encoding: 3.1.1 + whatwg-mimetype: 4.0.0 + whatwg-url: 14.1.0 + ws: 8.18.0 + xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil - supports-color @@ -56706,6 +58161,8 @@ snapshots: dependencies: get-func-name: 2.0.2 + loupe@3.1.2: {} + lower-case@2.0.2: dependencies: tslib: 2.6.2 @@ -56716,6 +58173,8 @@ snapshots: lru-cache@10.2.0: {} + lru-cache@11.0.2: {} + lru-cache@4.1.5: dependencies: pseudomap: 1.0.2 @@ -56842,6 +58301,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + magic-string@0.30.17: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + magic-string@0.30.8: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -58381,6 +59844,8 @@ snapshots: numeral@2.0.6: {} + nwsapi@2.2.16: {} + nwsapi@2.2.7: {} nyc@15.1.0: @@ -58860,6 +60325,8 @@ snapshots: pathval@1.1.1: {} + pathval@2.0.0: {} + pause-stream@0.0.11: dependencies: through: 2.3.8 @@ -59496,6 +60963,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.0 + postcss@8.4.49: + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.1 + source-map-js: 1.2.1 + postgres-array@2.0.0: {} postgres-bytea@1.0.0: {} @@ -61673,11 +63146,15 @@ snapshots: buffer: 6.0.3(patch_hash=2xnca52oxhztvr7iaoovwclcze) eventemitter3: 5.0.1 uuid: 8.3.2 - ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) optionalDependencies: bufferutil: 4.0.8 utf-8-validate: 5.0.10 + rrweb-cssom@0.7.1: {} + + rrweb-cssom@0.8.0: {} + run-async@2.4.1: {} run-parallel@1.2.0: @@ -62015,6 +63492,8 @@ snapshots: get-intrinsic: 1.2.4 object-inspect: 1.13.1 + siginfo@2.0.0: {} + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -62122,7 +63601,7 @@ snapshots: smoldot@2.0.22: dependencies: - ws: 8.17.1 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -62170,6 +63649,8 @@ snapshots: source-map-js@1.2.0: {} + source-map-js@1.2.1: {} + source-map-loader@3.0.2(webpack@5.94.0(metro@0.80.12)): dependencies: abab: 2.0.6 @@ -62318,6 +63799,8 @@ snapshots: dependencies: escape-string-regexp: 2.0.0 + stackback@0.0.2: {} + stackframe@1.3.4: {} stacktrace-gps@3.1.2: @@ -62349,6 +63832,8 @@ snapshots: statuses@2.0.1: {} + std-env@3.8.0: {} + stop-iteration-iterator@1.0.0: dependencies: internal-slot: 1.0.7 @@ -62911,8 +64396,6 @@ snapshots: dependencies: copy-anything: 3.0.5 - superstruct@0.14.2: {} - superstruct@0.6.2: dependencies: clone-deep: 2.0.2 @@ -63381,12 +64864,28 @@ snapshots: tiny-warning@1.0.3: {} + tinybench@2.9.0: {} + tinycolor2@1.6.0: {} + tinyexec@0.3.2: {} + + tinypool@1.0.2: {} + + tinyrainbow@1.2.0: {} + + tinyspy@3.0.2: {} + tippy.js@6.3.7: dependencies: '@popperjs/core': 2.11.8 + tldts-core@6.1.71: {} + + tldts@6.1.71: + dependencies: + tldts-core: 6.1.71 + tmp-promise@3.0.3: dependencies: tmp: 0.2.3 @@ -63443,6 +64942,10 @@ snapshots: universalify: 0.2.0 url-parse: 1.5.10 + tough-cookie@5.0.0: + dependencies: + tldts: 6.1.71 + tr46@0.0.3: {} tr46@1.0.1: @@ -63457,6 +64960,10 @@ snapshots: dependencies: punycode: 2.3.1 + tr46@5.0.0: + dependencies: + punycode: 2.3.1 + trace-event-lib@1.4.1: dependencies: browser-process-hrtime: 1.0.0 @@ -63558,20 +65065,36 @@ snapshots: typescript: 5.6.3 yargs-parser: 21.1.1 - ts-jest@28.0.8(jest@28.1.3(@types/node@20.12.12))(typescript@5.4.3): + ts-jest@29.1.2(@babel/core@7.24.3)(babel-jest@29.7.0(@babel/core@7.24.3))(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))(typescript@5.4.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 28.1.3(@types/node@20.12.12) - jest-util: 28.1.3 + jest: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.5.4 typescript: 5.4.3 yargs-parser: 21.1.1 + optionalDependencies: + '@babel/core': 7.24.3 + babel-jest: 29.7.0(@babel/core@7.24.3) - ts-jest@29.1.2(@babel/core@7.24.3)(babel-jest@29.7.0(@babel/core@7.24.3))(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))(typescript@5.4.3): + ts-jest@29.1.2(jest@29.7.0(@types/node@20.12.12))(typescript@5.4.3): + dependencies: + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0(@types/node@20.12.12) + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.5.4 + typescript: 5.4.3 + yargs-parser: 21.1.1 + + ts-jest@29.1.2(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))(typescript@5.4.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 @@ -63583,15 +65106,27 @@ snapshots: semver: 7.5.4 typescript: 5.4.3 yargs-parser: 21.1.1 + + ts-jest@29.1.5(esbuild@0.24.2)(jest@29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)))(typescript@5.6.3): + dependencies: + bs-logger: 0.2.6 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0(@types/node@22.10.5)(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3)) + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.5.4 + typescript: 5.6.3 + yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.24.3 - babel-jest: 29.7.0(@babel/core@7.24.3) + esbuild: 0.24.2 - ts-jest@29.1.2(jest@29.7.0(@types/node@20.12.12))(typescript@5.4.3): + ts-jest@29.1.5(esbuild@0.24.2)(jest@29.7.0(@types/node@22.10.5))(typescript@5.4.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.12.12) + jest: 29.7.0(@types/node@22.10.5) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -63599,12 +65134,14 @@ snapshots: semver: 7.5.4 typescript: 5.4.3 yargs-parser: 21.1.1 + optionalDependencies: + esbuild: 0.24.2 - ts-jest@29.1.2(jest@29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)))(typescript@5.4.3): + ts-jest@29.1.5(esbuild@0.24.2)(jest@29.7.0)(typescript@5.4.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(ts-node@10.9.2(@swc/core@1.4.11)(typescript@5.4.3)) + jest: 29.7.0 jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -63612,18 +65149,20 @@ snapshots: semver: 7.5.4 typescript: 5.4.3 yargs-parser: 21.1.1 + optionalDependencies: + esbuild: 0.24.2 - ts-jest@29.1.5(jest@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)))(typescript@4.9.5): + ts-jest@29.1.5(jest@29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)))(typescript@5.4.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5)) + jest: 29.7.0(@types/node@18.19.26)(ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.5.4 - typescript: 4.9.5 + typescript: 5.4.3 yargs-parser: 21.1.1 ts-jest@29.1.5(jest@29.7.0(@types/node@20.12.12)(ts-node@10.9.2(@types/node@20.12.12)(source-map-support@0.5.21)(typescript@5.4.3)))(typescript@5.4.3): @@ -63704,19 +65243,6 @@ snapshots: typescript: 5.4.3 yargs-parser: 21.1.1 - ts-jest@29.1.5(jest@29.7.0(ts-node@10.9.2(typescript@5.6.3)))(typescript@5.6.3): - dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(ts-node@10.9.2(typescript@5.6.3)) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.5.4 - typescript: 5.6.3 - yargs-parser: 21.1.1 - ts-jest@29.1.5(jest@29.7.0)(typescript@5.4.3): dependencies: bs-logger: 0.2.6 @@ -63771,12 +65297,26 @@ snapshots: typescript: 5.4.3 yargs-parser: 21.1.1 - ts-jest@29.2.5(jest@29.7.0)(typescript@5.4.3): + ts-jest@29.2.5(jest@29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)))(typescript@5.4.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0 + jest: 29.7.0(@types/node@22.10.1)(ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3)) + jest-util: 29.7.0 + json5: 2.2.3 + lodash.memoize: 4.1.2 + make-error: 1.3.6 + semver: 7.6.3 + typescript: 5.4.3 + yargs-parser: 21.1.1 + + ts-jest@29.2.5(jest@29.7.0(@types/node@22.10.1))(typescript@5.4.3): + dependencies: + bs-logger: 0.2.6 + ejs: 3.1.10 + fast-json-stable-stringify: 2.1.0 + jest: 29.7.0(@types/node@22.10.1) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -63816,7 +65356,7 @@ snapshots: transitivePeerDependencies: - source-map-support - ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@4.9.5): + ts-node@10.9.2(@types/node@18.19.26)(source-map-support@0.5.21)(typescript@5.4.3): dependencies: '@cspotcode/source-map-support': 0.8.1(source-map-support@0.5.21) '@tsconfig/node10': 1.0.11 @@ -63830,7 +65370,7 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 5.4.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 transitivePeerDependencies: @@ -63936,13 +65476,14 @@ snapshots: transitivePeerDependencies: - source-map-support - ts-node@10.9.2(typescript@5.4.3): + ts-node@10.9.2(@types/node@22.10.1)(typescript@5.4.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 + '@types/node': 22.10.1 acorn: 8.13.0 acorn-walk: 8.3.2 arg: 4.1.3 @@ -63955,13 +65496,14 @@ snapshots: transitivePeerDependencies: - source-map-support - ts-node@10.9.2(typescript@5.6.3): + ts-node@10.9.2(@types/node@22.10.5)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 + '@types/node': 22.10.5 acorn: 8.13.0 acorn-walk: 8.3.2 arg: 4.1.3 @@ -63974,6 +65516,25 @@ snapshots: transitivePeerDependencies: - source-map-support + ts-node@10.9.2(typescript@5.4.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + acorn: 8.13.0 + acorn-walk: 8.3.2 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.4.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + transitivePeerDependencies: + - source-map-support + ts-object-utils@0.0.5: {} tsconfig-paths@3.15.0: @@ -64236,6 +65797,10 @@ snapshots: undici-types@5.26.5: {} + undici-types@6.19.8: {} + + undici-types@6.20.0: {} + undici@5.28.3: dependencies: '@fastify/busboy': 2.1.1 @@ -64571,7 +66136,7 @@ snapshots: utils-merge@1.0.1: {} - uuid@10.0.0: {} + uuid@11.0.4: {} uuid@2.0.1: {} @@ -64693,6 +66258,24 @@ snapshots: unist-util-stringify-position: 3.0.3 vfile-message: 3.1.4 + vite-node@2.1.8(@types/node@22.10.1): + dependencies: + cac: 6.7.14 + debug: 4.3.7 + es-module-lexer: 1.5.4 + pathe: 1.1.2 + vite: 5.4.11(@types/node@22.10.1) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vite-plugin-electron@0.4.9: dependencies: vite-plugin-optimizer: 1.4.3 @@ -64716,6 +66299,60 @@ snapshots: '@types/node': 20.12.12 fsevents: 2.3.3 + vite@5.4.11(@types/node@22.10.1): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.49 + rollup: 4.24.0 + optionalDependencies: + '@types/node': 22.10.1 + fsevents: 2.3.3 + + vite@6.0.7(@types/node@22.10.1): + dependencies: + esbuild: 0.24.2 + postcss: 8.4.49 + rollup: 4.24.0 + optionalDependencies: + '@types/node': 22.10.1 + fsevents: 2.3.3 + + vitest@2.1.8(@types/node@22.10.1)(jsdom@25.0.1): + dependencies: + '@vitest/expect': 2.1.8 + '@vitest/mocker': 2.1.8(vite@5.4.11(@types/node@22.10.1)) + '@vitest/pretty-format': 2.1.8 + '@vitest/runner': 2.1.8 + '@vitest/snapshot': 2.1.8 + '@vitest/spy': 2.1.8 + '@vitest/utils': 2.1.8 + chai: 5.1.2 + debug: 4.3.7 + expect-type: 1.1.0 + magic-string: 0.30.17 + pathe: 1.1.2 + std-env: 3.8.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinypool: 1.0.2 + tinyrainbow: 1.2.0 + vite: 5.4.11(@types/node@22.10.1) + vite-node: 2.1.8(@types/node@22.10.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.10.1 + jsdom: 25.0.1 + transitivePeerDependencies: + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vlq@0.2.3: {} vlq@1.0.1: {} @@ -64843,13 +66480,13 @@ snapshots: dependencies: xml-name-validator: 3.0.0 - w3c-xmlserializer@3.0.0: + w3c-xmlserializer@4.0.0: dependencies: xml-name-validator: 4.0.0 - w3c-xmlserializer@4.0.0: + w3c-xmlserializer@5.0.0: dependencies: - xml-name-validator: 4.0.0 + xml-name-validator: 5.0.0 walk-back@4.0.0: {} @@ -65203,7 +66840,7 @@ snapshots: sockjs: 0.3.24 spdy: 4.0.2 webpack-dev-middleware: 5.3.4(webpack@5.94.0) - ws: 8.17.1 + ws: 8.18.0 optionalDependencies: webpack: 5.94.0(webpack-cli@4.10.0) webpack-cli: 4.10.0(webpack-dev-server@4.15.2)(webpack@5.94.0) @@ -65243,7 +66880,7 @@ snapshots: sockjs: 0.3.24 spdy: 4.0.2 webpack-dev-middleware: 5.3.4(webpack@5.94.0(metro@0.80.12)) - ws: 8.17.1 + ws: 8.18.0 optionalDependencies: webpack: 5.94.0(metro@0.80.12) transitivePeerDependencies: @@ -65282,7 +66919,7 @@ snapshots: sockjs: 0.3.24 spdy: 4.0.2 webpack-dev-middleware: 5.3.4(webpack@5.94.0) - ws: 8.17.1 + ws: 8.18.0 optionalDependencies: webpack: 5.94.0 transitivePeerDependencies: @@ -65549,26 +67186,32 @@ snapshots: dependencies: iconv-lite: 0.6.3 + whatwg-encoding@3.1.1: + dependencies: + iconv-lite: 0.6.3 + whatwg-fetch@3.6.20: {} whatwg-mimetype@2.3.0: {} whatwg-mimetype@3.0.0: {} + whatwg-mimetype@4.0.0: {} + whatwg-url-without-unicode@8.0.0-3: dependencies: buffer: 5.7.1 punycode: 2.3.1 webidl-conversions: 5.0.0 - whatwg-url@10.0.0: + whatwg-url@11.0.0: dependencies: tr46: 3.0.0 webidl-conversions: 7.0.0 - whatwg-url@11.0.0: + whatwg-url@14.1.0: dependencies: - tr46: 3.0.0 + tr46: 5.0.0 webidl-conversions: 7.0.0 whatwg-url@5.0.0: @@ -65652,6 +67295,11 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + wif@2.0.6: dependencies: bs58check: 2.1.2 @@ -65880,15 +67528,17 @@ snapshots: ws@8.17.1: {} - ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): + ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.3): optionalDependencies: bufferutil: 4.0.8 - utf-8-validate: 5.0.10 + utf-8-validate: 6.0.3 - ws@8.17.1(bufferutil@4.0.8)(utf-8-validate@6.0.3): + ws@8.18.0: {} + + ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 - utf-8-validate: 6.0.3 + utf-8-validate: 5.0.10 ws@8.5.0: {} @@ -65924,6 +67574,8 @@ snapshots: xml-name-validator@4.0.0: {} + xml-name-validator@5.0.0: {} + xml2js@0.4.23: dependencies: sax: 1.2.4 @@ -65953,7 +67605,7 @@ snapshots: xstate@4.38.3: {} - xstate@5.19.0: {} + xstate@5.19.1: {} xstream@11.14.0: dependencies: diff --git a/tests/dummy-live-app/tsconfig.json b/tests/dummy-live-app/tsconfig.json index afc11167136a..d5639beef93d 100644 --- a/tests/dummy-live-app/tsconfig.json +++ b/tests/dummy-live-app/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "lib": ["dom", "dom.iterable", "esnext"], "noFallthroughCasesInSwitch": true, - "module": "esnext", "noEmit": true, "jsx": "react-jsx" }, diff --git a/tests/dummy-wallet-app/tsconfig.json b/tests/dummy-wallet-app/tsconfig.json index 42d105e9ea67..117394b44eeb 100644 --- a/tests/dummy-wallet-app/tsconfig.json +++ b/tests/dummy-wallet-app/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "lib": ["dom", "dom.iterable", "esnext"], "noFallthroughCasesInSwitch": true, - "module": "esnext", "noEmit": true, "jsx": "react-jsx" }, diff --git a/tools/actions/build-checks/build/main.js b/tools/actions/build-checks/build/main.js index 6e7f4e93ab41..3e9d6e9a4622 100644 --- a/tools/actions/build-checks/build/main.js +++ b/tools/actions/build-checks/build/main.js @@ -57689,9 +57689,7 @@ function isDateBefore(a, b) { return new Date(a) < new Date(b); } var Reporter = class { - constructor() { - this.statements = []; - } + statements = []; improvement(message) { this.statements.push(`\u{1F680} ${message}`); } diff --git a/tools/actions/turbo-affected/build/main.js b/tools/actions/turbo-affected/build/main.js index a25a9c52688c..e1ef386cca54 100644 --- a/tools/actions/turbo-affected/build/main.js +++ b/tools/actions/turbo-affected/build/main.js @@ -18899,45 +18899,49 @@ var package_default = { changelog: "changeset add", prerelease: "pnpm run build:libs", release: "changeset publish", - "build:libs": 'pnpm turbo build --no-daemon --filter="./libs/**" --filter="!./libs/ui/examples/**"', + "build:libs": 'pnpm turbo build --filter="./libs/**" --filter="!./libs/ui/examples/**"', "build:libs:force": 'pnpm -r --filter="./libs/**" --filter="!./libs/ui/examples/**" build', - "build:tests": 'pnpm turbo build --no-daemon --filter="./tests/**"', + "build:tests": 'pnpm turbo build --filter="./tests/**"', "build:dummy-apps": 'pnpm turbo build --filter="@ledgerhq/dummy-*-app"', "build:dummy-wallet-app": 'pnpm turbo build --filter="@ledgerhq/dummy-wallet-app"', "build:dummy-live-app": 'pnpm turbo build --filter="@ledgerhq/dummy-live-app"', "build:actions": "pnpm turbo build --filter=@actions/*", - "build:cli": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-cli", - "build:coin": 'pnpm turbo build --no-daemon --filter="./libs/coin-**"', - "build:domain": "pnpm turbo build --no-daemon --filter=@ledgerhq/domain-service", - "build:network": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-network", - "build:config": "pnpm turbo build --no-daemon --filter=@ledgerhq/live-config", - "build:llc": "pnpm turbo build --no-daemon --filter=./libs/ledger-live-common", - "build:lld": "pnpm turbo build --no-daemon --filter=ledger-live-desktop", - "build:lld:deps": 'pnpm turbo build --no-daemon --filter="ledger-live-desktop^..."', - "build:llm:android": "pnpm turbo android:apk:local --no-daemon --filter=live-mobile", - "build:llm:ios": "pnpm turbo ios:local:ipa --no-daemon --filter=live-mobile", - "build:llm:deps": 'pnpm turbo build --no-daemon --filter="live-mobile^..."', - "build:ljs": 'pnpm turbo build --no-daemon --filter="./libs/ledgerjs/**"', - "build:web-tools": "pnpm turbo build --no-daemon --filter=./apps/web-tools", - "build-ci:llm:ios": "pnpm turbo ios:ci:adhoc --no-daemon --filter=live-mobile", - "build-ci:llm:android": "pnpm turbo android:apk --no-daemon --filter=live-mobile", - "clean:ljs": 'pnpm turbo clean --no-daemon --filter="./libs/ledgerjs/**"', - "doc:ljs": 'pnpm turbo doc --no-daemon --filter="./libs/ledgerjs/**"', - "watch:ljs": 'pnpm turbo watch --no-daemon --filter="./libs/ledgerjs/**"', - "watch:common": "pnpm turbo watch --no-daemon --filter=./libs/ledger-live-common", - "dev:cli": "pnpm turbo watch --filter=@ledgerhq/live-cli", - "dev:lld": "pnpm turbo start --no-daemon --filter=ledger-live-desktop", - "dev:lld:debug": "DEV_TOOLS=1 LEDGER_INTERNAL_ARGS=--inspect ELECTRON_ARGS=--remote-debugging-port=8315 pnpm turbo start --no-daemon --filter=ledger-live-desktop", - "dev:llm": "pnpm turbo start --no-daemon --filter=live-mobile", - "release:lld": "pnpm turbo release --no-daemon --filter=ledger-live-desktop", - "pre:lld": "pnpm turbo pre-build --no-daemon --filter=ledger-live-desktop", - nightly: "pnpm turbo nightly --no-daemon", - "nightly:lld": "pnpm turbo nightly --no-daemon --filter=ledger-live-desktop", - test: "pnpm turbo test --no-daemon --concurrency=50%", + "build:cli": "pnpm turbo build --filter=@ledgerhq/live-cli", + "build:coin": 'pnpm turbo build --filter="./libs/coin-*/**"', + "build:domain": "pnpm turbo build --filter=@ledgerhq/domain-service", + "build:network": "pnpm turbo build --filter=@ledgerhq/live-network", + "build:config": "pnpm turbo build --filter=@ledgerhq/live-config", + "build:llc": "pnpm turbo build --filter=./libs/ledger-live-common", + "build:lld": "pnpm turbo build --filter=ledger-live-desktop", + "build:lld:deps": 'pnpm turbo build --filter="ledger-live-desktop^..."', + "build:llm:android": "pnpm turbo android:apk:local --filter=live-mobile", + "build:llm:ios": "pnpm turbo ios:local:ipa --filter=live-mobile", + "build:llm:deps": 'pnpm turbo build --filter="live-mobile^..."', + "build:ljs": 'pnpm turbo build --filter="./libs/ledgerjs/**"', + "build:web-tools": "pnpm turbo build --filter=./apps/web-tools", + "build-ci:llm:ios": "pnpm turbo ios:ci:adhoc --filter=live-mobile", + "build-ci:llm:android": "pnpm turbo android:apk --filter=live-mobile", + "clean:ljs": 'pnpm turbo clean --filter="./libs/ledgerjs/**"', + "doc:ljs": 'pnpm turbo doc --filter="./libs/ledgerjs/**"', + "watch:coin": 'pnpm turbo run watch --filter="./libs/coin-*/**" --concurrency 20', + "watch:es:coin": 'pnpm turbo run watch:es --filter="./libs/coin-*/**" --concurrency 20', + "watch:ljs": 'pnpm turbo run watch --filter="./libs/ledgerjs/**" --concurrency 44', + "watch:es:ljs": 'pnpm turbo run watch:es --filter="./libs/ledgerjs/**" --concurrency 44', + "watch:common": "pnpm turbo run watch --filter=./libs/ledger-live-common", + "watch:es:common": "pnpm turbo run watch:es --filter=./libs/ledger-live-common", + "dev:cli": "pnpm turbo run watch --filter=@ledgerhq/live-cli", + "dev:lld": "pnpm turbo start --filter=ledger-live-desktop", + "dev:lld:debug": "DEV_TOOLS=1 LEDGER_INTERNAL_ARGS=--inspect ELECTRON_ARGS=--remote-debugging-port=8315 pnpm turbo start --filter=ledger-live-desktop", + "dev:llm": "pnpm turbo start --filter=live-mobile", + "release:lld": "pnpm turbo release --filter=ledger-live-desktop", + "pre:lld": "pnpm turbo pre-build --filter=ledger-live-desktop", + nightly: "pnpm turbo nightly", + "nightly:lld": "pnpm turbo nightly --filter=ledger-live-desktop", + test: "pnpm turbo test --concurrency=50%", "run:cli": "./apps/cli/bin/index.js", - lint: "pnpm turbo lint --no-daemon", - "lint:fix": "pnpm turbo lint:fix --no-daemon", - typecheck: "pnpm turbo typecheck --no-daemon", + lint: "pnpm turbo lint", + "lint:fix": "pnpm turbo lint:fix", + typecheck: "pnpm turbo typecheck", "knip-check": "pnpm turbo knip-check", unimported: "pnpm turbo unimported", desktop: "pnpm --filter ledger-live-desktop", @@ -18951,17 +18955,21 @@ var package_default = { "coin:cosmos": "pnpm --filter coin-cosmos", "coin:elrond": "pnpm --filter coin-elrond", "coin:evm": "pnpm --filter coin-evm", + "coin:filecoin": "pnpm --filter coin-filecoin", "coin:framework": "pnpm --filter coin-framework", - "coin:hedera": "pnpm --filter coin-hedera", "coin:tester": "pnpm --filter coin-tester", "coin:near": "pnpm --filter coin-near", "coin:polkadot": "pnpm --filter coin-polkadot", "coin:ton": "pnpm --filter coin-ton", "coin:solana": "pnpm --filter coin-solana", + "coin:hedera": "pnpm --filter coin-hedera", + "coin:stacks": "pnpm --filter coin-stacks", "coin:icon": "pnpm --filter coin-icon", + "coin:icp": "pnpm --filter coin-internet_computer", "coin:stellar": "pnpm --filter coin-stellar", "coin:tezos": "pnpm --filter coin-tezos", "coin:tron": "pnpm --filter coin-tron", + "coin:vechain": "pnpm --filter coin-vechain", "coin:xrp": "pnpm --filter coin-xrp", "evm-tools": "pnpm --filter evm-tools", domain: "pnpm --filter domain-service", @@ -18985,16 +18993,17 @@ var package_default = { "countervalues-react": "pnpm --filter live-countervalues-react", nft: "pnpm --filter live-nft", "nft-react": "pnpm --filter live-nft-react", + "live-dmk": "pnpm --filter live-dmk", "bot:github": "pnpm --filter live-github-bot", "ljs:cryptoassets": "pnpm --filter cryptoassets", "ljs:devices": "pnpm --filter devices", "ljs:errors": "pnpm --filter errors", "ljs:hw-app-algorand": "pnpm --filter hw-app-algorand", - "ljs:hw-app-aptos": "pnpm --filter hw-app-aptos", "ljs:hw-app-btc": "pnpm --filter hw-app-btc", "ljs:hw-app-cosmos": "pnpm --filter hw-app-cosmos", "ljs:hw-app-eth": "pnpm --filter hw-app-eth", "ljs:hw-app-exchange": "pnpm --filter hw-app-exchange", + "ljs:hw-app-hedera": "pnpm --filter hw-app-hedera", "ljs:hw-app-helium": "pnpm --filter hw-app-helium", "ljs:hw-app-near": "pnpm --filter hw-app-near", "ljs:hw-app-polkadot": "pnpm --filter hw-app-polkadot", @@ -19004,6 +19013,8 @@ var package_default = { "ljs:hw-app-trx": "pnpm --filter hw-app-trx", "ljs:hw-app-xrp": "pnpm --filter hw-app-xrp", "ljs:hw-app-icon": "pnpm --filter hw-app-icon", + "ljs:hw-app-vet": "pnpm --filter hw-app-vet", + "ljs:hw-bolos": "pnpm --filter hw-bolos", "ljs:hw-transport": "pnpm --filter hw-transport", "ljs:hw-transport-http": "pnpm --filter hw-transport-http", "ljs:hw-transport-mocker": "pnpm --filter hw-transport-mocker", @@ -19025,6 +19036,8 @@ var package_default = { "ljs:types-cryptoassets": "pnpm --filter types-cryptoassets", "ljs:types-devices": "pnpm --filter types-devices", "ljs:types-live": "pnpm --filter types-live", + "service:cal": "pnpm --filter ledger-cal-service", + "service:trust": "pnpm --filter ledger-trust-service", "speculos-transport": "pnpm --filter speculos-transport", "test-utils": "pnpm --filter test-utils", "dummy-live-app": "pnpm --filter dummy-live-app", @@ -19076,8 +19089,8 @@ var package_default = { "remove-flow-types-loader>loader-utils": "*", "@ledgerhq/devices": "workspace:*", tslib: "2.6.2", - "@hashgraph/sdk>@grpc/grpc-js": "1.6.7", "@hashgraph/sdk>@hashgraph/cryptography": "1.1.2", + "@hashgraph/sdk>@grpc/grpc-js": "1.6.7", "@ethersproject/providers>ws": "7.5.10" }, patchedDependencies: { @@ -19085,14 +19098,14 @@ var package_default = { "rn-fetch-blob@0.12.0": "patches/rn-fetch-blob@0.12.0.patch", "react-native-image-crop-tools@1.6.4": "patches/react-native-image-crop-tools@1.6.4.patch", "asyncstorage-down@4.2.0": "patches/asyncstorage-down@4.2.0.patch", - "detox@20.26.2": "patches/detox@20.26.2.patch", + "detox@20.28.0": "patches/detox@20.28.0.patch", "usb@2.9.0": "patches/usb@2.9.0.patch", "react-native-video@5.2.1": "patches/react-native-video@5.2.1.patch", - "@hashgraph/sdk@2.14.2": "patches/@hashgraph__sdk@2.14.2.patch", "@changesets/get-github-info@0.6.0": "patches/@changesets__get-github-info@0.6.0.patch", "react-native-webview@13.10.3": "patches/react-native-webview@13.10.3.patch", "buffer@6.0.3": "patches/buffer@6.0.3.patch", - "react-native-fast-pbkdf2@0.3.1": "patches/react-native-fast-pbkdf2@0.3.1.patch" + "react-native-fast-pbkdf2@0.3.1": "patches/react-native-fast-pbkdf2@0.3.1.patch", + "@hashgraph/sdk@2.14.2": "patches/@hashgraph__sdk@2.14.2.patch" }, packageExtensions: { "eslint-config-next@*": { @@ -19104,6 +19117,11 @@ var package_default = { dependencies: { tslib: "*" } + }, + detox: { + dependencies: { + expect: "*" + } } } }, @@ -19125,7 +19143,7 @@ async function main() { maxBuffer: 2048 * 1024 } ); - const pnpmOutput = (0, import_child_process.execSync)(`npx ${packageManager} list -r --depth=0 --json`, { + const pnpmOutput = (0, import_child_process.execSync)(`npx ${packageManager} list -r --depth=-1 --json`, { encoding: "utf-8", maxBuffer: 2048 * 1024 }); diff --git a/tools/github-bot/tsconfig.json b/tools/github-bot/tsconfig.json index 9f2bc80939f6..eb974793b41e 100644 --- a/tools/github-bot/tsconfig.json +++ b/tools/github-bot/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "allowSyntheticDefaultImports": true, "incremental": true, - "module": "commonjs", "lib": ["es2015", "es2017"], "checkJs": false, "declaration": true, diff --git a/tsconfig.base.json b/tsconfig.base.json index 0b60f8c97c0f..77bdaa5e90c8 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -5,12 +5,13 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "isolatedModules": true, - "moduleResolution": "node", "pretty": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true, - "target": "ES6" + "target": "ESNext", + "moduleResolution": "NodeNext", + "module": "NodeNext" } }