diff --git a/.changeset/soft-foxes-suffer.md b/.changeset/soft-foxes-suffer.md new file mode 100644 index 000000000000..a0a9437ef602 --- /dev/null +++ b/.changeset/soft-foxes-suffer.md @@ -0,0 +1,7 @@ +--- +"ledger-live-desktop": minor +"live-mobile": minor +"@ledgerhq/live-common": minor +--- + +feat(wallet-api): add custom handler support diff --git a/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/WalletAPIWebview.tsx b/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/WalletAPIWebview.tsx index 455a69079b94..74c52a63cbfd 100644 --- a/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/WalletAPIWebview.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/WalletAPIWebview.tsx @@ -200,7 +200,10 @@ const useGetUserId = () => { return userId; }; -function useWebView({ manifest }: Pick, webviewRef: RefObject) { +function useWebView( + { manifest, customHandlers }: Pick, + webviewRef: RefObject, +) { const accounts = useSelector(flattenAccountsSelector); const uiHook = useUiHook(manifest); @@ -234,6 +237,7 @@ function useWebView({ manifest }: Pick, webviewRef: RefObject config, webviewHook, uiHook, + customHandlers, }); const handleMessage = useCallback( @@ -293,13 +297,8 @@ function useWebView({ manifest }: Pick, webviewRef: RefObject return { webviewRef, widgetLoaded, onReload, webviewStyle }; } -interface Props { - manifest: AppManifest; - inputs?: Record; -} - export const WalletAPIWebview = forwardRef( - ({ manifest, inputs = {}, onStateChange }, ref) => { + ({ manifest, inputs = {}, customHandlers, onStateChange }, ref) => { const { webviewState, webviewRef, webviewProps, handleRefresh } = useWebviewState( { manifest, inputs }, ref, @@ -313,6 +312,7 @@ export const WalletAPIWebview = forwardRef( const { webviewStyle, widgetLoaded } = useWebView( { manifest, + customHandlers, }, webviewRef, ); diff --git a/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/index.tsx b/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/index.tsx index a275d66238f9..ce0849cff061 100644 --- a/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/index.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/index.tsx @@ -9,7 +9,7 @@ import TrackPage from "~/renderer/analytics/TrackPage"; import { WebviewAPI, WebviewProps } from "./types"; export const Web3AppWebview = forwardRef( - ({ manifest, inputs, onStateChange }, ref) => { + ({ manifest, inputs, customHandlers, onStateChange }, ref) => { ; if (semver.satisfies(WALLET_API_VERSION, manifest.apiVersion)) { @@ -17,6 +17,7 @@ export const Web3AppWebview = forwardRef( diff --git a/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/types.ts b/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/types.ts index 38924db8d365..6b117b8df6c9 100644 --- a/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/types.ts +++ b/apps/ledger-live-desktop/src/renderer/components/Web3AppWebview/types.ts @@ -1,4 +1,5 @@ import { LiveAppManifest } from "@ledgerhq/live-common/platform/types"; +import { WalletAPICustomHandlers } from "@ledgerhq/live-common/wallet-api/types"; import { WebContents } from "electron"; export interface WebviewTag extends Electron.WebviewTag { @@ -10,6 +11,7 @@ export type WebviewProps = { manifest: LiveAppManifest; inputs?: Record; onStateChange?: (webviewState: WebviewState) => void; + customHandlers?: WalletAPICustomHandlers; }; export type WebviewState = { diff --git a/apps/ledger-live-desktop/src/renderer/components/WebPlatformPlayer/index.tsx b/apps/ledger-live-desktop/src/renderer/components/WebPlatformPlayer/index.tsx index 6d6242169528..e7406af2b75c 100644 --- a/apps/ledger-live-desktop/src/renderer/components/WebPlatformPlayer/index.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/WebPlatformPlayer/index.tsx @@ -1,5 +1,7 @@ -import React, { useRef, useState } from "react"; +import React, { useMemo, useRef, useState } from "react"; import styled from "styled-components"; +import { WalletAPICustomHandlers } from "@ledgerhq/live-common/wallet-api/types"; +import { handlers as loggerHandlers } from "@ledgerhq/live-common/wallet-api/CustomLogger/server"; import { Web3AppWebview } from "../Web3AppWebview"; import { TopBar, TopBarConfig } from "./TopBar"; import Box from "../Box"; @@ -32,6 +34,12 @@ export default function WebPlatformPlayer({ manifest, inputs, onClose, config }: const webviewAPIRef = useRef(null); const [webviewState, setWebviewState] = useState(initialWebviewState); + const customHandlers = useMemo(() => { + return { + ...loggerHandlers, + }; + }, []); + return ( @@ -47,6 +55,7 @@ export default function WebPlatformPlayer({ manifest, inputs, onClose, config }: inputs={inputs} onStateChange={setWebviewState} ref={webviewAPIRef} + customHandlers={customHandlers} /> diff --git a/apps/ledger-live-mobile/src/components/Web3AppWebview/WalletAPIWebview.tsx b/apps/ledger-live-mobile/src/components/Web3AppWebview/WalletAPIWebview.tsx index 543afb2adc07..15775f6947bc 100644 --- a/apps/ledger-live-mobile/src/components/Web3AppWebview/WalletAPIWebview.tsx +++ b/apps/ledger-live-mobile/src/components/Web3AppWebview/WalletAPIWebview.tsx @@ -9,11 +9,21 @@ import { NetworkError } from "./NetworkError"; import { DEFAULT_MULTIBUY_APP_ID } from "@ledgerhq/live-common/wallet-api/constants"; export const WalletAPIWebview = forwardRef( - ({ manifest, inputs = {}, onStateChange, allowsBackForwardNavigationGestures = true }, ref) => { + ( + { + manifest, + inputs = {}, + customHandlers, + onStateChange, + allowsBackForwardNavigationGestures = true, + }, + ref, + ) => { const { onMessage, onLoadError, webviewProps, webviewRef } = useWebView( { manifest, inputs, + customHandlers, }, ref, onStateChange, diff --git a/apps/ledger-live-mobile/src/components/Web3AppWebview/helpers.ts b/apps/ledger-live-mobile/src/components/Web3AppWebview/helpers.ts index 01741cf05420..b1a013cc6c80 100644 --- a/apps/ledger-live-mobile/src/components/Web3AppWebview/helpers.ts +++ b/apps/ledger-live-mobile/src/components/Web3AppWebview/helpers.ts @@ -32,7 +32,11 @@ import * as bridge from "../../../e2e/bridge/client"; import Config from "react-native-config"; export function useWebView( - { manifest, inputs }: Pick, + { + manifest, + inputs, + customHandlers, + }: Pick, ref: React.ForwardedRef, onStateChange: WebviewProps["onStateChange"], ) { @@ -86,6 +90,7 @@ export function useWebView( config, webviewHook, uiHook, + customHandlers, }); const onMessage = useCallback( diff --git a/apps/ledger-live-mobile/src/components/Web3AppWebview/index.tsx b/apps/ledger-live-mobile/src/components/Web3AppWebview/index.tsx index 670099a9af62..458c2c4ef7f0 100644 --- a/apps/ledger-live-mobile/src/components/Web3AppWebview/index.tsx +++ b/apps/ledger-live-mobile/src/components/Web3AppWebview/index.tsx @@ -6,13 +6,17 @@ import { PlatformAPIWebview } from "./PlatformAPIWebview"; import { WebviewAPI, WebviewProps } from "./types"; export const Web3AppWebview = forwardRef( - ({ manifest, inputs, onStateChange, allowsBackForwardNavigationGestures }, ref) => { + ( + { manifest, inputs, customHandlers, onStateChange, allowsBackForwardNavigationGestures }, + ref, + ) => { if (semver.satisfies(WALLET_API_VERSION, manifest.apiVersion)) { return ( diff --git a/apps/ledger-live-mobile/src/components/Web3AppWebview/types.ts b/apps/ledger-live-mobile/src/components/Web3AppWebview/types.ts index af9bb46d3c14..dea6b54a7fc7 100644 --- a/apps/ledger-live-mobile/src/components/Web3AppWebview/types.ts +++ b/apps/ledger-live-mobile/src/components/Web3AppWebview/types.ts @@ -1,4 +1,5 @@ import { LiveAppManifest } from "@ledgerhq/live-common/platform/types"; +import { WalletAPICustomHandlers } from "@ledgerhq/live-common/wallet-api/types"; import WebView from "react-native-webview"; export type WebviewProps = { @@ -6,6 +7,7 @@ export type WebviewProps = { inputs?: Record; onStateChange?: (webviewState: WebviewState) => void; allowsBackForwardNavigationGestures?: boolean; + customHandlers?: WalletAPICustomHandlers; }; export type WebviewState = { diff --git a/libs/ledger-live-common/package.json b/libs/ledger-live-common/package.json index c3ad6f35d652..591bf6118c8e 100644 --- a/libs/ledger-live-common/package.json +++ b/libs/ledger-live-common/package.json @@ -166,8 +166,9 @@ "@ledgerhq/live-network": "workspace:^", "@ledgerhq/live-promise": "workspace:^", "@ledgerhq/logs": "workspace:^", - "@ledgerhq/wallet-api-core": "^1.2.0", - "@ledgerhq/wallet-api-server": "^1.2.0", + "@ledgerhq/wallet-api-client": "^1.2.0", + "@ledgerhq/wallet-api-core": "^1.3.0", + "@ledgerhq/wallet-api-server": "^1.3.0", "@solana/spl-token": "^0.3.7", "@solana/web3.js": "1.77.3", "@stacks/network": "1.2.2", diff --git a/libs/ledger-live-common/src/wallet-api/CustomLogger/client.ts b/libs/ledger-live-common/src/wallet-api/CustomLogger/client.ts new file mode 100644 index 000000000000..6476f8f9089d --- /dev/null +++ b/libs/ledger-live-common/src/wallet-api/CustomLogger/client.ts @@ -0,0 +1,23 @@ +import { CustomModule } from "@ledgerhq/wallet-api-client"; + +export class CustomLogger extends CustomModule { + debug(message: string) { + return this.request("custom.logger.debug", { message }); + } + + error(message: string) { + return this.request("custom.logger.error", { message }); + } + + info(message: string) { + return this.request("custom.logger.info", { message }); + } + + log(message: string) { + return this.request("custom.logger.log", { message }); + } + + warn(message: string) { + return this.request("custom.logger.warn", { message }); + } +} diff --git a/libs/ledger-live-common/src/wallet-api/CustomLogger/server.ts b/libs/ledger-live-common/src/wallet-api/CustomLogger/server.ts new file mode 100644 index 000000000000..e4db77517ecb --- /dev/null +++ b/libs/ledger-live-common/src/wallet-api/CustomLogger/server.ts @@ -0,0 +1,23 @@ +/* eslint-disable no-console */ +import { RPCHandler, customWrapper } from "@ledgerhq/wallet-api-server"; +import { LoggerParams, LoggerResponse, MethodIds } from "./types"; + +type Handlers = Record>; + +export const handlers = { + "custom.logger.debug": customWrapper(params => + console.debug(params?.message), + ), + "custom.logger.error": customWrapper(params => + console.error(params?.message), + ), + "custom.logger.info": customWrapper(params => + console.info(params?.message), + ), + "custom.logger.log": customWrapper(params => + console.log(params?.message), + ), + "custom.logger.warn": customWrapper(params => + console.warn(params?.message), + ), +} as const satisfies Handlers; diff --git a/libs/ledger-live-common/src/wallet-api/CustomLogger/types.ts b/libs/ledger-live-common/src/wallet-api/CustomLogger/types.ts new file mode 100644 index 000000000000..924d04ceaaa6 --- /dev/null +++ b/libs/ledger-live-common/src/wallet-api/CustomLogger/types.ts @@ -0,0 +1,15 @@ +export const methodIds = [ + "custom.logger.debug", + "custom.logger.error", + "custom.logger.info", + "custom.logger.log", + "custom.logger.warn", +] as const; + +export type MethodIds = (typeof methodIds)[number]; + +export type LoggerParams = { + message: string; +}; + +export type LoggerResponse = void; diff --git a/libs/ledger-live-common/src/wallet-api/react.ts b/libs/ledger-live-common/src/wallet-api/react.ts index 3637fcb62bad..907ef27db017 100644 --- a/libs/ledger-live-common/src/wallet-api/react.ts +++ b/libs/ledger-live-common/src/wallet-api/react.ts @@ -23,7 +23,7 @@ import { getAccountIdFromWalletAccountId, } from "./converters"; import { isWalletAPISupportedCurrency } from "./helpers"; -import { WalletAPICurrency, AppManifest, WalletAPIAccount } from "./types"; +import { WalletAPICurrency, AppManifest, WalletAPIAccount, WalletAPICustomHandlers } from "./types"; import { getMainAccount, getParentAccount } from "../account"; import { listCurrencies, findCryptoCurrencyById, findTokenById } from "../currencies"; import { TrackingAPI } from "./tracking"; @@ -264,6 +264,19 @@ function useDeviceTransport({ manifest, tracking }) { const allCurrenciesAndTokens = listCurrencies(true); +export type useWalletAPIServerOptions = { + manifest: AppManifest; + accounts: AccountLike[]; + tracking: TrackingAPI; + config: ServerConfig; + webviewHook: { + reload: () => void; + postMessage: (message: string) => void; + }; + uiHook: Partial; + customHandlers?: WalletAPICustomHandlers; +}; + export function useWalletAPIServer({ manifest, accounts, @@ -283,17 +296,8 @@ export function useWalletAPIServer({ "exchange.start": uiExchangeStart, "exchange.complete": uiExchangeComplete, }, -}: { - manifest: AppManifest; - accounts: AccountLike[]; - tracking: TrackingAPI; - config: ServerConfig; - webviewHook: { - reload: () => void; - postMessage: (message: string) => void; - }; - uiHook: Partial; -}): { + customHandlers, +}: useWalletAPIServerOptions): { onMessage: (event: string) => void; widgetLoaded: boolean; onLoad: () => void; @@ -313,6 +317,7 @@ export function useWalletAPIServer({ accounts: walletAPIAccounts, currencies: walletAPICurrencies, permission, + customHandlers, }); useEffect(() => { diff --git a/libs/ledger-live-common/src/wallet-api/types.ts b/libs/ledger-live-common/src/wallet-api/types.ts index d12dd357246e..816eaa78f821 100644 --- a/libs/ledger-live-common/src/wallet-api/types.ts +++ b/libs/ledger-live-common/src/wallet-api/types.ts @@ -1,10 +1,11 @@ import type { SignedOperation } from "@ledgerhq/types-live"; import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets"; import type { Transaction as WalletAPITransaction } from "@ledgerhq/wallet-api-core"; +import type { CustomHandlers as WalletAPICustomHandlers } from "@ledgerhq/wallet-api-server"; import type { Transaction } from "../generated/types"; import { LiveAppManifest } from "../platform/types"; -export type { WalletAPITransaction }; +export type { WalletAPITransaction, WalletAPICustomHandlers }; export type { Families as WalletAPIFamilies, diff --git a/libs/test-utils/dummy-live-app/tsconfig.json b/libs/test-utils/dummy-live-app/tsconfig.json index 0e6bff7ec9b8..ea80081ccc00 100644 --- a/libs/test-utils/dummy-live-app/tsconfig.json +++ b/libs/test-utils/dummy-live-app/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../../../tsconfig.base", + "extends": "../../../tsconfig.base", "compilerOptions": { "lib": ["dom", "dom.iterable", "esnext"], diff --git a/libs/test-utils/dummy-wallet-app/package.json b/libs/test-utils/dummy-wallet-app/package.json index c62b637473a7..7b49b8fa9a94 100644 --- a/libs/test-utils/dummy-wallet-app/package.json +++ b/libs/test-utils/dummy-wallet-app/package.json @@ -6,8 +6,9 @@ "@ledgerhq/hw-app-eth": "workspace:*", "@ledgerhq/hw-transport": "workspace:*", "@ledgerhq/live-common": "workspace:*", - "@ledgerhq/wallet-api-client": "^1.1.0", - "@ledgerhq/wallet-api-simulator": "^1.0.5", + "@ledgerhq/wallet-api-client": "^1.2.0", + "@ledgerhq/wallet-api-client-react": "^1.1.1", + "@ledgerhq/wallet-api-simulator": "^1.1.0", "bignumber.js": "^9.1.2", "buffer": "^6.0.3", "react": "^18.2.0", diff --git a/libs/test-utils/dummy-wallet-app/src/App.css b/libs/test-utils/dummy-wallet-app/src/App.css index 17d3b31bbd89..d6d818593f59 100644 --- a/libs/test-utils/dummy-wallet-app/src/App.css +++ b/libs/test-utils/dummy-wallet-app/src/App.css @@ -35,3 +35,7 @@ background-color: #b8b8b9; text-align: start; } + +pre { + text-align: initial; +} diff --git a/libs/test-utils/dummy-wallet-app/src/App.tsx b/libs/test-utils/dummy-wallet-app/src/App.tsx index 1e90312e9163..e8faf36556d3 100644 --- a/libs/test-utils/dummy-wallet-app/src/App.tsx +++ b/libs/test-utils/dummy-wallet-app/src/App.tsx @@ -1,9 +1,28 @@ -import React, { useMemo } from "react"; +import React, { useState, useEffect, useMemo } from "react"; import { useE2EInjection } from "./hooks"; import "./App.css"; +import { CustomLogger } from "@ledgerhq/live-common/wallet-api/CustomLogger/client"; +import { useWalletAPIClient } from "@ledgerhq/wallet-api-client-react"; +import { WalletAPIClient } from "@ledgerhq/wallet-api-client"; export default function App() { useE2EInjection(); + const { client } = useWalletAPIClient() as { client: WalletAPIClient }; + useEffect(() => { + console.log(client?.custom); + }); + + const [res, setRes] = useState(); + + const testLogger = async () => { + try { + // @ts-expect-error: need to fix it in wallet-api by removing the Record + setRes(await client?.custom.log("test")); + } catch (err) { + // @ts-expect-error: err is unknown and we don't check it + setRes(err); + } + }; const params = useMemo( () => Array.from(new URLSearchParams(window.location.search).entries()), @@ -27,6 +46,8 @@ export default function App() { ))} + + {res ?
{JSON.stringify(res, null, 2)}
: null} ); diff --git a/libs/test-utils/dummy-wallet-app/src/index.tsx b/libs/test-utils/dummy-wallet-app/src/index.tsx index e7cd236bbac7..054c2af02562 100644 --- a/libs/test-utils/dummy-wallet-app/src/index.tsx +++ b/libs/test-utils/dummy-wallet-app/src/index.tsx @@ -1,11 +1,47 @@ -import React from "react"; +import React, { PropsWithChildren } from "react"; import ReactDOM from "react-dom"; +import { CustomLogger } from "@ledgerhq/live-common/wallet-api/CustomLogger/client"; +import { WalletAPIProvider } from "@ledgerhq/wallet-api-client-react"; +import { Transport, WalletAPIClient, WindowMessageTransport } from "@ledgerhq/wallet-api-client"; import "./index.css"; import App from "./App"; +function getCustomModule(client: WalletAPIClient) { + return new CustomLogger(client); + // We need to improve the types to make this work better + // return { + // logger: new CustomLogger(client), + // }; +} + +function TransportProvider({ children }: PropsWithChildren) { + function getWalletAPITransport(): Transport { + if (typeof window === "undefined") { + return { + onMessage: undefined, + send: () => {}, + }; + } + + const transport = new WindowMessageTransport(); + transport.connect(); + return transport; + } + + const transport = getWalletAPITransport(); + + return ( + + {children} + + ); +} + ReactDOM.render( - - - , + + + + + , document.getElementById("root"), ); diff --git a/libs/test-utils/dummy-wallet-app/tsconfig.json b/libs/test-utils/dummy-wallet-app/tsconfig.json index 50cf63bf070b..131f207d3c93 100644 --- a/libs/test-utils/dummy-wallet-app/tsconfig.json +++ b/libs/test-utils/dummy-wallet-app/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../../../tsconfig.base", + "extends": "../../../tsconfig.base", "compilerOptions": { "lib": ["dom", "dom.iterable", "esnext"], "noFallthroughCasesInSwitch": true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6463bca9c589..4433d1b5903d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2103,12 +2103,15 @@ importers: '@ledgerhq/logs': specifier: workspace:^ version: link:../ledgerjs/packages/logs - '@ledgerhq/wallet-api-core': + '@ledgerhq/wallet-api-client': specifier: ^1.2.0 version: 1.2.0 + '@ledgerhq/wallet-api-core': + specifier: ^1.3.0 + version: 1.3.0 '@ledgerhq/wallet-api-server': - specifier: ^1.2.0 - version: 1.2.0(react@18.2.0)(rxjs@7.8.1) + specifier: ^1.3.0 + version: 1.3.0(react@18.2.0)(rxjs@7.8.1) '@solana/spl-token': specifier: ^0.3.7 version: 0.3.8(@solana/web3.js@1.77.3) @@ -4301,11 +4304,14 @@ importers: specifier: workspace:* version: link:../../ledger-live-common '@ledgerhq/wallet-api-client': - specifier: ^1.1.0 - version: 1.1.0 + specifier: ^1.2.0 + version: 1.2.0 + '@ledgerhq/wallet-api-client-react': + specifier: ^1.1.1 + version: 1.1.1(react@18.2.0) '@ledgerhq/wallet-api-simulator': - specifier: ^1.0.5 - version: 1.0.5(react@18.2.0) + specifier: ^1.1.0 + version: 1.1.0(react@18.2.0) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -17411,16 +17417,25 @@ packages: resolution: {integrity: sha512-K3SETlNUJAjU/bN6dNJf56gfpxOhGldmClezIU5puw1PcGDvNf4y8vmEouVz5Htc2a/0vetklf0eIQD8Wk3Hww==} dev: false - /@ledgerhq/wallet-api-client@1.1.0: - resolution: {integrity: sha512-iUFpGlTbpJw6wBD/kRtBpKi1V1BnC4RmbhmbMrKqKMPj6yj2GZuQNWzs1c+rEQ91/ER6uLhzG2Gge8+WjCRtDg==} + /@ledgerhq/wallet-api-client-react@1.1.1(react@18.2.0): + resolution: {integrity: sha512-51FkETxWjiLAVPIRvg65AMZfaLMl9ClQXT0P0Dvh11Ws5fsTXDomhJ6bioenrHpAQRyW37e8oFzOJLYiMX2ukA==} + peerDependencies: + react: ^16.8.0 || ^17 || ^18 + dependencies: + '@ledgerhq/wallet-api-client': 1.2.0 + react: 18.2.0 + dev: false + + /@ledgerhq/wallet-api-client@1.2.0: + resolution: {integrity: sha512-WnMnRBrQLYya61Ao6eqHDOlCpS5AItZyEH6sx4hgIp3VoGmQavm8xj3+Iu74lUBhR8d8Xxn2iEGNKWeGgEhy8g==} dependencies: '@ledgerhq/hw-transport': 6.28.8 - '@ledgerhq/wallet-api-core': 1.2.0 + '@ledgerhq/wallet-api-core': 1.3.0 bignumber.js: 9.1.2 dev: false - /@ledgerhq/wallet-api-core@1.2.0: - resolution: {integrity: sha512-eVCynK9T3P4H3hmUgMsBlf9hfxju0DtJCkE8ZofPya86SFBFEx28sw6J9XW3vjCFXzXs+M431EsZxVwfCBYAUg==} + /@ledgerhq/wallet-api-core@1.3.0: + resolution: {integrity: sha512-Z1YUJIaeRrop+GeVXwDeLj9T/+Za6TxC/+NgesCWFrp2zg6ib4MaOEAoWwGq5DgXBvRunKAo0OF8gU0TaKo47g==} dependencies: '@ledgerhq/errors': 6.14.0 bignumber.js: 9.1.2 @@ -17428,8 +17443,8 @@ packages: zod: 3.22.2 dev: false - /@ledgerhq/wallet-api-server@1.2.0(react@18.2.0)(rxjs@7.8.1): - resolution: {integrity: sha512-9a/29uzUJc1qOZuBY+n/p06BIafo0WAja0tW+cQEASvnbAYJnTSaryTPaQt2uhal9TV6wX2OsZOM7IX1pJlhzA==} + /@ledgerhq/wallet-api-server@1.3.0(react@18.2.0)(rxjs@7.8.1): + resolution: {integrity: sha512-fMA1CH5tSNDYRgAwpt0UMd5sUPeVOf3ACMIqYLADjrN5iwCNt9VQ0hBXEC0TQZOoIZng4Zm3V/MerBCZkvXZfQ==} peerDependencies: react: ^17.x || ^18.x rxjs: ^7.x @@ -17437,21 +17452,21 @@ packages: react: optional: true dependencies: - '@ledgerhq/wallet-api-core': 1.2.0 + '@ledgerhq/wallet-api-core': 1.3.0 bignumber.js: 9.1.2 picomatch: 2.3.1 react: 18.2.0 rxjs: 7.8.1 dev: false - /@ledgerhq/wallet-api-simulator@1.0.5(react@18.2.0): - resolution: {integrity: sha512-1TQXQIPmFEROPWJpNTXvKnMrjU6x952fk6iYZRHWUQ0pL012IwiYj2/Ppy0F0rtu4iTT+URNCmZRlCTzer4oeA==} + /@ledgerhq/wallet-api-simulator@1.1.0(react@18.2.0): + resolution: {integrity: sha512-RHh78eSFP2In20CNNh9DWevVuWPDdk3wySLK8ceUiV+Kt3v9i5M+5cnj/efLVQD3vvttOc7hxkgmFRZaRN3e/g==} dependencies: '@ledgerhq/hw-transport': 6.28.8 '@ledgerhq/hw-transport-http': 6.28.3 - '@ledgerhq/wallet-api-client': 1.1.0 - '@ledgerhq/wallet-api-core': 1.2.0 - '@ledgerhq/wallet-api-server': 1.2.0(react@18.2.0)(rxjs@7.8.1) + '@ledgerhq/wallet-api-client': 1.2.0 + '@ledgerhq/wallet-api-core': 1.3.0 + '@ledgerhq/wallet-api-server': 1.3.0(react@18.2.0)(rxjs@7.8.1) rxjs: 7.8.1 ws: 8.14.1 transitivePeerDependencies: @@ -44692,7 +44707,7 @@ packages: whatwg-encoding: 1.0.5 whatwg-mimetype: 2.3.0 whatwg-url: 9.1.0 - ws: 8.13.0 + ws: 8.14.1 xml-name-validator: 3.0.0 transitivePeerDependencies: - bufferutil @@ -56198,7 +56213,7 @@ packages: dependencies: jszip: 3.9.1 tmp: 0.2.1 - ws: 7.5.7 + ws: 7.5.9 transitivePeerDependencies: - bufferutil - utf-8-validate